A message transmission method between multiple device nodes
By implementing a distributed interaction mechanism to enable message transmission between multiple device nodes, the problem of coordinated control between electronic information equipment systems is solved, the survivability and anti-destruction capability of the system is improved, and it is ensured that the equipment can receive and transmit control commands in a timely manner under abnormal circumstances.
Patent Information
- Application Number
- CN202411965299.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2044-12-30
AI Technical Summary
In the prior art, the collaborative control between electronic information equipment systems has problems such as unstable network status leading to missing important commands, inability to transmit control commands across nodes, and inability to receive missed commands after abnormal nodes recover.
A message-based distributed interaction mechanism is adopted to achieve flexible and reliable transmission between multiple device nodes by generating message cache, broadcasting query messages, receiving end querying local cache and requesting missing message messages, ensuring that devices can receive control commands in time under network interruption or abnormal conditions.
In a multi-device interconnection scenario where devices are not fully connected, flexible collaborative control between devices is achieved, which improves the survivability and anti-destruction capability of the system and ensures that devices can continue to work together under abnormal circumstances.
Smart Images

Figure CN119814618B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information technology, and in particular to a message transmission method among multiple device nodes. Background Art
[0002] With the widespread collaborative application of electronic information equipment and information technology equipment, in addition to the traditional top-down "chimney-style" collaborative working method, the efficient and agile working method of direct collaboration between electronic information equipment systems is becoming increasingly important. Currently, information collaboration between electronic information equipment systems generally uses manual telephone calls, text / command messages, etc., which has the following problems:
[0003] 1. It is heavily dependent on the current network link status. Nodes with sudden network instability may miss important collaborative control commands.
[0004] 2. Existing methods are basically based on point-to-point transmission and do not support cross-node transmission of collaborative control commands. For example, if there are three nodes A, B, and C, A and B communicate directly, and B and C communicate directly, but A and C cannot connect directly for some reason, then A cannot perform cross-node collaborative control on C.
[0005] 3. After the abnormal node resumes communication, it cannot receive the missed commands and cannot continue to work together. Summary of the Invention
[0006] To solve the above problems, the present invention provides a message transmission method between multiple device nodes. Based on the distributed interaction mechanism of messages, it is aimed at the collaborative control scenario between multiple electronic information equipment system nodes, and realizes the flexible and reliable transmission of control commands between multiple electronic information equipment system nodes, thereby improving the overall survivability and anti-destruction capability of the system.
[0007] The present invention provides a method for transmitting messages between multiple device nodes. The specific technical solution is as follows:
[0008] S1: Each node's device generates and caches messages locally;
[0009] S2: The device that generates the message acts as the sender and broadcasts the query message to other connected devices based on the message ID to transmit the message;
[0010] S3: The device that receives the query message acts as a receiving end and obtains the message ID in the query message;
[0011] S4: The receiving end queries the local cache based on the message ID to determine whether there is a message ID that does not exist in the query message. If not, the receiving end completes the current round of message delivery. If so, the receiving end sends a missing message request message to the sending end to which the query message belongs;
[0012] S5: The sending end obtains the corresponding message entity from the local cache according to the received message message of the missing message requested by other device nodes and sends it to the receiving end corresponding to the request.
[0013] Furthermore, in step S1, the sending end generates a message ID using the device ID and the timestamp of generating the message.
[0014] Furthermore, the query message includes at least one message ID, and multiple message IDs constitute a message code list.
[0015] Furthermore, after step S5, the method further includes:
[0016] The receiving end adds the received message entity cache locally, and based on the current message entity, broadcasts a query message to the corresponding sending end, executing a new round of message delivery process until the interconnected devices reach a consistent message cache.
[0017] Furthermore, after the receiving end receives the message entity, the following steps are also included:
[0018] Based on the message entity, determine whether the currently received message entity exists in the local cache. If so, ignore the message entity. If not, add the message entity cache to the local cache.
[0019] Furthermore, the device serving as the sending end periodically sends query messages to other connected devices.
[0020] Furthermore, the device generating the message receives at most one query message broadcast by another connected device in the current round of message transmission.
[0021] Furthermore, the device that acts as the receiving end in the current round of message transmission receives the message entity cache of the corresponding sender and adds it to the local cache, and then acts as the sender in the next round of message transmission to broadcast the query message to the sender in the previous round.
[0022] Furthermore, the devices are provided with three, namely a first device, a second device and a third device;
[0023] The second device is connected to the first device and the third device respectively, and each device generates its own message and caches it locally.
[0024] Furthermore, the message transmission process between the first device, the second device, and the third device is as follows:
[0025] The first device acts as a sender to broadcast a query message to the second device, and the second device acts as a sender to broadcast a query message to the third device;
[0026] The second device and the third device each determine, based on the received query message, whether there is a missing message ID in the local cache. If not, the device serving as the receiving end completes its current round of message delivery. If so, it sends a missing message request message to the sending end to which the query message belongs;
[0027] The sender that receives the request obtains the corresponding message entity from the local cache and sends it to the receiving end corresponding to the request;
[0028] The corresponding receiving end adds the message entity cache locally, and based on the current locally cached message, broadcasts a query message to the sending end to execute the next round of message delivery until the first device, the second device and the third device reach a consistent message cache.
[0029] The beneficial effects of the present invention are as follows:
[0030] The present invention is based on a distributed interaction mechanism of messages. In a multi-device interconnection scenario where the devices are not fully connected, the sending end and the receiving end adopt their own message processing processes to realize message transmission between the two, and through multiple rounds of message transmission, each device can grasp the current working status of each other in real time; the nodes composed of the connected devices adopt the same message processing process, and the messages between the devices without direct connection can be reliably delivered through the intermediate device nodes; after the abnormal conditions such as network interruption and device damage are resolved, the device can receive control commands in time and continue to work with other devices, thereby improving the overall survivability and anti-destruction ability of the system, realizing flexible collaborative control between multiple devices, and achieving the collaborative working effect of "single point control, distributed execution". BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 It is a schematic diagram of the sending end flow of the present invention.
[0032] Figure 2 It is a schematic diagram of the receiving end flow of the present invention.
[0033] Figure 3 This is a message transmission diagram of Example 3 of the present invention. DETAILED DESCRIPTION
[0034] The following description clearly and completely describes the technical solutions in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts are within the scope of protection of the present invention.
[0035] In the description of the embodiments of the present invention, it should be noted that the indicated orientations or positional relationships are based on the orientations or positional relationships shown in the accompanying drawings, or the orientations or positional relationships in which the inventive product is typically placed when in use, or the orientations or positional relationships commonly understood by those skilled in the art, or the orientations or positional relationships in which the inventive product is typically placed when in use. These are merely for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation, and therefore should not be understood as limiting the present invention. In addition, the terms "first" and "second" are used only to distinguish descriptions and should not be understood as indicating or implying relative importance.
[0036] In describing the embodiments of the present invention, it should be noted that, unless otherwise specified or limited, the terms "disposed" and "connected" should be understood broadly. For example, they may refer to fixed connections, detachable connections, or integral connections; they may refer to direct connections or indirect connections through an intermediary. Those skilled in the art will understand the specific meanings of these terms in the present invention based on the specific circumstances.
[0037] Example 1
[0038] Embodiment 1 of the present invention discloses a method for transmitting messages between multiple device nodes, such as Figure 1 and 2 As shown, the specific process is as follows:
[0039] S1: Each node generates control messages based on its own needs and caches the generated messages locally;
[0040] As a preferred embodiment, the sending end generates the message ID by using the device ID and the timestamp of generating the message.
[0041] S2: The device that generates the message acts as the sender and broadcasts the query message to other connected devices based on the message ID to transmit the message;
[0042] Specifically, the query message includes at least one message ID, and multiple message IDs constitute a message code list.
[0043] As a preferred embodiment, the device serving as the sending end periodically sends query messages to other connected devices.
[0044] S3: The device that receives the query message acts as a receiving end and obtains the message ID in the query message;
[0045] S4: The receiving end queries the local cache based on the message ID to determine whether there is a message ID that does not exist in the query message. If not, the receiving end completes the current round of message delivery. If so, the receiving end sends a missing message request message to the sending end to which the query message belongs;
[0046] S5: The sending end obtains the corresponding message entity from the local cache according to the received message message of the missing message requested by other device nodes and sends it to the receiving end corresponding to the request.
[0047] As a preferred embodiment, the receiving end adds the received message entity cache locally, and based on the current message entity, broadcasts a query message to the corresponding sending end, executing a new round of message delivery process until the interconnected devices reach a consistent message cache.
[0048] As a preferred embodiment, after the receiving end receives the message entity, the further step includes:
[0049] Based on the message entity, determine whether the currently received message entity exists in the local cache. If so, ignore the message entity. If not, add the message entity cache to the local cache.
[0050] Example 2
[0051] Embodiment 1 of the present invention discloses a method for transmitting messages between multiple device nodes, such as Figure 1 and 2 The specific process is as follows:
[0052] S1: Each node generates control messages based on its own needs and caches the generated messages locally;
[0053] As a preferred embodiment, the sending end generates the message ID by using the device ID and the timestamp of generating the message.
[0054] S2: The device that generates the message acts as the sender and broadcasts the query message to other connected devices based on the message ID to transmit the message;
[0055] Specifically, the query message includes at least one message ID, and multiple message IDs constitute a message code list.
[0056] As a preferred embodiment, the device generating the message receives at most one query message broadcast by another connected device in the current round of message transmission;
[0057] That is, in the current round of message transmission, each receiving end does not simultaneously receive query messages broadcast by multiple sending devices;
[0058] S3: The device that receives the query message acts as a receiving end and obtains the message ID in the query message;
[0059] S4: The receiving end queries the local cache based on the message ID to determine whether there is a message ID that does not exist in the query message. If not, the receiving end completes the current round of message delivery. If so, the receiving end sends a missing message request message to the sending end to which the query message belongs;
[0060] S5: The sending end obtains the corresponding message entity from the local cache according to the received message message of the missing message requested by other device nodes and sends it to the receiving end corresponding to the request.
[0061] As a preferred embodiment, the receiving end adds the received message entity cache locally and, based on the current message entity, broadcasts a query message to the corresponding sending end to execute a new round of message delivery process until the interconnected devices reach a consistent message cache;
[0062] Specifically, the device that acts as the receiving end in the current round of message transmission receives the message entity cache of the corresponding sender and adds it to the local cache. Then, in the next round of message transmission, the device that acts as the sending end broadcasts the query message to the sending end of the previous round.
[0063] That is, suppose there are two devices, denoted as A and B. In the current round, device A acts as the sender. After device B receives the query message, sends a request, and receives the message entity, in the next round, device B acts as the sender and broadcasts the query message to device A, which is the receiver.
[0064] As a preferred embodiment, after the receiving end receives the message entity, the further step includes:
[0065] Based on the message entity, determine whether the currently received message entity exists in the local cache. If so, ignore the message entity. If not, add the message entity cache to the local cache.
[0066] Example 3
[0067] Embodiment 3 of the present invention discloses a message transmission method between multiple device nodes, such as Figure 3 As shown, in this embodiment, three device nodes are constructed, namely the first device A, the second device B, and the third device C, and a multi-device interconnection architecture with network connections AB and BC is established. Device A and device C have no direct network connection;
[0068] The specific process of message transmission is as follows:
[0069] The first device A, the second device B, and the third device C each generate a control message according to their own work needs, and use the device ID and the timestamp of the message generation to determine the unique code of each message. For example, at time t1, the message generated by the first device A is named A.1. Similarly, at time t1, the message generated by the second device B is named B.1, and the message generated by the third device C is named C.1. At time t2, the message generated by the second device B is named B.2, and the message generated by the third device C is named C.2. Each node caches its own message code locally.
[0070] In this embodiment, the two-round message transmission process is described;
[0071] The first round of message passing process:
[0072] The first device A periodically initiates a query message, and the second device B periodically initiates a query message, starting message transmission between multiple devices. The query message content initiated by the first device A and the second device B is each unique code of their own control message;
[0073] In this embodiment, the content of the query message of the first device A is recorded as the code "A.1", the content of the query message of the second device B is recorded as the code "B.1, B.2"; the content of the query message of the third device C is recorded as the code "C.1, B.1"; among them, the codes "A.1", "B.1", "B.2", and "C1" do not include the specific content of the message.
[0074] The second device B receives the query message from the first device A and searches its own locally cached message code list based on the message code [A.1] of the first device A;
[0075] Similarly, the third device C receives the query message from the second device B and searches its own locally cached message code list based on the message code [B.1, B.2] of the second device B.
[0076] Specifically, there is no [A.1] in the local cache list [B.1] of the message code of the second device B, that is, the query result is empty; there is no [B.2] in the local cache list [B.1, C.1] of the message code of the third device C, that is, the query result is that the message code [B.1] exists, but the message code [B.2] does not exist.
[0077] If the second device B does not have the [A.1] message code, the second device B initiates a missing message request to the first device A, and the message includes the missing content [A.1]. If the third device C does not have the [B.2] message code, the third device C initiates a missing message request to the second device B, and the message includes the missing content [B.2].
[0078] Based on the lack of message information in the received request, the first device A sends the message entity corresponding to the message code [A.1] to the second device B; based on the lack of message information in the received request, the second device B sends the message entity corresponding to the message code [B.2] to the third device C; what is sent here is the actual data content of the message corresponding to the message codes [A.1] and [B.2].
[0079] The second device B receives the message entity corresponding to message code [A.1] and queries the local message code cache [B.1] again. If the message code [A.1] still does not exist, the second device B adds the message code [A.1] to the local cache and performs a collaborative control response to the entity content corresponding to message code [A.1]. If the message code [A.1] already exists in the local cache, the second device B ignores the message. The local message code cache of the second device B is now [B.1, B.2, A.1].
[0080] Similarly, the third device C receives the message entity corresponding to the message code [B.2] and queries the local message code cache [B.2] again. If the [B.2] encoded message still does not exist at this time, the [B.2] encoded message is added to the local cache, and a collaborative control response is performed on the entity content corresponding to the message code [B.2]. If the message code [B.2] already exists in the local cache at this time, this message is ignored. At this time, the local message code cache of the third device C is [C1, B.1, B.2].
[0081] At this point, the first device A, the second device B, and the third device complete a round of message transmission between the interconnected device nodes.
[0082] The second round of message passing process:
[0083] The second device B sends a query message to the first device A based on the message code [B.1, B.2, A1], and the third device C sends a query message to the second device B based on the message code [C1, B.1, B.2]. Similarly, the message code of the query message does not include the specific content of the message.
[0084] First device A receives the query message from second device B and searches its own locally cached message code list based on the message code [A.1] of first device A.
[0085] Similarly, the second device B receives the query message from the third device C and searches its own locally cached message code list based on the message code [B.1, B.2, A.1] of the second device B.
[0086] Specifically, there is no [B.1, B.2] in the local cache list of message codes [A.1] of the first device A, that is, the query result is empty; there is no [C.1] in the local cache list of message codes [B.1, B.2, A.1] of the second device B, that is, the query result is that message codes [B.1, B.2] exist, but message code [C.1] does not exist.
[0087] If the first device A does not have the message encoding [B.1, B.2], the first device A initiates a missing message request to the second device B, and the message contains the missing content [B.1, B.2]. If the second device B does not have the message encoding [C.1], the second device B initiates a missing message request to the third device C, and the message contains the missing content [C.1].
[0088] The second device B sends the message entity corresponding to the message code [B.1, B.2] to the first device A based on the lack of message information in the received request; the third device C sends the message entity corresponding to the message code [C.1] to the second device B based on the lack of message information in the received request; what is sent here is the actual data content of the message corresponding to the message codes [B.1], [B.2], and [C.1].
[0089] The first device A receives the message entity corresponding to message codes [B.1] and [B.2] and queries the local message code cache [A.1] again. If the message codes [B.1] and [B.2] still do not exist, the first device A adds the message codes [B.1] and [B.2] to the local cache and performs a collaborative control response to the entity content corresponding to message codes [B.1] and [B.2]. If the message codes [B.1] and [B.2] already exist in the local cache, the first device A ignores the message. At this point, the local message code cache of the first device A is [A.1, B.1, B.2].
[0090] Similarly, the second device B receives the message entity corresponding to the message code [C.1] and queries the local message code cache [B.1, B.2, A.1] again. If the [C.1] encoded message still does not exist at this time, the [C.1] encoded message is added to the local cache, and a collaborative control response is performed on the entity content corresponding to the message code [C.1]; if the message code [C.1] already exists in the local cache at this time, this message is ignored; at this time, the local message code cache of the second device B is [B.1, B.2, A.1, C.1].
[0091] The first device A, the second device B, and the third device C cyclically execute the above message transmission process to synchronize all control message entities, control message encodings, and coordinated control responses corresponding to the control messages, so that the message encoding cache of each device node is consistent with [A.1, B.1, B.2, C.1].
[0092] Based on the above process, if the network connection of the third device C is interrupted after the first round of message transmission, the first device A and the second device B will continue to generate their own control messages and synchronize them; when the network connection of the third device C is restored, repeating the above message transmission process can update the local message encoding cache to be consistent, and execute the collaborative control response corresponding to the message that was missing when the network connection was interrupted.
[0093] In this embodiment, the first device A and the third device C do not communicate directly. Based on this method, messages can be transmitted to each other, and message transmission can also be achieved after the network of device C is interrupted and restored, ensuring reliable transmission of message messages.
[0094] The present invention is not limited to the aforementioned specific embodiments, but extends to any new features or any new combination disclosed in this specification, as well as any new method or process steps or any new combination disclosed.
Claims
1. A message transmission method between multiple device nodes, characterized in that: include: S1: Each node's device generates and caches messages locally; S2: The device that generates the message acts as the sender and broadcasts the query message to other connected devices based on the message ID to transmit the message; S3: The device that receives the query message acts as a receiving end and obtains the message ID in the query message; S4: The receiving end queries the local cache based on the message ID to determine whether there is a message ID that does not exist in the query message. If not, the receiving end completes the current round of message delivery. If so, the receiving end sends a missing message request message to the sending end to which the query message belongs; S5: The sender obtains the corresponding message entity from the local cache according to the received message request from other device nodes and sends it to the receiving end corresponding to the request; The receiving end adds the received message entity cache locally, and based on the current message entity, broadcasts a query message to the corresponding sending end, executing a new round of message delivery process until the interconnected devices reach a consistent message cache.
2. The message transmission method between multiple device nodes according to claim 1, characterized in that: In step S1, the sending end generates a message ID using the device ID and the timestamp of the generated message.
3. The message transmission method between multiple device nodes according to claim 1, characterized in that: The query message includes at least one message ID, and multiple message IDs constitute a message code list.
4. The message transmission method between multiple device nodes according to claim 1, characterized in that: After the receiving end receives the message entity, it also includes: Based on the message entity, determine whether the currently received message entity exists in the local cache. If so, ignore the message entity. If not, add the message entity cache to the local cache.
5. The message transmission method between multiple device nodes according to claim 1, characterized in that: As the sending device, it periodically sends query messages to other connected devices.
6. The message transmission method between multiple device nodes according to claim 1, characterized in that: The device that generates the message receives at most one query message broadcast by other connected devices in the current round of message transmission.
7. The message transmission method between multiple device nodes according to claim 6, characterized in that: The device that acts as the receiving end in the current round of message transmission receives the message entity cache of the corresponding sender and adds it to the local cache. Then, in the next round of message transmission, the device acts as the sender and broadcasts the query message to the sender in the previous round.
8. The message transmission method between multiple device nodes according to any one of claims 1 to 7, characterized in that: There are three devices, namely the first device, the second device and the third device; The second device is connected to the first device and the third device respectively, and each device generates its own message and caches it locally.
9. The message transmission method between multiple device nodes according to claim 8, characterized in that: The message transmission process between the first device, the second device, and the third device is as follows: The first device acts as a sender to broadcast a query message to the second device, and the second device acts as a sender to broadcast a query message to the third device; The second device and the third device each determine, based on the received query message, whether there is a missing message ID in the local cache. If not, the device serving as the receiving end completes its current round of message delivery. If so, it sends a missing message request message to the sending end to which the query message belongs; The sender that receives the request obtains the corresponding message entity from the local cache and sends it to the receiving end corresponding to the request; The corresponding receiving end adds the message entity cache locally, and based on the current locally cached message, broadcasts a query message to the sending end to execute the next round of message delivery until the first device, the second device and the third device reach a consistent message cache.
Citation Information
Patent Citations
Method for processing multi-caching data consistency and main memory processor
CN101470669A
Network element self-discovery method and system
CN102244853A