Multi-gateway communication system and multi-gateway message concurrent processing method

By adding a timestamp when reporting messages by the gateway device, the problem of concurrency in message processing of local network topology devices in the cloud is solved, message deduplication is realized, duplicate message processing is avoided, and system stability and efficiency are improved.

CN120186121APending Publication Date: 2025-06-20ZHEJIANG FUTURE ELF ARTIFICIAL INTELLIGENCE TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510272277.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-07
Publication Date
2025-06-20

AI Technical Summary

Technical Problem

It is difficult for the cloud to deal with the concurrency of device messages in the local network topology, resulting in duplicate processing of messages.

Method used

By adding a time stamp when reporting messages by the gateway device, the cloud can recognize duplicate messages in a short time and realize message deduplication.

Benefits of technology

It effectively solves the problem of message concurrency during cloud and local communication, avoids duplicate message processing, and improves the stability and efficiency of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120186121A_ABST
    Figure CN120186121A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a multi-gateway communication system and a multi-gateway message concurrent processing method. The multi-gateway communication system comprises at least one functional device, a plurality of gateway devices and a cloud, the functional device is configured to send an original message comprising a message source address and a message identifier, and the gateway devices are configured to respond to the received original message, analyze the original message, generate and report a device message to the cloud, the cloud is configured to receive the device message, query the received historical message, respond to the existence of a target historical message, and execute a message deduplication operation, the message source address and the message identifier of the target historical message are the same as those of the device message, and the time interval between the timestamp of the target historical message and the timestamp of the device message is smaller than a time threshold. Therefore, according to the embodiment of the invention, the problem of message concurrency during cloud and local communication can be solved, and repeated message processing is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technologies, and more particularly, to a multi-gateway communication system and a method for concurrent processing of multi-gateway messages. Background Art

[0002] In the network topology of a space, there may be multiple gateways (such as a central control screen, a speaker, an intelligent interactive tablet, a gateway, etc.) and multiple functional device nodes. For functional device nodes, the source addresses of different node messages are different. If forwarding messages, the original source address of the message will be strictly followed in accordance with the specification. Therefore, the gateway can perform deduplication and filtering when processing these functional device node messages.

[0003] However, since the cloud does not deploy the complete local network topology protocol stack function corresponding to the local communication protocol, and the cloud also needs to process messages of other types of devices in addition to the devices in the local network topology, it is difficult to implement the complete local network topology protocol stack function in the cloud in terms of implementation complexity. It can be seen that when the cloud interacts with the local network topology, it is difficult for the cloud to handle the message concurrency problem. Summary of the Invention

[0004] In view of this, embodiments of the present invention provide a multi-gateway communication system and a method for concurrent processing of multi-gateway messages to solve the message concurrency problem during cloud and local communication and avoid duplicate message processing.

[0005] In a first aspect, an embodiment of the present invention provides a multi-gateway communication system, where the multi-gateway communication system includes:

[0006] At least one functional device configured to send an original message, where the original message includes a message source address and a message identifier;

[0007] A plurality of gateway devices configured to, in response to receiving the original message, parse the original message, generate and report a device message to the cloud, where the device message includes a message source address, a message identifier, and a timestamp, and the timestamp represents the time when the gateway device receives the original message;

[0008] The cloud is configured to receive the device message, query the received historical messages, and perform a message deduplication operation in response to the existence of a target historical message, where the message source address and the message identifier of the target historical message are the same as those of the device message, and the time interval between the timestamp of the target historical message and the timestamp of the device message is less than a time threshold.

[0009] In a second aspect, an embodiment of the present invention provides a method for concurrent processing of multi-gateway messages, which is applied to the cloud, and the method includes:

[0010] Receive device messages reported by a receiving gateway device, where the device messages include a message source address, a message identifier, and a timestamp, and the timestamp represents the time when the gateway device receives the device message;

[0011] Query the received historical messages;

[0012] In response to the existence of target historical messages, perform a message deduplication operation, where the message source address and message identifier of the target historical messages are the same as those of the device message, and the time interval between the timestamp of the target historical messages and the timestamp of the device message is less than a time threshold.

[0013] In a third aspect, an embodiment of the present invention provides a multi-gateway message concurrent processing method, which is applied to a gateway device. The method includes:

[0014] Receive an original message sent by a functional device, where the original message includes a message source address and a message identifier;

[0015] Parse the original message and generate a device message, where the device message includes a message source address, a message identifier, and a timestamp, and the timestamp represents the time when the gateway device receives the original message;

[0016] Report the device message to the cloud so that the cloud performs a message deduplication operation based on the message source address, message identifier, and timestamp of the device message.

[0017] In a fourth aspect, an embodiment of the present invention provides a multi-gateway message concurrent processing method, which is applied to a functional device. The method includes:

[0018] Receive a target message;

[0019] Parse and query the message identifier of the target message;

[0020] In response to the message identifier of the target message being within the specific range, query the received historical target messages;

[0021] In response to the existence of historical target messages with the same message identifier, perform a message deduplication operation.

[0022] In a fifth aspect, an embodiment of the present invention provides an electronic device, including a memory and a processor. The memory is used to store one or more computer program instructions, where the one or more computer program instructions are executed by the processor to implement any one of the above methods.

[0023] In a sixth aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, it implements any one of the above methods.

[0024] In a seventh aspect, an embodiment of the present invention provides a computer program product. When the computer program product runs on a computer, the computer is caused to execute any one of the methods described above.

[0025] In an embodiment of the present invention, a multi-gateway communication system includes at least one functional device, a plurality of gateway devices, and a cloud. The functional device is configured to send an original message including a message source address and a message identifier. The gateway device is configured to, in response to receiving the original message, parse the original message, generate and report a device message to the cloud. The cloud is configured to receive the device message, query the received historical messages, and in response to the existence of a target historical message, perform a message deduplication operation, where the message source address and the message identifier of the target historical message are the same as those of the device message, and the time interval between the time stamp of the target historical message and the time stamp of the device message is less than a time threshold. Thus, the embodiment of the present invention can solve the problem of message concurrency during communication between the cloud and the local, and avoid duplicate message processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Through the following description of the embodiments of the present invention with reference to the drawings, the above and other objects, features, and advantages of the present invention will become clearer. In the drawings:

