CN114513509B - MQTT-based wi-sun network data acquisition method and device - Google Patents
MQTT-based wi-sun network data acquisition method and device Download PDFInfo
- Publication number
- CN114513509B CN114513509B CN202210004679.6A CN202210004679A CN114513509B CN 114513509 B CN114513509 B CN 114513509B CN 202210004679 A CN202210004679 A CN 202210004679A CN 114513509 B CN114513509 B CN 114513509B
- Authority
- CN
- China
- Prior art keywords
- node
- network
- mqtt
- edge
- message
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/22—Parsing or analysis of headers
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The invention relates to the field of power distribution data acquisition, and provides a wi-sun network data acquisition method and device based on MQTT, which are used for solving the data communication problem between wi-sun edge networks on the basis of deploying MQTT services in the edge networks, wherein a new node is deployed between the wi-sun edge networks, the MQTT browser is deployed on the node, a master node of each edge network is used as an MQTT client, when one slave node in the edge network is used for communicating with other edge networks, a message about other edge networks can be sent to the master node of the own network, and when the master node receives that the topic sent by the slave node contains the node identifier is other network, the message is analyzed and repackaged, and the MQTT message is sent to a set root node.
Description
Technical Field
The invention relates to the field of power distribution data acquisition, in particular to a wi-sun network data acquisition method and device based on an MQTT.
Background
The wi-sun Chinese translation is an intelligent wireless network, is a collective name of a series of standard wireless communication networks based on IEEE 802.15.4 as a bottom layer protocol, the standard mainly comprises wi-sun FAN and wi-sun HAN, wherein the wi-sun HAN is mainly used in a home application scene, one-to-one or one-to-many communication is carried out by utilizing a central node and various home devices, the wi-sun FAN is mainly used in an outdoor scene, the wi-sun FAN is mainly used in an intelligent meter which needs multi-hop transmission, and intelligent street lamps and other dense urban networks.
In the wi-sun protocol, a non-storage mode of an RPL (IPv 6 Routing Protocol for Low-Power and Lossy Networks) is used for realizing a routing mechanism of the wi-sun in a low-power consumption lossy network, in the RPL non-storage mode, only a root node in each node of DODAG (Destination-oriented directed acyclic graph) stores the full routing information in the DODAG, and other nodes only store the routing information of a parent node.
In the actual wi-sun network, one DODAG is usually actually data collected on an edge in a wi-sun FAN, so that the DODAG is hereinafter referred to as an edge network, and the whole RPLInstance is composed of a plurality of edge networks.
MQTT (Message Queuing Telemetry Transport, message queue telemetry transport) is a messaging protocol under the ISO standard (ISO/IEC PRF 20922) based on the send/subscribe paradigm. It works on the TCP/IP protocol family, and is a send/Subscribe message protocol designed for remote devices with low hardware performance and in poor network conditions, in the MQTT protocol, it consists of one MQTT browser and multiple MQTT clients, in the MQTT protocol, the sender (Publish), the proxy (Broker), the subscriber (subscient). Wherein, the sender and the subscriber of the message are both clients MQTT clients, the message proxy is a server, and the sender of the message can be the subscriber at the same time.
The messages transmitted by the MQTT are divided into: topic (Topic) and load (payload), the MQTT client subscribes the related Topic to the MQTT browser to indicate which messages to receive, and when the MQTT browser receives the related Topic message sent by the MQTT client, the message is forwarded to all MQTT clients subscribed to the Topic, and the subscription/sending model of the MQTT is mainly implemented as a flow.
The MQTT provides network connection through TCP/IP, belongs to small transmission, and has small cost, so the MQTT protocol is commonly used in the Internet of things scene with poor network environment.
In the original wi-sun network, a TCP/UDP mode is adopted across the edge network, when a node in one edge network wants to communicate with other edge network nodes, an IP of a target is set, data is transmitted to an edge main node, the edge main node is connected with a main network, a message is transmitted to the main network, the main network finds out a main node corresponding to the target edge network according to a routing rule, the target main node reminds the message to a corresponding slave node, and after comparison, the original wi-sun scheme needs to route through the main network, the network can often appear unstable under the outdoor scene of power distribution acquisition, the routing rule of the main network can be complex, more resource consumption is brought, and the point-to-point communication mode is adopted, so that when certain data needs to be transmitted to a plurality of targets, the data needs to be transmitted from a source to the targets for a plurality of times.
Communication between the wi-sun edge networks is performed through TCP/IP technology, communication between the edge networks is performed through a backbone network, external routing rules can be complex, and when the nearby edge networks want to communicate, complex routing can be needed; when a certain edge network node wants to send a certain message to another edge network node in wi-sun networks, the message needs to be sent for multiple times, which causes consumption of network resources.
In view of this, overcoming the drawbacks of the prior art is a problem to be solved in the art.
Disclosure of Invention
Aiming at the defect or improvement requirement, the invention provides a wi-sun network data acquisition method and device based on MQTT in order to reduce the complexity of communication between the wi-sun edge networks and reduce network resource consumption caused by message multi-time transmission.
The invention adopts the following technical scheme:
in a first aspect, a wi-sun network data acquisition method based on MQTT includes: a master node within an edge network and a slave node within the edge network, wherein:
for a master node in the edge network and a slave node in the edge network, the master node in the edge network is used as an MQTT browser, and the slave node in the edge network is used as an MQTT client.
Preferably, a new node is deployed between edge networks as a root node, and for the root node between edge networks and a master node in the edge networks, the root node is used as an MQTT browser, and the master node of each edge network is used as an MQTT client.
Preferably, all nodes in the same edge network map their own node identities onto the same network ID, which the edge network uses for identification.
Preferably, the master node of each edge network sends the mapping relation between the node identifier and the network ID in the edge network to the root node, and the root node sends the received mapping relation to the master node in each edge network, so that the master node in each edge network stores the mapping relation between all node identifiers and the network ID.
Preferably, a slave node in the edge network sends a message to a master node in the same edge network, and the master node analyzes the obtained message to obtain a network ID and a node identifier corresponding to the target node.
Preferably, according to the network ID and the node identifier corresponding to the target node obtained by the master node analyzing the message, when the target node is a node in the same edge network, the message is pushed to the target node through the subscription relation of the MQTT.
Preferably, according to the network ID and the node identifier corresponding to the target node obtained by the master node analyzing the message, when the target node is a node in a different edge network, the master node in the edge network sends the received message to the root node.
Preferably, the root node analyzes the message to obtain a network ID and a node identifier corresponding to the target node, and sends the message to a master node in an edge network where the corresponding target node is located.
Preferably, a master node in the edge network where the target node is located analyzes the received message to obtain a node identifier corresponding to the target node, and pushes the message to the target node through the subscription relationship of the MQTT.
In a second aspect, the present invention further provides a wi-sun network data acquisition device based on an MQTT, configured to implement the wi-sun network data acquisition method based on the MQTT in the first aspect, where the device includes:
at least one processor, and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the processor, and are used for executing the wi-sun network data acquisition method based on the MQTT.
The invention provides a wi-sun network data acquisition method and device based on MQTT, which greatly reduce the complexity of communication between wi-sun edge networks and reduce network resource consumption caused by message repeated transmission.
Drawings
In order to more clearly illustrate the technical solution of the embodiments of the present invention, the drawings that are required to be used in the embodiments of the present invention will be briefly described below. It is evident that the drawings described below are only some embodiments of the present invention and that other drawings may be obtained from these drawings without inventive effort for a person of ordinary skill in the art.
FIG. 1 is a conceptual diagram of a wi-sun network data acquisition method based on MQTT provided by an embodiment of the invention;
FIG. 2 is a schematic flow chart of a wi-sun network data acquisition method based on MQTT provided by the embodiment of the invention;
FIG. 3 is a schematic flow chart of a wi-sun network data acquisition method based on MQTT provided by the embodiment of the invention;
FIG. 4 is a load diagram of a wi-sun network data acquisition method based on MQTT provided by the embodiment of the invention;
FIG. 5 is a schematic flow chart of a wi-sun network data acquisition method based on MQTT provided by the embodiment of the invention;
FIG. 6 is a conceptual diagram of a wi-sun network data acquisition method based on MQTT provided by the embodiment of the invention;
FIG. 7 is a schematic flow diagram of a wi-sun network data acquisition method based on MQTT according to the embodiment of the present invention;
FIG. 8 is a schematic flow diagram of a wi-sun network data acquisition method based on MQTT provided by the embodiment of the invention;
FIG. 9 is a schematic flow chart of a wi-sun network data acquisition method based on MQTT provided by the embodiment of the invention;
fig. 10 is a schematic device diagram of a wi-sun network data acquisition device based on MQTT according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
In the description of the present invention, the terms "inner", "outer", "longitudinal", "transverse", "upper", "lower", "top", "bottom", etc. refer to an orientation or positional relationship based on that shown in the drawings, merely for convenience of describing the present invention and do not require that the present invention must be constructed and operated in a specific orientation, and thus should not be construed as limiting the present invention.
In addition, the technical features of the embodiments of the present invention described below may be combined with each other as long as they do not collide with each other.
Example 1:
the embodiment 1 of the invention provides a wi-sun network data acquisition method based on MQTT, aiming at node information states in an edge network, MQTT service is deployed in the edge network, because a child node in the edge network only stores route information of a father node, when one node in the edge network wants to communicate with other nodes, the child node can communicate with the other nodes only through a master node, therefore, MQTT protocol is deployed in the edge network, more resource consumption is not increased, when a slave node communicates with other slave nodes in the same edge network, related message subjects are sent to the master node in the same edge network, and other slave nodes receive messages sent by the master node by subscribing related subjects.
The MQTT protocol is deployed in the edge network, so that all the information related to the transmission between the nodes is transmitted through the MQTT protocol of the edge network.
As shown in fig. 1, on the basis of deploying MQTT service in an edge network, in order to solve the problem of data communication between wi-sun edge networks, a new node is deployed between wi-sun edge networks as a root node, and a MQTT cross-edge network data acquisition method based on wi-sun network is provided, which includes: root node 101 between edge networks, edge network 102, master node 103 within the edge network, and slave node 104 within the edge network, wherein:
a new node is deployed between edge networks to serve as a root node, slave nodes in the edge networks send messages targeted to nodes in other edge networks to a master node in the same edge network, the master node in the edge network sends the received messages to the deployed root node, and the root node sends the received messages to target nodes in the corresponding edge network.
And setting a root node outside all the edge networks, wherein the root node corresponds to a group of MQTs formed by the main nodes in each edge network, and compared with the MQTs formed by the main nodes and the auxiliary nodes in the edge network, the MQTs formed by the root node and the main nodes of each edge network are higher by one level, and the message interaction between different edge networks is carried out through the communication between each edge network and the root node.
As shown in fig. 1, for a root node between edge networks and a master node within an edge network, the root node acts as an MQTT broker; the master node of each edge network is used as an MQTT client and is used as an MQTT of one level; for a master node in the edge network and a slave node in the edge network, the master node in the edge network is used as an MQTT browser, and the slave node in the edge network is used as an MQTT client and is used as an MQTT of a higher level.
The MQTT broker is a message proxy and is used as a server for loading and analyzing the message after receiving the message; MQTT client is the sender and subscriber of the message.
According to the subscription relation of the MQTT, if the slave node is to receive the message from the master node, the target node needs to subscribe to the master node in the same edge network, if the master node is to receive the message from the root node, the target node needs to subscribe to the root node, and only when the subscription relation is established, the transmitting end can transmit the message to the subscription end;
thus, for the root nodes between the edge networks and the master nodes in the edge networks, the master node in each edge network as an MQTT client subscribes to the root node as an MQTT browser; for a master node in the edge network and a slave node in the edge network, the slave node in the edge network as an MQTT client subscribes to the master node in the edge network as an MQTT browser.
In order to facilitate the identification call to each edge network, the following preferred design exists in the scheme, node identifiers of all nodes in the edge network are mapped to a unique network ID, and each edge network corresponds to only one master node, so that the edge network can use the network ID mapped with the node identifiers of all nodes in the edge network to identify the call.
The node identifier is a unique identifier which comprises node IP or node serial number and the like and can distinguish the nodes, and under the condition that the MQTT subscription relation between the root node and the main node is established, the root node knows that the target node is in the edge network by obtaining the node identifier of the target node, and sends the message to the main node in the corresponding edge network.
Further, when a call is required to identify a slave node in an edge network, the following preferred design exists for the solution, where each slave node in the edge network identifies the call by a node identification.
Thus, each target node within the edge network can be determined by the network ID and node identification
When the original wi-sun network is built, preparation is made for identifying the node identifiers written in the messages after the subsequent edge network master node receives the messages, and the mapping relation between the node identifiers of all the nodes in each edge network and the network IDs is required to be stored in advance, so that the corresponding target network IDs can be obtained according to the node identifiers after the target messages are received, and the corresponding target edge network and the target nodes can be found, therefore, the scheme has the following preferable design:
as shown in fig. 2, the master node of each edge network needs to send the mapping relationship between the node identifier of the edge network and the network ID to the set root node serving as the MQTT reader, and then the root node sends the mapping relationship to the master node in each edge network, so that the master node in each edge network stores the mapping relationship between all node identifiers and the network ID;
in step 201, node identities of all nodes in the edge network are mapped to a unique network ID (i.e., the ID of the edge network);
in step 202, the mapping relationship between the node identifiers of all the nodes in the edge network and the network is sent to the set root node serving as the MQTT reader;
in step 203, the set root node receives mapping relations between node identifiers and network IDs reported by master nodes in all edge networks, and sends the mapping relations to the master nodes in all edge networks;
in step 204, the master node in the edge network stores the mapping relationship between all the received node identifiers and the network IDs, and requests the set root node for subscription of the corresponding message with the own network ID, so as to receive the corresponding message subsequently.
When there is a message to be sent from a slave node in the edge network, as shown in fig. 3;
the message needs to write the node identifier of the corresponding target node to be sent into the message theme so as to enable the set root node and the master node in the edge network to identify and send the node identifier to the corresponding target node, so that the following preferable design exists in the scheme:
in step 301, the node identifiers of the target nodes corresponding to the message are written into the message theme, where if the message needs to be sent to multiple target nodes, multiple node identifiers may be combined and written into the message theme, where the specific combination manner is as follows:
when the IP in the node identifier needs to be the target node IP writing message subject of IP1 and IP2, the writing manner may be "x"/IP 1_ip2 "/" (wherein "x" represents a subject field having another meaning that is actually used);
the above method for combining the plurality of node identifiers into the message is merely an example, and can be designed and selected according to the judgment of the person skilled in the art during actual use, and the method should not limit the protection scope of the present patent.
Because if the master node directly finds the target node according to the node identification, the message communication between the edge networks is completed by the master node in each edge network, and when the message needs to be sent to a plurality of target nodes, the sender master node sends a plurality of messages to each target edge network master node, so that the pressure of the master node is overlarge; the scheme adopts the MQTT between edge networks, and the master node only needs to send once, and the actual multiple sending is completed by the root node, so that the pressure of each master node is reduced; the MQTT message needs the topic identification, and the corresponding node is found after the topic identification, so the invention also relates to the following preferred design:
in step 302, since the node identifier of the target node is mapped to only one network ID, after receiving the message sent by the slave node, the master node in the edge network analyzes the message according to the relationship between the node identifier stored in advance received from the root node and the network ID to obtain the network ID and the node identifier of the corresponding target node, and encapsulates the network ID and the node identifier into a load or a theme;
the encapsulation is preferably to encapsulate the node identification and the network ID of the resolved party, which is preferably the target node for receiving the message, into the load of the resolved party, and the resolved party is preferably the master node or the root node.
In step 303, the master node stores the network ID and the node identifier in a new load, and the specific package form is shown in fig. 4, and sends the network ID and the node identifier to the root node disposed between the edge networks.
Wherein fig. 4 is a specific encapsulated form of a master node, the subject matter shown in fig. 4 is preferably written into a command of the master node for sending a message to a root node, the load preferred encapsulated content shown in fig. 4 is a node identification and a network ID of a target node parsed from the message, and the original communication load preferred encapsulated content shown in fig. 4 is body data of the message.
When the root node receives the message sent by the master node in the edge network, as shown in fig. 5;
in step 501, after a root node set between edge networks receives a message sent by a master node in an edge network, the root node finds a network ID and a node identifier of a corresponding target edge network according to load content in the received message;
in the conventional scheme, when a message needs to be sent to a plurality of targets, the message needs to be sent to different target nodes for a plurality of times, which brings more resource consumption, in the scheme, when the network ID and the node identifier are written in the theme of the sent message, the scheme supports that the plurality of network IDs and the node identifier are written in the theme of the message, so the scheme also supports that the root node receives a message and sends the message to more than one target nodes, and in particular:
in step 502, when the root node parses the network ID and the node identifier in the received message, if the number of the network ID and the node identifier is greater than one, it represents that there are more than one target nodes that need to receive the message, and the root node copies the received message to a corresponding number greater than one;
in step 503, the root node sends a message to a master node of a corresponding target edge network according to the parsed network ID;
in step 504, the master node parses the received message to obtain a corresponding node identifier of the received message, and finds a target node;
in step 505, the master node pushes the message to the target node in the same edge network through the subscription relationship of MQTT.
Example 2:
the embodiment 2 of the invention provides a wi-sun network data acquisition method based on MQTT, and compared with the embodiment 1, the embodiment 2 shows the implementation flow of the scheme from a more specific scene.
As shown in fig. 6, in the present embodiment, the n1 node transmits a message to the n2 node;
as shown in fig. 7, the specific flow is as follows:
in step 701, mapping node identifiers and network IDs by the master node in all edge networks, and sending the mapping relationship to root nodes set between the edge networks;
in step 702, after receiving the mapping relation between each node identifier and the network ID, the root node sends the mapping relation to all edge networks;
in step 703, all the master nodes in the edge network acquire the mapping relationship between the node identifier and the network ID, where the network ID of the master node in the edge network requests subscription of the corresponding message from the set root node;
in step 704, since the n1 node is to send a message to the n2 node, the node identifier of the n2 node is written into the message topic;
in step 705, the n1 node sends the message to a master node in the same edge network, and the master node analyzes the received message to obtain a corresponding node identifier and a network ID, so as to find a target node n1;
in step 706, the master node discovers that the target node is a node in the same edge network, and pushes the message to the target node n2 through the subscription relationship of the MQTT.
Example 3:
the embodiment 3 of the invention provides a wi-sun network data acquisition method based on MQTT, and compared with the embodiment 1, the embodiment 3 shows the implementation flow of the scheme from a more specific scene.
As shown in fig. 6, in the present embodiment, the n1 node transmits a message to the n3 node;
as shown in fig. 8, the specific flow is as follows:
in step 801, a master node in all edge networks maps node identifiers with network IDs, and sends the mapping relationship to root nodes set between the edge networks;
in step 802, after receiving the mapping relation between each node identifier and the network ID, the root node sends the mapping relation to all edge networks;
in step 803, all the master nodes in the edge network acquire the mapping relationship between the node identifier and the network ID, and the network ID of the master node in the edge network requests the subscription of the corresponding message from the set root node.
In step 804, since the n1 node is to send a message to the n3 node, the node identifier of the n3 node is written into the message topic;
in step 805, the n1 node sends the message to a master node in the same edge network, the master node analyzes the received message to obtain a corresponding network ID, and discovers that the corresponding network ID is not the same edge network, and the master node stores the network ID into a load and sends the network ID to the root node;
in step 806, the root node receives the message, analyzes the load content to obtain a network ID, determines a target edge network, and sends the message containing the network ID to a master node of the edge network corresponding to the n3 node;
in step 807, after receiving the message, the master node of the edge network corresponding to the n3 node parses the message to obtain the node identifier of the target node, finds the target node n1, and pushes the message to the target node n3 of the same edge network according to the subscription relationship of the MQTT.
Example 4:
the embodiment 3 of the invention provides a wi-sun network data acquisition method based on MQTT, and compared with the embodiment 1, the embodiment 3 shows the implementation flow of the scheme from a more specific scene.
As shown in fig. 6, in the present embodiment, the n1 node sends a message to the n2 node, the n3 node, the n4 node, and the n5 node;
as shown in fig. 9, the specific flow is as follows:
in step 901, mapping node identifiers and network IDs by a master node in all edge networks, and sending the mapping relationship to root nodes arranged between the edge networks;
in step 902, after receiving the mapping relation between each node identifier and the network ID, the root node sends the mapping relation to all edge networks;
in step 903, all the master nodes in the edge network acquire the mapping relationship between the node identifier and the network ID, where the network ID of the master node in the edge network requests the subscription of the corresponding message from the set root node.
In step 904, since the n1 node is to send a message to the n2 node, the n3 node, the n4 node and the n5 node, the node identification combinations of the n2 node, the n3 node, the n4 node and the n5 node are written into the message theme;
in step 905, the n1 node sends the message to a master node in the same edge network, and the master node analyzes the mapping relationship between the node identifier and the network ID in the subject of the received message, where the master node discovers that the n2 node is a node in the same edge network, and the master node directly sends the message to the n2 node; the network IDs corresponding to other target nodes n3, n4 and n5 are found to be not the same edge network as the n1 node, and the master node stores the network IDs corresponding to the n3, n4 and n5 nodes into a load and sends the load to a root node;
in step 906, the root node receives the message, analyzes the load content to obtain a network ID, then determines a target edge network, and sends the message containing the network ID to a master node of the edge network corresponding to the n3 node, the n4 node and the n5 node;
in step 907, after receiving the message, the master node of the edge network corresponding to the n3 node, the n4 node and the n5 node analyzes the message to obtain the node identifier of the target node, finds the n3 node, the n4 node and the n5 node of the target node, and pushes the message to the n3 node, the n4 node and the n5 node of the corresponding target node according to the subscription relationship of the MQTT.
Example 5:
fig. 10 is a schematic diagram of an architecture of a wi-sun network data acquisition device based on MQTT according to an embodiment of the present invention. The wi-sun network data collection method recommendation device based on the MQTT of the present embodiment includes one or more processors 1001 and a memory 1002. In fig. 10, a processor 1001 is taken as an example.
The processor 1001 and the memory 1002 may be connected by a bus or otherwise, for example in fig. 7.
The memory 1002 is used as a non-volatile computer readable storage medium for storing non-volatile software programs and non-volatile computer executable programs, such as the MQTT-based wi-sun network data acquisition method in example 1. The processor 1001 executes the MQTT-based wi-sun network data acquisition method by running nonvolatile software programs and instructions stored in the memory 1002.
The 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 embodiments, memory 1002 may optionally include memory located remotely from processor 1001, such remote memory being connectable to processor 1001 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 program instructions/modules are stored in the memory 1002, which when executed by the one or more processors 1001, perform a MQTT-based wi-sun network data collection method in embodiment 1 described above, for example, performing the steps described above in fig. 2, 3 and 5, and also in fig. 7 to 9.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, and alternatives falling within the spirit and principles of the invention.
Claims (6)
1. The wi-sun network data acquisition method based on the MQTT is characterized by comprising the following steps of: a master node within an edge network and a slave node within the edge network, wherein:
for a master node in the edge network and a slave node in the edge network, the master node in the edge network is used as an MQTT browser, and the slave node in the edge network is used as an MQTT client;
a new node is deployed between edge networks to serve as a root node, the root node between the edge networks and a main node in the edge networks serve as MQTT browser, and the main node of each edge network serves as an MQTT client;
all nodes in the same edge network map own node identification to the same network ID, and the edge network uses the network ID for identification; the main node of each edge network sends the mapping relation between the node identification and the network ID in the edge network to the root node, and the root node sends the received mapping relation to the main node in each edge network, so that the main node in each edge network stores the mapping relation between all the node identifications and the network ID;
and when the target node is a node in different edge networks, the master node in the edge network sends the received message to the root node.
2. The wi-sun network data acquisition method based on the MQTT according to claim 1 is characterized in that a slave node in an edge network sends a message to a master node in the same edge network, and the master node analyzes the obtained message to obtain a network ID and a node identifier corresponding to a target node.
3. The wi-sun network data acquisition method based on the MQTT according to claim 2 is characterized in that according to the network ID and the node identification corresponding to the target node obtained by analyzing the message by the master node, when the target node is a node in the same edge network, the message is pushed to the target node through the subscription relation of the MQTT.
4. The MQTT-based wi-sun network data acquisition method of claim 1, wherein the root node parses the message to obtain a network ID and a node identifier corresponding to the target node, and sends the message to a master node in an edge network where the corresponding target node is located.
5. The wi-sun network data acquisition method based on the MQTT according to claim 4 is characterized in that a master node in an edge network where the target node is located analyzes received information to obtain a node identifier corresponding to the target node, and pushes the information to the target node through a subscription relation of the MQTT.
6. The wi-sun network data acquisition device based on the MQTT is characterized by comprising at least one processor and a memory in communication connection with the at least one processor, wherein the MQTT cross-edge network data acquisition device based on the wi-sun network comprises a first data acquisition device and a second data acquisition device; wherein the memory stores instructions executable by the at least one processor for performing the MQTT-based wi-sun network data acquisition method of any one of claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210004679.6A CN114513509B (en) | 2022-01-04 | 2022-01-04 | MQTT-based wi-sun network data acquisition method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210004679.6A CN114513509B (en) | 2022-01-04 | 2022-01-04 | MQTT-based wi-sun network data acquisition method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114513509A CN114513509A (en) | 2022-05-17 |
CN114513509B true CN114513509B (en) | 2023-05-16 |
Family
ID=81550668
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210004679.6A Active CN114513509B (en) | 2022-01-04 | 2022-01-04 | MQTT-based wi-sun network data acquisition method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114513509B (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109245933A (en) * | 2018-09-21 | 2019-01-18 | 西北大学 | One kind calculating environmental resource towards cloud combination of edge and finds method |
CN109428922A (en) * | 2017-08-29 | 2019-03-05 | 华为技术有限公司 | A kind of subscription dissemination method and server |
CN112261080A (en) * | 2020-09-14 | 2021-01-22 | 国网江苏省电力有限公司信息通信分公司 | Edge Internet of things agent method applied to power Internet of things |
CN112737936A (en) * | 2020-12-31 | 2021-04-30 | 青岛鹏海软件有限公司 | Edge computing gateway for equipment pre-maintenance |
CN112799789A (en) * | 2021-03-22 | 2021-05-14 | 腾讯科技(深圳)有限公司 | Node cluster management method, device, equipment and storage medium |
WO2021092441A1 (en) * | 2019-11-07 | 2021-05-14 | Idac Holdings, Inc. | Address change notification associated with edge computing networks |
CN113162970A (en) * | 2021-01-27 | 2021-07-23 | 中央财经大学 | Message routing method, device, equipment and medium based on publish/subscribe model |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10601664B2 (en) * | 2017-04-28 | 2020-03-24 | Cisco Technology, Inc. | Dynamic network and security policy for IoT devices |
-
2022
- 2022-01-04 CN CN202210004679.6A patent/CN114513509B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109428922A (en) * | 2017-08-29 | 2019-03-05 | 华为技术有限公司 | A kind of subscription dissemination method and server |
CN109245933A (en) * | 2018-09-21 | 2019-01-18 | 西北大学 | One kind calculating environmental resource towards cloud combination of edge and finds method |
WO2021092441A1 (en) * | 2019-11-07 | 2021-05-14 | Idac Holdings, Inc. | Address change notification associated with edge computing networks |
CN112261080A (en) * | 2020-09-14 | 2021-01-22 | 国网江苏省电力有限公司信息通信分公司 | Edge Internet of things agent method applied to power Internet of things |
CN112737936A (en) * | 2020-12-31 | 2021-04-30 | 青岛鹏海软件有限公司 | Edge computing gateway for equipment pre-maintenance |
CN113162970A (en) * | 2021-01-27 | 2021-07-23 | 中央财经大学 | Message routing method, device, equipment and medium based on publish/subscribe model |
CN112799789A (en) * | 2021-03-22 | 2021-05-14 | 腾讯科技(深圳)有限公司 | Node cluster management method, device, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN114513509A (en) | 2022-05-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109391500B (en) | Configuration management method, device and equipment | |
CN105577736B (en) | A kind of electric line carrier communication terminal control mechanism, system and method | |
CN111835837B (en) | Message pushing method and system with multi-terminal adaptation | |
Chen et al. | Converging MQTT resources in ETSI standards based M2M platform | |
US10813032B2 (en) | Systems and methods for neighboring node discovery in a network | |
CN108139920A (en) | Method, equipment and the system of the proxy server management based on information centre's networking (ICN) are used in dynamic condition and under becoming constraint | |
KR20170096632A (en) | Assignment of tenancy to devices | |
CN113596017B (en) | Protocol analysis method and device, soft gateway and storage medium | |
CN114157692A (en) | Multi-source polymorphic mass heterogeneous terminal universal access interconnection protocol conversion method and system | |
CN113010333A (en) | Multi-scene inter-process communication method suitable for Linux server cluster | |
KR102025631B1 (en) | Gateway server for relaying between iot device on non-tcp/ip network and iot server based on onem2m and method thereof | |
Azzara et al. | The icsi m2m middleware for iot-based intelligent transportation systems | |
WO2020214469A1 (en) | Efficient message transmission and loop avoidance in an rpl network | |
CN110888329A (en) | Intelligent home platform with open access of equipment manufacturer and data processing method thereof | |
CN110247926A (en) | A kind of exchange method and system | |
CN114513509B (en) | MQTT-based wi-sun network data acquisition method and device | |
CN212623734U (en) | Intelligent home system based on LoRa | |
CN106657377B (en) | A kind of WIA-PA/ interconnects manufacture network information service adapter and implementation method entirely | |
CN108566441B (en) | Method for processing data by NAS device, NAS device and medium | |
CN104836678A (en) | Message transmission method based on network selection and time arrangement, and node equipment | |
Li et al. | Efficient oneM2M protocol conversion platform based on NB-IoT access | |
Vahidnia et al. | Cellular Internet of Things for practitioners | |
CN107801207B (en) | Data transmission method and system in wireless multimedia sensor network | |
CN102694773A (en) | Method for IPv6 wireless sensor network to access to present network | |
CN102694774A (en) | A design method of an IPv6 micro protocol stack |
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 |