Multicast Communication Method, Electronic Device, and Computer-Readable Storage Medium
By combining messages, using the identification information and operation commands of network nodes, the problem of devices sending messages multiple times is solved, efficient multicast communication is achieved, and time and resources are saved.
Patent Information
- Application Number
- CN202211545629.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-02
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2042-12-02
AI Technical Summary
The prior art requires the device to send messages multiple times when the device executes multiple different operation commands, resulting in excessive consumption of time and system resources.
By obtaining the node identification information and operation commands of the network node, combining them into a combined message, and broadcasting it by the gateway, the target network node executes corresponding operation commands based on the identification information.
It realizes that multiple devices can complete different actions through a single message broadcast, which reduces the number of times the devices send messages and saves time and system resources.
Smart Images

Figure CN116095162B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communications, and in particular, to a multicast communication method, an electronic device, and a computer-readable storage medium. Background Art
[0002] In network communication, devices usually communicate in the form of unicast or broadcast. In broadcast communication, all executing devices perform the same operation. In unicast communication, the communication message only takes effect on one executing device. Or the executing devices are grouped for multicast communication. Multicast communication is similar to broadcast communication, except that the target is all devices within the group. However, in some cases where there are many different operation commands and each operation command has a different execution target, that is, multiple devices execute multiple different operations, the device needs to send messages multiple times, consuming a large amount of time and system resources. Summary of the Invention
[0003] The main purpose of this application is to provide a multicast communication method, an electronic device, and a computer-readable storage medium, which can solve the technical problem of excessive message sending times consuming a large amount of time and system resources.
[0004] To solve the above technical problem, the first technical solution adopted by this application is: to provide a multicast communication method. The method includes: obtaining the node identification information of a network node in a communication system and at least two operation commands; obtaining the target node identification information of the target network node corresponding to each operation command, and combining the at least two operation commands according to the target node identification information to obtain a combined message; sending the combined message to a gateway so that the gateway broadcasts the combined message, and the target network nodes obtain the operation commands in the combined message according to their respective target node identification information and execute them.
[0005] To solve the above technical problem, the second technical solution adopted by this application is: to provide an electronic device. The electronic device includes a memory and a processor. The memory is used to store program data, and the program data can be executed by the processor to implement the method described in the first technical solution.
[0006] To solve the above technical problem, the third technical solution adopted by this application is: to provide a computer-readable storage medium. The computer-readable storage medium stores program data, which can be executed by a processor to implement the method described in the first technical solution.
[0007] The beneficial effects of the present application are as follows: Different from the prior art, the present application obtains an operation command and the node identification information of a network node in the communication system. Further, a target network node and target node identification information corresponding to the operation command are determined according to the operation command. Then, at least two operation commands are combined according to the target node identification information to obtain a combined message. Through this integration operation, multiple operation commands can be included in one combined message, and the operation commands correspond to the target node identification information, so that it can be clearly known from the message which target network nodes execute which operation commands. Then, the combined message is sent to the gateway, and the gateway broadcasts the combined message, so that the target network nodes receiving the combined message can clarify the operation commands corresponding to them according to the target node identification, thereby realizing that multiple devices can be controlled to complete different actions through one message broadcast, effectively reducing the number of messages sent by the devices, and saving the time of the message-sending devices and the consumption of system resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0009] Figure 1 It is a schematic flowchart of the first embodiment of the multicast communication method of the present application;
[0010] Figure 2 It is a schematic flowchart of the second embodiment of the multicast communication method of the present application;
[0011] Figure 3 It is a schematic flowchart of the third embodiment of the multicast communication method of the present application;
[0012] Figure 4 It is a schematic flowchart of the fourth embodiment of the multicast communication method of the present application;
[0013] Figure 5 It is a schematic flowchart of the fifth embodiment of the multicast communication method of the present application;
[0014] Figure 6 It is a schematic flowchart of the sixth embodiment of the multicast communication method of the present application;
[0015] Figure 7 It is a schematic flowchart of the seventh embodiment of the multicast communication method of the present application;
[0016] Figure 8 It is a schematic flowchart of a process of the multicast communication method of the present application;
[0017] Figure 9 It is another schematic flow diagram of the multicast communication method of this application;
[0018] Figure 10 It is a schematic structural diagram of an embodiment of an electronic device of this application;
[0019] Figure 11 It is a schematic structural diagram of an embodiment of a computer-readable storage medium of this application. Detailed implementation manners
[0020] Next, the technical solutions in the embodiments of this application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of this application.
[0021] The terms "first", "second", etc. in this application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products, or devices.
[0022] Referring to "embodiment" herein means that the specific features, structures, or characteristics described in conjunction with the embodiment can be included in at least one embodiment of this application. The phrase appears in various positions in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.
[0023] This application belongs to a multicast communication method and is applied to a communication system. The communication system includes a control node, at least one gateway, and at least two network nodes. The network nodes communicate with the control node through the gateway. The communication system can be a type of network, such as a Mesh network. A Mesh network is a topology network for multi-to-multi device communication, and multiple devices can exchange and transmit information through the Mesh network. In a Mesh network, local devices establish communication with the cloud through gateway devices, thereby forming a complete Mesh network.
[0024] Refer to Figure 1 , Figure 1 It is a schematic flow diagram of the first embodiment of the multicast communication method of this application. It includes the following steps:
[0025] S11: Obtain the node identification information of a network node in a communication system and at least two operation commands.
[0026] After the communication system is established, there are at least two network nodes in the communication system. In order to communicate with these network nodes, the control node needs to obtain the node identification information of these network nodes. The node identification information is the unique identifier of the network node in the communication system, so that the control node can distinguish the network nodes when communicating with multiple network nodes.
[0027] The operation command is operation instruction information related to the network node and input to the control node, which requires the network node to execute.
[0028] S12: Obtain the target node identification information of the target network node corresponding to each operation command, and combine at least two operation commands according to the target node identification information to obtain a combined message.
[0029] After determining the operation command, determine the execution object of the operation command according to the operation command, that is, determine which network nodes are required to execute the operation command. The network nodes that need to execute the operation are determined as the target network nodes, and the node identification information of the target network nodes is determined as the target node identification information. Determine the relationship between the operation command and the target node identification information according to the execution relationship of the operation command. Further, combine the operation commands according to the relationship between the operation command and the target node identification information to obtain a combined message containing at least two operation commands.
[0030] S13: Send the combined message to the gateway, so that the gateway broadcasts the combined message, and the target network nodes obtain the operation commands in the combined message according to their respective target node identification information and execute them.
[0031] Send the obtained combined message to the gateway, so that the gateway broadcasts the combined message, and all network nodes established a communication connection with the gateway can receive the combined message. The combined message contains at least two operation commands and the corresponding target node identification information, so that when the target network node receives the broadcast combined message, it can determine the operation command to be executed according to the matching result of its own node identification information and the target node identification information in the combined message, so as to realize that devices of multiple network nodes can execute different operations.
[0032] In this embodiment, the present application obtains an operation command and node identification information of a network node in the communication system. Further, a target network node corresponding to the operation command and target node identification information are determined according to the operation command. Then, at least two operation commands are combined according to the target node identification information to obtain a combined message. Through this integration operation, multiple operation commands can be included in one combined message, and the operation commands correspond to the target node identification information, so that it can be clearly determined from the message which target network nodes execute which operation commands. Then, the combined message is sent to the gateway, and the gateway broadcasts the combined message, so that the target network nodes receiving the combined message can clearly identify the operation commands corresponding to each of them, thereby realizing that multiple devices can be controlled to complete different actions through one message broadcast, effectively reducing the number of messages sent by the devices, and saving the time of the message-sending devices and the consumption of system resources.
[0033] Refer to Figure 2 , Figure 2 which is a schematic flow diagram of the second embodiment of the multicast communication method of the present application. This method is a further extension of step S12, and it includes the following steps:
[0034] S21: Obtain the target node identification information of the target network node corresponding to each operation command.
[0035] Determine the execution object of the operation command according to the operation command, that is, determine which network nodes are required to execute the operation command. The network nodes that need to execute the operation are determined as the target network nodes, and the node identification information of the target network nodes is determined as the target node identification information.
[0036] S22: Determine the corresponding target gateway according to the target network node.
[0037] After determining the target network nodes, it is possible to correspondingly determine which gateways the target network nodes are connected to. The gateway connected to the target network node is determined as the target gateway.
[0038] S23: Combine at least two operation commands of the target network node corresponding to the target gateway according to the target node identification information to obtain a combined message.
[0039] After determining the target network nodes and the target gateways corresponding to the target network nodes, the target network nodes connected to the same target gateway can be determined as a group. Combine at least two operation commands whose execution objects of the operation commands are the target network nodes within the same group to obtain a combined message. The combined message will be sent to the target gateway of this group, so that the target gateway can broadcast and send the combined message to these target network nodes corresponding to the operation commands in the combined message.
[0040] The gateway corresponding to the node is determined, and sending the message to this gateway can enable the node to receive the broadcast message information faster.
[0041] Refer to Figure 3 , Figure 3 is a schematic flowchart of the third embodiment of the multicast communication method of this application. This method is a further expansion of step S13, and it includes the following steps:
[0042] S31: Determine the target gateway identification information of the target gateway in the communication system.
[0043] Since there may be more than one gateway in this communication system, before sending the combined message to the gateway, it is necessary to obtain the gateway identification information of the gateway in this communication system, so that the control node can distinguish the gateways when communicating with multiple gateways. Determine the gateway corresponding to the combined message as the target gateway, and determine the gateway identification information of the target gateway as the target gateway identification information.
[0044] S32: Send the combined message to the target gateway according to the target gateway identification information.
[0045] According to the target gateway identification information, send the combined message to the target gateway corresponding to the target gateway identification information.
[0046] Refer to Figure 4 , Figure 4 is a schematic flowchart of the fourth embodiment of the multicast communication method of this application. This method is a further expansion of step S13, and it includes the following steps:
[0047] S41: Determine whether the information length of the combined message reaches a preset length threshold.
[0048] Determine whether the information length of the generated combined message reaches the preset information length threshold. The preset information length threshold is related to the load performance of the device sending the message or the protocol used. When the information length of the combined message reaches the preset length threshold, execute step S42.
[0049] S42: Send the combined message to the gateway.
[0050] When the information length of the combined message reaches the preset threshold, send out this combined message and generate the next combined message.
[0051] In one embodiment, this application is applied to Mesh networking, and the preset length threshold includes the gateway serial port message length limit threshold. Before the control node sends the combined message to the gateway, determine whether the length of the combined message exceeds the limit threshold, and if it exceeds, perform sub-packet sending.
[0052] In another embodiment, after the gateway receives the combined message, it integrates the data of the combined message and then performs broadcast transmission. Before the gateway broadcasts and sends the combined message to each network node, it also determines whether the data packet of the combined message exceeds a preset length threshold. The preset length threshold includes the length limit threshold of the Bluetooth message. Before the gateway sends the combined message to the network node, it determines whether the length of the combined message exceeds the limit threshold. If it exceeds, it performs packetized transmission.
[0053] Referring to Figure 5 , Figure 5 is a schematic flowchart of the fifth embodiment of the multicast communication method of this application. This method is a further expansion of step S13. It includes the following steps:
[0054] S51: Determine whether the cumulative time when there is no operation command in the operation command cache queue reaches a preset time threshold.
[0055] After the control node obtains the operation commands, the control node does not directly send these operation commands to the corresponding gateway. Instead, it stores the operation commands in the operation command cache queue first because it needs to perform a combination operation on them to generate a combined message.
[0056] During the process of the control node generating the combined message, the operation commands in the cache queue are combined to generate the combined message according to different operations and different execution object network nodes. During the generation process, it is judged whether there are still operation commands in the operation commands. It is judged whether the cumulative time when there is no operation command in the operation command cache queue reaches a preset time threshold. The cumulative time is a time value that starts counting from when there is no operation command in the operation command cache queue and is cleared when there is an operation command in the operation command cache queue. When the cumulative time reaches the preset time threshold, step S52 is executed.
[0057] S52: Send the generated combined message to the gateway.
[0058] When the cumulative time reaches the preset time threshold, it means that the control node has not received new operation commands during this period and there is no need to continue waiting for operation commands. Just send the already generated combined message to the corresponding target gateway.
[0059] The technical solutions of the fourth embodiment and the fifth embodiment of this application can be combined with each other to jointly determine the sending method of the combined message according to the information length of the combined message and the cumulative time when there is no operation command in the operation command cache queue.
[0060] Referring to Figure 6 , Figure 6 is a schematic flowchart of the sixth embodiment of the multicast communication method of this application. This method is a further expansion of step S13. It includes the following steps:
[0061] S61: Receive the execution result information from the target network node.
[0062] When the target network node receives the broadcast combined message, determine the operation command to be executed according to the target node identification information. After the execution is completed, return the execution result information to the corresponding gateway, and the gateway returns it to the control node to complete the information closed-loop, facilitating the further execution of subsequent operations.
[0063] S62: Synchronize the data status according to the execution result information.
[0064] The control node synchronizes the status of the data information related to the target network node according to the execution result information sent by the target network node, clarifying which target network nodes operate successfully and which target network nodes operate fails, so as to better determine and execute the subsequent operation plan.
[0065] Refer to Figure 7 , Figure 7 , which is a schematic flowchart of the seventh embodiment of the multicast communication method of this application. This method is a further extension of step S12. It includes the following steps:
[0066] S71: Generate at least one message segment corresponding to the operation command according to the operation command. The message segment includes the operation command and the target node identification information corresponding to the operation command.
[0067] S72: Combine the message segments to obtain a combined message.
[0068] Generate message segments corresponding to each operation command according to different operation commands. Each message segment includes an operation command and the target node identification information of its corresponding target network node. Concatenate these message segments into a message, and this message is the final combined message.
[0069] The following gives a specific embodiment to describe the multicast communication method of this application in more detail. Refer to Figure 8 , Figure 8 , which is a schematic flowchart of a multicast communication method of this application.
[0070] This communication system includes a control node, at least one gateway, and at least two network nodes. It includes the following steps:
[0071] S81: The control node controls the gateway and the network nodes to form a network.
[0072] The control node sends a message to establish a communication connection with the gateway and network nodes to complete network formation. Specifically, the network established between the gateway and network nodes can be a sig mesh network. During the establishment process, both the gateway and network nodes obtain unique identification information in this communication system.
[0073] S82: The network node sends node identification information.
[0074] The network node sends its own node identification information to the corresponding gateway.
[0075] S83: The gateway sends node identification information and gateway identification information.
[0076] The gateway sends the received node identification information and its own gateway identification information to the control node.
[0077] S84: The control node obtains an operation command.
[0078] S85: The control node determines the target network node and the target network node identification information.
[0079] S86: The control node combines the operation command according to the target network node identification information to obtain a combined message.
[0080] The control node determines the target network node and the target network node identification information according to the operation execution object of the obtained operation command. The operation command whose operation execution object is the network node under the same gateway is an operation command that can be combined. According to the target network node identification information and the operation command, a message segment corresponding to the operation command is generated, and the message segments are combined to obtain a combined message.
[0081] Specifically, it can be that the control node processes the operation command, extracts the device unique identification and device control information; uses a combination protocol to assemble and combine network messages; splices the device unique identifications of devices with the same execution action, and declares the number of devices, device action identification, and action information under this selection. The operation command can include various operation actions such as switch, adjustment, and setting.
[0082] S87: The control node determines the target gateway and the target gateway identification information.
[0083] Determine the gateway corresponding to the combined message, and the gateway identification information of the gateway.
[0084] S88: The control node sends the combined message.
[0085] The control node sends the combined message to the corresponding gateway according to the target gateway identification information.
[0086] S89: The gateway broadcasts the combined message.
[0087] The gateway receives the combined message and broadcasts the combined message.
[0088] Specifically, the message can be sent to the gateway Bluetooth module through channels such as the serial port for processing. The gateway Bluetooth module sends the data message to the sig mesh network through a broadcast packet via the Bluetooth mesh network.
[0089] S90: The network node parses the combined message and determines whether the target node identification information matches.
[0090] The network node receives the combined message, parses the combined message, and determines whether the target node identification information in the combined message matches its own node identification information.
[0091] S91: The network node determines that the identification information does not match and does not execute the operation command.
[0092] Network node 1 determines that its own node identification information does not match the target node identification information in the combined message, does not execute the operation command, and does not perform processing.
[0093] S92: The network node identification information matches, and the corresponding operation command is executed.
[0094] Network node 2 determines that its own node identification information matches the target node identification information in the combined message, and executes the operation command that matches its own node identification information.
[0095] The network node can receive all the broadcast messages sent by the gateway in the sig mesh network; after the network node parses the original message through the Bluetooth protocol, it hands over the data to the network node application for processing; the network node parses the message according to the combined protocol. If its unique identifier is found in the message, it executes the information carried by the message after the identifier (such as switch, adjustment, attribute setting).
[0096] S93: The network node sends the execution result information.
[0097] Network node 2 that has completed the execution of the operation command sends the execution result information to the gateway.
[0098] S94: The control node synchronizes the data status.
[0099] The control node receives the execution result information sent by the gateway and synchronizes the data status according to this information.
[0100] Some descriptions in this embodiment can be referred to the above embodiment and will not be elaborated here.
[0101] Refer to Figure 9 , Figure 9This is another schematic diagram of the multicast communication method of this application. This embodiment describes the internal process of the control node in more detail. The control node may include a user equipment terminal and a gateway master. The gateway master controls each gateway.
[0102] S100: Send a batch execution command.
[0103] Send a batch execution command to the gateway master to prompt the gateway to perform the operation of message combination.
[0104] S101: The user equipment terminal sends an operation command to the gateway master.
[0105] In one embodiment, the operation commands are as follows:
[0106] Command 1: Device A, control action X; Command 2: Device B, control action Y; Command 3: Device C, control action X; Command 4: Device A, control action Y; Command 5: Device D, control action X; Command 6: Device E, control action Y; Command 7: Device A, control action Z.
[0107] S102: The gateway master stores the operation command in the operation command cache queue.
[0108] It is convenient to traverse the operation commands in the subsequent to perform the combination of operation commands.
[0109] S103: Count the number of commands; count the operation actions; generate a command message segment, and further generate a combined message.
[0110] The gateway master counts that the total number of commands is 7, and the action statistics include three control actions of X, Y, and Z. Start to generate the combined message: Command segment 1 = command header + total number of devices (5) + total number of actions (3) + action content length; Command segment 2 = Command segment 1 + number of X devices (3) + ACD + X action; Command segment 3 = Command segment 2 + number of Y devices (3) + BAE + Y action; Command segment 4 = Command segment 3 + number of Z devices (1) + A + Z action; Command statistics completed; Final command = Command segment 4.
[0111] After traversing all the operation commands in the operation command cache queue, splice all the operation commands into the message to obtain the final combined message command segment 4. Or when the message length reaches the threshold length threshold, first send the current combined message, and splice the uncombined operation commands into the next combined message.
[0112] S104: The gateway master sends the combined message.
[0113] The gateway master sends the combined message to the gateway, and the gateway broadcasts the combined message.
[0114] S105: The network node sends the execution result information.
[0115] The target network node returns the execution result information to the gateway.
[0116] S106: Synchronize the data status.
[0117] The gateway master control and the user equipment terminal synchronize the data status according to the execution result information.
[0118] In this embodiment, the same or similar steps can be referred to the above embodiments and will not be elaborated here.
[0119] As Figure 10 shown, Figure 10 is a schematic structural diagram of an embodiment of an electronic device according to the present application.
[0120] The electronic device includes a processor 110 and a memory 120.
[0121] The processor 110 controls the operation of the electronic device. The processor 110 can also be referred to as a CPU (Central Processing Unit). The processor 110 may be an integrated circuit chip with the ability to process signal sequences. The processor 110 can also be a general-purpose processor, a digital signal sequence processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
[0122] The memory 120 stores the instructions and program data required for the operation of the processor 110.
[0123] The processor 110 is used to execute instructions to implement the methods provided by any embodiment and possible combinations of the foregoing multicast communication methods of the present application.
[0124] As Figure 11 shown, Figure 11 is a schematic structural diagram of an embodiment of a computer-readable storage medium according to the present application.
[0125] An embodiment of the readable storage medium of the present application includes a memory 210. The memory 210 stores program data, and when the program data is executed, it implements the methods provided by any embodiment and possible combinations of the multicast communication methods of the present application.
[0126] The memory 210 may include media such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc that can store program instructions. Alternatively, it may be a server storing the program instructions. The server can send the stored program instructions to other devices for execution or can execute the stored program instructions by itself.
[0127] In summary, this application obtains the operation command and the node identification information of the network node in the communication system. Further, the target network node and the target node identification information corresponding to the operation command are determined according to the operation command. Then, at least two operation commands are combined according to the target node identification information to obtain a combined message. Through this integration operation, multiple operation commands can be included in one combined message, and the operation commands correspond to the target node identification information, so that it can be clearly determined from the message which target network nodes execute which operation commands. Then, the combined message is sent to the gateway, and the gateway broadcasts the combined message, so that the target network nodes receiving the combined message can clarify the operation commands corresponding to them according to the target node identification, thereby realizing that multiple devices can be controlled to complete different actions through one message broadcast, effectively reducing the number of messages sent by the devices, and saving the time of the message-sending devices and the consumption of system resources.
[0128] This application uses the unique identifier of the network node for combined message broadcasting, integrates multiple control instructions into one for sending, reduces the occupation of network resources, and by means of broadcasting, combines the unique identifiers of the network nodes to achieve the effect of simultaneous communication control of any number of network nodes, and the control objects can be flexibly selected.
[0129] In several embodiments provided in this application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0130] The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0131] In addition, in each embodiment of the present application, each functional unit may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of a software functional unit.
[0132] If the integrated unit in the above-mentioned other embodiments is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the methods described in each embodiment 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 (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs.
[0133] The above are only the embodiments of the present application, and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present application.
Claims
1. A multicast communication method, applied to a control node in a communication system, the communication system including a control node, at least one gateway, and at least two network nodes, the gateway including a target gateway, and the network node including a target network node, characterized in that, The method includes: Obtaining node identification information of the network node in the communication system, and at least two operation commands; Obtaining target node identification information of a target network node corresponding to each operation command, and combining the at least two operation commands according to the target node identification information to obtain a combined message; Sending the combined message to the gateway, so that the gateway broadcasts the combined message, and the target network nodes obtain the operation commands in the combined message according to their respective target node identification information and execute them; Wherein, the obtaining target node identification information of a target network node corresponding to each operation command, and combining the at least two operation commands according to the target node identification information to obtain a combined message includes: Obtaining target node identification information of a target network node corresponding to each operation command; Determining a corresponding target gateway according to the target network node; Combining the at least two operation commands of the target network node corresponding to the target gateway according to the target node identification information to obtain the combined message.
2. The method according to claim 1, characterized in that, The sending the combined message to the gateway includes: Determining target gateway identification information of the target gateway in the communication system; Sending the combined message to the target gateway according to the target gateway identification information.
3. The method according to claim 1, wherein Before sending the combined message to the gateway, it includes: Judging whether the information length of the combined message reaches a preset length threshold; If so, sending the combined message to the gateway.
4. The method according to claim 1, wherein After obtaining the node identification information of the network node in the communication system, and at least two operation commands, it includes: Storing the operation commands in an operation command cache queue.
5. The method according to claim 4, characterized in that, Before sending the combined message to the gateway, it includes: Judging whether the cumulative time when the operation commands do not exist in the operation command cache queue reaches a preset time threshold, the cumulative time starts to be counted when the operation commands do not exist in the operation command cache queue, and is cleared when the operation commands exist in the operation command cache queue; If so, sending the generated combined message to the gateway.
6. The method according to claim 1, wherein After sending the combined message to the gateway, so that the gateway broadcasts the combined message, and the target network nodes obtain the operation commands in the combined message according to their respective target node identification information and execute them, it includes: Receiving execution result information from the target network nodes; Synchronizing data status according to the execution result information.
7. The method according to claim 1, characterized in that, The combining the at least two operation commands according to the target node identification information to obtain a combined message includes: Generating at least one message segment corresponding to the operation command according to the operation command, the message segment includes the operation command and the target node identification information corresponding to the operation command; Combining the message segments to obtain the combined message.
8. An electronic device, characterized in that, It includes a memory and a processor, the memory is used to store program data, and the program data can be executed by the processor to implement the method according to any one of claims 1-7.
9. A computer-readable storage medium, characterized in that, Stored with program data, which can be executed by a processor to implement the method according to any one of claims 1-7.
Citation Information
Patent Citations
Distributed Merging of datasets
CN106547811A
Multicast group management method and device, readable storage medium and computer
CN110958124A