Specific embodiment
The invention will be further described with the following Examples.
Fig. 1 is the smart home environment real-time management system structural schematic block diagram of one embodiment of the invention.Referring to Fig. 1,
Smart home environment real-time management system provided in this embodiment includes perception subsystem 1, temperature equipment 2, ventilation equipment 3, pipe
Terminal 4 is managed, wherein perception subsystem 1, temperature equipment 2, ventilation equipment 3 are all connect with management terminal 4.
Wherein, perception subsystem 1 is configured as carrying out indoor environment real-time monitoring, and acquisition indoor environment Data Concurrent is sent
To management terminal 4.The perception subsystem 1 includes single aggregation node, four relay nodes and multiple sensor nodes, described
Aggregation node is deployed in the center in the monitoring region of setting, and four relay nodes are set to the different positions in monitoring region
It sets, 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 indoor environment data and is sent to indoor environment data wherein
One relay node, relay node and aggregation node direct communication, are sent to convergence for received indoor environment data single-hop
Node, aggregation node are communicated with management terminal 4 received indoor environment data are transmitted to the management terminal 4.The present embodiment
The acquisition of indoor environment data is carried out using wireless sensor network technology, avoids wiring, is implemented simple.
Wherein, sensor node includes acquisition unit, analysis and processing unit and communication unit;Acquisition unit is by sensor
It is completed with analog-digital converter, analysis and processing unit is completed by microdata processing module and memory, and communication unit is by wireless receiving and dispatching
Device is completed.Wherein, sensor is temperature sensor and/or distinguished and admirable sensor.
Management terminal 4 is configured as being analyzed and processed received indoor environment data, generates corresponding control instruction,
And the operation of temperature equipment 2 and ventilation equipment 3 is controlled according to control instruction.
In the mode that one kind can be implemented, as shown in Fig. 2, management terminal 4 is controlled including data processing module 10, first
Module 20, the second control module 30, wherein the input terminal of the first control module 20, the second control module 30 all with data processing mould
Block 10 connects, and the output end of the first control module 20 is connect with temperature equipment 2, and the output end of the second control module 30 is set with ventilation
Standby 3 connection.
Data processing module 10 is analyzed and processed received indoor environment data, by received indoor environment data with
Preset index is compared, and generates control instruction according to the result of the comparison, and control instruction is sent to the first control module
20, the second control module 30, and then by the first control module 20, the second control module 30 control temperature equipment 2 and ventilation equipment 3
Operation.
Optionally, control instruction is generated according to the result of the comparison, for example, when the room temperature that perception subsystem 1 acquires is super
When crossing the preset data threshold upper limit, data processing module 10 sends the control instruction for turning down temperature to the first control module 20,
And the control instruction of starting air-supply is sent to the second control module 30, and then the first control module 20 is controlled according to control instruction and adjusted
Warm equipment 2 carries out cold source offer, and the second control module 30 controls ventilation equipment 3 according to control instruction and conveys wind, thus by indoor
Temperature controls within the appropriate range.And when the room temperature for perceiving the acquisition of subsystem 1 is lower than preset data threshold lower limit,
Data processing module 10 sends the control instruction that temperature is turned up to the first control module 20, and sends and close to the second control module 30
Close the control instruction of air-supply, and then the first control module 20 controls temperature equipment 2 according to control instruction and carries out heat source offer, second
Control module 30 controls ventilation equipment 3 according to control instruction and no longer carries out pushing wind manipulation.
Optionally, temperature equipment 2 connects earth source heat pump, and earth source heat pump provides heat source and cold source, and the first control module 20 can
Temperature equipment 2 is controlled according to control instruction, earth source heat pump offer heat source or cold source are provided, thus by room temperature control suitable
In suitable range.
In another optional mode, temperature equipment 2 is air-conditioning, and the first control module 20 can be controlled according to control instruction
Temperature equipment 2 conveys cold source or heat source.
Optionally, ventilation equipment 3 are ventilation device, and the second control module 30 is by controlling the opening and closing of ventilation equipment 3 come real
Now ventilation or stuffy.
The above embodiment of the present invention carries out the acquisition of indoor environment data using wireless sensor network technology, avoids wiring
Trouble, intelligent quick;By being analyzed and processed to collected indoor environment data, is controlled and adjusted according to indoor environment data
The operation of warm equipment and ventilation equipment realizes the adjusting of household temperature and air circulation, people can enjoy when going back home
By comfortable environment, of simple structure and strong practicability.
In the mode that one kind can be implemented, m virtual grid region of region division will be monitored, and make each relay node
In different virtual grid regions;When netinit, relaying section is chosen in the virtual grid region where relay node
Point is used as cluster head, and from each virtual grid region not comprising relay node one sensor node of selection as cluster head,
Cluster is added apart from nearest cluster head in each sensor node selection;The indoor environment data of sensor node acquisition are sent to corresponding
Received indoor environment data are sent to one of relay node by the cluster head of cluster head, non-relay nodes.
In a kind of mode that can be realized, the cluster head of non-relay nodes with apart from nearest relay node be single-hop distance
When, indoor environment data are directly sent to this apart from nearest relay node, are otherwise selected apart from nearest cluster head as under
One hop node.
In a kind of mode that can be realized, when the corresponding cluster head of sensor node is relay node, sensor node root
Select suitable route-pattern that indoor environment data are sent to relay node according to the distance at a distance from the relay node, specifically
Are as follows: sensor node sets its distance threshold according to current remaining, if at a distance from relay node be no more than setting away from
From threshold value, then the indoor environment data of acquisition are directly sent to the relay node, otherwise select a biography in cluster where it
Sensor node is sent to the next-hop node as next-hop node, by the indoor environment data of acquisition;The distance threshold
Set formula are as follows:
In formula, SiIt (t) is distance threshold of the sensor node i in t-th of cycle set,It can for sensor node i
The maximum communication distance of adjusting,For the adjustable minimal communications distance of sensor node i, EiFor working as sensor node i
Preceding dump energy, Ei0For the primary power of sensor node i, EminFor preset minimum energy value, δ is preset regulatory factor,
The value range of δ is [0.85,0.95].
In the present embodiment, when relay node is as cluster head, sensor node in cluster according to the relay node away from
From distance select suitable route-pattern that indoor environment data are sent to relay node, be conducive to optimally save sensing
The cost of energy of device node-node transmission indoor environment data.The present embodiment is further set according to the current remaining of sensor node
The setting formula of distance threshold is determined, if sensor node is more than the distance threshold of setting at a distance from relay node, has taken
Indoor environment data are transmitted to relay node by the mode of transistroute, advantageously reduce the speed of sensor node consumption energy
Rate avoids sensor node rapid failure, effectively extends the duty cycle of sensor node.
In a kind of mode that can be realized, sensor node selects a sensor node as under where it in cluster
One hop node, specifically:
(1) it sets and selects the sensor node of next-hop node as origination node, sensing of the origination node where it in cluster
In device node, selection is no more than sensor node alternately node of the distance threshold of setting with its distance, and calculates alternative
The weight of node:
In formula, QjIndicate the weight of alternate node j, DjoIt is alternate node j at a distance from corresponding relay node, that is, cluster head, Djh
At a distance from h-th of neighbor node of alternate node j and its, njFor the number of the neighbor node of alternate node j, neighbor node is
Other sensors node in sensor node communication range, DkoFor k-th of alternate node and corresponding relay node, that is, cluster
The distance of head, DkhAt a distance from h-th of neighbor node of k-th of alternate node and its, nkThe neighbour of k-th of alternate node
The number of node is occupied, u is the number of alternate node;
(2) select the maximum alternate node of weight as next-hop node.
The present embodiment origination node is in the sensor node where it in cluster, selection and its distance be no more than setting away from
Sensor node from threshold value alternately node, advantageously reduces the rate of sensor node consumption energy, wherein innovative
Ground sets the calculation formula of weight, and in alternate node, selects the maximum alternate node of weight as next-hop node, has
Conducive to the energy consumption that indoor environment data are transmitted to next-hop node is saved, system environmental data collection side indoors is further saved
The cost in face.
In a kind of mode that can be realized, a biography is chosen from each virtual grid region not comprising relay node
Sensor node is as cluster head, comprising:
(1) position of centre of gravity in virtual grid region is calculated:
In formula, ρbIndicate that the position of centre of gravity of virtual grid region b, x (c) indicate c-th of biography in the virtual grid region b
The abscissa of sensor node position, y (c) are the ordinate of c-th of sensor node position, wherein with convergence
Node is coordinate origin, nbThe sensor node number having for the virtual grid region b;
(2) probability that each sensor node in virtual grid region serves as cluster head, and the maximum sensing of select probability are calculated
Cluster head of the device node as the virtual grid region:
In formula, PbcThe probability of cluster head is served as c-th of sensor node in the b of virtual grid region,It is described c-th
Sensor node and position of centre of gravity ρbDistance,For v-th of sensor node and position of centre of gravity ρ in the b of virtual grid regionb
Distance;For the minimum range of c-th of sensor node and relay node,For c-th of sensor section
The maximum distance of point and relay node,For the minimum range of v-th of sensor node and relay node,For
The maximum distance of v-th of sensor node and relay node, nbFor sensor node number in the b of virtual grid region, μ1、
μ2For the weight coefficient and μ of setting1> μ2。
The present embodiment proposes the calculation formula that each sensor node in virtual grid region serves as the probability of cluster head, the meter
It calculates in formula, the sensor node closer apart from place virtual grid regional barycenter position and relay node has bigger general
Rate serves as the cluster head in the virtual grid region.The present embodiment maximum sensor section of select probability from each virtual grid region
Point is used as cluster head, on the one hand can guarantee that cluster head is evenly distributed in as far as possible in entire monitoring region, on the other hand be able to ascend
Global optimum's performance of sub-clustering result saves the energy consumption that cluster head collects and transmits indoor environment data, improves cluster head and carries out
The stability of indoor environment data collection effort.
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.