A multicast method, system, device and storage medium for Mesh network

By storing and updating global group information in each node in the Mesh network, using differential group information and electing node mechanism, the decentralized multicast function is realized, which solves the problem of multicast function interruption caused by gateway damage and improves multicasting reliability and network robustness.

CN118921630BActive Publication Date: 2025-01-17ZHEJIANG DAHUA TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411407310.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-09
Publication Date
2025-01-17
Estimated Expiration
2044-10-09

AI Technical Summary

Technical Problem

The multicast technology of the existing Mesh network relies on the gateway to manage multicast information, resulting in the multicast function being unable to be implemented when the gateway is damaged, and there is a lack of a decentralized multicast solution.

Method used

By storing global group information in each node in the Mesh network and using differential group information for update and broadcast, the nodes are elected to synchronize the global group information of the node with the largest information serial number, and the decentralized multicast function of each node is realized to avoid relying on the gateway .

Benefits of technology

It improves the reliability of multicast function and network robustness, reduces network costs, ensures the consistency and accuracy of global group information stored by each node, and realizes the multicast function without a gateway.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118921630B_ABST
    Figure CN118921630B_ABST
Patent Text Reader

Abstract

The present application relates to the field of communication technology, and in particular to a multicast method, system, device and storage medium of a Mesh network, which is used to implement a multicast function on a mesh network without a gateway and improve the reliability of multicast. The method includes: when the global group information stored by each node in the Mesh network is consistent, the first node in the Mesh network updates the global group information stored by the first node based on the generated differential group information, and broadcasts the differential group information to each node in the Mesh network, wherein the global group information stored by each node includes: the information content of each group of the Mesh network; the second node in the Mesh network updates the global group information stored by the second node based on the received differential group information, wherein the second node is different from the first node.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a multicast method, system, device and storage medium for a Mesh network. Background Art

[0002] Mesh network is a network technology that automatically interconnects network devices. Each device in the Mesh network can forward data from other devices to solve the problem that two devices that need to communicate with each other cannot communicate directly due to certain limitations (such as too far distance, too much wireless interference, and the need for backup lines, etc.).

[0003] Multicast technology can effectively solve the problem of single-point sending and multi-point receiving, thereby realizing efficient point-to-multipoint data transmission in the network, saving a lot of network bandwidth and reducing network load.

[0004] In the existing Mesh network multicast technology, when a node needs to join a group, it subscribes to the multicast information of the address. When the multicast source sends a message to a multicast address, all nodes that have subscribed to the group will receive the corresponding message. The above function depends on the gateway to manage the multicast information. If the gateway is damaged, the multicast function cannot be realized. For example, the Bluetooth Mesh network supports multicast, but it requires the participation of the sigmesh gateway. If the sigmesh gateway is not involved, the multicast function cannot be realized. Summary of the invention

[0005] The embodiments of the present application provide a multicast method, system, device and storage medium for a Mesh network, which implement a multicast function on a Mesh network without a gateway and improve the reliability of multicast.

[0006] The specific technical solutions provided by the embodiments of this application are as follows:

[0007] In a first aspect, a multicast method for a Mesh network is provided, the method comprising:

[0008] When the global group information stored in each node in the Mesh network is consistent, the first node in the Mesh network updates the global group information stored in the first node based on the generated differential group information, and broadcasts the differential group information to each node in the Mesh network, wherein the global group information stored in each node includes: the information content of each group of the Mesh network;

[0009] A second node in the Mesh network updates the global group information stored in the second node based on the received differential group information, wherein the second node is different from the first node.

[0010] In a possible embodiment, when the global group information stored in each node in the Mesh network is consistent, before the first node in the Mesh network updates the global group information stored in the first node based on the generated differential group information and broadcasts the differential group information to each node in the Mesh network, the method further includes:

[0011] The election node in the Mesh network synchronizes the global group information it stores to each node in the Mesh network, and the information sequence number in the global group information stored by the election node is the largest.

[0012] Through the above method, it can be ensured that before the global group information is updated, the global group information stored in each node is consistent, thereby ensuring the effectiveness of updating the global group information.

[0013] In a possible embodiment, before the election node in the Mesh network synchronizes the global group information stored in it to each node in the Mesh network, the process further includes:

[0014] The first node broadcasts and sends a first election request to each node, where the first election request includes: an information sequence number in the global group information of the first node;

[0015] The second node receives the first election request, and when it is determined that the information sequence number in the global group information of the second node is greater than the information sequence number of the global group information of the first node, broadcasts the second election request to each node, and when no third election request is received within a preset time period, determines that the second node is the election node, wherein the second election request includes: the information sequence number in the global group information of the second node, and the third election request is sent by the third node in the Mesh network, and the third node is different from the second node.

[0016] Through the above method, by comparing the information sequence number, the node with the latest global group information in the Mesh network can be quickly determined.

[0017] In a possible embodiment, the differential group information includes: an update operation action and an update operation address, and the global group information stored in each node also includes: an information sequence number and an information check value.

[0018] Then the second node in the Mesh network updates the global group information stored in the second node based on the received differential group information, including:

[0019] The second node updates the content of each group of information in the global group information stored by it based on the update operation action and the update operation address, and increases the information sequence number in the global group information stored by it by 1;

[0020] The second node generates a new information verification value corresponding to the global group information of the second node, and updates the information verification value in the global group information stored by each second node to the new information verification value.

[0021] Through the above method, only the difference group information is transmitted to update the global group information of each node, at the lowest cost (updating the global group information of the entire Mesh network, saving network bandwidth, and reducing the management overhead of the Mesh network.

[0022] In a possible embodiment, after the second node in the Mesh network updates the global group information stored in the second node based on the received differential group information, the method further includes:

[0023] The first node broadcasts and sends a global group information check frame to each node, wherein the global group information check frame includes: a reference information check value, the reference information check value is an information check value in the global group information stored by the first node;

[0024] The second node receives the global group information check frame, and when determining that the information check value in the global group information stored therein is inconsistent with the reference information check value, sends a global group information synchronization request to the first node.

[0025] Through the above method, it is checked whether the global group information of all nodes in the entire Mesh network is updated to the latest state, which further improves the accuracy of the global group information update, and compares the information verification value. Compared with directly comparing the global group information, the verification is faster and more accurate.

[0026] In a possible embodiment, when it is determined that the current information check value in the stored global group information is inconsistent with the reference information check value, after sending the global group information synchronization request to the first node, the method further includes:

[0027] The first node receives the global group information synchronization request, and broadcasts the reference information sequence number and the content of each group of information to be synchronized to each node, wherein the reference information sequence number is the information sequence number in the global group information of the first node, and the content of each group of information to be synchronized is the content of each group of information in the global group information of the first node;

[0028] The second node receives the reference information sequence number and the contents of each group of information to be synchronized, and when it is determined that the reference information sequence number is greater than the information sequence number in the global group information of the second node, it clears the global group information of the second node, and generates the global group information of the second node based on the reference information sequence number and the contents of each group of information to be synchronized.

[0029] Through the above method, it can be ensured that all nodes in the entire Mesh will eventually store the latest global group information, ensuring the consistency of each node's information and improving the reliability of the multicast function.

[0030] In a possible embodiment, the method further includes:

[0031] The first node sends a multicast data packet to each node, and the multicast data packet includes: a multicast address;

[0032] The second node receives the multicast data packet, queries the global group information stored therein, obtains the target group information corresponding to the multicast address, and reports the multicast data packet to the application layer when it is determined that the address of the second node is in the target group information.

[0033] Through the above method, the complexity is small, the multicast function can be simply realized, the occupation of system resources is saved, and it does not rely on the gateway.

[0034] In a second aspect, the present application provides a multicast system for a Mesh network, the system comprising:

[0035] The first node is used to update the global group information stored in the first node based on the generated differential group information when the global group information stored in each node in the Mesh network is consistent, and broadcast the differential group information to each node in the Mesh network, wherein the global group information stored in each node includes: information content of each group of the Mesh network;

[0036] The second node, different from the first node, is configured to update the global group information stored in the second node based on the received differential group information.

[0037] In a possible embodiment, the system further includes an election node:

[0038] The election node is used to synchronize the global group information it stores to each node in the Mesh network. The information sequence number in the global group information stored by the election node is the largest.

[0039] In a possible embodiment, before the election node in the Mesh network synchronizes the global group information stored in it to each node in the Mesh network, the process further includes:

[0040] The first node is configured to broadcast a first election request to each node, wherein the first election request includes: an information sequence number in the global group information of the first node;

[0041] The second node is used to receive the first election request, and when it is determined that the information sequence number in the global group information of the second node is greater than the information sequence number of the global group information of the first node, broadcast the second election request to each node, and when the third election request is not received within a preset time period, determine that the second node is the election node, wherein the second election request includes: the information sequence number in the global group information of the second node, and the third election request is sent by the third node in the Mesh network, and the third node is different from the second node.

[0042] In a possible embodiment, the differential group information includes: an update operation action and an update operation address, and the global group information stored in each node also includes: an information sequence number and an information check value.

[0043] When the second node in the Mesh network updates the global group information stored in the second node based on the received differential group information, it also includes:

[0044] The second node is used to update the content of each group of information in the global group information stored therein based on the update operation action and the update operation address, and increase the information sequence number in the global group information stored therein by 1;

[0045] The second node is used to generate a new information verification value corresponding to the global group information of the second node, and update the information verification value in the global group information stored by each second node to the new information verification value.

[0046] In a possible embodiment, after the second node in the Mesh network updates the global group information stored in the second node based on the received differential group information, the method further includes:

[0047] The first node is used to broadcast and send a global group information check frame to each node, wherein the global group information check frame includes: a reference information check value, the reference information check value is an information check value in the global group information stored by the first node;

[0048] The second node is used to receive the global group information check frame, and when it is determined that the information check value in the global group information stored therein is inconsistent with the reference information check value, send a global group information synchronization request to the first node.

[0049] In a possible embodiment, when it is determined that the current information check value in the stored global group information is inconsistent with the reference information check value, after sending the global group information synchronization request to the first node, the method further includes:

[0050] The first node is used to receive a global group information synchronization request, and broadcast a reference information sequence number and the content of each group of information to be synchronized to each node, wherein the reference information sequence number is the information sequence number in the global group information of the first node, and the content of each group of information to be synchronized is the content of each group of information in the global group information of the first node;

[0051] The second node is used to receive the reference information sequence number and the content of each group of information to be synchronized, and when it is determined that the reference information sequence number is greater than the information sequence number in the global group information of the second node, clear the global group information of the second node, and generate the global group information of the second node based on the reference information sequence number and the content of each group of information to be synchronized.

[0052] In a possible embodiment, the system further includes:

[0053] The first node is used to send a multicast data packet to each node, where the multicast data packet includes: a multicast address;

[0054] The second node is used to receive the multicast data packet, query the global group information stored therein, obtain the target group information corresponding to the multicast address, and report the multicast data packet to the application layer when it is determined that the address of the second node is in the target group information.

[0055] According to a third aspect, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any one of the methods described in the first aspect are implemented.

[0056] According to a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method described in any one of the first aspects are implemented.

[0057] In an embodiment of the present application, when the global group information stored in each node in the Mesh network is consistent, the first node in the Mesh network updates the global group information stored in the first node based on the generated differential group information, and broadcasts the differential group information to each node in the Mesh network, wherein the global group information stored in each node includes: the content of each group information of the Mesh network, and then the second node in the Mesh network updates the global group information stored in the second node based on the received differential group information, wherein the second node is different from the first node. In this way, each node stores the global group information separately, and can report multicast data packets through the global group information stored in each node, without relying on the gateway to manage group information, and realizes the multicast function on a mesh network without a gateway, that is, a decentralized mesh network, avoiding the situation where the multicast function cannot be used due to gateway damage, improving reliability, reducing the overall cost of the network, and improving the robustness and robustness of the network, and each node synchronously updates the global group information, ensuring the validity of the global group information stored in each node and accurately reporting the multicast data packets. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 A flowchart of a multicast method for a Mesh network provided in an embodiment of the present application;

[0059] Figure 2 A schematic diagram of a process for selecting a node to synchronize global group information in an embodiment of the present application;

[0060] Figure 3 A schematic diagram of the process of updating global group information in an embodiment of the present application;

[0061] Figure 4A schematic diagram of the process of global group information verification in an embodiment of the present application;

[0062] Figure 5 A schematic diagram of the process of synchronizing global group information fragments in an embodiment of the present application;

[0063] Figure 6 A schematic diagram of a process for reporting a multicast data packet in an embodiment of the present application;

[0064] Figure 7 A schematic diagram of the structure of a multicast system of a Mesh network provided in an embodiment of the present application;

[0065] Figure 8 Schematic diagram of the structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0066] In order to make the purpose, technical scheme and advantages of the present application clearer, the technical scheme in the embodiment of the present application will be clearly and completely described below in conjunction with the drawings in the embodiment of the present application. Obviously, the described embodiment is only a part of the embodiment of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application. In the absence of conflict, the embodiments in the present application and the features in the embodiments can be combined with each other arbitrarily. In addition, although the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in an order different from that here.

