[go: up one dir, main page]

CN103686696B - A kind of method for sending data, gateway and sensor node - Google Patents

A kind of method for sending data, gateway and sensor node Download PDF

Info

Publication number
CN103686696B
CN103686696B CN201210349114.8A CN201210349114A CN103686696B CN 103686696 B CN103686696 B CN 103686696B CN 201210349114 A CN201210349114 A CN 201210349114A CN 103686696 B CN103686696 B CN 103686696B
Authority
CN
China
Prior art keywords
node
external server
network
address
mapping
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
CN201210349114.8A
Other languages
Chinese (zh)
Other versions
CN103686696A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201210349114.8A priority Critical patent/CN103686696B/en
Publication of CN103686696A publication Critical patent/CN103686696A/en
Application granted granted Critical
Publication of CN103686696B publication Critical patent/CN103686696B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

本发明公开了一种发送数据的方法,网关和传感器节点,属于通信技术领域。所述方法包括:接收传感器节点向映射节点发送的数据,所述数据中携带所述映射节点的节点地址;在预先存储的映射节点与外部服务器的对应关系中查询所述映射节点的节点地址对应的外部服务器的地址,并根据查询到的所述外部服务器的地址将所述数据发送给所述外部服务器。通过预先建立外部服务器在网络中的映射节点,实现了外部服务器与内网中传感器节点之间通过网关传送数据时,传感器节点可以预先获知主动上报信息的外部服务器对应的映射节点的信息,使得整个通信过程更加透明,提高了网络中传感器与外部服务器之间在复杂的网络通信过程的安全性。

The invention discloses a method for sending data, a gateway and a sensor node, belonging to the technical field of communication. The method includes: receiving the data sent by the sensor node to the mapping node, the data carrying the node address of the mapping node; querying the correspondence between the node address of the mapping node in the pre-stored correspondence between the mapping node and the external server address of the external server, and send the data to the external server according to the queried address of the external server. By pre-establishing the mapping node of the external server in the network, when data is transmitted between the external server and the sensor node in the intranet through the gateway, the sensor node can know in advance the information of the mapping node corresponding to the external server that actively reports the information, so that the entire The communication process is more transparent, which improves the security of the complex network communication process between the sensor in the network and the external server.

Description

