Summary of the invention
In view of the above-mentioned problems, the present invention provides the detection of compartmentalization weather comfort level and forecast system.
The purpose of the present invention is realized using following technical scheme:
It provides the detection of compartmentalization weather comfort level and forecast system, the device includes: the nothing for incuding meteorologic parameter
Line sensor network module, at least data processing module and a forecast module for connecting the wireless sensor network module, institute
It states data processing module and receives the meteorologic parameter that wireless sensor network module incudes, the data processing module, which is equipped with, to relax
Appropriate model module, meteorologic parameter are sent into comfort level model module and are weighted, and the data processing module is by acquisition
Comfortable angle value is sent to the forecast module and is shown and broadcasted.
Further, the data processing module further includes receiving module and sending module, and receiving module is for receiving institute
State meteorologic parameter;The sending module is used to the comfortable angle value obtained being sent to the forecast module.
Preferably, the forecast module includes voice broadcast module and display module.
Wherein, wireless sensor network module includes single aggregation node, four relay nodes and multiple sensor nodes,
The aggregation node is deployed in the center in the monitoring region of setting, and four relay nodes are set to the difference in monitoring region
Position, and four relay nodes are identical as the distance between aggregation node, the multiple sensor node is needed according to actual monitoring
It is deployed in the monitoring region;Sensor node is responsible for acquiring meteorologic parameter and meteorologic parameter is sent in one of them
After node, received meteorologic parameter single-hop is sent to aggregation node, convergence section by relay node and aggregation node direct communication
Point converges all meteorologic parameters and is sent to data processing module.
Preferably, the sensor node includes meteorologic parameter sensor, meteorologic parameter sensor include wind and rain sensor,
Humidity sensor, light intensity sensor and temperature sensor.
The invention has the benefit that the present invention can understand current weather conditions at any time, and by establishing comfort level
Model module and forecast module synthesis have carried out lively, intuitive reflection to current weather condition, have been applicable in varying environment and use
The needs at family.
Specific embodiment
The invention will be further described with the following Examples.
Referring to Fig. 1, Fig. 2, present embodiments provides the detection of compartmentalization weather comfort level and forecast system, the device include:
For incuding the wireless sensor network module 1 of meteorologic parameter, connecting at an at least data for the wireless sensor network module 1
Module 2 and a forecast module 3 are managed, the data processing module 2 receives wireless sensor network module 1 and incudes obtained meteorology
Parameter, the data processing module 2 are equipped with comfort level model module 10, and meteorologic parameter is sent into comfort level model module 10 and is added
Operation is weighed, the comfortable angle value of acquisition is sent to the forecast module 3 and is shown and broadcasted by the data processing module 2.
The comfort level model module 10 is any meteorologic parameter to be corresponded to different grades of comfortable angle value, and will work as
When the comfortable angle value of variant meteorologic parameter be weighted according to preset measures and weights.
For example, can be set the meteorologic parameter sensor include wind sensor, humidity sensor, light intensity sensor and
Temperature sensor is respectively used to induction wind-force size, humidity size (whether raining), Intensity of the sunlight, temperature conditions;Such as
For wind-force size, it can be directed to the wind sensor of existing typhoon, 1-2 grades of wind are corresponded to calm, 3-5 grades of wind correspondences
For small wind, 6-9 grades correspond to apoplexy, and 10 grades or more correspond to strong wind;And calm, small wind, apoplexy, strong wind etc. are corresponded to entirely
Some numerical value in comfort level model module 10.Then after the corresponding comfortable angle value of various meteorologic parameters being weighted
Obtain final comfort level degree value.
Further, the data processing module 2 further includes receiving module 20 and sending module 30, and receiving module 20 is used for
Receive the meteorologic parameter;The sending module 30 is used to the comfortable angle value obtained being sent to the forecast module 3.
In one embodiment, the forecast module 3 includes voice broadcast module and display module.
Wherein, wireless sensor network module 1 includes single aggregation node, four relay nodes and multiple sensor sections
Point disposes aggregation node in the center in monitoring region when deployment, multiple sensor nodes is deployed according to actual needs
It monitors in region, using aggregation node as origin, the monitoring region is divided into multiple square net subregions, four are relayed
Node deployment is in the center of different square net subregions, and the distance between four relay nodes and aggregation node phase
It together, and can be with aggregation node direct communication;When netinit, sensor node chooses multiple cluster heads, Mei Gechuan by sub-clustering
Cluster is added apart from nearest cluster head in sensor node selection;It is transmitted the stage in meteorologic parameter, each sensor node acquires meteorologic parameter
And the meteorologic parameter is sent to corresponding cluster head, the received meteorologic parameter of cluster head is eventually sent to one of relay node,
And then received meteorologic parameter is transmitted to aggregation node by each relay node, aggregation node converges all meteorologic parameters and sends
To data processing module 2.
In one embodiment, the sensor node includes meteorologic parameter sensor, and meteorologic parameter sensor includes wind
Rain sensor, humidity sensor, light intensity sensor and temperature sensor.
The above embodiment of the present invention can understand current weather conditions at any time, and by establishing comfort level model module 10
Lively, intuitive reflection has been carried out to current weather condition with the synthesis of forecast module 3, has been applicable in varying environment and the need of user
It wants.
In one embodiment, sensor node is based on LEACH Routing Protocol and carries out sub-clustering.Sensor node can also lead to
It crosses other suitable clustering route protocols and carries out sub-clustering.
In one embodiment, the communication distance of cluster head exists according to the period of settingIt is adjusted in range,For the adjustable minimal communications distance of cluster head,For the adjustable maximum communication distance of cluster head;Cluster head was at t-th week
Communication distance in phase are as follows:
In formula, QiIt (t) is communication distance of the cluster head i within t-th of period, GiFor the current remaining of cluster head i, Gi0For
The primary power of cluster head i, GminFor preset minimum energy value.
The communication distance that the present embodiment is innovatively provided with cluster head adjusts formula, and the formula is according to the current residual of cluster head
Energy adjusts the communication distance of own, to limit the communication range of cluster head, advantageously reduces the meteorological ginseng of cluster head transmission
Several energy consumptions avoids cluster head rapid failure due to energy deficiency, further increases the stability of wireless sensor network operation.
In one embodiment, the received meteorologic parameter of cluster head is eventually sent to one of relay node, specifically: if
Cluster head is less than its current communication distance with the distance apart from nearest relay node, and meteorologic parameter is directly sent to this
Apart from nearest relay node, otherwise, directly selected in neighbours' cluster head a maximum weight as next-hop, meteorology is joined
Number is sent to the next-hop, and wherein neighbours' cluster head is remaining cluster head in cluster head communication range.
In the present embodiment, cluster head according to selecting suitable route-pattern to the distance apart from nearest relay node, with
Meteorologic parameter is sent to this apart from nearest relay node, is conducive to optimally save cluster head to relay node transmission meteorology
The cost of energy of parameter;When cluster head is more than its current communication distance with the distance apart from nearest relay node, cluster head exists
Selected in neighbours' cluster head a maximum weight as next-hop.
Wherein, the calculation formula of the weight are as follows:
In formula, HijIndicate the weight of j-th of neighbours' cluster head of cluster head i, QjFor the present communications of j-th of neighbour cluster head
Distance, QsFor the present communications distance of s-th of neighbours' cluster head of cluster head i, KijFor cluster head i and j-th of neighbour cluster head away from
From KisIt is cluster head i at a distance from s-th of neighbour cluster head, niFor neighbours' cluster head number of cluster head i;f(Qj) it is to judge value
Function, when including relay node in the communication range of j-th of neighbour cluster head, f (Qj)=1, otherwise f (Qj)=0.
The present embodiment is innovatively provided with the calculation formula of weight, according to the calculation formula it is found that having high probability
There is bigger probability as next-hop with neighbours' cluster head of relay node direct communication.The present embodiment can reduce multi-hop biography as far as possible
Defeated meteorologic parameter saves communications cost of the system in terms of meteorologic parameter acquisition to the energy consumption of relay node on the whole.
In one embodiment, the relay node is removable, if the cluster head collection with relay node direct communication is combined into U,
Relay node periodically carries out energy monitoring, the energy force of the cluster head in set of computations U, if in set U to the cluster head in set U
There are the cluster heads that energy force is greater than 0, and aggregation node is in cluster head of the energy force greater than 0, to the cluster head of ceiling capacity force
The distance of the mobile setting in direction, wherein the mobile total distance of relay node is no more than preset apart from the upper limit;Wherein energy potential
The calculation formula of power are as follows:
In formula, L0For the energy force of the cluster head d in set U, G0For the current remaining of cluster head d, G0eIt is d pairs of cluster head
Answer the current remaining of e-th of sensor node in cluster, m0The sensor node quantity in cluster, Q are corresponded to for cluster head d0For cluster head
The communication distance of d, GlFor the current remaining of first of cluster head in set U, QOFor the communication distance of relay node.
Not only need to receive and forward the meteorologic parameter in its cluster close to the cluster head of relay node, it is also necessary to relay forwarding its
The meteorologic parameter of his cluster head, therefore relative to other cluster heads, need to consume more energy, so wireless sensor network is in
Energy volution is easy to produce after near nodal.
Based on this problem, it is removable that relay node is arranged in the present embodiment, and innovatively defines the calculating of energy force
Formula keeps relay node maximum to energy force when the energy force of the present embodiment cluster head near relay node is greater than 0
The distance of the mobile setting in cluster head direction, thus promote the lower cluster head of energy due to the relay node after movement too far and no longer
Undertake the task of relay forwarding.The present embodiment is beneficial to balance the energy of each cluster head, reduces Energy volution phenomenon, and then effectively prolong
Long network lifetime improves the stability that meteorologic parameter is collected.
Finally it should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, rather than the present invention is protected
The limitation of range is protected, although explaining in detail referring to preferred embodiment to the present invention, those skilled in the art are answered
Work as understanding, it can be with modification or equivalent replacement of the technical solution of the present invention are made, without departing from the reality of technical solution of the present invention
Matter and range.