[0067] The terms "first" and "second" in the specification and claims of the present application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the term "comprising" and any of their variations are intended to cover non-exclusive protection. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices. "Multiple" in the present application can mean at least two, for example, two, three or more, and the embodiments of the present application are not limited.

[0068] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description. It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, which should be considered as exemplary, and their purpose is only to illustrate the feasibility of the implementation of the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.

[0069] The following is a brief introduction to the design concept of the embodiment of the present application:

[0070] Multicast technology can effectively solve the problem of single-point sending and multi-point receiving, thereby realizing efficient point-to-multipoint data transmission in the network, saving a lot of network bandwidth and reducing network load.

[0071] Currently, there are two ways to store multicast information, namely, multicast technology based on IP network and multicast technology based on Mesh network.

[0072] Multicast protocols based on IP networks: Multicast protocols based on IP networks are divided into group membership protocols between hosts and routers and multicast routing protocols between routers. Group membership protocols include the internet group management protocol (IGMP). Multicast routing protocols are divided into intra-domain multicast routing protocols (including PIM-SM, PIM-DM, DVMRP and other protocols) and inter-domain multicast routing protocols (including MBGP, MSDP and other protocols). At the same time, in order to effectively suppress the spread of multicast data at the link layer, Layer 2 multicast protocols such as IGMP Snooping and CGMP are introduced.

[0073] Mesh network multicast technology: The Bluetooth Mesh standard supports multicast function and node subscription. When a node needs to join a group, it subscribes to the multicast information of the address. When the multicast source sends a message to a multicast address, all members who have subscribed to the group will receive the corresponding message. All group information can only be realized by operating the gateway of the mesh network.

[0074] Mesh network is a network technology that automatically interconnects network devices. Each device in the Mesh network can forward data from other devices to solve the problem that two devices that need to communicate with each other cannot communicate directly due to certain limitations (such as long distance, too much wireless interference, and the need for backup lines). Mesh network can use two technical methods to forward messages: flooding or routing.

