Positioning method and device
Technical Field
The embodiment of the invention relates to the field of wireless communication, in particular to a positioning method and a positioning device.
Background
Currently, the positioning technology of the terminal in the mobile communication network is attracting more and more attention, and the positioning technology can be divided into three types from the method, namely the positioning technology based on the triangular relation, the positioning technology based on the scene analysis and the positioning technology based on the proximity relation. As one of the proximity location technologies, the field intensity fingerprinting method is widely used in location applications because of its high location accuracy. However, the field intensity based fingerprint positioning method requires periodic maintenance of the fingerprint database, so that the operation and maintenance efficiency of the solution is low, and therefore, finding a more efficient positioning solution becomes a hot topic that is always discussed in the industry. In various positioning technologies, the arrival time difference scheme can avoid knowing the specific transmission time point of a signal at a transmitting end, so that technical obstacles are less than other schemes, and the scheme becomes a popular scheme for searching and using indoor positioning in the industry.
However, the existing positioning technology does not consider the influence of factors such as AD sampling time and clock stability in a radio frequency link in the positioning device (such as an access point) on the delay estimation, and therefore, how to effectively compensate the link delay error to improve the positioning accuracy is a problem to be solved in the prior art.
Disclosure of Invention
The embodiment of the invention provides a positioning method and a positioning device, which are used for solving the problem that the time delay error of a link between devices cannot be effectively compensated so as to improve the estimation accuracy of the time difference of arrival in the prior art.
The embodiment of the invention provides a positioning method, which comprises the following steps:
acquiring a first estimated time delay value of each access point, wherein the first estimated time delay value is a difference value between the receiving time of the access point for receiving the positioning signal of the terminal to be positioned and the sending time of the terminal to be positioned for sending the positioning signal;
acquiring a second estimated time delay value of each access point, wherein the second estimated time delay value is a difference value between the receiving time of the access point for receiving the positioning signal of the reference device and the sending time of the reference device for sending the positioning signal;
taking access points which receive the positioning signals of the terminal to be positioned and the positioning signals of the reference device as reference access points, wherein the number of the reference access points is at least three;
aiming at each reference access point, calculating a theoretical time delay value between the reference access point and the reference device according to the distance between the reference access point and the reference device; obtaining an error correction value of the reference access point according to the second estimated time delay value and the theoretical time delay value of the reference access point; correcting the first estimated delay value of the reference access point using the error correction value of the reference access point;
and obtaining the position information of the terminal to be positioned according to the corrected first estimated time delay value of the reference access point.
Optionally, the reference device is a preset reference terminal, and the reference terminal is configured to send the positioning signal; or the like, or, alternatively,
the reference device is an access point in the existing network, and the access point is set to send a positioning signal; or the like, or, alternatively,
the reference device is an existing network terminal with a positioning function in an existing network, and the existing network terminal is set to send a positioning signal.
Optionally, the reference device is plural; the method for using the access point which receives the positioning signal of the terminal to be positioned and the positioning signal of the reference device in each access point as a reference access point comprises the following steps:
for each reference device, determining an access point which receives a positioning signal of the reference device and a positioning signal of a terminal to be positioned as a candidate access point of the reference device;
and if the number of the candidate access points of the reference device is more than or equal to 3, determining the reference access point from the candidate access points of the reference device.
Optionally, the method further comprises:
if the reference devices with the number of the access points to be selected being more than or equal to 3 do not exist, taking the access point which receives the positioning signal of the terminal to be positioned and the positioning signals of two different reference devices as one of the reference access points;
at least two access points are selected from candidate access points of two different reference devices as reference access points.
Optionally, if the number of the candidate access points of the reference device is greater than or equal to 3, determining the reference access point from the candidate access points of the reference device includes:
determining whether the number of access points to be selected of at least two reference devices is larger than or equal to 3, and if so, determining the reference device with the time for receiving the positioning signal of the reference device closest to the time for receiving the positioning signal of the terminal to be positioned;
and determining the reference access point from the candidate access points of the reference devices closest in time.
Optionally, calculating a theoretical delay value between the reference access point and the reference device according to a distance between the reference access point and the reference device includes:
acquiring a position distance between the reference device and the access point through the position coordinates of the reference device and the access point;
the position distance is divided by the speed of light to obtain a theoretical time delay value of the positioning signal of the reference device received by the access point.
Optionally, obtaining an error correction value of the reference access point according to the second estimated delay value and the theoretical delay value of the reference access point, includes:
aiming at each reference access point, acquiring a time delay error of the reference access point by using the theoretical time delay value and the second estimated time delay value;
and taking the time delay error of the reference access point as an error correction value, or calculating the difference value of the time delay errors of any two reference access points in the reference access points, and taking the difference value as the error correction value.
Optionally, the error correction value of the reference access point is stored in a reference device corresponding to the reference access point to form a calibration sample library.
An embodiment of the present invention further provides a positioning apparatus, including:
a first acquisition unit: the time delay estimation method comprises the steps of obtaining a first estimation time delay value of each access point, wherein the first estimation time delay value is a difference value between the receiving time of a positioning signal of a terminal to be positioned received by the access point and the sending time of the positioning signal sent by the terminal to be positioned;
a second acquisition unit: the second estimated time delay value is a difference value between the receiving time of the positioning signal of the reference device received by the access point and the sending time of the positioning signal sent by the reference device;
a determination unit: the access points are used for taking the positioning signals of the terminal to be positioned and the positioning signals of the reference device as reference access points, and the number of the reference access points is at least three;
a calculation unit: the device comprises a reference access point, a reference device and a plurality of reference access points, wherein the reference access point is used for calculating a theoretical time delay value between the reference access point and the reference device according to the distance between the reference access point and the reference device; obtaining an error correction value of the reference access point according to the second estimated time delay value and the theoretical time delay value of the reference access point;
a correction unit: a first estimated delay value for the reference access point is corrected using the error correction value for the reference access point;
a positioning unit: and the time delay estimation module is used for obtaining the position information of the terminal to be positioned according to the corrected first estimation time delay value of the reference access point.
Optionally, the reference device is a preset reference terminal, and the reference terminal is configured to send the positioning signal; or the like, or, alternatively,
the reference device is an access point in the existing network, and the access point is set to send a positioning signal; or the like, or, alternatively,
the reference device is an existing network terminal with a positioning function in an existing network, and the existing network terminal is set to send a positioning signal.
Optionally, the reference device is plural; the determination unit is specifically configured to:
for each reference device, determining an access point which receives a positioning signal of the reference device and a positioning signal of a terminal to be positioned as a candidate access point of the reference device;
and if the number of the candidate access points of the reference device is more than or equal to 3, determining the reference access point from the candidate access points of the reference device.
Optionally, the determining unit is further configured to:
if the reference devices with the number of the access points to be selected being more than or equal to 3 do not exist, taking the access point which receives the positioning signal of the terminal to be positioned and the positioning signals of two different reference devices as one of the reference access points;
at least two access points are selected from candidate access points of two different reference devices as reference access points.
Optionally, the determining unit is further configured to:
determining whether the number of access points to be selected of at least two reference devices is larger than or equal to 3, and if so, determining the reference device with the time for receiving the positioning signal of the reference device closest to the time for receiving the positioning signal of the terminal to be positioned;
and determining the reference access point from the candidate access points of the reference devices closest in time.
Optionally, the computing unit is specifically configured to:
acquiring a position distance between the reference device and the access point through the position coordinates of the reference device and the access point; the position distance is divided by the speed of light to obtain a theoretical time delay value of the positioning signal of the reference device received by the access point.
Optionally, the computing unit is further configured to:
aiming at each reference access point, acquiring a time delay error of the reference access point by using a theoretical time delay value and the second estimated time delay value;
and taking the time delay error of the reference access point as an error correction value, or calculating the difference value of the time delay errors of any two reference access points in the reference access points, and taking the difference value as the error correction value.
Optionally, the apparatus further comprises:
a storage unit: and the error correction value of the reference access point is stored in the reference device corresponding to the reference access point to form a calibration sample library.
The embodiment of the invention provides a positioning method and a positioning device, wherein a first estimated time delay value of each access point is obtained, and the first estimated time delay value is a difference value between the receiving time of the access point for receiving a positioning signal of a terminal to be positioned and the sending time of the terminal to be positioned for sending the positioning signal; acquiring a second estimated time delay value of each access point, wherein the second estimated time delay value is a difference value between the receiving time of the access point for receiving the positioning signal of the reference device and the sending time of the reference device for sending the positioning signal; taking access points which receive the positioning signals of the terminal to be positioned and the positioning signals of the reference device as reference access points, wherein the number of the reference access points is at least three; aiming at each reference access point, calculating a theoretical time delay value between the reference access point and the reference device according to the distance between the reference access point and the reference device; obtaining an error correction value of the reference access point according to the second estimated time delay value and the theoretical time delay value of the reference access point; correcting the first estimated delay value of the reference access point using the error correction value of the reference access point; and obtaining the position information of the terminal to be positioned according to the corrected first estimated time delay value of the reference access point. In the embodiment of the invention, the access points which receive the positioning signal of the terminal to be positioned and the positioning signal of the reference device in each access point are used as the reference access points, the error correction value of the reference access point is obtained according to the obtained second estimation time delay value of the reference access point and the calculated theoretical time delay value, and the first estimation time delay value of the reference access point is corrected by using the error correction value of the reference access point, so that the problem of inaccurate positioning caused by link time delay errors in the prior art is solved, therefore, the first estimation time delay value of the reference access point is corrected by using the error correction value of the reference access point, and the link time delay errors among equipment can be effectively compensated to improve the accuracy of the first estimation time delay value of the reference; and obtaining the position information of the terminal to be positioned according to the corrected first estimated time delay value of the reference access point, thereby ensuring that the position information of the terminal to be positioned is more accurate.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings that are required to be used in the description of the embodiments will be briefly described below.
Fig. 1 is a schematic diagram of a system architecture of a positioning method according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a positioning method according to an embodiment of the present invention;
fig. 3 is a schematic coverage diagram of a positioning system according to an embodiment of the present invention;
FIG. 4 is a schematic overlay diagram of another positioning system according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a positioning device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more clearly apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
For better understanding of the system architecture in the present embodiment, the following description is made of the system architecture, which is shown in fig. 1 as follows:
fig. 1 exemplarily shows a system architecture of a positioning method provided by an embodiment of the present invention, including: the positioning device refers to the access point and locates the terminal.
The terminal to be positioned can send a positioning signal, the positioning signal can be a broadcast signal or a directional signal, the positioning signal is a generic name, and the positioning signal is only required to be distinguished by each access point so as to position the terminal. A terminal to be located may refer to a User Equipment (UE), an access terminal, a subscriber unit, a subscriber station, a mobile station, a remote terminal, a mobile device, a User terminal, a wireless communication device, a User agent, or a User Equipment. The access terminal may be a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a Personal Digital Assistant (PDA), a handheld device with Wireless communication function, a computing device or other processing device connected to a Wireless modem, a vehicle-mounted device, a wearable device, a terminal device in a future 5G network, and the like.
The positioning device may be a device for communicating with a terminal to be positioned, and may be a Base Transceiver Station (BTS) in a GSM system or a CDMA system, a Base Station (NodeB, NB) in a WCDMA system, an evolved Node B (eNB or eNodeB) in an LTE system, or the server may be another device capable of communicating with the terminal to be positioned and an access point. The positioning device is a functional unit set in the embodiment of the present invention, and the bearing positioning device may be the above-mentioned enumeration device, or a device with computing capability that obtains the estimated delay value through other communication devices.
The reference access point is selected from a plurality of access points which receive positioning signals of the terminal to be positioned, and may be a communication device which has a signal transceiving function and known position coordinates, such as an access point, a relay station, a router, and the like in an existing network.
Fig. 2 schematically illustrates a flow chart of a positioning method provided by an embodiment of the present invention, as shown in fig. 2, including the following steps:
step S101: acquiring a first estimated time delay value of each access point, wherein the first estimated time delay value is a difference value between the receiving time of the access point for receiving the positioning signal of the terminal to be positioned and the sending time of the terminal to be positioned for sending the positioning signal;
step S102: acquiring a second estimated time delay value of each access point, wherein the second estimated time delay value is a difference value between the receiving time of the access point for receiving the positioning signal of the reference device and the sending time of the reference device for sending the positioning signal;
step S103: taking access points which receive the positioning signals of the terminal to be positioned and the positioning signals of the reference device as reference access points, wherein the number of the reference access points is at least three;
step S104: aiming at each reference access point, calculating a theoretical time delay value between the reference access point and the reference device according to the distance between the reference access point and the reference device; obtaining an error correction value of the reference access point according to the second estimated time delay value and the theoretical time delay value of the reference access point; correcting the first estimated delay value of the reference access point using the error correction value of the reference access point;
step S105: and obtaining the position information of the terminal to be positioned according to the corrected first estimated time delay value of the reference access point.
It should be understood that the technical solution of the embodiment of the present invention can position terminal devices to be positioned in various systems; the reference device can be a preset reference terminal, an access point in the current network, and a current network terminal with a positioning function, and the reference device of the embodiment of the invention takes the access point in the current network as an example; the access points may be transceiver devices for radio frequency signals, devices for transmitting and receiving signals, at least one access point per cell in mobile communications.
As can be seen from the above method flow, step S101 and step S102 in the embodiment of the present invention do not have a sequence, and the specific implementation may be triggered based on that the terminal to be positioned needs to be positioned. In a specific implementation, in step S101 and step S102, the access points involved in the first estimated delay value and the second estimated delay value are not identical, and it is required to be considered as a reference device in a specific application. The estimated delay value may be the difference between the time when the positioning signal is received and the time when the positioning signal is transmitted, or may be the time when only the access point is concerned to receive the positioning signal based on the time difference of arrival method. Taking a terminal to be positioned as an example, specifically, after the terminal to be positioned sends positioning signals to all access points at the same time, each access point records the time of receiving the positioning signal sent by the terminal to be positioned, for example, for one of the access points, if the time of receiving the positioning signal of the terminal to be positioned by the access point is 10 points and zero 80, and the time of sending the positioning signal by the terminal to be positioned is 10 points, then the first estimated delay value of the access point is 80. Or the terminal to be positioned is at T0At the moment the positioning signal is sent, the access point 1 is at T1The positioning signal is received at the moment, and the access point 2 is at T2When the positioning signal is received at the moment, the time delay value of the access point 1 is T1-T0The delay value of access point 2 is T2-T0The difference between the arrival times of access point 1 and access point 2 is (T)1-T0)-(T2-T0)=T1-T2The time to send the positioning signal can be ignored. For each access point, there is a delay value for receiving a positioning signal sent by a terminal to be positioned, and the reason for generating the delay may be that the quality of a wireless communication channel is not high, or the load of a network is too large, etc. The time when the access point receives the positioning signal of the terminal to be positioned and the time when the terminal to be positioned sends the positioning signalThe time of the bit signal, the unit of the first estimated delay value may be seconds, milliseconds, etc.
In step S103, at least three access points are used as reference access points, where the positioning signal of the terminal to be positioned and the positioning signal of the reference device are received by each access point. Specifically, there may be a plurality of access points that each receive the positioning signal of the terminal to be positioned and the positioning signal of the reference device, and the plurality of access points that each receive the positioning signal of the terminal to be positioned and the positioning signal of the reference device are used as reference access points. In a specific implementation, if the reference access point and the reference device are in a three-dimensional space, the distance between the reference access point and the reference device can be represented by a distance formula of two known three-dimensional coordinates; if the reference access point is in two-dimensional space with the reference device, the distance of the reference access point from the reference device can be formulated as a distance between two known two-dimensional coordinates. Three reference aps are generally selected in the current positioning method.
By the method, the access points which receive the positioning signals of the terminal to be positioned and the reference device in each access point are used as reference access points, and at least three access points are selected from each access point to be used as reference access points, so that the basic requirement of positioning is met; the error correction value of the reference access point is obtained according to the obtained second estimated time delay value of the reference access point and the calculated theoretical time delay value, and the first estimated time delay value of the reference access point is corrected by using the error correction value of the reference access point, so that the problem of inaccurate and uncertain positioning caused by link time delay errors in the prior art is solved, and therefore, the link time delay errors among the devices can be effectively compensated by using the error correction value of the reference access point to improve the accuracy of the first estimated time delay value of the reference access point; and obtaining the position information of the terminal to be positioned according to the corrected first estimated time delay value of the reference access point, thereby ensuring that the position information of the terminal to be positioned is more accurate.
In specific implementation, in order to more clearly describe the comparison relationship between the first estimated delay value of the terminal to be positioned and the reference access point and the second estimated delay value of the reference access point and the reference device and the theoretical delay value, the following table 1 is taken as an example to describe:
table 1: an example of a comparison relationship between a first estimated delay value of a terminal to be positioned and a reference access point and between a second estimated delay value of the reference access point and a reference device and a theoretical delay value is shown, and the contents shown in table 1 are taken as an example in the embodiment of the present invention for description.
Table 1: first estimated time delay value of a terminal to be positioned and a reference access point and comparison relation between second estimated time delay value and theoretical time delay value of the reference access point and a reference device
In the embodiment of the present invention, it is assumed that the reference access points are access point 0, access point 1, and access point 2, the reference device is access point 3, and a terminal 0 to be positioned is obtained by obtaining a first estimated delay value of each reference access point: the first estimated delay value of the access point 0 for receiving the positioning signal sent by the terminal to be positioned at the time of T0 is 80, the first estimated delay value of the access point 1 for receiving the positioning signal sent by the terminal to be positioned at the time of T0 is 150, the first estimated delay value of the access point 2 for receiving the positioning signal sent by the terminal to be positioned at the time of T0 is 120, and the first estimated delay value is obtained by obtaining the second estimated delay value of each reference access point: the second estimated delay value of the access point 0 for receiving the positioning signal transmitted by the reference device at the time T0 is 105, the second estimated delay value of the access point 1 for receiving the positioning signal transmitted by the reference device at the time T0 is 136, the second estimated delay value of the access point 2 for receiving the positioning signal transmitted by the reference device at the time T0 is 320, and the theoretical delay values of the access point 0 and the reference device can be calculated by the position coordinates of the access point 0, the access point 1, the access point 2 and the reference device, and the theoretical delay values of the access point 2 and the reference device are assumed to be calculated as 100, and the theoretical delay values of the access point 2 and the reference device are assumed to be calculated as 130 and are assumed to be calculated as 300.
Optionally, the reference device is a preset reference terminal, and the reference terminal is configured to send the positioning signal; or, the reference device is an access point in the current network, and the access point is set to send the positioning signal; or, the reference device is an existing network terminal with a positioning function in an existing network, and the existing network terminal is configured to send the positioning signal. Specifically, the reference device may be a preset reference terminal, an access point in an existing network, and an existing network terminal having a positioning function, and in a specific implementation, all of the three reference devices are configured to transmit a positioning signal, where the access point in the existing network not only has a function of transmitting the positioning signal, but also has a function of receiving the positioning signal. When the reference device is an access point in the current network, the scheme utilizes equipment in the current network, but because the access points are all set to send positioning signals, the network resource consumption is large; when the reference device is a reference terminal, the reference terminal is preset in the current network and periodically or aperiodically sends a positioning signal, so that the consumption of network resources of an access point type can be reduced; when the reference device is the terminal of the current network with the positioning function in the current network, the device of the current network is well utilized, but if the terminal of the current network without the positioning function exists, the positioning can not be carried out.
In the embodiment of the invention, a plurality of access points all receive the positioning signals of the terminal to be positioned and the positioning signals of the reference device, and how to screen out at least three suitable reference access points becomes a more important link in the positioning process. The embodiment of the invention provides a plurality of screening modes based on the method, and the detailed list is as follows:
the method comprises the steps that according to each reference device, an access point which receives a positioning signal of the reference device and a positioning signal of a terminal to be positioned is determined to be a candidate access point of the reference device; and if the number of the candidate access points of the reference device is more than or equal to 3, determining the reference access point from the candidate access points of the reference device. Specifically, the reference device is multiple, and may be multiple preset reference terminals, multiple access points in an existing network, and multiple existing network terminals having a positioning function, in this embodiment, taking multiple access points in an existing network as an example, for each of the multiple access points in the existing network, an access point that receives a positioning signal of the reference device and a positioning signal of a terminal to be positioned is taken as a candidate access point of the reference device, and if the number of the candidate access points is greater than or equal to 3, at least three reference access points are determined from the candidate access points of the reference device, for example, in the embodiment of the present invention, three reference access points are determined from the candidate access points of the reference device as access point 0, access point 1, and access point 2 in fig. 3. In specific implementation, the number of access points which receive the positioning signal of the reference device and the positioning signal of the terminal to be positioned may be greater than 3, and at this time, three access points which receive the best positioning signal quality need to be selected as reference access points, which satisfies the precondition of positioning operation, because at least three access points are needed for positioning the position of the terminal to be positioned.
The positioning system coverage to which the above method is applied may be as shown in fig. 3, and fig. 3 exemplarily shows a positioning system coverage. In the figure, access point 0, access point 1, and access point 2 are reference access points, and access point 3 is one of a plurality of reference devices.
If the reference devices with the number of the access points to be selected being more than or equal to 3 do not exist, taking the access point which receives the positioning signal of the terminal to be positioned and the positioning signals of two different reference devices as one of the reference access points; at least two access points are selected from candidate access points of two different reference devices as reference access points. Specifically, if the number of the access points to be selected is smaller than 3, one access point that receives the positioning signal of the terminal to be positioned and the positioning signals of two different reference devices is selected as one of the reference access points, for example, the access point that receives the positioning signal of the terminal to be positioned and the positioning signals of two different reference devices is access point 1 in fig. 4; then, at least two access points are selected from the candidate access points that have received the two different reference device access points 3 and 4 as reference access points, for example, two access points are selected from the candidate access points that have received the two different reference device access points 3 and 4 as access points 0 and 2 in fig. 4. The positioning system overlay to which this method is applied may be as shown in fig. 4, where fig. 4 illustrates another positioning system overlay. In the figure, access point 0, access point 1, and access point 2 are reference access points, and access point 3 and access point 4 are reference devices. Another implementation case may be that at least three reference access points are selected from the access points; the error correction values for the reference access points are looked up from a reference list of at least two reference devices in the calibration sample library. For example, if the access points are referred to as access point 0, access point 1, and access point 2, the error correction values of access point 0 and access point 1 are stored in the candidate access point of access point 3, and the error correction values of access point 1 and access point 2 are stored in the candidate access point of access point 4, so that time difference calibration can be achieved.
And thirdly, if the number of the access points to be selected of the reference device is more than or equal to 3, determining the reference access point from the access points to be selected of the reference device, wherein the third step comprises the following steps: determining whether the number of access points to be selected of at least two reference devices is larger than or equal to 3, and if so, determining the reference device with the time for receiving the positioning signal of the reference device closest to the time for receiving the positioning signal of the terminal to be positioned; and determining the reference access point from the candidate access points of the reference devices closest in time. Specifically, if the number of the access points to be selected of the at least two reference devices is greater than or equal to 3, then one reference device is determined from the at least two reference devices, where the time when the positioning signal of the reference device is received and the time when the positioning signal of the terminal to be positioned is received are closest, and the two reference devices are respectively the reference device 1 and the reference device 2, the time when the positioning signal of the reference device 1 is received and the time when the positioning signal of the terminal to be positioned is received are respectively 10 o 'clock and 10 o' clock zero 2, and the time when the positioning signal of the reference device 2 is received and the time when the positioning signal of the terminal to be positioned is received are respectively 10 o 'clock and 10 o' clock zero 8, then the reference device 1 is selected from the two reference devices as the reference device for sending the positioning signal, and the selected reference device 1 is the access point 3 in fig., the unit of the time when each access point receives the positioning signal of the reference device 1 and the time when the positioning signal of the terminal to be positioned is received, the unit of the time when each access point receives the positioning signal of the reference device 2 and the unit of the time when the positioning signal of the terminal to be positioned is received can be minutes, seconds, milliseconds and the like; and selecting three reference access points from the access points to be positioned which all receive the positioning signals sent by the access point 3 and the terminal to be positioned. The reference device is selected from the reference devices with the time of receiving the positioning signals of the reference devices closest to the time of receiving the positioning signals of the terminal to be positioned, so that the real-time performance of sending and receiving the positioning signals is guaranteed, and the positioning accuracy is guaranteed.
Optionally, calculating a theoretical delay value between the reference access point and the reference device according to a distance between the reference access point and the reference device includes: acquiring a position distance between the reference device and the access point through the position coordinates of the reference device and the access point; the position distance is divided by the speed of light to obtain a theoretical time delay value of the positioning signal of the reference device received by the access point.
Optionally, obtaining an error correction value of the reference access point according to the second estimated delay value and the theoretical delay value of the reference access point, includes: aiming at each reference access point, acquiring a time delay error of the reference access point by using the theoretical time delay value and the second estimated time delay value; and taking the time delay error of the reference access point as an error correction value, or calculating the difference value of the time delay errors of any two reference access points in the reference access points, and taking the difference value as the error correction value. Specifically, the error correction value may be obtained by either of the following two ways:
mode 1: and for each reference access point, obtaining the delay error of the reference access point by using the theoretical delay value and the second estimated delay value between the reference device and the reference access point, and taking the delay error as an error correction value. For example, taking the contents of table 1 as an example to illustrate the obtaining of the error correction in this manner, for the reference ap 0, the delay error is the difference between the theoretical delay value between ap 3 and ap 0 and the estimated delay value at time T0, i.e. the theoretical delay value minus the estimated delay value at time T0, which can be obtained from table 1, for the reference ap 0, the delay error is 100 minus 105 and equals minus 5; for reference ap 1, the delay error is the difference between the theoretical delay value between ap 3 and ap 1 and the estimated delay value at time T0, i.e. the theoretical delay value minus the estimated delay value at time T0, as can be obtained from table 1, and for reference ap 1, the delay error is 130 minus 136, which is equal to minus 6; for reference ap 2, the delay error is the difference between the theoretical delay value between ap 3 and ap 2 and the estimated delay value at time T0, i.e. the theoretical delay value minus the estimated delay value at time T0, as can be seen from table 1, and for reference ap 2, the delay error is 300 minus 320, which is equal to minus 20; taking the time delay error of the reference access point 0 as minus 5, the time delay error of the reference access point 1 as minus 6 and the time delay error of the reference access point 2 as minus 20 as error correction values;
mode 2: and calculating the difference of the time delay errors of any two reference access points in the reference access points for receiving the access point 3, and taking the difference as an error correction value. Specifically, the difference between the delay errors of any two reference access points in the reference access points receiving the access point 3 is: the difference between the theoretical delay values of any two reference access points and access point 3 is subtracted by the difference between the estimated delay values of any two reference access points and access point 3 at time T0. For example, taking the content of table 1 as an example to illustrate the acquisition of error correction in this manner, the theoretical delay values between access point 0, access point 1, access point 2 and access point 3 and the estimated delay value at time T0 can be known from table 1, and therefore, the difference between the delay errors of access point 0 and access point 1 receiving access point 3 is (100-) (130) - (105-) (136) × (1); the difference between the delay errors of the access point 0 and the access point 2 receiving the access point 3 is (100-; the difference between the delay errors of the access point 1 and the access point 2 for receiving the access point 3 is (130-; and taking the difference value of the time delay errors of the access point 0 and the access point 1 for receiving the access point 3 as 1, the difference value of the time delay errors of the access point 0 and the access point 2 for receiving the access point 3 as 15, and the difference value of the time delay errors of the access point 1 and the access point 2 for receiving the access point 3 as 14 as error correction values.
The error correction value obtained in the two modes can be obtained by periodic measurement or aperiodic measurement.
Optionally, the error correction value of the reference access point is stored in a reference device corresponding to the reference access point to form a calibration sample library. Specifically, the time delay error of each reference access point obtained by using the theoretical time delay value and the second estimated time delay value may be stored as an error correction value in the reference device, so as to form a calibration sample library; the difference between the time delay errors of any two of the reference access points can also be stored as an error correction value in the reference device, thereby forming a calibration sample library. The error correction value can be calculated once and used all the time later, or can be calculated once every a period of time, and the latest value is taken as the reference after each calculation. The error correction value is stored in the reference device to form a calibration sample library, the stored error correction value can be reused, the space of the calibration sample library is saved, and resources are saved.
From the above, it can be seen that: the embodiment of the invention provides a positioning method, which comprises the steps of obtaining a first estimated time delay value of each access point, wherein the first estimated time delay value is a difference value between the receiving time of a positioning signal of a terminal to be positioned received by the access point and the sending time of the positioning signal sent by the terminal to be positioned; acquiring a second estimated time delay value of each access point, wherein the second estimated time delay value is a difference value between the receiving time of the access point for receiving the positioning signal of the reference device and the sending time of the reference device for sending the positioning signal; taking access points which receive the positioning signals of the terminal to be positioned and the positioning signals of the reference device as reference access points, wherein the number of the reference access points is at least three; aiming at each reference access point, calculating a theoretical time delay value between the reference access point and the reference device according to the distance between the reference access point and the reference device; obtaining an error correction value of the reference access point according to the second estimated time delay value and the theoretical time delay value of the reference access point; correcting the first estimated delay value of the reference access point using the error correction value of the reference access point; and obtaining the position information of the terminal to be positioned according to the corrected first estimated time delay value of the reference access point. In the embodiment of the invention, at least three access points for determining the terminal to be positioned are used as reference access points by taking the access points which receive the positioning signal of the terminal to be positioned and the positioning signal of the reference device as the reference access points, so that the basic requirement of positioning is met by selecting at least three access points from a plurality of access points as the reference access points; the error correction value of the reference access point is obtained according to the obtained second estimated time delay value of the reference access point and the calculated theoretical time delay value, and the first estimated time delay value of the reference access point is corrected by using the error correction value of the reference access point, so that the problem of inaccurate positioning caused by link time delay errors in the prior art is solved, and therefore, the link time delay errors among the devices can be effectively compensated by using the error correction value of the reference access point to improve the accuracy of the first estimated time delay value of the reference access point; and obtaining the position information of the terminal to be positioned according to the corrected first estimated time delay value of the reference access point, thereby ensuring that the position information of the terminal to be positioned is more accurate.
Fig. 5 is a schematic structural diagram schematically illustrating a positioning apparatus according to an embodiment of the present invention.
Based on the same conception, the positioning apparatus provided by the embodiment of the present invention, as shown in fig. 5, includes a first obtaining unit 201, a second obtaining unit 202, a determining unit 203, a calculating unit 204, a correcting unit 205, and a positioning unit 206. Wherein:
the first acquisition unit 201: the time delay estimation method comprises the steps of obtaining a first estimation time delay value of each access point, wherein the first estimation time delay value is a difference value between the receiving time of a positioning signal of a terminal to be positioned received by the access point and the sending time of the positioning signal sent by the terminal to be positioned;
the second acquisition unit 202: the second estimated time delay value is a difference value between the receiving time of the positioning signal of the reference device received by the access point and the sending time of the positioning signal sent by the reference device;
the determination unit 203: the access points are used for taking the positioning signals of the terminal to be positioned and the positioning signals of the reference device as reference access points, and the number of the reference access points is at least three;
the calculation unit 204: the device comprises a reference access point, a reference device and a plurality of reference access points, wherein the reference access point is used for calculating a theoretical time delay value between the reference access point and the reference device according to the distance between the reference access point and the reference device; obtaining an error correction value of the reference access point according to the second estimated time delay value and the theoretical time delay value of the reference access point;
the correction unit 205: a first estimated delay value for the reference access point is corrected using the error correction value for the reference access point;
the positioning unit 206: and the time delay estimation module is used for obtaining the position information of the terminal to be positioned according to the corrected first estimation time delay value of the reference access point.
Optionally, the reference device is a preset reference terminal, and the reference terminal is configured to send the positioning signal; or the like, or, alternatively,
the reference device is an access point in the existing network, and the access point is set to send a positioning signal; or the like, or, alternatively,
the reference device is an existing network terminal with a positioning function in an existing network, and the existing network terminal is set to send a positioning signal.
Optionally, the reference device is plural; the determination unit is specifically configured to:
for each reference device, determining an access point which receives a positioning signal of the reference device and a positioning signal of a terminal to be positioned as a candidate access point of the reference device;
and if the number of the candidate access points of the reference device is more than or equal to 3, determining the reference access point from the candidate access points of the reference device.
Optionally, the determining unit is further configured to:
if the reference devices with the number of the access points to be selected being more than or equal to 3 do not exist, taking the access point which receives the positioning signal of the terminal to be positioned and the positioning signals of two different reference devices as one of the reference access points;
at least two access points are selected from candidate access points of two different reference devices as reference access points.
Optionally, the determining unit is further configured to:
determining whether the number of access points to be selected of at least two reference devices is larger than or equal to 3, and if so, determining the reference device with the time for receiving the positioning signal of the reference device closest to the time for receiving the positioning signal of the terminal to be positioned;
and determining the reference access point from the candidate access points of the reference devices closest in time.
Optionally, the computing unit is specifically configured to:
acquiring a position distance between the reference device and the access point through the position coordinates of the reference device and the access point; the position distance is divided by the speed of light to obtain a theoretical time delay value of the positioning signal of the reference device received by the access point.
Optionally, the computing unit is further configured to:
aiming at each reference access point, acquiring a time delay error of the reference access point by using a theoretical time delay value and the second estimated time delay value;
and taking the time delay error of the reference access point as an error correction value, or calculating the difference value of the time delay errors of any two reference access points in the reference access points, and taking the difference value as the error correction value.
Optionally, the apparatus further comprises:
a storage unit: and the error correction value of the reference access point is stored in the reference device corresponding to the reference access point to form a calibration sample library.
From the above, it can be seen that: the embodiment of the invention provides a positioning device, which is used for acquiring a first estimated time delay value of each access point, wherein the first estimated time delay value is a difference value between the receiving time of a positioning signal of a terminal to be positioned received by the access point and the sending time of the positioning signal sent by the terminal to be positioned; acquiring a second estimated time delay value of each access point, wherein the second estimated time delay value is a difference value between the receiving time of the access point for receiving the positioning signal of the reference device and the sending time of the reference device for sending the positioning signal; taking access points which receive the positioning signals of the terminal to be positioned and the positioning signals of the reference device as reference access points, wherein the number of the reference access points is at least three; aiming at each reference access point, calculating a theoretical time delay value between the reference access point and the reference device according to the distance between the reference access point and the reference device; obtaining an error correction value of the reference access point according to the second estimated time delay value and the theoretical time delay value of the reference access point; correcting the first estimated delay value of the reference access point using the error correction value of the reference access point; and obtaining the position information of the terminal to be positioned according to the corrected first estimated time delay value of the reference access point. In the embodiment of the invention, the access points which receive the positioning signal of the terminal to be positioned and the positioning signal of the reference device in each access point are used as the reference access points, the error correction value of the reference access point is obtained according to the obtained second estimation time delay value of the reference access point and the calculated theoretical time delay value, and the first estimation time delay value of the reference access point is corrected by using the error correction value of the reference access point, so that the problem that the positioning is uncertain and inaccurate caused by the link time delay error between the devices because the synchronization error between the devices is not corrected correspondingly in the prior art is solved; and obtaining the position information of the terminal to be positioned according to the corrected first estimated time delay value of the reference access point, thereby ensuring that the position information of the terminal to be positioned is more accurate.
It should be apparent to those skilled in the art that embodiments of the present invention may be provided as a method, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely 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, CD-ROM, 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.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.