CN109640327B - Data communication method and device based on Internet of things - Google Patents
Data communication method and device based on Internet of things Download PDFInfo
- Publication number
- CN109640327B CN109640327B CN201811558367.XA CN201811558367A CN109640327B CN 109640327 B CN109640327 B CN 109640327B CN 201811558367 A CN201811558367 A CN 201811558367A CN 109640327 B CN109640327 B CN 109640327B
- Authority
- CN
- China
- Prior art keywords
- cluster head
- data
- intelligent terminal
- cluster
- distance
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000004891 communication Methods 0.000 title claims abstract description 137
- 238000000034 method Methods 0.000 title claims abstract description 33
- 238000012795 verification Methods 0.000 claims abstract description 24
- 230000002159 abnormal effect Effects 0.000 claims abstract description 21
- 241000854291 Dianthus carthusianorum Species 0.000 claims description 151
- 230000002776 aggregation Effects 0.000 claims description 22
- 238000004220 aggregation Methods 0.000 claims description 22
- 238000005265 energy consumption Methods 0.000 claims description 7
- 238000012545 processing Methods 0.000 claims description 7
- 230000006855 networking Effects 0.000 claims description 3
- 238000012544 monitoring process Methods 0.000 description 9
- 238000005516 engineering process Methods 0.000 description 6
- 230000006870 function Effects 0.000 description 6
- 230000007246 mechanism Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 3
- 230000003993 interaction Effects 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 238000004590 computer program Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 2
- 230000002411 adverse Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 150000001875 compounds Chemical class 0.000 description 1
- 238000013480 data collection Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 230000002349 favourable effect Effects 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 230000036541 health Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000737 periodic effect Effects 0.000 description 1
- 229920001690 polydopamine Polymers 0.000 description 1
- 230000002035 prolonged effect Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/06—Authentication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/46—Cluster building
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
- H04L63/0823—Network architectures or network communication protocols for network security for authentication of entities using certificates
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
- H04L63/083—Network architectures or network communication protocols for network security for authentication of entities using passwords
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W40/00—Communication routing or communication path finding
- H04W40/02—Communication route or path selection, e.g. power-based or shortest path routing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
- H04W76/18—Management of setup rejection or failure
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The invention provides a data communication method, a device and a system based on the Internet of things, wherein the method comprises the following steps: the cloud server module receives and stores the acquired data from the wireless sensor network module through the wireless communication module; the cloud server module receives an identity authentication request sent by an intelligent terminal in the local equipment module; the cloud server module verifies the intelligent terminal according to the identity authentication request, and after the verification is successful, communication connection is established with the intelligent terminal; the cloud server module compares the received acquired data with prestored standard data to determine whether the acquired data is abnormal, and when the acquired data is abnormal, the cloud server module sends the abnormal data to an intelligent terminal which establishes communication with the cloud server module.
Description
Technical Field
The invention relates to the technical field of Internet of things, in particular to a data communication method, device and system based on the Internet of things.
Background
With the development of science and technology, early manual monitoring is basically eliminated, a traditional method is to send people to handheld detection equipment in each monitoring area for monitoring, and input acquired data into a related system, the monitoring method is low in efficiency and high in cost, and a user cannot acquire required data in real time.
With the development of computer technology and wireless sensor network technology, a possible method and means are provided for wireless monitoring in a wide area. The wireless sensor network is a network formed by a large number of wireless sensor nodes in a self-organizing mode, has the characteristics of high sensor node density, frequent network topology change, limited node power, computing capacity and data storage capacity and the like, and has wide application prospects in the fields of environmental monitoring military, medical health, household intelligent monitoring and other commercial fields. However, the existing wireless sensor network still has more defects due to the limited energy of the sensor nodes.
The internet of Things (IOT), which is an extension and extension of the internet foundation, is a dynamic global network infrastructure with standards-based and interoperable communication protocol-based ad hoc capability in which physical and virtual "Things" have identity, physical attributes, virtual features and intelligent interfaces and are seamlessly integrated with information networks. The key technology of the internet of things comprises Radio Frequency Identification (RFID), a sensor network, M2M, two-way fusion and the like. The internet of things is a huge Network formed by combining various information sensing devices, such as various devices of Wireless Sensor Network (WSN) nodes, RFID devices, infrared sensors, mobile phones, PDAs, Global Positioning Systems (GPS), laser scanners and the like, with the internet. In modern society, the application of the internet of things is quite wide.
Disclosure of Invention
In order to solve the problems, the invention provides a data communication method, a data communication device and a data communication system based on the Internet of things.
The purpose of the invention is realized by adopting the following technical scheme:
an embodiment of a first aspect of the present invention provides a data communication method based on the internet of things, where the method includes:
the cloud server module receives and stores the acquired data from the wireless sensor network module through the wireless communication module;
the cloud server module receives an identity authentication request sent by an intelligent terminal in the local equipment module;
the cloud server module verifies the intelligent terminal according to the identity authentication request, and after the verification is successful, communication connection is established with the intelligent terminal;
the cloud server module compares the received acquired data with prestored standard data to determine whether the acquired data is abnormal, and when the acquired data is abnormal, the cloud server module sends the abnormal data to an intelligent terminal which establishes communication with the cloud server module;
the wireless sensor network module comprises a single aggregation node, a plurality of sensor nodes and a plurality of cluster heads, each sensor node selects the cluster head closest to the sensor node to join in a cluster, and the cloud server module is in data communication with the aggregation node; the sensor nodes are responsible for collecting data, the cluster heads are responsible for collecting data collected by each sensor node in a cluster, each cluster head selects a direct communication mode or an indirect communication mode according to the distance to the sink node and communicates with the sink node, the direct communication is directly collected for the cluster heads, the collected data are sent to the sink node, the indirect communication is received for the cluster heads, the collected data are sent to a next hop node, and the collected data are forwarded by the next hop node until the collected data are sent to the sink node.
In an implementation manner of the embodiment of the first aspect of the present invention, the identity authentication request includes a certificate, the cloud server module verifies the certificate, and if the certificate is correct, it is determined that the verification is successful.
In another implementation manner of the embodiment of the first aspect of the present invention, the identity authentication request includes a key, the cloud server module verifies the key, and if the key is correct, it is determined that the verification is successful.
In a manner that can be implemented in the embodiment of the first aspect of the present invention, after the verification of the intelligent terminal is successful, the method further includes:
the cloud server module detects the number of times of sending identity authentication requests by the intelligent terminal, and refuses to establish connection with the intelligent terminal when the number of times of sending identity authentication requests is larger than a preset threshold value.
In a manner that can be implemented in the embodiment of the first aspect of the present invention, after the verification of the intelligent terminal is successful, the method further includes:
the cloud server module responds to an access request of the intelligent terminal and provides an operation interface of stored data to the intelligent terminal;
and the cloud server module responds to the operation of the intelligent terminal based on the operation interface.
In a second aspect, an embodiment of the present invention provides an internet-of-things-based data communication apparatus, where the apparatus includes:
the receiving unit is communicated with the wireless communication module, is used for receiving the acquired data from the wireless sensor network module through the wireless communication module, and is also used for receiving an identity authentication request sent by an intelligent terminal in the local equipment module;
the storage unit is used for storing the acquired data;
the verification unit is used for verifying the intelligent terminal according to the identity authentication request;
the control unit is used for controlling the sending unit to establish communication connection with the intelligent terminal after the verification unit successfully verifies the intelligent terminal;
the processing unit is used for comparing the acquired data with pre-stored standard data to determine whether the acquired data is abnormal or not;
the sending unit is used for sending the abnormal data to an intelligent terminal which establishes communication with the acquired data when the acquired data is abnormal;
the wireless sensor network module comprises a single aggregation node, a plurality of sensor nodes and a plurality of cluster heads, each sensor node selects the cluster head closest to the sensor node to join in a cluster, and the cloud server module is in data communication with the aggregation node; the sensor nodes are responsible for collecting data, the cluster heads are responsible for collecting data collected by each sensor node in a cluster, each cluster head selects a direct communication mode or an indirect communication mode according to the distance to the sink node and communicates with the sink node, the direct communication is directly collected for the cluster heads, the collected data are sent to the sink node, the indirect communication is received for the cluster heads, the collected data are sent to a next hop node, and the collected data are forwarded by the next hop node until the collected data are sent to the sink node.
In an implementation manner of the embodiment of the second aspect of the present invention, after the verification unit successfully verifies the smart terminal, the verification unit is further configured to:
and detecting the number of times of sending the identity authentication request by the intelligent terminal, and refusing to establish connection with the intelligent terminal when the number of times of sending the identity authentication request is greater than a preset threshold value.
In an implementation manner of the embodiment of the first aspect of the present invention, after the verification unit successfully verifies the intelligent terminal, the control unit responds to an access request of the intelligent terminal, and controls the sending unit to provide an operation interface of the stored data to the intelligent terminal;
and the control unit responds to the operation of the intelligent terminal based on the operation interface.
A third aspect of the present invention provides an internet of things based data communication system, which includes a cloud server module, a wireless communication module, a local device module, and a wireless sensor network module for executing the internet of things based data communication method as described above.
The local equipment module comprises at least one intelligent terminal, and networking and communication are performed between the intelligent terminals through Zigbee or Wifi.
The intelligent terminal comprises at least one of android equipment, iOS equipment, a personal computer, an embedded board card and a page client.
The embodiment of the invention is based on the wireless sensor network technology, realizes the wireless communication of data and the real-time monitoring and processing of the data, does not need wiring, and saves manpower and material resources; through the interaction between the cloud server module and the intelligent terminal, the data required by the user can be more effectively presented to the user in real time; by carrying out identity authentication on the intelligent terminal, the protection of data privacy is realized.
Drawings
The invention is further illustrated by means of the attached drawings, but the embodiments in the drawings do not constitute any limitation to the invention, and for a person skilled in the art, other drawings can be obtained on the basis of the following drawings without inventive effort.
Fig. 1 is a flow chart diagram of a data communication method based on the internet of things according to an exemplary embodiment of the present invention;
fig. 2 is a block diagram schematically illustrating a structure of a data communication apparatus based on the internet of things according to an exemplary embodiment of the present invention;
fig. 3 is a block diagram schematically illustrating a structure of a data communication system based on the internet of things according to an exemplary embodiment of the present invention.
Reference numerals:
the system comprises a receiving unit 1, a storage unit 2, a verification unit 3, a control unit 4, a processing unit 5, a transmitting unit 6, a cloud server module 10, a wireless communication module 20, a local equipment module 30 and a wireless sensor network module 40.
Detailed Description
The invention is further described with reference to the following examples.
Referring to fig. 1, an embodiment of a first aspect of the present invention provides a data communication method based on the internet of things, where the method includes:
and S01, the cloud server module receives and stores the collected data from the wireless sensor network module through the wireless communication module. The wireless sensor network module comprises a single aggregation node, a plurality of sensor nodes and a plurality of cluster heads, each sensor node selects the cluster head closest to the sensor node to join in a cluster, and the cloud server module is in data communication with the aggregation node; the sensor nodes are responsible for collecting data, the cluster heads are responsible for collecting data collected by each sensor node in a cluster, each cluster head selects a direct communication mode or an indirect communication mode according to the distance to the sink node and communicates with the sink node, the direct communication is directly collected for the cluster heads, the collected data are sent to the sink node, the indirect communication is received for the cluster heads, the collected data are sent to a next hop node, and the collected data are forwarded by the next hop node until the collected data are sent to the sink node.
S02, the cloud server module receives the identity authentication request sent by the intelligent terminal in the local equipment module.
S03, the cloud server module verifies the intelligent terminal according to the identity authentication request, and after the verification is successful, the cloud server module establishes communication connection with the intelligent terminal. In one embodiment, the identity authentication request includes a certificate, and the cloud server module verifies the certificate, and if the certificate is correct, it is determined that the verification is successful. In another embodiment, the identity authentication request includes a key, the cloud server module verifies the key, and if the key is correct, it is determined that the verification is successful.
S04, the cloud server module compares the received acquired data with pre-stored standard data to determine whether the acquired data is abnormal, and when the acquired data is abnormal, the cloud server module sends the abnormal data to an intelligent terminal which establishes communication with the intelligent terminal.
In a manner that can be implemented in the embodiment of the first aspect of the present invention, after the verification of the intelligent terminal is successful, the method further includes:
the cloud server module detects the number of times of sending identity authentication requests by the intelligent terminal, and refuses to establish connection with the intelligent terminal when the number of times of sending identity authentication requests is larger than a preset threshold value.
In a manner that can be implemented in the embodiment of the first aspect of the present invention, after the verification of the intelligent terminal is successful, the method further includes:
the cloud server module responds to an access request of the intelligent terminal and provides an operation interface of stored data to the intelligent terminal;
and the cloud server module responds to the operation of the intelligent terminal based on the operation interface.
As shown in fig. 2, a second embodiment of the present invention provides an internet-of-things-based data communication apparatus, including:
the receiving unit 1 is communicated with the wireless communication module, is used for receiving the acquired data from the wireless sensor network module through the wireless communication module, and is also used for receiving an identity authentication request sent by an intelligent terminal in the local equipment module;
the storage unit 2 is used for storing the acquired data;
the verification unit 3 is used for verifying the intelligent terminal according to the identity authentication request;
the control unit 4 is used for controlling the sending unit 6 to establish communication connection with the intelligent terminal after the verification unit 3 successfully verifies the intelligent terminal;
the processing unit 5 is used for comparing the acquired data with pre-stored standard data to determine whether the acquired data is abnormal or not;
the sending unit 6 is used for sending the abnormal data to an intelligent terminal which establishes communication with the acquired data when the acquired data is abnormal;
the wireless sensor network module comprises a single aggregation node, a plurality of sensor nodes and a plurality of cluster heads, each sensor node selects the cluster head closest to the sensor node to join in a cluster, and the cloud server module is in data communication with the aggregation node; the sensor nodes are responsible for collecting data, the cluster heads are responsible for collecting data collected by each sensor node in a cluster, each cluster head selects a direct communication mode or an indirect communication mode according to the distance to the sink node and communicates with the sink node, the direct communication is directly collected for the cluster heads, the collected data are sent to the sink node, the indirect communication is received for the cluster heads, the collected data are sent to a next hop node, and the collected data are forwarded by the next hop node until the collected data are sent to the sink node.
In an implementation manner of the embodiment of the second aspect of the present invention, after the verification unit 3 successfully verifies the smart terminal, the verification unit 3 is further configured to:
and detecting the number of times of sending the identity authentication request by the intelligent terminal, and refusing to establish connection with the intelligent terminal when the number of times of sending the identity authentication request is greater than a preset threshold value.
In an implementation manner of the embodiment of the second aspect of the present invention, after the authentication unit 3 successfully authenticates the intelligent terminal, the control unit 4 responds to an access request of the intelligent terminal, and controls the sending unit 6 to provide an operation interface of the stored data to the intelligent terminal;
and the control unit 4 responds to the operation of the intelligent terminal based on the operation interface.
As shown in fig. 3, a third aspect embodiment of the present invention provides an internet of things-based data communication system, which includes a cloud server module 10, a wireless communication module 20, a local device module 30, and a wireless sensor network module 40 for executing the internet of things-based data communication method as described above.
The local device module 30 includes at least one intelligent terminal, and each intelligent terminal performs networking and communication through Zigbee or Wifi.
The intelligent terminal comprises at least one of android equipment, iOS equipment, a personal computer, an embedded board card and a page client.
The embodiment of the invention is based on the wireless sensor network technology, realizes the wireless communication of data and the real-time monitoring and processing of the data, does not need wiring, and saves manpower and material resources; through the interaction between the cloud server module and the intelligent terminal, the data required by the user can be more effectively presented to the user in real time; by carrying out identity authentication on the intelligent terminal, the protection of data privacy is realized.
In the architecture of the internet of things system and the data communication method according to the above embodiments, each cluster head selects a mode of direct communication or indirect communication according to a distance to a sink node to communicate with the sink node, including:
(1) initially, when the distance between the cluster head and the sink node does not exceed a set distance upper limit, the sensor node selects a direct communication mode; otherwise, the cluster head selects an indirect communication mode;
(2) a predetermined period DeltaT0At each lapse of one period Δ T0The sink node collects the current residual energy of the cluster head directly communicated with the sink node, and calculates the corresponding median P according to the current residual energymedAnd is combined with PmedInformation is sent to a cluster head in direct communication with the information; the cluster head in direct communication therewith is according to PmedUpdating the distance upper limit if the distance between the cluster head in direct communication with the cluster head and the sink node exceeds the distance between the cluster head and the sink nodeIf the distance upper limit is updated, the cluster head which is directly communicated with the cluster head enters a sleep mode, or the communication mode is switched into an indirect communication mode; wherein, the update formula of the distance upper limit is as follows:
in the formula (I), the compound is shown in the specification,distance ceiling, S, updated for cluster head i in direct communication with sink noderIs the set upper distance limit, Pi0Is the initial energy of the cluster head i, PiIs the current remaining energy of the cluster head i, d1For a predetermined energy consumption influencing factor, d1Has a value range of [0.1,0.2 ]],w1、w2Is a preset weight coefficient, and w1+w2=1,f(Pmed-Pi) To determine the value function, when Pmed-PiAt > 0, f (P)med-Pi) When P is equal to 1med-PiWhen f is less than or equal to 0, f (P)med-Pi)=0;
Wherein, if the update times of the distance upper limit reaches the time threshold, or the updated distance upper limit is lower than SrAt/2, the cluster head will stop updating the distance upper bound.
The neighbor cluster head is other cluster heads located in the communication range of the cluster head.
The present embodiment changes the communication mode of a cluster head in direct communication with a sink node by performing a periodic update of the distance upper limit, in which an update formula of the distance upper limit is creatively set. According to the formula, the distance upper limit is gradually reduced along with the increase of the energy consumption of the cluster head, and the reduction degree is larger when the energy of the cluster head is lower than the residual energy median of the cluster heads around the sink node.
According to the embodiment, the cluster heads with the energy lower than the median value can be prompted to switch the communication mode or enter the dormant mode as soon as possible, and through the mechanism that the cluster heads enter the dormant mode or select the successive cluster heads, the excessive energy consumption of the cluster heads which are in direct communication with the sink nodes and far away from the sink nodes can be effectively avoided, the loads of the cluster heads around the sink nodes are effectively balanced, and the phenomenon of energy holes is reduced, so that the working period of the sensor nodes is prolonged integrally, and the stability of data communication is improved.
In an embodiment, the cluster head in direct communication with the cluster head enters a sleep mode, or switches the communication mode to an indirect communication mode, specifically:
(1) when the distance between the cluster head and the sink node exceeds the updated upper distance limit, the cluster head performs information interaction with each neighbor cluster head to acquire the position information of each neighbor cluster head, and if no neighbor cluster head closer to the sink node relative to the cluster head exists, the cluster head enters a sleep mode;
(2) if a neighbor cluster head closer to the sink node relative to the sink node exists, the cluster head switches the communication mode to an indirect communication mode, and selects a next hop node from the neighbor cluster head closer to the sink node:
1) if only 1 neighbor cluster head is close to the sink node relative to the sink node, the cluster head directly selects the neighbor cluster head as a next hop node;
2) if a plurality of neighbor cluster heads are close to the aggregation node relative to the aggregation node, the cluster head sends request information to all neighbor cluster heads close to the aggregation node relative to the aggregation node, and the first neighbor cluster head feeding back the request information is selected as a next hop node;
after receiving the request information, the neighbor cluster head judges whether the neighbor cluster head meets the following assisted forwarding conditions, and if the neighbor cluster head meets the following assisted forwarding conditions, the neighbor cluster head feeds back the request information to the cluster head sending the request information:
in the formula, PxjIndicating the current remaining energy of the jth neighbor cluster head that received the cluster head x request message,to determine the value function, whenWhen the temperature of the water is higher than the set temperature,when the temperature of the water is higher than the set temperature,Exjthe current cache size occupied by the cache data packet for the jth neighbor cluster head, Exj0Is the initial buffer space size of the jth neighbor node, S (x, j) is the distance between the cluster head x and the jth neighbor cluster head, S0Is a preset data packet forwarding unit distance, B is a preset distance-based unit data congestion delay factor, and the value range of B is [0.01,0.03 ]]Tau is a preset cache efficiency threshold value, and the value range of tau is [0.5,0.6 ]]。
In this embodiment, the cluster head selects to enter the sleep mode or switch the communication mode to the indirect communication mode according to whether there is a neighboring cluster head closer to the sink node than the neighboring cluster head, so that excessive energy consumption of the cluster head when the energy is not enough to maintain direct communication with the sink node can be effectively avoided. In the present embodiment, when the cluster head is switched to the indirect communication mode, a selection mechanism of a next hop node and a corresponding assisted forwarding condition are innovatively set for the cluster head, in the mechanism, a neighbor cluster head judges whether the assisted forwarding condition is met according to the energy and cache efficiency of the neighbor cluster head, and then selects whether to send feedback information to the cluster head sending the request information, so as to race for the next hop node. The mechanism can prompt the cluster head to select the neighbor cluster head with enough energy and high caching efficiency as the next hop node as much as possible, is favorable for reducing the probability of packet loss of the next hop node due to too slow data caching or insufficient energy, and further improves the reliability and efficiency of data communication. On the other hand, compared with a mode that each neighbor cluster head is directly judged by a cluster head, the method and the device are more beneficial to improving the selection efficiency of the next hop node and reducing the energy consumption of selecting the next hop node by the cluster head.
In one embodiment, before entering the sleep mode, a cluster head in direct communication with a sink node selects a sensor node with the largest weight as a successor cluster head in a cluster, the successor cluster head selects the direct communication mode to communicate with the sink node, and the weight is calculated according to the formula:
in the formula, VabThe weight value P of the b-th sensor node in the cluster where the cluster head a enters the sleep mode isabIs the current remaining energy, P, of the b-th sensor nodeab0Is the initial energy of the b-th sensor node, H (P)ab-Pmed) To determine the value function, when Pab-PmedWhen not less than 0, H (P)ab-Pmed) When P is equal to 1ab-PmedWhen < 0, H (P)ab-Pmed) 0; s (a, b) is the distance between the cluster head a and the b-th sensor node, SrIs the set upper limit of the distance, ZaThe number of neighbor nodes of the cluster head a, ZbThe number of neighbor nodes of the b-th sensor node, Za∩ZbThe number of neighbor nodes shared by the cluster head a and the b-th sensor node, d2Is a predetermined distance-influencing factor, d3Is a preset social relevance influence factor, d2Has a value range of [0.4,0.5 ]],d3Has a value range of [0.3,0.4 ]]。
The embodiment creatively sets a selection mechanism of the successor cluster heads, wherein a calculation formula of the weight is set. Through the weight calculation formula, the energy advantages and the position advantages of each neighbor node can be effectively measured, so that the cluster head is helped to select the best relay cluster head as far as possible, and the data collection and assisted forwarding tasks originally borne by the cluster head are better completed. The selection mechanism is utilized to determine the relay cluster head, so that adverse effects on data communication caused by the cluster head entering the sleep mode can be reduced as much as possible, and the running stability of the wireless sensor network is guaranteed.
It will be clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be performed by different functional modules according to needs, that is, the internal structure of the system is divided into different functional modules to perform all or part of the above described functions. For the specific working process of the system and the terminal described above, reference may be made to the corresponding process in the foregoing method embodiment, which is not described herein again.
From the above description of embodiments, it is clear for a person skilled in the art that the embodiments described herein can be implemented in hardware, software, firmware, middleware, code or any appropriate combination thereof. For a hardware implementation, a processor may be implemented in one or more of the following units: an application specific integrated circuit, a digital signal processor, a digital signal processing system, a programmable logic device, a field programmable gate array, a processor, a controller, a microcontroller, a microprocessor, other electronic units designed to perform the functions described herein, or a combination thereof. For a software implementation, some or all of the procedures of an embodiment may be performed by a computer program instructing associated hardware. In practice, the program may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a computer. The computer-readable medium can include, but is not limited to, random access memory, read only memory images, electrically erasable programmable read only memory or other optical disk storage, magnetic disk storage media or other magnetic storage systems, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer.
Finally, it should be noted that the above embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the protection scope of the present invention, although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions can be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.
Claims (6)
1. The data communication method based on the Internet of things is characterized by comprising the following steps:
the cloud server module receives and stores the acquired data from the wireless sensor network module through the wireless communication module;
the cloud server module receives an identity authentication request sent by an intelligent terminal in the local equipment module;
the cloud server module verifies the intelligent terminal according to the identity authentication request, and after the verification is successful, communication connection is established with the intelligent terminal;
the cloud server module compares the received acquired data with prestored standard data to determine whether the acquired data is abnormal, and when the acquired data is abnormal, the cloud server module sends the abnormal data to an intelligent terminal which establishes communication with the cloud server module;
the wireless sensor network module comprises a single aggregation node, a plurality of sensor nodes and a plurality of cluster heads, each sensor node selects the cluster head closest to the sensor node to join in a cluster, and the cloud server module is in data communication with the aggregation node; the sensor nodes are responsible for collecting data, the cluster heads are responsible for collecting the data collected by each sensor node in a cluster, each cluster head selects a direct communication mode or an indirect communication mode to communicate with the sink nodes according to the distance from the cluster head to the sink nodes, the direct communication is that the cluster heads directly send the collected data to the sink nodes, and the indirect communication is that the cluster heads send the received collected data to next-hop nodes so as to forward the collected data by the next-hop nodes until the collected data is sent to the sink nodes; each cluster head selects a direct communication mode or an indirect communication mode to communicate with the aggregation node according to the distance from the aggregation node, and the method comprises the following steps:
(1) initially, when the distance between the cluster head and the sink node does not exceed the set upper distance limit, the cluster head selects a direct communication mode; otherwise, the cluster head selects an indirect communication mode;
(2) a predetermined period DeltaT0At each lapse of one period Δ T0The sink node collects the current residual energy of the cluster head directly communicated with the sink node, and calculates the corresponding median P according to the current residual energymedAnd is combined with PmedInformation is sent to a cluster head in direct communication with the information; the cluster head in direct communication therewith is according to PmedUpdating the distance upper limit, and if the distance between the cluster head in direct communication with the cluster head and the sink node exceeds the updated distance upper limit, the cluster head in direct communication with the cluster head enters a sleep mode or the communication mode is switched into an indirect communication mode; wherein, the update formula of the distance upper limit is as follows:
in the formula, Sri' distance Upper Limit, S, updated for Cluster head i communicating directly with the aggregation noderIs the set upper distance limit, Pi0Is the initial energy of the cluster head i, PiIs the current remaining energy of the cluster head i, d1For a predetermined energy consumption influencing factor, d1Has a value range of [0.1,0.2 ]],w1、w2Is a preset weight coefficient, and w1+w2=1,f(Pmed-Pi) To determine the value function, when Pmed-Pi>0, f (P)med-Pi) When P is equal to 1med-PiWhen f is less than or equal to 0, f (P)med-Pi)=0;
Wherein, if the update times of the distance upper limit reaches the time threshold, or the updated distance upper limit is lower than SrAt/2, the cluster head will stop updating the distance upper bound.
2. The data communication method based on the internet of things as claimed in claim 1, wherein after the intelligent terminal is successfully verified, the method further comprises the following steps:
the cloud server module detects the number of times of sending identity authentication requests by the intelligent terminal, and refuses to establish connection with the intelligent terminal when the number of times of sending identity authentication requests is larger than a preset threshold value.
3. The data communication method based on the internet of things as claimed in claim 1, wherein after the intelligent terminal is successfully verified, the method further comprises the following steps:
the cloud server module responds to an access request of the intelligent terminal and provides an operation interface of stored data to the intelligent terminal;
and the cloud server module responds to the operation of the intelligent terminal based on the operation interface.
4. Data communication device based on thing networking, characterized by, the device includes:
the receiving unit is communicated with the wireless communication module, is used for receiving the acquired data from the wireless sensor network module through the wireless communication module, and is also used for receiving an identity authentication request sent by an intelligent terminal in the local equipment module;
the storage unit is used for storing the acquired data;
the verification unit is used for verifying the intelligent terminal according to the identity authentication request;
the control unit is used for controlling the sending unit to establish communication connection with the intelligent terminal after the verification unit successfully verifies the intelligent terminal;
the processing unit is used for comparing the acquired data with pre-stored standard data to determine whether the acquired data is abnormal or not;
the sending unit is used for sending the abnormal data to an intelligent terminal which establishes communication with the acquired data when the acquired data is abnormal;
the wireless sensor network module comprises a single aggregation node, a plurality of sensor nodes and a plurality of cluster heads, each sensor node selects the cluster head closest to the sensor node to join in a cluster, and the cloud server module is in data communication with the aggregation node; the sensor nodes are responsible for collecting data, the cluster heads are responsible for collecting the data collected by each sensor node in a cluster, each cluster head selects a direct communication mode or an indirect communication mode to communicate with the sink nodes according to the distance from the cluster head to the sink nodes, the direct communication is that the cluster heads directly send the collected data to the sink nodes, and the indirect communication is that the cluster heads send the received collected data to next-hop nodes so as to forward the collected data by the next-hop nodes until the collected data is sent to the sink nodes; each cluster head selects a direct communication mode or an indirect communication mode to communicate with the aggregation node according to the distance from the aggregation node, and the method comprises the following steps:
(1) initially, when the distance between the cluster head and the sink node does not exceed the set upper distance limit, the cluster head selects a direct communication mode; otherwise, the cluster head selects an indirect communication mode;
(2) a predetermined period DeltaT0At each lapse of one period Δ T0The sink node collects the current residual energy of the cluster head directly communicated with the sink node, and calculates the corresponding median P according to the current residual energymedAnd is combined with PmedInformation is sent to a cluster head in direct communication with the information; the cluster head in direct communication therewith is according to PmedUpdating the distance upper limit, and if the distance between the cluster head in direct communication with the cluster head and the sink node exceeds the updated distance upper limit, the cluster head in direct communication with the cluster head enters a sleep mode or the communication mode is switched into an indirect communication mode; wherein, the update formula of the distance upper limit is as follows:
in the formula, Sri' distance Upper Limit, S, updated for Cluster head i communicating directly with the aggregation noderIs a stand forThe set upper limit of the distance, Pi0Is the initial energy of the cluster head i, PiIs the current remaining energy of the cluster head i, d1For a predetermined energy consumption influencing factor, d1Has a value range of [0.1,0.2 ]],w1、w2Is a preset weight coefficient, and w1+w2=1,f(Pmed-Pi) To determine the value function, when Pmed-Pi>0, f (P)med-Pi) When P is equal to 1med-PiWhen f is less than or equal to 0, f (P)med-Pi)=0;
Wherein, if the update times of the distance upper limit reaches the time threshold, or the updated distance upper limit is lower than SrAt/2, the cluster head will stop updating the distance upper bound.
5. The data communication device based on the internet of things as claimed in claim 4, wherein after the authentication unit successfully authenticates the smart terminal, the authentication unit is further configured to:
and detecting the number of times of sending the identity authentication request by the intelligent terminal, and refusing to establish connection with the intelligent terminal when the number of times of sending the identity authentication request is greater than a preset threshold value.
6. The data communication device based on the internet of things of claim 4, wherein after the authentication unit successfully authenticates the intelligent terminal, the control unit responds to an access request of the intelligent terminal and controls the sending unit to provide an operation interface of the stored data to the intelligent terminal;
and the control unit responds to the operation of the intelligent terminal based on the operation interface.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201811558367.XA CN109640327B (en) | 2018-12-19 | 2018-12-19 | Data communication method and device based on Internet of things |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201811558367.XA CN109640327B (en) | 2018-12-19 | 2018-12-19 | Data communication method and device based on Internet of things |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN109640327A CN109640327A (en) | 2019-04-16 |
| CN109640327B true CN109640327B (en) | 2020-06-26 |
Family
ID=66075531
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201811558367.XA Active CN109640327B (en) | 2018-12-19 | 2018-12-19 | Data communication method and device based on Internet of things |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN109640327B (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112672301B (en) * | 2020-12-21 | 2022-05-17 | 兰州工业学院 | Network data aggregation method for wireless sensor |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109001394A (en) * | 2018-07-03 | 2018-12-14 | 深圳智达机械技术有限公司 | Farmland irrigating water's water quality monitoring system based on technology of Internet of things |
| CN109587649A (en) * | 2018-12-13 | 2019-04-05 | 深圳桓轩科技有限公司 | A kind of data communications method based on cloud service, apparatus and system |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20090065230A (en) * | 2007-12-17 | 2009-06-22 | 한국전자통신연구원 | Wireless sensor network having hierarchical structure and method for routing for the same |
-
2018
- 2018-12-19 CN CN201811558367.XA patent/CN109640327B/en active Active
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109001394A (en) * | 2018-07-03 | 2018-12-14 | 深圳智达机械技术有限公司 | Farmland irrigating water's water quality monitoring system based on technology of Internet of things |
| CN109587649A (en) * | 2018-12-13 | 2019-04-05 | 深圳桓轩科技有限公司 | A kind of data communications method based on cloud service, apparatus and system |
Also Published As
| Publication number | Publication date |
|---|---|
| CN109640327A (en) | 2019-04-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR101648434B1 (en) | Method and apparatus for controlling signal transmission, electronic device, program and recording medium | |
| US20130331118A1 (en) | Performing enhanced background location scans to facilitate location-based geo-fencing | |
| US9320004B2 (en) | Communication apparatus, control method for communication apparatus, and storage medium storing program | |
| CN103987042A (en) | Terminal access authentication method and access gateway | |
| US20180252533A1 (en) | Causing a transition between positioning modes | |
| CN109361774A (en) | A kind of Internet of things system framework and data communications method | |
| WO2016098205A1 (en) | Collection system, collection device, and power control method | |
| CN109361708A (en) | Data informationization acquisition, management and analysis system and method | |
| CN118104362A (en) | Electronic device and network communicating with each other using bandwidth portions and method of operating the same | |
| JP5655192B2 (en) | Control device | |
| CN109640327B (en) | Data communication method and device based on Internet of things | |
| CN109587649A (en) | A kind of data communications method based on cloud service, apparatus and system | |
| CN109587716A (en) | A kind of data communications method, apparatus and system | |
| CN109890000B (en) | Internet of things system architecture and data communication method | |
| CN109714833B (en) | Data communication method, device and system | |
| JP2018195981A (en) | System and server for managing device position | |
| WO2018227709A1 (en) | Method for plurality of terminal devices to access internet of things, and access point device | |
| WO2018098748A1 (en) | Communication method in distributed network, node, and system | |
| CN109660966A (en) | A kind of Research on Vehicle Remote Monitoring System Based on GPRS and method | |
| CN109661012A (en) | Information collection and processing method, apparatus and system | |
| WO2018098749A1 (en) | Message broadcasting method in distributed network and node | |
| CN109768968B (en) | Data informatization acquisition and analysis system and method based on cloud computing | |
| CN109922449B (en) | Data informatization acquisition, management and analysis system and method | |
| CN104954148A (en) | Control method and device of node equipment and router | |
| CN117641538A (en) | Method and device for reducing power consumption of terminal |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| TA01 | Transfer of patent application right | ||
| TA01 | Transfer of patent application right |
Effective date of registration: 20200605 Address after: 215000 19 / F, No.99, nantiancheng Road, high speed rail new town, Suzhou, Jiangsu Province Applicant after: Ziguang cloud engine technology (Suzhou) Co., Ltd Address before: Room 601-A42, 88 Nantiancheng Road, Xiangcheng High-speed Railway New Town, Suzhou City, Jiangsu Province Applicant before: SUZHOU MAIRONGXIANG INFORMATION TECHNOLOGY Co.,Ltd. |