Data sending method, gateway and sensor node
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method for sending data, a gateway, and a sensor node.
Background
The wireless sensor network is a wireless network formed by a large number of static or mobile internal sensor nodes in the network in a self-organizing and multi-hop mode, and aims to cooperatively sense, acquire, process and transmit monitoring information in a network coverage geographical area, and report the monitoring information to an external server for analysis and processing through gateway equipment. In the working process of the gateway, an external server needs to be corresponded with an internal sensor node, so that the data of the sensor node is sent to the server through the gateway.
In the prior art, two situations exist when a sensor node sends data to an external server. The first method is that the sensor node sends feedback data when feeding back the query information sent by the external server, and the process is as follows: the external server sends the query information to the gateway, the gateway queries in the corresponding relation between the external server and the internal sensor node which are stored in advance, and if the target internal sensor node exists, the query information is sent to the internal sensor node; and after the internal sensor node finishes the query task, sending the result to the gateway, querying the address of the external server by the gateway through the corresponding relation between the external server and the internal sensor node which is stored in advance, and returning the query result to the external server. The second is that the sensor node actively reports the monitoring data to an external server, and the process is as follows: the sensor node sends the reported monitoring data to the gateway, the gateway inquires the address of the server receiving the monitoring data from the corresponding relation between the external server and the internal sensor node which is stored in advance, and reports the monitoring data to the external server according to the address of the external server.
In the process of implementing the invention, the inventor finds that the prior art has at least the following problems:
the sensor node sends data to the external server, and no matter whether the data is passively fed back to the external server or actively reported to the external server, the sensor node can not determine the relevant information of the external server and the corresponding service type information, only sends the data to the gateway, the gateway inquires through the corresponding relation between the external server and the sensor node, and then sends the data to the inquired external server. Due to the asymmetric network transparency, the sensor node cannot know the information of the external server sending the query information, so that the security of returning the information to the external server cannot be judged, and the asymmetric network transparency is a restriction on security performance for more and more complex application requirements and high-performance nodes.
Disclosure of Invention
In order to solve the problem of performance restriction caused by information opaqueness when an intranet sensor and an extranet server transmit data in the prior art, the embodiment of the invention provides a data sending method, a gateway and a sensor node. The technical scheme is as follows:
in one aspect, a method for transmitting data is provided, and the method includes:
receiving data sent by a sensor node to a mapping node, wherein the data carries a node address of the mapping node;
and inquiring the address of an external server corresponding to the node address of the mapping node in a pre-stored corresponding relation between the mapping node and the external server, and sending the data to the external server according to the inquired address of the external server.
In another aspect, a method of transmitting data is provided, the method including:
receiving second query information forwarded by a gateway, wherein the second query information carries a node address of a mapping node for sending the second query information;
judging whether the node address of the mapping node sending the second query information carried in the second query information is the node address of the mapping node which is in the broadcast information sent by the gateway and is in accordance with the monitoring data type of the mapping node in advance;
if so, returning feedback data corresponding to the second query information to the gateway, wherein the feedback data carries the node address of the mapping node corresponding to the server receiving the feedback data in the network, so that the gateway forwards the feedback data according to the node address of the mapping node carried in the feedback data.
In another aspect, a gateway for transmitting data is provided, the gateway comprising:
the first receiving module is used for receiving data sent by a sensor node to a mapping node, wherein the data carries a node address of the mapping node;
and the processing module is used for inquiring the address of the external server corresponding to the node address of the mapping node in the pre-stored corresponding relation between the mapping node and the external server, and sending the data to the external server according to the inquired address of the external server.
In another aspect, a sensor node for transmitting data is provided, the sensor node comprising:
a third receiving module, configured to receive second query information forwarded by a gateway, where the second query information carries a node address of a mapping node that sends the second query information;
the judging module is used for judging whether the node address of the mapping node which is carried in the second query information and used for sending the second query information is the node address of the mapping node which is in the broadcast information sent by the gateway and is received in advance and has the same type with the monitoring data of the gateway;
and if so, returning the feedback data corresponding to the second query information to the gateway, wherein the feedback data carries the node address of the mapping node corresponding to the server receiving the feedback data in the network, so that the gateway forwards the feedback data according to the node address of the mapping node carried in the feedback data.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
by pre-establishing the mapping node of the external server in the network, when data are transmitted between the external server and the sensor node in the intranet through the gateway, the sensor node can obtain the information of the mapping node corresponding to the external server which actively reports the information in advance, so that the whole communication process is more transparent, and the safety of the complex network communication process between the sensor and the external server in the network is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a method for transmitting data according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a method for sending data according to a second embodiment of the present invention;
fig. 3 is a schematic flowchart of a method for sending data according to a third embodiment of the present invention;
fig. 4 is a flowchart illustrating a method for sending data according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of a gateway for sending data according to a fifth embodiment of the present invention;
fig. 6 is a schematic structural diagram of a sensor node for sending data according to a sixth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Example one
An embodiment of the present invention provides a method for sending data, and referring to fig. 1, the method includes:
101: receiving data sent by a sensor node to a mapping node, wherein the data carries a node address of the mapping node;
102: and inquiring the address of an external server corresponding to the node address of the mapping node in a pre-stored corresponding relation between the mapping node and the external server, and sending the data to the external server according to the inquired address of the external server.
The embodiment of the invention realizes that when the external server and the sensor node in the intranet transmit data through the gateway by pre-establishing the mapping node of the external server in the network, the sensor node can obtain the information of the mapping node corresponding to the external server which actively reports information or receives feedback information in advance, so that the whole communication process is more transparent, and the safety of the complex network communication process between the sensor and the external server in the network is improved.
Example two
Referring to fig. 2, it should be noted that the embodiment of the present invention takes a wireless sensor network as an example, and describes a process of establishing a mapping node in the wireless sensor network in advance for an external server that communicates with a sensor node in the wireless sensor network.
The method comprises the following steps:
201: when the sensor node communicates with the external server for the first time, the node address of the mapping node is distributed for the external server, and the server is added into the network, so that the mapping node and the external server are in one-to-one correspondence in the network.
Specifically, when a sensor node inside the wireless sensor network communicates with a server of an external network, the communicated data is forwarded through a gateway. The communication can be that the internal sensor in the wireless sensor network actively reports the monitoring data or the server of the external network sends the query information to the internal sensor in the wireless sensor network, and the communication process at this moment is the process of the gateway according to the forwarded data in the prior art, and the communication process between the external node and the internal node is realized through the address mapping relation stored in the gateway. In the first communication process, the gateway records the address of a server in communication and service type information corresponding to the server, and the address of the server can be acquired by receiving query information of the server at the moment, or can be acquired by an address mapping relation recorded in the gateway when monitoring information is reported by an internal sensor node; the service type information corresponding to the server can be obtained from the received query information of the server, or the service type information of the server receiving the monitoring information can be obtained through the information type corresponding to the reported monitoring information when the monitoring information is reported by the internal sensor node. Further, the address of the server may be an IP (Internet Protocol) address or other address information for identifying the source of the server, which is not limited herein.
The server is used as a new node in a wireless sensing network and is added into the wireless sensing network through a gateway. When the wireless sensor network is added, an internal address needs to be obtained in the wireless sensor network, and then the gateway can forward data to the wireless sensor network according to the internal address. Therefore, a star network which takes the gateway as a root node and takes the mapping node corresponding to the server as a child node is formed inside the gateway, and the network is connected to the internal network through the gateway. And after the address is distributed, the node address is notified to the server for backup.
And associating and storing related information of the newly added server in the wireless sensor network in the gateway, wherein the associated information comprises the address of the server, the node address of the mapping node in the wireless sensor network, the network identifier of the current wireless sensor network, namely the intranet ID and the service type information of the server. For example, table 1 shows the association relationship of the relevant information of the server in the wireless sensor network, which is established in the gateway.
External server address Mapping node addresses of nodes Intranet ID Service type information
123.123.125.2 0x1578 0x2534 0x2587 (temperature Collection)
23.123.125.25 0x1579 0x2534 0x2541 (moisture collection)
123.189.145.78 0x1520 0x2534 0x1247 (price information)
TABLE 1
Preferably, the gateway can be associated with the types of data collected by each sensor in the current wireless sensor network according to the service type information corresponding to the server, so that the gateway can provide better related information according to the association relationship and can transmit data to the sensor node corresponding to the service type information of the server more quickly. For example: the service type information of a certain server is collected temperature information, the gateway correspondingly associates the identifiers of all sensor nodes which are in charge of temperature collection in the network with the identifier of the server, the server sends query information of unified uploading data to the gateway in the process that the server needs the sensor nodes to report data in a unified mode, and the gateway directly corresponds to all the sensor nodes which collect the temperature information according to the association relation and sends commands to all the sensor nodes which collect the temperature information.
The address assignment to the server can be obtained in two ways, so step 201 may specifically be:
2011: when the sensor node in the network communicates with the external server for the first time, sending request information for allocating node addresses in the network for the external server to an intranet coordinator node, receiving and recording the allocated node addresses returned by the intranet coordinator node, and adding a server corresponding to the node addresses into the network.
An intranet coordinator node exists in the wireless sensor network, the node is responsible for allocating an intranet address to a joining node in the wireless sensor network, the newly joining node can comprise a sensor node, and in the embodiment of the invention, a mapping node of a newly joining server can also be included, and the intranet coordinator node allocates a 16-bit node address to the server and returns the node address to the gateway for storage. Furthermore, the intranet coordinator node also plays a role in allocating a sending time slot for the gateway in the communication process of the wireless sensor network, and when the gateway receives a request for forwarding data, the data is scheduled to be forwarded by requesting the time slot from the intranet coordinator node.
2012: when a sensor node in the network is communicated with the external server for the first time and has the function of an intranet coordinator node, a node address is distributed in the network for the external server, the distributed node address returned by the intranet coordinator node is recorded, and the server corresponding to the node address is added into the network.
When the intranet coordinator node is the gateway, a 16-bit node address is allocated to the server through the function of the intranet coordinator node, and recording is performed in the gateway.
202: and broadcasting the node address of the mapping node and the service type information corresponding to the external server to the sensor node in the network, so that the sensor node in the network records the node address of the mapping node with the same data type as the monitored data type of the sensor node according to the service type information corresponding to the external server.
Specifically, after a mapping node corresponding to a new server is added to the wireless sensor network, the gateway sends information of the mapping node corresponding to the newly added server to each node in the current wireless sensor network in a broadcast manner, informs each node of the newly added node, carries relevant information of the newly added node in the broadcast, and informs each node in the current wireless sensor network. Wherein, the related information comprises: and the node address of the mapping node corresponding to the server in the wireless sensor network and the service type information corresponding to the server are used for informing the sensor nodes in each wireless sensor network of which the mapping node corresponding to the newly added server is used for receiving.
203: and the sensor node receives broadcast information sent by the gateway, wherein the broadcast information carries the node address of a mapping node corresponding to an external server in the network and the service type information corresponding to the external server.
204: and recording the node address of the mapping node with the same type as the monitoring data of the node according to the service type information corresponding to the external server carried in the broadcast information.
Through the service type information corresponding to the server in the broadcast information, the sensor node can know whether the data is consistent with the monitored data. If the mapping node addresses are consistent with the destination address of the mapping node address of the server in the wireless sensor network, the sensor node records the node address of the mapping node corresponding to the server in the wireless sensor network, and when the current sensor node reports the monitoring data periodically next time, the destination address carried in the monitoring data, namely the recorded mapping node address, can be used as the destination address of the node address of the mapping node corresponding to the server receiving the monitoring data in the wireless sensor network. On the other hand, the node address of the mapping node with the same self-monitoring data type recorded by the sensor node may also be used as a consideration standard for judging the security of the current server when the sensor node receives the query information sent by the server, if the mapping node address of the server in the network is broadcasted by the gateway, the server is verified, otherwise, the mapping node address is non-secure, and the sensor node may not respond to the query information.
The embodiment of the invention realizes that when the external server and the sensor node in the intranet transmit data through the gateway by pre-establishing the mapping node of the external server in the network, the sensor node can obtain the information of the mapping node corresponding to the external server which actively reports information or receives feedback information in advance, so that the whole communication process is more transparent, and the safety of the complex network communication process between the sensor and the external server in the network is improved.
EXAMPLE III
Referring to fig. 3, it should be noted that, in the embodiment of the present invention, after the mapping node is constructed in the second embodiment, the external server sends query information to the sensor node in the wireless sensor network, and in the embodiment of the present invention, the data sent by the sensor node to the external server is feedback data fed back to the external server according to the query information sent by the external server. Further, before the sensor sends data to the gateway, the embodiment of the present invention further includes the processes of step 301 to step 303.
The method comprises the following steps:
301: the gateway receives first query information sent by an external server to a sensor node in a network, wherein the first query information carries a node address of the sensor node.
Specifically, the external server carries a network identifier in first query information sent to the wireless sensor network, so that the gateway determines whether the received first query information is sent to the network where the gateway is located according to the network identifier after receiving the first query information.
302: and the gateway inquires the node address of the mapping node corresponding to the external server in the network in the pre-stored corresponding relation between the mapping node and the external server.
The gateway inquires the node address of the mapping node in the wireless sensor network corresponding to the address of the external server according to the pre-established corresponding relation between the external server and the mapping node in the wireless sensor network.
303: and the gateway replaces the source address in the first query information with the node address of the mapping node corresponding to the external server in the network to generate second query information, and sends the second query information to the sensor node.
And repackaging the first query information sent by the external server, the node address of the mapping node corresponding to the external server in the wireless sensor network and the network identifier in the wireless sensor network to generate second query information.
304: and the sensor node receives second query information forwarded by the gateway, wherein the second query information carries the node address of the mapping node which sends the second query information.
305: and the sensor node judges whether the node address of the mapping node which sends the second query information and is carried in the second query information is the node address of the mapping node which is consistent with the monitoring data type of the sensor node in the broadcast information sent by the gateway and received in advance.
Judging whether the received query information sent by the mapping node corresponding to the external server is sent by the external server approved by the gateway or not by judging the node address of the mapping node which is recorded by the sensor node and is consistent with the monitoring data type of the sensor node, and if so, executing step 306.
306: if so, the sensor node returns feedback data corresponding to the second query information to the gateway, and the feedback data carries the node address of a mapping node corresponding to the server receiving the feedback data in the network, so that the gateway forwards the feedback data according to the node address of the mapping node carried in the feedback data.
And when the sensor node returns the feedback data to the external server according to the second query information, the returned mapping node address corresponding to the external server is used as a target address sent by the sensor node and is packaged into the feedback data together.
307: and the gateway receives data sent to a mapping node by a sensor node, wherein the data carries the node address of the mapping node.
Specifically, in the embodiment of the present invention, the data received by the gateway in this step is feedback data fed back to the external server.
308: the gateway inquires the address of an external server corresponding to the node address of the mapping node in a pre-stored corresponding relation between the mapping node and the external server, and sends the data to the external server according to the inquired address of the external server.
And the gateway searches the address of the target server in a mapping node and external server correspondence table stored in the gateway through the mapping node address carried in the feedback data. And returns feedback data to the server according to the IP address.
According to the embodiment of the invention, the mapping node of the external server in the network is pre-established, so that when the external server and the sensor node in the intranet transmit data through the gateway, the sensor node can acquire the information of the mapping node corresponding to the server for receiving the feedback information, the whole communication process is more transparent, and the safety of the complex network communication process between the sensor in the network and the external server is improved.
Example four
Referring to fig. 4, it should be noted that, in the embodiment of the present invention, after the mapping node is constructed in the second embodiment, the external server actively uploads the monitoring data to the sensor node in the wireless sensor network, in the embodiment of the present invention, the data sent by the sensor node to the external server is the monitoring data periodically reported to the external server.
The method comprises the following steps:
401: the sensor node reports monitoring data to an external server with the same type as the monitoring data of the sensor node regularly, and the monitoring data carries the node address of a mapping node corresponding to the external server receiving the monitoring data in the network.
The process is that when the sensor reports the monitoring data periodically, the gateway broadcasts information to the network to obtain the node address of the mapping node corresponding to the server with the same type as the monitoring data in the wireless sensing network, the monitoring data sent by the sensor node carries the node address as the destination address, and the gateway can forward the data in a routing mode after receiving the data.
402: and the gateway receives data sent to a mapping node by a sensor node, wherein the data carries the node address of the mapping node.
403: the gateway inquires the address of an external server corresponding to the node address of the mapping node in a pre-stored corresponding relation between the mapping node and the external server, and sends the data to the external server according to the inquired address of the external server.
The embodiment of the invention realizes that when the external server and the sensor node in the intranet transmit data through the gateway by pre-establishing the mapping node of the external server in the network, the sensor node can acquire the information of the mapping node corresponding to the external server which actively reports the information in advance, so that the whole communication process is more transparent, and the safety of the complex network communication process between the sensor and the external server in the network is improved.
EXAMPLE five
An embodiment of the present invention provides a gateway for sending data, referring to fig. 5, where a mapping node of an external server in a network is pre-established, and the gateway includes:
a first receiving module 501, configured to receive data sent by a sensor node to a mapping node, where the data carries a node address of the mapping node;
the processing module 502 is configured to query, in a pre-stored correspondence between a mapping node and an external server, an address of the external server corresponding to a node address of the mapping node, and send the data to the external server according to the queried address of the external server.
In a specific embodiment, the gateway further includes:
an address allocation module 503, configured to allocate a node address of a mapping node to an external server when a sensor node communicates with the external server for the first time, and add the server to the network, so that the mapping node and the external server are in one-to-one correspondence in the network.
The address assignment module 503 includes:
a first address allocation unit 5031, configured to send, to an intranet coordinator node, request information for allocating a node address in a network to the external server when a sensor node in the network communicates with the external server for the first time, receive and record an allocated node address returned by the intranet coordinator node, and add a server corresponding to the node address to the network;
a second address allocating unit 5032, configured to, when a sensor node in the network communicates with the external server for the first time and has a function of an intranet coordinator node, allocate a node address in the network for the external server, record an allocated node address returned by the intranet coordinator node, and add a server corresponding to the node address to the network.
Wherein the gateway further comprises:
a broadcasting module 504, configured to broadcast the node address of the mapping node and the service type information corresponding to the external server to the sensor nodes in the network, so that the sensor nodes in the network record the node address of the mapping node, which is consistent with the data type monitored by the sensor nodes, according to the service type information corresponding to the external server.
Further, the data sent by the sensor to the gateway includes: the feedback data fed back to the external server and the monitoring data reported to the external server periodically, correspondingly, when the data is the feedback data fed back to the external server, the gateway further includes:
a second receiving module 505, configured to receive first query information sent by an external server to a sensor node in a network, where the first query information carries a node address of the sensor node;
a query module 506, configured to query, in a pre-stored correspondence between a mapping node and an external server, a node address of a mapping node corresponding to the external server in the network;
an information generating module 507, configured to replace a source address in the first query information with a node address of a mapping node corresponding to the external server in the network to generate second query information, and send the second query information to the sensor node.
The embodiment of the invention realizes that when the external server and the sensor node in the intranet transmit data through the gateway by pre-establishing the mapping node of the external server in the network, the sensor node can acquire the information of the mapping node corresponding to the external server which actively reports the information in advance, so that the whole communication process is more transparent, and the safety of the complex network communication process between the sensor and the external server in the network is improved.
EXAMPLE six
An embodiment of the present invention provides a sensor node for sending data, and referring to fig. 6, the sensor node includes:
a third receiving module 601, configured to receive second query information forwarded by a gateway, where the second query information carries a node address of a mapping node that sends the second query information;
a determining module 602, configured to determine whether a node address of a mapping node that sends the second query information and is carried in the second query information is a node address of the mapping node that is in accordance with a monitoring data type of the mapping node in broadcast information sent by the gateway and received in advance;
a returning module 603, configured to return the feedback data corresponding to the second query information to the gateway if the second query information is true, where the feedback data carries a node address of a mapping node corresponding to the server that receives the feedback data in the network, so that the gateway forwards the feedback data according to the node address of the mapping node carried in the feedback data.
In a specific embodiment, the sensor node further comprises:
a fourth receiving module 604, configured to receive broadcast information sent by the gateway, where the broadcast information carries a node address of a mapping node corresponding to an external server in the network and service type information corresponding to the external server.
A recording module 605, configured to record, according to the service type information corresponding to the external server carried in the broadcast information, a node address of the mapping node that is consistent with the monitoring data type of the mapping node.
A reporting module 606, configured to report the monitoring data to an external server with a same type as the monitoring data of the external server at regular intervals, where the monitoring data carries a node address of a mapping node in the network corresponding to the external server that receives the monitoring data.
The embodiment of the invention realizes that when the external server and the sensor node in the intranet transmit data through the gateway by pre-establishing the mapping node of the external server in the network, the sensor node can acquire the information of the mapping node corresponding to the external server which actively reports the information in advance, so that the whole communication process is more transparent, and the safety of the complex network communication process between the sensor and the external server in the network is improved.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (14)