[0027] Figure 1 is a schematic diagram of a multi-gateway communication system according to an embodiment of the present invention;

[0028] Figure 2 is a schematic diagram of the message uplink concurrency processing process of a multi-gateway communication system according to an embodiment of the present invention;

[0029] Figure 3 is a flowchart of the message uplink concurrency processing method of a multi-gateway communication system according to an embodiment of the present invention;

[0030] Figure 4 is a schematic diagram of the message downlink concurrency processing process of a multi-gateway communication system according to an embodiment of the present invention;

[0031] Figure 5 is a flowchart of the message downlink concurrency processing method of a multi-gateway communication system according to an embodiment of the present invention;

[0032] Figure 6 is a flowchart of a multi-gateway message concurrency processing method according to an embodiment of the present invention;

[0033] Figure 7 is a flowchart of another multi-gateway message concurrency processing method according to an embodiment of the present invention;

[0034] Figure 8 is a flowchart of yet another multi-gateway message concurrency processing method according to an embodiment of the present invention;

[0035] Figure 9 It is a schematic diagram of a multi - gateway message concurrent processing device according to an embodiment of the present invention;

[0036] Figure 10 It is a schematic diagram of another multi - gateway message concurrent processing device according to an embodiment of the present invention;

[0037] Figure 11 It is a schematic diagram of yet another multi - gateway message concurrent processing device according to an embodiment of the present invention;

[0038] Figure 12 It is a schematic diagram of an electronic device according to an embodiment of the present invention. Detailed implementation manners

[0039] The following describes the present application based on embodiments, but the present application is not limited to these embodiments. In the following detailed description of the present application, some specific details are described in detail. Those skilled in the art can fully understand the present application without the description of these details. To avoid obscuring the essence of the present application, well - known methods, processes, procedures, elements, and circuits are not described in detail.

[0040] In addition, those of ordinary skill in the art should understand that the drawings provided herein are for illustrative purposes only, and the drawings are not necessarily drawn to scale.

[0041] Unless the context clearly requires otherwise, words such as "including" and "comprising" in the entire application document should be interpreted in an inclusive sense rather than an exclusive or exhaustive sense; that is, it is the meaning of "including but not limited to".

[0042] In the description of the present application, it should be understood that terms such as "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance. In addition, in the description of the present application, unless otherwise specified, the meaning of "a plurality" is two or more.

[0043] For the solutions described in this specification and the embodiments, if they involve personal information processing, they will be processed on the premise of having a legal basis (such as obtaining the consent of the personal information subject, or being necessary for performing a contract, etc.), and will only be processed within the specified or agreed scope. If the user refuses to process personal information other than the necessary information required for basic functions, it will not affect the user's use of basic functions.

[0044] In a topological network of a space, such as a Bluetooth Mesh network, in the topological network, after a device sends a message, due to the relay forwarding operations of other devices, the target device may receive multiple identical messages within a very short period of time. Without a corresponding message concurrency processing and deduplication mechanism, the target device may repeatedly execute a certain action within a short period of time, which is equivalent to a device anomaly for the user. Currently, within the local network topology, message deduplication can be achieved through the corresponding protocol stack functions, such as SEQ (Sequence Number), etc. However, for the interaction between the cloud and the devices in the local topology network, effective message deduplication has not been achieved. Therefore, this embodiment provides a multi-gateway communication system and a multi-gateway message concurrency processing method, which enable the cloud to identify duplicate messages within a short period of time by adding timestamps when gateway devices report messages, solve the message concurrency problem during cloud and local communication, and avoid duplicate message processing.

[0045] Figure 1 is a schematic diagram of the multi-gateway communication system according to an embodiment of the present invention. As Figure 1 shown, the multi-gateway communication system of this embodiment includes a cloud 10 and a local topology network. Among them, the local topology network includes multiple gateway devices and at least one functional device. Among them, the devices in the local topology network communicate with each other through a local communication network (such as a short-range communication network like a Bluetooth network), and the local topology network communicates with the cloud 10 through a long-range communication network (such as a wifi network, etc.). It should be understood that this embodiment does not limit the specific number and types of gateway devices and functional devices, which are determined according to the layout of the corresponding space and specific devices. This embodiment takes the local topology gateway including gateway devices 21-23 and functional devices 31-35 as an example.

[0046] During message uplink, that is, during the process of a functional device reporting a message (such as synchronization status information, etc.) to the cloud, due to the relay of other functional devices, there may be a situation where more than one gateway device receives the message and reports it to the cloud, resulting in the cloud receiving multiple identical messages. Therefore, a certain message concurrency processing method is required to perform message deduplication.

[0047] Figure 2 is a schematic diagram of the message uplink concurrency processing process of the multi-gateway communication system according to an embodiment of the present invention. Figure 3 is a flowchart of the message uplink concurrency processing method of the multi-gateway communication system according to an embodiment of the present invention. In this embodiment, the message concurrency processing process during message uplink is described by taking the message uplink of functional device 31 as an example.

[0048] As Figure 2 and Figure 3As shown in the figure, the message upstream concurrent processing method of the multi-gateway communication system according to the embodiment of the present invention includes the following steps:

[0049] Step S31, the functional device 31 sends the original message m1. Among them, the original message m1 includes a message source address and a message identifier. Among them, the message source address represents the message source, that is, the address of the functional device 31 that sends the message. The message identifier is used to identify the message sent by the functional device 31, and it can be in the form of increasing numbers. For example, if the message identifier of the previous message sent by the functional device 31 is x, then the message identifier of the current original message m1 sent by it is x + 1. It can be seen that a message can be uniquely marked by the message source address + message identifier. Further, the original message m1 may further include a destination address and message content. Among them, the destination address represents the device that the message needs to reach. For example, if the functional device 31 needs to report the original message m1 to the cloud, then the destination address of the original message m1 is the address information representing the cloud. The message content includes the content currently reported by the functional device 31, such as the device status, etc.

