Summary of the invention
In view of the above-mentioned problems, the present invention provides a kind of data communications method, apparatus and system.
The purpose of the present invention is realized using following technical scheme:
The first aspect of the present invention embodiment provides a kind of data communications method, comprising:
Remote data processing device receives the data of acquisition from network communication of wireless sensor subsystem;
Received data are compared the remote data processing device with the normal data prestored, received with determination
Whether data are abnormal, and when the data received are abnormal, the remote data processing device sends out abnormal data
It send to predetermined local device;
Wherein, the network communication of wireless sensor module includes the sensor node of multiple responsible acquisition data and is responsible for
The aggregation node of the data of each sensor node acquisition is converged, the remote data processing device and the aggregation node are established logical
News connection;Sensor node selects the mode and the convergence of direct communication or indirect communication according to the distance to aggregation node
Node communication, the direct communication is that the data of acquisition are directly sent to the aggregation node by sensor node, described indirect
The data of acquisition are sent to next-hop node for sensor node by communication, to forward the number of the acquisition by next-hop node
According to until the data of the acquisition are sent to aggregation node.
The present embodiment is based on wireless sensor network technology, realizes the wireless communication of data and the real-time prison to data
It surveys, without wiring, uses manpower and material resources sparingly;It, can more effectively more by the interaction of remote data processing device and local device
Data needed for user are presented to the user in real time.
In a kind of mode that can be realized, the remote data processing device is from network communication of wireless sensor subsystem
After the step of receiving the data of acquisition, this method further include:
Remote data processing device saves received data;
The access request of remote data processing device response local device, provide the operation interfaces of the data of preservation to
The local device;
The remote data processing device responds operation of the local device based on the operation interface.
In a kind of mode that can be realized, this method further include:
When the data received are abnormal, the remote data processing device display alarm information.
The second aspect of the present invention embodiment provides a kind of data communications method, this method comprises:
Network communication of wireless sensor subsystem acquires data;
The data of acquisition are sent to remote data processing device by the network communication of wireless sensor subsystem, by institute
It states remote data processing device and the data of the acquisition is compared with the normal data prestored, with the number of the determination acquisition
Whether according to being abnormal, the remote data processing device sends out abnormal data when the data of the acquisition are abnormal
It send to predetermined local device;
Wherein, the network communication of wireless sensor subsystem includes the sensor node of multiple responsible acquisition data and bears
The aggregation node for converging the data of each sensor node acquisition is blamed, the aggregation node leads to remote data processing device foundation is stated
News connection;Sensor node selects the mode and the convergence of direct communication or indirect communication according to the distance to aggregation node
Node communication, the direct communication is that the data of acquisition are directly sent to the aggregation node by sensor node, described indirect
The data of acquisition are sent to next-hop node for sensor node by communication, to forward the number of the acquisition by next-hop node
According to until the data of the acquisition are sent to aggregation node.
The third aspect of the present invention embodiment provides a kind of data communication equipment, which includes receiving module, communication
Module, processing module and control module, in which:
The receiving module is used to receive the data of acquisition from network communication of wireless sensor subsystem;
The processing module is for received data to be compared with the normal data prestored, with the received data of determination
Whether it is abnormal, obtains abnormal data;
The abnormal data are sent to predetermined user for controlling the communication module by the control module
Terminal;
Wherein, the network communication of wireless sensor subsystem includes the sensor node of multiple responsible acquisition data and bears
Duty converges the aggregation node of the data of each sensor node acquisition, and the communication module is for establishing and the aggregation node, institute
State the communication connection between user terminal;Sensor node according to aggregation node distance select direct communication or between connect
The mode of letter is communicated with the aggregation node, and the data of acquisition are directly sent to described by the direct communication for sensor node
Aggregation node, the data of acquisition are sent to next-hop node for sensor node by the indirect communication, by next-hop node
The data of the acquisition are forwarded, until the data of the acquisition are sent to aggregation node.
In a kind of mode in the cards of third aspect present invention, described device further includes memory module, described to deposit
Storage module is for saving the received data.
In a kind of mode in the cards of third aspect present invention, the control module is also used to:
The access request for responding local device controls the communication module and provides the operation interface of the data saved to described
Local device;
Respond operation of the local device based on the operation interface.
In a kind of mode in the cards of third aspect present invention, described device further includes alarm module, the report
Alert module is used for the display alarm information when received data are abnormal.
The fourth aspect of the present invention embodiment provides a kind of data communication system, and the system comprises Remote data processings
Device, network communication of wireless sensor subsystem and local device, the remote data processing device, wireless sensor network are logical
Letter subsystem and local device are for executing a kind of data communications method as described above.
The invention has the benefit that being based on wireless sensor network technology, the wireless communication of data is realized, is not necessarily to cloth
Line uses manpower and material resources sparingly;And the interaction by remote data processing device and local device, the processing to data is realized,
And more effectively various data are presented to the user.
Specific embodiment
The invention will be further described with the following Examples.
Referring to Fig. 1, the first aspect of the present invention embodiment provides a kind of data communications method, comprising:
Remote data processing device described in S1 receives the data of acquisition from network communication of wireless sensor subsystem.
Received data are compared remote data processing device described in S2 with the normal data prestored, are received with determining
Data whether be abnormal, when the data received are abnormal, the remote data processing device is by abnormal data
It is sent to predetermined local device.
Wherein, the network communication of wireless sensor module includes the sensor node of multiple responsible acquisition data and is responsible for
The aggregation node of the data of each sensor node acquisition is converged, the remote data processing device and the aggregation node are established logical
News connection;Sensor node selects the mode and the convergence of direct communication or indirect communication according to the distance to aggregation node
Node communication, the direct communication is that the data of acquisition are directly sent to the aggregation node by sensor node, described indirect
The data of acquisition are sent to next-hop node for sensor node by communication, to forward the number of the acquisition by next-hop node
According to until the data of the acquisition are sent to aggregation node.
The present embodiment is based on wireless sensor network technology, realizes the wireless communication of data, without wiring, saves manpower
Material resources;And the interaction by remote data processing device and local device, the processing to data is realized, and more effectively
Various data are presented to the user.
In a kind of mode that can be realized, the remote data processing device is from network communication of wireless sensor subsystem
After the step of receiving the data of acquisition, this method further include:
Remote data processing device saves received data;
The access request of remote data processing device response local device, provide the operation interfaces of the data of preservation to
The local device;
The remote data processing device responds operation of the local device based on the operation interface.
In a kind of mode that can be realized, this method further include:
When the data received are abnormal, the remote data processing device display alarm information.
As shown in Fig. 2, the second aspect of the present invention embodiment provides a kind of data communications method, this method comprises:
S01 network communication of wireless sensor subsystem acquires data.
The data of acquisition are sent to remote data processing device by network communication of wireless sensor subsystem described in S02, with
The data of the acquisition are compared with the normal data prestored by the remote data processing device, with the determination acquisition
Data whether be abnormal, the remote data processing device is when the data of the acquisition are abnormal, by abnormal number
According to being sent to predetermined local device;
Wherein, the network communication of wireless sensor subsystem includes the sensor node of multiple responsible acquisition data and bears
The aggregation node for converging the data of each sensor node acquisition is blamed, the aggregation node leads to remote data processing device foundation is stated
News connection;Sensor node selects the mode and the convergence of direct communication or indirect communication according to the distance to aggregation node
Node communication, the direct communication is that the data of acquisition are directly sent to the aggregation node by sensor node, described indirect
The data of acquisition are sent to next-hop node for sensor node by communication, to forward the number of the acquisition by next-hop node
According to until the data of the acquisition are sent to aggregation node.
As shown in figure 3, the third aspect of the present invention embodiment provides a kind of data communication equipment, which includes receiving
Module 1, communication module 2, processing module 3 and control module 4, in which:
The receiving module 1 is used to receive the data of acquisition from network communication of wireless sensor subsystem;
The processing module 3 is for received data to be compared with the normal data prestored, with the received number of determination
According to whether being abnormal, abnormal data are obtained;
The abnormal data are sent to predetermined use for controlling the communication module 2 by the control module 4
Family terminal;
Wherein, the network communication of wireless sensor subsystem includes the sensor node of multiple responsible acquisition data and bears
Duty converges the aggregation node of the data of each sensor node acquisition, and the communication module 2 is for establishing and the aggregation node, institute
State the communication connection between user terminal;Sensor node according to aggregation node distance select direct communication or between connect
The mode of letter is communicated with the aggregation node, and the data of acquisition are directly sent to described by the direct communication for sensor node
Aggregation node, the data of acquisition are sent to next-hop node for sensor node by the indirect communication, by next-hop node
The data of the acquisition are forwarded, until the data of the acquisition are sent to aggregation node.
In a kind of mode in the cards of third aspect present invention, described device further includes memory module, described to deposit
Storage module is for saving the received data.
In a kind of mode in the cards of third aspect present invention, the control module 4 is also used to:
The access request for responding local device controls the communication module 2 and provides the operation interface of the data saved to institute
State local device;
Respond operation of the local device based on the operation interface.
In a kind of mode in the cards of third aspect present invention, described device further includes alarm module, the report
Alert module is used for the display alarm information when received data are abnormal.
As shown in figure 4, the fourth aspect of the present invention embodiment provides a kind of data communication system, the system comprises remote
Journey data processing equipment 10, network communication of wireless sensor subsystem 20 and local device 30, the remote data processing device
10, network communication of wireless sensor subsystem 20 and local device 30 are for executing a kind of data communications method as described above.
In a kind of data communications method, apparatus and system of above-described embodiment, the local device include Android device,
At least one of iOS device, personal computer, embedded board and page client.
In a kind of data communications method, apparatus and system of above-described embodiment, sensor node according to arrive aggregation node
Distance selection direct communication or the mode of indirect communication communicated with the aggregation node, specifically:
(1) distance for setting nearest apart from aggregation node, secondary close sensor node to aggregation node is respectively Hmin0、Hmin1,
Set initial distance threshold asWhen initial, the distance of sensor node to aggregation node is less thanWhen, it selects the mode of direct communication to communicate with the aggregation node, is more thanWhen, then it selects
The mode for selecting indirect communication is communicated with the aggregation node;
(2) every a preset period Δ T0, for aggregation node by the data interaction with each sensor node, acquisition is each
The energy datum and position data of sensor node, and judged whether to meet following energy according to the energy datum and position data
Amount condition if satisfied, aggregation node raises current distance threshold, and the distance threshold of up-regulation is broadcasted to each sensing
Device node:
In formula, i indicates that the distance of aggregation node, i-th of sensor node for being no more than current distance threshold, j indicate
Distance to aggregation node is more than j-th of sensor node of current distance threshold, L1Do not surpass for the distance to aggregation node
Cross the sensor node quantity of current distance threshold, L2For the sensing for the distance of aggregation node being more than current distance threshold
Device number of nodes, PiFor the current remaining of i-th of sensor node, PjFor the current of j-th of sensor node
Dump energy, σ are preset energy proportion threshold value, and the value range of σ is) 1.25,1.35].
The present embodiment set initial distance threshold asEnsured sensor node directly with convergence
Node communication.The present embodiment further provides the energy condition for judging whether to need to raise distance threshold, realizes sensor
Switching of the node between direct communication mode and indirect communication mode, increases the flexibility of data communication;It is pre- every one
If period Δ T0, aggregation node only just carries out distance threshold when the energy datum of each sensor node meets the condition
Up-regulation avoids meaningless threshold distance up-regulation bring energy consumption.
In the present embodiment, energy condition has screened out maximum residual energy when calculating the average residual energy of sensor node
The case where with least residue energy, so that more accurate to the calculating of the average residual energy;The energy condition saves convergence
Point is lower than one relative to the average residual energy of the sensor node of distant place in the average residual energy of the sensor node of attachment
When certainty ratio, distance threshold is increased in time, the task of data forwarding is undertaken to promote more sensor nodes, to reduce
Originally the pressure with the sensor node of aggregation node direct communication in terms of forwarding data is further conducive to avoid energy empty
The phenomenon that hole, improves the stability of wireless sensor network operation.
In one embodiment, aggregation node according to the following formula raises current distance threshold:
In formula, HT' for up-regulation after distance threshold, HTFor up-regulation before distance threshold,For to aggregation node away from
Average value with a distance from all the sensors node to aggregation node more than current distance threshold,To be saved to convergence
The distance of point be less than all the sensors node of current distance threshold to aggregation node distance average value;
Work as HT' reach it is preset apart from the upper limit or up-regulation number reach preset frequency threshold value when, stop distance threshold value
Up-regulation.
The present embodiment proposes the up-regulation formula of distance threshold, the formula with to the distance of aggregation node be more than it is current away from
Increase part of the average value with a distance from all the sensors node to aggregation node as distance threshold from threshold value, and with opposite
Dump energy increases the influence factor of part than the comparison result with energy proportion threshold value as influence distance threshold, so that distance
The increase of threshold value can change with the variation of the dump energy of sensor node, the distance threshold after advantageously allowing up-regulation
More suitable current network condition, ensures that a certain number of neighbours' sensor nodes are added to and aggregation node direct communication
Sensor node set.
In one embodiment, when initial, sensor node is in the proximity sense closer apart from aggregation node relative to it
In device node, select apart from nearest sensor node as next-hop node;Next-hop node according to setting period Δ T1
The current remaining and available cache memory size of time recording oneself, since second period, next-hop node judges whether
Meet following early-warning conditions, if satisfied, next-hop node sends feedback data to the sensor node, which is received
After feedback data, relative to it in the closer proximity sensor node of aggregation node, selection with the next-hop node away from
From nearest sensor node as new next-hop:
In formula, Pw(u) indicate that next-hop node w currently judges the current remaining of periodic recording u-th of period,
Pw(u-1) current remaining of the expression next-hop node w in the u-1 periodic recording, u >=2,To judge value function, whenWhen, WhenWhen,Sw(u) for next-hop node w u-th period be currently judge periodic recording can
With the size of caching, SwIt (u-1) is size of the next-hop node w in the available cache memory of the u-1 periodic recording, SminFor setting
Minimum cache threshold.
The feedback early warning mechanism of next-hop node is present embodiments provided, wherein it is every innovatively to set next-hop node
The early-warning conditions of own situation are judged every a cycle Δ T.It is in the prior art generally only the current residual in next-hop node
Reselecting for next-hop node is carried out when energy is lower than minimum energy, and in the present embodiment, which considers energy consumption
The case where rate and available cache memory, so that having more robustness and accuracy to the determination of the actual conditions of next-hop node.
In the present embodiment, which sends early warning to a jump set sensor node thereon when meeting the early-warning conditions
Message promotes the sensor node for receiving the early warning information to reselect next-hop node, advantageously reduce next-hop node because
For energy consumption is too fast or following caching is insufficient and the probability of packet loss, and then improve the reliability and efficiency of data communication.
It is apparent to those skilled in the art that for convenience and simplicity of description, only with above-mentioned each function
The division progress of module can according to need and for example, in practical application by above-mentioned function distribution by different function moulds
Block is completed, i.e., the internal structure of system is divided into different functional modules, to complete all or part of function described above
Energy.The system of foregoing description and the specific work process of terminal, can refer to corresponding processes in the foregoing method embodiment, herein
It repeats no more.
Through the above description of the embodiments, those skilled in the art can be understood that it should be appreciated that can
To realize the embodiments described herein with hardware, software, firmware, middleware, code or its any appropriate combination.For hardware
It realizes, processor can be realized in one or more the following units: specific integrated circuit, digital signal processor, number letter
Number processing system, field programmable gate array, processor, controller, microcontroller, microprocessor, is set programmable logic device
Count other electronic units or combinations thereof for realizing functions described herein.For software implementations, the part of embodiment or complete
Portion's process can instruct relevant hardware to complete by computer program.When realization, above procedure can be stored in meter
It instructs in calculation machine readable medium or as the one or more on computer-readable medium or code is transmitted.It is computer-readable
Medium includes computer storage media and communication media, and wherein communication media includes convenient for passing from a place to another place
Send any medium of computer program.Storage medium can be any usable medium that computer can access.It is computer-readable
Medium can include but is not limited to random access memory, read-only memory mirror image, band Electrically Erasable Programmable Read-Only Memory or its
His optical disc storage, magnetic disk storage medium or other magnetic-memory systems or it can be used in carrying or storing that there is instruction or number
According to structure type desired program code and can be by any other medium of computer access.
Finally it should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, rather than the present invention is protected
The limitation of range is protected, although explaining in detail referring to preferred embodiment to the present invention, those skilled in the art are answered
Work as understanding, it can be with modification or equivalent replacement of the technical solution of the present invention are made, without departing from the reality of technical solution of the present invention
Matter and range.