CN114449470A - Sensor data transmission method - Google Patents

Sensor data transmission method Download PDF

Info

Publication number
CN114449470A
CN114449470A CN202210123873.6A CN202210123873A CN114449470A CN 114449470 A CN114449470 A CN 114449470A CN 202210123873 A CN202210123873 A CN 202210123873A CN 114449470 A CN114449470 A CN 114449470A
Authority
CN
China
Prior art keywords
gateway
sensor node
wireless sensor
uplink
data
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.)
Pending
Application number
CN202210123873.6A
Other languages
Chinese (zh)
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.)
Xinjiang Yuanneng Electronic Technology Co ltd
Original Assignee
Xinjiang Yuanneng Electronic Technology 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 Xinjiang Yuanneng Electronic Technology Co ltd filed Critical Xinjiang Yuanneng Electronic Technology Co ltd
Priority to CN202210123873.6A priority Critical patent/CN114449470A/en
Publication of CN114449470A publication Critical patent/CN114449470A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • H04W4/38Services specially adapted for particular environments, situations or purposes for collecting sensor information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/0231Traffic management, e.g. flow control or congestion control based on communication conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/10Flow control between communication endpoints
    • H04W28/14Flow control between communication endpoints using intermediate storage
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0225Power saving arrangements in terminal devices using monitoring of external events, e.g. the presence of a signal
    • H04W52/0245Power saving arrangements in terminal devices using monitoring of external events, e.g. the presence of a signal according to signal strength
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE 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/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention relates to the technical field of data communication, in particular to a sensor data transmission method, when a wireless sensor node has uplink data transmission, the wireless sensor node judges whether the signal connection strength with a first gateway exceeds a threshold value and then judges whether the uplink data needs to be transmitted immediately, if not, the uplink data is stored in an uplink cache region; if the uplink data packet is needed, a wireless communication connection establishment request is sent to the first gateway, wireless communication connection with the first gateway is established, and the wireless sensor node combines the uplink data and the temporary storage data of the uplink cache region into an uplink data packet and sends the uplink data packet to the first gateway; and the first gateway sends the uplink data packet to the server. The invention solves the problem that the service life of a battery is influenced because a wireless sensor node needs to send a large amount of data when being positioned in an area with poor gateway signals in an intelligent household scene.

Description