[0050] It should be understood that this embodiment does not limit the specific data structure of the original message m1 sent by the functional device 31, and it can be configured and adaptively adjusted based on the communication protocol adopted by the local topology network and actual needs.

[0051] Further, the gateway device 21 is configured to, in response to receiving the original message m1, parse the original message m1, generate and report a device message m2 to the cloud 10, as Figure 3 shown, which specifically includes:

[0052] Step S32, the gateway device 21 receives the original message m1. Further, the functional device 31 needs to report the message to the cloud 10 through the gateway device. For example, the original message m1 is directly sent based on the actual communication situation or relayed i1 times (1 ≤ i1 ≤ t, t ≥ 0) through other functional devices acting as relay nodes to the gateway device 21.

[0053] Step S33, the gateway device 22 receives the original message m1. Similarly, the original message m1 is directly sent based on the actual communication situation or relayed i2 times (1 ≤ i2 ≤ t, t ≥ 0) through other functional devices acting as relay nodes to the gateway device 22.

[0054] Since the message transfer speed in the local topology network varies relatively little, the time difference between the gateway device 21 and the gateway device 22 receiving the original message m1 is relatively small.

[0055] Step S34, the gateway device 21 records the timestamp T1 when receiving the original message m1.

[0056] Step S35: The gateway device 21 parses the original message m1 to obtain the content in the original message m1, such as the message source address, message identifier, destination address, and message content, etc. It should be understood that Step S34 and Step S35 can be executed synchronously or successively, and the present embodiment does not limit their execution order.

[0057] Step S36: The gateway device 21 generates a corresponding device message m2 under the remote communication protocol (i.e., the communication protocol between the gateway device and the cloud) based on the timestamp T1 and the content in the original message m1. The device message m2 includes the message source address, message identifier, and timestamp T1, and the timestamp represents the time when the gateway device 21 receives the original message m1.

[0058] Step S37: The gateway device 21 reports the device message m2 to the cloud 10.

[0059] Further, taking the topology network of this embodiment as a Bluetooth Mesh network as an example, after the gateway device receives the original message m1, it records the timestamp when the original message m1 is received, processes the original message m1 according to the Bluetooth Mesh protocol stack capabilities, parses out the specific content, performs protocol conversion on the message, and generates a corresponding device message m2 based on the content parsed from the original message m1 and the recorded timestamp T1. Among them, the device message m2 is a message packet under the communication network protocol between the local topology network and the cloud 10. Further, if the original message m1 includes a destination address and message content, the device message m2 also includes the corresponding destination address and message content. That is, compared with the original message m1, the device message m2, in addition to communication protocol conversion, also adds the timestamp T1 when the gateway device 21 receives the original message m1.

[0060] Similarly, the gateway device 22 is configured to, in response to receiving the original message m1, parse the original message m1, generate and report a device message m3 to the cloud 10. Specifically, it includes:

[0061] Step S3C: The gateway device 22 records the timestamp T2 when it receives the original message m1, parses the original message m1, and generates a device message m3. The device message includes the message source address, message identifier, and timestamp T2.

[0062] Step S3D: The gateway device 22 reports the device message m3 to the cloud 10. The process of the gateway device 22 generating and reporting the device message m3 is similar to that of the above device message m2, and will not be described in detail here. It should be understood that the processing of the device message m2 and the device message m3 by the gateway device 21 and the gateway device 22 is independent.

[0063] Further, the cloud 10 is configured to receive device messages, query the received historical messages, and perform a message deduplication operation in response to the existence of target historical messages. Among them, the target historical messages and the device messages are generated by different gateway devices based on the same original message, such as the above-mentioned device message m2 and device message m3. The source address and message identifier of the target historical message are the same as those of the device message, and the time interval between the timestamp of the target historical message and the timestamp of the device message is less than the time threshold. The time threshold can be determined based on the time difference between the messages received by different gateway devices after a message is sent by the same functional device determined through testing, or determined based on empirical values. This embodiment does not limit the specific value and specific determination method of the time threshold. Further optionally, if the target historical message has not been executed yet, the message deduplication operation performed by the cloud 10 can be: discarding the currently received device message or target historical message. If the target historical message is being executed or has been executed, the message deduplication operation performed by the cloud 10 can be: discarding the currently received device message. In other alternative implementation manners, the cloud 10 can also directly discard the currently received device message without determining whether the target historical message has been executed.

[0064] Further, as Figure 3 shown, the operations after the cloud 10 receives the device message m2 specifically include:

[0065] Step S38, after the cloud 10 receives the device message m2, parse the device message m2 to determine the timestamp T1 of the device message m2.

[0066] Step S39, query from the received historical messages whether there is a target historical message corresponding to the device message m2. Among them, the source address and message identifier of the target historical message are the same as those of the device message m2, and the time interval between the timestamp of the target historical message and the timestamp T1 of the device message m2 is less than the time threshold. If there is no target historical message, execute step S3A. If there is a target historical message, then execute step S3B.

[0067] Step S3A, if there is no target historical message corresponding to the device message m2 in the historical messages received by the cloud 10, execute and record the device message m2.

[0068] Step S3B, if there is a target historical message corresponding to the device message m2 in the historical messages received by the cloud 10, perform a message deduplication operation. Further optionally, if the target historical message corresponding to the device message m2 has not been executed yet, the message deduplication operation performed by the cloud 10 can be: discarding the currently received device message m2 or target historical message. If the target historical message is being executed or has been executed, the message deduplication operation performed by the cloud 10 can be: discarding the currently received device message m2.

[0069] Further, in this embodiment, if the cloud 10 receives the device message m2 before receiving the device message m3, it queries and determines that there is no historical message in the received historical messages whose time interval from the time stamp T1 of the device message m2 is less than the time threshold, and whose message source address and message identifier are the same as those of the device message m2, and retains the device message m2. If the cloud 10 receives the device message m2 after receiving the device message m3, it queries and determines that there is a historical message in the received historical messages whose time interval from the time stamp T1 (i.e., the time stamp T2 of the device message m3) of the device message m2 is less than the time threshold, and whose message source address and message identifier are the same as those of the device message m2 (i.e., the device message m3). When the device message m3 has not been executed, the device message m2 or the device message m3 can be discarded. When the device message m3 has started to be executed, the device message m2 is discarded. In another alternative implementation, if the cloud 10 receives the device message m2 after receiving the device message m3, the device message m2 can be directly discarded.