1. A method for sending data is applied to a gateway, and is characterized in that a mapping node of an external server in a network is established in advance, and the method comprises the following steps:
receiving data sent by a sensor node to a mapping node, wherein the data carries a node address of the mapping node;
inquiring the address of an external server corresponding to the node address of the mapping node in a pre-stored corresponding relation between the mapping node and the external server, and sending the data to the external server according to the inquired address of the external server;
before receiving data sent by the sensor node to the external server at the corresponding mapping node in the network, the method includes:
when the sensor node communicates with the external server for the first time, the node address of the mapping node is distributed for the external server, and the external server is added into the network, so that the mapping node and the external server are in one-to-one correspondence in the network.
2. The method of claim 1, wherein the assigning the external server a node address of a mapping node when a sensor node in the network first communicates with the external server, and the adding the external server to the network comprises:
when a sensor node in the network communicates with the external server for the first time, sending request information for allocating node addresses in the network for the external server to an intranet coordinator node, receiving and recording the allocated node addresses returned by the intranet coordinator node, and adding the external server corresponding to the node addresses into the network; or,
when a sensor node in the network is communicated with the external server for the first time and has the function of an intranet coordinator node, a node address is distributed in the network for the external server, the distributed node address returned by the intranet coordinator node is recorded, and the external server corresponding to the node address is added into the network.
3. The method of claim 1, wherein the sensor node first communicates with an external server, and wherein the external server is assigned a node address of a mapping node, and wherein after the external server is added to the network, the method further comprises:
and broadcasting the node address of the mapping node and the service type information corresponding to the external server to the sensor node in the network, so that the sensor node in the network records the node address of the mapping node with the same data type as the monitored data type of the sensor node according to the service type information corresponding to the external server.
4. The method of claim 1, wherein the data comprises: feedback data fed back to the external server and monitoring data reported to the external server periodically,
correspondingly, when the data is feedback data fed back to the external server, before the receiving sensor node sends the data to the external server at the corresponding mapping node in the network, the method further includes:
receiving first query information sent by an external server to a sensor node in a network, wherein the first query information carries a node address of the sensor node;
inquiring the node address of the mapping node corresponding to the external server in the network in the pre-stored corresponding relation between the mapping node and the external server;
and replacing the source address in the first query information with the node address of the mapping node corresponding to the external server in the network to generate second query information, and sending the second query information to the sensor node.
5. A method for transmitting data, which is applied to a sensor node, is characterized in that the method comprises the following steps:
receiving second query information forwarded by a gateway, wherein the second query information carries a node address of a mapping node for sending the second query information;
judging whether the node address of the mapping node sending the second query information carried in the second query information is the node address of the mapping node which is in the broadcast information sent by the gateway and is in accordance with the monitoring data type of the mapping node in advance;
if so, returning feedback data corresponding to the second query information to the gateway, wherein the feedback data carries a node address of a mapping node corresponding to an external server receiving the feedback data in a network, so that the gateway forwards the feedback data according to the node address of the mapping node carried in the feedback data, the node address of the mapping node is allocated to the external server by the gateway when the sensor node and the external server communicate for the first time, and the mapping node corresponds to the external servers added to the network by the gateway one to one.
6. The method of claim 5, wherein before receiving the second query information forwarded by the gateway, the method comprises:
receiving broadcast information sent by the gateway, wherein the broadcast information carries a node address of a mapping node corresponding to an external server in the network and service type information corresponding to the external server;
and recording the node address of the mapping node with the same type as the monitoring data of the node according to the service type information corresponding to the external server carried in the broadcast information.
7. The method according to claim 6, wherein the external server consistent with the self-monitoring data type is recorded after the node address of the corresponding mapping node in the network, and the method comprises the following steps:
and reporting the monitoring data to an external server with the same type as the monitoring data of the external server at regular intervals, wherein the monitoring data carries the node address of the mapping node corresponding to the external server receiving the monitoring data in the network.
8. A gateway for transmitting data, wherein a mapping node of an external server in a network is pre-established, the gateway comprising:
the first receiving module is used for receiving data sent by a sensor node to a mapping node, wherein the data carries a node address of the mapping node;
the processing module is used for inquiring the address of an external server corresponding to the node address of the mapping node in the pre-stored corresponding relation between the mapping node and the external server, and sending the data to the external server according to the inquired address of the external server;
wherein the gateway further comprises:
and the address distribution module is used for distributing the node address of the mapping node for the external server when the sensor node is communicated with the external server for the first time, and adding the external server into the network, so that the mapping node and the external server are in one-to-one correspondence in the network.
9. The gateway of claim 8, wherein the assign address module comprises:
the first address allocation unit is used for sending request information for allocating node addresses in the network for the external server to an intranet coordinator node when a sensor node in the network is communicated with the external server for the first time, receiving and recording the allocated node addresses returned by the intranet coordinator node, and adding the external server corresponding to the node addresses into the network;
and the second address allocation unit is used for allocating a node address to the external server in the network when the sensor node in the network is in first communication with the external server and has the function of an intranet coordinator node, recording the allocated node address returned by the intranet coordinator node, and adding the external server corresponding to the node address into the network.
10. The gateway of claim 8, further comprising:
and the broadcasting module is used for broadcasting the node address of the mapping node and the service type information corresponding to the external server to the sensor nodes in the network, so that the sensor nodes in the network record the node address of the mapping node with the data type consistent with the monitored data type of the sensor nodes according to the service type information corresponding to the external server.
11. The gateway of claim 8, wherein the data comprises: feedback data fed back to the external server and monitoring data reported to the external server periodically,
correspondingly, when the data is feedback data fed back to the external server, the gateway further includes:
the second receiving module is used for receiving first query information sent by an external server to a sensor node in a network, wherein the first query information carries a node address of the sensor node;
the query module is used for querying the node address of the mapping node corresponding to the external server in the network in the pre-stored corresponding relation between the mapping node and the external server;
and the information generation module is used for replacing the source address in the first query information with the node address of the mapping node corresponding to the external server in the network to generate second query information and sending the second query information to the sensor node.
12. A sensor node for transmitting data, the sensor node comprising:
a third receiving module, configured to receive second query information forwarded by a gateway, where the second query information carries a node address of a mapping node that sends the second query information;
the judging module is used for judging whether the node address of the mapping node which is carried in the second query information and used for sending the second query information is the node address of the mapping node which is in the broadcast information sent by the gateway and is received in advance and has the same type with the monitoring data of the gateway;
and if so, returning the feedback data corresponding to the second query information to the gateway, wherein the feedback data carries a node address of a mapping node corresponding to an external server receiving the feedback data in a network, so that the gateway forwards the feedback data according to the node address of the mapping node carried in the feedback data, the node address of the mapping node is allocated to the external server by the gateway when the sensor node and the external server communicate for the first time, and the mapping node corresponds to the external servers added to the network by the gateway one to one.
13. The sensor node of claim 12, further comprising:
a fourth receiving module, configured to receive broadcast information sent by the gateway, where the broadcast information carries a node address of a mapping node corresponding to an external server in the network and service type information corresponding to the external server;
and the recording module is used for recording the node address of the mapping node with the same type as the monitoring data of the node according to the service type information corresponding to the external server carried in the broadcast information.
14. The sensor node of claim 13, wherein the sensor node comprises:
and the reporting module is used for reporting the monitoring data to an external server with the same type as the monitoring data per se at regular intervals, wherein the monitoring data carries the node address of the mapping node corresponding to the external server receiving the monitoring data in the network.
CN201210349114.8A 2012-09-19 2012-09-19 A kind of method for sending data, gateway and sensor node Active CN103686696B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210349114.8A CN103686696B (en) 2012-09-19 2012-09-19 A kind of method for sending data, gateway and sensor node

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210349114.8A CN103686696B (en) 2012-09-19 2012-09-19 A kind of method for sending data, gateway and sensor node