Sensor data transmission method
Technical Field
The invention relates to the technical field of data communication, in particular to a sensor data transmission method.
Background
At present, the sensor is widely applied to the fields of smart home, agricultural planting, environmental monitoring, chemical production and the like. A large number of sensors are deployed in a monitoring area, information is transmitted in a wireless transmission mode to form a wireless sensor network, the sensors are usually in signal connection with a gateway in a wireless transmission mode, and then the gateway is connected with a server in a public mobile network mode and the like.
The existing sensors (also referred to as sensor nodes) can generally complete tasks such as environment monitoring, target discovery, location identification and the like, and also have functions of routing, forwarding, fusing, storing other node information and the like. The gateway is responsible for connecting the communication of the wireless sensor network and an external network, realizes the conversion between two network communication protocols, sends a control command to the internal node of the sensor network and transmits the information of the node to the server. The server is used for receiving data of the monitoring area, and a user can remotely access the server so as to obtain the state of a monitoring target in the monitoring area and the working conditions of the nodes and the equipment.
A single sensor node is composed of four modules: the device comprises a sensor module, a processor module, a wireless communication module and a power supply module. The sensor module is responsible for information acquisition in the monitoring area and performs AC/DC conversion for use by subsequent modules. The processor module comprises a processor and a memory which are respectively responsible for processing node control and data storage work. The wireless communication module is responsible for mutual communication between the nodes. And the power supply module is responsible for providing energy for the sensor nodes. The four modules work cooperatively to ensure the normal operation of the node.
The wireless sensor node needs to sense and acquire data, and in order to ensure the timeliness of data acquisition and alarm response, the traditional method is that the wireless sensor node is always in a connection state, and the signal connection strength between the wireless sensor node and the gateway is also a key factor influencing the power consumption of the battery. That is, when the signal connection strength between the wireless sensor node and the gateway is low, the wireless sensor node often needs a higher power operation of the wireless communication module to complete the related information interaction due to the existence of a higher packet loss rate.
Especially in the application scene of smart home, the above problem is more prominent. After purchasing the wireless sensor nodes, a user is limited by the technical capability requirements of the user and is difficult to effectively maintain the wireless sensor nodes, so that the service life of the wireless sensor nodes is very necessary to be prolonged (the user is limited by the original decoration limit of a house and is difficult to independently supply power to each wireless sensor node). In this application scenario, the wireless sensor nodes usually perform information interaction with the home wireless router (gateway) in a WiFi or bluetooth manner, but because the wireless sensor nodes are not all located in an area with good gateway signal coverage, for the wireless sensor nodes located with poor signal coverage, to ensure the delivery quality of information, higher power is required to complete the transmission of information, which affects the service life of the battery.
Disclosure of Invention
The invention aims to solve the problem that the service life of a battery is influenced when the conventional wireless sensor node is positioned in an area with a poor gateway signal and particularly under the condition that the wireless sensor node needs to send a large amount of data in an intelligent household scene.
In order to achieve the purpose, the invention adopts the technical scheme that:
a sensor data transmission method, characterized by: when the wireless sensor node has uplink data transmission, first, determine whether instant uploading is needed? If the uplink data does not need to be uploaded immediately, storing the uplink data into an uplink cache region;
if instant uploading is required, judging whether the signal connection strength between the wireless sensor node and the first gateway exceeds a threshold value?
If the signal connection strength of the first gateway exceeds a threshold value, initiating a wireless communication connection establishment request to the first gateway, establishing wireless communication connection with the first gateway, combining uplink data and cache data of an uplink cache region into an uplink data packet by the wireless sensor node, and sending the uplink data packet to the first gateway by the first gateway;
if the signal connection strength between the wireless sensor node and the first gateway is lower than a threshold value, initiating a wireless communication connection establishment request to the first gateway, establishing wireless communication connection with the first gateway, arranging uplink data into an uplink data packet by the wireless sensor node, and sending the uplink data packet to the first gateway by the first gateway; is the first gateway sending wireless sensor node network-presence information about the second gateway? If not, the wireless sensor node gives up the sending and initiates a wireless communication connection disconnection process; and if the second gateway is on the network and a wireless communication establishment request is initiated to the second gateway, the wireless sensor node sends the data of the uplink cache region to the server through the second gateway.
A sensor data transmission method, characterized by: when the wireless sensor node has uplink data transmission,
first, the wireless sensor node determines whether the signal connection strength with the first gateway exceeds a threshold?
If the signal connection strength exceeds the threshold, then determine if the uplink data needs to be transmitted immediately? If not, storing the uplink data into an uplink buffer area; if the uplink data packet is needed, initiating a wireless communication connection establishment request to the first gateway, establishing wireless communication connection with the first gateway, and combining the uplink data and the cache data of the uplink cache region into an uplink data packet by the wireless sensor node and sending the uplink data packet to the first gateway; the first gateway sends an uplink data packet to a server;
if the signal connection strength between the wireless sensor node and the first gateway is lower than a threshold value, judging whether the uplink data needs to be transmitted immediately; if not, storing the uplink data into an uplink cache region; if the wireless sensor node needs to be connected with the first gateway, a wireless communication connection establishment request is sent to the first gateway, wireless communication connection between the wireless sensor node and the first gateway is established, uplink data are arranged into uplink data packets by the wireless sensor node, and the uplink data packets are sent to the first gateway by the first gateway; is the first gateway sending wireless sensor node network presence information about the second gateway? If not, the wireless sensor node gives up the sending and initiates a wireless communication connection disconnection process; and after receiving the on-line state of the second gateway, initiating a wireless communication establishment request to the second gateway, and sending the data of the uplink cache region to the server by the wireless sensor node through the second gateway.
As a preferred mode, the sensor data transmission method determines whether the signal connection strength between the wireless sensor node and the second gateway exceeds a threshold after initiating a wireless communication establishment request to the second gateway? If the data in the uplink cache region exceeds the preset threshold value, the wireless sensor node sends the data in the uplink cache region to the server through the second gateway; and if the signal connection strength between the wireless sensor node and the second gateway does not exceed the threshold value, the wireless sensor node gives up the sending and initiates the disconnection process of the wireless communication connection.
As a preferred mode, in the sensor data transmission method, after receiving a first uplink data packet, the server determines whether downlink data for the wireless sensor node exists in a data cache region, and if not, sends a downlink data null packet to the first gateway; if so, sending the downlink data packet of the data cache region to the first gateway until the downlink data transmission is finished, wherein the last downlink data packet carries a data transmission completion mark; and the first gateway sends downlink data to the wireless sensor node.
As a preferred mode, in the sensor data transmission method, if downlink data is sent by the server, it is determined whether a destination wireless sensor node of the downlink data has established a wireless communication connection, if so, the downlink data is sent to the destination wireless sensor node through the first gateway, and if not, the downlink data is cached in the data cache region.
As a preferred mode, in the sensor data transmission method, after receiving a downlink data null packet or a data packet with a data transmission completion flag, the wireless sensor node determines whether uplink data transmission is completed? If yes, the wireless access node initiates a wireless communication connection disconnection process.
Preferably, the sensor data transmission method includes: the first gateway is a wireless router, and the second gateway is a mobile intelligent terminal.
In a preferred embodiment, the second gateway is a smart phone.
Preferably, in the sensor data transmission method, the first gateway determines whether the second gateway is on the network or not by determining whether the second gateway is connected with the server or not, which is fed back by the server.
Preferably, in the sensor data transmission method, the first gateway determines whether the second gateway is on the network or not by whether the second gateway establishes a wireless communication connection with the first gateway or not.
Preferably, the sensor data transmission method includes establishing a wireless communication connection between the wireless sensor node and a first gateway through a WiFi signal, and establishing a wireless communication connection between the wireless sensor node and a second gateway through a bluetooth signal.
Preferably, the sensor data transmission method includes that the second gateway is a smartphone supporting a 2 x 2MIMO-WiFi technology, and the wireless sensor node establishes wireless communication connection with the first gateway and the second gateway through WiFi signals respectively.
According to the sensor data transmission method, after the wireless sensor node generates the uplink data, if the signal connection strength between the wireless sensor node and the first gateway exceeds the threshold value, the fact that the wireless sensor node completes information sending is indicated that not much electric power is wasted, but certain waste (after all, authentication is needed every time) exists when the wireless communication connection is frequently established and disconnected, and therefore the timeliness of the uplink data needs to be judged. And if the information needs to be transmitted in time, normally establishing connection to finish information transmission. If the wireless communication connection does not need to be transmitted in time, the wireless communication connection is stored in an uplink cache region, and after the connection is established next time, the wireless communication connection is combined and transmitted, so that the energy waste of the establishment and disconnection of the wireless communication connection is reduced.
If the signal connection strength between the position of the wireless sensor node and the first gateway is low, if the wireless sensor node is allowed to send more data under the condition of low signal connection strength, the service life of the battery can be seriously influenced (the wireless module of the wireless sensor node either increases the power or repeatedly transmits, and normal sending of information under the condition of high packet loss rate is ensured). Therefore, the invention also judges the timeliness of the uplink data, if the timeliness is more urgent, in order to ensure the normal work, the wireless communication connection can be established only with the first gateway, and the information transmission of the uplink data is completed. If the uplink data does not exist and is required in a timely manner, the uplink data is also stored in the uplink buffer. After the wireless communication connection with the first gateway is established next time, whether the data in the uplink buffer area are uploaded through the second gateway is determined according to the message fed back by the first gateway whether the second gateway is on the network, and therefore the situation that the wireless sensor node sends a large amount of data (including timeliness and non-timeliness) reluctantly (under the condition that the signal connection strength is low) is avoided, and only a small amount of data (with high timeliness requirement) needs to be sent reluctantly. Ensuring that the battery power is not wasted.
And then, after the second gateway is on the network, the wireless sensor node transmits a large amount of data after the signal connection strength with the second gateway exceeds a threshold value. Although the connection strength between the second gateway and the wireless sensor node is various, the data transmission is carried out by selecting the mode with the least energy waste, so that the power consumption of the battery is reduced. The problem that the wireless sensor node needs to send a large amount of data under the condition of poor signals to influence the service life of a battery is solved.
Drawings
Fig. 1 is a flow chart of the above data transmission control method of a sensor data transmission method according to the present invention;
FIG. 2 is a flow chart of a downlink data transmission control method of a sensor data transmission method according to the present invention;
fig. 3 is a flowchart of an uplink data transmission control method according to a second embodiment of the sensor data transmission method of the present invention.
Detailed Description
The following detailed description of the preferred embodiments of the present invention will be made with reference to the accompanying drawings, but the scope of the present invention should not be limited by the preferred embodiments.
In a first embodiment, the sensor data transmission method of the present invention includes: when the wireless sensor node has uplink data transmission, firstly, judging whether the wireless sensor node needs to upload immediately, and if the wireless sensor node does not need to upload immediately, storing the uplink data into an uplink cache region; if instant uploading is required, the wireless sensor node judges whether the signal connection strength with the first gateway exceeds a threshold value? If the wireless sensor node judges that the signal connection strength with the first gateway exceeds a threshold value, a wireless communication connection establishment request is initiated to the first gateway, wireless communication connection between the wireless sensor node and the first gateway is established, the wireless sensor node combines uplink data and temporary storage data of an uplink cache region into an uplink data packet and sends the uplink data packet to the first gateway, and the first gateway sends the uplink data packet to a server; if the wireless sensor node judges that the signal connection strength with the first gateway is lower than a threshold value, establishing wireless communication connection with the first gateway, arranging uplink data into an uplink data packet by the wireless sensor node, and sending the uplink data packet to the first gateway by the first gateway; is the first gateway sending wireless sensor node network-presence information about the second gateway? If not, the wireless sensor node gives up the transmission and initiates the disconnection process of the wireless communication connection; if the second gateway is on the network, initiating a wireless communication establishment request to the second gateway, and judging whether the signal connection strength between the wireless sensor node and the second gateway exceeds a threshold value? If the data in the uplink cache region exceeds the preset threshold value, the wireless sensor node sends the data in the uplink cache region to the server through the second gateway; and if the signal connection strength between the wireless sensor node and the second gateway does not exceed the threshold value, the wireless sensor node gives up the transmission and initiates the disconnection process of the wireless communication connection.
Referring to fig. 1, the uplink data transmission method according to this embodiment is shown in the figure, and specifically includes the following steps:
s11, starting to transmit uplink data by the wireless sensor node, and entering the next step;
s12, determine whether instant upload is needed? If not, entering the next step; if yes, go to step S14;
s13, storing the uplink data into a buffer uplink data buffer area;
s14, determine whether the signal connection strength with the first gateway exceeds a threshold? If not, the process proceeds to step S16, if yes, the process proceeds to step S15,
s15, determine whether the uplink buffer data in the uplink buffer area is empty? If yes, go to step S16, otherwise, go to step S115;
s16, initiating a wireless communication connection establishment request to the first gateway, and entering the next step;
s17, establishing wireless connection with the first gateway, and entering the next step;
s18, the wireless sensor node packs the uplink data and sends the uplink data to the first gateway, and the next step is carried out;
s19, the first gateway sends the uplink data packet to the server and enters the next step;
s110, the first gateway sends information about whether the second gateway is on-line to the wireless sensor node, and determines whether the second gateway is on-line? If the network is on, entering the next step; if not, go to step S114;
s111, initiating a wireless communication connection establishment request to a second gateway, and entering the next step;
s112, determine whether the signal connection strength with the second gateway exceeds a threshold? If yes, the next step is carried out, and if not, the step S114 is carried out;
s113, sending the cache data of the uplink cache region to a server through a second gateway;
s114, abandoning the sending and initiating a wireless communication connection disconnection process;
s115, initiating a wireless communication connection establishment request to the first gateway, and entering the next step;
s116, establishing wireless connection with the first gateway, and entering the next step;
s117, the wireless sensor node merges, packages and sends the uplink data and the uplink cache data to the first gateway, and the next step is carried out;
and S118, the first gateway sends the uplink data packet to the server.
During specific use, the illumination intensity sensor is used for establishing signal connection with the first gateway (in this embodiment, the wireless sensor node is a wireless router, and in other embodiments, the wireless sensor node is a smart phone supporting 2 x 2MIMO-WiFi technology, and in other embodiments, the smart phone supporting bluetooth and WiFi can be used), respectively, through WiFi (in other embodiments, the wireless sensor node can be used in a manner of bluetooth, z igbe, and the like, and only needs to correspond to the second gateway), and is mainly used for collecting outdoor illumination intensity. The logic for generating the uplink data is that when a person is in the room (for example, a switch is provided, and the switch is manually turned on), whether the change of the outdoor illumination intensity exceeds a threshold value or not is collected, and the outdoor illumination intensity is timely fed back to the first gateway after the change exceeds the threshold value. In the use stage, the wireless sensor node generates uplink data due to the change of the illumination intensity, and at the moment, the judgment that the signal connection intensity with the first gateway exceeds the threshold value shows that the transmission of the information is completed without wasting too much electric power, and the information transmission is completed by normally establishing connection if the transmission is required in time.
If the judgment does not need to be transmitted in time (namely, the switch is started without people indoors, the specific judgment logic is more certainly, and the judgment logic can be set by a person skilled in the art according to the actual situation), the judgment is stored into the uplink cache region, and after the connection is established next time, the judgment logic is combined and transmitted, so that the energy waste of the establishment and the disconnection of the wireless communication connection at one time is reduced.
It should be noted that after receiving the first uplink data packet, the server determines whether downlink data for the wireless sensor node exists in the data cache region, if not, a downlink data null packet is sent to the first gateway, if so, the downlink data packet in the data cache region is sent to the first gateway until the downlink data transmission is completed, and the last downlink data packet carries a data transmission completion flag; and the first gateway sends the downlink data to the wireless sensor node. After the wireless sensor node receives the downlink data null packet or the data packet with the data transmission completion mark, if the uplink data transmission is completed, the wireless access node starts the disconnection process of the wireless communication connection.
Preferably, when the server has downlink data to send, it is determined whether a wireless communication connection has been established with a destination wireless sensor node of the downlink data, if so, the downlink data is sent to the destination wireless sensor node through the first gateway, and if not, the downlink data is cached in the data cache region.
Preferably, after the destination wireless sensor node of the downlink data has established the wireless communication connection, determine whether the signal connection strength between the location of the wireless sensor node and the first gateway exceeds a threshold? And if the signal connection strength exceeds the threshold value, the downlink data is sent to the target wireless sensor node through the first gateway, and if the signal connection strength is low and does not exceed the threshold value, the downlink data is cached in a data cache region. If the wireless sensor node is allowed to transmit more data under the condition of low signal connection strength, the service life of the battery can be seriously influenced (the wireless module of the wireless sensor node increases the power or repeatedly transmits, and normal transmission of information under the condition of high packet loss rate is ensured).
Referring to fig. 2, a preferred transmission method of downlink data in this embodiment is shown, which specifically includes the following steps:
s21, starting, when the server receives the first uplink data packet of the sensor node, entering the next step;
s22, determine whether there is downlink data for the sensor node in the downlink buffer? If not, the next step S23 is carried out, if yes, the step S24 is carried out;
s23, sending a downlink data null packet to the first gateway;
s24, is the sensor node already established a wireless communication connection? If yes, go to step S25, if not, go to step S26;
s25, determine whether the signal connection strength with the first gateway exceeds a threshold? If not, go to step S26; if so, the process proceeds to S27,
s26, storing the downlink data into a downlink buffer area;
s27, sending the downlink data packet to the first gateway, and entering the next step;
s28, determine whether it is the last downlink packet? If yes, go to the next step, if not, go to step S27;
s29, marking the data transmission completion carried by the last downlink data packet, and entering the next step;
s210, the first gateway sends downlink data to the wireless sensor node and enters the next step;
s211, determine whether a downlink data null packet or a data packet with a data transmission completion flag is received? If so, the process proceeds to the next step, otherwise, the process proceeds to S27
S212, determine whether the uplink data transmission is completed? If yes, the next step is carried out, and if not, the step goes to S111 or S118;
and S213, initiating a wireless communication connection disconnection process.
In this embodiment, during uplink data transmission, first, an immediate judgment is performed on the uplink data, and if the determination is urgent, in order to ensure normal operation, only a wireless communication connection with the first gateway may be established, so as to complete information transmission. If the uplink data does not have the requirement of instantaneity, the uplink data is stored in the uplink buffer zone. After the wireless communication connection is established with the first gateway next time, whether the data in the uplink buffer area is uploaded through the second gateway is determined according to the message that the second gateway is on the network and is fed back by the first gateway, and therefore the situation that the wireless sensor node sends a large amount of data (including timeliness and non-timeliness) only needs to send a small amount of data (and high timeliness requirement) relently (under the condition that the signal connection strength is low) is avoided. Ensuring that the battery power is not wasted.
It should be noted that, the first gateway determines whether the second gateway is online according to whether the second gateway establishes the wireless communication connection with the first gateway. In other embodiments, the first gateway may also determine whether the second gateway is online according to whether the second gateway is connected to the server, which is fed back by the server, and the second gateway may actually send the relevant data to the server through the first gateway after being WiFi-connected to the first gateway. In another embodiment, the second gateway may actually establish a wireless communication connection directly with the server through a 3G/4G/5G or the like.
Then, the second gateway is on the network, and the wireless sensor node sends a large amount of data after the signal connection strength with the second gateway exceeds a threshold value. Although the connection strength between the second gateway and the wireless sensor node is various, the data transmission is carried out by selecting the mode with the least energy waste, so that the power consumption of the battery is reduced.
In a second embodiment, referring to fig. 3, a method for uplink data transmission is shown, which specifically includes the following steps:
s1, starting to transmit uplink data by the wireless sensor node, and entering the next step;
s2, determine whether the signal connection strength with the first gateway exceeds a threshold? If yes, the process proceeds to step S14, otherwise, the process proceeds to the next step;
s3, determine whether instant upload is needed? If not, entering the next step; if yes, go to step S5;
s4, storing the uplink data into a buffer uplink data buffer area;
s5, initiating a wireless communication connection establishment request to the first gateway, and entering the next step;
s6, establishing wireless connection with the first gateway, and entering the next step;
s7, the wireless sensor node packs the uplink data and sends the uplink data to the first gateway, and the next step is carried out;
s8, the first gateway sends the uplink data packet to the server and enters the next step;
s9, determine if the second gateway is on-net? If yes, entering the next step; if not, go to step S13;
s10, initiating a wireless communication connection establishment request to the second gateway, and entering the next step;
s11, determine whether the signal connection strength with the second gateway exceeds a threshold? If yes, go to the next step, if not, go to step S13;
s12, sending the cache data of the uplink cache region to a server through a second gateway;
s13, abandoning the sending and initiating the disconnection process of the wireless communication connection;
s14, determine whether instant upload is needed? If not, go to S4; if yes, entering the next step;
s15, determine whether the uplink buffer data in the uplink buffer area is empty? If yes, the process proceeds to step S5, otherwise, the process proceeds to the next step;
s16, initiating a wireless communication connection establishment request to the first gateway, and entering the next step;
s17, establishing wireless connection with the first gateway, and entering the next step;
s18, the wireless sensor node combines and packs the uplink data and the uplink cache data to be sent to the first gateway, and the next step is carried out;
and S19, the first gateway sends the uplink data packet to the server.
In the embodiment, when the wireless sensor node has uplink data transmission,
first, determine if the signal connection strength of the wireless sensor node with the first gateway exceeds a threshold?
If the uplink data exceeds the threshold value, then judging whether the uplink data needs to be transmitted immediately, if not, storing the uplink data into an uplink cache region; if the wireless sensor node needs to be connected with the first gateway, a wireless communication connection establishment request is sent to the first gateway, wireless communication connection with the first gateway is established, and the wireless sensor node combines uplink data and temporary storage data of the uplink cache area into an uplink data packet and sends the uplink data packet to the first gateway; the first gateway sends the uplink data packet to a server;
if the signal connection strength between the wireless sensor node and the first gateway is lower than a threshold value, judging whether the uplink data needs to be transmitted immediately, and if not, storing the uplink data into an uplink cache region; if the wireless sensor node needs to be connected with the first gateway, a wireless communication connection establishment request is sent to the first gateway, wireless communication connection between the wireless sensor node and the first gateway is established, and the wireless sensor node arranges uplink data (excluding cached data) into an uplink data packet and sends the uplink data packet to the first gateway; the first gateway sends the uplink data packet to a server; the first gateway sends information whether the second gateway is in the network to the wireless sensor node, when the information that the second gateway is in the network is received, a wireless communication establishment request is sent to the second gateway, and if the signal connection strength between the wireless sensor node and the second gateway exceeds a threshold value, the wireless sensor node sends data of an uplink cache area to a server through the second gateway; and if the signal connection strength between the wireless sensor node and the second gateway does not exceed the threshold value, the wireless sensor node gives up the transmission and initiates the disconnection process of the wireless communication connection.
Therefore, the sensor data transmission method of the present invention is necessary to perform an immediate judgment on the uplink data no matter in a state of strong or weak signals, and if the judgment is really urgent, the method can only establish wireless communication connection with the first gateway to complete the transmission of information in order to ensure normal operation. If the uplink data does not have the requirement of instantaneity, the uplink data is stored in the uplink buffer zone. After the wireless communication connection is established with the first gateway next time, whether the data in the uplink buffer area are uploaded through the second gateway is determined according to the message whether the second gateway is on the network or not, which is fed back by the first gateway, so that the wireless sensor node is prevented from reluctantly (under the condition of low signal connection strength) sending a large amount of data (including timeliness and non-timeliness) and only needs to reluctantly send a small amount of data (with high timeliness requirement). Ensuring that the battery power is not wasted.
The above description is intended to be illustrative, and not restrictive, and the present invention is intended to provide a sensor data transmission method, and it will be understood by those skilled in the art that many modifications, changes, or equivalents, such as changes in the order of determining steps, etc., may be made without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (12)

