WO2024001213A1 - Information processing method, publisher, subscriber, and computer-readable storage medium - Google Patents
Information processing method, publisher, subscriber, and computer-readable storage medium Download PDFInfo
- Publication number
- WO2024001213A1 WO2024001213A1 PCT/CN2023/076291 CN2023076291W WO2024001213A1 WO 2024001213 A1 WO2024001213 A1 WO 2024001213A1 CN 2023076291 W CN2023076291 W CN 2023076291W WO 2024001213 A1 WO2024001213 A1 WO 2024001213A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- message
- sequence information
- published
- processing method
- publishing
- Prior art date
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 53
- 230000010365 information processing Effects 0.000 title 1
- 230000015654 memory Effects 0.000 claims description 37
- 238000000034 method Methods 0.000 claims description 30
- 238000004590 computer program Methods 0.000 claims description 12
- 239000003795 chemical substances by application Substances 0.000 description 11
- 238000005516 engineering process Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 125000004122 cyclic group Chemical group 0.000 description 2
- 238000005538 encapsulation Methods 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 238000010295 mobile communication Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 238000012795 verification Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000007723 transport mechanism Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0823—Errors, e.g. transmission errors
- H04L43/0829—Packet loss
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L51/00—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
- H04L51/21—Monitoring or handling of messages
- H04L51/234—Monitoring or handling of messages for tracking messages
Definitions
- This application relates to but is not limited to the field of communication technology, and in particular, to a message processing method, a publishing end, a subscribing end, and a computer-readable storage medium.
- a subscription publishing mechanism needs to be used to process business messages.
- the publisher publishes the business message. , so that subscribers can receive the business message.
- the publisher usually publishes the message to the channel, and the subscribers who subscribe to the channel can receive the corresponding message. In some cases, for example, the amount of messages in the channel exceeds the buffer.
- the subscriber cannot determine whether the message is lost in the channel because the subscriber cannot determine the continuity of the received message.
- embodiments of the present application provide a message processing method, which is applied to the publishing end.
- the method includes: obtaining a message to be published, and obtaining the first sequence information of the corresponding target channel according to the message to be published;
- the message to be released is encapsulated with the first sequence information to obtain a release message; and the release message is sent to the subscriber corresponding to the target channel, so that the subscriber determines the release based on the first sequence information.
- embodiments of the present application provide a message processing method, which is applied to the subscribing end.
- the method includes: receiving a publishing message, which is sent by the publishing end; parsing the publishing message to obtain the first Sequence information: determine the continuity of the release message according to the first sequence information and the locally saved second sequence information.
- embodiments of the present application provide a publishing terminal, which includes a memory and a processor.
- the memory stores a computer program.
- the processor executes the computer program, it implements the message processing method described in the first aspect.
- embodiments of the present application provide a subscription terminal, which includes a memory and a processor.
- the memory stores a computer program.
- the processor executes the computer program, it implements the message processing method described in the second aspect.
- embodiments of the present application provide a computer-readable storage medium that stores a program.
- the program is executed by a processor, the message processing method described in the first aspect is implemented, or the second aspect is implemented. The message processing method described.
- Figure 1 is a schematic flow chart of a message processing method applied to the publishing end according to the embodiment of the present application
- Figure 2 is a flow chart of a message processing method provided by another embodiment of the present application.
- Figure 3 is a flow chart for obtaining messages to be published provided by another embodiment of the present application.
- Figure 4 is a schematic flowchart of a message processing method applied to a subscriber according to an embodiment of the present application
- Figure 5 is a flow chart of a message processing method provided by another embodiment of the present application.
- Figure 6 is a flow chart of a message processing method provided by another embodiment of the present application.
- Figure 7 is a flow chart of a message processing method provided by another embodiment of the present application.
- Figure 8 is a flow chart of a message processing method provided by another embodiment of the present application.
- Figure 9 is a system architecture diagram for executing a message processing method provided by another embodiment of the present application.
- Figure 10 is a device diagram of a publishing end provided by another embodiment of the present application.
- Figure 11 is a device diagram of a subscriber provided by another embodiment of the present application.
- this application provides a message processing method, a publishing end, a subscribing end and a computer-readable storage medium.
- the message processing method includes obtaining the message to be published, obtaining the first sequence information of the corresponding target channel according to the message to be published;
- the publication message is encapsulated with the first sequence information to obtain the publication message;
- the publication message is sent to the subscriber corresponding to the target channel, so that the subscriber determines the continuity of the publication message based on the first sequence information. Able to determine the continuity of messages and thus Determine whether message loss occurs.
- Figure 1 is a flow chart of a message processing method provided by an embodiment of the present application.
- the message processing method is applied to the publishing end.
- the message processing method may include but is not limited to step S110, step S120 and step S130.
- Step S110 obtain the message to be published, and obtain the first sequence information of the corresponding target channel according to the message to be published;
- Step S120 Encapsulate the message to be released and the first sequence information to obtain the release message
- Step S130 Send a publish message to the subscriber corresponding to the target channel, so that the subscriber determines the continuity of the publish message based on the first sequence information.
- the first sequence information may include the name of the corresponding target channel and the sequence number used to characterize the order of the published message in the target channel.
- the subscriber When the subscriber receives the published message, it can parse the published message. Obtain the corresponding target channel name and the sequence number of the published message, so as to know the order of the published message in the target channel, so that the subscriber can determine the publication based on the sequence number of the published message and the previous sequence number saved by the subscriber.
- the continuity of the message can determine whether there is any message loss before the message is published based on the continuity of the published message.
- this application does not limit the specific content of the first sequence information.
- the first sequence information can represent the corresponding target channel and the order of publishing messages in the target channel. Those skilled in the art can Configure the specific content of the first sequence information according to actual needs.
- the publishing end can be an embedded device, the corresponding subscriber can be another embedded device, and a target channel is established between the publishing end and the subscriber.
- a corresponding business message is generated, and the business message is used as a message to be published.
- the publishing end obtains the first sequence information of the corresponding target channel based on the message to be published, and the message to be published is compared with the message to be published.
- the first sequence information is encapsulated to obtain a publishing message, and then the publishing message is sent to the subscriber corresponding to the target channel through the target channel, so that the subscriber determines the continuity of the published message based on the first sequence information.
- the general subscription publishing component cannot meet the needs of embedded devices, and in this embodiment , using the subscription and publishing function of redis to build a basic subscription and publishing model. It does not persist published messages, and supports multiple nodes and multiple subscription channels, with minimal memory consumption. For example, the publisher and subscriber establish corresponding target channels through the redis server, and store the first sequence information through redis.
- each embedded device can serve as both a publisher and a subscriber.
- multiple embedded devices are included, and a subscription and publishing device is provided.
- the subscription and publishing device includes a redis-based subscription component and a publishing component, and all embedded devices are managed uniformly through the subscription and publishing device.
- the above-mentioned embodiment uses the subscription and publishing function of redis to build a basic subscription and publishing model, and uses redis to store sequence information.
- redis to build a basic subscription and publishing model
- redis to store sequence information.
- the publisher and subscriber mentioned above are embedded devices. They are just an example and cannot be understood. To limit the scope of this application, for example, the publisher can also be a publishing agent component in an embedded device, and the subscriber can be a subscription agent component in an embedded device, or the publisher can be other devices, and the subscriber can also be other devices. Equipment, this application does not limit this.
- FIG. 2 is a flow chart of a message processing method provided by another embodiment of the present application.
- step S110 a message to be published is obtained, and the first sequence information of the corresponding target channel is obtained according to the message to be published. Afterwards, it may also include but is not limited to step S140.
- Step S140 Update the first sequence information and save the updated first sequence information.
- the first sequence information is updated, for example, the sequence number in the first sequence information is incremented, and the first sequence information after the sequence number is incremented is saved.
- the updated first sequence information corresponds to the next one to be released.
- each message to be published can correspond to a unique sequence number, and the sequence numbers corresponding to each message to be published are incremented in order, so that after the subscriber receives the published message, it can judge the message based on the first sequence information continuity.
- the sequence number uses a continuous counting method to set the order, or it can be any method that can represent the sequence of the measured message, and this application does not limit this.
- the publishing end is based on the publish and subscribe function of redis and stores the first sequence information in the redis server. After receiving the message to be published, the publishing end obtains the corresponding first sequence information from the redis server and stores it in the redis server. The first sequence information is updated, and the updated first sequence information is stored in the redis server. It should be noted that the issuing end may also store the first sequence information locally on the issuing end, and this application does not limit this.
- Figure 3 is a flow chart for obtaining messages to be published provided by another embodiment of the present application.
- Obtaining the message to be published in step S110 may include but is not limited to step S111 and step S112.
- Step S111 When the service message is received within the first preset period, the service message is used as a message to be released;
- Step S112 When no service message is received within the first preset period, a keep-alive message is generated and used as a message to be released.
- a corresponding business message is generated, and the business message is used as a message to be published, and the publishing end obtains the first sequence information of the corresponding target channel based on the message to be published. , encapsulate the message to be released and the first sequence information to obtain the release message, and then send the release message to the subscriber corresponding to the target channel through the target channel, so that the subscriber determines the continuity of the release message based on the first sequence information, and The embedded device as the subscribing end can obtain the service message, thereby learning the change in the service status of the embedded device as the publishing end.
- a keep-alive message is generated and used as a message to be published.
- This setting enables the publishing end to be able to Send a publication message to the corresponding subscriber so that the subscriber can determine that the target channel with the publisher is not disconnected.
- this application does not limit the time of the first preset period.
- Those skilled in the art can set the specific time of the first period according to actual needs; this application does not limit the specific content of the keep-alive message.
- Those skilled in the art can configure the specific content of the keep-alive message according to actual needs.
- this application uses atomic operations when executing the above-mentioned steps, so that when executing the above-mentioned steps of this application, the order cannot be disrupted, nor can it be Cut and perform only part of it.
- the type length value TLV format is used to encapsulate the message to be released and the first sequence information, and a cyclic redundancy check (Cyclic Redundancy Check, CRC) is used for encoding, thereby obtaining the release message.
- CRC Cyclic Redundancy Check
- T is Tag, which can indicate that the message to be published is a business message or a keep-alive message
- L Length, which indicates the data length
- V is Value, which can be used to indicate the first sequence information.
- CRC is a channel coding technology that generates a short fixed-digit check code based on network data packets or computer files. It is mainly used to detect or verify errors that may occur after data transmission or storage.
- TLV format and CRC for message encapsulation in this embodiment is only an example and cannot be understood as limiting the invention. Those skilled in the art can set the encapsulation format and encoding method according to actual needs.
- the embodiment of the present application provides a message processing method, applied to the subscriber side.
- the message processing method may include but is not limited to step S410, step S420 and step S430.
- Step S410 receive the publishing message, which is sent by the publishing end
- Step S420 parse the release message to obtain the first sequence information
- Step S430 Determine the continuity of the published message based on the first sequence information and the locally saved second sequence information.
- the subscriber can be an embedded device, and the corresponding publisher can be another embedded device.
- a target channel is established between the publisher and the subscriber.
- the subscribing end receives the publishing message sent by the publishing end, parses the publishing message, obtains the first sequence information, and determines the continuity of the publishing message by using the first sequence information and the second sequence information pre-stored locally.
- the second sequence information represents the sequence number of the last published message.
- the sequence number is 3.
- the sequence number in the first sequence information is 4, it indicates that the published message is the same as the previous published message. Messages are continuous, so you can be sure that no message loss has occurred.
- the second sequence information is the sequence number after the sequence number of the last published message is incremented.
- the sequence number of the last published message is 3 and is incremented to 4.
- the second sequence information represents The sequence number is 4.
- the sequence number in the first sequence information is 4, it indicates that the published message is continuous with the previous published message, so it can be determined that no message loss has occurred.
- the sequence number in the first sequence information is 4 , it indicates that the published message is not continuous with the previous published message, so it can be determined that message loss has occurred.
- the subscriber generates an alarm message to notify the embedded device that message loss has occurred.
- Figure 5 is a flow chart of a message processing method provided by another embodiment of the present application.
- step S430 the continuity of the published message is determined based on the first sequence information and the locally saved second sequence information. , after that, it may also include but is not limited to step S440.
- Step S440 Update the locally saved second sequence information to the first sequence information.
- updating the locally saved second sequence information to the first sequence information includes updating the sequence number in the second sequence information to the sequence number of the first sequence information, so that when the next sequence is received at the subscribing end When publishing a message, the updated second sequence information can be compared with the first sequence information in the next published message to determine the continuity of the next published message.
- the current sequence number of the first sequence information is 3, and the sequence number of the locally saved second sequence information is 2, then the sequence number in the second sequence information is updated to the sequence number of the first sequence information. , so that the sequence number in the updated second sequence information is 3.
- next publishing message when the sequence number of the first sequence information in the next publishing message is 4, it indicates that the publishing messages are continuous, so It can be determined that no message loss has occurred; when the sequence number of the first sequence information of the next published message is not 4, such as 5 or 6 or other values, it indicates that the published messages are discontinuous, so it can be determined that message loss has occurred. At this time The subscriber generates alarm information to notify the embedded device that message loss has occurred.
- step S610 is a flow chart of a message processing method provided by another embodiment of the present application. Before step S410, receiving the release message, step S610 may be included but is not limited to.
- Step S610 When it is detected that the target channel corresponding to the publishing end exists and the second sequence information of the target channel does not exist locally, If there is information, obtain the second sequence information of the target channel and save it locally.
- the subscriber uses the subscription and publishing function based on redis as the basic component.
- the subscriber establishes a corresponding target channel with the publisher through the redis server, and the second sequence information of the target channel is stored in the redis server.
- the subscriber obtains the second sequence information of the target channel from the redis server and saves it locally.
- the subscriber no longer obtains the second sequence information of the target channel from the redis server, but saves the locally saved second sequence information.
- the sequence information is updated to the first sequence information in the published message.
- step S710 is a flow chart of a message processing method provided by another embodiment of the present application.
- step S710 may be included but is not limited to.
- Step S710 When it is detected that the target channel corresponding to the publishing end does not exist, generate the second sequence information and the corresponding channel name, and establish the target channel with the publishing end based on the second sequence information and the channel name.
- the subscriber when it is detected that the target channel corresponding to the publisher does not exist, the subscriber needs to establish a target channel with the publisher.
- the subscriber generates the second sequence information and the corresponding channel name, and based on the second sequence
- the information and channel name establish a target channel with the publisher, so that the subscriber can obtain the publication message sent by the publisher through the target channel.
- the channel name is used to represent a unique target channel, and the second sequence information of each target channel does not interfere with each other.
- FIG. 8 is a flow chart of a message processing method provided by another embodiment of the present application.
- the message processing method also includes step S810.
- Step S810 When the publishing message is not received within the second preset period, the target channel with the publishing end is re-established.
- the second preset period is longer than the first preset period.
- a keep-alive message is generated and the keep-alive message is As a message to be published, a publish message is then generated and sent to the subscriber. If the subscriber does not receive the publish message within the second preset period, it indicates that the target channel between the subscriber and the publisher is disconnected, or an error occurs. The message is lost, therefore, the target channel with the publisher is re-established, and the subscriber generates an exception message and sends the exception message to the embedded device.
- the subscriber can be a subscription agent component in an embedded device. After the subscription agent component obtains the published message, it performs a CRC check on the published message. If the verification is incorrect, an exception message is sent to the embedded device. When If the verification is correct, the published message will be parsed. When the message in the published message is a business message, the business message will be forwarded to the embedded device. When the message in the published message is a keep-alive message, it will not be forwarded to the embedded device.
- FIG. 9 is an architecture diagram of an example of the present application.
- the architecture includes a redis server, a subscription and publishing module and multiple business ends. Each business end is an embedded device.
- the subscription and publishing module manages all business ends in a unified manner.
- the subscription and publishing module includes a subscription agent component and a publishing agent component.
- the publishing agent component establishes a target channel with the subscription agent component through the redis server. When one of the business terminals changes status and generates a business message, the publishing agent component treats the business message as a message to be published and determines the target channel corresponding to the message to be published.
- the subscription agent parses the publication message to obtain the first sequence information, and determines the continuity of the publication message based on the first sequence information and the locally saved second sequence information.
- the business message will be sent to the business end subscribed to the target channel.
- the keep-alive message will not be forwarded to the business end.
- the embodiment of the present application provides a publishing terminal 300, which includes a memory 310 and a processor 320.
- the memory 310 stores a computer program.
- the processor 320 executes the computer program, it implements a message processing method applied to the publishing terminal 300. .
- the processor 320 and the memory 310 may be connected through a bus or other means.
- the memory 310 can be used to store non-transitory software programs and non-transitory computer executable programs.
- memory 310 may include high-speed random access memory 310 and may also include non-transitory memory 310 , such as at least one disk memory 310 , a flash memory device, or other non-transitory solid-state memory 310 .
- the memory 310 optionally includes memory 310 located remotely relative to the processor 320, and these remote memories 310 may be connected to the processor 320 through a network. Examples of the above-mentioned networks include but are not limited to the Internet, intranets, local area networks, mobile communication networks and combinations thereof.
- non-transitory software programs and instructions required to implement the message processing method in the above embodiment are stored in the memory 310.
- the message processing method in the above embodiment is executed, for example, executing The method steps S110 to S130 in FIG. 1 , the method step S40 in FIG. 2 , and the method steps S111 to S112 in FIG. 3 are described above.
- the embodiment of the present application provides a subscriber 400, which includes a memory 420 and a processor 410.
- the memory 420 stores a computer program.
- the processor 410 executes the computer program, it implements a message processing method applied to the subscriber 400. .
- the processor 410 and the memory 420 may be connected through a bus or other means.
- the memory 420 can be used to store non-transitory software programs and non-transitory computer executable programs.
- memory 420 may include high-speed random access memory 420 and may also include non-transitory memory 420 such as at least one disk memory 420 , flash memory device, or other non-transitory solid-state memory 420 .
- the memory 420 optionally includes memory 420 located remotely relative to the processor 410, and these remote memories 420 may be connected to the processor 410 through a network. Examples of the above-mentioned networks include but are not limited to the Internet, intranets, local area networks, mobile communication networks and combinations thereof.
- the non-transitory software programs and instructions required to implement the message processing method in the above embodiment are stored in the memory 420.
- the message processing method in the above embodiment is executed, for example, executing The method steps S410 to S430 in FIG. 4 , the method step S440 in FIG. 5 , the method step S610 in FIG. 6 , the method step S710 in FIG. 7 , and the method step S810 in FIG. 8 are described above.
- the device embodiments described above are only illustrative, and the units described as separate components may or may not be physically separate, that is, they may be located in one place, or they may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
- embodiments of the present application provide a computer-readable storage medium.
- the storage medium stores a program.
- the program When executed by a processor, it implements a message processing method applied to the publishing end, or implements a message processing method applied to the subscribing end.
- the program of the present application is executed by a processor or controller, for example, by a processor in the above-mentioned device embodiment, which can cause the above-mentioned processor to execute the message processing method in the above-mentioned embodiment, for example, execute the above-described Figure 1 Method steps S110 to S130 in Figure 2 , method steps S40 in Figure 2 , method steps S111 to S112 in Figure 3 , method steps S410 to S430 in Figure 4 , method step S440 in Figure 5 , and the method in Figure 6 Step S610, the method in Figure 7 Method step S710, method step S810 in Figure 8.
- the solution provided by this application can determine the continuity of messages and further determine whether message loss occurs.
- Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disk (DVD) or other optical disk storage, magnetic cassettes, tapes, disk storage or other magnetic storage devices, or may Any other medium used to store the desired information and that can be accessed by a computer.
- communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media .
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Environmental & Geological Engineering (AREA)
- Mobile Radio Communication Systems (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The present application provides a message processing method, a publisher, a subscriber, and a computer-readable storage medium. The message processing method comprises: (110) obtaining a message to be published, and obtaining first sequence information of a corresponding target channel according to the message to be published; (120) encapsulating the message to be published and the first sequence information to obtain a published message; and (130) sending the published message to a subscriber corresponding to the target channel, such that the subscriber determines the continuity of the published message according to the first sequence information.
Description
相关申请的交叉引用Cross-references to related applications
本申请基于申请号为202210750160.2、申请日为2022年6月29日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。This application is filed based on a Chinese patent application with application number 202210750160.2 and a filing date of June 29, 2022, and claims the priority of the Chinese patent application. The entire content of the Chinese patent application is hereby incorporated into this application as a reference.
本申请涉及但不限于通信技术领域,尤其涉及一种消息处理方法、发布端、订阅端及计算机可读存储介质。This application relates to but is not limited to the field of communication technology, and in particular, to a message processing method, a publishing end, a subscribing end, and a computer-readable storage medium.
在嵌入式设备微服务管理领域。存在业务之间状态变更的依赖,位于不同节点多个业务需要同时关注某一个服务的状态变化,因此,需要采用订阅发布机制对业务消息进行处理,在产生业务消息时,发布者发布该业务消息,使得订阅者能接收到该业务消息。但是,相关技术的处理方法中,通常是发布者将消息发布到通道中,订阅了该通道的订阅者能够接收到对应的消息,而在一些情况下,例如,通道中的消息量超出缓冲区时导致消息丢失,而由于订阅端无法确定接收到的消息的连续性,从而导致订阅端无法感知到通道中是否发生消息丢失。In the field of microservice management of embedded devices. There are dependencies on status changes between businesses. Multiple businesses located at different nodes need to pay attention to the status changes of a certain service at the same time. Therefore, a subscription publishing mechanism needs to be used to process business messages. When a business message is generated, the publisher publishes the business message. , so that subscribers can receive the business message. However, in the processing method of the related technology, the publisher usually publishes the message to the channel, and the subscribers who subscribe to the channel can receive the corresponding message. In some cases, for example, the amount of messages in the channel exceeds the buffer. When the message is lost, the subscriber cannot determine whether the message is lost in the channel because the subscriber cannot determine the continuity of the received message.
发明内容Contents of the invention
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。The following is an overview of the topics described in detail in this article. This summary is not intended to limit the scope of the claims.
第一方面,本申请实施例提供了一种消息处理方法,应用于发布端,所述方法包括:获取待发布消息,根据所述待发布消息获取对应的目标通道的第一序列信息;对所述待发布消息与所述第一序列信息进行封装,得到发布消息;向所述目标通道对应的订阅端发送所述发布消息,以使所述订阅端根据所述第一序列信息确定所述发布消息的连续性。In the first aspect, embodiments of the present application provide a message processing method, which is applied to the publishing end. The method includes: obtaining a message to be published, and obtaining the first sequence information of the corresponding target channel according to the message to be published; The message to be released is encapsulated with the first sequence information to obtain a release message; and the release message is sent to the subscriber corresponding to the target channel, so that the subscriber determines the release based on the first sequence information. Message continuity.
第二方面,本申请实施例提供了一种消息处理方法,应用于订阅端,所述方法包括:接收发布消息,所述发布消息由发布端发送;对所述发布消息进行解析,得到第一序列信息;根据所述第一序列信息与本地保存的第二序列信息确定所述发布消息的连续性。In the second aspect, embodiments of the present application provide a message processing method, which is applied to the subscribing end. The method includes: receiving a publishing message, which is sent by the publishing end; parsing the publishing message to obtain the first Sequence information: determine the continuity of the release message according to the first sequence information and the locally saved second sequence information.
第三方面,本申请实施例提供了一种发布端,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现第一方面所述的消息处理方法。In a third aspect, embodiments of the present application provide a publishing terminal, which includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, it implements the message processing method described in the first aspect.
第四方面,本申请实施例提供了一种订阅端,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现第二方面所述的消息处理方法。In a fourth aspect, embodiments of the present application provide a subscription terminal, which includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, it implements the message processing method described in the second aspect.
第五方面,本申请实施例提供了一种计算机可读存储介质,所述存储介质存储有程序,所述程序被处理器执行时实现第一方面所述的消息处理方法,或实现第二方面所述的消息处理方法。In a fifth aspect, embodiments of the present application provide a computer-readable storage medium that stores a program. When the program is executed by a processor, the message processing method described in the first aspect is implemented, or the second aspect is implemented. The message processing method described.
本申请的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而
易见,或者通过实施本申请而了解。本申请的目的和其他优点可通过在说明书、权利要求书以及附图中所特别指出的结构来实现和获得。Other features and advantages of the present application will be set forth in, and in part will be apparent from, the description that follows. Easily seen, or learned by practicing this application. The objectives and other advantages of the application may be realized and obtained by the structure particularly pointed out in the specification, claims and appended drawings.
附图用来提供对本申请技术方案的进一步理解,并且构成说明书的一部分,与本申请的实施例一起用于解释本申请的技术方案,并不构成对本申请技术方案的限制。The drawings are used to provide a further understanding of the technical solution of the present application and constitute a part of the specification. They are used to explain the technical solution of the present application together with the embodiments of the present application and do not constitute a limitation of the technical solution of the present application.
图1是本申请实施例的应用于发布端的消息处理方法的流程示意图;Figure 1 is a schematic flow chart of a message processing method applied to the publishing end according to the embodiment of the present application;
图2是本申请另一个实施例提供的消息处理方法的流程图;Figure 2 is a flow chart of a message processing method provided by another embodiment of the present application;
图3是本申请另一个实施例提供的获取待发布消息的流程图;Figure 3 is a flow chart for obtaining messages to be published provided by another embodiment of the present application;
图4是本申请实施例的应用于订阅端的消息处理方法的流程示意图;Figure 4 is a schematic flowchart of a message processing method applied to a subscriber according to an embodiment of the present application;
图5是本申请另一实施例提供的消息处理方法的流程图;Figure 5 is a flow chart of a message processing method provided by another embodiment of the present application;
图6是本申请另一实施例提供的消息处理方法的流程图;Figure 6 is a flow chart of a message processing method provided by another embodiment of the present application;
图7是本申请另一实施例提供的消息处理方法的流程图;Figure 7 is a flow chart of a message processing method provided by another embodiment of the present application;
图8是本申请另一实施例提供的消息处理方法的流程图;Figure 8 is a flow chart of a message processing method provided by another embodiment of the present application;
图9为本申请另一个实施例提供的执行消息处理方法的系统架构图;Figure 9 is a system architecture diagram for executing a message processing method provided by another embodiment of the present application;
图10为本申请另一个实施例提供的发布端的装置图;Figure 10 is a device diagram of a publishing end provided by another embodiment of the present application;
图11为本申请另一个实施例提供的订阅端的装置图。Figure 11 is a device diagram of a subscriber provided by another embodiment of the present application.
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solutions and advantages of the present application more clear, the present application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present application and are not used to limit the present application.
需要说明的是,虽然在装置示意图中进行了功能模块划分,在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于装置中的模块划分,或流程图中的顺序执行所示出或描述的步骤。说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It should be noted that although the functional modules are divided in the device schematic diagram and the logical sequence is shown in the flow chart, in some cases, the modules can be divided into different modules in the device or the order in the flow chart can be executed. The steps shown or described. The terms "first", "second", etc. in the description, claims, and above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific sequence or sequence.
可以理解的是,在嵌入式设备微服务管理领域。存在业务之间状态变更的依赖,位于不同节点多个业务需要同时关注某一个服务的状态变化,因此,需要采用订阅发布机制对业务消息进行处理,在产生业务消息时,发布者发布该业务消息,使得订阅者能接收到该业务消息。相关技术的处理方法中,通常是发布者将消息发布到通道中,订阅了该通道的订阅者能够接收到对应的消息,而在一些情况下,例如,嵌入式设备数量较多,且状态变更频繁,导致每个嵌入式设备均会产生较多消息,容易导致对应的通道中的消息量超出缓冲区,从而导致某些消息丢失,而由于订阅端无法确定接收到的消息的连续性,从而导致订阅端无法感知到通道中是否发生消息丢失,使得嵌入式设备无法对丢失的消息进行处理,从而无法保证消息传输过程的可靠性。Understandably, in the field of embedded device microservice management. There are dependencies on status changes between businesses. Multiple businesses located at different nodes need to pay attention to the status changes of a certain service at the same time. Therefore, a subscription publishing mechanism needs to be used to process business messages. When a business message is generated, the publisher publishes the business message. , so that subscribers can receive the business message. In the processing method of related technologies, the publisher usually publishes the message to the channel, and the subscribers who subscribe to the channel can receive the corresponding message. In some cases, for example, there are a large number of embedded devices and the status changes. Frequent, causing each embedded device to generate a lot of messages, which can easily cause the amount of messages in the corresponding channel to exceed the buffer, resulting in the loss of some messages, and because the subscriber cannot determine the continuity of the received messages, thus As a result, the subscriber cannot sense whether a message is lost in the channel, making the embedded device unable to process the lost message, and thus cannot guarantee the reliability of the message transmission process.
基于此,本申请提供了一种消息处理方法、发布端、订阅端及计算机可读存储介质,消息处理方法包括获取待发布消息,根据待发布消息获取对应的目标通道的第一序列信息;对待发布消息与第一序列信息进行封装,得到发布消息;向目标通道对应的订阅端发送发布消息,以使订阅端根据第一序列信息确定发布消息的连续性。能够确定消息的连续性,进而确
定是否出现消息丢失。Based on this, this application provides a message processing method, a publishing end, a subscribing end and a computer-readable storage medium. The message processing method includes obtaining the message to be published, obtaining the first sequence information of the corresponding target channel according to the message to be published; The publication message is encapsulated with the first sequence information to obtain the publication message; the publication message is sent to the subscriber corresponding to the target channel, so that the subscriber determines the continuity of the publication message based on the first sequence information. Able to determine the continuity of messages and thus Determine whether message loss occurs.
下面结合附图,对本申请实施例作进一步阐述。The embodiments of the present application will be further described below with reference to the accompanying drawings.
参照图1,图1为本申请一个实施例提供的一种消息处理方法的流程图,该消息处理方法,应用于发布端,消息处理方法可以包括但不限于步骤S110、步骤S120和步骤S130。Referring to Figure 1, Figure 1 is a flow chart of a message processing method provided by an embodiment of the present application. The message processing method is applied to the publishing end. The message processing method may include but is not limited to step S110, step S120 and step S130.
步骤S110,获取待发布消息,根据待发布消息获取对应的目标通道的第一序列信息;Step S110, obtain the message to be published, and obtain the first sequence information of the corresponding target channel according to the message to be published;
步骤S120,对待发布消息与第一序列信息进行封装,得到发布消息;Step S120: Encapsulate the message to be released and the first sequence information to obtain the release message;
步骤S130,向目标通道对应的订阅端发送发布消息,以使订阅端根据第一序列信息确定发布消息的连续性。Step S130: Send a publish message to the subscriber corresponding to the target channel, so that the subscriber determines the continuity of the publish message based on the first sequence information.
值得注意的是,第一序列信息可以包括对应的目标通道的名称,以及用于表征发布消息在该目标通道中的顺序的序列号,订阅端在接收到发布消息时,能够对发布消息进行解析得到对应的目标通道名称以及该发布消息的序列号,从而能够得知该发布消息在目标通道中的顺序,从而订阅端能够根据该发布消息的序列号以及订阅端保存的上一个序列号确定发布消息的连续性,进而能够根据发布消息的连续性,能够确定在该发布消息之前是否存在消息丢失。需要说明的是,本申请对第一序列信息的具体内容不多作限定,第一序列信息能够表征对应的目标通道,以及表征发布消息在该目标通道中的顺序即可,本领域技术人员可以根据实际需要配置第一序列信息的具体内容。It is worth noting that the first sequence information may include the name of the corresponding target channel and the sequence number used to characterize the order of the published message in the target channel. When the subscriber receives the published message, it can parse the published message. Obtain the corresponding target channel name and the sequence number of the published message, so as to know the order of the published message in the target channel, so that the subscriber can determine the publication based on the sequence number of the published message and the previous sequence number saved by the subscriber. The continuity of the message can determine whether there is any message loss before the message is published based on the continuity of the published message. It should be noted that this application does not limit the specific content of the first sequence information. The first sequence information can represent the corresponding target channel and the order of publishing messages in the target channel. Those skilled in the art can Configure the specific content of the first sequence information according to actual needs.
在一实施例中,发布端可以是嵌入式设备,对应的订阅端可以是另一个嵌入式设备,发布端与订阅端之间建立有目标通道。当作为发布端的嵌入式设备的业务状态产生变化,则生成相应的业务消息,将该业务消息作为待发布消息,发布端根据待发布消息获取对应的目标通道的第一序列信息,对待发布消息与第一序列信息进行封装,得到发布消息,然后通过目标通道,向与目标通道对应的订阅端发送发布消息,以使订阅端根据第一序列信息确定发布消息的连续性。In one embodiment, the publishing end can be an embedded device, the corresponding subscriber can be another embedded device, and a target channel is established between the publishing end and the subscriber. When the business status of the embedded device as the publishing end changes, a corresponding business message is generated, and the business message is used as a message to be published. The publishing end obtains the first sequence information of the corresponding target channel based on the message to be published, and the message to be published is compared with the message to be published. The first sequence information is encapsulated to obtain a publishing message, and then the publishing message is sent to the subscriber corresponding to the target channel through the target channel, so that the subscriber determines the continuity of the published message based on the first sequence information.
值得注意的是,当发布端与订阅端均是嵌入式设备时,由于一般情况下,嵌入式设备内存资源紧张,需要严格控制组件内存消耗,且订阅端和发布端数量众多,且分布在不同的节点上主机节点上,需要保证分布式高并发,尤其是有新的节点/业务模块加入时保证高并发,因此,一般的订阅发布组件无法满足嵌入式设备的需求,而在本实施例中,采用redis的订阅发布功能,使用redis的订阅发布功能构建基础订阅发布模型,它不持久化发布的消息,且支持多节点、多订阅通道,内存消耗极小。例如,发布端与订阅端通过redis服务器建立对应的目标通道,并通过redis存储第一序列信息,发布端在获取待发布消息时,从服务器中取对应的目标通道的第一序列信息,然后发布端对待发布消息与第一序列信息进行封装,得到发布消息,再通过向目标通道对应的订阅端发送发布消息,以使订阅端根据第一序列信息确定发布消息的连续性。需要说明的是,每一个嵌入式设备既可作为发布端也可以作为订阅端。在一些实施例中,包括多个嵌入式设备,并设有一个订阅发布装置,订阅发布装置包括基于redis的订阅组件和发布组件,通过该订阅发布装置统一管理所有的嵌入式设备。It is worth noting that when the publisher and subscriber are both embedded devices, due to the tight memory resources of the embedded device under normal circumstances, component memory consumption needs to be strictly controlled, and there are many subscribers and publishers, and they are distributed in different locations. On the host node, it is necessary to ensure high distributed concurrency, especially when new nodes/business modules are added. Therefore, the general subscription publishing component cannot meet the needs of embedded devices, and in this embodiment , using the subscription and publishing function of redis to build a basic subscription and publishing model. It does not persist published messages, and supports multiple nodes and multiple subscription channels, with minimal memory consumption. For example, the publisher and subscriber establish corresponding target channels through the redis server, and store the first sequence information through redis. When the publisher obtains the message to be published, it obtains the first sequence information of the corresponding target channel from the server, and then publishes The terminal encapsulates the message to be published and the first sequence information to obtain the published message, and then sends the publishing message to the subscriber corresponding to the target channel, so that the subscriber determines the continuity of the published message based on the first sequence information. It should be noted that each embedded device can serve as both a publisher and a subscriber. In some embodiments, multiple embedded devices are included, and a subscription and publishing device is provided. The subscription and publishing device includes a redis-based subscription component and a publishing component, and all embedded devices are managed uniformly through the subscription and publishing device.
需要说明的是,上述实施例提及的使用redis的订阅发布功能构建基础订阅发布模型,并使用redis存储序列信息,但实际使用中有和redis特性类似的订阅发布组件,都可作为订阅端与发布端的基础组件,本领域技术人员可以根据实际需要设定订阅端与发布端的基础组件。It should be noted that the above-mentioned embodiment uses the subscription and publishing function of redis to build a basic subscription and publishing model, and uses redis to store sequence information. However, in actual use, there are subscription and publishing components with similar characteristics to redis, which can be used as the subscription end and Regarding the basic components of the publishing side, those skilled in the art can set the basic components of the subscribing side and the publishing side according to actual needs.
需要说明的是,上述提及的发布端与订阅端为嵌入式设备,只是一个示例,并不能理解
为对本申请的限定,例如,发布端还可以是嵌入式设备中的发布代理组件,订阅端可以是嵌入式设备中的订阅代理组件,或者发布端还可以是其他设备,订阅端也可以是其他设备,本申请对此不作出限定。It should be noted that the publisher and subscriber mentioned above are embedded devices. They are just an example and cannot be understood. To limit the scope of this application, for example, the publisher can also be a publishing agent component in an embedded device, and the subscriber can be a subscription agent component in an embedded device, or the publisher can be other devices, and the subscriber can also be other devices. Equipment, this application does not limit this.
可以理解的是,参照图2,图2是本申请另一个实施例提供的消息处理方法的流程图,在步骤S110,获取待发布消息,根据待发布消息获取对应的目标通道的第一序列信息之后,还可以包括但不限于步骤S140。It can be understood that, with reference to Figure 2, Figure 2 is a flow chart of a message processing method provided by another embodiment of the present application. In step S110, a message to be published is obtained, and the first sequence information of the corresponding target channel is obtained according to the message to be published. Afterwards, it may also include but is not limited to step S140.
步骤S140,更新第一序列信息,保存更新后的第一序列信息。Step S140: Update the first sequence information and save the updated first sequence information.
值得注意的是,更新第一序列信息,例如使第一序列信息中的序列号自增,并保存序列号自增后的第一序列信息,更新后的第一序列信息对应于下一个待发布消息,如此,能够使每一个待发布消息能够对应一个唯一的序列号,且各个待发布消息对应的序列号按顺序自增,使得订阅端接收到发布消息后,能够根据第一序列信息判断消息的连续性。需要说明的是,序列号采用连续计数的方式设定顺序,还可以是任何能表征度量消息序列性的方式,本申请对此不作出限定。It is worth noting that the first sequence information is updated, for example, the sequence number in the first sequence information is incremented, and the first sequence information after the sequence number is incremented is saved. The updated first sequence information corresponds to the next one to be released. message, in this way, each message to be published can correspond to a unique sequence number, and the sequence numbers corresponding to each message to be published are incremented in order, so that after the subscriber receives the published message, it can judge the message based on the first sequence information continuity. It should be noted that the sequence number uses a continuous counting method to set the order, or it can be any method that can represent the sequence of the measured message, and this application does not limit this.
在一些实施例中,发布端基于redis的发布订阅功能,并将第一序列信息存储于redis服务器中,发布端接收到待发布消息后,并从redis服务器获取对应的第一序列信息,并将第一序列信息进行更新,将更新后的第一序列信息存储于redis服务器中。需要说明的是,发布端还可以是将第一序列信息保存于发布端本地,本申请对此不作出限定。In some embodiments, the publishing end is based on the publish and subscribe function of redis and stores the first sequence information in the redis server. After receiving the message to be published, the publishing end obtains the corresponding first sequence information from the redis server and stores it in the redis server. The first sequence information is updated, and the updated first sequence information is stored in the redis server. It should be noted that the issuing end may also store the first sequence information locally on the issuing end, and this application does not limit this.
可以理解的是,参照图3,图3是本申请另一个实施例提供的获取待发布消息的流程图。步骤S110中的获取待发布消息,可以包括但不限于步骤S111和步骤S112。It can be understood that, with reference to Figure 3, Figure 3 is a flow chart for obtaining messages to be published provided by another embodiment of the present application. Obtaining the message to be published in step S110 may include but is not limited to step S111 and step S112.
步骤S111,当在第一预设周期内接收到业务消息,将业务消息作为待发布消息;Step S111: When the service message is received within the first preset period, the service message is used as a message to be released;
步骤S112,当在第一预设周期内未接收到业务消息,生成保活消息并将保活消息作为待发布消息。Step S112: When no service message is received within the first preset period, a keep-alive message is generated and used as a message to be released.
值得注意的是,当作为发布端的嵌入式设备的业务状态产生变化,则生成相应的业务消息,将该业务消息作为待发布消息,发布端根据待发布消息获取对应的目标通道的第一序列信息,对待发布消息与第一序列信息进行封装,得到发布消息,然后通过目标通道,向与目标通道对应的订阅端发送发布消息,以使订阅端根据第一序列信息确定发布消息的连续性,并能够使作为订阅端的嵌入式设备能够得到该业务消息,从而得知作为发布端的嵌入式设备的业务状态产生变化。It is worth noting that when the service status of the embedded device as the publishing end changes, a corresponding business message is generated, and the business message is used as a message to be published, and the publishing end obtains the first sequence information of the corresponding target channel based on the message to be published. , encapsulate the message to be released and the first sequence information to obtain the release message, and then send the release message to the subscriber corresponding to the target channel through the target channel, so that the subscriber determines the continuity of the release message based on the first sequence information, and The embedded device as the subscribing end can obtain the service message, thereby learning the change in the service status of the embedded device as the publishing end.
需要说明的是,当在第一预设周期内未接收到业务消息,生成保活消息并将保活消息作为待发布消息,如此设置能够使发布端在每个第一预设周期内都能向对应的订阅端发送发布消息,以使订阅端能够判断出与发布端之间目标通道没有断开。需要说明的是,本申请对第一预设周期的时间不做限定,本领域技术人员可以根据实际需要设定第一周期的具体时间;本申请对保活消息的具体内容不做出限定,本领域技术人员可以根据实际需要配置保活消息的具体内容。It should be noted that when no business message is received within the first preset period, a keep-alive message is generated and used as a message to be published. This setting enables the publishing end to be able to Send a publication message to the corresponding subscriber so that the subscriber can determine that the target channel with the publisher is not disconnected. It should be noted that this application does not limit the time of the first preset period. Those skilled in the art can set the specific time of the first period according to actual needs; this application does not limit the specific content of the keep-alive message. Those skilled in the art can configure the specific content of the keep-alive message according to actual needs.
值得注意的是,在一实施例中,本申请在执行上述提及的步骤时,采用原子操作,以使得在执行本申请上述提及的步骤时,顺序不可以被打乱,也不可以被切割而只执行其中的一部分。It is worth noting that, in one embodiment, this application uses atomic operations when executing the above-mentioned steps, so that when executing the above-mentioned steps of this application, the order cannot be disrupted, nor can it be Cut and perform only part of it.
在一实施例中,采用类型长度值TLV格式对待发布消息及第一序列信息进行封装,并采用循环冗余校验(Cyclic Redundancy Check,CRC)进行编码,从而得到发布消息。例如,T
为Tag,Tag可以表征待发布消息为业务消息或为保活消息;L为Length,表征数据长度;V为Value,可以用于表征第一序列信息。CRC是一种根据网络数据包或计算机文件等数据产生简短固定位数校验码的一种信道编码技术,主要用来检测或校验数据传输或者保存后可能出现的错误,订阅端在接收到发布消息后,可以进行CRC校验,以确认发布消息的安全性。需要说明的是,本实施例采用TLV格式及CRC进行消息封装,只是一个示例,并不能理解为对发明的限定,本领域技术人员可以根据实际需要设定封装的格式以及采取的编码方式。In one embodiment, the type length value TLV format is used to encapsulate the message to be released and the first sequence information, and a cyclic redundancy check (Cyclic Redundancy Check, CRC) is used for encoding, thereby obtaining the release message. For example, T is Tag, which can indicate that the message to be published is a business message or a keep-alive message; L is Length, which indicates the data length; V is Value, which can be used to indicate the first sequence information. CRC is a channel coding technology that generates a short fixed-digit check code based on network data packets or computer files. It is mainly used to detect or verify errors that may occur after data transmission or storage. The subscriber receives After publishing a message, a CRC check can be performed to confirm the security of the published message. It should be noted that the use of TLV format and CRC for message encapsulation in this embodiment is only an example and cannot be understood as limiting the invention. Those skilled in the art can set the encapsulation format and encoding method according to actual needs.
另外,参照图4,本申请实施例提供了一种消息处理方法,,应用于订阅端,消息处理方法可以包括但不限于步骤S410、步骤S420和步骤S430。In addition, referring to Figure 4, the embodiment of the present application provides a message processing method, applied to the subscriber side. The message processing method may include but is not limited to step S410, step S420 and step S430.
步骤S410,接收发布消息,发布消息由发布端发送;Step S410, receive the publishing message, which is sent by the publishing end;
步骤S420,对发布消息进行解析,得到第一序列信息;Step S420, parse the release message to obtain the first sequence information;
步骤S430,根据第一序列信息与本地保存的第二序列信息确定发布消息的连续性。Step S430: Determine the continuity of the published message based on the first sequence information and the locally saved second sequence information.
值得注意的是,订阅端可以是嵌入式设备,对应的发布端可以是另一个嵌入式设备,发布端与订阅端之间建立有目标通道。订阅端接收到发布端发送的发布消息,对发布消息进行解析,得到第一序列信息,并将第一序列信息与预先保存在本地的第二序列信息确定发布消息的连续性。例如,在一实施例中,第二序列信息表征了上一个发布消息的序列号,例如序列号为3,则当第一序列信息中的序列号为4,则表明该发布消息与上一个发布消息连续,从而可以确定没有发生消息丢失。在另一实施例中,第二序列信息为上一个发布消息的序列号自增后的序列号,例如,上一个发布消息的序列号为3,自增后为4,则第二序列信息表征的序列号为4,当第一序列信息中的序列号为4,则表明该发布消息与上一个发布消息连续,从而可以确定没有发生消息丢失,而当第一序列信息中的序列号为4,则表明该发布消息与上一个发布消息不连续,从而可以确定发生消息丢失,此时订阅端生成告警信息,通知嵌入式设备发生消息丢失。It is worth noting that the subscriber can be an embedded device, and the corresponding publisher can be another embedded device. A target channel is established between the publisher and the subscriber. The subscribing end receives the publishing message sent by the publishing end, parses the publishing message, obtains the first sequence information, and determines the continuity of the publishing message by using the first sequence information and the second sequence information pre-stored locally. For example, in one embodiment, the second sequence information represents the sequence number of the last published message. For example, the sequence number is 3. Then when the sequence number in the first sequence information is 4, it indicates that the published message is the same as the previous published message. Messages are continuous, so you can be sure that no message loss has occurred. In another embodiment, the second sequence information is the sequence number after the sequence number of the last published message is incremented. For example, the sequence number of the last published message is 3 and is incremented to 4. Then the second sequence information represents The sequence number is 4. When the sequence number in the first sequence information is 4, it indicates that the published message is continuous with the previous published message, so it can be determined that no message loss has occurred. When the sequence number in the first sequence information is 4 , it indicates that the published message is not continuous with the previous published message, so it can be determined that message loss has occurred. At this time, the subscriber generates an alarm message to notify the embedded device that message loss has occurred.
可以理解的是,参照图5,图5是本申请另一实施例提供的消息处理方法的流程图,在步骤S430,根据第一序列信息与本地保存的第二序列信息确定发布消息的连续性,之后,还可以包括但不限于步骤S440。It can be understood that, with reference to Figure 5, Figure 5 is a flow chart of a message processing method provided by another embodiment of the present application. In step S430, the continuity of the published message is determined based on the first sequence information and the locally saved second sequence information. , after that, it may also include but is not limited to step S440.
步骤S440,将本地保存的所述第二序列信息更新为所述第一序列信息。Step S440: Update the locally saved second sequence information to the first sequence information.
值得注意的是,将本地保存的第二序列信息更新为第一序列信息,包括将第二序列信息中的序列号更新为第一序列信息的序列号,以使在订阅端在接收到下一个发布消息时,能够根据更新后的第二序列信息与下一个发布消息中的第一序列信息进行对比,以判断下一个发布消息的连续性。在一实施例中,当前的第一序列信息的序列号为3,本地保存的第二序列信息的序列号为2,则将第二序列信息中的序列号更新为第一序列信息的序列号,使得更新后的第二序列信息中的序列号为3,在接收到下一个发布消息时,当下一个发布消息中的第一序列信息的序列号为4,则表明发布消息是连续的,从而可以确定没有发生消息丢失;当下一个发布消息的第一序列信息的序列号不为4,例如为5或6或其他数值,则表明发布消息是不连续的,从而可以确定发生消息丢失,此时订阅端生成告警信息,通知嵌入式设备发生消息丢失。It is worth noting that updating the locally saved second sequence information to the first sequence information includes updating the sequence number in the second sequence information to the sequence number of the first sequence information, so that when the next sequence is received at the subscribing end When publishing a message, the updated second sequence information can be compared with the first sequence information in the next published message to determine the continuity of the next published message. In one embodiment, the current sequence number of the first sequence information is 3, and the sequence number of the locally saved second sequence information is 2, then the sequence number in the second sequence information is updated to the sequence number of the first sequence information. , so that the sequence number in the updated second sequence information is 3. When the next publishing message is received, when the sequence number of the first sequence information in the next publishing message is 4, it indicates that the publishing messages are continuous, so It can be determined that no message loss has occurred; when the sequence number of the first sequence information of the next published message is not 4, such as 5 or 6 or other values, it indicates that the published messages are discontinuous, so it can be determined that message loss has occurred. At this time The subscriber generates alarm information to notify the embedded device that message loss has occurred.
可以理解的是,参照图6,图6是本申请另一实施例提供的消息处理方法的流程图,在步骤S410,接收发布消息,之前,可以包括但不限于步骤S610。It can be understood that, with reference to Figure 6, Figure 6 is a flow chart of a message processing method provided by another embodiment of the present application. Before step S410, receiving the release message, step S610 may be included but is not limited to.
步骤S610,在检测到与发布端对应的目标通道存在且本地不存在目标通道的第二序列信
息的情况下,获取目标通道的第二序列信息并保存至本地。Step S610: When it is detected that the target channel corresponding to the publishing end exists and the second sequence information of the target channel does not exist locally, If there is information, obtain the second sequence information of the target channel and save it locally.
值得注意的是,在一些实施例中,订阅端采用基于redis的订阅发布功能作为基础组件,订阅端通过redis服务器与发布端建立对应的目标通道,且目标通道的第二序列信息存储于redis服务器中,在检测到与发布端对应的目标通道存在且本地不存在目标通道的第二序列信息的情况下,订阅端从redis服务器获取目标通道的第二序列信息并保存至本地。当检测到与发布端对应的目标通道存在且本地存在目标通道的第二序列信息的情况下,订阅端不再从redis服务器中获取目标通道的第二序列信息,而是将本地保存的第二序列信息更新为发布消息中的第一序列信息。It is worth noting that in some embodiments, the subscriber uses the subscription and publishing function based on redis as the basic component. The subscriber establishes a corresponding target channel with the publisher through the redis server, and the second sequence information of the target channel is stored in the redis server. , when it is detected that the target channel corresponding to the publisher exists and the second sequence information of the target channel does not exist locally, the subscriber obtains the second sequence information of the target channel from the redis server and saves it locally. When it is detected that the target channel corresponding to the publisher exists and the second sequence information of the target channel exists locally, the subscriber no longer obtains the second sequence information of the target channel from the redis server, but saves the locally saved second sequence information. The sequence information is updated to the first sequence information in the published message.
可以理解的是,参照图7,图7是本申请另一实施例提供的消息处理方法的流程图,在步骤S410,接收发布消息,之前,可以包括但不限于步骤S710。It can be understood that, with reference to Figure 7, Figure 7 is a flow chart of a message processing method provided by another embodiment of the present application. Before step S410, receiving the release message, step S710 may be included but is not limited to.
步骤S710,在检测到与发布端对应的目标通道不存在的情况下,生成第二序列信息与对应的通道名称,并根据第二序列信息与通道名称建立与发布端之间的目标通道。Step S710: When it is detected that the target channel corresponding to the publishing end does not exist, generate the second sequence information and the corresponding channel name, and establish the target channel with the publishing end based on the second sequence information and the channel name.
值得注意的是,在检测到与发布端对应的目标通道不存在的情况下,则订阅端需要与发布端建立目标通道,订阅端生成第二序列信息与对应的通道名称,并根据第二序列信息与通道名称建立与发布端之间的目标通道,以使订阅端能够通过目标通道获取发布端发送的发布消息。在一些实施例中,发布端、订阅端众多,对应的目标通道也众多,因此通道名称用于表征唯一的目标通道,每个目标通道的第二序列信息互不干扰。It is worth noting that when it is detected that the target channel corresponding to the publisher does not exist, the subscriber needs to establish a target channel with the publisher. The subscriber generates the second sequence information and the corresponding channel name, and based on the second sequence The information and channel name establish a target channel with the publisher, so that the subscriber can obtain the publication message sent by the publisher through the target channel. In some embodiments, there are many publishers and subscribers, and there are many corresponding target channels. Therefore, the channel name is used to represent a unique target channel, and the second sequence information of each target channel does not interfere with each other.
可以理解的是,参照图8,图8是本申请另一实施例提供的消息处理方法的流程图,消息处理方法还包括步骤S810。It can be understood that, with reference to FIG. 8 , FIG. 8 is a flow chart of a message processing method provided by another embodiment of the present application. The message processing method also includes step S810.
步骤S810,当在第二预设周期内未接收到发布消息,重新建立与发布端之间的目标通道。Step S810: When the publishing message is not received within the second preset period, the target channel with the publishing end is re-established.
在一些实施例中,第二预设周期的时间大于第一预设周期的时间,在第一预设周期内,若发布端没有收到业务消息,则生成保活消息,并将保活消息作为待发布消息,然后生成发布消息并发送至订阅端,而当在第二预设周期内订阅端未接收到发布消息,则表明订阅端与发布端之间的目标通道断开,或者出现了消息丢失,因此,重新建立与发布端之间的目标通道,并且订阅端生成异常信息,将异常信息发送至嵌入式设备。In some embodiments, the second preset period is longer than the first preset period. During the first preset period, if the publishing end does not receive the service message, a keep-alive message is generated and the keep-alive message is As a message to be published, a publish message is then generated and sent to the subscriber. If the subscriber does not receive the publish message within the second preset period, it indicates that the target channel between the subscriber and the publisher is disconnected, or an error occurs. The message is lost, therefore, the target channel with the publisher is re-established, and the subscriber generates an exception message and sends the exception message to the embedded device.
值得注意的是,订阅端可以是嵌入式设备中的订阅代理组件,订阅代理组件获取到发布消息后,对发布消息进行CRC校验,若校验有误则向嵌入式设备发送异常信息,当校验无误则解析发布消息,当发布消息中的消息为业务消息时,则将业务消息转发至嵌入式设备,当发布消息中的消息为保活消息,则不转发至嵌入式设备。It is worth noting that the subscriber can be a subscription agent component in an embedded device. After the subscription agent component obtains the published message, it performs a CRC check on the published message. If the verification is incorrect, an exception message is sent to the embedded device. When If the verification is correct, the published message will be parsed. When the message in the published message is a business message, the business message will be forwarded to the embedded device. When the message in the published message is a keep-alive message, it will not be forwarded to the embedded device.
可以理解的是,参照图9,图9为本申请一个示例的架构图。该架构包括redis服务器、订阅发布模块和多个业务端,每个业务端均为嵌入式设备,订阅发布模块统一管理所有的业务端,订阅发布模块包括订阅代理组件和发布代理组件。发布代理组件通过redis服务器与订阅代理组件建立目标通道,当其中一个业务端发生状态变更,并生成业务消息,发布代理组件将业务消息作为待发布消息,并确定与待发布消息对应的目标通道,以及目标通道的第一序列信息,其中,目标通道的第一序列信息存储于redis服务器中,并对待发布消息与第一序列信息进行封装,得到发布消息,通过redis服务器向订阅代理发送发布消息,订阅代理收到发布消息后,对发布消息进行解析,得到第一序列信息,根据第一序列信息与本地保存的第二序列信息确定发布消息的连续性。当确定发布消息连续时,且发布消息中的消息为业务消息,则向订阅了目标通道的业务端发送该业务消息,当发布消息中的消息为保活消息,
则不转发保活消息至业务端。当确定发布消息不连续,则确定发生消息丢失,生成异常消息,并向订阅了该目标通道的业务端发送异常消息。It can be understood that, with reference to FIG. 9 , FIG. 9 is an architecture diagram of an example of the present application. The architecture includes a redis server, a subscription and publishing module and multiple business ends. Each business end is an embedded device. The subscription and publishing module manages all business ends in a unified manner. The subscription and publishing module includes a subscription agent component and a publishing agent component. The publishing agent component establishes a target channel with the subscription agent component through the redis server. When one of the business terminals changes status and generates a business message, the publishing agent component treats the business message as a message to be published and determines the target channel corresponding to the message to be published. And the first sequence information of the target channel, where the first sequence information of the target channel is stored in the redis server, and the message to be released is encapsulated with the first sequence information to obtain the release message, and the release message is sent to the subscription agent through the redis server. After receiving the publication message, the subscription agent parses the publication message to obtain the first sequence information, and determines the continuity of the publication message based on the first sequence information and the locally saved second sequence information. When it is determined that the published messages are continuous and the messages in the published messages are business messages, the business message will be sent to the business end subscribed to the target channel. When the messages in the published messages are keep-alive messages, Then the keep-alive message will not be forwarded to the business end. When it is determined that the published messages are discontinuous, it is determined that message loss has occurred, an exception message is generated, and an exception message is sent to the business end subscribed to the target channel.
另外,参照图10,本申请实施例提供了一种发布端300,包括存储器310和处理器320,存储器310存储有计算机程序,处理器320执行计算机程序时实现应用于发布端300的消息处理方法。In addition, referring to Figure 10, the embodiment of the present application provides a publishing terminal 300, which includes a memory 310 and a processor 320. The memory 310 stores a computer program. When the processor 320 executes the computer program, it implements a message processing method applied to the publishing terminal 300. .
处理器320和存储器310可以通过总线或者其他方式连接。The processor 320 and the memory 310 may be connected through a bus or other means.
存储器310作为一种非暂态计算机可读存储介质,可用于存储非暂态软件程序以及非暂态性计算机可执行程序。此外,存储器310可以包括高速随机存取存储器310,还可以包括非暂态存储器310,例如至少一个磁盘存储器310件、闪存器件、或其他非暂态固态存储器310件。在一些实施方式中,存储器310可选包括相对于处理器320远程设置的存储器310,这些远程存储器310可以通过网络连接至该处理器320。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。As a non-transitory computer-readable storage medium, the memory 310 can be used to store non-transitory software programs and non-transitory computer executable programs. In addition, memory 310 may include high-speed random access memory 310 and may also include non-transitory memory 310 , such as at least one disk memory 310 , a flash memory device, or other non-transitory solid-state memory 310 . In some embodiments, the memory 310 optionally includes memory 310 located remotely relative to the processor 320, and these remote memories 310 may be connected to the processor 320 through a network. Examples of the above-mentioned networks include but are not limited to the Internet, intranets, local area networks, mobile communication networks and combinations thereof.
需要说明的是,实现上述实施例的消息处理方法所需的非暂态软件程序以及指令存储在存储器310中,当被处理器320执行时,执行上述实施例中的消息处理方法,例如,执行以上描述的图1中的方法步骤S110至步骤S130、图2中的方法步骤S40、图3中的方法步骤S111至S112。It should be noted that the non-transitory software programs and instructions required to implement the message processing method in the above embodiment are stored in the memory 310. When executed by the processor 320, the message processing method in the above embodiment is executed, for example, executing The method steps S110 to S130 in FIG. 1 , the method step S40 in FIG. 2 , and the method steps S111 to S112 in FIG. 3 are described above.
另外,参照图11,本申请实施例提供了一种订阅端400,包括存储器420和处理器410,存储器420存储有计算机程序,处理器410执行计算机程序时实现应用于订阅端400的消息处理方法。In addition, referring to Figure 11, the embodiment of the present application provides a subscriber 400, which includes a memory 420 and a processor 410. The memory 420 stores a computer program. When the processor 410 executes the computer program, it implements a message processing method applied to the subscriber 400. .
处理器410和存储器420可以通过总线或者其他方式连接。The processor 410 and the memory 420 may be connected through a bus or other means.
存储器420作为一种非暂态计算机可读存储介质,可用于存储非暂态软件程序以及非暂态性计算机可执行程序。此外,存储器420可以包括高速随机存取存储器420,还可以包括非暂态存储器420,例如至少一个磁盘存储器420件、闪存器件、或其他非暂态固态存储器420件。在一些实施方式中,存储器420可选包括相对于处理器410远程设置的存储器420,这些远程存储器420可以通过网络连接至该处理器410。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。As a non-transitory computer-readable storage medium, the memory 420 can be used to store non-transitory software programs and non-transitory computer executable programs. In addition, memory 420 may include high-speed random access memory 420 and may also include non-transitory memory 420 such as at least one disk memory 420 , flash memory device, or other non-transitory solid-state memory 420 . In some embodiments, the memory 420 optionally includes memory 420 located remotely relative to the processor 410, and these remote memories 420 may be connected to the processor 410 through a network. Examples of the above-mentioned networks include but are not limited to the Internet, intranets, local area networks, mobile communication networks and combinations thereof.
需要说明的是,实现上述实施例的消息处理方法所需的非暂态软件程序以及指令存储在存储器420中,当被处理器410执行时,执行上述实施例中的消息处理方法,例如,执行以上描述的图4中的方法步骤S410至S430、图5中的方法步骤S440、图6中的方法步骤S610、图7中的方法步骤S710、图8中的方法步骤S810。It should be noted that the non-transitory software programs and instructions required to implement the message processing method in the above embodiment are stored in the memory 420. When executed by the processor 410, the message processing method in the above embodiment is executed, for example, executing The method steps S410 to S430 in FIG. 4 , the method step S440 in FIG. 5 , the method step S610 in FIG. 6 , the method step S710 in FIG. 7 , and the method step S810 in FIG. 8 are described above.
以上所描述的设备实施例仅仅是示意性的,其中作为分离部件说明的单元可以是或者也可以不是物理上分开的,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The device embodiments described above are only illustrative, and the units described as separate components may or may not be physically separate, that is, they may be located in one place, or they may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,本申请实施例提供了一种计算机可读存储介质,存储介质存储有程序,程序被处理器执行时实现应用于发布端的消息处理方法,或实现应用于订阅端的消息处理方法。In addition, embodiments of the present application provide a computer-readable storage medium. The storage medium stores a program. When the program is executed by a processor, it implements a message processing method applied to the publishing end, or implements a message processing method applied to the subscribing end.
本申请的程序被一个处理器或控制器执行,例如,被上述设备实施例中的一个处理器执行,可使得上述处理器执行上述实施例中的消息处理方法,例如,执行以上描述的图1中的方法步骤S110至步骤S130、图2中的方法步骤S40、图3中的方法步骤S111至S112、图4中的方法步骤S410至S430、图5中的方法步骤S440、图6中的方法步骤S610、图7中的方
法步骤S710、图8中的方法步骤S810。The program of the present application is executed by a processor or controller, for example, by a processor in the above-mentioned device embodiment, which can cause the above-mentioned processor to execute the message processing method in the above-mentioned embodiment, for example, execute the above-described Figure 1 Method steps S110 to S130 in Figure 2 , method steps S40 in Figure 2 , method steps S111 to S112 in Figure 3 , method steps S410 to S430 in Figure 4 , method step S440 in Figure 5 , and the method in Figure 6 Step S610, the method in Figure 7 Method step S710, method step S810 in Figure 8.
本申请所提供的方案能够确定消息的连续性,进而确定是否出现消息丢失。The solution provided by this application can determine the continuity of messages and further determine whether message loss occurs.
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统可以被实施为软件、固件、硬件及其适当的组合。某些物理组件或所有物理组件可以被实施为由处理器,如中央处理器、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。Those of ordinary skill in the art can understand that all or some steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and appropriate combinations thereof. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit . Such software may be distributed on computer-readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). As is known to those of ordinary skill in the art, the term computer storage media includes volatile and nonvolatile media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. removable, removable and non-removable media. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disk (DVD) or other optical disk storage, magnetic cassettes, tapes, disk storage or other magnetic storage devices, or may Any other medium used to store the desired information and that can be accessed by a computer. Additionally, it is known to those of ordinary skill in the art that communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media .
以上是对本申请的较佳实施进行了具体说明,但本申请并不局限于上述实施方式,熟悉本领域的技术人员在不违背本申请实质的前提下还可作出种种的等同变形或替换,这些等同的变形或替换均包含在本申请权利要求所限定的范围内。
The above is a detailed description of the preferred implementation of the present application, but the present application is not limited to the above-mentioned embodiments. Those skilled in the art can also make various equivalent modifications or substitutions without violating the essence of the present application. Equivalent modifications or substitutions are included within the scope defined by the claims of this application.
Claims (11)
- 一种消息处理方法,应用于发布端,所述方法包括:A message processing method, applied to the publishing side, the method includes:获取待发布消息,根据所述待发布消息获取对应的目标通道的第一序列信息;Obtain the message to be published, and obtain the first sequence information of the corresponding target channel according to the message to be published;对所述待发布消息与所述第一序列信息进行封装,得到发布消息;Encapsulate the message to be released and the first sequence information to obtain a release message;向所述目标通道对应的订阅端发送所述发布消息,以使所述订阅端根据所述第一序列信息确定所述发布消息的连续性。The publishing message is sent to the subscriber corresponding to the target channel, so that the subscriber determines the continuity of the publish message based on the first sequence information.
- 根据权利要求1所述的消息处理方法,其中,在所述获取待发布消息,根据所述待发布消息获取对应的目标通道的第一序列信息,之后,还包括:The message processing method according to claim 1, wherein after obtaining the message to be published and obtaining the first sequence information of the corresponding target channel according to the message to be published, it further includes:更新所述第一序列信息,保存更新后的所述第一序列信息。Update the first sequence information, and save the updated first sequence information.
- 根据权利要求1或2所述的消息处理方法,其中,所述获取待发布消息,包括:The message processing method according to claim 1 or 2, wherein said obtaining the message to be published includes:当在第一预设周期内接收到业务消息,将所述业务消息作为所述待发布消息;When a service message is received within the first preset period, the service message is used as the message to be released;当在所述第一预设周期内未接收到所述业务消息,生成保活消息并将所述保活消息作为所述待发布消息。When the service message is not received within the first preset period, a keep-alive message is generated and used as the message to be released.
- 一种消息处理方法,应用于订阅端,所述方法包括:A message processing method, applied to the subscriber, the method includes:接收发布消息,所述发布消息由发布端发送;Receive publishing messages, which are sent by the publishing end;对所述发布消息进行解析,得到第一序列信息;Parse the release message to obtain the first sequence information;根据所述第一序列信息与本地保存的第二序列信息确定所述发布消息的连续性。The continuity of the published message is determined according to the first sequence information and the locally saved second sequence information.
- 根据权利要求4所述的消息处理方法,其中,在所述根据所述第一序列信息与本地保存的第二序列信息确定所述发布消息的连续性,之后,还包括:The message processing method according to claim 4, wherein after determining the continuity of the published message based on the first sequence information and the locally saved second sequence information, it further includes:将本地保存的所述第二序列信息更新为所述第一序列信息。Update the locally saved second sequence information to the first sequence information.
- 根据权利要求4或5所述的消息处理方法,其中,在所述接收发布消息之前,还包括:The message processing method according to claim 4 or 5, wherein before receiving the release message, it further includes:在检测到与所述发布端对应的目标通道存在且本地不存在所述目标通道的所述第二序列信息的情况下,获取所述目标通道的所述第二序列信息并保存至本地。When it is detected that the target channel corresponding to the publishing end exists and the second sequence information of the target channel does not exist locally, the second sequence information of the target channel is obtained and saved locally.
- 根据权利要求4或5所述的消息处理方法,其中,在所述接收发布消息之前,还包括:The message processing method according to claim 4 or 5, wherein before receiving the release message, it further includes:在检测到与所述发布端对应的所述目标通道不存在的情况下,生成所述第二序列信息与对应的通道名称,并根据所述第二序列信息与所述通道名称建立与所述发布端之间的所述目标通道。When it is detected that the target channel corresponding to the publishing end does not exist, the second sequence information and the corresponding channel name are generated, and the relationship with the channel is established based on the second sequence information and the channel name. The target channel between the publishing side.
- 根据权利要求7所述的消息处理方法,其中,还包括:The message processing method according to claim 7, further comprising:当在第二预设周期内未接收到所述发布消息,重新建立与所述发布端之间的目标通道。When the publishing message is not received within the second preset period, the target channel with the publishing end is re-established.
- 一种发布端,包括存储器和处理器,所述存储器存储有计算机程序,当所述处理器执行所述计算机程序时,实现权利要求1至3任意一项所述的消息处理方法。A publishing end includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, the message processing method described in any one of claims 1 to 3 is implemented.
- 一种订阅端,包括存储器和处理器,所述存储器存储有计算机程序,当所述处理器执行所述计算机程序时,实现权利要求4至8任意一项所述的消息处理方法。A subscriber includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, the message processing method described in any one of claims 4 to 8 is implemented.
- 一种计算机可读存储介质,所述存储介质存储有程序,当所述程序被处理器执行时,实现权利要求1至8任意一项所述的消息处理方法。 A computer-readable storage medium stores a program. When the program is executed by a processor, the message processing method described in any one of claims 1 to 8 is implemented.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210750160.2A CN117354199A (en) | 2022-06-29 | 2022-06-29 | Message processing method, publishing terminal, subscribing terminal and computer readable storage medium |
CN202210750160.2 | 2022-06-29 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2024001213A1 true WO2024001213A1 (en) | 2024-01-04 |
Family
ID=89367807
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2023/076291 WO2024001213A1 (en) | 2022-06-29 | 2023-02-15 | Information processing method, publisher, subscriber, and computer-readable storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN117354199A (en) |
WO (1) | WO2024001213A1 (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100049693A1 (en) * | 2008-08-25 | 2010-02-25 | Alcatel-Lucent | System and method of cache based xml publish/subscribe |
US20110258268A1 (en) * | 2010-04-19 | 2011-10-20 | International Business Machines Corporation | Controlling message delivery in publish/subscribe messaging |
CN105745864A (en) * | 2013-10-01 | 2016-07-06 | 奥兰治 | Method and apparatus for managing specific resource in wireless communication system |
CN108881395A (en) * | 2018-05-23 | 2018-11-23 | 北京五八信息技术有限公司 | Information push method, equipment, message manager and computer readable storage medium |
CN109691035A (en) * | 2016-07-06 | 2019-04-26 | 萨托里环球有限责任公司 | The multi-speed message channel of message transfer service |
-
2022
- 2022-06-29 CN CN202210750160.2A patent/CN117354199A/en active Pending
-
2023
- 2023-02-15 WO PCT/CN2023/076291 patent/WO2024001213A1/en unknown
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100049693A1 (en) * | 2008-08-25 | 2010-02-25 | Alcatel-Lucent | System and method of cache based xml publish/subscribe |
US20110258268A1 (en) * | 2010-04-19 | 2011-10-20 | International Business Machines Corporation | Controlling message delivery in publish/subscribe messaging |
CN105745864A (en) * | 2013-10-01 | 2016-07-06 | 奥兰治 | Method and apparatus for managing specific resource in wireless communication system |
CN109691035A (en) * | 2016-07-06 | 2019-04-26 | 萨托里环球有限责任公司 | The multi-speed message channel of message transfer service |
CN108881395A (en) * | 2018-05-23 | 2018-11-23 | 北京五八信息技术有限公司 | Information push method, equipment, message manager and computer readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN117354199A (en) | 2024-01-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9894166B2 (en) | Registration method and system for common service entity | |
CN109451032B (en) | Message transmission system | |
CN111031135B (en) | Message transmission method and device and electronic equipment | |
CN111158933A (en) | Distributed transaction processing method and system based on message queue | |
CN108696831B (en) | Short message sending method and device | |
KR102225815B1 (en) | Managing data feeds | |
US10715628B2 (en) | Attribute operating method and device | |
WO2015117391A1 (en) | Method for realizing resource attribute notification, and common service entity | |
CN110705893A (en) | Service node management method, device, equipment and storage medium | |
CN106899605B (en) | Communication method and device based on STOMP protocol | |
CN112087475B (en) | Message pushing method and device for cloud platform component application and message server | |
CN108880994B (en) | Method and device for retransmitting mails | |
WO2024001213A1 (en) | Information processing method, publisher, subscriber, and computer-readable storage medium | |
CN112437155B (en) | Service data processing method and device and server device | |
CN113220481A (en) | Request processing and feedback method and device, computer equipment and readable storage medium | |
CN116506902B (en) | Signaling processing method, device, signaling intercommunication gateway and storage medium | |
US10085175B2 (en) | Load control method and apparatus for notification messages | |
WO2023051050A1 (en) | Network monitoring method and apparatus, and computer storage medium | |
CN102263796B (en) | Data transmission method based on simple network management protocol | |
CN108933681B (en) | Configuration updating method of cloud computing system, control center and cloud computing node | |
CN109155792B (en) | Updating a transport stack in a content-centric network | |
CN113472841B (en) | Implementation method and device for terminating remote procedure call request | |
CN113495794B (en) | Module bridging method and device for Android system, electronic equipment and storage medium | |
CN114844910B (en) | Data transmission method, system, equipment and medium of distributed storage system | |
CN117453641A (en) | File uploading method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 23829406 Country of ref document: EP Kind code of ref document: A1 |