CN111225334A - Positioning method, terminal and computer readable storage medium - Google Patents
Positioning method, terminal and computer readable storage medium Download PDFInfo
- Publication number
- CN111225334A CN111225334A CN201811409686.4A CN201811409686A CN111225334A CN 111225334 A CN111225334 A CN 111225334A CN 201811409686 A CN201811409686 A CN 201811409686A CN 111225334 A CN111225334 A CN 111225334A
- Authority
- CN
- China
- Prior art keywords
- signal strength
- strength information
- weight value
- access point
- calculating
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 63
- 238000012360 testing method Methods 0.000 claims description 22
- 238000004891 communication Methods 0.000 claims description 11
- 238000012163 sequencing technique Methods 0.000 claims description 3
- 238000004422 calculation algorithm Methods 0.000 description 19
- 239000013598 vector Substances 0.000 description 18
- 238000004364 calculation method Methods 0.000 description 16
- 238000010586 diagram Methods 0.000 description 13
- 238000005516 engineering process Methods 0.000 description 9
- 238000012545 processing Methods 0.000 description 9
- 230000008859 change Effects 0.000 description 8
- 238000004590 computer program Methods 0.000 description 8
- 230000006870 function Effects 0.000 description 7
- 230000008569 process Effects 0.000 description 7
- 230000005540 biological transmission Effects 0.000 description 5
- 230000000694 effects Effects 0.000 description 5
- 230000000007 visual effect Effects 0.000 description 5
- 238000012937 correction Methods 0.000 description 4
- 239000011159 matrix material Substances 0.000 description 4
- 230000001360 synchronised effect Effects 0.000 description 4
- 238000002474 experimental method Methods 0.000 description 3
- 238000005070 sampling Methods 0.000 description 3
- 230000000903 blocking effect Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 239000006185 dispersion Substances 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/02—Services making use of location information
- H04W4/023—Services making use of location information using mutual or relative location information between multiple location based services [LBS] targets or of distance thresholds
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/30—Services specially adapted for particular environments, situations or purposes
- H04W4/33—Services specially adapted for particular environments, situations or purposes for indoor environments, e.g. buildings
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W64/00—Locating users or terminals or network equipment for network management purposes, e.g. mobility management
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W84/00—Network topologies
- H04W84/02—Hierarchically pre-organised networks, e.g. paging networks, cellular networks, WLAN [Wireless Local Area Network] or WLL [Wireless Local Loop]
- H04W84/10—Small scale networks; Flat hierarchical networks
- H04W84/12—WLAN [Wireless Local Area Networks]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Position Fixing By Use Of Radio Waves (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The invention discloses a positioning method, which comprises the following steps: acquiring first signal strength information received by a reference position within a preset time in a Radio Map database, wherein the first signal strength information is the signal strength of a signal transmitted by an access point received by the reference position at different time points; generating a first weight value corresponding to each first signal strength information and a second weight value corresponding to each access point based on the first signal strength information of the reference position; and determining the position of the user terminal based on the Radio Map database, second signal strength information received by the user terminal, the first weight value and the second weight value. The invention also discloses a terminal and a computer readable storage medium.
Description
Technical Field
The present invention relates to the field of positioning technologies, and in particular, to a positioning method, a terminal, and a computer-readable storage medium.
Background
In people's daily life, positioning services are widely applied, such as route navigation, searching for the position of an electronic device, and the like. Among them, the Wireless Local Area Network (WLAN) positioning technology is generally applied because it has the advantages of convenient deployment and no need of adding additional hardware devices.
WLAN positioning technology comprises an off-line Radio Map (Radio Map) establishing stage and an on-line positioning estimation stage. In the off-line Radio Map establishing stage, the Radio Map is established by using the signal strength information of each Access Point (AP) received by the terminal as fingerprint data. In the on-line positioning estimation stage, the position of the user is estimated by matching the signal intensity information acquired by the current user with the signal intensity information in the Radio Map. However, in the online positioning estimation stage, the signal strength information of each AP received by the terminal is different from the signal strength information in the offline Radio Map establishment stage due to the variation of the positioning environment and the performance of the access point, thereby causing the problem of inaccurate positioning in the online positioning estimation stage of the terminal.
Disclosure of Invention
In order to solve the above technical problems, embodiments of the present invention desirably provide a positioning method, a terminal, and a computer-readable storage medium, so as to solve the problem that in indoor positioning, due to the fact that a positioning environment changes continuously with time and different access point performances, an error of signal strength information acquired in an offline stage is large, and online positioning accuracy is affected, thereby improving positioning accuracy.
In order to achieve the above purpose, the technical solution of the embodiment of the present invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a positioning method, where the method includes:
acquiring first signal strength information received by a reference position within a preset time in a Radio Map database, wherein the first signal strength information is the signal strength of a signal transmitted by an access point received by the reference position at different time points;
generating a first weight value corresponding to each first signal strength information based on the first signal strength information of the reference position;
generating a second weight value corresponding to each access point based on the first signal strength information;
determining the position of the user terminal based on the Radio Map database, second signal strength information received by the user terminal, the first weight value and the second weight value; wherein the second signal strength information is a signal strength of a signal transmitted by the access point received by the user terminal.
In the above solution, the generating a first weight value corresponding to each first signal strength information based on the first signal strength information of the reference position includes:
acquiring a first probability corresponding to each piece of first signal strength information; wherein the first probability is indicative of a probability that a difference between a position determined based on the first signal strength information and the reference position satisfies a preset threshold;
calculating a confidence level of each of the first signal strength information based on a first probability of each of the first signal strength information and a number of times each of the first signal strength information occurs in the first signal strength information;
calculating a first similarity between the first signal strength information based on the first signal strength information of the reference position;
calculating a corrected confidence level of each of the first signal strength information based on a first similarity between the first signal strength information and a confidence level of each of the first signal strength information;
and generating a first weight value corresponding to each first signal strength information based on the corrected reliability of each first signal strength information.
In the foregoing solution, the calculating the reliability of each piece of first signal strength information based on the first probability of each piece of first signal strength information and the number of times that each piece of first signal strength information appears in the piece of first signal strength information includes:
calculating a second probability of each first signal strength information by adopting a Bayesian formula based on each first probability;
calculating a first mathematical expected value for each of the first signal strength information based on the second probability;
and obtaining the credibility of each first signal strength information based on the first mathematical expected value.
In the foregoing aspect, the calculating a corrected reliability of each of the first signal strength information based on a first similarity between the first signal strength information and a reliability of each of the first signal strength information includes:
obtaining a plurality of second similarities associated with ith signal strength information in the first signal strength information from the first similarities;
calculating a first difference value of each second similarity and a preset similarity parameter;
calculating a second mathematical expectation value based on each of the first difference values and the confidence level of each of the first signal strength information other than the ith signal strength information; wherein i is a positive integer greater than 0;
and acquiring the corrected reliability of the ith signal strength information based on the second mathematical expectation value and the reliability of the ith signal strength information.
In the foregoing solution, the generating a second weight value corresponding to each access point based on the first signal strength information includes:
acquiring third signal intensity information of which the signal intensity is greater than zero in the first signal intensity information;
acquiring an access point corresponding to each piece of third signal strength information to obtain an access point set;
calculating the probability of each access point in the access point set appearing in the access point set to obtain a third probability of each access point in the access point set;
calculating a first mean value of the third signal strength information, and calculating a mean square error of the first mean value and the third signal strength information;
calculating a second weight value corresponding to each access point in the access point set based on the reciprocal of the mean square error and each third probability;
and determining fourth signal strength information of which the signal strength is less than or equal to zero in the first signal strength information, wherein a second weighted value of the corresponding access point is a preset value.
In the foregoing solution, the generating a second weight value corresponding to each access point based on the first signal strength information further includes:
acquiring fifth signal strength information corresponding to each access point from the first signal strength information;
and calculating a second average value of the fifth signal strength information to obtain a second weight value corresponding to each access point.
In the foregoing solution, the generating a second weight value corresponding to each access point based on the first signal strength information further includes:
calculating a first information entropy of the test terminal at the reference position based on the number of the reference positions and a preset probability parameter;
calculating a fourth probability of the test terminal generating a preset event based on the corresponding relation between the first signal strength information and each access point; the preset event comprises that the reference terminal is located at the reference position, and the test terminal acquires the first signal strength information at the reference position;
calculating a second information entropy of a probability that the user equipment is located at the reference location and the first signal strength information is derived from each of the access points at the reference location based on the number of the reference locations and the fourth probability;
and calculating a second difference value between the first information entropy and each second information entropy, and determining each second difference value as a second weight value corresponding to each access point.
In the foregoing solution, the determining the location of the user terminal based on the Radio Map database, the second signal strength information received by the user terminal, the first weight value, and the second weight value includes:
acquiring a reference position and first signal strength information corresponding to the reference position based on the Radio Map database;
acquiring a distance difference parameter between a reference position and a user terminal based on the second weight value, the second signal strength information and the first signal strength information;
determining a location of the user terminal based on the distance difference parameter, the reference location and the first weight value.
In the foregoing solution, the obtaining a distance difference parameter between a reference location and a user equipment based on the second weight value, the second signal strength information, and the first signal strength information includes:
sorting the access points corresponding to each reference position from large to small based on the second weight value;
determining a preset number of target access points of each reference position based on the sequencing result, and acquiring sixth signal strength information corresponding to each reference position and the target access points;
and acquiring a distance difference parameter between a reference position and the user terminal based on the second weight value, the sixth signal strength information and the second signal strength information.
In the foregoing solution, the determining the location of the ue based on the distance difference parameter, the candidate location, and the first weight value includes:
calculating an inverse number of the distance difference parameter to the power of N, wherein N is a positive integer greater than zero;
and calculating a third mathematical expected value based on the reciprocal of the distance difference parameter to the power of N, the first weight value and the reference position, and using the position information obtained by the third mathematical expected value as the position of the user terminal.
In a second aspect, an embodiment of the present invention provides a terminal, where the terminal includes: a processor, a memory, and a communication bus; wherein,
the communication bus is used for realizing communication connection between the processor and the memory;
the memory for storing a positioning program operable on the processor;
the processor is configured to acquire first signal strength information, which is received by a reference location within a predetermined time, from a Radio Map database, where the first signal strength information is signal strength of a signal transmitted by an access point and received by the reference location at different time points; generating a first weight value corresponding to each first signal strength information based on the first signal strength information of the reference position; generating a second weight value corresponding to each access point based on the first signal strength information; determining the position of the user terminal based on the Radio Map database, second signal strength information received by the user terminal, the first weight value and the second weight value; wherein the second signal strength information is a signal strength of a signal transmitted by the access point received by the user terminal.
In a third aspect, an embodiment of the present invention provides a computer-readable storage medium, where one or more programs are stored, and the one or more programs are executable by one or more processors to implement the steps of the positioning method in any one of the first aspect.
According to the positioning method, the terminal and the computer readable storage medium provided by the embodiment of the invention, first signal strength information received by a reference position within a preset time is acquired in a Radio Map database; generating a first weight value corresponding to each first signal strength information and a second weight value corresponding to each access point based on the first signal strength information of the reference position; and determining the position of the user terminal based on the Radio Map database, the second signal strength information received by the user terminal, the first weight value and the second weight value, so that the positioning error caused by the positioning environment change can be effectively corrected by constructing a weight value for the signal strength information of each time point in the Radio Map database, and the weight value is continuously updated along with the environment change, so that the positioning precision is not influenced by the inapplicable signal strength data. Meanwhile, a weight is established according to the performance gap of the access points in the positioning environment, so that the influence of the access points with poor quality on the positioning precision can be reduced, and a more accurate user positioning position can be obtained.
Drawings
Fig. 1 is a schematic flow chart of a positioning method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a WLAN indoor positioning technology based on location fingerprints;
fig. 3 is a schematic diagram of WLAN indoor positioning technology based on location fingerprint and euclidean distance in RSS space;
fig. 4 is a schematic flow chart of another positioning method according to an embodiment of the present invention;
fig. 5 is a schematic flow chart of another positioning method according to an embodiment of the present invention;
fig. 6 is a schematic flow chart of a positioning method according to another embodiment of the present invention;
fig. 7 is a schematic flow chart of another positioning method according to another embodiment of the present invention;
fig. 8 is a schematic flow chart of another positioning method according to another embodiment of the present invention;
fig. 9 is a schematic diagram of a hardware structure of a positioning terminal according to an embodiment of the present invention;
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
An embodiment of the present invention provides a positioning method, which is applied to a positioning terminal, and as shown in fig. 1, the positioning method of this embodiment includes the following steps:
step 101: first signal strength information received by a reference position within a preset time is obtained in a Radio Map database, and the first signal strength information is the signal strength of signals transmitted by an access point and received by the reference position at different time points.
Step 102: and generating a first weight value corresponding to each first signal strength information based on the first signal strength information of the reference position.
Step 103: and generating a second weight value corresponding to each access point based on the first signal strength information of the reference position.
Step 104: and determining the position of the user terminal based on the Radio Map database, the second signal strength information received by the user terminal, the first weight value and the second weight value.
It can be understood that the positioning method of the embodiment of the present invention is a WLAN indoor positioning technology based on location fingerprints, and the technology mainly includes two stages: and establishing an off-line stage of the Radio Map database and an on-line positioning stage of the user terminal. As shown in fig. 2, a schematic diagram of a WLAN indoor positioning technology based on location fingerprints is shown, a Radio Map database about the relationship between signal strength information and sampling point positions (i.e. reference positions) is established in an offline stage. Firstly, determining Reference Points (RPs) in a WLAN positioning environment, in a general determination method, dividing a target area, that is, an environment to be positioned, into grids, taking a grid center as a Reference position, then traversing all the Reference positions, recording Received Signal Strength values (RSS) from each AP measured at each RP, and finally storing the RSS in a Radio Map database. And then, the user terminal is positioned immediately in an online stage, the user terminal to be positioned forms real-time data of an RSS vector by receiving RSS values of different APs, the real-time data is sent to a positioning server, and the RSS real-time data of the user and offline data in a Radio Map database are processed in the positioning server through a preset algorithm, so that the position of the user terminal is positioned based on a reference position.
Specifically, in the embodiment of the present invention, the RSS data of at least two APs can determine the positions of the RPs, and the data of at least two RPs can establish the Radio Map database in the embodiment of the present invention, so that the first signal strength information in the embodiment of the present invention is an RSS vector formed by the RSS data of at least two APs corresponding to at least two reference positions. When the AP transmits a signal to the RP, it also includes network information, service set ID (AP name), supported transmission rates, and other system information associated with the AP. Generally, the AP sends a signal to the RP every about 100ms, and the transmission period of 100ms is only an approximate period, and if transmission is delayed when transmission blocking occurs during transmission, the AP will continue to transmit signals according to the approximate period of 100ms when the blocking is released.
Optionally, the AP may also transmit a signal to the RP at other preset periods, which is not described herein again.
It is understood that the predetermined time in step 101 is a time period closest to entering the online positioning stage, preferably a time period between 10s and 300s, so as to ensure that there is not much change between the environment for acquiring RSS data offline and the current positioning environment, and at the same time, enough data can be obtained for calculating the first weight value corresponding to RSS.
Optionally, the predetermined time may also be defined as other time lengths, which are not described herein again.
Since the Radio Map database will be continuously updated in the offline stage, selecting RSS data in a period of time closest to the online location stage can effectively ensure that the RSS data used for calculating the weights are reliable data close to the current location environment.
It can be understood that, since the indoor environment is relatively complex, the signal transmitted by the AP is easily affected by the indoor environment variation, and the RSS values of the APs received by the same location at different sampling time points are different, i.e. the first signal strength information at different time points at the same reference location is different in step 101. On this basis, it may happen that RSS values stored in the Radio Map database in a disturbed environment become bad data causing errors in online positioning. Therefore, in step 102 of the embodiment of the present invention, in order to eliminate the influence of the RSS data due to the time and the change of the positioning environment, a first weight value is obtained for the RSS vectors acquired at different time points at the reference position in the Radio Map database, and the larger the first weight value is, the stronger the data reliability of the RSS vector data when used for online positioning is.
It can be understood that, in step 102 of the embodiment of the present invention, first weight values corresponding to different RSS vectors may be calculated based on methods such as a mean, a variance, an expected value, and a standard deviation of RSS vector data, and the RSS vectors appearing multiple times at different time points at the same reference position are accumulated with the first weight values, so as to improve the effect of the RSS vector data in calculating the user position, thereby improving the positioning accuracy in the online positioning stage.
It can be understood that, because the Radio Map database is established by establishing a mapping relationship between RSS vectors of the visual APs at the reference positions and the reference position coordinates, the visual APs at different reference positions are also different, that is, RSS data of the same AP at different reference positions are often different, in order to know the comprehensive influence of each AP on each reference position in the whole positioning space, in step 103 of the embodiment of the present invention, the visual APs at each reference position and the RSS data corresponding to the AP can be known based on the first signal strength information obtained in step 101, so as to know the influence of each AP on all reference positions, and a second weight value is formulated for each AP in the positioning environment based on the influence.
Specifically, in step 103 of the embodiment of the present invention, the second weight values corresponding to different APs may be determined through a random Mean AP algorithm, a maximum Mean value (Max RSS) algorithm, and an information entropy gain algorithm, where the weight values may improve the influence degree of RSS data generated by each AP at a reference position in the online positioning stage on positioning due to different performance, so as to improve the accuracy of the positioning position in the online positioning stage.
It can be understood that, after a first weight value corresponding to each RSS value and a second weight value corresponding to each AP are obtained, a weight matrix based on the first weight value and the second weight value may be constructed, and the weight matrix is called in the online positioning process.
It can be understood that step 104 in the embodiment of the present invention is a process of acquiring the location of the user terminal at an online stage, and in the embodiment of the present invention, it is preferable to perform matching operation between the user terminal and the reference location by using a K-means neighbor, KNN. Referring to the WLAN indoor positioning technology based on location fingerprints and the schematic euclidean distance diagram in the RSS space shown in fig. 3, taking as an example that only two experimental terminals and an AP1 and an AP2 receivable by a user terminal exist in a positioning environment, since RSS data of an AP in each reference location is collected in an offline stage, a two-dimensional vector space (also referred to as a signal space) with RSS values of AP1 and AP2 as coordinate axes can be established, and reference locations can be positioned in the two-dimensional vector space based on the RSS values of APs obtained at the respective reference locations, so as to obtain location fingerprints of the respective reference locations in the signal space. In the online stage, RSS sample vectors of the user terminal are obtained by measuring RSS values of the AP1 and the AP2 received by the user terminal, Euclidean distances between each position fingerprint and the RSS sample vectors of the user terminal are calculated, and the statistical average value of reference positions of K (K is a positive integer less than or equal to the number of the position fingerprints) corresponding to the position fingerprints with the minimum Euclidean distance is used as the positioning position of the user terminal.
Alternatively, the number of APs in the embodiment of the present invention may also be a positive integer N greater than 2, and then the signal space is an N-dimensional vector space composed of N-dimensional RSS vectors.
Optionally, the embodiment of the present invention may also use other feature matching algorithms or various clustering algorithms to obtain the location position of the user terminal in online location.
Through the technical scheme provided by the embodiment corresponding to fig. 1, it can be seen that in the embodiment of the present invention, in the offline stage, each RSS vector data in the Radio Map database is weighted by a first weight value, each AP is weighted by a second weight value, a weight matrix based on the first weight value and the second weight value is constructed, after second strength information of the user terminal is obtained, the first signal strength information in the Radio Map database required for positioning and the visual AP at the reference position are weighted based on the weight matrix, the data after weighting processing and the second strength information of the user terminal are used for KNN algorithm matching, and finally the position of the user terminal is determined.
Based on the foregoing embodiment, an embodiment of the present invention provides a positioning method, as shown in fig. 4, in an implementation manner of the embodiment of the method, the obtaining of the first weight value corresponding to each piece of first signal strength information in step 102 may be implemented by:
step 201: acquiring a first probability corresponding to each piece of first signal strength information; wherein the first probability is indicative of a probability that a difference between the position determined based on the first signal strength information and the reference position satisfies a preset threshold.
It is to be understood that the first weight value in the embodiment of the present invention is generated based on the reliability of the first signal strength information in the Radio Map database. Specifically, first, signal strength information meeting a predetermined condition is screened from the first signal strength information, where the predetermined condition is that a positioning test is performed by using a reference position corresponding to the first signal strength information in an experimental environment, the first signal strength information meeting a positioning distance error within a preset threshold range can be selected as valid data through the test, and an event probability meeting the predetermined condition in the process is calculated, and a formula for calculating the first probability is as follows:
in the above formula (1), a is a first probability, m is the number of first signal strength information, δ is a preset error parameter, (e)kδ) is an event in which the error between the position determined by the first signal strength information and the reference position in the experiment satisfies a preset error, p (e)kδ) is the probability of the event.
It will be appreciated that in actual calculations, the first signal strength information may be conveniently calculated by being transformed into an RSS vector. The preset error parameter δ is set according to the off-line testing environment, and is preferably 2m in the embodiment of the present invention.
Optionally, the preset error parameter δ may also be in other ranges according to the actual test environment and the preset definition, which is not described herein again.
Through the calculation of the first probability, the first signal strength information causing large positioning error in the Radio Map database can be filtered.
After the first probabilities are obtained, a second probability of each first signal strength information can be calculated through Bayesian formula conversion, and the formula for calculating the second probability is as follows:
in the above formula (2), a is the first probability and q is the second probability.
The mathematical expectation value calculated based on the second probability is a reliability corresponding to each piece of the first signal strength information, and the calculation formula of the reliability is as follows:
in the above formula (3), x is any one of the first signal strength information, W is a time period, and W iso(x) Is to contain the time period corresponding to this x.
It is understood that the first signal strength information with stable data appears multiple times at different sampling time points in the offline data, and therefore, the reliability of the first signal strength information with stable data can be enhanced by accumulating the probability of the first signal strength information appearing.
Through the above calculation in step 201, the confidence level corresponding to each piece of first signal strength information can be obtained.
Step 202: based on the first signal strength information of the reference position, a first similarity between the first signal strength information is acquired.
In order to further determine the weight value corresponding to the first signal strength information, in an implementation manner of the embodiment of the present invention, the reliability of each first signal strength information may be corrected by using a similarity between different first signal strength information at the same position. In the embodiment of the present invention, since each piece of first signal strength information is vector information synthesized by RSS values of a plurality of APs, it is preferable to calculate the degree of acquaintance between two RSS data by using a cosine similarity algorithm, where the formula for calculating the cosine similarity is as follows:
in the above formula (4), x is first sub-signal strength information in the first signal strength information, x ' is second sub-signal strength information in the first signal strength information different from x, and r (x, x ') is used to represent cosine similarity between x and x '.
Optionally, the similarity between the two pieces of sub-signal strength information in the first signal strength information may also be determined through other mathematical operations, which are not described herein again.
Step 203: and calculating the corrected reliability of each first signal strength information based on the first similarity between the first signal strength information and the reliability corresponding to each first signal strength information.
Specifically, in an implementation manner of the embodiment of the present invention, the corrected reliability of the first signal strength information is calculated based on a bayesian formula, and the calculation formula of the corrected reliability is as follows:
in the above formula (5), x is any one of the first signal strength information, x 'is any one of the first signal strength information different from x, o (x) represents a reference position in the signal space corresponding to x, c (x) is the reliability of x obtained in step 201, c (x') is the reliability of x 'obtained in step 201, r (x, x') is the similarity between x and x 'obtained in step 202, ρ is a preset similarity parameter, and c' (x) is the corrected reliability of x.
Specifically, ρ may be obtained by an experimental environment, and is preferably 0.7 here.
Optionally, in the embodiment of the present invention, ρ may take different values according to a change of an experimental environment, which is not described herein again.
Through the above formula, for different signal strengths x and x 'of APs received at the same reference position, the confidence level of x can be corrected according to the expected values of the similarity of x and x'. Since data having a high degree of similarity with most of the data in the set of data tends to have a higher degree of reliability, the degree of reliability of the RSS data having a high degree of reliability in the first signal strength information can be further enhanced by step 203.
Step 204: and generating a first weight value corresponding to each first signal strength information based on the correction credibility corresponding to each first signal strength information.
In this embodiment, according to the correction reliability of each piece of first signal strength information obtained in step 203, a first weight value corresponding to each piece of first signal strength information may be calculated, where a calculation formula of the first weight value is as follows:
in the above equation (6), x and x ' are two pieces of signal strength information different from each other in the first signal strength information, c ' (x) is the correction reliability of x acquired in step 203, c ' (x ') is the correction reliability of x ', o (x) represents a reference position corresponding to x in the signal space, o (x) ═ o (x ') represents that x ' is the same as the reference position corresponding to x in the signal space, and γ is a first weight value corresponding to x.
In step 204, a ratio of the corrected reliability of each sub-signal strength information in the first signal strength information to the sum of the corrected reliabilities of all sub-signal strength information is calculated to obtain a first weight value γ corresponding to each sub-signal strength information.
It can be understood that, in the embodiment of the present invention, the larger the first weight value γ corresponding to the sub-signal strength information is, the higher the data reliability of the sub-signal strength information is.
Optionally, the first weight value corresponding to each sub-signal strength information may also be obtained through other types of operations, which is not described herein again.
Through the technical scheme provided by the embodiment corresponding to fig. 4, it can be seen that by setting weighting according to data reliability for the first signal strength information acquired at different times within the preset time period in the RadioMap database, a small weight can be set for data with large errors in the positioning process, and a large weight can be set for relatively reliable data, so that more accurate positioning effect can be obtained by positioning calculation. And in the process that the Radio Map database is continuously updated along with time, a large weight is always given to new data close to the current positioning environment, and a small weight is given to old data, so that the positioning is more accurate.
Based on the foregoing embodiment, an embodiment of the present invention provides a positioning method, as shown in fig. 5, in an implementation manner of the embodiment of the method, the obtaining a second weight value corresponding to each access point in step 103 may be implemented by:
step 301: and acquiring third signal strength information of which the signal strength is greater than zero in the first signal strength information.
It is to be understood that in the present implementation, the second weight value corresponding to each AP needs to be determined based on the stability of the AP, and then the visible APs at the respective reference positions need to be confirmed first. In step 301, it is set that the device cannot receive the signal strength when the signal strength corresponding to the AP is less than zero, and based on the setting condition, third signal strength information with the signal strength greater than zero is screened from the first signal strength information and used as basic data for calculating the weight value of the AP.
Step 302: and acquiring the access point corresponding to each piece of third signal strength information to obtain an access point set.
Step 303: and calculating the probability of each access point in the access point set appearing in the access point set to obtain a third probability of each access point in the access point set.
It can be understood that, based on the obtained third signal strength information with the signal strength greater than zero, the corresponding access point information may be obtained from the radio map, that is, the set of visible APs at the respective reference positions is known, so that a third probability that the signal corresponding to each AP at the respective reference positions is received may be calculated, where the calculation formula of the third probability is as follows:
in the above equation (7), Ni is the probability that the first signal strength information of the ith AP is the third signal strength information (i.e. the probability that the ith AP is the AP visible to the terminal at the reference position),i.e., the sum of the probabilities that each AP is a visible AP at the reference location.
Optionally, other types of definitions may be performed on the visual conditions of the APs to obtain a third probability that the signal corresponding to each AP in the reference position is received, which is not described herein again.
Step 304: a first mean value of the third signal strength information is calculated, and a mean square error of the first mean value and the third signal strength information is calculated.
It can be understood that, in the embodiment of the present invention, the quantity for representing the stability of the AP is obtained by the variance information of the signal strength information corresponding to the AP, specifically, the variance information here is a mean square error, and a calculation formula of the mean square error is as follows:
in the above formula (8), RSSjDenotes jth third signal strength information corresponding to the AP, mean (RSS) is mean information of the third signal strength information, and N is the number of APs.
It is to be understood that, here, the mean information of the third signal strength information is calculated as the most reliable data, and the dispersion between the third signal strength information and the most reliable data can be known by comparing the mean square error of each third signal strength information corresponding to the AP with the mean information, and the larger the value of the mean square error, the more unstable the AP is.
Step 305: and calculating to obtain a second weight value corresponding to each access point in the access point set based on the reciprocal of the mean square error and each third probability.
Based on the probability that each AP is a visible AP at the reference position obtained in step 303 and the mean square error information obtained in step 304, a second weight value representing the stability of each AP may be calculated and obtained, where the calculation formula of the second weight value is as follows:
in the above-mentioned formula (9),is the third probability information acquired in step 303,is the mean square error information obtained in step 304, epsilon is a mathematical parameter that ensures that the denominator is not 0, and β is a second weight value.
It should be noted here that since the larger the mean square deviation value obtained in step 304 is, the more unstable the AP is, the reciprocal of the mean square deviation is taken when calculating the second weight value representing the stability of the AP, and in order to ensure that the reciprocal denominator is also not 0 in special cases, a preset parameter epsilon is introduced here, which is only used for RSSjEqual to mean (RSS) is used, and a minimum value is taken, such as 0.001 or some other number.
Step 306: and determining fourth signal strength information of which the signal strength is less than or equal to zero in the first signal strength information, wherein a second weighted value of the corresponding access point is a preset value.
It can be understood that, in step 301, the fourth signal strength information with the signal strength less than or equal to zero in the first signal strength information is regarded as the invisible APs, and therefore, only minimum values need to be set for the APs corresponding to the second weight values, so as to meet the actual operation requirements.
By setting the weight of the minimum value for the AP with poor judgment performance, the positioning error caused by poor performance of the AP can be effectively eliminated.
it is understood that, in the embodiment of the present invention, the larger the second weight value β corresponding to the AP is, the better the performance of the AP is.
Through the technical scheme provided by the embodiment corresponding to fig. 5, it can be known that in the embodiment of the present invention, the weight value corresponding to the AP can be obtained by calculating the variance information of the signal strength information related to the AP, the AP performance difference at each position can be obtained by weighting the APs, the AP with excellent performance is selected for positioning operation in the user terminal positioning, and the signal strength information of the AP with excellent performance is further weighted, so that a more accurate positioning effect can be obtained.
Based on the foregoing embodiment, an embodiment of the present invention provides a positioning method, as shown in fig. 6, in an implementation manner of the embodiment of the method, the obtaining a second weight value corresponding to each access point in step 103 may be implemented by:
step 401: fifth signal strength information corresponding to each access point is acquired from the first signal strength information.
Step 402: and calculating a second average value of the fifth signal strength information to obtain a second weight value corresponding to each access point.
it is to be understood that, in an implementation manner of the embodiment of the present invention, the second weight value β of the AP may be determined by calculating average information of signal strength information corresponding to the AP.
Specifically, in this implementation manner, fifth signal strength information corresponding to each access point is obtained based on the first signal strength information, second average value information of the fifth signal strength information is calculated, and a second weight value corresponding to each access point is calculated by using the second average value information, where a calculation formula of the second weight value is as follows:
in the above equation (10), RSSi is the corresponding APiFifth signal strength information of (5), mean (RSS)i) Is APiN is the number of APs, and the corresponding AP is obtained by the sum ratio of the signal strength mean information of each AP to the signal strength mean information of all APsisecond weight value β.
Optionally, the second weight value of the corresponding AP may also be determined based on other methods, for example, the signal strength mean value of each AP obtains mean value information of the signal strength mean values of all APs, and the second weight value of the corresponding AP is determined by a ratio of the signal strength mean value of each AP to the mean value information of the mean value. Therefore, for how to obtain the second weight value corresponding to each AP by using the signal strength mean value of each AP, details are not repeated here.
it can be understood that the larger the second weight value β corresponding to the AP is, the better the performance of the AP in positioning is.
Through the technical scheme provided by the embodiment corresponding to fig. 6, it can be known that in the embodiment of the present invention, the weighted value corresponding to the AP can be obtained by calculating the average value information of the signal strength information related to the AP, the AP performance difference at each position can be obtained by weighting the APs, the AP with excellent performance is selected for positioning operation in the user terminal positioning, and the signal strength information of the AP with excellent performance is further weighted, so that a more accurate positioning effect can be obtained.
Based on the foregoing embodiment, an embodiment of the present invention provides a positioning method, as shown in fig. 7, in an implementation manner of the embodiment of the method, the obtaining a second weight value corresponding to each access point in step 103 may be implemented by:
step 501: and calculating a first information entropy of the test terminal at the reference position based on the number of the reference positions and a preset probability parameter.
Step 502: calculating a fourth probability of the test terminal generating a preset event based on the corresponding relation between the first signal strength information and each access point; the preset event comprises that the reference terminal is located at a reference position, and the test terminal acquires first signal strength information at the reference position.
Step 503: based on the number of referenced locations and the fourth probability, a second information entropy of a probability that the user equipment is located at the reference location and the first signal strength information is derived from each access point at the reference location is calculated.
Step 504: and calculating a second difference value between the first information entropy and each second information entropy, and determining each second difference value as a second weight value corresponding to each access point.
it is to be understood that, in the implementation of the present invention, the second weight value β of the AP may be determined by calculating the information entropy of the AP.
Specifically, in the implementation, first, a first information entropy of a probability that the user equipment appears at the reference location is calculated based on the number of the reference locations and a preset probability parameter. The calculation formula of this step is as follows:
in the above equation (11), H (G) represents the information entropy of the location where the test terminal is located, i.e. the first information entropy in the present implementation, and p (Gg) represents that the user equipment is present at the location Gg, and G ═ 1,2,3 … niThe probability of the user equipment appearing at the reference position of each area in the experiment is generally considered to be equal, i.e. p (Gg) ═ 1/niTherefore, equation (11) can be simplified as follows:
H(G)=log2ni………………………….(12)
after the first information entropy is obtained, a fourth probability that the first signal strength information is derived from each access point can be calculated based on the first signal strength information, and a second information entropy of a joint probability that the user equipment is present at the reference location and the test terminal obtains the first signal strength information at the reference location can be calculated based on the number of the reference locations and the fourth probability. The calculation formula of this step is as follows:
in the above formula (13), H (G | AP)j) When the test point position is obtained from the jth AP (AP)j) When the first signal intensity is higher than the second signal intensity, the test point position is located in the conditional entropy of the uncertainty of the reference position in each area, namely the second information entropy in the implementation mode; wherein, p (G)g|APjV) is indicated at APjV-condition, test point is at GgConditional probability of (c), p (G)g|APjThe calculation of ═ v) can be given by the following equation (14) based on bayes' theorem:
in the formula (14), p (AP)j=v|Gg) Is shown in position GgMeasure APjThe first signal strength information of (a) is a probability of v, v being {0, -1-2,-3…-100}dBm;p(APj=v|Gg) The AP at the reference position can be obtained through the experimental result of the off-line stage Radio Map, namely, the AP at the reference position is counted through n times of measurement at the same reference positionjProbability of v, p (AP)jV) denotes AP measured at all reference positionsjIs the probability of v, i.e. the first signal strength information ofIn the above formula (13), p (G)g,APjV) may be denoted As P (AP)j=v|Gg)p(Gg) Indicating that the test point is at position GgSimultaneous APjJoint probability of v.
And finally, calculating a second difference value between the first information entropy and each second information entropy, and taking each second difference value as a second weight value corresponding to each access point. The formula for calculating the second weight value is as follows:
β=H(G)-H(G|APj)………………………….(15)
it can be understood that the larger the second weight value β corresponding to the AP is, the better the performance of the AP in positioning is.
Through the technical scheme provided by the embodiment corresponding to fig. 7, it can be known that in the embodiment of the present invention, the weight value corresponding to the AP can be obtained by calculating the entropy information of the signal strength information related to the AP, and the AP performance difference at each position can be obtained by weighting the APs, so that the AP with the excellent performance is selected for positioning operation in the user terminal positioning, and the signal strength information of the AP with the excellent performance is further weighted, so that a more accurate positioning effect can be obtained.
Based on the foregoing embodiment, an embodiment of the present invention provides a positioning method, as shown in fig. 8, in an implementation manner of the embodiment of the method, the determining the location of the user terminal in step 104 may be implemented by:
step 601: acquiring a reference position and first signal strength information corresponding to the reference position based on a Radio Map database;
it can be understood that, in the online positioning stage in the embodiment of the present invention, matching and comparison operations are mainly performed on real-time signal intensity information data acquired by a user terminal and historical signal intensity information stored in a Radio Map database, and a reference position in the Radio Map database is selected as a position of the user terminal according to a comparison result.
Specifically, in the embodiment of the present invention, the comparison operation process is mainly processed based on a KNN algorithm.
Optionally, other algorithms may be selected to perform matching processing between the real-time data of the user terminal and the historical data in the Radio Map database, for example, a clustering algorithm or a probability location algorithm, which is not described herein again.
Step 602: acquiring a distance difference parameter between the reference position and the user terminal based on the second weight value, the second signal strength information and the first signal strength information;
specifically, the distance difference parameter in this step refers to the euclidean distance in mathematics.
It can be understood that, in the embodiment of the present invention, the access points may be sorted based on the second weights of the access points, a predetermined number of multiple optimal performance access points are selected, and sixth signal strength information of the optimal access point at each reference position is obtained; calculating the Euclidean distance based on the sixth signal strength information weighted by the second weight value and the second signal strength information received by the user terminal, wherein a calculation formula of the Euclidean distance is as follows:
in the above formula (16), Dkrepresenting the calculated Euclidean distance, βiIs an optimal access point APiCorresponding to the second weight value, RSSu,iSixth Signal Strength information, RSS, which is an optimal Access Pointk,iIs a user terminal and an optimal access point APiCorresponding second signal strength information.
The influence of the signal strength of the optimal access point on the calculation of the Euclidean distance can be enhanced by weighting the signal strength at the reference position, so that the interference of the acquired signal strength information of the bad access point on the positioning of the user terminal is eliminated.
Step 603: and determining the position of the user terminal based on the distance difference parameter, the reference position and the first weight value.
It can be understood that, in the KNN algorithm, the euclidean distances in the signal space between the historical data of the signal strength information at each reference position and the real-time data of the signal strength information acquired by the user terminal are calculated, and K euclidean distances with the minimum euclidean distances are selected to be multiplied by the corresponding reference positions to calculate the expected value, which is the position of the user terminal estimated by using the reference positions.
Specifically, in the embodiment of the present invention, a formula for calculating the location of the user terminal is as follows:
in the above formula (17), (x)k,yk) Is the coordinate position of the kth reference position in signal space, (x)u,yu) Is the estimated position of the user terminal, gammakIs a weight value of the first signal strength information corresponding to the reference position,is the inverse of the a-th power of the euclidean distance obtained in step 802.
specifically, α here is a preset distance weighting parameter, and can be obtained according to an environmental experiment in an offline stage, α is a positive integer greater than 0, and the larger α is, the higher the positioning accuracy of the algorithm of the embodiment of the present invention is, but the accuracy reaches a limit when α is greater than or equal to 10.
Optionally, in the embodiment of the present invention, the position of the ue may also be calculated by using another algorithm, and a first weight value based on the signal strength information history data and a second weight value based on each AP in the positioning environment are added to the algorithm to calculate the position of the ue.
According to the technical scheme provided by the embodiment corresponding to fig. 8, in consideration of the fact that the historical data of the signal intensity information in the Radio Map database is updated with time along with the change of the environment, the data effectiveness of the historical data is gradually reduced, and therefore the problem of inevitable errors caused by a traditional positioning algorithm is solved; and considering that the performances of different APs in a positioning environment cannot be completely consistent, a second weight value is determined for each AP. The influence of positioning environment change and different AP (access point) performances on an online positioning stage caused by time change can be effectively reduced through the weighted values, and a related traditional positioning algorithm is optimized, so that the positioning algorithm has higher reliability, and an application scene is expanded.
Referring to fig. 9, which shows a specific hardware structure of a terminal provided by an embodiment of the present invention, the terminal 9 may include: a memory 92 and a processor 93; the various components are coupled together by a communication bus 91. It will be appreciated that a communication bus 91 is used to enable communications among these components. The communication bus 91 includes a power bus, a control bus, and a status signal bus, in addition to a data bus. But for clarity of illustration the various buses are labeled in figure 9 as communication bus 91.
A memory 92 for storing a positioning method program executable on the processor 93;
a processor 93, configured to execute the following steps when running the positioning method program:
acquiring first signal strength information received by a reference position within a preset time from a Radio Map database, wherein the first signal strength information is the signal strength of a signal transmitted by an access point received by the reference position at different time points;
generating a first weight value corresponding to each first signal strength information based on the first signal strength information of the reference position;
generating a second weighted value corresponding to each access point based on the first signal strength information;
determining the position of the user terminal based on a Radio Map database, second signal strength information received by the user terminal, a first weight value and a second weight value; wherein the second signal strength information is the signal strength of the signal transmitted by the access point received by the user terminal.
In other embodiments of the present invention, the processor 93 is configured to execute the following steps when executing the positioning method program:
acquiring a first probability corresponding to each piece of first signal strength information; wherein the first probability is indicative of a probability that a difference between the position determined based on the first signal strength information and the reference position satisfies a preset threshold;
calculating the reliability of each first signal strength information based on the first probability of each first signal strength information and the occurrence frequency of each first signal strength information in the first signal strength information;
calculating a first similarity between the first signal strength information based on the first signal strength information of the reference position;
calculating a corrected reliability of each first signal strength information based on a first similarity between the first signal strength information and a reliability of each first signal strength information;
and generating a first weight value corresponding to each first signal strength information based on the corrected reliability of each first signal strength information.
Calculating a second probability of each first signal strength information by adopting a Bayesian formula based on each first probability;
calculating a first mathematical expected value of each first signal strength information based on the second probability;
and obtaining the credibility of each first signal strength information based on the first mathematical expected value.
Acquiring a plurality of second similarities associated with ith signal strength information in the first signal strength information from the first similarities;
calculating a first difference value of each second similarity and a preset similarity parameter;
calculating a second mathematical expectation value based on each first difference value and the confidence level of each first signal strength information except the ith signal strength information; wherein i is a positive integer greater than 0;
and acquiring the corrected reliability of the ith signal strength information based on the second mathematical expectation value and the reliability of the ith signal strength information.
Acquiring third signal strength information of which the signal strength is greater than zero in the first signal strength information;
acquiring an access point corresponding to each piece of third signal strength information to obtain an access point set;
calculating the probability of each access point in the access point set appearing in the access point set to obtain a third probability of each access point in the access point set;
calculating a first mean value of the third signal strength information, and calculating a mean square error of the first mean value and the third signal strength information;
calculating to obtain a second weight value corresponding to each access point in the access point set based on the reciprocal of the mean square error and each third probability;
and determining fourth signal strength information of which the signal strength is less than or equal to zero in the first signal strength information, wherein a second weighted value of the corresponding access point is a preset value.
Acquiring fifth signal strength information corresponding to each access point from the first signal strength information;
and calculating a second average value of the fifth signal strength information to obtain a second weight value corresponding to each access point.
Calculating a first information entropy of the test terminal at the reference position based on the number of the reference positions and a preset probability parameter;
calculating a fourth probability of the test terminal generating a preset event based on the corresponding relation between the first signal strength information and each access point; the preset event comprises that a reference terminal is located at a reference position, and a test terminal acquires first signal strength information at the reference position;
calculating a second information entropy of a probability that the user equipment is located at the reference position and the first signal strength information is derived from each access point at the reference position based on the number of the reference positions and the fourth probability;
and calculating a second difference value between the first information entropy and each second information entropy, and determining each second difference value as a second weight value corresponding to each access point.
Acquiring a reference position and first signal strength information corresponding to the reference position based on a Radio Map database;
acquiring a distance difference parameter between the reference position and the user terminal based on the second weight value, the second signal strength information and the first signal strength information;
and determining the position of the user terminal based on the distance difference parameter, the reference position and the first weight value.
Sorting the access points corresponding to each reference position from large to small based on the second weight value;
determining a preset number of target access points of each reference position based on the sequencing result, and acquiring sixth signal strength information corresponding to each reference position and the target access points;
and acquiring a distance difference parameter between the reference position and the user terminal based on the second weight value, the sixth signal strength information and the second signal strength information.
Calculating the reciprocal of the distance difference parameter to the power of N, wherein N is a positive integer greater than zero;
and calculating a third mathematical expected value based on the reciprocal of the distance difference parameter to the power of N, the first weight value and the reference position, and taking the position information obtained by the third mathematical expected value as the position of the user terminal.
It will be appreciated that memory 92 in embodiments of the invention may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of example, but not limitation, many forms of RAM are available, such as Static random access memory (Static RAM, SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic random access memory (Synchronous DRAM, SDRAM), Double Data rate Synchronous Dynamic random access memory (ddr SDRAM ), Enhanced Synchronous SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and direct memory bus RAM (DRRAM). The memory 92 of the systems and methods described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
And processor 93 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 93. The Processor 93 may be a general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable Gate Array (FPGA) or other programmable logic device, discrete Gate or transistor logic device, or discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory 92, and a processor 93 reads information in the memory 92 and performs the steps of the above method in combination with hardware thereof.
Based on the foregoing embodiments, an embodiment of the present invention provides a computer-readable medium, where a positioning program is stored, and the positioning program, when executed by at least one processor, implements the steps of the positioning method in any of the above embodiments.
It is understood that the method steps in the above embodiments may be stored in a computer-readable storage medium, and based on such understanding, part of the technical solutions of the embodiments of the present invention that essentially or contributes to the prior art, or all or part of the technical solutions may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to execute all or part of the steps of the method described in the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the Processing units may be implemented within one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units configured to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described herein may be implemented with modules (e.g., procedures, functions, and so on) that perform the functions described herein. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
Specifically, when the processor 93 in the user terminal is further configured to run the computer program, the method steps described in the foregoing embodiments are executed, which is not described herein again.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should be noted that: the technical schemes described in the embodiments of the present invention can be combined arbitrarily without conflict.
The above description is only exemplary of the present invention and should not be taken as limiting the scope of the present invention, and any modifications, equivalents, improvements, etc. that are within the spirit and principle of the present invention should be included in the present invention.
Claims (12)
1. A positioning method is applied to a terminal, and the method comprises the following steps:
acquiring first signal strength information received by a reference position within a preset time in a Radio Map database, wherein the first signal strength information is the signal strength of a signal transmitted by an access point received by the reference position at different time points;
generating a first weight value corresponding to each first signal strength information based on the first signal strength information of the reference position;
generating a second weight value corresponding to each access point based on the first signal strength information;
determining the position of the user terminal based on the Radio Map database, second signal strength information received by the user terminal, the first weight value and the second weight value; wherein the second signal strength information is a signal strength of a signal transmitted by the access point received by the user terminal.
2. The method of claim 1, the generating a first weight value corresponding to each of the first signal strength information based on the first signal strength information of the reference location, comprising:
acquiring a first probability corresponding to each piece of first signal strength information; wherein the first probability is indicative of a probability that a difference between a position determined based on the first signal strength information and the reference position satisfies a preset threshold;
calculating a confidence level of each of the first signal strength information based on a first probability of each of the first signal strength information and a number of times each of the first signal strength information occurs in the first signal strength information;
calculating a first similarity between the first signal strength information based on the first signal strength information of the reference position;
calculating a corrected confidence level of each of the first signal strength information based on a first similarity between the first signal strength information and a confidence level of each of the first signal strength information;
and generating a first weight value corresponding to each first signal strength information based on the corrected reliability of each first signal strength information.
3. The method of claim 2, said calculating a confidence level for each said first signal strength information based on a first probability for each said first signal strength information and a number of times each said first signal strength information occurs in said first signal strength information, comprising:
calculating a second probability of each first signal strength information by adopting a Bayesian formula based on each first probability;
calculating a first mathematical expected value for each of the first signal strength information based on the second probability;
and obtaining the credibility of each first signal strength information based on the first mathematical expected value.
4. The method of claim 2, said calculating a revised confidence level for each of said first signal strength information based on a first similarity between said first signal strength information and a confidence level for each of said first signal strength information, comprising:
obtaining a plurality of second similarities associated with ith signal strength information in the first signal strength information from the first similarities;
calculating a first difference value of each second similarity and a preset similarity parameter;
calculating a second mathematical expectation value based on each of the first difference values and the confidence level of each of the first signal strength information other than the ith signal strength information; wherein i is a positive integer greater than 0;
and acquiring the corrected reliability of the ith signal strength information based on the second mathematical expectation value and the reliability of the ith signal strength information.
5. The method of claim 1, wherein generating a second weight value corresponding to each of the access points based on the first signal strength information comprises:
acquiring third signal intensity information of which the signal intensity is greater than zero in the first signal intensity information;
acquiring an access point corresponding to each piece of third signal strength information to obtain an access point set;
calculating the probability of each access point in the access point set appearing in the access point set to obtain a third probability of each access point in the access point set;
calculating a first mean value of the third signal strength information, and calculating a mean square error of the first mean value and the third signal strength information;
calculating a second weight value corresponding to each access point in the access point set based on the reciprocal of the mean square error and each third probability;
and determining fourth signal strength information of which the signal strength is less than or equal to zero in the first signal strength information, wherein a second weighted value of the corresponding access point is a preset value.
6. The method of claim 1, wherein generating a second weight value corresponding to each of the access points based on the first signal strength information, further comprises:
acquiring fifth signal strength information corresponding to each access point from the first signal strength information;
and calculating a second average value of the fifth signal strength information to obtain a second weight value corresponding to each access point.
7. The method of claim 1, wherein generating a second weight value corresponding to each of the access points based on the first signal strength information, further comprises:
calculating a first information entropy of the test terminal at the reference position based on the number of the reference positions and a preset probability parameter;
calculating a fourth probability of the test terminal generating a preset event based on the corresponding relation between the first signal strength information and each access point; the preset event comprises that the reference terminal is located at the reference position, and the test terminal acquires the first signal strength information at the reference position;
calculating a second information entropy of a probability that the user equipment is located at the reference location and the first signal strength information is derived from each of the access points at the reference location based on the number of the reference locations and the fourth probability;
and calculating a second difference value between the first information entropy and each second information entropy, and determining each second difference value as a second weight value corresponding to each access point.
8. The method of claim 1, wherein the determining a location of a user terminal based on the Radio Map database, second signal strength information received by the user terminal, the first weight value, and the second weight value comprises:
acquiring a reference position and first signal strength information corresponding to the reference position based on the Radio Map database;
acquiring a distance difference parameter between a reference position and a user terminal based on the second weight value, the second signal strength information and the first signal strength information;
determining a location of the user terminal based on the distance difference parameter, the reference location and the first weight value.
9. The method of claim 8, wherein the obtaining a distance difference parameter between a reference location and a user terminal based on the second weight value, the second signal strength information and the first signal strength information comprises:
sorting the access points corresponding to each reference position from large to small based on the second weight value;
determining a preset number of target access points of each reference position based on the sequencing result, and acquiring sixth signal strength information corresponding to each reference position and the target access points;
and acquiring a distance difference parameter between a reference position and the user terminal based on the second weight value, the sixth signal strength information and the second signal strength information.
10. The method of claim 8, said determining a location of a user terminal based on the distance difference parameter, the alternative location and the first weight value, comprising:
calculating an inverse number of the distance difference parameter to the power of N, wherein N is a positive integer greater than zero;
and calculating a third mathematical expected value based on the reciprocal of the distance difference parameter to the power of N, the first weight value and the reference position, and using the position information obtained by the third mathematical expected value as the position of the user terminal.
11. A terminal, the terminal comprising: a processor, a memory, and a communication bus; wherein,
the communication bus is used for realizing communication connection between the processor and the memory;
the memory for storing a positioning program operable on the processor;
the processor is configured to acquire first signal strength information, which is received by a reference location within a predetermined time, from a Radio Map database, where the first signal strength information is signal strength of a signal transmitted by an access point and received by the reference location at different time points; generating a first weight value corresponding to each first signal strength information based on the first signal strength information of the reference position; generating a second weight value corresponding to each access point based on the first signal strength information; determining the position of the user terminal based on the Radio Map database, second signal strength information received by the user terminal, the first weight value and the second weight value; wherein the second signal strength information is a signal strength of a signal transmitted by the access point received by the user terminal.
12. A computer-readable storage medium, characterized in that the computer-readable storage medium stores one or more programs which are executable by one or more processors to implement the steps of the positioning method according to any one of claims 1 to 10.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811409686.4A CN111225334B (en) | 2018-11-23 | 2018-11-23 | Positioning method, terminal and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811409686.4A CN111225334B (en) | 2018-11-23 | 2018-11-23 | Positioning method, terminal and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111225334A true CN111225334A (en) | 2020-06-02 |
CN111225334B CN111225334B (en) | 2022-04-12 |
Family
ID=70828761
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811409686.4A Active CN111225334B (en) | 2018-11-23 | 2018-11-23 | Positioning method, terminal and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111225334B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112291705A (en) * | 2020-10-26 | 2021-01-29 | 腾讯科技(深圳)有限公司 | Positioning method, device, storage medium and equipment based on signal difference information |
CN113645691A (en) * | 2021-09-16 | 2021-11-12 | 中国联合网络通信集团有限公司 | Indoor positioning method, server and terminal |
WO2022099999A1 (en) * | 2020-11-11 | 2022-05-19 | 中移(上海)信息通信科技有限公司 | Indoor positioning method, apparatus and device, and storage medium |
CN114585012A (en) * | 2020-12-01 | 2022-06-03 | 中移(成都)信息通信科技有限公司 | Method, device, equipment and storage medium for determining wireless signal strength |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102695269A (en) * | 2011-03-21 | 2012-09-26 | 华为技术有限公司 | Positioning correction method, relevant device and relevant system |
CN103874191A (en) * | 2012-12-11 | 2014-06-18 | 华东师范大学 | Positioning method based on WiFi wireless network |
CN103916954A (en) * | 2013-01-07 | 2014-07-09 | 华为技术有限公司 | Probability locating method and locating device based on WLAN |
CN105764137A (en) * | 2016-02-02 | 2016-07-13 | 北京邮电大学 | Indoor location method and system |
US20180124233A1 (en) * | 2010-09-21 | 2018-05-03 | Cellepathy Inc. | Restricting mobile device usage |
CN108769910A (en) * | 2018-06-15 | 2018-11-06 | 闽南师范大学 | A kind of method of WiFi positioning |
-
2018
- 2018-11-23 CN CN201811409686.4A patent/CN111225334B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20180124233A1 (en) * | 2010-09-21 | 2018-05-03 | Cellepathy Inc. | Restricting mobile device usage |
CN102695269A (en) * | 2011-03-21 | 2012-09-26 | 华为技术有限公司 | Positioning correction method, relevant device and relevant system |
CN103874191A (en) * | 2012-12-11 | 2014-06-18 | 华东师范大学 | Positioning method based on WiFi wireless network |
CN103916954A (en) * | 2013-01-07 | 2014-07-09 | 华为技术有限公司 | Probability locating method and locating device based on WLAN |
CN105764137A (en) * | 2016-02-02 | 2016-07-13 | 北京邮电大学 | Indoor location method and system |
CN108769910A (en) * | 2018-06-15 | 2018-11-06 | 闽南师范大学 | A kind of method of WiFi positioning |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112291705A (en) * | 2020-10-26 | 2021-01-29 | 腾讯科技(深圳)有限公司 | Positioning method, device, storage medium and equipment based on signal difference information |
WO2022099999A1 (en) * | 2020-11-11 | 2022-05-19 | 中移(上海)信息通信科技有限公司 | Indoor positioning method, apparatus and device, and storage medium |
CN114585012A (en) * | 2020-12-01 | 2022-06-03 | 中移(成都)信息通信科技有限公司 | Method, device, equipment and storage medium for determining wireless signal strength |
CN114585012B (en) * | 2020-12-01 | 2023-09-05 | 中移(成都)信息通信科技有限公司 | Method, device, equipment and storage medium for determining wireless signal strength |
CN113645691A (en) * | 2021-09-16 | 2021-11-12 | 中国联合网络通信集团有限公司 | Indoor positioning method, server and terminal |
Also Published As
Publication number | Publication date |
---|---|
CN111225334B (en) | 2022-04-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111225334B (en) | Positioning method, terminal and computer readable storage medium | |
US9369986B2 (en) | Wireless communication network for estimating the accuracy of fingerprinting positioning algorithms | |
US10042033B2 (en) | Apparatus and method for calibrating a radio positioning based position finding device | |
EP2118810B1 (en) | System and method for optimizing location estimate of mobile unit | |
CA2451290C (en) | Method and apparatus for providing accurate position estimates in instances of severe dilution of precision | |
CN106707235A (en) | Indoor range finding positioning method based on improved traceless Kalman filtering | |
CN107132504B (en) | Particle filter-based positioning and tracking device and method and electronic equipment | |
EP2141957A1 (en) | System and method for position estimation | |
US7970575B2 (en) | Method and apparatus for determining accuracy of the estimated location for a target in a wireless system | |
US10820152B2 (en) | Device diversity correction method for RSS-based precise location tracking | |
CN110366109B (en) | Positioning method and system for indoor target | |
Park et al. | Indoor positioning using Wi-Fi fingerprint with signal clustering | |
Subakti et al. | Indoor Localization with Fingerprint Feature Extraction | |
Dong et al. | Neural network based radio fingerprint similarity measure | |
Alfakih et al. | An enhanced indoor positioning method based on Wi-fi RSS fingerprinting | |
CN109996205A (en) | Data Fusion of Sensor method, apparatus, electronic equipment and storage medium | |
CN111836188B (en) | Online cooperative positioning and system based on Wi-Fi RSS | |
CN108680897A (en) | A kind of indoor orientation method, device, electronic equipment and storage medium | |
CN111654808B (en) | Method and system for updating fingerprint database and wifi positioning method and system | |
JP6513310B1 (en) | Track estimation device and portable information terminal | |
CN111474516A (en) | Multi-level indoor positioning method and system based on crowdsourcing sample surface fitting | |
Sretenović et al. | Experimental analysis of weight-compensated weighted centroid localization algorithm based on RSSI | |
Liu et al. | A novel indoor positioning method based on location fingerprinting | |
Chen et al. | A novel RSS-based indoor positioning algorithm using mobility prediction | |
CN107548033B (en) | Positioning device and method and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |