Disclosure of Invention
In order to solve the problems in the prior art, the invention provides a wireless network topology inference method based on space-time characteristics. The technical problems to be solved by the invention are realized by the following technical scheme:
The embodiment of the invention provides a wireless network topology inference method based on space-time characteristics, which comprises the following steps:
step 1, setting a sensor network in a target area, wherein the sensor network comprises M sensor nodes which are randomly distributed;
step 2, detecting the power of a non-cooperative network in the target area by using the sensor network, wherein the non-cooperative network comprises N non-cooperative nodes;
Step 3, dividing the target area into M preset grids with the same number as the sensor nodes, and determining the power of each preset grid by using the power detected by the sensor network;
step 4, inputting the power of the preset grid obtained in the step 3 into a trained neural network model to obtain the coordinate information of the non-cooperative node;
Step 5, obtaining the distance information between the two non-cooperative nodes according to the coordinate information of the non-cooperative nodes determined in the step 4;
step 6, obtaining the starting time and the ending time of the sending information of each non-cooperative node according to the time information of the interaction between the non-cooperative nodes in the target area detected by the sensor network;
Step 7, obtaining the mean value of the frame interval and the variance of the frame interval of each node pair according to the starting time and the ending time of the sending information of the non-cooperative nodes;
And 8, inputting the mean value of the frame interval, the variance of the frame interval and the distance information of the node pairs into a trained classification model to obtain the communication relation of each node pair.
In one embodiment of the present invention, the power detected by the ith sensor node is:
Wherein p i,j represents the power of the ith sensor node detecting the jth non-cooperative node, p i,j=pjGtGr(λ/4πRi,j)2, wherein 1.ltoreq.i.ltoreq.M, 1.ltoreq.j.ltoreq.N, G t represents the antenna gain of the transmitting antenna, G r represents the antenna gain of the receiving antenna, λ represents the wavelength, and R i,j represents the distance between the ith sensor node detecting the jth non-cooperative node.
In one embodiment of the present invention, the power of the mth preset grid is:
Wherein, And B represents the number of sensors contained in the mth preset grid, wherein M is more than or equal to 1 and less than or equal to M.
In one embodiment of the present invention, the training method of the neural network model includes:
S1, acquiring a training set, wherein the training set comprises a plurality of non-cooperative training nodes;
S2, dividing the area where the non-cooperative training nodes are located into H training grids with the same size, wherein H is greater than M;
s3, calculating a distance R i,j' between the ith sensor training node and the jth non-cooperative training node;
S4, obtaining training power from the ith sensor training node to the jth non-cooperative training node according to the distance R i,j';
S5, inputting a plurality of input-output pairs (p (i),x(i)) into the neural network model to train the neural network model to obtain a trained neural network model, wherein p (i) is training power of the non-cooperative training nodes, and x (i) is a training grid where the real positions of the non-cooperative training nodes are located.
In one embodiment of the present invention, step 4 comprises:
And 4.1, inputting the power of each preset grid into the trained neural network model to obtain a positioning result of the non-cooperative node so as to determine the preset grid where the non-cooperative node is located.
And 4.2, taking the central position of the preset grid where the non-cooperative node is located as the coordinate position of the non-cooperative node.
In one embodiment of the present invention, the distance information between two non-cooperative nodes is:
Wherein, For the coordinates of the p-th non-cooperative node,For the coordinates of the q-th non-cooperative node, d p,q represents the distance between the p-th non-cooperative node and the q-th non-cooperative node.
In one embodiment of the present invention, the sensor network detects that the data acquired by the p-th non-cooperative node is:
where n represents the number of signals contained in F p, T represents the transpose of the matrix, Represents a set of real numbers,Representing n rows and 2 columns of real matrices;
The ith signal of the p-th non-cooperative node is:
Wherein, Indicating a start time of the ith signaling of the p-th non-cooperative node,Representing the duration of the ith signal of the p-th non-cooperative node.
In one embodiment of the present invention, the average value of the frame intervals is:
Wherein, Representing the average value of the frame intervals of the p-th non-cooperative node and the q-th non-cooperative node,Representing the frame interval of the p-th non-cooperative node and the q-th non-cooperative node,Indicating the start time of the ith signaling of the qth non-cooperative node.
In one embodiment of the present invention, the variance of the frame interval is:
Wherein, Representing the variance of the frame interval of the p-th non-cooperative node and the q-th non-cooperative node.
In one embodiment of the present invention, the connectivity of each node pair is represented by an adjacency matrix a, which is:
A=[aij]
the link connection situation a ij of the non-cooperative node v i and the non-cooperative node v j is as follows:
Wherein, 1 indicates that the non-cooperative node v i has a communication relationship with the non-cooperative node v j, and 0 indicates that the non-cooperative node v i does not have a communication relationship with the non-cooperative node v j.
Compared with the prior art, the invention has the beneficial effects that:
the wireless network topology inference method based on space-time characteristics combines node positioning and topology inference into a system to realize topology inference work when the position of a target node is unknown.
The positioning method adopts a machine learning method to realize the positioning of the target node.
The topology inference method of the invention provides space-time characteristics (mean value, variance of frame interval and distance between node pairs) as the basis for judging whether the communication relationship exists between the nodes, and adopts a machine learning method to rapidly obtain the topology inference result.
Other aspects and features of the present invention will become apparent from the following detailed description, which refers to the accompanying drawings. It is to be understood that the drawings are designed solely for purposes of illustration and not as a definition of the limits of the invention, for which reference should be made to the appended claims. It should be further understood that the drawings are not necessarily drawn to scale and that, unless otherwise indicated, they are merely intended to conceptually illustrate the structures and procedures described herein.
Detailed Description
The present invention will be described in further detail with reference to specific examples, but embodiments of the present invention are not limited thereto.
Example 1
Referring to fig. 1, fig. 1 is a schematic flow chart of a wireless network topology inference method based on space-time features according to an embodiment of the present invention, and the present invention provides a wireless network topology inference method based on space-time features, where the wireless network topology inference method includes steps 1 to 8, where:
step 1, setting a sensor network in a target area, wherein the sensor network comprises M sensor nodes which are distributed randomly, and the positions of the sensor nodes are known.
And detecting the power of a non-cooperative network in the target area L by using a sensor network formed by M sensor nodes distributed randomly in the target area L, wherein the non-cooperative network comprises N non-cooperative nodes.
In a specific embodiment, step 1 may specifically include steps 1.1-1.2, wherein:
Step 1.1, randomly setting M sensor nodes in a target area L, wherein the positions of the sensor nodes are known
Specifically, referring to fig. 2, a schematic diagram of a non-cooperative network including sensor nodes is provided in an embodiment of the present invention, where the non-cooperative network is composed of N non-cooperative nodes, the sensor network is composed of M sensor nodes and a sink node (the sink node is used to collect data sent by all other nodes and perform related processing, etc.), the M sensor nodes are scattered randomly in a target area, and coordinates of the sensor nodes areT represents the transpose of the matrix,Represents a set of real numbers,Representing a real matrix of M rows and 2 columns, the coordinates of the ith sensor are
And 2, detecting the power of a non-cooperative network in the target area by using a sensor network, wherein the non-cooperative network comprises N non-cooperative nodes.
Specifically, according to the energy distribution condition of the M sensor nodes in the detection target area, each sensor node obtains the received power at the position of each sensor node.
In this embodiment, the sensor detects the power of the non-cooperative node to obtain p= [ p 1,p2,…,pi,…,pM ], and the power detected by the ith sensor node is:
Wherein p i,j represents the power of the ith sensor node detecting the jth non-cooperative node, p i,j=pjGtGr(λ/4πRi,j)2, wherein 1.ltoreq.i.ltoreq.M, 1.ltoreq.j.ltoreq.N, N represents the total number of non-cooperative nodes in the non-cooperative network, G t represents the antenna gain of the transmitting antenna, G r represents the antenna gain of the receiving antenna, λ represents the wavelength, and R i,j represents the distance between the ith sensor node detecting the jth non-cooperative node.
And 3, dividing the target area into M preset grids with the same number as the sensor nodes, and determining the power of each preset grid by using the power detected by the sensor network.
Specifically, the target area is divided into M equal-sized preset grids according to the number of sensors, and then the power data of each preset grid is obtained according to the power data obtained by each sensor and the known sensor position information.
In this embodiment, the power distribution of M preset grids is obtained by obtaining the power data detected by each sensorWherein the power of the mth preset grid is expressed as: b represents the number of sensors contained in the M < th > preset grid, wherein M is more than or equal to 1 and less than or equal to M.
And 4, inputting the power of the preset grid obtained in the step 3 into a trained neural network model to obtain the coordinate information of the non-cooperative node.
In this embodiment, the training method of the neural network model includes:
s4.1, acquiring a training set, wherein the training set comprises a plurality of non-cooperative training nodes, and the non-cooperative training nodes are non-cooperative nodes for training.
Specifically, the training set is composed of data that can monitor a portion of non-cooperative nodes and can derive their locations.
S4.2, dividing the area where the non-cooperative training nodes are located into H training grids with the same size, wherein H > M.
S4.3, calculating the distance R i,j' between the ith sensor training node and the jth non-cooperative training node.
Specifically, the training set is composed of data from which part of non-cooperative nodes can be monitored and from which the positions thereof can be obtained, assuming that the coordinates of the j-th non-cooperative training node are z= (x j,yj), and then the distance between each non-cooperative training node and each sensor training node (i.e., the sensor node used for training) is calculated, and the distance R i,j' between the i-th sensor training node and the j-th non-cooperative training node is:
Wherein, The coordinates of the node are trained for the ith sensor.
And S4.4, obtaining the training power from the ith sensor training node to the jth non-cooperative training node according to the distance R i,j'.
Specifically, the distance R i,j' is introduced into the power formula of the step 2, so as to obtain the received power from the ith sensor training node to the jth uncooperative training node.
S4.5, inputting a plurality of input-output pairs (p (i),x(i)) into the neural network model to train the neural network model to obtain a trained neural network model, wherein p (i) is the training power of the non-cooperative training node, and x (i) is the training grid where the real position of the non-cooperative training node is located.
Specifically, a combination of non-cooperative training nodes is created, and assuming that there are n non-cooperative training nodes, the total number of combinations of non-cooperative training nodes that may occur in each training grid is:
The training set { (p, x) } = { (p (1),x(1)),(p(2),x(2)),…,(p(n),x(n)) } is input into the neural network model, where (p (i),x(i)) is the input-output pair, In order to obtain the power data, x (i)∈[0,1]H is a training grid where the real position of the non-cooperative node is located, and the weight parameters of the neural network model are trained to obtain a trained neural network model.
In a specific embodiment, step 4 may specifically include steps 4.1-4.2, wherein:
And 4.1, inputting the power of each preset grid into the trained neural network model to obtain a positioning result of the non-cooperative node so as to determine the preset grid where the non-cooperative node is located.
And 4.2, taking the central position of the preset grid where the non-cooperative node is located as the coordinate position of the non-cooperative node.
Specifically, when the sensor network detects the target area, power data p= [ p 1,p2,…,pi,…,pM ] of a scene to be detected is obtained, the data is used as input of a trained neural network model, the neural network model outputs a positioning result of the non-cooperative node, namely the non-cooperative node is positioned at a certain preset grid, and then the central position of the preset grid is positionedAs coordinates of a non-cooperative node, where r i=(xi,yi) represents coordinates of an i-th node.
And 5, obtaining the distance information between the two non-cooperative nodes according to the coordinate information of the non-cooperative nodes determined in the step 4.
Specifically, according to the positioning result of the target node (the target node is a non-cooperative node)Distance information between each non-cooperative node can be obtained, taking the p-th non-cooperative node and the q-th non-cooperative node as examples, the distance between the two non-cooperative nodes is as follows:
Wherein, For the coordinates of the p-th non-cooperative node,For the coordinates of the q-th non-cooperative node, d p,q represents the distance between the p-th non-cooperative node and the q-th non-cooperative node.
And 6, obtaining the starting time and the ending time of the sending information of each non-cooperative node according to the time information of interaction between the non-cooperative nodes in the target area detected by the sensor network.
Specifically, after the position of the target node is obtained in step 4, the radio station fingerprint recognition means are applied in combination with the information such as the frequency and the interception time of the signal, so that the communication signals between the target nodes can be distinguished, and the detected signal can be determined to be sent by which non-cooperative node. The detecting non-cooperative node may effectively detect the start time and signal duration of the signal transmitted by the target node within the given area. The data detected by all the non-cooperative nodes is represented as f= { F 1,F2,…,Fp,…,FN }, and the data acquired by the p-th non-cooperative node is represented as:
Where n represents the number of signals contained in F p.
The ith signal of the p-th non-cooperative node is:
Wherein, Indicating a start time of the ith signaling of the p-th non-cooperative node,Representing the duration of the ith signal of the p-th non-cooperative node.
And 7, obtaining the average value of the frame interval and the variance of the frame interval of each node pair according to the starting time and the ending time of the sending information of the non-cooperative nodes, wherein the average value, the variance and the distance of the node pair are used as the characteristics for judging whether the node pairs are communicated or not, and the node pair consists of two non-cooperative nodes.
Specifically, taking the p-th non-cooperative node and the q-th non-cooperative node as examples, the i-th signal of the p-th non-cooperative nodeAnd the ith signal of the qth uncooperative nodeThe frame interval therebetween is expressed asThe calculation formula is as follows:
the average value of the frame interval between the p-th non-cooperative node and the q-th non-cooperative node is expressed as The calculation formula is as follows:
the variance of the frame interval between the p-th non-cooperative node and the q-th non-cooperative node is expressed as The calculation formula is as follows:
Wherein, Representing the variance of the frame interval of the p-th non-cooperative node and the q-th non-cooperative node.
Then, taking the mean value of the frame interval, the variance of the frame interval and the distance of the node pair obtained in the step 5 as the characteristic of judging whether the non-cooperative node pair is connectedWherein C p=[c1→p,c2→p,…,cN→p]T represents the spatiotemporal characteristics of nodes other than the p-th non-cooperative node and the p-th non-cooperative node, the characteristics of the p-th non-cooperative node and the q-th non-cooperative node being
And 8, inputting the average value of the frame interval, the variance of the frame interval and the distance information of the node pairs into a trained classification model to obtain the communication relation of each node pair.
Specifically, a known training set is used for training a classification model, and then the mean value, the variance of the frame interval of the node pairs and the distance of the node pairs are used as features to be put into the trained classification model, so that the connection relation of the node pairs is obtained, and the topology inference result of the whole network is obtained.
In this embodiment, the training method of the classification model includes:
The training set is composed of data with known connection relations of node pairs, the frame interval mean value, variance and the distance of the node pairs of the training set are used as characteristic data, and the connection relations of the node pairs are used as labels, so that a trained classification model is obtained.
Specifically, a scene with known non-cooperative node connectivity is used as a training scene ,(C,A)=((C1,A1),(C2,A2),…,(Ci,Ai),…,(CI,AI)) as a training set to be input into a classification model to be trained, wherein (C i,Ai) is a set of training data, C i is characteristic data of an ith scene, and A i is an adjacency matrix of network topology in the scene, so that a trained classification model is obtained.
In a specific embodiment, data of the non-cooperative network to be tested is fed into a trained classification model to obtain a communication relation of each node pair, namely, an adjacent matrix A of the whole network is obtained.
Specifically, the adjacency matrix of the network is denoted as a= [ a ij ], where the link connection situation a ij of the non-cooperative node v i and the non-cooperative node v j is:
Wherein, 1 indicates that the non-cooperative node v i has a communication relationship with the non-cooperative node v j, and 0 indicates that the non-cooperative node v i does not have a communication relationship with the non-cooperative node v j.
The characteristic data of the wireless network detected by the sensor is C pre, and the characteristic data is input into a trained classification model to obtain an adjacent matrix A of the whole network.
The effectiveness of the wireless network topology inference method based on the space-time features of the present embodiment is verified through experiments as follows.
Specifically, referring to fig. 3, fig. 3 is a system operation block diagram of a wireless network topology inference method based on space-time features according to an embodiment of the present invention. Firstly, detecting the energy distribution condition in a target area through a sensor, and coarsely positioning a target node. Specifically, the power data detected by each sensor are put into a trained neural network model to obtain a positioning result of a target node, then the starting time and the duration of information transmission of the target node are extracted through effective detection of the target node, the mean value, the variance of the frame interval of each node pair and the distance between the node pairs are calculated to obtain the characteristics of whether a communication relationship exists between the node pairs or not, a space-time characteristic diagram is shown in fig. 4, the data of the network are input into the trained classification model, and a topology inference result of the whole network is obtained.
In the simulation, the antenna type of the target node is set to be an omni-directional antenna, a given area is divided into grids with the same number as the sensors, the positioning error output by the training network is finally measured by taking the side length of the divided grids as a unit as shown in fig. 5, and the CDF positioning error of the node is obtained. Fig. 6 shows the inference accuracy of the target node topology inference algorithm.
The invention provides a wireless network topology deducing method based on space-time characteristics, under the condition of determining the position of a non-cooperative node, a sensor node collects the power distribution condition of a target area, feeds the power distribution condition into a trained neural network model to obtain a positioning result of the target node, takes the distance and frame interval information between the nodes as the characteristic for judging whether a communication relation exists between the nodes, and feeds the distance and frame interval information into a trained classification model to obtain the deduced topology.
The wireless network topology inference method based on space-time characteristics combines node positioning and topology inference into a system to realize topology inference work when the position of a target node is unknown.
The positioning method adopts a machine learning method to realize the positioning of the target node.
The topology inference method of the invention provides space-time characteristics (mean value, variance of frame interval and distance between node pairs) as the basis for judging whether the communication relationship exists between the nodes, and adopts a machine learning method to rapidly obtain the topology inference result.
Example two
Yet another aspect of the invention provides an electronic device comprising a memory having a computer program stored therein and a processor implementing the steps of the node location-based unknown uncooperative topology inference method of any of the embodiments above when the computer program in the memory is invoked by the processor.
In the description of the invention, the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In the description of the present invention, the meaning of "a plurality" is two or more, unless explicitly defined otherwise.
In the description of the present specification, a description of the terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic data point described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristic data points described may be combined in any suitable manner in any one or more embodiments or examples. Further, one skilled in the art can engage and combine the different embodiments or examples described in this specification.
The foregoing is a further detailed description of the invention in connection with the preferred embodiments, and it is not intended that the invention be limited to the specific embodiments described. It will be apparent to those skilled in the art that several simple deductions or substitutions may be made without departing from the spirit of the invention, and these should be considered to be within the scope of the invention.