Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application 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 present application and are not intended to limit the present application.
TDOA is a method of location using time difference. By comparing the absolute time difference of the data packet sent by the equipment to be positioned reaching each positioning base station, a hyperbola with each positioning base station as a focus and the distance difference as a long axis can be formed, and the intersection point of the hyperbolas is the position of the equipment.
In an ideal open environment, the TDOA algorithm can obtain higher precision. However, in an occluded environment, the positioning accuracy of TDOA cannot be effectively guaranteed. On one hand, due to the characteristics of electromagnetic wave multipath transmission, the time difference of a data packet (Blink packet) sent by a device to be positioned to a master-slave positioning base station is deviated, so that the positioning result of the TDOA on the device is inaccurate, and the positioning precision is low. On the other hand, when the positioning base station receives the data packet, when the receiving field strength is weak, the UWB chip of the positioning base station delays to identify or even cannot identify the received data packet, and therefore, the receiving time of the data packet reported by the positioning base station is inaccurate, which causes a time difference to be deviated, thereby affecting the positioning accuracy of TDOA.
In view of this, an embodiment of the present application provides an apparatus positioning method, in which a first time difference that a main positioning base station and a first slave positioning base station in a positioning base station system receive a positioning data packet sent by a target apparatus to be positioned is obtained, and then, a numerical fluctuation range of the first time difference compared with a historical time difference is determined based on the first time difference and the historical time difference, where the historical time difference is a time difference that the main positioning base station and the first slave positioning base station receive the historical positioning data packet sent by the target apparatus within the historical time period; if the numerical fluctuation range is greater than the abnormal fluctuation threshold value, it is characterized that the first time difference has larger abnormal fluctuation compared with the historical time difference, that is, the first time difference is abnormal, and because the TDOA algorithm is based on the time difference to perform the device location, when the first time difference is abnormal, the TDOA algorithm is not used to locate the target device in the embodiment of the present application, but the TDOA algorithm is used to indicate the master positioning base station and the first slave positioning base station to measure and report the distance between the master positioning base station and the target device, and the target device is located based on the reported measurement result, so that the problem of low location accuracy of the target device caused by the TDOA algorithm based on the abnormal first time difference when the first time difference is abnormal is avoided, and the location accuracy of the target device is improved in the embodiment of the present application.
In the following, a brief description will be given of an implementation environment related to the device location method provided in the embodiment of the present application.
As shown in fig. 1, the implementation environment may comprise a master positioning base station 101, at least two slave positioning base stations (fig. 1 only exemplarily shows two slave positioning base stations: a first slave positioning base station 102 and a second slave positioning base station 103), a server 104, and a target device 105. The server 104 may communicate with the master positioning base station 101, the first slave positioning base station 102, and the second slave positioning base station 103 through a wired or wireless network, and the target device 105 may communicate with the master positioning base station 101, the first slave positioning base station 102, and the second slave positioning base station 103 through a wired or wireless network.
The server 104 may be one server or a server cluster composed of a plurality of servers, and the server 104 may be a tower server, a rack server, a blade server, a high-density server, a single-path server, a dual-path server, or a multi-path server, and the type of the server 104 is not specifically limited in this embodiment of the present application. The target device 105 may be a smart phone, a laptop, a tablet, a portable wearable device, smart glasses, a smart robot, a vehicle-mounted device, or the like, and the type of the target device 105 is not particularly limited in the embodiments of the present application.
In one embodiment, as shown in fig. 2, a device positioning method is provided, which is described by taking the method as an example for being applied to the server in fig. 1, and the method includes steps 201, 202, 203 and 204:
step 201, a server obtains a first time difference between a master positioning base station and a first slave positioning base station in a positioning base station system, where the master positioning base station and the first slave positioning base station receive a positioning data packet sent by a target device to be positioned.
In this embodiment, the positioning base station system includes a master positioning base station and at least two slave positioning base stations, and the first slave positioning base station may be any one of the slave positioning base stations in the positioning base station system. The target device is within the coverage of the positioning base station system, and the server can perform position positioning on the target device based on the positioning base station system.
As an embodiment, the target device may periodically send a positioning data packet to each positioning base station in the positioning base station system, and the target device triggers a positioning process of the server on the target device every time the target device sends the positioning data packet, where the positioning data packet may be a Blink packet.
And after receiving the positioning data packet, the main positioning base station sends the identification of the positioning data packet and the receiving time stamp of the positioning data packet to the server. And after the first slave positioning base station receives the positioning data packet, the identification of the positioning data packet and the receiving time stamp of the positioning data packet are also sent to the server. Wherein, the sign of locating the data package can be the packet sequence number of locating the data package, and/or, the only identification character string of locating the data package.
The server receives the identification of the positioning data packet sent by the master positioning base station, the identification of the receiving time stamp and the positioning data packet sent by the first slave positioning base station, and the time difference between the master positioning base station and the first slave positioning base station for receiving the positioning data packet can be obtained after the server corrects the receiving time stamp sent by the first slave positioning base station into the time of the master positioning base station, and the first time difference is the time difference between the positioning data packet arriving at the master positioning base station and arriving at the first slave positioning base station.
In one possible implementation, the server may fit a clock difference variation trend curve between the master positioning base station and the first slave positioning base station through kalman filtering based on the clock differential dynamic variation process between the master positioning base station and the first slave positioning base station. After the server receives the identification of the positioning data packet sent by the master positioning base station, the receiving timestamp, the identification of the positioning data packet sent by the first slave positioning base station and the receiving timestamp, the server can determine the clock difference between the first slave positioning base station and the master positioning base station through the clock difference change trend curve, and then correct the receiving timestamp sent by the first slave positioning base station into the time of the master positioning base station according to the clock difference, so that the time between the second slave positioning base station and the master positioning base station is synchronized.
As an embodiment, the master positioning base station may send a CCP broadcast packet periodically through an air interface, and when the master positioning base station sends the CCP broadcast packet, the master positioning base station also sends a sequence number of the CCP broadcast packet and a timestamp of the current master positioning base station to the server. And after receiving the CCP broadcast packet sent by the master positioning base station, the first slave positioning base station sends the serial number of the CCP broadcast packet and the timestamp of the current first slave positioning base station to the server. The server can obtain the reporting timestamp difference value between the two timestamps according to the timestamps of the two. Further, the server obtains a linear distance between the master positioning base station and the first slave positioning base station according to the position of the master positioning base station and the position of the first slave positioning base station, a reference timestamp difference between the master positioning base station and the first slave positioning base station is obtained by dividing the linear distance by the speed of light, and the server compares the reported timestamp difference with the reference timestamp difference to obtain a clock difference between the current master positioning base station and the first slave positioning base station. In this way, the server can fit a clock difference variation trend curve between the master positioning base station and the first slave positioning base station according to the clock difference corresponding to each CCP broadcast packet.
In step 202, the server determines a numerical fluctuation range of the first time difference compared with the historical time difference based on the first time difference and the historical time difference.
In the embodiment of the present application, for each positioning data packet, the server obtains a time difference between the master positioning base station and the first slave positioning base station receiving the current positioning data packet. The historical time difference is the time difference between the main positioning base station and the first slave positioning base station in the historical time period and the historical positioning data packet sent by the target device.
In one possible implementation, the server may record the time difference between the time when the master positioning base station and the first slave positioning base station receive the historical positioning data packet sent by the target device in the historical time period in the form shown in table 1.
TABLE 1
Packet sequence number
|
Time difference
|
1
|
Historical time difference 1
|
2
|
Time difference of history 2
|
3
|
Time difference of history 3
|
……
|
…… |
After the server obtains the first time difference, the most recently recorded historical time differences are read from table 1, and the number of the historical time differences may be multiple, for example, 100 most recently recorded historical time differences are read. The server may determine whether there is an abnormal fluctuation in the first time difference by analyzing a difference between the first time difference and the historical time difference.
In one possible implementation of step 202, referring to fig. 3, the server may implement the process of step 202 by performing step 2021 and step 2022 as shown in fig. 3:
at step 2021, the server calculates the square of the mean of the historical time differences.
In step 2022, the server subtracts the square of the mean value from the first time difference to obtain the numerical fluctuation range.
Taking 100 historical time differences as an example, after the server reads 100 historical time differences, the server calculates the mean value of the 100 historical time differences, and then calculates the square of the mean value. And the server subtracts the square of the mean value from the first time difference to obtain the numerical value fluctuation range.
In another possible implementation manner of step 202, the server may further determine a numerical fluctuation range of the first time difference compared to the historical time difference according to the first time difference and the variance of the historical time difference, which is not specifically limited herein.
It can be understood that, normally, the time difference between the master positioning base station and the first slave positioning base station receiving the positioning data packet sent by the target device is relatively stable in a period of time, that is, the first time difference does not fluctuate greatly compared with the historical time difference. If the positioning data packet has other special conditions such as multipath transmission and the like in the transmission process, the first time difference is compared with the historical time difference, and then the first time difference can jump.
Step 203, if the numerical value fluctuation range is larger than the abnormal fluctuation threshold value, the server instructs the master positioning base station and the first slave positioning base station to measure and report the distance between the target device and the master positioning base station and the first slave positioning base station.
And the server determines the numerical fluctuation amplitude of the first time difference compared with the historical time difference based on the first time difference and the historical time difference, and then detects whether the numerical fluctuation amplitude is larger than an abnormal fluctuation threshold value.
In one possible implementation, the server may obtain the abnormal fluctuation threshold value by performing the following steps a1 and a 2:
in step a1, the server calculates the variance of the set of time differences consisting of the first time difference and the historical time difference.
Continuing with the example that the historical time differences are 100, the server can calculate the first time difference and the variance S of the time difference set composed of the historical time differences by the following formula 12:
Wherein x is
1、x
2、...、x
100For 100 of the historical time differences,
the server obtains the variance of the first time difference and the time difference set composed of the historical time differences, wherein the mean of the 100 historical time differences is obtained.
And step A2, the server multiplies the variance by a preset coefficient to obtain an abnormal fluctuation threshold value.
The preset coefficient is a constant greater than 1, for example, the server may multiply the variance by 1.5 to obtain the abnormal fluctuation threshold.
It can be understood that, when the server obtains the time difference between the receiving of the positioning data packet by one master positioning base station and the receiving of the positioning data packet by the first slave positioning base station, a new abnormal fluctuation threshold value is obtained, and the abnormal fluctuation threshold value is dynamically adjusted, so that the server can be automatically adapted to different positioning scenes.
If the numerical fluctuation range is greater than the abnormal fluctuation threshold value, it is characterized that the first time difference has larger abnormal fluctuation compared with the historical time difference, that is, the first time difference is abnormal, and because the TDOA algorithm is based on the time difference to perform the device location, in the case that the first time difference is abnormal, the embodiment of the application does not adopt the TDOA algorithm to locate the target device, but indicates the master positioning base station and the first slave positioning base station to measure and report the distance to the target device, and locates the target device based on the reported measurement result.
As an implementation manner, if the server detects that the numerical fluctuation range is greater than the abnormal fluctuation threshold value, the server may send a ranging instruction to the master positioning base station and the first slave positioning base station, where the ranging instruction is used to instruct the master positioning base station and the first slave positioning base station to measure and report the distance to the target device.
After receiving the ranging instruction, the primary positioning base station may measure the distance between the primary positioning base station and the target device in a TOF (Time of flight) ranging manner. TOF is the acquisition of distance from an object by continuously transmitting light pulses to the object and then receiving light returning from the object with a sensor, and detecting the time of flight (round trip) of the light pulses. Similarly, after receiving the ranging instruction, the first slave positioning base station may also measure the distance between the first slave positioning base station and the target device by means of TOF (Time of flight) ranging.
And step 204, the server positions the target equipment based on the reported measurement result.
The server locates the target device based on the reported measurement result, namely the distance between the main positioning base station and the target device reported by the main positioning base station and the distance between the first slave positioning base station and the target device reported by the first slave positioning base station.
The server stores the position coordinates of each positioning base station in the positioning base station system. In a possible implementation manner, the server may use the positioning location of the target device as an unknown quantity, establish an equation set according to the location coordinate of the master positioning base station, the location coordinate of the first slave positioning base station, the positioning location (unknown quantity) of the target device, and the measurement result, and then solve the equation set; generally, two coordinate solutions are obtained by the two positioning base stations, and the server can determine the unique coordinate solution of the target device from the two coordinate solutions according to the position coordinate of the second slave positioning base station in the positioning base station system and the time difference between the master positioning base station and the second slave positioning base station when receiving the positioning data packet sent by the target device, so that the positioning position of the target device is obtained.
In another possible implementation, the server may indicate the master positioning base station and the first slave positioning base station to measure and report the distance to the target device, and may also indicate the second slave positioning base station to measure and report the distance to the target device, so that the server may establish three equations according to the three reported distances, the position coordinate of the master positioning base station, the position coordinate of the first slave positioning base station, and the position coordinate of the second slave positioning base station, and solve the equation set, so as to directly obtain the positioning position of the target device.
According to the method and the device, a first time difference of a positioning data packet sent by target equipment to be positioned and received by a main positioning base station and a first slave positioning base station in a positioning base station system is obtained, and then the numerical fluctuation range of the first time difference compared with the historical time difference is determined based on the first time difference and the historical time difference, wherein the historical time difference is the time difference of the main positioning base station and the first slave positioning base station in a historical time period and the historical positioning data packet sent by the target equipment; if the numerical fluctuation range is greater than the abnormal fluctuation threshold value, it is characterized that the first time difference has larger abnormal fluctuation compared with the historical time difference, that is, the first time difference is abnormal, and because the TDOA algorithm is based on the time difference to perform the device location, when the first time difference is abnormal, the TDOA algorithm is not used to locate the target device in the embodiment of the present application, but the TDOA algorithm is used to indicate the master positioning base station and the first slave positioning base station to measure and report the distance between the master positioning base station and the target device, and the target device is located based on the reported measurement result, so that the problem of low location accuracy of the target device caused by the TDOA algorithm based on the abnormal first time difference when the first time difference is abnormal is avoided, and the location accuracy of the target device is improved in the embodiment of the present application.
In an embodiment, based on the embodiment shown in fig. 2, this embodiment relates to a process of how a server locates a target device based on a reported measurement result. Referring to fig. 4, the server may implement a process of positioning a target device based on a reported measurement result by performing step 401, step 402, and step 403 shown in fig. 4.
In step 401, the server determines a plurality of candidate positioning locations of the target device based on a first distance reported by the master positioning base station and the target device, a second distance reported by the first slave positioning base station and the target device, a location of the master positioning base station and a location of the first slave positioning base station.
The server establishes an equation set based on the first distance, the second distance, the position of the master positioning base station and the position of the first slave positioning base station, and solves the established equation set to obtain a plurality of candidate positioning positions of the target device.
In the embodiment of the present application, the server stores the actual positions of the positioning base stations in the positioning base station system. Suppose to adopt (x)1,y1) Indicating the location coordinates of the primary positioning base station, using (x)2,y2) Indicating the location coordinates of the first slave positioning base station, using (x)i,yi) Representing the position coordinates of the target device, the first distance being taken as d1Indicating that the second distance is taken to be d2Expressed, the server can thus establish the following system of equations:
the server solves the system of equations and,then (x) is obtainedi,yi) Two solutions of (c): (x'i,y′i) And (x ″)i,y″i)。
Referring to FIG. 5, FIG. 5 is a schematic illustration of a plurality of candidate position locations of an exemplary target device. As shown in FIG. 5, the server is based on the first distance d1A second distance d2Position of primary positioning base station (x)1,y1) And the position (x) of the first slave positioning base station2,y2) Determining a candidate position fix (x ') for the target device'i,y′i) (see "solution 1" in FIG. 5) and the candidate position fix (x ″)i,y″i) (see "solution 2" in FIG. 5).
In step 402, the server obtains a second time difference between the master positioning base station and a second slave positioning base station in the positioning base station system receiving the positioning data packet.
The target device may periodically send the positioning data packet to each positioning base station in the positioning base station system, and the implementation process of step 201 may be referred to in a manner that the server obtains a second time difference when the second slave positioning base station in the master positioning base station and the positioning base station system receives the positioning data packet, which is not described herein again.
In step 403, the server determines the location position of the target device from the plurality of candidate location positions according to the second time difference and the position of the second slave location base station.
It is to be understood that only one of the candidate position locations obtained in step 401 is the position location of the target device. And the server determines the positioning position of the target equipment from the candidate positioning positions according to the second time difference and the position of the second slave positioning base station.
In one possible implementation of step 403, referring to fig. 6, step 403 may include steps 4031, 4032 and 4033 as shown in fig. 6:
step 4031, the server calculates a target distance between each candidate positioning location and the second slave positioning base station according to the plurality of candidate positioning locations and the location of the second slave positioning base station.
Suppose to adopt (x)3,y3) Position coordinates of the second slave positioning base station, and candidate positioning position (x'i,y′i) Target distance d 'between second slave positioning base station'3Can be calculated by the following formula 2:
candidate position location (x ″)i,y″i) Target distance d' between the second slave positioning base station3Can be calculated by the following equation 3:
step 4032, the server subtracts the first distances from the target distances to obtain target distance differences corresponding to the candidate positioning positions.
Server will d'3Subtracting the first distance to obtain a candidate positioning position (x'i,y′i) Corresponding target distance difference, d ″)3Subtracting the first distance to obtain a candidate positioning position (x ″)i,y″i) The corresponding target distance difference value.
Step 4033, the server obtains a reference distance difference between the second slave positioning base station and the master positioning base station according to the second time difference, and uses a target distance difference with the smallest difference between the reference distance differences and each target distance difference as the positioning position of the target device.
The server obtains a reference distance difference value between the second slave positioning base station and the master positioning base station by multiplying the second time difference by the speed of light, and the server calculates d'3And the difference value of the reference distance difference value, and d ″, is calculated3And a difference value of the reference distance difference value, and d'3And d ″)3And the target distance difference value with the minimum difference value between the medium distance difference value and the reference distance difference value is used as the positioning position of the target equipment, so that the target equipment is positioned.
Therefore, under the condition that the numerical fluctuation amplitude is larger than the abnormal fluctuation threshold value, the server does not adopt a TDOA algorithm to position the target equipment, but indicates the main positioning base station and the first slave positioning base station to measure and report the distance between the main positioning base station and the target equipment based on TOF, and the server positions the target equipment according to the reported measurement result, so that the influence of the TDOA sporadic arrival time difference data fluctuation on the positioning precision can be effectively reduced, and the positioning precision of the system R95 is effectively improved.
In one embodiment, based on the above embodiment shown in fig. 2, referring to fig. 7, the present embodiment relates to a process of correcting the first time difference by the server in a case where the magnitude of the numerical fluctuation is greater than the abnormal fluctuation threshold value. As shown in fig. 7, the device positioning method of this embodiment further includes steps 205 and 206:
in step 205, the server obtains a calibration time difference between the master positioning base station and the first slave positioning base station receiving the positioning data packet according to the positioning position of the target device, the position of the master positioning base station, and the position of the first slave positioning base station.
And after the server locates the target equipment based on the reported measurement result and obtains the location position of the target equipment, the server obtains the calibration time difference of the main location base station and the first slave location base station for receiving the location data packet according to the location position of the target equipment, the position of the main location base station and the position of the first slave location base station.
In a possible implementation manner, the server may obtain the calculated distance between the target device and the master positioning base station according to the positioning location of the target device and the location of the master positioning base station, and the server may obtain the calculated distance between the target device and the first slave positioning base station according to the positioning location of the target device and the location of the first slave positioning base station. The server subtracts the two calculated distances and divides the subtraction result by the speed of light to obtain the calibration time difference.
And step 206, in the process that the server positions the target device at the future time, taking the calibrated time difference as the historical time difference corresponding to the future time.
Because the numerical value fluctuation range is larger than the abnormal fluctuation threshold value, namely the first time difference is abnormal, the server takes the calibration time difference as the time difference corresponding to the positioning data packet. In the process that the server positions the target device at the future time, the calibration time difference can be adopted to replace the first time difference to serve as the historical time difference corresponding to the future time, so that the accuracy of the historical time difference in the process that the target device is positioned at the future time is improved, and the positioning accuracy is further improved.
In an embodiment, based on the above-described embodiment shown in fig. 2, referring to fig. 8, this embodiment relates to a process of how the server locates the target device in a case where the magnitude of the numerical fluctuation is smaller than or equal to the abnormal fluctuation threshold value. As shown in fig. 8, the device positioning method of this embodiment further includes steps 207 and 208:
step 207, if the numerical fluctuation range is smaller than or equal to the abnormal fluctuation threshold value, the server obtains a third time difference between the master positioning base station and a second slave positioning base station in the positioning base station system, and obtains a fourth time difference between the first slave positioning base station and the second slave positioning base station system, where the second slave positioning base station receives the positioning data packet.
In the embodiment of the application, a server obtains a first time difference between a main positioning base station and a first slave positioning base station in a positioning base station system, the first time difference receiving a positioning data packet sent by a target device to be positioned, determines a numerical fluctuation range of the first time difference compared with a historical time difference based on the first time difference and the historical time difference, and detects whether the numerical fluctuation range is larger than an abnormal fluctuation threshold value.
If the numerical fluctuation amplitude is smaller than or equal to the abnormal fluctuation threshold value, the first time difference is characterized to be more stable compared with the historical time difference, and the situation of jumping does not occur, namely the first time difference is more accurate, and no obvious abnormality exists, and the server adopts a TDOA algorithm to position the target equipment under the situation.
The server obtains a third time difference that the second slave positioning base station in the master positioning base station and the positioning base station system receives the positioning data packet, and obtains a fourth time difference that the first slave positioning base station and the second slave positioning base station receive the positioning data packet, and the implementation process of step 201 may be referred to in a manner that the server obtains the third time difference and the fourth time difference, which is not described herein again.
In step 208, the server measures the positioning position of the target device according to the first time difference, the third time difference, the fourth time difference, the position of the master positioning base station, the position of the first slave positioning base station, and the position of the second slave positioning base station.
And the server establishes an equation set comprising three equations according to the first time difference, the third time difference, the fourth time difference, the position of the main positioning base station, the position of the first slave positioning base station and the position of the second slave positioning base station, and solves the established equation set to obtain the positioning position of the target equipment.
Referring to FIG. 9, FIG. 9 is a schematic diagram of an exemplary TDOA location base station system. The positioning base station system includes a master positioning base station and at least two slave positioning base stations, and the first slave positioning base station and the second slave positioning base station shown in fig. 9 are arbitrary slave positioning base stations in the positioning base station system.
Suppose the first time difference is t1-t2The third time difference is t1-t3The fourth time difference is t2-t3Using (x)1,y1) Indicating the location coordinates of the primary positioning base station, using (x)2,y2) Indicating the location coordinates of the first slave positioning base station, using (x)3,y3) Indicating the location coordinates of the second slave positioning base station, using (x)i,yi) Representing the location coordinates of the target device, the server may then establish the following system of equations:
the server solves the equation to obtain (x)i,yi) I.e., the location coordinates of the target device, to achieve the positioning of the target device.
The ToF ranging method belongs to a two-way ranging technology, and mainly uses the time of flight of a signal back and forth between two asynchronous transceivers (or reflected surfaces) to measure the distance between nodes. When the master positioning base station and the slave positioning base stations measure distance, the target equipment and the master positioning base station need to be interacted in a two-way mode, and large pressure is caused to the performance of the equipment and the load in an air interface.
In the embodiment of the application, if the numerical value fluctuation range is larger than the abnormal fluctuation threshold value, the TDOA algorithm is not adopted to position the target device, but the main positioning base station and the first slave positioning base station are indicated to measure and report the distance between the main positioning base station and the target device based on the TOF, and the server positions the target device according to the reported measurement result. And under the condition that the numerical fluctuation amplitude is smaller than or equal to the abnormal fluctuation threshold value, the server positions the target equipment by adopting the TDOA algorithm, so that under the condition that the time difference has no abnormal jitter, the performance of the equipment and the load in an air interface are not subjected to higher pressure by adopting the TDOA algorithm, and only under the condition that the time difference has the abnormal jitter, the target equipment is positioned by adopting a TOF ranging-based mode, so that the influence of the TDOA sporadic arrival time difference data fluctuation on the positioning precision can be effectively reduced. In addition, only under the condition that the time difference has abnormal jitter, the target equipment is positioned by adopting a TOF ranging-based mode, so that the positioning accuracy is improved, and the stability of the system is ensured.
It should be understood that although the various steps in the flow charts of fig. 2-9 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-9 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps.
In one embodiment, as shown in fig. 10, there is provided a device positioning apparatus including:
a first obtaining module 10, configured to obtain a first time difference between a master positioning base station and a first slave positioning base station in a positioning base station system, where the first slave positioning base station receives a positioning data packet sent by a target device to be positioned, and the positioning base station system includes the master positioning base station and at least two slave positioning base stations;
a determining module 20, configured to determine, based on the first time difference and a historical time difference, a numerical fluctuation range of the first time difference compared to the historical time difference, where the historical time difference is a time difference between the master positioning base station and the first slave positioning base station receiving a historical positioning data packet sent by the target device in a historical time period;
an indicating module 30, configured to indicate the master positioning base station and the first slave positioning base station to measure and report the distance to the target device if the numerical fluctuation amplitude is greater than an abnormal fluctuation threshold value;
and a first positioning module 40, configured to position the target device based on the reported measurement result.
In one embodiment, the number of the historical time differences is multiple, and the determining module 20 is specifically configured to calculate a square of a mean value of the historical time differences; and subtracting the square of the mean value from the first time difference to obtain the numerical fluctuation amplitude.
In one embodiment, the number of the historical time differences is plural, and the apparatus further includes:
a variance calculation module, configured to calculate a variance of a time difference set composed of the first time difference and the historical time difference;
and the setting module is used for multiplying the variance by a preset coefficient to obtain the abnormal fluctuation threshold value, wherein the preset coefficient is a constant greater than 1.
In one embodiment, the first positioning module 40 includes:
a first determining unit, configured to determine multiple candidate positioning locations of the target device based on a first distance reported by the master positioning base station and the target device, a second distance reported by the first slave positioning base station and the target device, a location of the master positioning base station, and a location of the first slave positioning base station;
an obtaining unit, configured to obtain a second time difference between the master positioning base station and a second slave positioning base station in the positioning base station system receiving the positioning data packet;
a second determining unit, configured to determine a location position of the target device from the multiple candidate location positions according to the second time difference and the location of the second slave positioning base station.
In an embodiment, the second determining unit is specifically configured to calculate, according to the plurality of candidate position locations and the position of the second slave positioning base station, a target distance between each of the candidate position locations and the second slave positioning base station; subtracting the first distance from each target distance to obtain a target distance difference value corresponding to each candidate positioning position; and acquiring a reference distance difference value between the second slave positioning base station and the master positioning base station according to the second time difference, and taking a target distance difference value with the minimum difference value between the reference distance difference value and each target distance difference value as the positioning position of the target device.
In one embodiment, the apparatus further comprises:
a second obtaining module, configured to obtain, according to a positioning position of the target device, a position of the master positioning base station, and a position of the first slave positioning base station, a calibration time difference between the master positioning base station and the first slave positioning base station when receiving the positioning data packet;
and the calibration module is used for taking the calibration time difference as a historical time difference corresponding to the future time in the process of positioning the target equipment at the future time.
In one embodiment, the apparatus further comprises:
a third obtaining module, configured to obtain a third time difference between the master positioning base station and a second slave positioning base station in the positioning base station system when the numerical fluctuation amplitude is smaller than or equal to the abnormal fluctuation threshold value, and obtain a fourth time difference between the first slave positioning base station and the second slave positioning base station when the first slave positioning base station and the second slave positioning base station receive the positioning data packet;
a second positioning module, configured to measure a positioning location of the target device according to the first time difference, the third time difference, the fourth time difference, the location of the master positioning base station, the location of the first slave positioning base station, and the location of the second slave positioning base station.
For the specific definition of the device positioning apparatus, reference may be made to the above definition of the device positioning method, which is not described herein again. The various modules in the device location apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 11. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing device positioning data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a device localization method.
Those skilled in the art will appreciate that the architecture shown in fig. 11 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
acquiring a first time difference between a main positioning base station and a first slave positioning base station in a positioning base station system, wherein the main positioning base station and the first slave positioning base station receive a positioning data packet sent by target equipment to be positioned, and the positioning base station system comprises the main positioning base station and at least two slave positioning base stations;
determining a numerical fluctuation amplitude of the first time difference compared with a historical time difference based on the first time difference and the historical time difference, wherein the historical time difference is the time difference of the main positioning base station and the first slave positioning base station receiving historical positioning data packets sent by the target device in a historical time period;
if the numerical value fluctuation amplitude is larger than an abnormal fluctuation threshold value, indicating the main positioning base station and the first slave positioning base station to measure and report the distance between the main positioning base station and the target equipment;
and positioning the target equipment based on the reported measurement result.
In one embodiment, the number of the historical time differences is plural, and the processor executes the computer program to further implement the following steps:
calculating the square of the mean value of the historical time differences;
and subtracting the square of the mean value from the first time difference to obtain the numerical value fluctuation amplitude.
In one embodiment, the number of the historical time differences is plural, and the processor executes the computer program to further implement the following steps:
calculating the variance of a time difference set consisting of the first time difference and the historical time difference;
and multiplying the variance by a preset coefficient to obtain the abnormal fluctuation threshold value, wherein the preset coefficient is a constant greater than 1.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
determining a plurality of candidate positioning positions of the target device based on a first distance reported by the master positioning base station and the target device, a second distance reported by the first slave positioning base station and the target device, a position of the master positioning base station and a position of the first slave positioning base station;
acquiring a second time difference between the main positioning base station and a second slave positioning base station in the positioning base station system receiving the positioning data packet;
and determining the positioning position of the target equipment from the candidate positioning positions according to the second time difference and the position of the second slave positioning base station.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
calculating a target distance between each candidate positioning position and the second slave positioning base station according to the candidate positioning positions and the position of the second slave positioning base station;
subtracting the first distance from each target distance to obtain a target distance difference value corresponding to each candidate positioning position;
and acquiring a reference distance difference value between the second slave positioning base station and the master positioning base station according to the second time difference, and taking a target distance difference value with the minimum difference value between the reference distance difference value and each target distance difference value as the positioning position of the target device.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
acquiring calibration time difference of the positioning data packet received by the master positioning base station and the first slave positioning base station according to the positioning position of the target device, the position of the master positioning base station and the position of the first slave positioning base station;
and in the process of positioning the target equipment at the future time, taking the calibration time difference as the historical time difference corresponding to the future time.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
if the numerical value fluctuation amplitude is smaller than or equal to the abnormal fluctuation threshold value, acquiring a third time difference between the main positioning base station and a second slave positioning base station in the positioning base station system when the positioning data packet is received, and acquiring a fourth time difference between the first slave positioning base station and the second slave positioning base station when the positioning data packet is received;
and measuring the positioning position of the target equipment according to the first time difference, the third time difference, the fourth time difference, the position of the main positioning base station, the position of the first slave positioning base station and the position of the second slave positioning base station.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring a first time difference between a main positioning base station and a first slave positioning base station in a positioning base station system, wherein the main positioning base station and the first slave positioning base station receive a positioning data packet sent by target equipment to be positioned, and the positioning base station system comprises the main positioning base station and at least two slave positioning base stations;
determining a numerical fluctuation amplitude of the first time difference compared with a historical time difference based on the first time difference and the historical time difference, wherein the historical time difference is the time difference of the main positioning base station and the first slave positioning base station receiving historical positioning data packets sent by the target device in a historical time period;
if the numerical value fluctuation amplitude is larger than an abnormal fluctuation threshold value, indicating the main positioning base station and the first slave positioning base station to measure and report the distance between the main positioning base station and the target equipment;
and positioning the target equipment based on the reported measurement result.
In an embodiment, the number of the historical time differences is plural, the computer program when executed by the processor further performs the steps of:
calculating the square of the mean value of the historical time differences;
and subtracting the square of the mean value from the first time difference to obtain the numerical value fluctuation amplitude.
In an embodiment, the number of the historical time differences is plural, the computer program when executed by the processor further performs the steps of:
calculating the variance of a time difference set consisting of the first time difference and the historical time difference;
and multiplying the variance by a preset coefficient to obtain the abnormal fluctuation threshold value, wherein the preset coefficient is a constant greater than 1.
In one embodiment, the computer program when executed by the processor further performs the steps of:
determining a plurality of candidate positioning positions of the target device based on a first distance reported by the master positioning base station and the target device, a second distance reported by the first slave positioning base station and the target device, a position of the master positioning base station and a position of the first slave positioning base station;
acquiring a second time difference between the main positioning base station and a second slave positioning base station in the positioning base station system receiving the positioning data packet;
and determining the positioning position of the target equipment from the candidate positioning positions according to the second time difference and the position of the second slave positioning base station.
In one embodiment, the computer program when executed by the processor further performs the steps of:
calculating a target distance between each candidate positioning position and the second slave positioning base station according to the candidate positioning positions and the position of the second slave positioning base station;
subtracting the first distance from each target distance to obtain a target distance difference value corresponding to each candidate positioning position;
and acquiring a reference distance difference value between the second slave positioning base station and the master positioning base station according to the second time difference, and taking a target distance difference value with the minimum difference value between the reference distance difference value and each target distance difference value as the positioning position of the target device.
In one embodiment, the computer program when executed by the processor further performs the steps of:
acquiring calibration time difference of the positioning data packets received by the master positioning base station and the first slave positioning base station according to the positioning position of the target device, the position of the master positioning base station and the position of the first slave positioning base station;
and in the process of positioning the target equipment at the future time, taking the calibration time difference as a historical time difference corresponding to the future time.
In one embodiment, the computer program when executed by the processor further performs the steps of:
if the numerical value fluctuation amplitude is smaller than or equal to the abnormal fluctuation threshold value, acquiring a third time difference between the main positioning base station and a second slave positioning base station in the positioning base station system when the positioning data packet is received, and acquiring a fourth time difference between the first slave positioning base station and the second slave positioning base station when the positioning data packet is received;
and measuring the positioning position of the target equipment according to the first time difference, the third time difference, the fourth time difference, the position of the main positioning base station, the position of the first slave positioning base station and the position of the second slave positioning base station.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.