1. A sensor data transmission method, characterized by: when the wireless sensor node has uplink data transmission, first, determine whether instant uploading is needed? If the uplink data does not need to be uploaded immediately, storing the uplink data into an uplink cache region;
if instant uploading is required, judging whether the signal connection strength between the wireless sensor node and the first gateway exceeds a threshold value?
If the signal connection strength of the first gateway exceeds a threshold value, initiating a wireless communication connection establishment request to the first gateway, establishing wireless communication connection with the first gateway, combining uplink data and cache data of an uplink cache region into an uplink data packet by the wireless sensor node, and sending the uplink data packet to the first gateway by the first gateway;
if the signal connection strength between the wireless sensor node and the first gateway is lower than a threshold value, initiating a wireless communication connection establishment request to the first gateway, establishing wireless communication connection with the first gateway, arranging uplink data into an uplink data packet by the wireless sensor node, and sending the uplink data packet to the first gateway by the first gateway; is the first gateway sending wireless sensor node information about whether the second gateway is on-net? If not, the wireless sensor node gives up the sending and initiates a wireless communication connection disconnection process; if the second gateway is on the network, a wireless communication establishment request is sent to the second gateway, and the wireless sensor node sends the data of the uplink cache region to the server through the second gateway.
2. A sensor data transmission method, characterized by: when the wireless sensor node has uplink data transmission,
first, the wireless sensor node determines whether the signal connection strength with the first gateway exceeds a threshold?
If the signal connection strength exceeds the threshold, then determine if the uplink data needs to be transmitted immediately? If not, storing the uplink data into an uplink cache region; if the wireless sensor node needs to be connected with the first gateway, a wireless communication connection establishment request is sent to the first gateway, wireless communication connection between the wireless sensor node and the first gateway is established, and the wireless sensor node combines uplink data and cache data of an uplink cache region into an uplink data packet and sends the uplink data packet to the first gateway; the first gateway sends the uplink data packet to a server;
if the signal connection strength between the wireless sensor node and the first gateway is lower than a threshold value, judging whether the uplink data needs to be transmitted immediately; if not, storing the uplink data into an uplink cache region; if the wireless sensor node needs to be connected with the first gateway, a wireless communication connection establishment request is sent to the first gateway, wireless communication connection between the wireless sensor node and the first gateway is established, uplink data are arranged into uplink data packets by the wireless sensor node, and the uplink data packets are sent to the first gateway by the first gateway; is the first gateway sending wireless sensor node information about whether the second gateway is on-net? If not, the wireless sensor node gives up the sending and initiates a wireless communication connection disconnection process; and after receiving the second gateway on-line, initiating a wireless communication establishment request to the second gateway, and sending the data of the uplink cache region to the server through the second gateway by the wireless sensor node.
3. The sensor data transmission method according to claim 1 or 2, characterized in that: after a wireless communication establishment request is initiated to a second gateway, judging whether the signal connection strength between the wireless sensor node and the second gateway exceeds a threshold value? If the data in the uplink cache region exceeds the preset threshold value, the wireless sensor node sends the data in the uplink cache region to the server through the second gateway; and if the signal connection strength between the wireless sensor node and the second gateway does not exceed the threshold value, the wireless sensor node gives up the transmission and initiates the disconnection process of the wireless communication connection.
4. The sensor data transmission method according to claim 3, characterized in that: after receiving the first uplink data packet, the server judges whether downlink data for the wireless sensor node exist in a data cache region or not, and if not, the server sends a downlink data null packet to the first gateway; if yes, sending the downlink data packet of the data cache region to the first gateway until the downlink data transmission is finished, wherein the last downlink data packet carries a data transmission completion mark; and the first gateway sends downlink data to the wireless sensor node.
5. The sensor data transmission method according to claim 4, characterized in that: and if the server has downlink data to send, judging whether the target wireless sensor node of the downlink data establishes wireless communication connection, if so, sending the downlink data to the target wireless sensor node through the first gateway, and if not, caching the downlink data to a data cache region.
6. The sensor data transmission method according to claim 5, characterized in that: after receiving a downlink data null packet or a data packet with a data transmission completion flag, the wireless sensor node determines whether uplink data transmission is completed? If yes, the wireless access node initiates a wireless communication connection disconnection process.
7. The sensor data transmission method according to any one of claims 1 to 6, characterized in that: the first gateway is a wireless router, and the second gateway is a mobile intelligent terminal.
8. The sensor data transmission method according to claim 7, characterized in that: the second gateway is a smart phone.
9. The sensor data transmission method according to any one of claims 1 to 6, characterized in that: and the first gateway judges whether the second gateway is on the network or not by judging whether the second gateway is connected with the server or not through the second gateway fed back by the server.
10. The sensor data transmission method according to any one of claims 1 to 6, characterized in that: and the first gateway judges whether the second gateway is on the network or not by judging whether the second gateway establishes wireless communication connection with the first gateway or not.
11. The sensor data transmission method according to any one of claims 1 to 10, characterized in that: the wireless sensor node is in wireless communication connection with the first gateway through WiFi signals, and is in wireless communication connection with the second gateway through Bluetooth signals.
12. The sensor data transmission method according to any one of claims 1 to 10, characterized in that: the second gateway is a smart phone supporting 2 x 2MIMO-WiFi technology, and the wireless sensor nodes are respectively in wireless communication connection with the first gateway and the second gateway through WiFi signals.
CN202210123873.6A 2022-02-10 2022-02-10 Sensor data transmission method Pending CN114449470A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210123873.6A CN114449470A (en) 2022-02-10 2022-02-10 Sensor data transmission method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210123873.6A CN114449470A (en) 2022-02-10 2022-02-10 Sensor data transmission method