Publications (2)

Publication Number Publication Date
CN103686696A CN103686696A (en) 2014-03-26
CN103686696B true CN103686696B (en) 2017-11-24

Family

ID=50322711

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210349114.8A Active CN103686696B (en) 2012-09-19 2012-09-19 A kind of method for sending data, gateway and sensor node

Country Status (1)

Country Link
CN (1) CN103686696B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104661331A (en) * 2013-11-20 2015-05-27 中国科学院声学研究所 Gateway Applied to Wireless Sensor Network Based on IPv6
US10091279B2 (en) 2015-05-27 2018-10-02 FlowJo, LLC Wireless connected laboratory
CN106411744B (en) * 2015-08-03 2019-10-18 阿里巴巴集团控股有限公司 A kind of method and apparatus for route processing
CN105509807A (en) * 2015-12-11 2016-04-20 深圳谷探科技有限公司 Wireless intelligent humiture sensor
CN107370727B (en) * 2017-06-22 2020-11-13 北京邮电大学 A method and device for triggering node equipment in a ZigBee network
CN110324379B (en) * 2018-03-30 2021-12-17 视联动力信息技术股份有限公司 Communication connection establishing method and device
CN113362196B (en) * 2021-05-31 2023-02-21 广东电网有限责任公司 Low-delay addressing method for pre-dispatching service of power grid monitoring system
CN116095046B (en) * 2023-01-04 2024-11-19 神彩科技股份有限公司 Environment-friendly Internet of things data transmission method and device
CN119520469A (en) * 2025-01-20 2025-02-25 中国邮电器材集团有限公司 A method and system for realizing dynamic networking of sensors using Internet identifiers

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101009617A (en) * 2005-12-05 2007-08-01 株式会社日立制作所 Sensor network system, base station and relay method for sensing data
CN102404289A (en) * 2010-09-15 2012-04-04 武汉邮电科学研究院 Method for accessing wireless sensor network to IPv4 network
CN102404195A (en) * 2011-09-02 2012-04-04 华为技术有限公司 Data transmission method, gateway and network system
CN102448075A (en) * 2010-09-30 2012-05-09 上海贝尔股份有限公司 Method and system for mobility management of sensor network node

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8942212B2 (en) * 2007-02-19 2015-01-27 Nec Corporation Autoconfiguration system for wireless sensor network and its method, and gateway apparatus for wireless sensor network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101009617A (en) * 2005-12-05 2007-08-01 株式会社日立制作所 Sensor network system, base station and relay method for sensing data
CN102404289A (en) * 2010-09-15 2012-04-04 武汉邮电科学研究院 Method for accessing wireless sensor network to IPv4 network
CN102448075A (en) * 2010-09-30 2012-05-09 上海贝尔股份有限公司 Method and system for mobility management of sensor network node
CN102404195A (en) * 2011-09-02 2012-04-04 华为技术有限公司 Data transmission method, gateway and network system

