The content of the invention
In order to solve the above technical problems, the present invention provides a kind of WiFi localization methods and server, it is to be detected by gathering
Signal strength data corresponding with each WAP input deep neural network of client each antenna reception, realizes base
Positioned in the WiFi of deep neural network.
The technical scheme that the present invention is provided is as follows:
The invention discloses a kind of WiFi localization methods, methods described includes step:In S100, acquisition testing region each
The antenna signal strength data of the signal that each antenna that WAP receives client to be detected sends;S200, to collection
The antenna signal strength data pre-processed;S300, respectively by treatment after the antenna signal strength data input
The input data layer of the location model after training;S400, Internet based on the location model after training calculate it is described and each
The corresponding antenna signal strength data of WAP, and the position of client to be detected is determined according to the output result of output layer
Put.
It is further preferred that the step S200 is further included:When client to be detected includes multiple antennas, each nothing
When the antenna signal strength data of the signal that each antenna that line access point receives client to be detected sends are for multiple, then do not make
Treatment;When client only one of which antenna to be detected, each antenna that each WAP receives client to be detected sends
Signal antenna signal strength data be one when, an antenna signal strength data are divided into multiple antenna signal strengths
Data.
It is further preferred that also including step before the step S100:S000, training in advance deep neural network, will
Deep neural network after training is used as the location model.
It is further preferred that the step S000 further includes step:S001, pre-set training location tags;
S002, gather respectively each WAP receive training terminal multiple antennas each it is described training location tags detection
Multiple antenna signal strength data of signal are sent in region;Passed through in detection zone according to each described training location tags
Multiple antenna signal strength data genaration training sample data of the signal that multiple antennas of training terminal send, will be all described
Training sample data generate training dataset, and send into deep neural network;S003, the input data by deep neural network
Layer is defined as multi-channel data layer, and the number of active lanes of the multi-channel data layer is identical with the number of antennas of training terminal, described
The node of multi-channel data layer is corresponding with each WAP;According to the node and WAP pair of multi-channel data layer
The mode answered respectively is sent out multiple antennas that each WAP in each described training sample data receives training terminal
Multiple passages of the corresponding node of multiple antenna signal strength data inputs of signal, by the deep neural network output with
The corresponding training result of location tags is trained described in the training sample data;S004, the training result that will be exported successively
The corresponding training location tags are compared, and deep neural network is trained according to comparative result, will train
Deep neural network afterwards is used as the location model.
The invention also discloses a kind of WiFi location-servers, including:Data acquisition module, in acquisition testing region
The antenna signal strength data of the signal that each antenna that each WAP receives client to be detected sends;Pretreatment mould
Block, for being pre-processed to the antenna signal strength data for gathering;Locating module, for respectively by described in after treatment
The input data layer of the location model after the training of antenna signal strength data input, the Internet based on location model calculates described
The antenna signal strength data corresponding with each WAP, and client to be detected is determined according to the output result of output layer
The position at end.
It is further preferred that the pretreatment module is further used for including multiple antennas when client to be detected, each
When the antenna signal strength data of the signal that each antenna that WAP receives client to be detected sends are for multiple, do not make
Treatment;When client only one of which antenna to be detected, each antenna that each WAP receives client to be detected sends
Signal antenna signal strength data be one when, an antenna signal strength data are divided into multiple antenna signal strengths
Data.
It is further preferred that also including:Training module, for training in advance deep neural network, by the depth after training
Neutral net is used as the location model.
It is further preferred that the training module is further included:Label presets submodule, for pre-setting for instructing
Experienced training location tags;Training dataset generates submodule, and training terminal is received for gathering each WAP respectively
Multiple antennas multiple antenna signal strength data of signal are sent in detection zone in each described training location tags;Root
According to multiple antennas that signal of the location tags in detection zone by training multiple antennas of terminal to send is trained each described
Signal strength data generates training sample data, by all training sample data generation training datasets, and sends into depth
In neutral net;Input data layer defines submodule, for the input data layer of deep neural network to be defined as into multichannel number
According to layer, the number of active lanes of the multi-channel data layer is identical with the number of antennas of training terminal, the section of the multi-channel data layer
Point is corresponding with each WAP;Training prediction submodule, for node and wireless access according to multi-channel data layer
Each WAP in each described training sample data is received the corresponding mode of point multiple antennas of training terminal respectively
Multiple passages of the corresponding node of multiple antenna signal strength data inputs for being signaled, it is defeated by the deep neural network
Go out and the corresponding training result of location tags trained described in the training sample data, the training result that will be exported successively with
Its corresponding described training location tags is compared, and deep neural network is trained according to comparative result, after training
Deep neural network as the location model.
Compared with prior art, the present invention is provided a kind of WiFi localization methods and server, it is wireless by collecting each
The antenna signal strength data of the signal that each antenna that access point receives client to be measured sends, and it is input into the positioning for training
Model, you can determine client position to be measured, using the antenna signal strength data of multiple antennas as deep neural network
Input, improve the positioning precision of the terminal of different antennae quantity.
Specific embodiment
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, control is illustrated below
Specific embodiment of the invention.It should be evident that drawings in the following description are only some embodiments of the present invention, for
For those of ordinary skill in the art, on the premise of not paying creative work, other can also be obtained according to these accompanying drawings
Accompanying drawing, and obtain other implementation methods.
To make simplified form, part related to the present invention is only schematically show in each figure, they are not represented
Its as product practical structures.In addition, so that simplified form is readily appreciated, there is identical structure or function in some figures
Part, only symbolically depicts one of those, or has only marked one of those.Herein, " one " is not only represented
" only this ", it is also possible to represent the situation of " more than one ".
Fig. 1 is a kind of key step schematic diagram of WiFi localization methods of the invention, as shown in figure 1, a kind of WiFi positioning sides
Method, methods described includes step:Each WAP receives each day of client to be detected in S100, acquisition testing region
The antenna signal strength data of the signal that line sends;S200, the antenna signal strength data to gathering are pre-processed;
S300, respectively by treatment after the antenna signal strength data input training after location model input data layer;S400、
Internet based on the location model after training calculates the antenna signal strength data corresponding with each WAP,
And the position of client to be detected is determined according to the output result of output layer.
Specifically, above-mentioned client to be detected (hereinafter referred to as STA) is with smart mobile phone, notebook computer or personal flat board
The intelligent terminals such as computer are carrier.
Each WAP receives the letter that each antenna of client to be detected sends in detection zone in the present embodiment
Number the form of antenna signal strength data be<RSSI1, RSSI2, RSSI3, RSSI4, RSSI5>, wherein RSSI1 is AP1 receipts
The RSSI of the STA that the RSSI of the STA for arriving, RSSI2 are received for AP2, by that analogy.
Specifically, the general RSSI for obtaining STA by AP is used as the original input data of positioning, generally there is a factor
It is not taken into account:Multiple antennas.Such as mobile phone is usually 1x1 antennas, and mobile phone such as iphone6s in part is 2x2, notebook computer
It generally is 2x2.Due to the power big 3dB in theory of the power ratio 1x1 antennas of 2x2 antennas.So, if received in data
The quantity of antenna is not considered on collection, then causes certain error.If 2x2 antenna datas are subtracted 3dB carries out data conversion, effect
Quantity than giving no thought to antenna is good, but in fact also not accurate enough.Because two antennas of 2x2 antennas are in space
Diverse location, so the characteristic of its spatial channel is different, and the intensity of radio wave is just as the fluctuation on sea, past
When being in the crest of fluctuation toward an antenna, another antenna is in the trough of fluctuation, simply can not thus subtract at 3dB
Reason.
The present invention multiple antennas in the case of all antennas receive the RSSI of each AP and individually record, and every antenna
RSSI is input into deep learning neutral net separately as a passage of data Layer.So in the training of deep learning neutral net
When, the information for being adjusted to comprehensive all antennas of network meeting self adaptation is final to cause more accurately to be fitted, and increases WIFI positioning
Precision.
Each antenna of client position to be detected gathered in the present invention is described below and receives each WAP
Signal strength data corresponding with each WAP.
1st, assume now with AP1, AP2, AP3 are monitored to client STA to be detected 1, AP1, AP2 is 2 antennas, AP3
It is 1 antenna.STA1 is 2 antennas.
Table one
|
AP1 |
AP2 |
AP3 |
STA1 |
-32dBm;-30dBm |
-52dBm;-40dBm |
-60dBm |
As shown in Table 1, the signal strength data gathered when client to be detected is 2x2 antennas.
2nd, assume now with AP1, AP2, AP3 are monitored to client STA to be detected 2, AP1, AP2 is 2 antennas, AP3
It is 1 antenna.STA2 is 1 antenna.
Table two
|
AP1 |
AP2 |
AP3 |
STA2 |
-20dBm |
-30dBm |
-40dBm |
As shown in Table 2, the signal strength data gathered when client to be detected is 1x1 antennas.
Specifically, the antenna in examples detailed above due to client to be detected does not know, it may be possible to 1x1 antennas, it is also possible to
2x2 antennas, therefore, when the passage of input data layer of location model is defined, it is defined as multi-channel data layer.In order that
The signal strength data of 1x1 antennas collection disclosure satisfy that multi-channel data layer, then need the signal intensity number to the collection of 1x1 antennas
According to being pre-processed, the data based on multi-channel data layer are processed data into.
Preferably, the step S200 is further included:When client to be detected includes multiple antennas, each wireless access
When the antenna signal strength data of the signal that each antenna that point receives client to be detected sends are for multiple, then do not deal with;
When client only one of which antenna to be detected, each WAP receives the signal that each antenna of client to be detected sends
Antenna signal strength data be one when, an antenna signal strength data are divided into multiple antenna signal strength data.
The data of present invention collection are based on multiple antennas, i.e., when client to be detected is 1x1 antennas, then to the antenna of collection
Signal strength data is processed.Specific processing method is the antenna of each WAP for respectively receiving 1x1 antennas
Signal strength data is divided equally, and is divided into the number of active lanes identical some with the input data layer of location model.
In the present invention by taking 2x2 antennas as an example, the signal data intensity of the passage of 1x1 divided by 2, it is two port numbers to expand
According to, such as AP1 and STA2 be -20dBm, then power divided by 2 (being exactly to subtract 3dB on logarithm), as -23dBm.
Then table three is expressed as by the data after pretreatment:
Table three
|
AP1 |
AP2 |
AP3 |
STA1 |
-32dBm:-30dBm |
-52dBm:-40dBm |
-63dBm:-63dBm |
STA2 |
-23dBm:-23dBm |
-33dBm:-33dBm |
-43dBm:-43dBm |
Preferably, step is also included before the step S100:S000, training in advance deep neural network, after training
Deep neural network as the location model.
Specifically, the output result difference obtained according to positioning in the present invention, can include two kinds of specific implementations, side
Formula one is used as location model and exports belonging to client position to be detected certain and pre-sets by deep neural network
The probable value of classification, mode two is to be used as location model by deep neural network directly to export client position to be detected
Preset position coordinates.The present invention is not construed as limiting to specific training method.
The method that the present invention is trained using the global parameter for having supervision:The actual bit of the known signal strength data for receiving
Put, cause that the output of the Internet of deep neural network is identical with real result by constantly adjustment network parameter.
The step of Fig. 2 is a kind of training deep neural network of WiFi localization methods of the invention schematic diagram.Preferably, as schemed
Shown in 2, the step S000 further includes step:S001, pre-set training location tags;S002, each is gathered respectively
Multiple antennas that WAP receives training terminal send signal in each described training location tags in detection zone
Multiple antenna signal strength data;According to each described training location tags in detection zone by training multiple days of terminal
Multiple antenna signal strength data genaration training sample data of the signal that line sends, all training sample data are generated
Training dataset, and send into deep neural network;S003, the input data of deep neural network layer is defined as multichannel number
According to layer, the number of active lanes of the multi-channel data layer is identical with the number of antennas of training terminal, the section of the multi-channel data layer
Point is corresponding with each WAP;Node mode corresponding with WAP according to multi-channel data layer respectively will be every
Each WAP receives multiple antennas letter that multiple antennas of training terminal are signaled in the individual training sample data
Number intensity data is input into multiple passages of corresponding node, by deep neural network output and the training sample data
Described in the training corresponding training result of location tags;S004, the corresponding instruction of training result that will be exported successively
Practice location tags to be compared, deep neural network is trained according to comparative result, by the deep neural network after training
As the location model.
Specifically, because in the present embodiment signal strength data be the multiple antennas of collection receive each WAP with
The corresponding multidimensional data of WAP, therefore the input data layer of deep neural network of the definition as location model is more logical
Track data layer, due to by taking 2x2 antennas as an example, therefore the input data of deep neural network layer being defined as into two passages in the present invention
Data Layer.
Exported belonging to client position to be detected as location model by deep neural network in mode one below
As a example by the probable value of certain classification for pre-setting, the specific process for introducing the present invention to deep neural network training.
1st, in training, gather each WAP respectively first and receive each described training location tags in detection zone
Multiple antenna signal strength data of the signal that multiple antennas of the training terminal in domain on correspondence position are sent.The present embodiment
In preset training location tags be self-defining, detection zone can be specifically divided into default by mesh generation detection zone
The grid classification of quantity, the corresponding default training location tags of each grid classification distribution can also be built by detection zone
Vertical plane right-angle coordinate, it is default training location tags to set corresponding position coordinates in a coordinate system respectively.The present embodiment
In illustrated in mode one, below with real data explain the present invention in gather each it is default training location tags correspondence position
The corresponding signal strength data of each WAP that each antenna put is received.
Assuming that training terminal is 2x2 antennas, each antenna for collecting training terminal presets training position for one wherein
The antenna signal strength data that label position is signaled are as follows:
<(- 32, -30), (- 52, -40), (- 63, -63), 34>
Represent:
RSSI1=-32dBm (antenna 1), -30dBm (antenna 2)
RSSI2=-52dBm (antenna 1), -40dBm (antenna 2)
RSSI3=-63dBm (antenna 1), -63dBm (antenna 2)
Label=34, represents that this training location tags is designated 34, represents the grid institute that 34 are designated in detection zone
In position.
Each WAP is gathered successively receives multiple antennas of training terminal in each default training location tags
On the antenna signal strength data of signal that send, form training sample data.
2nd, training sample data training deep neural network is passed sequentially through.
Because the initial data for gathering is multidimensional data, therefore, definition is used as the defeated of the deep neural network of location model
It is also multi-channel data layer to enter data Layer, and the node of multi-channel data layer is corresponding with each WAP.According to multichannel
The node of data Layer mode corresponding with WAP is respectively by each WAP in each described training sample data
Receive multiple passages of the corresponding node of antenna signal strength data input for training multiple antennas of terminal to be signaled, the above
The signal that two antennas for stating each WAP reception training terminal train location tags position to send at one
Antenna signal strength data instance, the initial data that will be gathered is input into two channel datas layer, the data such as table of each passage input
Shown in four:
Table four
|
1 passage |
2 passages |
AP1 |
-32 |
-30 |
AP2 |
-52 |
-40 |
AP3 |
-63 |
-63 |
As shown in Table 4, passage 1 represents that the signal corresponding with each WAP of the collection of antenna 1 of training terminal is strong
Degrees of data, unit is DB, and passage 2 represents the signal intensity corresponding with each WAP of the collection of antenna 2 of training terminal
Data.
Successively by each default two passage for training the corresponding training sample data of location tags to send into deep neural network
Two passages of data Layer, finally export the error of training result and training location tags, finally by percentage regulation nerve net
Parameter in network causes that the Loss i.e. error of whole network is minimum.
It should be noted that do not indicate design parameter in entire depth neutral net, because these parameters and specific
The number of space and AP is relevant, not in the range of this patent.
Fig. 3 is a kind of main composition schematic diagram of WiFi location-servers of the invention, as shown in figure 3, a kind of WiFi is positioned
Server, including:Data acquisition module 100, client to be detected is received for each WAP in acquisition testing region
The antenna signal strength data of signal that send of each antenna;Pretreatment module 200, for the aerial signal to gathering
Intensity data is pre-processed;Locating module 300, for respectively by treatment after the antenna signal strength data input training
The input data layer of location model afterwards, the Internet calculating antenna signal strength data based on location model, and according to
The output result of output layer determines the position of client to be detected.
Specifically, above-mentioned client to be detected (hereinafter referred to as STA) is with smart mobile phone, notebook computer or personal flat board
The intelligent terminals such as computer are carrier.
Each WAP receives the letter that each antenna of client to be detected sends in detection zone in the present embodiment
Number the form of antenna signal strength data be<RSSI1, RSSI2, RSSI3, RSSI4, RSSI5>, wherein RSSI1 is AP1 receipts
The RSSI of the STA that the RSSI of the STA for arriving, RSSI2 are received for AP2, by that analogy.
Specifically, the general RSSI for obtaining STA by AP is used as the original input data of positioning, generally there is a factor
It is not taken into account:Multiple antennas.Such as mobile phone is usually 1x1 antennas, and mobile phone such as iphone6s in part is 2x2, notebook computer
It generally is 2x2.Due to the power big 3dB in theory of the power ratio 1x1 antennas of 2x2 antennas.So, if received in data
The quantity of antenna is not considered on collection, then causes certain error.If 2x2 antenna datas are subtracted 3dB carries out data conversion, effect
Quantity than giving no thought to antenna is good, but in fact also not accurate enough.Because two antennas of 2x2 antennas are in space
Diverse location, so the characteristic of its spatial channel is different, and the intensity of radio wave is just as the fluctuation on sea, past
When being in the crest of fluctuation toward an antenna, another antenna is in the trough of fluctuation, simply can not thus subtract at 3dB
Reason.
The present invention multiple antennas in the case of all antennas receive the RSSI of each AP and individually record, and every antenna
RSSI is input into deep learning neutral net separately as a passage of data Layer.So in the training of deep learning neutral net
When, the information for being adjusted to comprehensive all antennas of network meeting self adaptation is final to cause more accurately to be fitted, and increases WIFI positioning
Precision.
Preferably, the pretreatment module 200 is further used for including multiple antennas when client to be detected that each is wireless
When the antenna signal strength data of the signal that each antenna that access point receives client to be detected sends are for multiple, then do not make to locate
Reason;When client only one of which antenna to be detected, what each antenna that each WAP receives client to be detected sent
When the antenna signal strength data of signal are one, an antenna signal strength data are divided into multiple antenna signal strength numbers
According to.
The data of present invention collection are based on multiple antennas, i.e., when client to be detected is 1x1 antennas, then to the antenna of collection
Signal strength data is processed.Specific processing method is the antenna of each WAP for respectively receiving 1x1 antennas
Signal strength data is divided equally, and is divided into the number of active lanes identical some with the input data layer of location model.
In the present invention by taking 2x2 antennas as an example, the signal data intensity of the passage of 1x1 divided by 2, it is two port numbers to expand
According to, such as AP1 and STA2 be -20dBm, then power divided by 2 (being exactly to subtract 3dB on logarithm), as -23dBm.
Fig. 4 is that a kind of WiFi location-servers of the invention are fully composed schematic diagram.As shown in Figure 4, it is preferred that such as Fig. 4
It is shown, also include:Training module 400, for training in advance deep neural network, using the deep neural network after training as institute
State location model.
Specifically, the output result difference obtained according to positioning in the present invention, can include two kinds of specific implementations, side
Formula one is used as location model and exports belonging to client position to be detected certain and pre-sets by deep neural network
The probable value of classification, mode two is to be used as location model by deep neural network directly to export client position to be detected
Preset position coordinates.The present invention is not construed as limiting to specific training method.
The method that the present invention is trained using the global parameter for having supervision:Known signal corresponding with each WAP is strong
The physical location of degrees of data belongs to certain default training location tags, and deep neural network is caused by constantly adjustment network parameter
Internet output it is identical with real result.
Preferably, the training module 400 is further included:Label presets submodule 411, for pre-setting for instructing
Experienced training location tags;Training dataset generates submodule 412, and training is received eventually for gathering each WAP respectively
Multiple antennas at end send multiple antenna signal strength data of signal in each described training location tags in detection zone;
According to multiple days of each signal of the training location tags in detection zone by training multiple antennas of terminal to send
Line signal strength data generates training sample data, by all training sample data generation training datasets, and sends into depth
In degree neutral net;Data input layer defines submodule 413, for the input data layer of deep neural network to be defined as leading to more
Track data layer, the number of active lanes of the multi-channel data layer is identical with the number of antennas of training terminal, the multi-channel data layer
Node it is corresponding with each WAP;Training prediction submodule 414, for node and nothing according to multi-channel data layer
Each WAP in each described training sample data is received many of training terminal by the corresponding mode of line access point respectively
Multiple passages of the corresponding node of multiple antenna signal strength data inputs that individual antenna is signaled, by depth nerve
Network exports and the corresponding training result of location tags, the training that will be exported successively is trained described in the training sample data
The corresponding training location tags of result are compared, and deep neural network is trained according to comparative result, will
Deep neural network after training is used as the location model.
It should be noted that referring to the inventive method part for training for the training process of above-mentioned training module 400
The explanation of deep neural network, no longer repeats herein.The contents such as information exchange, implementation procedure in book server between each module
Same design is based on above method embodiment, particular content can be found in the narration in the inventive method embodiment, herein no longer
Repeat.
The contents such as information exchange, implementation procedure in book server between each module and above method embodiment are based on same
Design, particular content can be found in the narration in the inventive method embodiment, and here is omitted.
It should be noted that above-described embodiment can independent assortment as needed.The above is only of the invention preferred
Implementation method, it is noted that for those skilled in the art, is not departing from the premise of the principle of the invention
Under, some improvements and modifications can also be made, these improvements and modifications also should be regarded as protection scope of the present invention.