CN113365253B - Node communication method, device, equipment, system and storage medium in network - Google Patents

Node communication method, device, equipment, system and storage medium in network Download PDF

Info

Publication number
CN113365253B
CN113365253B CN202110660986.5A CN202110660986A CN113365253B CN 113365253 B CN113365253 B CN 113365253B CN 202110660986 A CN202110660986 A CN 202110660986A CN 113365253 B CN113365253 B CN 113365253B
Authority
CN
China
Prior art keywords
node
network
information
nodes
communication protocol
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110660986.5A
Other languages
Chinese (zh)
Other versions
CN113365253A (en
Inventor
左海成
许军
秦宝星
程昊天
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Gaussian Automation Technology Development Co Ltd
Original Assignee
Shanghai Gaussian Automation Technology Development Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Gaussian Automation Technology Development Co Ltd filed Critical Shanghai Gaussian Automation Technology Development Co Ltd
Priority to CN202110660986.5A priority Critical patent/CN113365253B/en
Publication of CN113365253A publication Critical patent/CN113365253A/en
Application granted granted Critical
Publication of CN113365253B publication Critical patent/CN113365253B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/70Services for machine-to-machine communication [M2M] or machine type communication [MTC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/06Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/18Self-organising networks, e.g. ad-hoc networks or sensor networks

Abstract

The application discloses a node communication method, a device, equipment, a system and a storage medium in a network, wherein the method comprises the steps that any node determines the network node type of any node according to own node information and information of other nodes in the network; any node communicates with other nodes in the network in a first communication protocol message according to the type of the network node of the node; the first communication protocol message carries command information or state information, and the state information is related to the equipment type of any node, wherein the equipment type comprises a workstation or a cleaning robot. That is, any node can determine and update the network node type of any node through the own node information and other node information, and communicate with other nodes in the network through a first communication protocol message carrying command information or state information according to the network node type of any node.

Description

Node communication method, device, equipment, system and storage medium in network
Technical Field
The embodiment of the application relates to the field of intelligent cleaning robot communication, in particular to a node communication method, device, equipment, system and storage medium in a network.
Background
Intelligent communication and control systems between multiple robots typically include robots that perform tasks, sensors onboard the robots, and a platform control system. The communication between the multiple machines and the workstation of the intelligent robot mainly realizes handshake interaction and information transmission through the LoRa communication technology. However, the LoRa communication technology does not fully guarantee the safety and reliability of the interactive collaboration between the robot and the workstation.
Disclosure of Invention
The embodiment of the application provides a node communication method, device, equipment, system and storage medium in a network, which aim to effectively improve the safety and reliability of multi-node cooperative operation in an area and improve the flexibility of information transmission.
In a first aspect, an embodiment of the present application provides a method for node communication in a network, where the method includes:
any node determines the network node type of any node according to the information of the node and the information of other nodes in the network;
the method comprises the steps that any node communicates with other nodes in a network through a first communication protocol message according to the type of the network node of the node;
the first communication protocol message carries command information or state information, the state information is related to equipment types of any node, and the equipment types comprise workstations or cleaning robots.
By adopting the implementation manner of the embodiment, any node can determine and update the network node type of any node through own node information and other node information, and communicate with other nodes in the network through a first communication protocol message carrying command information or state information according to the network node type of the any node, so that the safety and reliability of the cooperative operation of a plurality of nodes in the area can be effectively improved, and the flexibility of information transmission can be improved.
Optionally, the determining, by the any node, the network node type of the any node according to the node information of the any node and information of other nodes in the network includes:
the distance from the other nodes to any node is respectively determined by any node according to the position information of the other nodes;
and the network node type of any node is determined by any node according to the sum of the distances, the accumulated time of any node network access and the barrier information around any node.
By adopting the technical means in the embodiment, any node can determine the network node type of the node according to the three factors of the distance sum, the network access accumulated time and the surrounding barrier information.
Optionally, the determining, by the any node, the network node type of the any node according to the sum of the distances, the accumulated time of network access of the any node, and the obstacle information around the any node includes:
the arbitrary node determines the election value of the arbitrary node in a weighted manner according to the sum of the distances, the accumulated time of the arbitrary node entering the network and the obstacle information around the arbitrary node;
the any node obtains respective election values sent by the other nodes;
comparing the election value of the node with the election value of each other node by the node;
under the condition that the election value of any node is the maximum value, the any node determines itself to be the root node in the network;
in the case that the election value of any node is not the maximum value, the any node determines that the node itself is not the root node in the network.
By adopting the technical means in the embodiment, any node can determine the election value in a weighted manner according to the sum of the distances, the network access accumulated time and surrounding barrier information, and determine whether the node is a root node in the network according to the magnitude of the election value.
Optionally, in the case that the any node determines that it is not the root node in the network, the method further comprises:
under the condition that any node sends an access request to a neighboring node in a network, the node determines itself to be a child node of the neighboring node;
or under the condition that any node receives an access request sent by a neighboring node, the any node determines itself to be a father node of the neighboring node.
By adopting the technical means in the embodiment, after any node determines that the node is not the root node in the network, the node can further determine that the node is a child node or a father node of the adjacent node.
Optionally, the any node communicates with other nodes in the network in a first communication protocol message according to its own network node type, including:
the method comprises the steps that any node constructs a first communication protocol message according to the equipment type and the current working state of the node;
and the any node sends the first communication protocol message to the child node of the any node according to the network node type of the node, and/or the father node of the any node.
Through the implementation procedure in this embodiment, the first communication protocol packet may be configured, so that any node communicates with other nodes in the network in the first communication protocol packet according to the network node type in the entire network structure.
Optionally, when the device type of the any node is a workstation, the any node constructs a first communication protocol packet according to the device type and the current working state of the any node, including:
if the current working state of any node is idle, constructing state information by the any node according to the multicast mark, the idle mark and idle data, and packaging the state information into a first communication protocol message;
or if the current working state of any node is busy, constructing state information by the any node according to the unicast flag, the busy flag and the busy data, and packaging the state information into a first communication protocol message.
By the method, the first communication protocol message can be constructed according to the equipment type and the current working state of the equipment type of any node under the condition that the equipment type of any node is a workstation.
Optionally, when the device type of the any node is a robot, the any node constructs a first communication protocol packet according to the device type and the current working state of the any node, including:
if the current working state of any node is an abnormal state, constructing state information by the any node according to the multicast mark, the state mark and the abnormal data, and packaging the state information into a first communication message;
Or if the current working state of any node is an abnormal state, constructing state information by any node according to the unicast flag, the state flag and the abnormal data, and packaging the state information into a first communication message.
By the method, the first communication protocol message can be constructed according to the equipment type and the current working state of the robot when the equipment type of any node is the robot.
Optionally, when the device type of the any node is a robot, the any node constructs a first communication protocol packet according to the device type and the current working state of the any node, including:
under the condition that the current working state of any node is low in electric quantity, the any node constructs command information according to a multicast mark, a command mark and reservation data, and encapsulates the command information into a first communication protocol message;
or under the condition that the current working state of any node is low in electric quantity, the any node constructs command information according to the unicast flag, the command flag and the reserved data, and packages the command information into a first communication protocol message.
By the method, the first communication protocol message can be constructed according to the equipment type of the node and the current low-power working state under the condition that the equipment type of any node is the robot.
Optionally, in the case that any node is a workstation, the method further includes:
under the condition that the any node receives a plurality of command information, the any node respectively constructs command response information corresponding to the plurality of command information according to the plurality of command information, and encapsulates the command response information into a first communication protocol message;
and the any node sequentially and respectively sends the first communication protocol message to the nodes sending the corresponding information according to the receiving sequence of the command information.
By the method, the workstation can respond to the corresponding sending nodes in the mode of the first communication protocol message in sequence according to the receiving sequence of the received command information.
In a second aspect, an embodiment of the present application further provides a communication apparatus in a network, where the apparatus includes:
the determining module is used for determining the network node type of the device according to the node information of the device and the information of other nodes in the network;
the communication module is used for communicating with other nodes in the network in a first communication protocol message according to the type of the network node of the device;
the first communication protocol message carries command information or state information, the state information is related to equipment type of the device, and the equipment type comprises a workstation or a cleaning robot.
Optionally, a determining module is configured to determine distances from the other nodes to the device according to the location information of the other nodes;
and determining the network node type of the device according to the sum of the distances of the devices, the accumulated network access time of the devices and the barrier information around the devices.
Optionally, a determining module, configured to determine, in a weighted manner, an election value of the device according to a sum of distances of the devices, a cumulative time of network access of the devices, and obstacle information around the devices; the respective election values sent by the other nodes are obtained, and the magnitude between the election value of the device and the respective election value of the other nodes is compared;
the determining module is further configured to determine that the device itself is a root node in the network, in the case where the election value of the device is a maximum value; and in the case that the election value of the device is not a maximum value, the determining module determines that the device itself is not a root node in the network.
Optionally, in case the apparatus is not a root node in the network, the determining module may be further configured to:
under the condition that the communication module sends an access request to a neighboring node in a network, the determination module determines that the device is a child node of the neighboring node;
Or, in the case that the communication module receives an access request sent by a neighboring node, the determining module determines that the device itself is a parent node of the neighboring node.
Optionally, the apparatus may further include: a first communication protocol message determining module;
the first communication protocol message determining module is used for constructing a first communication protocol message according to the equipment type of the device and the current working state of the device.
And the communication module is used for sending the first communication protocol message to a child node of the device according to the type of the network node of the device and/or a father node of the device.
Optionally, the first communication protocol packet determining module may be further configured to, if the device type of the apparatus is a workstation and the current working state of the apparatus is idle, construct state information according to the multicast flag, the idle flag, and idle data, and encapsulate the state information into a first communication protocol packet; or if the current working state of the device is busy, constructing state information according to the unicast flag, the busy flag and the busy data, and packaging the state information into a first communication protocol message.
Optionally, the first communication protocol packet determining module may be further configured to, if the current working state of the apparatus is an abnormal state in the case where the equipment type of the apparatus is a robot, construct state information according to the multicast flag, the state flag, and the abnormal data, and encapsulate the state information into a first communication packet; or if the current working state of the device is an abnormal state, constructing state information according to the unicast flag, the state flag and the abnormal data, and packaging the state information into a first communication message.
Optionally, the first communication protocol message determining module may be further configured to, if the device type of the apparatus is a robot, if the current working state of the apparatus is low, construct command information according to a multicast flag, a command flag, and reservation data, and package the command information into a first communication protocol message;
or if the equipment type of the device is a robot, if the current working state of the device is low in electric quantity, constructing command information according to the unicast flag, the command flag and the reservation data, and packaging the command information into a first communication protocol message.
Optionally, when the device is a workstation, the first communication protocol packet determining module may be further configured to, when the communication module receives a plurality of command information, respectively construct command response information corresponding to the plurality of command information according to the plurality of command information, and package the command response information as a first communication protocol packet;
optionally, the communication module may be further configured to send the first communication protocol packet to a node that sends corresponding information sequentially according to the receiving order of the multiple command information.
In a third aspect, an embodiment of the present application further provides a communication device, including a memory, a controller, and a computer program stored in the memory and capable of running on the controller, where the controller implements the method for node communication in a network according to any one of the embodiments of the present application when executing the computer program.
In a fourth aspect, an embodiment of the present application further provides a node communication system in a network, including at least two communication nodes, where the communication nodes are configured to execute any one of the node communication methods in a network provided by the embodiments of the present application.
In a fifth aspect, an embodiment of the present application further provides a computer readable storage medium, on which a computer program is stored, which when executed by a controller, implements a method for node communication in a network according to any of the embodiments of the present application.
The application provides a node communication method, a device, equipment, a system and a storage medium in a network, wherein the method comprises the steps that any node determines the network node type of any node according to own node information and information of other nodes in the network; any node communicates with other nodes in the network in a first communication protocol message according to the type of the network node of the node; the first communication protocol message carries command information or state information, and the state information is related to the equipment type of any node, wherein the equipment type comprises a workstation or a cleaning robot. That is, any node can determine and update the network node type of any node through own node information and other node information, and communicate with other nodes in the network through a first communication protocol message carrying command information or state information according to the network node type of the any node, so that the safety and reliability of cooperative operation of a plurality of nodes in an area can be effectively improved, and the flexibility of information transmission can be improved.
Drawings
FIG. 1 is a flow chart of a method of node communication in a network in accordance with an embodiment of the present application;
FIG. 2 is a flow chart of a method of determining a network node type in an embodiment of the application;
Fig. 3 is a schematic node layout diagram of a Mesh network according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a state information structure according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a first communication protocol packet according to an embodiment of the present application;
fig. 6 is a schematic diagram of the structure of command information in the embodiment of the present application;
fig. 7 is a schematic diagram of a Mesh network topology according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a node communication device in a network according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a node communication device in another network according to an embodiment of the present application;
fig. 10 is a schematic structural view of a communication device in an embodiment of the present application;
fig. 11 is a block diagram of a computer-readable storage medium in an embodiment of the application.
Detailed Description
The application is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present application are shown in the drawings.
Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart depicts operations (or steps) as a sequential process, many of the operations can be performed in parallel, concurrently, or at the same time. Furthermore, the order of the operations may be rearranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figures. The processes may correspond to methods, functions, procedures, subroutines, and the like. Furthermore, embodiments of the application and features of the embodiments may be combined with each other without conflict.
In addition, in the embodiments of the present application, words such as "optionally" or "exemplary" are used to mean serving as examples, illustrations, or descriptions. Any embodiment or design described herein as "optional" or "exemplary" is not to be construed as preferred or advantageous over other embodiments or designs. Rather, the use of the words "optionally" or "illustratively" and the like is intended to present the relevant concepts in a concrete manner.
Fig. 1 is a flowchart of a method for node communication in a network according to an embodiment of the present application, where the embodiment of the present application is applicable to a scenario where multiple cleaning robots wirelessly communicate with multiple working stations, and the method may be performed by a node communication device in a network according to an embodiment of the present application, and the device may be implemented in software and/or hardware. In a specific embodiment, the apparatus may be integrated in a communication device. The following embodiments will be described taking the case where the apparatus is integrated in a communication device. As shown in fig. 1, the method may include, but is not limited to, the steps of:
s101, any node determines the network node type of any node according to the information of the node and the information of other nodes in the network.
Any of the above nodes may be any one of a robot or a workstation in a scenario where multiple cleaning robots and multiple workstations perform wireless communication.
Illustratively, the node information may include a sum of distances of other nodes in the network from any of the above nodes, an accumulated time of network entry of any of the nodes, obstacle information around any of the nodes, and the like.
The network node types may include root node, parent node, child node. The parent node and the child node are relatively speaking, if the current node has an upper node, the upper node can be the parent node of the current node, and the current node can be the child node of the upper node. For example, node X is connected to node Y, and node X is farther from the root node (more number of cross-connections) than node Y, node X may be a child of node Y, and node Y may be a parent of node X.
Any node can determine the type of the network node played by itself in the network through the step, namely, the node is a root node, a father node or a child node.
S102, any node communicates with other nodes in the network in a first communication protocol message according to the type of the network node.
Through the step S101, after each node in the network determines the network node type of itself in the network, the network structure of the current communication network can be determined, and then the node communicates with other nodes in the network according to the network node type of itself in the network. For example, any node may communicate with its child nodes and/or parent nodes in the network in the form of a first communication message.
Further, any node may construct the first communication protocol packet according to its own device type and the current working state. The device type of the device can comprise a workstation or a cleaning robot in the scene. For example, if any node is a workstation, the working states may include busy and idle states, and if any node is a cleaning robot, the working states may include low power, normal clean water tank, abnormal clean water tank, normal sewage tank, and abnormal sewage tank.
The embodiment of the application provides a node communication method in a network, which comprises the following steps: any node determines the network node type of any node according to the node information of the node and the information of other nodes in the network; any node communicates with other nodes in the network in a first communication protocol message according to the type of the network node of the node; the first communication protocol message carries command information or state information, and the state information is related to the equipment type of any node, wherein the equipment type comprises a workstation or a cleaning robot. That is, any node can determine and update the network node type of any node through own node information and other node information, and communicate with other nodes in the network through a first communication protocol message carrying command information or state information according to the network node type of the any node, so that the safety and reliability of cooperative operation of a plurality of nodes in an area can be effectively improved, and the flexibility of information transmission can be improved.
In one example, as shown in fig. 2, the manner of determining the network node type of any node in the step S101 may include, but is not limited to, the following steps:
s201, any node respectively determines the distance from other nodes to any node according to the position information of other nodes.
In the embodiment of the application, any node in the network can periodically multicast the own position information to other nodes in the network, and the other nodes can compare the own position information with the received position information so as to determine the distance between the own node and any node. Correspondingly, any node can acquire the position information of other nodes multicast in the network, and determine the distance from the other nodes to the node according to the acquired position information. The cycle time can be set according to the actual situation, and is not specifically set here.
Alternatively, any of the above nodes may communicate with other nodes in the network using WiFi Mesh-based networking technology, and the WiFi Mesh module may be installed in a different device (e.g., workstation, cleaning robot, etc.) to constitute a communication node in the network. The WiFi Mesh network may include a data collection layer at a bottom layer and a Mesh network layer at an upper layer, wherein the data collection layer may collect sensing data of a device (or node), and the sensing data may include a type of the device installed by the WiFi Mesh module itself, that is, a workstation or a cleaning robot, and other status data of the device, for example, whether the workstation is idle, battery power of the cleaning robot, water quantity, respective cleaning area of the robot, and cleaned area.
In addition, under the condition that the node is a cleaning robot, the cleaning robot periodically multicasts own position information to other cleaning robots in the network, each cleaning robot can compare the received position information with the own position information and judge the distance between the two, and if the distance between the two is smaller than a preset safety threshold, emergency braking measures can be adopted to ensure the communication safety of multiple cleaning robots. And moreover, the plurality of cleaning robots can acquire the cleaned areas of other cleaning robots according to the multicast information, so that repeated cleaning of the same area is avoided, and the overall cleaning efficiency is improved.
S202, any node determines the network node type of any node according to the sum of the distances, the accumulated time of any node network access and the barrier information around any node.
After any node obtains the distances between other nodes in the network and itself, the sum of the distances between other nodes in the network and itself can be determined. For example, assuming that there are a node a, a node B and a node C in the network, any node in this step is a node a, other nodes include a node B and a node C, and the distance between the node B and the node a is L BA The distance from the C node to the A node is L CA Then for the A node, the sum L of its distances A May be the sum of the distance from node B to node A and the distance from node C to node A, i.e. L A =L BA +L CA
The accumulated time of any node entering the network can be the accumulated time of the node joining the Mesh network.
Alternatively, the number, distance, size, etc. of the obstacle information around any node may be the number, distance, size, etc. of the obstacle information around the node, where the obstacle information may be obtained through an obstacle detection module (e.g., an infrared detection module, an ultrasonic detection module) installed on the node, or may be obtained through image analysis by using an image recognition module, and specific obstacle information and detection methods may be set according to an actual application scenario.
Illustratively, after any node obtains its information in the three dimensions, the election value of the node may be determined by weighting the information in the three dimensions.
For example, the number of the cells to be processed, election value of any node = sum of distances of any node + n x any node network entry accumulation time + p x any node surrounding obstacle information. Wherein, the values of m, n and p are in the range of 0 to 1, and m+n+p=1 needs to be satisfied. For example, the value of m may be 0.5, the value of n may be 0.3, and the value of p may be 0.2, and of course, each weight may be set according to the importance of the corresponding weighting factor, which is not particularly limited herein. The quantized value of the obstacle information around any node may be a negative value, that is, the more obstacles around any node are, the closer the obstacles are to the any node, the smaller the election value corresponding to the any node is.
After the election value of any node is calculated in the mode, any node in the network can multicast the election value, and the type of the network node is determined according to the magnitude value between the election value of other node multicast acquired by the node and the election value of the node. For example, if the election value of any node is the maximum of the election values of the various nodes in the network, then any node may be determined to be the root node in the network, otherwise, any node may be determined to be a non-root node in the network. Of course, the node corresponding to the minimum election value in the network may be determined as the root node in the network, and the specific determining manner is related to the specific calculating manner of the election value.
Further, in the case that any node determines that it is not a root node in the network, the network node type may also be determined according to the manner in which it accesses the network or the manner in which other nodes access the network. For example, in the case where any node sends an access request to a neighboring node in the network, i.e., any node needs to access the neighboring node, then any node determines itself to be a child node of the neighboring node. In the case that any node receives an access request sent by a neighboring node, that is, the neighboring node wants to communicate in the network by accessing the any node, the any node determines itself to be a parent node of the neighboring node.
Because each node in the network possibly leaves the coverage range of the network in the movement process, the father-son relationship of each node can be continuously updated along with the change of the node position in the network by the above-mentioned decentralization mode, so that the network paralysis problem caused by the hardware fault of a single node can be avoided on the premise of only establishing a simple network topology structure, the problem of inconvenient operation when the cleaning robot joins the network again can be well solved, the safety and the reliability of multi-node collaborative operation in the area are effectively improved, and the flexibility of information transmission is improved.
Illustratively, taking fig. 3 as an example, the arrow direction in the figure may represent the direction in which the lower node points to the upper node. For example, the C node may be a root node, the plurality of nodes are respectively connected with respective adjacent nodes, the E node may be a parent node of the B node, and the B node may be a child node of the E node, that is, a root node and a plurality of non-root nodes (including parent nodes and child nodes) form a tree network.
It should be noted that, in the initialization stage, an operator may pre-configure whether the node is a root node through an RS232 serial port, and the network node type of each node may be checked through an Application (APP), so as to ensure that only one root node exists in the Mesh network.
In one example, the manner in which the node constructs the first communication protocol packet according to its own device type and the current working state in the above process may include, but is not limited to, the following ways:
if the current working state of any node is idle, the node can provide services for a plurality of cleaning robots, and the node can construct state information according to the multicast flag, the idle flag and the idle data and package the state information into a first communication protocol message. Idle data may be understood as the ability of a workstation to provide services, for example, to provide charging services for several cleaning robots.
In contrast, if the current working state of any node is busy, that is, a part of the cleaning robot is already served, it may construct state information according to the unicast flag, the busy flag and the busy data, and encapsulate the state information into a first communication protocol packet. Wherein busy data can be understood as which cleaning robot or robots it is serving. Further, the object unicast by the node may be a cleaning robot that is not currently being serviced.
That is, in a state in which the workstation is idle, it can multicast a message that itself is currently idle to nodes in the network, and in a busy case, it informs the cleaning robot that is not providing service of its busy state in a unicast manner.
The structure of the status information is shown in fig. 4, and may include unicast/multicast flag, status flag, and status data. The status flags may include free flag, busy status, and the status data includes free data, busy data. The structure of the encapsulated first communication protocol message is shown in fig. 5, the first communication protocol message including a media access control (Media Access Control, MAC) address, a payload, and a check code.
In the case that any node is a cleaning robot and the working state thereof is low, the node may construct command information according to the multicast flag (or unicast flag), the command flag and the state data indicating the reserved charging, and encapsulate the command information into the first communication protocol packet. The first communication protocol message is sent by the cleaning robot in a multicast or unicast mode, and depends on that a plurality of workstations capable of providing service exist in the network, for example, in the case of a plurality of workstations, the cleaning robot can send the first communication protocol message in a multicast mode, and in the case of only one workstation, the cleaning robot can send the first communication protocol message in a unicast mode. The structure of the command information constructed is shown in fig. 6, and it can be understood that the payload in the first communication protocol packet is the state information or command information constructed by each node.
Further, in a case where the workstation is busy, the cleaning robot needs to reserve the queue for the workstation. For example, if the workstation receives a plurality of command information, the workstation may sequentially process the plurality of command information according to a receiving order, for example, when a certain cleaning robot can be served, construct command response information, and package the command response information into a first communication protocol message and send the first communication protocol message to the cleaning robot.
In case that the working state of the cleaning robot is an abnormal state, the cleaning robot may construct state information according to the multicast flag (or unicast flag), the state flag and the abnormal data, and package the state information into a first communication message and transmit the first communication message to a corresponding node. The anomaly data may include clear water tank anomalies, sewage tank anomalies, and so forth. For example, if it is confirmed that an abnormal state occurs in the cleaning robot during operation, and the cleaning task may be affected, the abnormal state of the cleaning robot may be multicast, and other cleaning robots may replace the cleaning task in a certain area; alternatively, if the cleaning robot receives a trigger event in the network, such as synchronizing the network time, or processing a certain message event, etc., the corresponding node may be unicast with the current abnormal state of itself informing that a certain message event cannot be processed temporarily, etc.
Because the communication process between the nodes is realized based on the first communication protocol message, after each node receives the first communication protocol message, the message can be firstly analyzed to obtain the MAC address in the message, and whether the destination MAC address in the first communication protocol message is consistent with the MAC address of the node is judged so as to ensure whether the message information is mistransmitted in the network. If the MAC addresses are consistent, comparing the check codes continuously, judging whether the information is tampered, stripping the effective load in the first communication protocol message under the condition that the MAC addresses and the check codes are consistent in double check, and executing subsequent processing, such as sending unicast information or multicast information, according to specific information in the effective load.
Through the design, in some specific cases (such as reply response or new node access to the network, etc.), the unicast mode of sending the message may effectively save the overhead of the whole network resource, and in some necessary cases (such as the current idle multicast workstation), the multicast mode of sending the message may complete the one-time transmission of the message, thereby saving the network transmission time as a whole.
In addition, in the embodiment of the present application, each network node may perform multitasking, for example, by executing an indicator task to indicate the current working state of the workstation, an indicator slow flash may indicate that the workstation is currently in an idle state, an indicator fast flash may indicate that the workstation is currently in a busy state, and meanwhile, may execute events such as updating and maintaining own routing table information, and synchronizing network time when a new node accesses the network. Each event may be of a corresponding event flag type and carried in the payload portion of the first communication protocol message.
The above-described process is described below with specific examples, for example, if there are a cleaning robot node a, a cleaning robot node D, a workstation node B, and a workstation node C in the Mesh network; an operator can configure the cleaning robot node a as a root node, the topological relation of other nodes is arbitrary, and the Mesh network topology structure can be shown in fig. 7 on the assumption that the workstation node B and the workstation node C are used as child nodes of the cleaning robot node a and the cleaning robot node D is used as a child node of the workstation node B.
The cleaning robot node A can multicast the Mesh network equipment information to other nodes in the network, and each node updates and maintains the routing table information according to the received equipment information. The cleaning robot node D may be disconnected from the communication connection with the workstation node B during the movement process, for example, the workstation node B detects that the wireless signal strength of the sub-node D is lower than the signal strength threshold, or the cleaning robot node D is turned off, the workstation node B cannot detect the signal of the sub-node D, and then the workstation node B updates its own routing table and unicasts the routing table to the root node step by step, and the root node may multicast the updated network topology information to the sub-nodes of each member, so that only necessary equipment members need to be maintained, and the off-line equipment is removed to implement quick response to external changes.
Of course, the cleaning robot node D can also be accessed into other network nodes during the movement process, for example, the cleaning robot node D is accessed into the workstation node C to become a child node of the workstation node C, and then the workstation node C can update its own routing table and transmit the routing table to the root node step by step, and the root node informs the current network specific structure of each network node in the network in a multicast manner. When the cleaning robot node D detects that the parent node C is a workstation, the node D can reserve charging to the parent node C in a multicast or unicast mode to fully utilize workstation resources if necessary.
Fig. 8 is a schematic diagram of a communication apparatus in a network, where the apparatus may be used for multi-device communication in an area, and the apparatus includes: a determining module 801 and a communication module 802;
the determining module is used for determining the network node type of the device according to the node information of the device and the information of other nodes in the network;
and the communication module is used for communicating with other nodes in the network in a first communication protocol message according to the type of the network node.
The first communication protocol message carries command information or state information, the state information is related to equipment type of the device, and the equipment type comprises a workstation or a cleaning robot.
Optionally, the determining module may be configured to determine distances from the other nodes to the device according to the location information of the other nodes, respectively; and determining the network node type of the device according to the sum of the distances of the devices, the accumulated network access time of the devices and the obstacle information around the devices.
For example, the determining module may be configured to determine the election value of the device based on a sum of distances of the devices, a cumulative time of network access of the devices, and obstacle information around the devices in a weighted manner; and acquiring the respective election values sent by other nodes, and comparing the magnitude between the election value of the device and the respective election value of the other nodes.
Under the condition that the election value of the device is the maximum value, the determining module is used for determining that the device is a root node in the network; in the case where the election value of the device is not a maximum value, the determining module is configured to determine that the device is not itself a root node in the network.
Optionally, in the case that the above device is not a root node in the network, the determining module may be further configured to determine that the device itself is a child node of a neighboring node in the case that the communication module sends an access request to the neighboring node in the network;
or, in the case that the communication module receives the access request sent by the neighboring node, the determining module determines itself to be the parent node of the neighboring node.
Optionally, as shown in fig. 9, the apparatus may further include: a first communication protocol message determination module 803;
the first communication protocol message determining module is used for constructing a first communication protocol message according to the equipment type and the current working state of the device.
Optionally, the communication module may be further configured to send the first communication protocol packet to a child node of the device and/or a parent node of the device according to a network node type of the device itself.
Optionally, the first communication protocol packet determining module may be further configured to, if the device type of the device is a workstation, if the current working state of the device is idle, construct state information according to the multicast flag, the idle flag, and the idle data, and encapsulate the state information into the first communication protocol packet; or if the current working state of the device is busy, constructing state information according to the unicast flag, the busy flag and the busy data, and packaging the state information into a first communication protocol message.
Optionally, the first communication protocol message determining module may be further configured to, if the current working state of the apparatus is an abnormal state in the case that the equipment type of the apparatus is a robot, construct state information according to the multicast flag, the state flag and the abnormal data, and package the state information into a first communication message; or if the current working state of the device is an abnormal state, constructing state information according to the unicast flag, the state flag and the abnormal data, and packaging the state information into a first communication message.
Optionally, the first communication protocol message determining module may be further configured to, if the device type of the apparatus is a robot, if the current working state of the apparatus is low, construct command information according to the multicast flag, the command flag, and the reservation data, and package the command information into the first communication protocol message;
or if the current working state of the device is low in electric quantity under the condition that the equipment type of the device is a robot, constructing command information according to the unicast flag, the command flag and the reserved data, and packaging the command information into a first communication protocol message.
Optionally, when the device is a workstation, the first communication protocol packet determining module may be further configured to, when the communication module receives the plurality of command information, respectively construct command response information corresponding to the plurality of command information according to the plurality of command information, and package the command response information into the first communication protocol packet;
optionally, the communication module may be further configured to sequentially send the first communication protocol packet to the node that sends the corresponding information according to the receiving order of the plurality of command information.
The communication device in the network can execute the node communication method in the network provided by fig. 1-7, and has the corresponding devices and beneficial effects in the method.
Fig. 10 is a schematic structural diagram of a communication node according to an embodiment of the present application, and as shown in fig. 10, the communication node includes a controller 1001, a memory 1002, an input device 1003, and an output device 1004; the number of controllers 1001 in the communication node may be one or more, and one controller 1001 is taken as an example in fig. 10; the controller 1001, memory 1002, input device 1003, and output device 1004 in the communication node may be connected by a bus or other means, in fig. 10 by way of example.
The memory 1002 is a computer-readable storage medium, and may be used to store a software program, a computer-executable program, and modules, such as program instructions/modules corresponding to the node communication method in the network in the embodiment of fig. 1 (e.g., the determining module 801, the communication module 802 of the communication device in the network). The controller 1001 executes various functional applications of the communication node and data processing by executing software programs, instructions, and modules stored in the memory 1002, that is, implements the node communication method in the network described above.
The memory 1002 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, at least one application program required for functions; the storage data area may store data created according to the use of the terminal, etc. In addition, memory 1002 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some examples, the memory 1002 may further include memory remotely located with respect to the controller 1001, which may be connected to a terminal/server through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input means 1003 may be used to receive input numeric or character information and to generate key signal inputs related to user settings of the communication node and function control. The output device 1004 may include a display device such as a display screen.
As shown in fig. 11, an embodiment of the present application also provides a computer-readable storage medium 1101 containing computer-executable instructions, which when executed by a computer processor 1102, are for performing a method of node communication in a network, the method comprising the steps shown in fig. 1, 2.
In one example, the embodiment of the present application further provides a node communication system in a network, where the system includes at least two communication nodes, where the at least two communication nodes may be workstations, and/or a cleaning robot, where any one of the two communication nodes may perform the method of node communication in the network in the embodiments of fig. 1-7 described above.
From the above description of embodiments, it will be clear to a person skilled in the art that the present application may be implemented by means of software and necessary general purpose hardware, but of course also by means of hardware, although in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to implement the method or function of the embodiments of the present application.
Note that the above is only a preferred embodiment of the present application and the technical principle applied. It will be understood by those skilled in the art that the present application is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the application. Therefore, while the application has been described in connection with the above embodiments, the application is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the application, which is set forth in the following claims.

Claims (12)

1. A method of node communication in a network, comprising:
any node determines the network node type of any node according to the information of the node and the information of other nodes in the network;
the method comprises the steps that any node communicates with other nodes in a network through a first communication protocol message according to the type of the network node of the node;
the first communication protocol message carries command information or state information, the state information is related to equipment types of any node, and the equipment types comprise a workstation or a cleaning robot;
Wherein the determining, by the any node, the network node type of the any node according to the information of the node and the information of other nodes in the network includes:
the distance from the other nodes to any node is respectively determined by any node according to the position information of the other nodes;
the network node type of any node is determined by any node according to the sum of the distances, the accumulated time of any node access to the network and the barrier information around any node; the network node types comprise a root node, a father node and a child node.
2. The method of claim 1, wherein the determining, by the any node, the network node type of the any node based on the sum of the distances, the accumulated time of network entry of the any node, and the obstacle information around the any node, comprises:
the arbitrary node determines the election value of the arbitrary node in a weighted manner according to the sum of the distances, the accumulated time of the arbitrary node entering the network and the obstacle information around the arbitrary node;
the any node obtains respective election values sent by the other nodes;
comparing the election value of the node with the election value of each other node by the node;
Under the condition that the election value of any node is the maximum value, the any node determines itself to be the root node in the network;
in the case that the election value of any node is not the maximum value, the any node determines that the node itself is not the root node in the network.
3. The method according to claim 2, wherein in case the any node determines that it is not itself a root node in the network, the method further comprises:
under the condition that any node sends an access request to a neighboring node in a network, the node determines itself to be a child node of the neighboring node;
or under the condition that any node receives an access request sent by a neighboring node, the any node determines itself to be a father node of the neighboring node.
4. A method according to any of claims 1-3, wherein said any node communicates with other nodes in the network in a first communication protocol message according to its own network node type, comprising:
the method comprises the steps that any node constructs a first communication protocol message according to the equipment type and the current working state of the node;
and the any node sends the first communication protocol message to the child node of the any node according to the network node type of the node, and/or the father node of the any node.
5. The method according to claim 4, wherein, in the case that the device type of any node is a workstation, the any node constructs a first communication protocol packet according to its device type and a current working state, including:
if the current working state of any node is idle, constructing state information by the any node according to the multicast mark, the idle mark and idle data, and packaging the state information into a first communication protocol message;
or if the current working state of any node is busy, constructing state information by the any node according to the unicast flag, the busy flag and the busy data, and packaging the state information into a first communication protocol message.
6. The method according to claim 4, wherein in the case that the device type of any node is a cleaning robot, the any node constructs a first communication protocol message according to the device type and the current working state thereof, including:
if the current working state of any node is an abnormal state, constructing state information by the any node according to the multicast mark, the state mark and the abnormal data, and packaging the state information into a first communication message;
Or if the current working state of any node is an abnormal state, constructing state information by any node according to the unicast flag, the state flag and the abnormal data, and packaging the state information into a first communication message.
7. The method according to claim 4, wherein in the case that the device type of any node is a cleaning robot, the any node constructs a first communication protocol message according to the device type and the current working state thereof, including:
under the condition that the current working state of any node is low in electric quantity, the any node constructs command information according to a multicast mark, a command mark and reservation data, and encapsulates the command information into a first communication protocol message;
or under the condition that the current working state of any node is low in electric quantity, the any node constructs command information according to the unicast flag, the command flag and the reserved data, and packages the command information into a first communication protocol message.
8. The method of claim 7, wherein the method further comprises: in the case where any of the nodes is a workstation, the method further includes:
Under the condition that the any node receives a plurality of command information, the any node respectively constructs command response information corresponding to the plurality of command information according to the plurality of command information, and encapsulates the command response information into a first communication protocol message;
and the any node sequentially and respectively sends the first communication protocol message to the nodes sending the corresponding command information according to the receiving sequence of the command information.
9. A communications apparatus in a network, comprising:
the determining module is used for determining the network node type of the device according to the node information of the device and the information of other nodes in the network;
the communication module is used for communicating with other nodes in the network in a first communication protocol message according to the type of the network node of the device;
the first communication protocol message carries command information or state information, wherein the state information is related to equipment type of the device, and the equipment type comprises a workstation or a cleaning robot;
the determining module is specifically configured to determine distances from other nodes to the device according to the position information of the other nodes; determining the type of the network node of the device according to the sum of the distances, the accumulated network access time of the device and the barrier information around the device; the network node types comprise a root node, a father node and a child node.
10. A communication device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program implements a method of communication of nodes in a network according to any of claims 1-8.
11. A node communication system in a network, comprising at least two communication nodes for performing a method of node communication in a network according to any of claims 1-8.
12. A computer readable storage medium having stored thereon a computer program, which when executed by a processor, implements a method of node communication in a network according to any of claims 1-8.
CN202110660986.5A 2021-06-15 2021-06-15 Node communication method, device, equipment, system and storage medium in network Active CN113365253B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110660986.5A CN113365253B (en) 2021-06-15 2021-06-15 Node communication method, device, equipment, system and storage medium in network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110660986.5A CN113365253B (en) 2021-06-15 2021-06-15 Node communication method, device, equipment, system and storage medium in network

Publications (2)

Publication Number Publication Date
CN113365253A CN113365253A (en) 2021-09-07
CN113365253B true CN113365253B (en) 2023-10-03

Family

ID=77534377

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110660986.5A Active CN113365253B (en) 2021-06-15 2021-06-15 Node communication method, device, equipment, system and storage medium in network

Country Status (1)

Country Link
CN (1) CN113365253B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114125996A (en) * 2021-11-25 2022-03-01 新华三技术有限公司成都分公司 Network topology structure discovery method applied to 5G small station and electronic equipment
CN114466081B (en) * 2021-12-23 2024-04-12 东莞市李群自动化技术有限公司 Method, system, equipment and storage medium for managing and controlling nodes of real-time channel group
US20230267424A1 (en) * 2022-02-23 2023-08-24 Intelligent Cleaning Equipment Holdings Co. Ltd. Systems and methods for managing robots

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105162704A (en) * 2015-09-28 2015-12-16 杭州数梦工场科技有限公司 Multicast replication method and device in Overlay network
CN107612743A (en) * 2017-10-11 2018-01-19 深圳天珑无线科技有限公司 Network topology information acquisition method and method for repairing route
CN108924768A (en) * 2018-06-13 2018-11-30 四川斐讯信息技术有限公司 The ad hoc network method and system and smart machine of a kind of smart machine
WO2019084266A1 (en) * 2017-10-26 2019-05-02 Skylo Technologies Inc. Dynamic multiple access for distributed device communication networks with scheduled and unscheduled transmissions
CN111182557A (en) * 2020-02-25 2020-05-19 广州致远电子有限公司 Tree network based detection networking system, method and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105162704A (en) * 2015-09-28 2015-12-16 杭州数梦工场科技有限公司 Multicast replication method and device in Overlay network
CN107612743A (en) * 2017-10-11 2018-01-19 深圳天珑无线科技有限公司 Network topology information acquisition method and method for repairing route
WO2019084266A1 (en) * 2017-10-26 2019-05-02 Skylo Technologies Inc. Dynamic multiple access for distributed device communication networks with scheduled and unscheduled transmissions
CN108924768A (en) * 2018-06-13 2018-11-30 四川斐讯信息技术有限公司 The ad hoc network method and system and smart machine of a kind of smart machine
CN111182557A (en) * 2020-02-25 2020-05-19 广州致远电子有限公司 Tree network based detection networking system, method and storage medium

Also Published As

Publication number Publication date
CN113365253A (en) 2021-09-07

Similar Documents

Publication Publication Date Title
CN113365253B (en) Node communication method, device, equipment, system and storage medium in network
US20130123981A1 (en) Swarm intelligence routing robot device and movement path control system using the same
US9112779B2 (en) Network system
CN103716822A (en) Monitoring method and apparatus
CN110225512B (en) Wireless resource control method and system for cellular Internet of things
CN112631725A (en) Cloud-edge-cooperation-based smart city management system and method
WO2021197353A1 (en) Data distribution method and apparatus, and device and medium
CN101483901B (en) Topology control method used for wireless sensor network middleware
CN102006610B (en) Dynamic adjustment method of nodes in Internet of Things system
CN109120446A (en) A kind of zero configuration starting method and apparatus
CN102404160B (en) Method and system for realizing intelligent monitoring
CN103259687A (en) Air traffic control data access platform in civil aviation
CN105338008A (en) Equipment scheduling method, device and system for internet of things
CN102711159A (en) ZigBee protocol-based method and system for processing lost node
CN101478489A (en) Method and system for controlling default routing notification by IS-IS protocol
CN103686675A (en) Method and device for adjacent region configuration
CN113246117A (en) Robot control method and device and building management system
CN104853323A (en) Electric power emergency rescue oriented distributed multi-link synchronous communication processing method
CN103796223B (en) Connectivity restoration method for wireless self-organized network
WO2018104273A1 (en) Method and device for obtaining resources and information of sdn networks of different operators
CN113285982A (en) IPv6 intelligent park Internet of things management method based on multi-protocol fusion
CN102802237B (en) Data forwarding controlling method and wireless common control equipment
CN102856980A (en) Method for comprehensively managing power distribution communication network
EP3370368B1 (en) Communication system, networking method and controller for application-driven network
Liu et al. A framework for dynamic updating of service pack in the internet of things

Legal Events

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