CN107949029B - Cluster head node routing method, device and medium based on wireless sensor network - Google Patents

Cluster head node routing method, device and medium based on wireless sensor network Download PDF

Info

Publication number
CN107949029B
CN107949029B CN201711407162.7A CN201711407162A CN107949029B CN 107949029 B CN107949029 B CN 107949029B CN 201711407162 A CN201711407162 A CN 201711407162A CN 107949029 B CN107949029 B CN 107949029B
Authority
CN
China
Prior art keywords
power consumption
cluster head
head node
gradient
value
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.)
Expired - Fee Related
Application number
CN201711407162.7A
Other languages
Chinese (zh)
Other versions
CN107949029A (en
Inventor
潘玉兰
刘广聪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong University of Technology
Original Assignee
Guangdong University of Technology
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 Guangdong University of Technology filed Critical Guangdong University of Technology
Priority to CN201711407162.7A priority Critical patent/CN107949029B/en
Publication of CN107949029A publication Critical patent/CN107949029A/en
Application granted granted Critical
Publication of CN107949029B publication Critical patent/CN107949029B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W40/00Communication routing or communication path finding
    • H04W40/02Communication route or path selection, e.g. power-based or shortest path routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W40/00Communication routing or communication path finding
    • H04W40/02Communication route or path selection, e.g. power-based or shortest path routing
    • H04W40/04Communication route or path selection, e.g. power-based or shortest path routing based on wireless node resources
    • H04W40/10Communication route or path selection, e.g. power-based or shortest path routing based on wireless node resources based on available power or energy

Abstract

The invention discloses a cluster head node routing method, a device and a medium based on a wireless sensor network, wherein the method comprises the following steps: acquiring each characteristic value set of a target cluster head node; according to a gradient descent algorithm, fitting characteristic values in each characteristic value set and power consumption gradient parameters into a power consumption prediction function; setting a power consumption threshold, and generating a loss function according to the power consumption prediction function and the power consumption threshold to measure the difference between the value of the power consumption prediction function and the power consumption threshold; calculating the parameter value of the power consumption gradient parameter when the value of the loss function is minimum; and performing iterative operation of parameter values on the basis of the preset power consumption gradient to obtain a result power consumption gradient, and taking the result power consumption gradient as the routing direction of the target cluster head node. The method improves the routing efficiency between the cluster head node and the sink node. In addition, the invention also provides a cluster head node routing device and medium based on the wireless sensor network, and the beneficial effects are as described above.

Description

Cluster head node routing method, device and medium based on wireless sensor network
Technical Field
The invention relates to the field of wireless sensor networks, in particular to a cluster head node routing method, a device and a medium based on a wireless sensor network.
Background
The wireless sensor network is a wireless network formed by a group of sensor nodes in a self-adaptive and self-organizing manner. The wireless sensor network can be used for collecting, processing and transmitting real-time signals in special environments. The wireless sensor network is a brand new information acquisition and processing technology, and is being widely used in real life. The wireless sensor network is formed by self-organizing thousands of sensor nodes, the sensor nodes are powered by batteries, battery energy is consumed when the sensor nodes perform data acquisition, fusion, transmission and other operations, and the thousands of sensor nodes are deployed and are not easy to replace, so that service for a longer time can be provided under the limited electric quantity of the sensor nodes.
The current wireless sensor network has a hierarchical structure when working, and sensor nodes in the hierarchical wireless sensor network are divided into three types, namely member nodes, cluster head nodes and sink nodes. And N member nodes are arranged under each cluster head node, the member nodes transmit the acquired data to the cluster head nodes, and then the cluster head nodes process and fuse the data and transmit the data to the sink nodes. However, in the existing large-scale wireless sensor network detection environment, most cluster head nodes are far away from the sink node and cannot communicate directly, so that data needs to be transmitted through other cluster head nodes between the target cluster head node and the sink node to finally realize communication between the target cluster head node and the sink node. Because data transmission among the sensor nodes is necessary work content in the wireless sensor network and brings corresponding energy consumption, reasonable and efficient routing is carried out between the cluster head nodes and the sink nodes, so that the energy consumed by the cluster head nodes can be relatively saved, and the whole life cycle of the wireless sensor network is further prolonged.
Therefore, the technical problem to be solved urgently is to provide a routing method for cluster head nodes based on a wireless sensor network, so as to improve the routing efficiency between the cluster head nodes and a sink node, further relatively save the overall energy consumption of the cluster head nodes, and prolong the overall life cycle of the wireless sensor network.
Disclosure of Invention
The invention aims to provide a routing method, a device and a medium of a cluster head node based on a wireless sensor network, so as to improve the routing efficiency between the cluster head node and a sink node, further relatively save the overall energy consumption of the cluster head node and prolong the overall life cycle of the wireless sensor network.
In order to solve the above technical problem, the present invention provides a cluster head node routing method based on a wireless sensor network, including:
acquiring each characteristic value set of a target cluster head node; each characteristic value set corresponds to a data transmission scene of a target cluster head node, and the characteristic value sets at least comprise the distance of a target communication path between the target cluster head node and a sink node;
according to a gradient descent algorithm, fitting characteristic values in each characteristic value set and power consumption gradient parameters into a power consumption prediction function;
setting a power consumption threshold, and generating a loss function according to the power consumption prediction function and the power consumption threshold to measure the difference between the value of the power consumption prediction function and the power consumption threshold;
calculating the parameter value of the power consumption gradient parameter when the value of the loss function is minimum;
and performing iterative operation of parameter values on the basis of the preset power consumption gradient to obtain a result power consumption gradient, and taking the result power consumption gradient as the routing direction of the target cluster head node.
Preferably, the characteristic value set further includes a remaining energy of the target cluster head node and a data traffic amount of the target cluster head node.
Preferably, before performing the iterative operation of the parameter value on the basis of the preset power consumption gradient, the method further includes:
setting constraint parameters;
correspondingly, the iterative operation of the parameter values on the basis of the preset power consumption gradient specifically comprises the following steps:
and controlling the amplitude of the iterative operation through the constraint parameters to perform the iterative operation.
Preferably, the value of the constraint parameter is specifically 0.0001.
Preferably, after obtaining the resulting power consumption gradient, the method further comprises:
the resulting power consumption gradient is written to the log.
Preferably, the method further comprises:
and acquiring the result power consumption gradient of each target cluster head node to generate an integral routing table.
In addition, the invention also provides a cluster head node routing device based on the wireless sensor network, which comprises:
the characteristic value acquisition module is used for acquiring each characteristic value set of the target cluster head node;
the prediction function generation module is used for fitting the characteristic values in the characteristic value sets and the power consumption gradient parameters into a power consumption prediction function according to a gradient descent algorithm;
the loss function generation module is used for setting a power consumption threshold value and generating a loss function according to the power consumption prediction function and the power consumption threshold value so as to measure the difference between the value of the power consumption prediction function and the power consumption threshold value;
the parameter value calculation module is used for calculating the parameter value of the power consumption gradient parameter when the value of the loss function is minimum;
and the iterative operation module is used for performing iterative operation on parameter values on the basis of the preset power consumption gradient to obtain a result power consumption gradient, and the result power consumption gradient is used as the routing direction of the target cluster head node.
Preferably, the apparatus further comprises:
and the constraint setting module is used for setting constraint parameters.
In addition, the invention also provides a cluster head node routing device based on the wireless sensor network, which comprises:
a memory for storing a computer program;
and a processor for implementing the steps of the cluster head node routing method based on the wireless sensor network when executing the computer program.
In addition, the present invention also provides a computer readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the wireless sensor network-based cluster head node routing method as described above.
The invention provides a routing method of a cluster head node based on a wireless sensor network, which comprises the steps of firstly obtaining each characteristic value set of a target cluster head node, constructing a power consumption prediction function containing characteristic values and power consumption gradient parameters according to the idea of a gradient descent algorithm, predicting the data transmission power consumption of the target cluster head node under different scenes, further forming a loss function by the power consumption prediction function and a preset power consumption threshold value, calculating parameter values of the power consumption gradient parameters when the value of the loss function is minimum, namely the value of the power consumption prediction function meets the requirement of the preset power consumption threshold value, further carrying out iterative operation of the parameter values on the basis of the preset power consumption gradient when the parameter values are obtained through calculation every time, and further obtaining the result power consumption gradient to be used as the routing direction of the target cluster head node. According to the method, each characteristic value set corresponds to a transmission scene of a target cluster head node, so that the method is equivalent to the simulation of a large number of data transmission scenes of the cluster head nodes, the cluster head nodes perform comprehensive learning of the scenes, each learning performs high-efficiency convergence on power consumption gradients according to the idea of a gradient descent algorithm, the power consumption gradients are more suitable for the current comprehensive data transmission scenes, and then the result power consumption gradients are used as the routing direction of the target cluster head nodes, and the routing transmission from the target cluster head nodes to sink nodes can be reasonably and efficiently performed. Therefore, the method improves the routing efficiency between the cluster head node and the sink node, further relatively saves the overall energy consumption of the cluster head node, and prolongs the overall life cycle of the wireless sensor network. In addition, the invention also provides a cluster head node routing device and medium based on the wireless sensor network, and the beneficial effects are as described above.
Drawings
In order to illustrate the embodiments of the present invention more clearly, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings can be obtained by those skilled in the art without inventive effort.
Fig. 1 is a flowchart of a cluster head node routing method based on a wireless sensor network according to an embodiment of the present invention;
fig. 2 is a structural diagram of a cluster head node routing apparatus based on a wireless sensor network according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without any creative work belong to the protection scope of the present invention.
The core of the invention is to provide a routing method of cluster head nodes based on a wireless sensor network, which improves the routing efficiency between the cluster head nodes and sink nodes, further relatively saves the overall energy consumption of the cluster head nodes and prolongs the overall life cycle of the wireless sensor network. The other core of the invention is to provide a cluster head node routing device and medium based on the wireless sensor network.
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
Example one
Fig. 1 is a flowchart of a cluster head node routing method based on a wireless sensor network according to an embodiment of the present invention. Referring to fig. 1, the specific steps of the cluster head node routing method based on the wireless sensor network include:
step S10: and acquiring each characteristic value set of the target cluster head node.
Each characteristic value set corresponds to a data transmission scene of the target cluster head node, and the characteristic value sets at least comprise the distance of a target communication path between the target cluster head node and the sink node.
It should be noted that, the characteristic values in the characteristic value sets in this step can all represent a state of a certain aspect when the target cluster head node communicates, and each characteristic value set is corresponding to a working scenario when the target cluster head node communicates data with other cluster head nodes. And then a plurality of characteristic value sets can provide communication scenes under different conditions for the target cluster head node, so that the target cluster head node can comprehensively analyze and learn the characteristic value sets.
Step S11: and fitting the characteristic values in the characteristic value sets and the power consumption gradient parameters into a power consumption prediction function according to a gradient descent algorithm.
The power consumption prediction function constructed in this step is used for predicting the power consumption of the target cluster head node. Because the power consumption condition of the target cluster head node is related to the working scene of the target cluster head node during data communication, and the characteristic value set can represent the working scene of the target cluster head node, the power consumption prediction function has characteristic values in the characteristic value set; in addition, the power consumption gradient parameter is an unknown variable in the power consumption prediction function and is used for reflecting the gradient condition of the target cluster head node when the target cluster head node transmits data to the sink node in different working scenes. Since the power consumption of the target cluster head node is affected by the eigenvalues representing various factors in the eigenvalue set, the eigenvalues in the eigenvalue set and the power consumption gradient parameter need to be fitted into a power consumption prediction function. It is emphasized that the power consumption gradient parameter is vector in nature and thus directional.
Step S12: setting a power consumption threshold value, and generating a loss function according to the power consumption prediction function and the power consumption threshold value to measure the difference between the value of the power consumption prediction function and the power consumption threshold value.
The power consumption threshold set in this step is the maximum power consumption value specified by the user according to the overall state of the target cluster head node, which indicates that the energy consumed by the cluster head node in a certain area to transmit data to the sink node is at most, and cannot exceed the power consumption threshold, otherwise, unnecessary network energy waste is caused. In addition, the loss function generated by the power consumption prediction function and the power consumption threshold represents a difference between the value of the power consumption prediction function and the power consumption threshold.
Step S13: calculating a parameter value of the power consumption gradient parameter when the value of the loss function is minimum.
The primary objective of the gradient descent algorithm is to calculate the minimum value of the function along the gradient descent method, and to obtain the value of the gradient when the function is the minimum value. The purpose of this step is therefore to calculate the parameter values of the power consumption gradient parameter when the loss function takes a minimum value, i.e. when the difference between the value of the power consumption prediction function and the power consumption threshold is minimal. The parameter value of the power consumption gradient parameter obtained in the step can meet the condition that the difference between the value of the power consumption prediction function and the power consumption threshold value is minimum.
Step S14: and performing iterative operation of parameter values on the basis of the preset power consumption gradient to obtain a result power consumption gradient, and taking the result power consumption gradient as the routing direction of the target cluster head node.
Because the parameter values of the power consumption gradient parameters obtained in the above steps reflect only the corresponding power consumption gradients under the condition of the current characteristic value set, in order to make the power consumption gradients continuously accurate and reasonable, the target cluster head node needs to analyze and learn more data transmission scenes, and then the parameter values of the power consumption gradients under more scenes are obtained, and then iterative operation of the parameter values is performed on the basis of the preset power consumption gradients, each iterative operation is equivalent to one update of the power consumption gradients, each update makes the power consumption gradients more accurate, and further makes the routing direction of the target cluster head node more reasonable, and finally the resulting power consumption gradients are obtained. It should be noted that the resulting power consumption gradient is a relative concept, the number of all feature value sets currently determines the convergence degree of the resulting power consumption gradient, but if the number of feature value sets is increased to continue the iteration of the power consumption gradient, the resulting power consumption gradient still continues to converge accurately.
The invention provides a routing method of a cluster head node based on a wireless sensor network, which comprises the steps of firstly obtaining each characteristic value set of a target cluster head node, constructing a power consumption prediction function containing characteristic values and power consumption gradient parameters according to the idea of a gradient descent algorithm, predicting the data transmission power consumption of the target cluster head node under different scenes, further forming a loss function by the power consumption prediction function and a preset power consumption threshold value, calculating parameter values of the power consumption gradient parameters when the value of the loss function is minimum, namely the value of the power consumption prediction function meets the requirement of the preset power consumption threshold value, further carrying out iterative operation of the parameter values on the basis of the preset power consumption gradient when the parameter values are obtained through calculation every time, and further obtaining the result power consumption gradient to be used as the routing direction of the target cluster head node. According to the method, each characteristic value set corresponds to a transmission scene of a target cluster head node, so that the method is equivalent to the simulation of a large number of data transmission scenes of the cluster head nodes, the cluster head nodes perform comprehensive learning of the scenes, each learning performs high-efficiency convergence on power consumption gradients according to the idea of a gradient descent algorithm, the power consumption gradients are more suitable for the current comprehensive data transmission scenes, and then the result power consumption gradients are used as the routing direction of the target cluster head nodes, and the routing transmission from the target cluster head nodes to sink nodes can be reasonably and efficiently performed. Therefore, the method improves the routing efficiency between the cluster head node and the sink node, further relatively saves the overall energy consumption of the cluster head node, and prolongs the overall life cycle of the wireless sensor network.
Example two
On the basis of the above examples, the present invention also provides the following preferred embodiments.
In a preferred embodiment, the characteristic value set further includes a remaining energy of the target cluster head node and a data traffic of the target cluster head node.
It can be understood that, since the feature value set characterizes the working scenario of the target cluster head node, the more kinds of feature values in the feature value set, the finer the working scenario characterized by the feature value set. The residual energy of the target cluster head node and the data traffic of the target cluster head node are important factors which jointly influence the routing communication of the target cluster head node, so that the residual energy of the target cluster head node and the data traffic of the target cluster head node are used as elements in the characteristic value set, the power consumption gradient can be calculated by considering more dimensional factors, and the calculation is more detailed and accurate. For example, in one scenario, two other cluster head nodes exist in the transmittable range of the target cluster head node, but the respective distances from the two other cluster head nodes to the target cluster head node are different, while the other cluster head nodes farther from the target cluster head node are closer to the sink node, but the power consumption required by the target cluster head node to transmit data to the other cluster head nodes farther away is larger, and at this time, the remaining energy and data traffic of the target cluster head node in the characteristic value set can be used as constraint factors in different dimensions to perform comprehensive evaluation and select the most reasonable routing path.
In addition, as a preferred embodiment, before performing the iterative operation of the parameter value on the basis of the preset power consumption gradient, the method further includes:
setting constraint parameters;
correspondingly, the iterative operation of the parameter values on the basis of the preset power consumption gradient specifically comprises the following steps:
and controlling the amplitude of the iterative operation through the constraint parameters to perform the iterative operation.
It should be noted that the function of setting the constraint parameter is to reduce the parameter value of the power consumption gradient parameter participating in the iterative operation by a corresponding multiple when the iterative operation is performed, so as to achieve the purpose of controlling the amplitude of the iterative operation. The constraint parameter is used for preventing the overall operation accuracy from being reduced due to large difference among a few characteristic value sets, and the constraint parameter is used for reducing the parameter value of the power consumption gradient parameter of each iteration so as to relatively reduce result errors caused by the situation. In addition, the value of the constraint parameter should be set according to the difference between the feature value sets and the specific needs of the user, and is not specifically limited herein.
In addition to the above embodiments, as a preferable embodiment, the value of the constraint parameter is specifically 0.0001.
Since the degree of reduction of the parameter value of the power consumption gradient parameter is relatively large when the value of the constraint parameter is set to 0.0001, the method has a universal effect on reducing the error of the iterative operation. The user may use 0.0001 as a setting basis for the constraint parameter, and increase or decrease the value of the constraint parameter according to the specific requirement on the basis, which is not specifically limited herein.
Furthermore, as a preferred embodiment, after obtaining the resulting power consumption gradient, the method further comprises:
the resulting power consumption gradient is written to the log.
It can be understood that after the result power consumption gradient is written into the log, if a user needs to obtain the result power consumption gradient, the user can directly obtain the result power consumption gradient in the log without performing iterative operation again, and the effect of 'one-time writing and multiple-time obtaining' is realized. In addition, when further iterative operation is needed to continue converging the power consumption gradient, the result power consumption gradient can be directly read from the log to serve as a new preset power consumption gradient, so that the power consumption gradient is further accurate. It can be seen that writing the resulting power consumption gradient to the log facilitates its subsequent use.
Further, as a preferred embodiment, the method further comprises:
and acquiring the result power consumption gradient of each target cluster head node to generate an integral routing table.
It can be understood that, since each target cluster head node can only concern the routing direction of the cluster head node of the next hop of the target cluster head node, for a user, the overall routing planning situation cannot be obtained only for the obtained routing direction of a certain target cluster head node, and the resulting power consumption gradient of each target cluster head node is obtained to generate an overall routing table, which can help the user to know the routing planning situation of the overall cluster head node of the wireless sensor network.
The following further describes an embodiment of the present solution in terms of functions and formulas:
the power consumption prediction function is h (x) hθ(x)=θ0x01x12x2Where θ represents a power consumption gradient parameter, beta represents a set of input feature values, x0Representing the remaining energy, x, of the target cluster head node1Distance, x, representing a target communication path between a target cluster head node and a sink node2Indicating data traffic of the target cluster head node, corresponding theta0、θ1、θ2Are respectively x0、x1、x2A corresponding power consumption gradient parameter component;
a loss function of
Figure BDA0001520567950000091
Where j represents the current number of sets of eigenvalues, m represents the total number of sets of eigenvalues, and y represents the power consumption threshold.
The formula of the iterative operation is
Figure BDA0001520567950000092
Where i denotes the number of iterations, θiRepresents the iteratively updated power consumption gradient parameters,
Figure BDA0001520567950000093
is expressed in J (theta) versus thetaiThe partial derivatives are evaluated to calculate the parameter values of the power consumption gradient parameters when the value of the loss function is minimal.
The above-described formulas and functions are only the contents of operations in one specific embodiment of the present invention, and are merely illustrative, and the parameters and the formulas may be changed accordingly while keeping the gist and intention of the present invention, and are not limited to the specific ones.
EXAMPLE III
In the foregoing, detailed description is given to the embodiment of the routing method for cluster head nodes based on the wireless sensor network, and the present invention further provides a routing apparatus for cluster head nodes based on the wireless sensor network corresponding to the method.
Fig. 2 is a structural diagram of a cluster head node routing apparatus based on a wireless sensor network according to an embodiment of the present invention. The cluster head node routing device based on the wireless sensor network provided by the embodiment of the invention specifically comprises:
and the eigenvalue acquisition module 10 is configured to acquire each eigenvalue set of the target cluster head node.
And the prediction function generation module 11 is configured to fit the eigenvalues in each eigenvalue set and the power consumption gradient parameters into a power consumption prediction function according to a gradient descent algorithm.
And the loss function generation module 12 is configured to set a power consumption threshold, and generate a loss function according to the power consumption prediction function and the power consumption threshold to measure a difference between a value of the power consumption prediction function and the power consumption threshold.
And a parameter value calculation module 13, configured to calculate a parameter value of the power consumption gradient parameter when the value of the loss function is minimum.
And the iterative operation module 14 is configured to perform iterative operation on parameter values on the basis of a preset power consumption gradient to obtain a result power consumption gradient, and use the result power consumption gradient as a routing direction of the target cluster head node.
The cluster head node routing device based on the wireless sensor network, provided by the invention, firstly obtains each characteristic value set of a target cluster head node, and constructs a power consumption prediction function containing characteristic values and power consumption gradient parameters according to the idea of a gradient descent algorithm so as to predict the data transmission power consumption of the target cluster head node under different scenes, then the power consumption prediction function and a preset power consumption threshold value form a loss function, and the parameter value of the power consumption gradient parameter is calculated when the value of the loss function is minimum, namely the value of the power consumption prediction function meets the requirement of the preset power consumption threshold value, and further when the parameter value is obtained by calculation each time, iterative operation of the parameter value is carried out on the basis of the preset power consumption gradient, and further the result power consumption gradient is obtained to be used as the routing direction of the target cluster head node. According to the device, each characteristic value set corresponds to a transmission scene of a target cluster head node, so that the device is equivalent to simulation of a large number of data transmission scenes of the cluster head nodes, the cluster head nodes perform comprehensive learning of the scenes, each learning performs high-efficiency convergence on power consumption gradients according to the idea of a gradient descent algorithm, the power consumption gradients are more suitable for the current comprehensive data transmission scenes, and then the result power consumption gradients serve as the routing direction of the target cluster head nodes, and the routing transmission of the target cluster head nodes to sink nodes can be performed reasonably and efficiently. Therefore, the device improves the routing efficiency between the cluster head node and the sink node, further relatively saves the overall energy consumption of the cluster head node, and prolongs the overall life cycle of the wireless sensor network.
On the basis of the third embodiment, the apparatus further includes:
and the constraint setting module is used for setting constraint parameters.
Example four
The invention also provides a cluster head node routing device based on the wireless sensor network, which comprises:
a memory for storing a computer program;
and a processor for implementing the steps of the cluster head node routing method based on the wireless sensor network when executing the computer program.
The cluster head node routing device based on the wireless sensor network, provided by the invention, firstly obtains each characteristic value set of a target cluster head node, and constructs a power consumption prediction function containing characteristic values and power consumption gradient parameters according to the idea of a gradient descent algorithm so as to predict the data transmission power consumption of the target cluster head node under different scenes, then the power consumption prediction function and a preset power consumption threshold value form a loss function, and the parameter value of the power consumption gradient parameter is calculated when the value of the loss function is minimum, namely the value of the power consumption prediction function meets the requirement of the preset power consumption threshold value, and further when the parameter value is obtained by calculation each time, iterative operation of the parameter value is carried out on the basis of the preset power consumption gradient, and further the result power consumption gradient is obtained to be used as the routing direction of the target cluster head node. According to the device, each characteristic value set corresponds to a transmission scene of a target cluster head node, so that the device is equivalent to simulation of a large number of data transmission scenes of the cluster head nodes, the cluster head nodes perform comprehensive learning of the scenes, each learning performs high-efficiency convergence on power consumption gradients according to the idea of a gradient descent algorithm, the power consumption gradients are more suitable for the current comprehensive data transmission scenes, and then the result power consumption gradients serve as the routing direction of the target cluster head nodes, and the routing transmission of the target cluster head nodes to sink nodes can be performed reasonably and efficiently. Therefore, the device improves the routing efficiency between the cluster head node and the sink node, further relatively saves the overall energy consumption of the cluster head node, and prolongs the overall life cycle of the wireless sensor network.
The invention further provides a computer readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the wireless sensor network-based cluster head node routing method as described above.
The computer-readable storage medium for routing the cluster head nodes based on the wireless sensor network, provided by the invention, comprises the steps of firstly obtaining each characteristic value set of a target cluster head node, constructing a power consumption prediction function containing the characteristic values and power consumption gradient parameters according to the idea of a gradient descent algorithm, so as to predict the data transmission power consumption of the target cluster head node under different scenes, further forming a loss function by the power consumption prediction function and a preset power consumption threshold, calculating the parameter values of the power consumption gradient parameters when the value of the loss function is minimum, namely the value of the power consumption prediction function meets the requirement of the preset power consumption threshold, further carrying out iterative operation on the parameter values on the basis of the preset power consumption gradient when the parameter values are obtained by each calculation, and further obtaining the result power consumption gradient to serve as the routing direction of the target cluster head node. Because each characteristic value set corresponds to the transmission scene of the target cluster head node in the computer readable storage medium, the computer readable storage medium is equivalent to the simulation of a large number of data transmission scenes of the cluster head nodes, so that the cluster head nodes perform comprehensive learning of the scenes, each learning performs high-efficiency convergence on the power consumption gradient according to the idea of a gradient descent algorithm, the power consumption gradient is more suitable for the current comprehensive data transmission scene, the result power consumption gradient is further used as the routing direction of the target cluster head node, and the routing transmission of the target cluster head node to the sink node can be reasonably and efficiently performed. Therefore, the computer readable storage medium improves the routing efficiency between the cluster head node and the sink node, so that the overall energy consumption of the cluster head node is relatively saved, and the overall life cycle of the wireless sensor network is prolonged.
The foregoing details a cluster head node routing method, apparatus and medium based on a wireless sensor network according to the present invention. The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

Claims (10)

1. A cluster head node routing method based on a wireless sensor network is characterized by comprising the following steps:
acquiring each characteristic value set of a target cluster head node; each feature value set corresponds to a data transmission scene of the target cluster head node, and the feature value sets at least comprise the distance of a target communication path between the target cluster head node and a sink node;
according to a gradient descent algorithm, fitting characteristic values in each characteristic value set and power consumption gradient parameters into a power consumption prediction function; wherein the power consumption prediction function is h (x) hθ(x)=θ0x01x12x2Where θ represents a power consumption gradient parameter, X represents a set of input eigenvalues, and X0Representing the remaining energy, x, of the target cluster head node1Distance, x, representing a target communication path between a target cluster head node and a sink node2Indicating data traffic of the target cluster head node, corresponding theta0、θ1、θ2Are respectively x0、x1、x2A corresponding power consumption gradient parameter component;
setting a power consumption threshold value, and generating a loss function according to the power consumption prediction function and the power consumption threshold value so as to measure the difference between the value of the power consumption prediction function and the power consumption threshold value; wherein the loss function is
Figure FDA0002848219850000011
Wherein j represents the current number of the eigenvalue sets, m represents the total number of the eigenvalue sets, and y represents the power consumption threshold;
calculating a parameter value of the power consumption gradient parameter when the value of the loss function is minimum;
and performing iterative operation of the parameter values on the basis of a preset power consumption gradient to obtain a result power consumption gradient, and using the result power consumption gradient as the routing direction of the target cluster head node.
2. The method of claim 1, wherein the set of eigenvalues further includes a remaining energy of the target cluster head node and a data traffic volume of the target cluster head node.
3. The method of claim 1, wherein before performing the iterative operation of the parameter value based on the preset power consumption gradient, the method further comprises:
setting constraint parameters;
correspondingly, the iterative operation of the parameter value on the basis of the preset power consumption gradient specifically includes:
and controlling the amplitude of the iterative operation through the constraint parameters so as to perform the iterative operation.
4. Method according to claim 3, characterized in that the value of the constraint parameter is in particular 0.0001.
5. The method of claim 1, wherein after obtaining the resulting power consumption gradient, the method further comprises:
writing the resulting power consumption gradient to a log.
6. The method according to any one of claims 1-5, characterized in that the method further comprises:
and acquiring the result power consumption gradient of each target cluster head node to generate an integral routing table.
7. A cluster head node routing device based on a wireless sensor network is characterized by comprising:
the characteristic value acquisition module is used for acquiring each characteristic value set of the target cluster head node;
the prediction function generation module is used for fitting the characteristic values in the characteristic value sets and the power consumption gradient parameters into a power consumption prediction function according to a gradient descent algorithm; wherein the power consumption prediction function is h (x) hθ(x)=θ0x01x12x2Where θ represents a power consumption gradient parameter, X represents a set of input eigenvalues, and X0Representing the remaining energy, x, of the target cluster head node1Distance, x, representing a target communication path between a target cluster head node and a sink node2Indicating data traffic of the target cluster head node, corresponding theta0、θ1、θ2Are respectively x0、x1、x2A corresponding power consumption gradient parameter component;
a loss function generating module for setting a power consumption threshold and generating a loss function according to the power consumption prediction function and the power consumption threshold to measure the value of the power consumption prediction function and the power consumptionThe difference between the thresholds; wherein the loss function is
Figure FDA0002848219850000021
Wherein j represents the current number of the eigenvalue sets, m represents the total number of the eigenvalue sets, and y represents the power consumption threshold;
the parameter value calculation module is used for calculating the parameter value of the power consumption gradient parameter when the value of the loss function is minimum;
and the iterative operation module is used for performing iterative operation on the parameter values on the basis of a preset power consumption gradient to obtain a result power consumption gradient, and the result power consumption gradient is used as the routing direction of the target cluster head node.
8. The apparatus of claim 7, further comprising:
and the constraint setting module is used for setting constraint parameters.
9. A cluster head node routing device based on a wireless sensor network is characterized by comprising:
a memory for storing a computer program;
a processor for implementing the steps of the wireless sensor network based cluster head node routing method according to any of claims 1 to 6 when executing said computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when being executed by a processor, implements the steps of the wireless sensor network-based cluster head node routing method according to any of claims 1 to 6.
CN201711407162.7A 2017-12-22 2017-12-22 Cluster head node routing method, device and medium based on wireless sensor network Expired - Fee Related CN107949029B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711407162.7A CN107949029B (en) 2017-12-22 2017-12-22 Cluster head node routing method, device and medium based on wireless sensor network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711407162.7A CN107949029B (en) 2017-12-22 2017-12-22 Cluster head node routing method, device and medium based on wireless sensor network

Publications (2)

Publication Number Publication Date
CN107949029A CN107949029A (en) 2018-04-20
CN107949029B true CN107949029B (en) 2021-03-16

Family

ID=61941826

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711407162.7A Expired - Fee Related CN107949029B (en) 2017-12-22 2017-12-22 Cluster head node routing method, device and medium based on wireless sensor network

Country Status (1)

Country Link
CN (1) CN107949029B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101394321A (en) * 2008-09-25 2009-03-25 重庆邮电大学 Non-uniform clustering method for cluster wireless sensor network based on energy balance
CN101729331A (en) * 2008-10-28 2010-06-09 华为技术有限公司 Clustering method and device, routing method and device of cluster head and base station
CN104080144A (en) * 2014-07-18 2014-10-01 重庆邮电大学 Gradient based energy-efficient uneven clustering data forwarding method
WO2014198120A1 (en) * 2013-06-14 2014-12-18 电子科技大学 Wireless mobile network data transmission method based on coverage maintenance and minimum spanning tree
CN104994554A (en) * 2015-05-04 2015-10-21 四川大学 Mobile assistance WSNs routing method based on unequal clustering

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101394321A (en) * 2008-09-25 2009-03-25 重庆邮电大学 Non-uniform clustering method for cluster wireless sensor network based on energy balance
CN101729331A (en) * 2008-10-28 2010-06-09 华为技术有限公司 Clustering method and device, routing method and device of cluster head and base station
WO2014198120A1 (en) * 2013-06-14 2014-12-18 电子科技大学 Wireless mobile network data transmission method based on coverage maintenance and minimum spanning tree
CN104080144A (en) * 2014-07-18 2014-10-01 重庆邮电大学 Gradient based energy-efficient uneven clustering data forwarding method
CN104994554A (en) * 2015-05-04 2015-10-21 四川大学 Mobile assistance WSNs routing method based on unequal clustering

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
A Low Complexity and High Speed Gradient Descent Based Secure Localization in Wireless Sensor Networks;Mostafa Mofarreh-Bonab et al.;《3rd International Conference on Computer and Knowledge Engineering (ICCKE 2013)》;20131101;全文 *
An overview of gradient descent optimization algorithms;SEBASTIAN RUDER;《https://ruder.io/optimizing-gradient-descent/》;20160119;全文 *
基于地理位置的WSN节能分簇路由技术研究;孙宇鹭;《中国优秀硕士学位论文全文数据库 信息科技辑》;20150315;全文 *
基于梯度的无线传感器网络路由算法的研究;张爱丽;《中国优秀硕士学位论文全文数据库 信息科技辑》;20140115;全文 *
无线传感器网络分簇路由协议研究;左睿;《中国优秀硕士学位论文全文数据库 信息科技辑》;20100415;全文 *

Also Published As

Publication number Publication date
CN107949029A (en) 2018-04-20

Similar Documents

Publication Publication Date Title
CN105075180B (en) Method, apparatus for adjusting network attribute and computer readable storage medium
US11101652B2 (en) Monitoring electrical substation networks
CN105075179A (en) Learning machine based detection of abnormal network performance
CN107659974B (en) Wireless sensor network routing method, device, equipment and computer readable storage medium
Kumar et al. IoT battery management system in electric vehicle based on LR parameter estimation and ORMeshNet gateway topology
Yang et al. Energy-efficient routing for signal detection in wireless sensor networks
CN109152103B (en) Method and device for networking wireless sensor network
Arroyo-Valles et al. A censoring strategy for decentralized estimation in energy-constrained adaptive diffusion networks
Deshpande et al. Wireless sensor networks--A comparative study for energy minimization using topology control
Yu et al. A multi-objective metaheuristics study on solving constrained relay node deployment problem in WSNS
CN104301996B (en) A kind of wireless sensor network locating method
CN107949029B (en) Cluster head node routing method, device and medium based on wireless sensor network
CN106375944A (en) Data acquisition system based on cloud computing
Ramachandran et al. A population based approach to model the lifetime and energy distribution in battery constrained wireless sensor networks
Fai et al. New energy efficient routing algorithm for Wireless Sensor Network
Peng et al. Energy-efficient and fault-tolerant evolution models for large-scale wireless sensor networks: A complex networks-based approach
TWI531266B (en) Signal source deployment system, method, and non-transitory tangible machine-readable medium thereof
Geraldo Filho et al. An energy-aware system for decision-making in a residential infrastructure using wireless sensors and actuators
Yuvaraja et al. Lifetime enhancement of WSN using energy-balanced distributed clustering algorithm with honey bee optimization
Bhavana et al. Spatial correlation based clustering algorithm for random and uniform topology in WSNs
Song et al. Design of routing protocol and node structure in wireless sensor network based on improved ant colony optimization algorithm
Saad et al. Topology design to increase network lifetime in wsn for graph filtering in consensus processes
Moreira Neto et al. PALES: A Predictive Approach for the election of semantic cluster LEaders in wireless Sensor networks
Amiri et al. A New Energy Efficient Data Gathering Approach in Wireless Sensor Networks
Jia et al. Distributed grid location estimation scheme based on Euclidean distance

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20210316

Termination date: 20211222

CF01 Termination of patent right due to non-payment of annual fee