A kind of online network of waterways space-time accident detection method
Technical field
The present invention relates to wireless sense network detection technique field, be specifically related to a kind of method of dispersion that utilizes and the method for space-time accident detection is carried out to network of waterways radio sensing network.
Background technology
Along with the fast development of sensor technology and the increasingly mature of wireless communication technology, wireless sensor network is widely used ecological science and observes, environmental monitoring, the field such as disaster early warning and national defense and military.In these practical applications, the accident detection function of robotization is absolutely necessary.As a rule, in order to make corresponding remedial measures for Network Abnormal as soon as possible, what need detection burst in real time applies to system all events impacted, and comprises physical phenomenon, pollutant monitoring etc., then makes early warning.Sensor part is deployed in the network of waterways, carrys out the concentration of materials different in Real-Time Monitoring water such as chlorine, and the too high levels of water free chlorine is the most important reason of water pollution, so select monitoring free chloro concentration to judge the generation of anomalous event.Sensor can produce a large amount of data stream, needs the monitor value of real-time analysis sensor, detects anomalous event, and particularly those can cause the anomalous event of network of waterways water environment pollution.
Recent years, the research of accident detection is much paid close attention in radio sensing network field.Traditional radio sensing network accident detection method can be roughly divided into three classes: based on the detection method of threshold value, based on the detection method of pattern and the reasoning detection method based on study.
Above-mentioned several class methods are all solely limited to reasoning and the study of time or spatial domain, and Time and place cooperate reasoning and study are mentioned seldom.And in real world, sensor is all by certain space relational layout, sensing data then gathers by the certain hour cycle, and therefore, sensing data has shown strong temporal correlation, and the accuracy of such time-space relationship to event detection is most important.A kind of effective accident detection method, the method not only detection time abnormal, and detection space is abnormal, and the travel path of trace exception event is the problem that accident detection will solve, and is also problem to be solved by this invention.
Summary of the invention
Goal of the invention: the method for a kind of online network of waterways space-time accident detection, solves the problem that cannot consider the temporal correlation of network exception event in prior art.In order to Time and place factor can be considered, select probability graph model is simulated time and spatial data respectively, utilize the Markov chain discovery time event based on learning method, the probability of occurrence of spatial event is inferred with Bayesian network, consider Time and place anomalous event, determined whether that space-time anomalous event occurs.And the node important with connected dominating set algorithms selection replaces all node on-line monitorings as key contact.
Technical scheme: a kind of online network of waterways space-time accident detection method, comprises following four aspects:
(1) utilize connected dominating set algorithms selection backbone node, the Time and place state of on-line monitoring backbone node, replace the whole node of monitoring;
(2) by Markov chain simulated time process, the backbone node selected according to step (1) independent through Markov chain, transition probability predicted events development tendency between utilization state.When through Markov chain, if the backbone node sensor states of prediction
sensor states X (the s of sequence τ and actual measurement for some time
i, t+ τ) inconsistent time, think and there occurs time anomaly;
(3) space distribution of network of waterways sensor represents with Bayesian network, and each sensor is regarded as a node of Bayesian network, the flow direction in river regards the direction on Bayesian network limit as.Sensor network can be regarded as the Bayesian network of a directed acyclic, infer that the probability of occurrence of spatial event judges whether free air anomaly occurs with Bayesian network;
(4) see that in the network of waterways, the whether free anomalous event of backbone node occurs according to Markov state conversion, then according to Bayesian network forecasting backbone node whether have living space anomalous event occur, finally determined whether that space-time anomalous event occurs, Time and place correlation models will be coordinated mutually to detect space-time anomalous event;
The method of a kind of online network of waterways space-time accident detection that the present invention discloses, described content (1) utilizes connected dominating set algorithms selection backbone node, the Time and place state of on-line monitoring backbone node, replaces the concrete steps of the whole node of monitoring as follows:
(1.1) labeling process: during initialization, all nodes are all non-dominate nodes; Each node u and R in its communication radius
uneighbours exchange the information of respective neighbours, now node u is according to neighbor information, judge whether neighbor node v and w that existence two can not directly intercom mutually, if exist, then node u alternatively dominate node participation structure CDS, otherwise show that node u can by other node control, not as CDS node.
(1.2) prune rule: the candidate's dominate node quantity obtained by labeling process is too much, candidate's dominate node needs according to prune rule, reduces the quantity of dominate node collection.If K the neighbor node of candidate's dominate node u can be communicated by other dominate nodes, the set of node that so deletion of node u obtains from CDS is still CDS, therefore concentrates deletion of node u from candidate's dominate node, and node u becomes non-CDS node.
(1.3) node in connected dominating set, as key contact, only needs the data stream of monitoring backbone node to replace all nodes of monitoring.This strategy can ensure that non-selected node can find at least one backbone node from its neighbor node, when anomalous event occurs near non-selected non-backbone node, key contact can be propagated into as soon as possible, abnormal generation can be detected rapidly, reduce the loss.
The method of a kind of online network of waterways space-time accident detection that the present invention discloses, described content (2) Markov chain simulated time process, cover the traffic diagram of wireless network, all sensor nodes independent through Markov chain, transition probability predicted events development tendency between utilization state.When through Markov chain, if the backbone node sensor states of prediction
sensor states X (the s of sequence τ and actual measurement for some time
i, t+ τ) inconsistent time, think and there occurs time anomaly.The concrete steps that time anomaly detects are as follows:
(2.1) Markov chain is the limited or denumerable sequence of events (E of on discrete time point one
1, E
2...) set, at any time, current state is only depended in the behavior in process future, has nothing to do with state before.By Markov chain simulated time process, the backbone node selected according to step (1) independent through Markov chain, the state that between utilization state, transition probability predicted events occurs.
(2.2) Sensor monitoring network of waterways free chlorine concentration is quantized into three state, Low (low concentration), Medium (moderate concentration), the sensor stream that High (high concentration) monitors is separately through Markov chain, first define current state, then predict next step state.Suppose that sensor is at moment S
tstate be N
i, moment S
t+1state be N
j, according to markovian state transition probability P
ij=P (S
t+1=N
j| S
t=N
i)=P (N
j| N
i) predicted events occur state and development tendency.
(2.3) sensor departs from behavior normal time and can be regarded as noise or as a time anomaly event.Occur frequently owing to departing from, so negated this possibility of noise, therefore, departing from of occurring continuously can regard time anomaly event as, when through Markov chain, if the backbone node sensor states of prediction
sensor states X (the s of sequence τ and actual measurement for some time
i, t+ τ) inconsistent time, think and there occurs time anomaly.
The method of a kind of online network of waterways space-time accident detection that the present invention discloses, the space distribution of described content (3) network of waterways sensor represents with Bayesian network, each sensor is regarded as a node of Bayesian network, the flow direction in river regards the direction on Bayesian network limit as.Sensor network can be regarded as the Bayesian network of a directed acyclic, infer that the probability of occurrence of spatial event judges whether free air anomaly occurs with Bayesian network.The concrete steps that free air anomaly detects are as follows:
(3.1) for the network of waterways builds the spatial relationship that Bayesian network G comes analog sensor node and its neighbor node, each sensor is regarded as a node of Bayesian network, the flow direction in river regards the direction on Bayesian network limit as, so sensor network can be regarded as the Bayesian network of a directed acyclic.
(3.2) training data of Bayesian network is by S tuple
composition,
representative sensor
state.Can concentrate from historical data and produce a lot of training data, then can learn with maximum likelihood estimation algorithm the parameter obtaining Bayesian network.
(3.3) after the training stage, to each sensor, a conditional probability table can be obtained, according to the state of conditional probability table prediction sensor.Contrast predicted state and true observer state, if sensor S
iobserved reading do not belong to that state, think actual value deviate from study obtain spatial relationship, abnormal generation of having living space.
The method of a kind of online network of waterways space-time accident detection that the present invention discloses, described content (4) sees that in the network of waterways, the whether free anomalous event of backbone node occurs, and then backbone node anomalous event of whether having living space occurs in the Bayesian network seeing structure, finally be determined with space-time anomalous event to occur, Time and place correlation models will be coordinated mutually to detect space-time anomalous event, and concrete steps are as follows:
(4.1) according to the backbone node that step (1) is selected, see that whether backbone node is free according to step (2) and extremely see that the whether free anomalous event of backbone node occurs.If backbone node there occurs time anomaly, the child nodes of the backbone node of time of origin exception is alternatively collected.If do not have time of origin abnormal, continue to detect the next timestamp state of backbone node.
(4.2) expecting state backbone node of time of origin exception and the node of Candidate Set thereof obtained by Bayesian Network Learning according to step (3) and observer state are compared, and see whether sensor S
ideviate from the spatial relationship that study obtains.
(4.3) if backbone node SE and SI (SE is sensor node predicted value, and SI is observed reading) is different, free air anomaly occurs, and due to time anomaly, the value of space-time anomalous counts device adds 1.
(4.4) if the node in Candidate Set is detected exception of having living space, so the child nodes of this both candidate nodes also joins Candidate Set.Detect the Candidate Set interior joint that free air anomaly occurs whether free abnormal, if had, space-time anomalous counts device adds 1 simultaneously, in like manner, continue to detect Candidate Set interior joint and whether to have living space exception, if had, detection time is abnormal, and time of origin is abnormal, and space-time anomalous counts device adds 1.When the number of backbone node and its Candidate Set space-time exception reaches threshold value Q, just think and space-time anomalous event occurs.
The present invention adopts technique scheme, has following beneficial effect:
1. select backbone node monitoring instead of all nodes of monitoring Sensor Network improve detection efficiency and shorten the response time.
2. Time and place data character but generally assigns to consider by existing method, cannot make unified space-time detect in conjunction with the characteristic of anomalous event to global network.Space-time accident detection algorithm energy binding time of the present invention and aspect, space two factor are considered, improve the accuracy of accident detection, reduce rate of false alarm.
3. not only can detect anomalous event, the travel path of all right trace exception event, stops pollution spread as early as possible, reduces the loss.
Accompanying drawing explanation
Fig. 1 is the overall framework figure of the inventive method embodiment;
Fig. 2 is the process flow diagram of embodiment of the present invention space-time accident detection method;
Fig. 3 is actual basin, network of waterways figure;
Fig. 4 is the sensor location figure being deployed in the network of waterways;
Fig. 5 represents the Markov transfer process of free chloro concentration;
Fig. 6 is the node state in certain moment Sensor Network;
The State Transferring of Fig. 7 not free chloro concentration in the same time.
Embodiment
Below in conjunction with specific embodiment, illustrate the present invention further, these embodiments should be understood only be not used in for illustration of the present invention and limit the scope of the invention, after having read the present invention, the amendment of those skilled in the art to the various equivalent form of value of the present invention has all fallen within the application's claims limited range.
The invention provides the embodiment of a kind of online network of waterways space-time accident detection algorithm, Fig. 1 is the overall framework figure of online network of waterways space-time accident detection.Can find out, the key step of the embodiment of the present invention is as follows:
(1) utilize connected dominating set algorithms selection backbone node, the Time and place state of on-line monitoring backbone node, replace the whole node of monitoring;
(2) by Markov chain simulated time process, the backbone node selected according to step (1) independent through Markov chain, transition probability predicted events development tendency between utilization state.When through Markov chain, if the backbone node sensor states of prediction
sensor states X (the s of sequence τ and actual measurement for some time
i, t+ τ) inconsistent time, think and there occurs time anomaly;
(3) space distribution of network of waterways sensor represents with Bayesian network, and each sensor is regarded as a node of Bayesian network, the flow direction in river regards the direction on Bayesian network limit as.Sensor network can be regarded as the Bayesian network of a directed acyclic, infer that the probability of occurrence of spatial event judges whether free air anomaly occurs with Bayesian network;
(4) see that in the network of waterways, the whether free anomalous event of backbone node occurs according to Markov state conversion, then according to Bayesian network forecasting backbone node whether have living space anomalous event occur, finally determined whether that space-time anomalous event occurs, Time and place correlation models will be coordinated mutually to detect space-time anomalous event;
Wherein the concrete steps of step (1) are:
(1.1) labeling process: during initialization, all nodes are all non-dominate nodes; Each node u and R in its communication radius
uneighbours exchange the information of respective neighbours, now node u is according to neighbor information, judge whether neighbor node v and w that existence two can not directly intercom mutually, if exist, then node u alternatively dominate node participation structure CDS, otherwise show that node u can by other node control, not as CDS node.
(1.2) prune rule: the candidate's dominate node quantity obtained by labeling process is too much, candidate's dominate node needs according to prune rule, reduces the quantity of dominate node collection.If K the neighbor node of candidate's dominate node u can be communicated by other dominate nodes, the set of node that so deletion of node u obtains from CDS is still CDS, therefore concentrates deletion of node u from candidate's dominate node, and node u becomes non-CDS node.
(1.3) node in connected dominating set, as key contact, only needs the data stream of monitoring backbone node to replace all nodes of monitoring.This strategy can ensure that non-selected node can find at least one backbone node from its neighbor node, when anomalous event occurs near non-selected non-backbone node, key contact can be propagated into as soon as possible, abnormal generation can be detected rapidly, reduce the loss.
Wherein the concrete steps of step (2) are:
(2.1) Markov chain is the limited or denumerable sequence of events (E of on discrete time point one
1, E
2...) set, at any time, current state is only depended in the behavior in process future, has nothing to do with state before.By Markov chain simulated time process, cover the traffic diagram of wireless network, all sensor nodes independent through Markov chain, between utilization state transition probability predicted events occur state.
(2.2) as shown in Figure 5, three state is quantized into by the network of waterways free chlorine concentration of Sensor monitoring, Low (low concentration), Medium (moderate concentration), High (high concentration) each sensor stream is separately through Markov process, first define current state, then predict next step state.Suppose that sensor is at moment S
tstate be N
i, at moment S
t+1state be N
j, according to markovian state transition probability P
ij=P (S
t+1=N
j| S
t=N
i)=P (N
j| N
i) predicted events occur state and development tendency.
(2.3) sensor departs from behavior normal time and can be regarded as noise or as a time anomaly event.Occur frequently owing to departing from, so negated this possibility of noise, therefore, departing from of occurring continuously can regard time anomaly event as, when through Markov chain, if the backbone node sensor states of prediction
sensor states X (the s of sequence τ and actual measurement for some time
i, t+ τ) inconsistent time, think and there occurs time anomaly.
Wherein the concrete steps of step (3) are:
(3.1) as shown in Figure 4, for the network of waterways builds the spatial relationship that Bayesian network G comes analog sensor node and its neighbor node, each sensor is regarded as a node of Bayesian network, the flow direction in river regards the direction on Bayesian network limit as, so sensor network can be regarded as the Bayesian network of a directed acyclic.
(3.2) training data of Bayesian network is by S tuple
composition,
representative sensor
state.Can concentrate from historical data and produce a lot of training data, then can learn with maximum likelihood estimation algorithm the parameter obtaining Bayesian network.
(3.3) after the training stage, to each sensor, a conditional probability table can be obtained, according to the state of conditional probability table prediction sensor.Contrast predicted state and true observer state, if sensor S
iobserved reading do not belong to that state, think actual value deviate from study obtain spatial relationship, abnormal generation of having living space.
Fig. 2 is space-time accident detection algorithm flow chart, can find out, the idiographic flow of step (4) is:
(4.1) according to the backbone node that step (1) is selected, see that whether backbone node is free according to step (2) and extremely see that the whether free anomalous event of backbone node occurs.If backbone node there occurs time anomaly, the child nodes of the backbone node of time of origin exception is alternatively collected.If do not have time of origin abnormal, continue to detect the next timestamp state of backbone node.
(4.2) expecting state backbone node of time of origin exception and the node of Candidate Set thereof obtained by Bayesian Network Learning according to step (3) and observer state are compared, and see sensor S
iwhether deviate from the spatial relationship that study obtains.
(4.3) if backbone node SE and SI (SE is sensor node predicted value, and SI is observed reading) is different, free air anomaly occurs, and due to time anomaly, the value of space-time anomalous counts device adds 1.
(4.4) if the node in Candidate Set is detected exception of having living space, so the child nodes of this both candidate nodes also joins Candidate Set.Detect the Candidate Set interior joint that free air anomaly occurs whether free abnormal, if had, space-time anomalous counts device adds 1 simultaneously, in like manner, continue to detect Candidate Set interior joint and whether to have living space exception, if had, detection time is abnormal, and time of origin is abnormal, and space-time anomalous counts device adds 1.When the number of backbone node and its Candidate Set space-time exception reaches threshold value Q, just think and space-time anomalous event occurs.
Fig. 3 is that basin figure, Fig. 4 of the network of waterways represents network of waterways sensor network distribution plan, figure interior joint S
ifor being deployed in the sensor in river course, (S
i, S
j) representing the limit of connecting sensor, the direction on limit is the flow direction in river.The space distribution of network of waterways sensor represents with Bayesian network, and each sensor is regarded as a node of Bayesian network, the flow direction in river regards the direction on Bayesian network limit as.Sensor network can be regarded as the Bayesian network of a directed acyclic.The training data of Bayesian Network Learning parameter is by S tuple
composition.
representative
state.Can from historical data concentrate to produce from timestamp 1 to t a lot of training datas of sequence
then learn with maximum likelihood estimation algorithm the parameter obtaining Bayesian network.
Fig. 5 represents the Markov transfer process of free chloro concentration, three state is quantized into by the free chloro concentration of Sensor monitoring, Low (low concentration), Medium (moderate concentration), High (high concentration), Fig. 5 represents that free chlorine is low, in, the transfer process between high three state.
Fig. 6 is the state of certain moment Sensor Network interior joint free chloro concentration, has low, medium, high tri-kinds of different conditions, and Fig. 7 represents not the State Transferring of free chloro concentration in the same time, represents at a period of time interval N1 ~ N5, the State Transferring of free chloro concentration.Each sensor stream, separately through Markov process, first defines current state, then predicts next step state.Suppose that sensor is at moment S
tstate be N
i, at moment S
t+1state be N
j, according to markovian state transition probability P
ij=P (S
t+1=N
j| S
t=N
i)=P (N
j| N
i) predicted events occur state and development tendency.Sensor departs from behavior normal time and can be regarded as noise (due to sensor failure) or as a time anomaly event.Occur frequently owing to departing from, so negated this possibility of noise, therefore, departing from of occurring continuously can regard time anomaly event as.When through Markov chain, if the backbone node sensor states of prediction
sensor states X (the s of sequence τ and actual measurement for some time
i, t+ τ) inconsistent time, think and there occurs time anomaly.