Detailed Description
The invention is further described with reference to the following examples.
Fig. 1 shows a block diagram of a real-time intelligent medical storage environment regulation system according to an exemplary embodiment of the present invention. As shown in fig. 1, the present embodiment provides a real-time intelligent medical storage environment control system, which includes an environment real-time monitoring subsystem 1, an analysis processing device 2, and a control device 3.
The environment real-time monitoring subsystem 1 comprises a sink node and a plurality of sensor nodes deployed in a medicine storage area, wherein the sensor nodes initially regulate the sending distance of the sensor nodes to be maximum, if the distance from the sensor nodes to the sink node does not exceed the current sending distance of the sensor nodes, the sensor nodes directly send acquired environment data to the sink node, otherwise, the sensor nodes send the acquired environment data to a next hop node, and the environment data are sent to the sink node in a multi-hop forwarding mode; the aggregation node is communicatively connected to the analysis processing device 2 to transmit the received environment data to the analysis processing device 2.
The analysis processing device 2 analyzes and processes the environmental data, generates a corresponding control instruction when the environmental data exceeds a preset index threshold, and controls the operation of the regulation device 3 according to the control instruction so as to regulate the environment in the medicine storage area.
In an implementation manner, the regulation and control device 3 includes a temperature regulation module and a humidity regulation module, as shown in fig. 2, the analysis and processing device 2 includes a memory 10, a processor 20, a first controller 30 and a second controller 40, wherein input ends of the first controller 30 and the second controller 40 are both connected to the processor 20, an output end of the first controller 30 is connected to the temperature regulation module, and an output end of the second controller 40 is connected to the humidity regulation module; the memory 10 stores a preset index threshold, and the memory 10 is in communication connection with the processor 20.
Wherein, the sensor node comprises a temperature sensor and a humidity sensor. Thus, the environmental data includes temperature environmental data and humidity environmental data of each monitored location. In one embodiment, the temperature regulation module includes a plurality of temperature regulation units, one temperature regulation unit being provided at each location monitored by a sensor node, and the first controller 30 is communicatively coupled to each temperature regulation unit. Similarly, the humidity conditioning module may include a plurality of humidity conditioning units, wherein one humidity conditioning unit is located at each location monitored by the sensor node, and the second controller 40 is communicatively coupled to each humidity conditioning unit.
The temperature can be adjusted in the following ways: when the analysis processing device 2 analyzes the environmental data and the temperature environmental data of a certain monitoring position exceeds the corresponding temperature threshold, the processor 20 will generate a control command for adjusting the temperature to the first controller 30, where the control command may include identification information of the temperature adjusting unit controlling the operation, temperature adjusting information, and the like, so that the first controller 30 controls the corresponding temperature adjusting unit to operate according to the control command, so as to make the temperature in the vicinity conform to the temperature adjusting information. Likewise, the humidity can be adjusted in the same manner as the temperature adjustment described above.
Preferably, the temperature adjusting unit is an air conditioning device, and the humidity adjusting unit is a drying device.
In another implementation, the first controller 30 and the second controller 40 may be integrated into a single controller, such that the operation of both the temperature regulation module and the humidity regulation module are controlled by the same controller.
In an implementation manner, the control device 3 may further include other modules that can be used to adjust the environment, such as a brightness adjustment module, a ventilation adjustment module, and the like. According to the increase of modules in the regulating device 3, a third controller, a fourth controller and the like can be additionally arranged on the analysis processing device 2.
The embodiment of the invention is based on the wireless sensor network technology, realizes the monitoring of the medicine storage environment, can automatically control the operation of the regulating and controlling device 3 according to the monitored environmental data, and realizes the intelligent control of the environment in the medicine storage area.
In an implementation mode, neighbor nodes are set as other sensor nodes positioned in the communication range of the sensor nodes, and when a network is initialized, the sensor nodes acquire neighbor node information through information interaction and construct a neighbor node set; the sensor node selects one neighbor node from the neighbor node set as a next hop node, and the method comprises the following steps:
(1) the sensor node selects a one-hop neighbor node which is closer to the sink node relative to the sensor node from the neighbor node set as a candidate node, and a candidate node set is constructed;
(2) the sensor node sends request information to each alternative node, each alternative node calculates the forwarding capacity value of the alternative node after receiving the request information and feeds the forwarding capacity value back to the sensor node, and the request information comprises the total bandwidth and the initial cache space of each alternative node, the number of neighbor nodes of the sensor node i and corresponding node identification;
(3) the sensor node selects the candidate node with the maximum forwarding capacity value from the current candidate node set as a next hop node;
wherein, the calculation formula of the forwarding capability value is as follows:
in the formula, RijForwarding capability value of a candidate node j for a sensor node i, BiIs the total bandwidth, U, of the candidate node jjIs the initial cache space of the alternative node j, niNumber of candidate nodes in candidate node set for sensor node i, BqTotal bandwidth, U, of the q-th candidate node in the set of candidate nodes for sensor node iqAn initial cache space of the q-th alternative node in the alternative node set of the sensor node i is defined; hiNumber of neighbor nodes, H, for sensor node ijThe number of neighbor nodes of the alternative node j, Hi∩HjThe number h of common neighbor nodes owned by the sensor node i and the alternative node j1、h2Satisfies h as a predetermined influence factor1+h2=1;s1、s2For the preset weight coefficient, s is satisfied1+s2=1。
The embodiment innovatively sets the index of the forwarding capability value, the sensor node takes a one-hop neighbor node closer to the sink node as a candidate node, constructs a candidate node set, sends request information to each candidate node, calculates the forwarding capability value according to the resource condition of the candidate node and the similarity condition of the sensor node, and selects the candidate node with the largest forwarding capability value from the current candidate node set as the next-hop node when the next-hop node needs to be selected.
The embodiment is beneficial to balancing the resource utilization rate of each sensor node, thereby balancing the energy consumption and load of each sensor node, reducing the occurrence of network congestion, improving the performance of the network in the aspect of environmental data transmission, and further being beneficial to prolonging the service life of the wireless sensor network. In the embodiment, the optional nodes perform the calculation of the forwarding capability value, so that the efficiency of selecting the next hop node is improved and the calculation overhead is balanced compared with a mode of uniformly calculating by the sensor nodes.
In one embodiment, the sensor node selects the candidate node with the maximum forwarding capability value from the current candidate node set again at intervals of a time period delta t as a next hop node; and the next hop node judges whether the next hop node meets the relay condition every other time period delta t/2, if not, the next hop node sends feedback information to the corresponding previous hop sensor node, and the previous hop sensor node receiving the feedback information updates the forwarding capacity value of the next hop node.
In this embodiment, the sensor node selects the candidate node with the largest forwarding capability value from the current candidate node set again every time interval Δ t as the next hop node, so that the next hop node is updated, and the resource utilization rate of each sensor node is balanced to the maximum extent.
The relay conditions are as follows:
in the formula, P
aIs the current remaining energy, P, of the next hop node a
a0Is the initial energy of the next hop node a, K
aThe number of environment data packets in the cache list of the next hop node a, P
TEnergy consumption, P, for forwarding an environmental data packet
minA preset energy lower limit for maintaining the forwarding capability; b
aIs the residual bandwidth of the next hop node a, s
aIs the remaining cache space of the next hop node a, M
aThe number of previous hop sensor nodes of the next hop node a, b
minA predetermined lower bandwidth limit, s, required for assisting a sensor node in forwarding the environmental data
minIn order to set a lower limit of the buffer space required for assisting a sensor node in forwarding the environmental data,
to determine the value function, when
When the temperature of the water is higher than the set temperature,
when in use
When the temperature of the water is higher than the set temperature,
further, in the embodiment, a calculation formula of the relay condition is innovatively set, the next hop node judges whether the next hop node meets the relay condition every other time period Δ t/2, if not, the next hop node sends feedback information to the corresponding previous hop sensor node, and the previous hop sensor node receiving the feedback information updates the forwarding capability value of the next hop node, so that the forwarding capability value of the candidate node is updated.
According to the embodiment, the next hop node of the sensor node can be effectively ensured to have enough resources to execute the task of forwarding the environmental data all the time, and the reliability of environmental data transmission is improved.
Wherein, Δ t is a preset time threshold. As a preferred embodiment, the sensor node is provided with a timer for timing the time period Δ t or the time period Δ t/2.
In one embodiment, the previous hop sensor node receiving the feedback information updates the forwarding capability value of the next hop node according to the following formula:
in the formula, Rdv(z) the updated forwarding capability value of the next hop node v of the previous hop sensor node d after the z time, Rdv(z-1) is the forwarding capability value of the next hop node v after z-1 updating, RdqInitial forwarding capability value for the q-th candidate node of the previous-hop sensor node d, ndThe number of the alternative nodes in the alternative node set of the previous hop sensor node d, k is a preset capacity attenuation coefficient, and the value range of k is [0.2,0.3 ]];
When the updated forwarding capability value of one candidate node of the sensor nodes is lower than the preset lower limit of the forwarding capability value, the sensor nodes remove the one candidate node from the own candidate node set.
In this embodiment, an update formula of the forwarding capability value of the next hop node is designed, and adverse effects of the update condition of the candidate node on forwarding are further considered, that is, when the updated forwarding capability value of one candidate node of the sensor nodes is lower than the preset lower limit of the forwarding capability value, the sensor node intensively removes the one candidate node from its own candidate node. The embodiment can remove the alternative nodes which do not have enough resources and can not access the new environment data flow, effectively ensure that the alternative nodes have enough resources to execute the task of environment data forwarding, improve the reliability of environment data transmission, reduce the number of alternative nodes in the alternative nodes set, and be beneficial to reducing the routing overhead in the whole network.
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 device, 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 devices, or any other medium that can be used to carry or store desired program code in the form of instructions or environmental 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.