[0070] Similarly, when the cloud 10 receives the device message m3, it needs to execute: step S3E, perform a message deduplication operation based on the historical messages. It should be understood that the steps executed by the cloud 10 after receiving the device message m3 are similar to steps S38 - S3B, and will not be described in detail here.

[0071] Further, in this embodiment, after the cloud 10 receives the device message m3, it parses the device message m3 to determine the time stamp T2 in the device message m3. If the cloud 10 receives the device message m3 before receiving the device message m2, it queries and determines that there is no historical message in the received historical messages whose time interval from the time stamp T2 of the device message m3 is less than the time threshold, and whose message source address and message identifier are the same as those of the device message m3, and retains the device message m3. If the cloud 10 receives the device message m3 after receiving the device message m2, it queries and determines that there is a historical message in the received historical messages whose time interval from the time stamp T2 (i.e., the time stamp T1 of the device message m2) of the device message m3 is less than the time threshold, and whose message source address and message identifier are the same as those of the device message m3 (i.e., the device message m2). When the device message m2 has not been executed, the device message m3 or the device message m2 can be discarded. When the device message m2 has started to be executed, the device message m3 is discarded. In another alternative implementation, if the cloud 10 receives the device message m3 after receiving the device message m2, the device message m3 can be directly discarded.

[0072] Further, within a predetermined time after the cloud 10 receives a certain device message, it deletes the device message from the queried historical message table to reduce the number of queries and the computational amount.

[0073] Therefore, in this embodiment, by virtue of the characteristic that the time difference for multiple gateway devices to receive messages from the same functional device is relatively small, a timestamp when the gateway device receives the message is added to the message packet forwarded by each gateway device to the cloud. This enables the cloud to determine whether duplicate messages are received based on the timestamps, message source addresses, and message identifiers in the received device messages, so as to perform corresponding deduplication operations even when the time intervals for the cloud to receive the same device messages reported by different gateway devices are relatively large due to network or other issues, thereby avoiding unnecessary computational losses caused by the same information being synchronized multiple times.

[0074] In a further optional implementation manner, if communication between some or all of the gateway devices and the cloud fails, that is, the gateway device goes offline, the gateway device caches the original message (or the latest received original message) received in the offline state, and after the communication network is restored, that is, after the gateway device switches to the online state, generates corresponding device messages based on the received original messages and reports the generated device messages to the cloud.

[0075] Furthermore, after the cloud and the gateway device resume network communication, the cloud parses the device message from the gateway device and detects the status information reported latest by a certain functional device based on the timestamp of the device message to perform corresponding status synchronization. It should be understood that after receiving the device message reported by the gateway device that resumes network connection, the cloud can also perform message deduplication based on the above message concurrent processing method, and this embodiment does not limit this.

[0076] In the embodiment of the present invention, the multi-gateway communication system includes at least one functional device, multiple gateway devices, and a cloud. The functional device is configured to send an original message including a message source address and a message identifier. The gateway device is configured to, in response to receiving the original message, parse the original message, generate and report a device message to the cloud. The cloud is configured to receive the device message, query the received historical messages, and in response to the existence of a target historical message, perform a message deduplication operation, where the message source address and message identifier of the target historical message are the same as those of the device message, and the time interval between the timestamp of the target historical message and the timestamp of the device message is less than a time threshold. Thus, the embodiment of the present invention can solve the message concurrency problem during communication between the cloud and the local, and avoid duplicate message processing.

[0077] During message downlink, that is, during the process of the cloud sending messages to the functional device, since the message is forwarded by multiple gateway devices to the corresponding target functional device, and there may be multiple relay paths when the gateway device forwards the message, the target functional device may receive the same cloud message from different transmission paths. Therefore, a certain message concurrent processing method is required to perform message deduplication.

[0078] Figure 4It is a schematic diagram of the message downlink concurrent processing process of the multi-gateway communication system according to an embodiment of the present invention. Figure 5 It is a flowchart of the message downlink concurrent processing method of the multi-gateway communication system according to an embodiment of the present invention. In this embodiment, the cloud is further configured to send messages to corresponding functional devices through at least one of the gateway devices, and the messages sent by the cloud include message identifiers within a predetermined specific range. Taking the cloud 10 sending a message to the functional device 31 as an example, the message concurrent processing process during message downlink is described.

[0079] As Figure 4 and Figure 5 shown, the message downlink concurrent processing method of the multi-gateway communication system according to an embodiment of the present invention includes the following steps:

[0080] Step S41, the cloud 10 sends a cloud message m4, and it reaches the gateway device 21 and the gateway device 22. Among them, the cloud message m4 includes a message identifier IDx within a predetermined specific range. The message identifier is used to identify this message sent by the cloud, and it can adopt the way of increasing numbers. Optionally, the cloud message m4 can also include a target address and message content.

[0081] In an optional implementation manner, the message identifier range of the messages sent by the cloud does not overlap with the message identifier range of the messages sent by the devices (gateway devices or functional devices) in the local topology network. For example, the message identifier range of the messages sent by the devices (gateway devices or functional devices) in the local topology network can be 0 - n (n > 0), and the message identifier range of the messages sent by the cloud is m - k (m is greater than n, k is greater than m). Thus, even if the cloud message sent by the cloud does not include a message source address, the functional device can determine whether the message source is the cloud based on the message identifier range where the message identifier is located after receiving the message, and then can perform corresponding message concurrent processing. It should be understood that this embodiment does not limit the configuration of the message identifier range of the messages sent by the cloud and the message identifier range of the messages sent by the devices in the local topology network, and it can be configured based on the actual situation.