[0075] In the existing Mesh network multicast technology, the realization of multicast function depends on the central node (gateway) to manage multicast information. If the gateway is damaged, the multicast function cannot be realized. For example, the Bluetooth Mesh network supports multicast, but requires the participation of the sigmesh gateway. If the sigmesh gateway does not participate, the multicast function cannot be realized.

[0076] In view of this, in an embodiment of the present application, a multicast method, system, device and storage medium of a Mesh network are provided. When the global group information stored by each node in the Mesh network is consistent, the first node in the Mesh network updates the global group information stored by the first node based on the generated differential group information, and broadcasts the differential group information to each node in the Mesh network, wherein the global group information stored by each node includes: the content of each group information of the Mesh network, and then the second node in the Mesh network updates the global group information stored by the second node based on the received differential group information, wherein the second node is different from the first node. In this way, each node stores the global group information separately, and the multicast data packet can be reported through the global group information stored by each node, without relying on the gateway to manage the group information. On a mesh network without a gateway, that is, a decentralized mesh network, the multicast function is realized, and the situation where the multicast function cannot be used due to gateway damage is avoided, the reliability is improved, the overall cost of the network is reduced, and the robustness and robustness of the network are improved. In addition, each node synchronously updates the global group information, ensuring the validity of the global group information stored by each node and the accurate reporting of the multicast data packet.

[0077] See also Figure 1 As shown, it is an implementation flow chart of a multicast method of a Mesh network provided in an embodiment of the present application. The specific implementation process of the method is as follows:

[0078] Step 10: When the global group information stored in each node in the Mesh network is consistent, the first node in the Mesh network updates the global group information stored in the first node based on the generated differential group information, and broadcasts the differential group information to each node in the Mesh network.

[0079] The global group information stored in each node includes: the information content of each group of the Mesh network, the first node is any node in the Mesh network, and the differential group information represents: after the first node is operated by the business layer, the global group information has changed.

[0080] Specifically, global group information is the data after all group information in the Mesh network is serialized according to certain rules. Global group information can be stored on the node's storage chip (such as flash, etc.) or on other devices such as the network. Global group information is used to synchronize the group information of each node.

[0081] The global group information includes the following fields: information sequence number, information content of each group, and information check value, which is not limited in the embodiments of the present application.

[0082] The information sequence number refers to the new information sequence number obtained by adding 1 to the current information sequence number each time the global group information is updated. The larger the information sequence number, the newer the global group information. The largest information sequence number indicates the latest information sequence number.

[0083] Exemplarily, the constituent fields of each group of information content are shown in Table 1, which is not limited in the embodiments of the present application.

[0084] Table 1

[0085]

[0086] Exemplarily, the constituent fields of group information N in each group information are as shown in Table 2, and this is not limited in the embodiments of the present application.

[0087] Table 2

[0088]

[0089] Specifically, the global group information includes: update operation actions and update operation addresses, etc., wherein the update operation actions include: adding a group, reducing a group, adding group members, reducing group members, etc., and the update operation address includes: group address and / or group member address.

[0090] Exemplarily, the frame type of the global group information is shown in Table 3, which is not limited in the embodiments of the present application.

[0091] Table 3

[0092]

[0093] In the embodiment of the present application, in the completed Mesh network, all group information is generated by the business layer, including operations such as establishing new groups, deleting old groups, adding members to the group, and deleting members from the group. The protocol stack does not need to and will not spontaneously generate new group information. The business layer operates the Mesh network through an interface from the outside world.

[0094] For example, the outside world is connected to node A in the completed Mesh network through a serial port, and an operation of establishing a new group is sent to node A through the serial port, and the operation generates corresponding differential group information.

[0095] In the embodiment of the present application, when the global group information stored in each node in the Mesh network is consistent, the first node updates the global group information stored in the first node based on the generated differential group information, and broadcasts the differential group information to each node in the Mesh network, so that each node in the entire network can obtain the latest and correct global group information. In order to reduce the transmission of global group information in the entire mesh network and prevent the transmission of global group information for each update, the differential group information is used to transmit this change.

[0096] In addition, it is worth noting that in the embodiment of the present application, in order to improve efficiency, the differential group information can also be delayed for transmission, and possible multiple differential group information can be packaged in one Mesh data packet for transmission, and the comparison in the embodiment of the present application is not limited.

[0097] Optionally, in an embodiment of the present application, before the first node updates the global group information stored in the first node based on the generated differential group information and broadcasts the differential group information to each node in the Mesh network, it is necessary to satisfy the condition that the global group information stored in each node in the Mesh network is consistent. A possible embodiment is provided to make the global group information stored in each node consistent, and the following operations are specifically performed:

[0098] In an embodiment of the present application, the election node in the Mesh network synchronizes the global group information stored by it to each node in the Mesh network, so that the global group information stored by each node is consistent with the global group information stored by the election node.

[0099] Among them, the information sequence number in the global group information stored by the election node is the largest, that is, the global group information stored by the election node is newer than that of other nodes.