Also Published As

Publication number Publication date
CN103686696A (en) 2014-03-26

Similar Documents

Publication Publication Date Title
CN103686696B (en) A kind of method for sending data, gateway and sensor node
KR101571376B1 (en) Method, group server, and member device for accessing member resources
CN106797409B (en) Server for device location registration in internet of things (IOT)
US8769057B1 (en) Employing a hierarchy of servers to resolve fractional IP addresses
US20130136126A1 (en) Data center network system and packet forwarding method thereof
CN102857382B (en) Network management equipment, access convergent equipment, access terminal equipment, and management method and system for access terminal equipment
JP2017510208A (en) Service chain routing method and system, and devices in the system
CN105075225A (en) Enabling external access to multiple services on a local server
Xiaonan et al. An IPv6 address configuration scheme for wireless sensor networks based on location information
CN107172120B (en) Information processing method, processing node and network node
CN102413057B (en) Method and system for providing service application in internet
US7535855B2 (en) Structured addressing scheme for wireless networks
KR20130117436A (en) Method and system for providing global id for the internet of things
CN105722040B (en) Method, device and system for transmitting business messages
WO2013189209A1 (en) Method, device and system for establishing transmission channel
Li et al. A novel and efficient address configuration for MANET
Wang et al. An address configuration protocol for 6LoWPAN wireless sensor networks based on PDAD
CN103905392B (en) DynamicHost sets protocol DHCP server selection method, apparatus and system
US20090157878A1 (en) Method and system for connecting lower nodes to one another to increase scalability in zigbee network
WO2018045949A1 (en) Message transmission method, device and network system
CN102938921B (en) A kind of method of sensor networking and route, network node and system
US20140003446A1 (en) Csma time slot providing and obtaining method and device, networking method and device, and system
CN102577170B (en) Multicast system and method using shortened address based on short-distance wireless communication and equipment used for the multicast system and method
KR20090033577A (en) Network address allocation method and system based on location information measured by positioning technology
CN104767684A (en) Data transmission method and related device and communication system

Legal Events

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