[0082] Step S42, after receiving the cloud message m4, the gateway device 21 performs protocol conversion on the cloud message m4 to generate a target message m4', that is, the gateway device 21 converts the cloud message m4 under the remote communication protocol into a target message m4' under the short-range communication protocol (such as the Bluetooth protocol, etc.) adopted by the local topology network.

[0083] Step S43, the gateway device 21 sends the target message m4'.

[0084] Step S44: After receiving the cloud message m4, the gateway device 22 performs protocol conversion on the cloud message m4 to generate a target message m4”. That is, the gateway device 22 converts the cloud message m4 under the remote communication protocol into the target message m4” under the short-range communication protocol (such as the Bluetooth protocol, etc.) adopted by the local topology network.

[0085] Step S45: The gateway device 21 sends the target message m4”.

[0086] It should be understood that the data processing operations between the gateway device 21 and the gateway device 22 are executed independently.

[0087] Step S46: The functional device 31 receives the target message m5. Among them, the target message m5 is the message that the target message m4' sent by the gateway device 21 is relayed i3 times (1 ≤ i3 ≤ t, t ≥ 0) by other devices acting as relay nodes and then sent to the functional device 31.

[0088] Step S47: The functional device 31 receives the target message m6. Among them, the target message m6 is the message that the target message m4' sent by the gateway device 21 is relayed i4 times (1 ≤ i4 ≤ t, t ≥ 0) by other devices acting as relay nodes and then sent to the functional device 31.

[0089] Step S48: The functional device 31 receives the target message m7. Among them, the target message m7 is the message that the target message m4” sent by the gateway device 22 is relayed i5 times (1 ≤ i5 ≤ t, t ≥ 0) by other devices acting as relay nodes and then sent to the functional device 31.

[0090] That is to say, after the gateway device 21 generates and sends the target message m4' through protocol conversion, m4' forms the target message m5 and the target message m6 after passing through different transmission paths and reaches the functional device 31. Similarly, after the gateway device 22 receives the cloud message m4, it performs protocol conversion on the cloud message m4, obtains and sends the target message m4”, and the target message m4” forms the target message m7 after passing through the corresponding transmission path and reaches the functional device 31.

[0091] After receiving the corresponding target message, since there are multiple relay paths for message transmission in the topology network, the functional device 31 needs to perform message deduplication to avoid the situation where the functional device 31 repeatedly executes the same action. Further, the functional device 31 is also configured to, in response to receiving the target message, parse and query the message identifier of the target message, and in response to the message identifier of the target message being within a specific range, query the received historical target messages. In response to the existence of historical target messages with the same message identifier, perform the corresponding message deduplication operation. The functional device 31 is also configured to, in response to the message identifier of the received target message not being within the corresponding specific range, perform message deduplication based on the time when the target message is received, the message source address, and the message identifier, or perform message deduplication based on the message source address and the message sequence number of the target message.

[0092] As Figure 5 shown, taking the received target message m5 as an example, the message concurrent processing process of the functional device 31 in this embodiment includes:

[0093] Step S49, the functional device 31 parses and queries the message identifier of the target message. Taking the target message m5 as an example, the functional device 31 parses and queries the message identifier of the target message m5. As described above, the message identifier of the target message m5 is IDx.

[0094] Step S4A, the functional device 31 determines whether the message identifier of the target message is within the specific range corresponding to the messages sent by the cloud 10. Taking the target message m5 as an example, the functional device 31 determines whether the message identifier IDx of the target message m5 is within the specific range corresponding to the messages sent by the cloud 10. If the message identifier IDx of the target message m5 is within this specific range, step S4B is executed; if the message identifier IDx of the target message m5 is not within this characteristic range, step S4C is executed.

[0095] Step S4B, the functional device 31, in response to the message identifier of the target message being within the specific range, performs the corresponding message deduplication operation based on the message identifier of the target message.

[0096] Taking the target message m5 as an example, the functional device 31, in response to the message identifier IDx of the target message m5 being within the specific range, performs the corresponding message deduplication operation based on the message identifier IDx of the target message m5.

[0097] In this embodiment, since the message identifiers of the messages from the cloud are all within a specific range, when the functional device determines that the message identifier of the received target message is within this specific range, it determines that the currently received target message is a message sent from the cloud. Its message identifier can be used to mark messages from the cloud. Therefore, it can directly compare the message identifier of the currently received target message with the message identifier of the historical target message to determine whether the same target message from the cloud has been received before, so as to perform message deduplication operations.

[0098] Further, if the functional device 31 has received a historical target message with the message identifier IDx before receiving the target message m5 (for example, received the target message m6 or m7 before receiving the target message m5), discard the target message m5. In other alternative implementation manners, it can also be further determined whether the historical target message has started to be executed. If the historical target message has started to be executed, then discard the target message m5. If the historical target message has not been executed, discard the target message m5 or the historical target message. If the functional device 31 has not received a historical target message with the message identifier IDx before receiving the target message m5 (for example, has not received the target message m6 and m7 before receiving the target message m5), execute and save the target message m5.

[0099] Further optionally, the functional device in this embodiment can only query the historical target messages received in a past predetermined period of time to reduce the number of queries and the computational amount.

[0100] Step S4C, the functional device 31 performs message deduplication operations based on the message deduplication policy of the local topology network in response to the message identifier of the target message not being within the specific range.

[0101] Further, taking the local topology network as a Bluetooth Mesh network as an example, when the functional device 31 determines that the message identifier of the currently received target message is not within the specific range, that is, determines that the source of the target message is other functional devices or gateway devices in the local topology network, the functional device 31 can perform SEQ message deduplication operations at the network layer based on the message source address and message sequence number of the target message.

[0102] In another alternative implementation, when the functional device 31 determines that the message identifier of the currently received target message is not within a specific range, that is, when it determines that the source of the target message is another functional device or gateway device in the local topology network, the functional device 31 can perform message deduplication based on the time when the target message is received, the message source address, and the message identifier. Since the message passing efficiency in the local topology network is not very different, the time interval for the same message to reach the functional device based on different relay paths is relatively small. Therefore, in this embodiment, it is possible to determine whether multiple identical messages have been received based on the message interval, the message source address, and the message identifier. That is, multiple target messages with a received time difference of a predetermined time interval, the same message source address, and the same message identifier can be determined as the same message, and the corresponding message deduplication operation can be performed.