Publications (1)

Publication Number Publication Date
CN114449470A true CN114449470A (en) 2022-05-06

Family

ID=81371052

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210123873.6A Pending CN114449470A (en) 2022-02-10 2022-02-10 Sensor data transmission method

Country Status (1)

Country Link
CN (1) CN114449470A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114900752A (en) * 2022-04-29 2022-08-12 国网新疆电力有限公司信息通信公司 Sensor data transmission method and device, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114900752A (en) * 2022-04-29 2022-08-12 国网新疆电力有限公司信息通信公司 Sensor data transmission method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN106792916B (en) Hybrid remote wireless sensor network system and communication method thereof
CN107846674B (en) Outdoor communication method based on Bluetooth grid protocol, mobile terminal and storage medium
JP4173485B2 (en) Mobile radio terminal device
CN107949046B (en) Wireless sensor management method, device and system
CN102149214B (en) Data transmission method and system in communication system
JP6168624B2 (en) Base station, wireless terminal, communication system, communication method, program
CN101023629A (en) Communication apparatus and communication method
CN101449525A (en) Method for controlling energy consumption of sensor network nodes and device thereof
US10312957B2 (en) Communication method and apparatus for wearable device in wireless communication system
CN107018545B (en) A kind of ad hoc network method applied in wireless communication system
CN106657364A (en) Internet of things device and gateway device
US20020067284A1 (en) Method and apparatus for efficient use of communication channels for remote telemetry
CN106850784A (en) Communication means between smart host and cloud service
CN114449470A (en) Sensor data transmission method
KR20040102369A (en) Repeater remote control system and method in mobile communication system
CN113915907A (en) Refrigerator and refrigerator networking method
CN112788700A (en) Communication method, terminal and readable storage medium
CN106376012A (en) Method and device for controlling wireless access point equipment
CN111917849A (en) Internet of things transmission method based on Zigbee and NB-IoT fusion networking
JP6516039B2 (en) Gateway apparatus, communication system, power saving control method and power saving control program
WO2019120188A1 (en) Automatic communication mode switching method, terminal and smart device
CN105188111A (en) Data transmission control method and wireless sensor network
CN108551692A (en) Primary and secondary routing intelligence matching method and its system
CN109922159B (en) Cloud bidirectional virtual connection method between Internet of things devices
CN106878447B (en) Data acquisition system based on ZigBee communication

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