[0100] In this way, it can be ensured that the global group information stored in each node is consistent before the global group information is updated, thereby ensuring the effectiveness of the updated global group information.

[0101] Optionally, in an embodiment of the present application, a possible embodiment is provided for determining an election node, and the following operations are specifically performed:

[0102] Step A1: The first node broadcasts a first election request to each node.

[0103] The first election request includes: the information sequence number in the global group information of the first node. The first election request may also include: the node address, which is not limited in the embodiment of the present application.

[0104] Exemplarily, the frame structure of the election request is shown in Table 4:

[0105] Table 4

[0106]

[0107] Step A2: The second node receives the first election request, and when it is determined that the information sequence number in the global group information of the second node is greater than the information sequence number of the global group information of the first node, it broadcasts the second election request to each node, and when no third election request is received within a preset time period, it determines that the second node is the election node.

[0108] The second election request includes: the information sequence number in the global group information of the second node; the third election request is sent by the third node in the Mesh network, and the third node is different from the second node.

[0109] In an embodiment of the present application, the second node receives the first election request. If the information sequence number in the global group information of the second node is not greater than the information sequence number of the global group information of the first node, it will no longer be processed. If the information sequence number in the global group information of the second node is greater than the information sequence number of the global group information of the first node, the second election request is broadcast to each node, and this process is repeated until no node sends an election request. The node that last sends the election request is the node with the largest information sequence number and is also the election node selected in this election.

[0110] In this way, by comparing the information sequence numbers, the node with the latest global group information in the Mesh network can be quickly determined.

[0111] In addition, it is worth noting that in an embodiment of the present application, there may be a situation where the first node is the node with the largest information sequence number. After the first node broadcasts the first election request to each node, if it does not receive election requests sent by other nodes within a preset time period, it is determined that the first node is the election node.

[0112] See also Figure 2 As shown, it is a schematic diagram of the process of electing nodes to synchronize global group information in an embodiment of the present application. The specific process is as follows:

[0113] Step 20: The first node broadcasts a first election request to each node and starts a timeout timer.

[0114] Step 21: The first node determines whether it has received other election requests sent by other nodes when the timeout timer expires. If so, execute step 22; otherwise, execute step 23.

[0115] Step 22: End, and wait for other nodes to initiate global group information synchronization requests.

[0116] Step 23: The first node initiates a global group information synchronization request.

[0117] Step 24: The second node receives the first election request.

[0118] Step 25: The second node determines whether the information sequence number in the global group information of the second node is greater than the information sequence number of the global group information of the first node. If so, execute step 26; otherwise, execute step 29.

[0119] Step 26: The second node broadcasts the second election request to each node and starts a timeout timer.

[0120] Step 27: The second node determines whether it has received other election requests sent by other nodes when the timeout timer expires. If so, execute step 22; otherwise, execute step 28.

[0121] Step 28: The second node initiates a global group information synchronization request.

[0122] Step 29: Give up and do not proceed any further.

[0123] Step 11: The second node in the Mesh network updates the global group information stored in the second node based on the received differential group information.

[0124] The second node is different from the first node, and the second node is any node among other nodes in the Mesh network that are different from the first node.

[0125] In the embodiment of the present application, the second node updates the information content, information sequence number and information check value of each group in the global group information stored by the second node based on the received differential group information.

[0126] Optionally, in an embodiment of the present application, a possible embodiment is provided for updating the global group information stored in the second node, and the following operations are specifically performed:

[0127] Step 110: The second node updates the content of each group of information in the global group information stored therein based on the update operation action and the update operation address, and increases the sequence number of the information in the global group information stored therein by 1.

[0128] For example, suppose that the content of a group information in the original global group information of the second node is as shown in Table 5, and there is a group with address 10, and there are 2 members in the group, and the addresses of the 2 members are 100 and 101 respectively. The content of the differential group information received from the first node is as shown in Table 6, and a node with address 102 is added to the group with address 10. Then the second node updates the original global group information based on the differential group information, updates the number of members of the group with address 10 by 3, and the member addresses are 100, 101 and 102 respectively, and adds 1 to the information sequence number 1000, and obtains the content of the updated global group information as shown in Table 7.

[0129] Table 5

[0130]

[0131] Table 6

[0132]

[0133] Table 7

[0134]

[0135] In this way, the global group information of each node can be updated by transmitting only the differential group information, and the global group information of the entire Mesh network is updated at the minimum cost (i.e., message length), reducing the transmission of the global group information on the entire Mesh network, saving network bandwidth, and reducing the management overhead of the Mesh network.

[0136] Step 111: the second node generates a new information verification value corresponding to the global group information of the second node, and updates the information verification value in the global group information stored in each second node to the new information verification value.

[0137] The information check value may be a check value of a cyclic redundancy check (CRC).

[0138] In the embodiment of the present application, the second node generates a new information check value corresponding to the global group information based on the content and information sequence number of each group of information.

[0139] See also Figure 3 As shown, it is a schematic diagram of the process of updating global group information in an embodiment of the present application, and the specific process is as follows:

[0140] Step 30: The first node generates differential group information.

[0141] Step 31: The first node broadcasts the difference group information to the entire Mesh network.

[0142] Step 32: The diffusion of the difference group information of the first node is completed.

[0143] Step 33: The second node receives the differential group information sent by the first node.

[0144] Step 34: The second node merges the differential group information into its global group information.

[0145] Step 35: The second node updates the information sequence number and information check value in its global group information.

[0146] Step 36: The global group information update of the second node is completed.

[0147] Optionally, in an embodiment of the present application, after the second node updates the global group information stored in the second node based on the received differential group information, in order to check whether the global group information of all nodes in the entire mesh network is updated to the latest state, the global group information can be verified, which provides a possible embodiment for the verification of the global group information, and specifically performs the following operations:

[0148] Step 12: The first node broadcasts a global group information check frame to each node.

[0149] The global group information check frame includes: a reference information check value, where the reference information check value is an information check value in the global group information stored by the first node.

[0150] Step 13: The second node receives the global group information check frame, and when determining that the information check value in the global group information stored therein is inconsistent with the reference information check value, sends a global group information synchronization request to the first node.

[0151] The global group information synchronization request indicates that the global group information of the second node is not up to date.

[0152] In an embodiment of the present application, the second node receives a global group information check frame and determines whether the information check value in the global group information stored by it is consistent with the reference information check value. If the information check value in the global group information stored by it is consistent with the reference information check value, the check ends; if the information check value in the global group information stored by it is inconsistent with the reference information check value, a global group information synchronization request is sent to the first node.

[0153] In an embodiment of the present application, if the first node receives a global group information synchronization request sent by other devices, the global group information synchronization process is started. If the first node does not receive a global group information synchronization request sent by other devices, the global group information update ends here.

[0154] In this way, based on the information verification value, it is checked whether the global group information of all nodes in the entire Mesh network is updated to the latest state, which further improves the accuracy of the global group information update, and the information verification value is compared with directly comparing the global group information, and the verification is faster and more accurate.

[0155] In addition, it is worth noting that, in the embodiment of the present application, in order to prevent the global group information check frame from not being received by all nodes, the first node may send the global group information check frame multiple times.

[0156] See also Figure 4 As shown, it is a schematic diagram of the process of global group information verification in an embodiment of the present application, and the specific process is as follows:

[0157] Step 40: The first node broadcasts a global group information check frame to each node.

[0158] Step 41: The first node waits for responses from other nodes in the Mesh network.

[0159] Step 42: The second node receives the global group information check frame.

[0160] Step 43: The second node obtains the reference information check value in the global group information check frame.

[0161] Step 44: The second node determines whether the information check value in the global group information stored by it is consistent with the reference information check value. If so, execute step 45; otherwise, execute step 46.

[0162] Step 45: The second node verification is completed.

[0163] Step 46: The second node sends a global group information error frame to the first node.

[0164] Step 47: The first node determines whether there is a global group information error frame set to reply, if so, execute step 48, otherwise, execute step 49.

[0165] Step 48: The first node starts the global group information synchronization process.

[0166] Step 49: The first node verification is completed.

[0167] Optionally, after the first node receives the global group information synchronization request sent by other devices, the global group information synchronization process is started. In an embodiment of the present application, a possible embodiment is provided for the first node to perform global group information synchronization, and the following operations are specifically performed:

[0168] Step 14: The first node receives the global group information synchronization request, and broadcasts the reference information sequence number and the content of each group information to be synchronized to each node.

[0169] The reference information serial number is the information serial number in the global group information of the first node, and the contents of each group of information to be synchronized are the contents of each group of information in the global group information of the first node.

[0170] Step 15: The second node receives the reference information sequence number and the contents of each group of information to be synchronized, and when it is determined that the reference information sequence number is greater than the information sequence number in the global group information of the second node, clears the global group information of the second node, and generates the global group information of the second node based on the reference information sequence number and the contents of each group of information to be synchronized.

[0171] In an embodiment of the present application, the second node receives a reference information sequence number and the contents of each group of information to be synchronized, and then determines whether the reference information sequence number is greater than the information sequence number in the global group information of the second node; if the reference information sequence number is greater than the information sequence number in the global group information of the second node, the global group information of the second node is cleared, and the global group information of the second node is generated based on the reference information sequence number and the contents of each group of information to be synchronized; if the reference information sequence number is not greater than the information sequence number in the global group information of the second node, the global group information synchronization is not participated in.

[0172] In this way, it can be ensured that all nodes in the entire Mesh will eventually store the latest global group information, and while updating the global group information, the consistency of each node's information is guaranteed, thereby improving the reliability of the multicast function.

[0173] In addition, it is worth noting that in an embodiment of the present application, if the global group information is relatively large, the first node can send the global group information through shards. After other nodes receive all shards, they generate their corresponding global group information to complete the synchronization of the global group information.

[0174] See also Figure 5 As shown, it is a schematic diagram of the process of synchronizing the global group information fragments in an embodiment of the present application. The specific process is as follows:

[0175] Step 50: The first node segments each group of information content and numbers each information segment.

[0176] Among them, each information fragment has its own fragment sequence number.

[0177] Step 51: The first node broadcasts a summary of global group information to each node.

[0178] The global group information summary includes: a reference information serial number, an information check value of the first node, the number of shards, a shard serial number, etc. The reference information serial number is the information serial number in the global group information of the first node.

[0179] Step 52: The first node broadcasts and sends the undelivered information fragments.

[0180] Step 53: The first node sends a missing fragment query frame.

[0181] Step 54: The first node waits for other nodes to feedback the fragment sequence number of the missing fragment.

[0182] Step 55: The first node determines whether there are missing fragments. If so, execute step 56; otherwise, execute step 57.

[0183] Step 56: The first node obtains the fragment sequence number of the missing fragment.

[0184] Step 57: The synchronization of the first node is completed.

[0185] Step 58: The second node receives the global group information summary sent by the first node.

[0186] Step 59: The second node determines whether the reference information sequence number is greater than the information sequence number in the global group information of the second node. If so, execute step 510; otherwise, execute step 515.

[0187] Step 510: The second node clears the original global group information.

[0188] Step 511: The second node receives all information fragments sent by the first node.

[0189] Step 512: The second node determines whether there are any missing fragments. If so, execute step 513; otherwise, execute step 514.

[0190] The second node determines the missing fragment based on the number of fragments and fragment sequence numbers in the global group information summary.

[0191] Step 513: The second node sends the fragment sequence number of the missing fragment to the first node.

[0192] Step 514: The second node generates and stores global group information based on the received information fragments.

[0193] Step 515: The second node global group information is synchronized successfully.

[0194] Step 515: The second node does not participate in global group information synchronization.

[0195] Optionally, in an embodiment of the present application, a multicast function can be implemented based on the global group information stored in each node, and a possible embodiment is provided for reporting multicast data packets, and the following operations are specifically performed:

[0196] Step 16: The first node sends a multicast data packet to each node.

[0197] The multicast data packet includes: a multicast address.

[0198] In the embodiment of the present application, the service layer sends a multicast data packet to the first node, and the first node broadcasts the multicast data packet to each node.

[0199] Step 17: The second node receives the multicast data packet, queries the global group information stored therein, obtains the target group information corresponding to the multicast address, and reports the multicast data packet to the application layer when it is determined that the address of the second node is in the target group information.

[0200] In an embodiment of the present application, the protocol stack layers of all nodes in the Mesh network can receive multicast data packets sent by the first node. After receiving the multicast data packet, if the address of the second node is within the target group information corresponding to the multicast address, the second node submits the multicast data packet to the application layer. If the address of the second node is not within the target group information corresponding to the multicast address, the multicast data packet is discarded.

[0201] For example, assuming that the multicast address contained in the multicast data packet is 10, the group member addresses in the target group information with the group address of 10 in the global group information stored by the second node include: 100, 101 and 102, and the address of the second node is 102, then the address of the second node is in the target group information corresponding to the multicast address, and the second node submits the multicast data packet to the application layer.

[0202] In this way, all nodes first receive the multicast data packet, and the nodes in the group corresponding to the multicast data packet filter and report it to the application layer. The complexity is small, the multicast function can be simply implemented, the occupation of system resources is saved, and it does not rely on the gateway.

[0203] See also Figure 6 As shown, it is a schematic diagram of the process of reporting multicast data packets in an embodiment of the present application, and the specific process is as follows:

[0204] Step 60: The first node generates a multicast data packet.

[0205] Step 61: The first node broadcasts a multicast data packet to each node.

[0206] Step 62: The second node receives the multicast data packet.

[0207] Step 63: The second node queries the global group information stored therein to obtain the target group information corresponding to the multicast address.

[0208] Step 64: The second node determines whether its address is in the target group information, if so, executes step 65, otherwise, executes step 66.

[0209] Step 65: Report the multicast data packet to the application layer.

[0210] Step 66: Discard the multicast data packet.

[0211] Based on the same inventive concept, the present application embodiment provides a multicast system for a Mesh network. Please refer to Figure 7 , the system comprises:

[0212] The first node 701 is used to update the global group information stored in the first node based on the generated differential group information when the global group information stored in each node in the Mesh network is consistent, and broadcast the differential group information to each node in the Mesh network, wherein the global group information stored in each node includes: information content of each group of the Mesh network;

[0213] The second node 702, different from the first node, is configured to update the global group information stored in the second node based on the received differential group information.

[0214] Based on the above embodiments, see Figure 8 Shown is a schematic diagram of the structure of an electronic device in an embodiment of the present application.

[0215] An embodiment of the present application provides an electronic device, which may include a processor 810 (Center Processing Unit, CPU), a memory 820, an input device 830 and an output device 840, etc. The input device 830 may include a keyboard, a mouse, a touch screen, etc., and the output device 840 may include a display device, such as a liquid crystal display (Liquid Crystal Display, LCD), a cathode ray tube (Cathode Ray Tube, CRT), etc.

[0216] The memory 820 may include a read-only memory (ROM) and a random access memory (RAM), and provides the processor 810 with program instructions and data stored in the memory 820. In the embodiment of the present application, the memory 820 may be used to store the program of any Mesh network multicast method in the embodiment of the present application.

[0217] The processor 810 calls the program instructions stored in the memory 820, and the processor 810 is used to execute any Mesh network multicast method in the embodiments of the present application according to the obtained program instructions.

[0218] Based on the above embodiments, in an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the multicast method of the Mesh network in any of the above method embodiments is implemented.

[0219] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0220] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0221] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0222] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0223] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A multicast method for a Mesh network, characterized in that: include: When the global group information stored in each node in the Mesh network is consistent, the first node in the Mesh network updates the global group information stored in the first node based on the generated differential group information, and broadcasts the differential group information to each node in the Mesh network, wherein the global group information stored in each node includes: the information content of each group of the Mesh network, the differential group information includes: an update operation action and an update operation address, and the update operation address includes: a group address to be updated and a group member address; A second node in the Mesh network updates the global group information stored by the second node based on the received differential group information, wherein the second node is different from the first node; The global group information stored in each node also includes: an information sequence number and an information check value; Then the second node in the Mesh network updates the global group information stored by the second node based on the received differential group information, including: The second node updates the content of each group of information in the global group information stored therein based on the update operation action and the update operation address, and increases the sequence number of the information in the global group information stored therein by 1; The second node generates a new information check value corresponding to the global group information of the second node, and updates the information check value in the global group information stored by each second node to the new information check value.

2. The method according to claim 1, characterized in that When the global group information stored in each node in the Mesh network is consistent, the first node in the Mesh network updates the global group information stored in the first node based on the generated differential group information, and before broadcasting the differential group information to each node in the Mesh network, the method further includes: The election node in the Mesh network synchronizes the global group information stored in it to each node in the Mesh network, and the information sequence number in the global group information stored in the election node is the largest.

3. The method according to claim 2, characterized in that Before the election node in the Mesh network synchronizes the stored global group information to each node in the Mesh network, the method further includes: The first node broadcasts and sends a first election request to each of the nodes, wherein the first election request includes: an information sequence number in the global group information of the first node; The second node receives the first election request, and when it is determined that the information sequence number in the global group information of the second node is greater than the information sequence number of the global group information of the first node, broadcasts a second election request to each of the nodes, and when no third election request is received within a preset time period, determines that the second node is the election node, wherein the second election request includes: the information sequence number in the global group information of the second node, and the third election request is sent by a third node in the Mesh network, and the third node is different from the second node.

4. The method according to claim 1, characterized in that After the second node in the Mesh network updates the global group information stored in the second node based on the received differential group information, the method further includes: The first node broadcasts a global group information check frame to each of the nodes, wherein the global group information check frame includes: a reference information check value, the reference information check value being an information check value in the global group information stored by the first node; The second node receives the global group information check frame, and when determining that the information check value in the global group information stored therein is inconsistent with the reference information check value, sends a global group information synchronization request to the first node.

5. The method according to claim 4, characterized in that When it is determined that the current information check value in the stored global group information is inconsistent with the reference information check value, after sending the global group information synchronization request to the first node, the method further includes: The first node receives the global group information synchronization request, and broadcasts a reference information sequence number and the content of each group of information to be synchronized to each node, wherein the reference information sequence number is the information sequence number in the global group information of the first node, and the content of each group of information to be synchronized is the content of each group of information in the global group information of the first node; The second node receives the reference information sequence number and the contents of each group of information to be synchronized, and when it is determined that the reference information sequence number is greater than the information sequence number in the global group information of the second node, clears the global group information of the second node, and generates the global group information of the second node based on the reference information sequence number and the contents of each group of information to be synchronized.

6. The method according to claim 1, characterized in that The method further comprises: The first node sends a multicast data packet to each of the nodes, wherein the multicast data packet includes: a multicast address; The second node receives the multicast data packet, queries the global group information stored therein, obtains the target group information corresponding to the multicast address, and reports the multicast data packet to the application layer when determining that the address of the second node is in the target group information.

7. A multicast system for a Mesh network, characterized in that: include: A first node is used to update the global group information stored by the first node based on the generated differential group information when the global group information stored by each node in the Mesh network is consistent, and broadcast the differential group information to each node in the Mesh network, wherein the global group information stored by each node includes: information content of each group of the Mesh network, the differential group information includes: an update operation action and an update operation address, and the update operation address includes: a group address to be updated and a group member address; a second node, different from the first node, configured to update the global group information stored by the second node based on the received differential group information; The global group information stored in each node also includes: an information sequence number and an information check value; Then, when the second node updates the global group information stored in the second node based on the received differential group information, it is specifically used to: Based on the update operation action and the update operation address, update the content of each group of information in the stored global group information, and increase the information sequence number in the stored global group information by 1; Generate a new information verification value corresponding to the global group information of the second node, and update the information verification value in the global group information stored by each second node to the new information verification value.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the method described in any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Embedded chip-based communication method for engineering equipment in steel scrap stock yard

    CN117336684A