[0103] Thus, the multi-gateway communication system according to the embodiment of the present invention configures a message identifier within a specific range in the message sent from the cloud, so that the target functional device can determine whether it comes from the cloud by judging the message identifier of the received message, and perform message deduplication based on the message identifier after determining that the currently received message comes from the cloud, effectively solving the problem of message concurrency when the cloud sends messages to the functional terminal, and further avoiding the problem that the functional device repeatedly performs the same action.

[0104] Figure 6 It is a flowchart of a method for processing multi-gateway message concurrency according to an embodiment of the present invention. The method for processing multi-gateway message concurrency according to this embodiment is applied to the cloud, as Figure 6 shown, the method for processing multi-gateway message concurrency according to this embodiment includes the following steps:

[0105] Step S610, receiving the device message reported by the gateway device. The device message includes a message source address, a message identifier, and a timestamp. The timestamp represents the time when the gateway device receives the device message.

[0106] After the functional device sends a message, it may reach multiple gateway devices through multiple relay paths, and multiple gateway devices will report the message sent by the functional device to the cloud. Therefore, an effective message concurrency processing method needs to be performed in the cloud to perform message deduplication.

[0107] In this embodiment, since the message passing speed in the local topology network is relatively small, the time interval for multiple gateway devices to receive the same message from the same functional device is small. Therefore, the cloud can perform message deduplication based on the time when the gateway device receives the message, the message source address, and the message identifier.

[0108] In this embodiment, during the protocol conversion process of the messages received by the gateway device, a timestamp of the received message is added, so that the cloud can query the time when the gateway device received the message when receiving the message, and then can effectively perform message concurrent processing and achieve message deduplication.

[0109] Step S620: Query the received historical messages.

[0110] Step S630: In response to the existence of a target historical message, perform a message deduplication operation. The source address and message identifier of the target historical message are the same as those of the device message, and the time interval between the timestamp of the target historical message and the timestamp of the device message is less than the time threshold.

[0111] Furthermore, in this embodiment, in response to the non-existence of a target historical message corresponding to the currently received device message, the currently received device message is executed and saved.

[0112] It should be understood that the process of the cloud executing message concurrency in this embodiment is similar to that of the Figure 2 and Figure 3 corresponding embodiments, and will not be described in detail here.

[0113] In this embodiment, due to the characteristic that the time difference of messages received from the same functional device by multiple gateway devices is relatively small, a timestamp of the gateway device when receiving the message is added to the message packets forwarded by each gateway device to the cloud. This enables the cloud to determine whether a duplicate message is received based on the timestamp, source address, and message identifier in the received device message for corresponding deduplication operations even when the time intervals of the same device messages reported by different gateway devices received by the cloud are relatively large due to network and other issues, thus avoiding unnecessary computational losses caused by the same information being synchronized multiple times.

[0114] Figure 7 is a flowchart of another multi-gateway message concurrent processing method according to an embodiment of the present invention. The multi-gateway message concurrent processing method of this embodiment is applied to a gateway device. As Figure 7 shown, the multi-gateway message concurrent processing method of this embodiment includes the following steps:

[0115] Step S710: Receive the original message sent by the functional device. The original message includes a source address and a message identifier. The original message can be directly received from the functional device or received via a corresponding relay path.

[0116] Step S720: Parse the original message and generate a device message. The device message includes a source address, a message identifier, and a timestamp, and the timestamp represents the time when the gateway device received the original message.

[0117] Step S730: Report the device message to the cloud so that the cloud performs message deduplication based on the message source address, message identifier, and timestamp of the device message.

[0118] It should be understood that the data processing process of the gateway device during the message concurrency execution of the cloud in this embodiment is similar to that of Figure 2 and Figure 3 the corresponding embodiment. The process of the cloud receiving the device message and performing message concurrency processing is similar to that of Figure 2 and Figure 3 the corresponding embodiment, Figure 6 the corresponding embodiment, and will not be described in detail here.

[0119] In this embodiment, due to the characteristic that the time difference of receiving messages from the same functional device by multiple gateway devices is relatively small, a timestamp when the gateway device receives the message is added to the message packet forwarded by each gateway device to the cloud. This enables the cloud to determine whether duplicate messages are received based on the timestamp, message source address, and message identifier in the received device message even when the time intervals of receiving the same device message reported by different gateway devices by the cloud differ relatively greatly due to network and other issues, so as to perform corresponding deduplication operations, thereby avoiding unnecessary computing losses caused by the same information being synchronized multiple times.

[0120] Figure 8 is a flowchart of another multi-gateway message concurrency processing method according to an embodiment of the present invention. The multi-gateway message concurrency processing method of this embodiment is applied to a functional device. As Figure 8 shown, the multi-gateway message concurrency processing method of this embodiment includes the following steps:

[0121] Step S810: Receive a target message. Among them, the target message can be a cloud message sent by the cloud to the corresponding functional device through at least one gateway device, or a message sent by a gateway device or other functional devices. Among them, the cloud message includes message identifiers within a predetermined specific range.

[0122] Furthermore, the gateway device receives the cloud message sent by the cloud and directly sends the cloud message or sends it to the corresponding functional device through the corresponding relay path, so that the functional device performs message deduplication based on the message identifier of the cloud message.

[0123] Step S820: Parse and query the message identifier of the target message.

[0124] Step S830: In response to the message identifier of the target message being within the corresponding specific range, query the received historical target messages.

[0125] Step S840: In response to the existence of historical target messages with the same message identifier, perform message deduplication operations.

[0126] In this embodiment, since the message identifiers of the messages from the cloud are all within a specific range, when the functional device determines that the message identifier of the received target message is within this specific range, it determines that the currently received target message is a message sent from the cloud. Its message identifier can be used to mark messages from the cloud. Therefore, it is possible to directly compare the message identifier of the currently received target message with the message identifier of the historical target message to determine whether the same target message from the cloud has been received before, so as to perform message deduplication operations.

[0127] When the message identifier of the target message received by the functional device is not within the corresponding specific range, the functional device performs message deduplication operations based on the time when the target message is received, the message source address, and the message identifier, or performs message deduplication operations based on the message source address and the message sequence number of the target message.

[0128] It should be understood that the process of the functional device in this embodiment performing message concurrency is similar to that of Figure 4 and Figure 5 the corresponding embodiment, and will not be described in detail here.

[0129] In the embodiment of the present invention, by configuring a message identifier within a specific range in the message sent from the cloud, the target functional device can determine whether the received message is from the cloud by judging the message identifier of the received message, and perform message deduplication operations based on the message identifier after determining that the currently received message is from the cloud, effectively solving the problem of message concurrency when the cloud sends messages to the functional terminal, and further avoiding the problem that the functional device repeatedly performs the same action.

[0130] Figure 9 FIG. is a schematic diagram of a multi-gateway message concurrency processing device according to an embodiment of the present invention. The multi-gateway message concurrency processing device in this embodiment is applied to the cloud. As Figure 9 shown, the multi-gateway message concurrency processing device 9 in this embodiment includes a first message receiving unit 91, a first query unit 92, and a first operation unit 93.

[0131] The first message receiving unit 91 is configured to receive device messages reported by the gateway device. The device messages include a message source address, a message identifier, and a timestamp, and the timestamp represents the time when the gateway device receives the device message. The first query unit 92 is configured to query the received historical messages. The first operation unit 93 is configured to perform message deduplication operations in response to the existence of target historical messages, where the message source address and the message identifier of the target historical messages are the same as those of the device messages, and the time interval between the timestamp of the target historical messages and the timestamp of the device messages is less than a time threshold.

[0132] In this embodiment, due to the relatively small time difference in receiving messages from the same functional device by multiple gateway devices, a timestamp of the gateway device receiving the message is added to the message packets forwarded by each gateway device to the cloud. This enables the cloud to determine whether duplicate messages are received based on the timestamp, message source address, and message identifier in the received device messages for corresponding deduplication operations even when the time intervals of receiving the same device messages reported by different gateway devices at the cloud are relatively large due to network or other issues, thereby avoiding unnecessary computing losses caused by the same information being synchronized multiple times.

[0133] Figure 10 FIG. is a schematic diagram of another multi-gateway message concurrent processing device according to an embodiment of the present invention. The multi-gateway message concurrent processing device of this embodiment is applied to a gateway device, such as Figure 10 As shown, the multi-gateway message concurrent processing device 10 of this embodiment includes a second message receiving unit 101, a first parsing unit 102, and a second operating unit 103.

[0134] The second message receiving unit 101 is configured to receive an original message sent by a functional device, where the original message includes a message source address and a message identifier. The first parsing unit 102 is configured to parse the original message and generate a device message, where the device message includes a message source address, a message identifier, and a timestamp, and the timestamp represents the time when the gateway device receives the original message. The second operating unit 103 is configured to report the device message to the cloud so that the cloud performs a message deduplication operation based on the message source address, message identifier, and timestamp of the device message.

[0135] In this embodiment, due to the relatively small time difference in receiving messages from the same functional device by multiple gateway devices, a timestamp of the gateway device receiving the message is added to the message packets forwarded by each gateway device to the cloud. This enables the cloud to determine whether duplicate messages are received based on the timestamp, message source address, and message identifier in the received device messages for corresponding deduplication operations even when the time intervals of receiving the same device messages reported by different gateway devices at the cloud are relatively large due to network or other issues, thereby avoiding unnecessary computing losses caused by the same information being synchronized multiple times.

[0136] Figure 11 FIG. is a schematic diagram of yet another multi-gateway message concurrent processing device according to an embodiment of the present invention. The multi-gateway message concurrent processing device of this embodiment is applied to a functional device, such as Figure 10 As shown, the multi-gateway message concurrent processing device 11 of this embodiment includes a third message receiving unit 111, a second parsing unit 112, a second query unit 113, and a third operating unit 114.

[0137] The third message receiving unit 111 is configured to receive a target message. The second parsing unit 112 is configured to parse and query the message identifier of the target message. The second query unit 113 is configured to query the received historical target messages in response to the message identifier of the target message being within the specific range. The third operation unit 114 is configured to perform a message deduplication operation in response to the existence of a historical target message with the same message identifier.

[0138] In response to the message identifier of the received target message not being within the corresponding specific range, the functional device performs a message deduplication operation based on the time when the target message is received, the message source address, and the message identifier, or performs a message deduplication operation based on the message source address and the message sequence number of the target message.

[0139] In an embodiment of the present invention, by configuring a message identifier within a specific range in the message sent from the cloud, the target functional device can determine whether the received message is from the cloud by judging the message identifier of the received message, and perform a message deduplication operation based on the message identifier after determining that the currently received message is from the cloud, effectively solving the problem of message concurrency when the cloud sends messages to the functional terminal, and further avoiding the problem that the functional device repeatedly performs the same action.

[0140] Figure 12 It is a schematic diagram of an electronic device according to an embodiment of the present invention. In this embodiment, the electronic device 12 can be the cloud, the gateway device, or the functional device in this embodiment, and it can be implemented by using a corresponding server or terminal device. The cloud can be implemented by using a single server or a server cluster, etc.

[0141] As Figure 12 shown, the electronic device 12 includes at least one processor 121; and a memory 122 communicatively connected to the at least one processor 121; and a communication component 123 communicatively connected to the scanning device, and the communication component 123 receives and sends data under the control of the processor 121; wherein, the memory 122 stores instructions executable by the at least one processor 121, and the instructions are executed by the at least one processor 121 to implement the above three-dimensional image generation method.

[0142] Specifically, the electronic device includes one or more processors 121 and a memory 122, Figure 12 Taking one processor 121 as an example. The processor 121 and the memory 122 can be connected through a bus or other means, Figure 12Take the bus connection as an example. As a non-volatile computer-readable storage medium, the memory 122 can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The processor 121 executes various functional applications and data processing of the device by running the non-volatile software programs, instructions, and modules stored in the memory 122, that is, to implement the above multi-gateway message concurrent processing method.

[0143] The memory 122 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store an option list, etc. In addition, the memory 122 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some embodiments, the memory 122 may optionally include a memory remotely disposed relative to the processor 121, and these remote memories can be connected to an external device through a network. Examples of the above network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.

[0144] One or more modules are stored in the memory 122 and, when executed by one or more processors 121, execute the multi-gateway message concurrent processing method in any of the above method embodiments.

[0145] The above product can execute the method provided in the embodiments of the present application, and has corresponding functional modules and beneficial effects for executing the method. For technical details not described in detail in this embodiment, reference can be made to the method provided in the embodiments of the present application.

[0146] In this embodiment, due to the relatively small time difference in receiving messages from the same functional device by multiple gateway devices, a timestamp when the gateway device receives the message is added to the message packet forwarded by each gateway device to the cloud. This enables the cloud to determine whether duplicate messages are received based on the timestamp, message source address, and message identifier in the received device message for corresponding deduplication operations even when the time intervals for the cloud to receive the same device messages reported by different gateway devices are relatively large due to network and other issues, thereby avoiding unnecessary computing losses caused by the same information being synchronized multiple times. At the same time, the embodiment of the present invention can also configure a message identifier within a specific range in the message sent by the cloud, so that the target functional device can determine whether it comes from the cloud by judging the message identifier of the received message, and perform message deduplication operations based on the message identifier after determining that the currently received message comes from the cloud, effectively solving the message concurrency situation of the cloud sending messages to the functional terminal, and further avoiding the problem of the functional device repeatedly executing the same action.

[0147] Another embodiment of the present invention relates to a non-volatile storage medium for storing a computer-readable program for a computer to execute some or all of the above method embodiments.

[0148] That is, those skilled in the art can understand that all or part of the steps in implementing the above method embodiments can be completed by instructing relevant hardware through a program. The program is stored in a storage medium, including several instructions for causing a device (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the methods described in the embodiments of the present application. The foregoing storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs.

[0149] The foregoing are only the preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the protection scope of the present application.

Claims

1. A multi-gateway communication system, characterized in that: The multi-gateway communication system comprises: At least one functional device is configured to send an original message, wherein the original message includes a message source address and a message identifier; A plurality of gateway devices are configured to, in response to receiving the original message, parse the original message, generate and report a device message to the cloud, the device message including a message source address, a message identifier and a timestamp, the timestamp indicating the time when the gateway device received the original message; The cloud is configured to receive the device message, query the received historical messages, and perform a message deduplication operation in response to the existence of a target historical message, wherein the message source address and message identifier of the target historical message are the same as those of the device message, and the time interval between the timestamp of the target historical message and the timestamp of the device message is less than a time threshold.

2. The multi-gateway communication system according to claim 1, characterized in that: The target history message and the device message are generated by different gateway devices based on the original message.

3. The multi-gateway communication system according to claim 1, characterized in that: The gateway device is configured to receive the original message in an offline state, and after switching to an online state, generate a corresponding device message based on each received original message, and report each device message to the cloud.

4. The multi-gateway communication system according to claim 1, characterized in that: The cloud is also configured to send a message to the corresponding functional device through at least one of the gateway devices, and the message sent by the cloud includes a message identifier within a predetermined specific range.

5. The multi-gateway communication system according to claim 4, characterized in that: The functional device is also configured to, in response to receiving a target message, parse and query the message identifier of the target message, in response to the message identifier of the target message being within the specific range, query the received historical target messages, and in response to the existence of historical target messages with the same message identifier, perform message deduplication operations.

6. The multi-gateway communication system according to claim 5, characterized in that: The functional device is also configured to, in response to the message identifier of the target message not being within the specific range, perform a message deduplication operation based on the time when the target message is received, the message source address and the message identifier, or perform a message deduplication operation based on the message source address and the message sequence number of the target message.

7. A method for concurrently processing messages from multiple gateways, applied to the cloud, characterized in that: The method comprises: Receiving a device message reported by a gateway device, the device message including a message source address, a message identifier and a timestamp, the timestamp indicating the time when the gateway device receives the device message; Query the received historical messages; In response to the existence of a target historical message, a message deduplication operation is performed, the message source address and message identifier of the target historical message are the same as the device message, and the time interval between the timestamp of the target historical message and the timestamp of the device message is less than a time threshold.

8. The method according to claim 7, characterized in that The method further comprises: A cloud message is sent to a corresponding functional device via at least one of the gateway devices, wherein the cloud message includes a message identifier within a predetermined specific range.

9. A method for concurrently processing messages of multiple gateways, applied to a gateway device, characterized in that: The method comprises: The original message sent by the receiving functional device includes a message source address and a message identifier; Parsing the original message and generating a device message, wherein the device message includes a message source address, a message identifier and a timestamp, and the timestamp indicates the time when the gateway device receives the original message; The device message is reported to the cloud, so that the cloud performs a message deduplication operation based on a message source address, a message identifier, and a timestamp of the device message.

10. The method according to claim 9, characterized in that The method further comprises: receiving a cloud message sent by the cloud, wherein the cloud message includes a message identifier within a predetermined specific range; The cloud message is sent to a corresponding functional device, so that the functional device performs a message deduplication operation based on the message identifier of the cloud message.

11. A method for concurrently processing messages from multiple gateways, applied to functional devices, characterized in that: The method comprises: Receive target message; Parsing and querying the message identifier of the target message; In response to the message identifier of the target message being within a preset specific range, querying the received historical target message; In response to the existence of historical target messages with the same message identifier, a message deduplication operation is performed.

12. An electronic device comprising a memory and a processor, characterized in that: The memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method according to any one of claims 7 to 11.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 7 to 11 is implemented.

14. A computer program product, characterized in that When the computer program product is run on a computer, the computer is caused to execute the method according to any one of claims 7 to 11.

Citation Information

Cited By

  • Message security transparent transmission method and device for meteorological station terminal, and medium

    CN121508973A