CN113630465A - Message processing method, device, equipment and storage medium - Google Patents

Message processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN113630465A
CN113630465A CN202110916767.9A CN202110916767A CN113630465A CN 113630465 A CN113630465 A CN 113630465A CN 202110916767 A CN202110916767 A CN 202110916767A CN 113630465 A CN113630465 A CN 113630465A
Authority
CN
China
Prior art keywords
message
identifier
edge
version
notification message
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110916767.9A
Other languages
Chinese (zh)
Other versions
CN113630465B (en
Inventor
谢敬儒
张萌萌
赵鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202110916767.9A priority Critical patent/CN113630465B/en
Publication of CN113630465A publication Critical patent/CN113630465A/en
Application granted granted Critical
Publication of CN113630465B publication Critical patent/CN113630465B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Abstract

The disclosure provides a message processing method, a message processing device, message processing equipment and a storage medium, and relates to the technical field of cloud computing, in particular to the technical field of internet of things. The specific implementation scheme is as follows: sending a first notification message aiming at a target edge application to an edge proxy, wherein the first notification message comprises a first message identifier and a first version identifier; acquiring at least one second message identifier from the edge proxy and at least one second version identifier corresponding to the at least one second message identifier; and under the condition that a second message identifier matched with the first message identifier does not exist in the at least one second message identifier, or a second message identifier matched with the first message identifier exists in the at least one second message identifier, and a second version identifier corresponding to the matched second message identifier is not matched with the first version identifier, the first notification message is sent to the edge proxy again.

Description

Message processing method, device, equipment and storage medium
Technical Field
The utility model relates to a cloud computing technology field especially relates to thing networking technology field.
Background
The cloud end generally refers to a cloud computing service center or various cloud service platforms, and the edge refers to a side closer to a data source. Messages between the edge and the cloud are important to work in coordination with the edge and the cloud. Although the edge has certain computing, storage and network communication capabilities, the edge still cannot be compared with a stable network connection between cloud nodes, and therefore the edge needs to communicate with the cloud when working.
Cloud and edge messaging face a number of problems. For example, the network between the cloud and the edge may be a weak network connection, or a network break may occur when the cloud and the edge communicate, so that messages sent by the cloud or the edge are lost or repeatedly sent.
Disclosure of Invention
The present disclosure provides a message processing method, apparatus, device, storage medium, and program product.
According to an aspect of the present disclosure, there is provided a message processing method, including: sending a first notification message aiming at a target edge application to an edge proxy, wherein the first notification message comprises a first message identifier and a first version identifier; acquiring at least one second message identifier from the edge proxy and at least one second version identifier corresponding to the at least one second message identifier; and under the condition that a second message identifier matched with the first message identifier does not exist in the at least one second message identifier, or a second message identifier matched with the first message identifier exists in the at least one second message identifier and a second version identifier corresponding to the matched second message identifier does not match with the first version identifier, the first notification message is sent to the edge proxy again.
According to another aspect of the present disclosure, there is provided a message processing method including: receiving a notification message aiming at a target edge application from a cloud, wherein the notification message comprises a message identifier and a version identifier; under the condition that the message identifier and the version identifier which are matched with the message identifier and/or the version identifier of the notification message do not exist in the storage space, the notification message is sent to the target edge application; receiving a response message aiming at the notification message from the target edge application, wherein the response message comprises a message identification and a version identification which are matched with the notification message; and storing the message identifier and the version identifier of the response message in the storage space, and sending the response message to the cloud.
According to another aspect of the present disclosure, there is provided a message processing method including: receiving a notification message from a cloud through an edge proxy, wherein the notification message comprises a message identifier and a version identifier; generating a response message according to the notification message, wherein the response message comprises a message identifier and a version identifier which are matched with the notification message; and sending the response message to the cloud through the edge proxy.
According to another aspect of the present disclosure, there is provided a message processing apparatus including: the device comprises a first sending module, a first sending module and a second sending module, wherein the first sending module is used for sending a first notification message aiming at a target edge application to an edge proxy, and the first notification message comprises a first message identifier and a first version identifier; an obtaining module, configured to obtain at least one second message identifier from the edge proxy and at least one second version identifier corresponding to the at least one second message identifier; and a retransmission module, configured to resend the first notification message to the edge proxy when there is no second message identifier matching the first message identifier in the at least one second message identifier, or there is a second message identifier matching the first message identifier in the at least one second message identifier and a second version identifier corresponding to the matching second message identifier does not match the first version identifier.
According to another aspect of the present disclosure, there is provided a message processing apparatus including: the system comprises a first receiving module, a first sending module and a second receiving module, wherein the first receiving module is used for receiving a notification message aiming at a target edge application from a cloud end, and the notification message comprises a message identifier and a version identifier; the second sending module is used for sending the notification message to the target edge application under the condition that the message identifier and the version identifier which are matched with the message identifier and/or the version identifier of the notification message do not exist in the storage space; a second receiving module, configured to receive a response message for the notification message from the target edge application, where the response message includes a message identifier and a version identifier that match the notification message; the storage module is used for storing the message identifier and the version identifier of the response message in the storage space; and the third sending module is used for sending the response information to the cloud.
According to another aspect of the present disclosure, there is provided a message processing apparatus including: the third receiving module is used for receiving a notification message from a cloud through an edge proxy, wherein the notification message comprises a message identifier and a version identifier; the generating module is used for generating a response message according to the notification message, wherein the response message comprises a message identifier and a version identifier which are matched with the notification message; and the fourth sending module is used for sending the response message to the cloud end through the edge proxy.
Another aspect of the present disclosure provides an electronic device including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of the embodiments of the present disclosure.
According to another aspect of the disclosed embodiments, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method shown in the disclosed embodiments.
According to another aspect of the embodiments of the present disclosure, there is provided a computer program product comprising computer programs/instructions, characterized in that the computer programs/instructions, when executed by a processor, implement the steps of the method shown in the embodiments of the present disclosure.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
fig. 1 is a schematic view of an application scenario of a message processing method, an apparatus, an electronic device and a storage medium according to an embodiment of the present disclosure;
FIG. 2 schematically shows a flow chart of a message processing method according to an embodiment of the present disclosure;
FIG. 3 schematically shows a flow chart of a message processing method according to another embodiment of the present disclosure;
FIG. 4 schematically shows a flow diagram of a message processing method according to another embodiment of the present disclosure;
fig. 5 schematically shows a schematic diagram of a message processing method according to another embodiment of the present disclosure;
FIG. 6 schematically shows a block diagram of a message processing apparatus according to an embodiment of the present disclosure;
FIG. 7 schematically shows a block diagram of a message processing apparatus according to another embodiment of the present disclosure;
FIG. 8 schematically shows a block diagram of a message processing apparatus according to another embodiment of the present disclosure; and
FIG. 9 schematically shows a block diagram of an example electronic device that may be used to implement embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
An application scenario of the method and apparatus provided by the present disclosure will be described below with reference to fig. 1.
Fig. 1 is a schematic view of an application scenario of a message processing method, a message processing apparatus, an electronic device, and a storage medium according to an embodiment of the disclosure.
As shown in fig. 1, the application scenario 100 includes a cloud 110 and an edge 120. The cloud includes nodes 111, and the edge 120 includes an edge agent 121 and edge applications 122 and 123. Illustratively, the edge proxy 121 may be disposed in an edge gateway in the edge 120.
It should be understood that the number of nodes in cloud 110, and the number of edge proxies and edge applications in edge 120 in fig. 1 are merely illustrative. Cloud 110 may have any number of nodes and edge 120 may have any number of edge agents and edge applications, as desired.
According to an embodiment of the present disclosure, the edge 120 may establish a connection with the node 111 in the cloud 110 and the edge applications 122, 123, respectively, to send or receive messages. Wherein the connection may be based on any of the following protocols: hypertext transfer protocol (HTTP), web socket protocol (Websocket), message queue telemetry transport protocol (MQTT), and general remote procedure call protocol (GRPC), among others. It should be noted that the connection between edge 120 and cloud 110 and the connection between edge 120 and edge applications 122 and 123 may be based on the same protocol or may be based on different protocols.
In this embodiment, the messages transmitted between the cloud 110 and the edge 120 may be referred to as cloud-edge messages. According to an embodiment of the present disclosure, the cloud-edge message may include a key-value pair. The unique identifier of the edge application for which the cloud-edge message is directed, for example, an identity identifier (id) of the edge application, may be used as a key in a key value pair, and the content of the cloud-edge message may be used as a value in the key value pair. In addition, the cloud-edge message may also include a version identifier, such as a version number. When the content of the cloud-side message is modified, the version identification of the cloud-side message is also changed. For example, in this embodiment, the version number may be used as a version identifier, and as the number of modifications of the cloud-edge message increases, the version number of the cloud-edge message is gradually increased.
According to the embodiment of the present disclosure, when the node 111 of the cloud 110 needs to send a notification message to the edge applications 122 and 123, a corresponding key-value pair is created, and a version identifier is initialized, so as to generate the notification message 10. After the edge proxy 121 receives the notification message 10 sent by the node 111, the key-value pair and the version identification of the notification message 10 may be saved. The message identity (i.e. the key in the key-value pair) and the version identity of the notification message 10 are then compared with the stored message identity and version identity, and if the message identity and the version identity of the notification message 10 in the stored message identity and version identity do not match, the notification message 10 is forwarded to the edge application, for example, the edge application 123, to which the notification message 10 is directed. Upon receiving the notification message 10, the edge application 123 may create a corresponding key-value pair and version identification to generate a response message 20. To the edge proxy 121. The edge proxy 121 stores information such as key-value pairs and version identifications of the response message 20 and forwards the response message 20 to the node 111. After node 111 and receiving the response message 20 sent by edge proxy 121, the key-value pair and version identification of the response message 20 may be stored. The node 111 and the edge proxy 121 may compare the messages by version identification to determine whether the message versions in the cloud and the edge are consistent.
According to an embodiment of the present disclosure, the edge proxy 121 may record edge state information, which may include, for example, a version of each edge application, resource data, a key of a received or sent message, a version number, message content, and the like. The edge proxy 121 may report the recorded edge status information to the cloud 110 at regular time. When the cloud 110 receives the reported edge state information from the edge proxy 121, the message to be sent of the cloud 110 may be compared with the edge state information reported by the edge proxy 121. When the message to be sent by the cloud 110 is found to be inconsistent with the message in the content reported by the edge proxy 121, if the message stored in the cloud 110 does not exist in the edge state information reported by the edge proxy 121, or the edge state information has a message with the same key as the message to be sent by the cloud, but the version identifier of the message is different from that of the message to be sent by the cloud, the cloud 110 may synchronize the latest message content and version number to the edge proxy 121. If the message to be sent by the cloud 120 is completely consistent with the message in the content reported by the edge proxy 121, that is, the message key and the version number are the same, the cloud 110 does not need to synchronize the message to the edge proxy 121. At this point the cloud-side message status has been agreed. After reporting the edge status information to the cloud 110, the edge agent 121 may receive a response from the cloud 110, and may update the data of the edge agent according to the response from the cloud 110.
In addition, edge proxy 121 may periodically check for notification messages from cloud 110 and response messages from edge applications 122, 123 and compare the keys and version numbers of the notification messages and response messages. When the key of the notification message and the key of the response message are found to be different, a new message from the cloud terminal 110 is expressed. Or the key of the notification message is the same as the key of the response message, but the version identifier of the notification message is not consistent with the version identifier of the response message, which indicates that the cloud 110 has updated the notification message, and the edge proxy 121 may send the updated notification message to the edge application 122 or 123. The edge application 122 or 123, upon receiving and processing the notification message, may send a response message to the edge proxy 121 indicating an acknowledgement. The edge proxy 121 may modify information such as the version identification of the stored response message to make the stored response message consistent with the notification message. If the edge application 122 or 123 does not send a response message to the edge proxy 121, the edge proxy 121 may periodically check whether the stored edge message is consistent with the cloud message. If the stored response message is found to be inconsistent with the notification message at the time of the periodic check, the inconsistent notification message is still sent to the edge application 122 or 123.
Fig. 2 schematically shows a flow chart of a message processing method according to an embodiment of the present disclosure.
As shown in FIG. 2, the method 200 includes operations S210-S230. The method 200 may be performed, for example, by the cloud shown above.
In operation S210, a first notification message for a target edge application is sent to an edge proxy.
According to an embodiment of the present disclosure, the first notification message includes a first message identification and a first version identification. In this embodiment, the message identifier of the message may be used to uniquely represent the message, and the version identifier of the message may be used to represent the version information of the message. Exemplarily, in this embodiment, an identification code (id) of the target edge application may be used as the message identifier of the first notification message, i.e., the first message identifier. In addition, the first notification message may be configured with a version number as a version identifier of the first notification message, i.e. the first version identifier.
Then, at operation S220, at least one second message identification and at least one second version identification corresponding to the at least one second message identification are received from the edge proxy.
According to the embodiment of the present disclosure, the at least one second message identification and the at least one second version identification may be obtained by receiving at least one response message from the edge proxy. Wherein each of the at least one response message includes a second message identification and a second version identification.
According to other embodiments of the present disclosure, at least one second message identifier included in the edge status information and at least one second version identifier corresponding to the at least one second message identifier may be obtained by receiving the edge status information from the edge proxy.
In operation S230, in the case that there is no second message identifier matching the first message identifier in the at least one second message identifier, or there is a second message identifier matching the first message identifier in the at least one second message identifier and a second version identifier corresponding to the matching second message identifier does not match the first version identifier, the first notification message is re-sent to the edge proxy.
According to the embodiment of the present disclosure, if there is no second message identifier matching the first message identifier in the at least one second message identifier, or there is a second message identifier matching the first message identifier in the at least one second message identifier and the second version identifier corresponding to the matching second message identifier is not matched with the first version identifier, it indicates that the target edge application does not receive the first notification message, so the first notification message may be sent to the edge proxy again. If a second message identifier matching the first message identifier exists in the at least one second message identifier, and a second version identifier corresponding to the matching second message identifier matches the first version identifier, it indicates that the target edge application has received the first notification message, and may not perform an operation of re-generating the first notification message.
According to the embodiment of the disclosure, the message identification and the version identification are set for the message, and the message identification and the version identification of the message are compared when the message is received and sent, so that the reliability of receiving and sending the message between the cloud and the edge in the weak network environment is improved.
Fig. 3 schematically shows a flow chart of a message processing method according to another embodiment of the present disclosure.
As shown in FIG. 3, the method 300 includes operations S310-S340. The method 300 may be performed by an edge proxy, for example, as shown above.
In operation S310, a notification message for a target edge application from a cloud is received. Wherein the notification message comprises a message identification and a version identification.
In operation S320, in the absence of a message identifier and a version identifier matching the message identifier and/or the version identifier of the notification message in the storage space, the notification message is sent to the target edge application.
In operation S330, a response message for the notification message from the target edge application is received. Wherein the response message comprises a message identification and a version identification which are matched with the notification message.
In operation S340, the message identifier and the version identifier of the response message are stored in the storage space, and the response message is sent to the cloud.
According to an embodiment of the present disclosure, the response message may include a message identifier and a version identifier of the corresponding notification message, and may be used to confirm that the edge application has received the corresponding notification message.
According to an embodiment of the present disclosure, the edge proxy may receive a response message from the edge application and store the received response message from the edge application in the storage space. Based on this, it can be determined whether a message identification and a version identification matching the message identification and the version identification of the notification message exist in the storage space. If the message identifier matched with the message identifier of the notification message does not exist in the storage space, or the message identifier matched with the message identifier of the notification message exists in the storage space and the version identifier corresponding to the matched message identifier is not matched with the version identifier of the notification message, it indicates that the corresponding edge application does not confirm the notification message, and sends the notification message to the edge application.
According to another embodiment of the present disclosure, the edge proxy may further determine the edge status information according to the message identifier and the version identifier in the storage space. And sending the edge state information to a cloud. Therefore, the cloud end can determine the confirmation condition of the edge application to the notification message according to the edge state information. For example, in this embodiment, the edge proxy may report edge state information to the cloud periodically, so that the cloud can grasp the state of the edge application in time.
According to the embodiment of the disclosure, by setting the edge proxy, the edge application is prevented from being directly connected with the cloud end, and the related problems of the network are not required to be processed. In addition, by setting the edge proxy, the reliable message transceiving service can be independent of the edge application, and the application complexity is reduced.
Fig. 4 schematically shows a flow chart of a message processing method according to another embodiment of the present disclosure.
As shown in FIG. 4, the method 400 includes operations S410-S430. The method 400 may be performed, for example, by the edge application shown above.
In operation S410, a notification message from the cloud is received through the edge proxy.
According to an embodiment of the present disclosure, the notification message may include a message identification and a version identification.
According to embodiments of the present disclosure, a notification message from a cloud may be received by an edge proxy and then forwarded to the edge application.
In operation S420, a response message is generated according to the notification message.
According to the embodiment of the disclosure, the response message comprises the same message identifier and version identifier of the notification message
In operation S430, the response message is sent to the cloud through the edge proxy.
According to an embodiment of the present disclosure, the edge application may send the response message to the edge proxy, and then forward the response message to the cloud by the edge proxy.
The message processing method shown above is further explained with reference to fig. 5 in conjunction with a specific embodiment. Those skilled in the art will appreciate that the following example embodiments are only for the understanding of the present disclosure, and the present disclosure is not limited thereto.
Fig. 5 schematically shows a schematic diagram of a message processing method according to another embodiment of the present disclosure.
As shown in fig. 5, the method 500 includes the cloud sending a first notification message for a target edge application to an edge proxy in operation S501.
According to an embodiment of the present disclosure, the first notification message may include a first message identification and a first version identification.
In operation S502, after the edge proxy receives the first notification message for the target edge application from the cloud, it is determined whether a second message identifier and a second version identifier matching the first message identifier and the first version identifier exist in the storage space. And in the case that a second message identification and a second version identification which are matched with the first message identification and the first version identification exist in the storage space, the edge agent waits for receiving another notification message from the cloud. Otherwise, operation S503 is performed.
In operation S503, the edge proxy sends a first notification message to the target edge application.
In operation S504, after the target edge application receives the notification message sent by the edge proxy, a response message is generated according to the notification message.
In operation S505, the target edge application sends a response message to the edge proxy.
In operation S506, after the edge proxy receives the response message for the first notification message from the target edge application, the message identifier and the version identifier in the response message are stored, and the edge state information is updated according to the response message. .
In operation S507, the edge proxy forwards the response information to the cloud.
In operation S508, the cloud receives the response message from the edge proxy, and records the message identifier and the version identifier in the response message.
In operation S509, the edge proxy periodically transmits edge status information to the cloud.
In operation S510, the cloud receives the edge status information, and records a message identifier and a version identifier in the edge status information.
In operation S511, the cloud periodically checks whether the message identifier and the version identifier of the issued notification message match the received message identifier and version identifier. And if the notification messages do not match, retransmitting the notification messages which do not match.
According to the message processing method disclosed by the embodiment of the invention, the reliability of cloud-side message receiving and sending can be effectively ensured. When the cloud end needs to send a message to the edge application, the edge application does not need to establish connection with the cloud end, and only needs to establish connection with the edge agent on the same equipment.
According to the embodiment of the disclosure, when the network between the cloud and the edge is normal, the message sent by the cloud to the edge is forwarded to the edge application through the edge proxy. And the edge application sends a response message to the edge proxy after receiving the message. At this time, the message from the edge application stored in the edge proxy is consistent with the message identifier and the version identifier of the message from the cloud. If the message of the cloud end is not changed, the message identifier and the version identifier of the edge cloud message are consistent when the edge agent reports the edge state information next time, and the cloud end and the edge agent do not need to perform operations such as retransmission. If the message in the cloud changes, the latest message will be synchronized to the edge proxy when the edge proxy reports the edge state information next time, and then the latest message is forwarded by the edge proxy.
According to the embodiment of the disclosure, when the network between the cloud and the edge is abnormal, the edge proxy cannot report the edge state information to the cloud, and the update of the cloud to the message cannot be synchronized to the edge. But the cloud stores the message version identification and the latest modified version of the edge, and the edge agent also stores the message version identification from the cloud and from the edge application. The cloud-edge message has inconsistency for a period of time due to network problems, but does not cause message loss. When the cloud edge network is recovered, after the edge agent reports the edge state information to the cloud end, the cloud end can check whether the reported message identification and version identification of the edge message are different from the message identification and version identification of the cloud end message. If there is a difference, the latest version of the message in the cloud is synchronized to the edge. Namely, the message of the latest version in the cloud end is finally sent to the edge proxy and then sent to the edge application, and the situation that the message cannot be sent to the edge application due to the cloud edge network problem is avoided.
According to the embodiment of the disclosure, the version number can be used as the version identifier, and as the number of modifications of the cloud-side message is increased, the version number is gradually increased for the configuration of the cloud-side message. Besides comparing whether the cloud side messages are consistent or not, the message redundancy problem can be avoided. Since the message version number is incremented, the edge proxy can distinguish between old and new messages by the size of the version number. After the cloud end modifies the message for many times, the initial version message may arrive at the edge proxy after the latest version message, that is, the message with the small version number arrives. If the edge proxy finds that a message with a larger version number has already been stored, messages with a smaller version number are ignored. Redundant and stale message notifications to edge applications can be avoided.
Fig. 6 schematically shows a block diagram of a message processing apparatus according to an embodiment of the present disclosure.
As shown in fig. 6, the apparatus 600 includes a first sending module 610, an obtaining module 620, and a retransmitting module 630.
The first sending module 610 may be configured to send a first notification message for the target edge application to the edge proxy, where the first notification message includes a first message identifier and a first version identifier.
The obtaining module 620 may be configured to obtain at least one second message identifier from the edge proxy and at least one second version identifier corresponding to the at least one second message identifier.
The retransmission module 630 may be configured to resend the first notification message to the edge proxy when there is no second message identifier matching the first message identifier in the at least one second message identifier, or there is a second message identifier matching the first message identifier in the at least one second message identifier and a second version identifier corresponding to the matching second message identifier does not match the first version identifier.
Fig. 7 schematically shows a block diagram of a message processing apparatus according to another embodiment of the present disclosure.
As shown in fig. 7, the apparatus 700 includes a first receiving module 710, a second sending module 720, a second receiving module 730, a storage module 740, and a third sending module 750.
The first receiving module 710 may be configured to receive a notification message for a target edge application from a cloud, where the notification message includes a message identifier and a version identifier.
The second sending module 720 may be configured to send the notification message to the target edge application in the absence of a message identifier and a version identifier matching the message identifier and/or the version identifier of the notification message in the storage space.
The second receiving module 730 may be configured to receive a response message for the notification message from the target edge application, where the response message includes a message identifier and a version identifier that match the notification message.
The storage module 740 may be configured to store the message identifier and the version identifier of the response message in the storage space.
The third sending module 750 may be configured to send the response message to the cloud.
Fig. 8 schematically shows a block diagram of a message processing apparatus according to another embodiment of the present disclosure.
As shown in fig. 8, the apparatus 800 includes a third receiving module 810, a generating module 820, and a fourth transmitting module 830.
The third receiving module 810 may be configured to receive, by the edge proxy, a notification message from the cloud, where the notification message includes a message identifier and a version identifier.
The generating module 820 may be configured to generate a response message according to the notification message, where the response message includes a message identifier and a version identifier that match the notification message.
The fourth sending module 830 may be configured to send the response message to the cloud through the edge proxy.
In the technical scheme of the disclosure, the collection, storage, use, processing, transmission, provision, disclosure and other processing of the related data such as the messages meet the regulations of related laws and regulations and do not violate the customs of the public order
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
FIG. 9 schematically shows a block diagram of an example electronic device 900 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 9, the apparatus 900 includes a computing unit 901, which can perform various appropriate actions and processes in accordance with a computer program stored in a Read Only Memory (ROM)902 or a computer program loaded from a storage unit 908 into a Random Access Memory (RAM) 903. In the RAM903, various programs and data required for the operation of the device 900 can also be stored. The calculation unit 901, ROM 902, and RAM903 are connected to each other via a bus 904. An input/output (I/O) interface 905 is also connected to bus 904.
A number of components in the device 900 are connected to the I/O interface 905, including: an input unit 906 such as a keyboard, a mouse, and the like; an output unit 907 such as various types of displays, speakers, and the like; a storage unit 908 such as a magnetic disk, optical disk, or the like; and a communication unit 909 such as a network card, a modem, a wireless communication transceiver, and the like. The communication unit 909 allows the device 900 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunication networks.
The computing unit 901 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 901 performs the respective methods and processes described above, such as a message processing method. For example, in some embodiments, the message processing method may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 908. In some embodiments, part or all of the computer program may be loaded and/or installed onto device 900 via ROM 902 and/or communications unit 909. When the computer program is loaded into the RAM903 and executed by the computing unit 901, one or more steps of the message processing method described above may be performed. Alternatively, in other embodiments, the computing unit 901 may be configured to perform the message processing method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and the present disclosure is not limited herein.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (17)

1. A method of message processing, comprising:
sending a first notification message aiming at a target edge application to an edge proxy, wherein the first notification message comprises a first message identifier and a first version identifier;
acquiring at least one second message identifier from the edge proxy and at least one second version identifier corresponding to the at least one second message identifier; and
and under the condition that a second message identifier matched with the first message identifier does not exist in the at least one second message identifier, or a second message identifier matched with the first message identifier exists in the at least one second message identifier and a second version identifier corresponding to the matched second message identifier does not match with the first version identifier, the first notification message is sent to the edge proxy again.
2. The method of claim 1, wherein the obtaining at least one second message identification from the edge proxy and at least one second version identification corresponding to the at least one second message identification comprises:
and obtaining the at least one second message identifier and the at least one second version identifier by receiving at least one response message from the edge proxy, wherein each response message in the at least one response message comprises one second message identifier and one second version identifier.
3. The method of claim 1, wherein the obtaining at least one second message identification from the edge proxy and at least one second version identification corresponding to the at least one second message identification comprises:
and obtaining at least one second message identifier and at least one second version identifier corresponding to the at least one second message identifier, wherein the at least one second message identifier is included in the edge state information, by receiving the edge state information from the edge proxy.
4. The method of claim 1, further comprising:
changing the content of the first notification message to obtain a second notification message, wherein the second notification message comprises the first message identifier and a third version identifier; and
and sending the second notification message to the edge proxy when a second message identifier matched with the first message identifier exists in the at least one second message identifier and a second version identifier corresponding to the matched second message identifier is not matched with the third version identifier.
5. A method of message processing, comprising:
receiving a notification message aiming at a target edge application from a cloud, wherein the notification message comprises a message identifier and a version identifier;
under the condition that the message identifier and/or the version identifier matched with the message identifier and the version identifier of the notification message do not exist in the storage space, sending the notification message to the target edge application;
receiving a response message aiming at the notification message from the target edge application, wherein the response message comprises a message identification and a version identification which are matched with the notification message; and
and storing the message identification and the version identification of the response message in the storage space, and sending the response message to the cloud.
6. The method of claim 5, further comprising:
determining edge state information according to the message identifier and the version identifier in the storage space; and
and sending the edge state information to the cloud.
7. The method of claim 5, further comprising:
establishing a first connection with the cloud, wherein the first connection is based on any one of the following protocols: hypertext transfer protocol, web socket protocol, message queue telemetry transfer protocol, and universal remote procedure call protocol.
8. The method of claim 5, further comprising:
establishing a second connection with the target edge application, wherein the second connection is based on any one of the following protocols: hypertext transfer protocol, web socket protocol, message queue telemetry transfer protocol, and universal remote procedure call protocol.
9. The method according to any of claims 5-8, wherein the method is applied to an edge proxy.
10. A method of message processing, comprising:
receiving a notification message from a cloud through an edge proxy, wherein the notification message comprises a message identifier and a version identifier;
generating a response message according to the notification message, wherein the response message comprises a message identifier and a version identifier which are matched with the notification message; and
and sending the response message to the cloud end through the edge proxy.
11. The method of claim 10, wherein the method is applied to edge applications.
12. A message processing apparatus comprising:
the device comprises a first sending module, a first sending module and a second sending module, wherein the first sending module is used for sending a first notification message aiming at a target edge application to an edge proxy, and the first notification message comprises a first message identifier and a first version identifier;
an obtaining module, configured to obtain at least one second message identifier from the edge proxy and at least one second version identifier corresponding to the at least one second message identifier; and
and a retransmission module, configured to resend the first notification message to the edge proxy when a second message identifier that matches the first message identifier does not exist in the at least one second message identifier, or a second message identifier that matches the first message identifier exists in the at least one second message identifier and a second version identifier corresponding to the matched second message identifier does not match the first version identifier.
13. A message processing apparatus comprising:
the system comprises a first receiving module, a first sending module and a second receiving module, wherein the first receiving module is used for receiving a notification message aiming at a target edge application from a cloud end, and the notification message comprises a message identifier and a version identifier;
the second sending module is used for sending the notification message to the target edge application under the condition that the message identifier and/or the version identifier matched with the message identifier and the version identifier of the notification message do not exist in the storage space;
a second receiving module, configured to receive a response message for the notification message from the target edge application, where the response message includes a message identifier and a version identifier that match the notification message;
the storage module is used for storing the message identifier and the version identifier of the response message in the storage space; and
and the third sending module is used for sending the response information to the cloud.
14. A message processing apparatus comprising:
the third receiving module is used for receiving a notification message from a cloud through an edge proxy, wherein the notification message comprises a message identifier and a version identifier;
the generating module is used for generating a response message according to the notification message, wherein the response message comprises a message identifier and a version identifier which are matched with the notification message; and
and the fourth sending module is used for sending the response message to the cloud end through the edge proxy.
15. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-11.
16. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-11.
17. A computer program product comprising computer program/instructions, characterized in that the computer program/instructions, when executed by a processor, implement the steps of the method according to any of claims 1-11.
CN202110916767.9A 2021-08-10 2021-08-10 Message processing method, device, equipment and storage medium Active CN113630465B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110916767.9A CN113630465B (en) 2021-08-10 2021-08-10 Message processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110916767.9A CN113630465B (en) 2021-08-10 2021-08-10 Message processing method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113630465A true CN113630465A (en) 2021-11-09
CN113630465B CN113630465B (en) 2024-03-12

Family

ID=78384246

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110916767.9A Active CN113630465B (en) 2021-08-10 2021-08-10 Message processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113630465B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114553849A (en) * 2022-02-22 2022-05-27 北京百度网讯科技有限公司 Drive update method, device, apparatus, medium, and program product
CN114979260A (en) * 2022-05-12 2022-08-30 深圳市绿联科技股份有限公司 Protocol-based communication method and device, electronic equipment and storage medium
CN115002757A (en) * 2022-05-23 2022-09-02 天津嘉益数宇科技发展有限公司 Edge cooperative data encryption transmission method based on IEEE802.11ah
CN115086318A (en) * 2022-06-13 2022-09-20 南方电网深圳数字电网研究院有限公司 Cloud edge message cooperation method and device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102090089A (en) * 2008-07-07 2011-06-08 高通股份有限公司 Enhanced notification mechanism for broadcast networks using bit-map vectors
CN104125558A (en) * 2013-04-26 2014-10-29 中国移动通信集团上海有限公司 Client-based service processing method, equipment and system
US20150244827A1 (en) * 2014-02-24 2015-08-27 International Business Machines Corporation Data Transmission
CN109274510A (en) * 2018-09-06 2019-01-25 北京达佳互联信息技术有限公司 Message treatment method, device, client, server and storage medium
CN110661889A (en) * 2019-11-06 2020-01-07 杭州涂鸦信息技术有限公司 Push message synchronization and compensation method and system of iOS (Internet operating System) end
CN111510499A (en) * 2020-04-20 2020-08-07 深圳市盟天科技有限公司 Communication method, device, equipment and storage medium
US10853146B1 (en) * 2018-04-27 2020-12-01 Pure Storage, Inc. Efficient data forwarding in a networked device
CN112583931A (en) * 2020-12-25 2021-03-30 北京百度网讯科技有限公司 Message processing method, message middleware, electronic device and storage medium
CN112769897A (en) * 2020-12-21 2021-05-07 北京百度网讯科技有限公司 Synchronization method and device for edge calculation message, electronic equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102090089A (en) * 2008-07-07 2011-06-08 高通股份有限公司 Enhanced notification mechanism for broadcast networks using bit-map vectors
CN104125558A (en) * 2013-04-26 2014-10-29 中国移动通信集团上海有限公司 Client-based service processing method, equipment and system
US20150244827A1 (en) * 2014-02-24 2015-08-27 International Business Machines Corporation Data Transmission
US10853146B1 (en) * 2018-04-27 2020-12-01 Pure Storage, Inc. Efficient data forwarding in a networked device
CN109274510A (en) * 2018-09-06 2019-01-25 北京达佳互联信息技术有限公司 Message treatment method, device, client, server and storage medium
CN110661889A (en) * 2019-11-06 2020-01-07 杭州涂鸦信息技术有限公司 Push message synchronization and compensation method and system of iOS (Internet operating System) end
CN111510499A (en) * 2020-04-20 2020-08-07 深圳市盟天科技有限公司 Communication method, device, equipment and storage medium
CN112769897A (en) * 2020-12-21 2021-05-07 北京百度网讯科技有限公司 Synchronization method and device for edge calculation message, electronic equipment and storage medium
CN112583931A (en) * 2020-12-25 2021-03-30 北京百度网讯科技有限公司 Message processing method, message middleware, electronic device and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
WOLFGANG SEGMULLER;: "Sieve -- An extension for providing instant notifications", IETF *
金锦娣;王宇平;邢勐;石莹: "云边协同控制系统分析与设计", 中国仪器仪表 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114553849A (en) * 2022-02-22 2022-05-27 北京百度网讯科技有限公司 Drive update method, device, apparatus, medium, and program product
CN114979260A (en) * 2022-05-12 2022-08-30 深圳市绿联科技股份有限公司 Protocol-based communication method and device, electronic equipment and storage medium
CN114979260B (en) * 2022-05-12 2023-09-15 深圳市绿联科技股份有限公司 Protocol-based communication method and device, electronic equipment and storage medium
CN115002757A (en) * 2022-05-23 2022-09-02 天津嘉益数宇科技发展有限公司 Edge cooperative data encryption transmission method based on IEEE802.11ah
CN115002757B (en) * 2022-05-23 2023-02-14 天津嘉益数宇科技发展有限公司 Edge cooperative data encryption transmission method based on IEEE802.11ah
CN115086318A (en) * 2022-06-13 2022-09-20 南方电网深圳数字电网研究院有限公司 Cloud edge message cooperation method and device
CN115086318B (en) * 2022-06-13 2024-04-05 南方电网数字平台科技(广东)有限公司 Cloud edge message cooperation method and device

Also Published As

Publication number Publication date
CN113630465B (en) 2024-03-12

Similar Documents

Publication Publication Date Title
CN113630465B (en) Message processing method, device, equipment and storage medium
WO2021121370A1 (en) Message loss detection method and apparatus for message queue
CN109451032B (en) Message transmission system
CN103634203A (en) Message asynchronous transmission method, device and system
CN107508916B (en) Server link management method for intelligent robot
US20200403850A1 (en) Facilitating resilient and fault tolerant asynchronous messaging
CN113067860B (en) Method, apparatus, device, medium and product for synchronizing information
US8843578B2 (en) Role-independent context exchange
CN115941451B (en) Method, apparatus and storage medium for redundant switching in an industrial control network
CN111726401A (en) File transmission method and device
CN115499173A (en) Credible communication method and system based on UDP protocol
CN114640703A (en) Data communication method and device, electronic equipment and storage medium
CN112367240A (en) Method for ensuring uniqueness of instant messaging messages of multi-platform equipment
CN110764932A (en) Data processing method, system, medium and computing device
CN115001630B (en) Data transmission method, device, equipment and storage medium
CN113949651B (en) Network transmission method, device, equipment and storage medium
CN114567536B (en) Abnormal data processing method, device, electronic equipment and storage medium
CN113783769B (en) Method and device for transmitting message in automatic driving and relay equipment
CN115866043A (en) Service sending method and system, service receiving method and system, equipment and medium
CN112671822B (en) Service request processing method, device, storage medium, server and system
CN109245864B (en) ETH-CAN communication front-end detection device based on self-feedback and error self-detection method
CN117812054A (en) Message transmission method, system, equipment and storage medium
CN108809832B (en) Device and method for maintaining serial route when sending work request
CN116614383A (en) Model updating method and device, electronic equipment and storage medium
CN113992690A (en) Message transmission method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant