A method, device, equipment and medium for determining target location information
By obtaining and deduplicating the initial latitude and longitude list of associated electronic devices, and using the GeoHash algorithm to determine the location information of Bluetooth, the problem of the non-linear relationship between signal strength and distance and the influence of environmental factors is solved, and the accuracy of the location information is improved.
Patent Information
- Application Number
- CN202410936485.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2044-07-12
AI Technical Summary
In the existing technology, when Bluetooth location information is obtained based on signal strength, the nonlinear relationship between signal and distance and the influence of environmental factors lead to low accuracy of location information.
By obtaining the associated electronic device identification list and the initial longitude and latitude list, the GeoHash algorithm is used to determine the target location information after deduplication processing, avoiding the need to directly calculate the location based on signal strength.
It improves the accuracy of target position information and reduces errors caused by environmental factors or signal changes.
Smart Images

Figure CN118474861B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of device positioning, and in particular to a method, device, equipment and medium for determining target location information. Background Art
[0002] When there is no GPS in the device, compared with wireless positioning technology, obtaining Bluetooth location information to achieve Bluetooth positioning consumes less resources, which is beneficial to extending the service life of the device. Bluetooth location information can be widely used in various scenarios. Analyzing Bluetooth location information can enable relevant personnel to promptly determine the location of devices with target Bluetooth or the location of objects carrying and using devices with target Bluetooth, which helps relevant personnel to respond in time to improve operational efficiency. Therefore, it is very necessary to obtain Bluetooth location information to achieve Bluetooth positioning.
[0003] In the prior art, the method for obtaining Bluetooth location information is to obtain Bluetooth location information based on signal strength, obtain an electronic device that receives the target Bluetooth signal, calculate the distance according to the strength of the signal received by the electronic device, and determine the target Bluetooth location information according to the calculated distance.
[0004] However, the above method also has the following technical problems:
[0005] The relationship between signal strength and distance is usually nonlinear and is easily affected by surrounding environmental factors. Therefore, determining the location information of the target Bluetooth based on the calculated distance is likely to cause large errors. Therefore, the accuracy of the target Bluetooth location information obtained by the above method is low. Summary of the invention
[0006] In view of the above technical problems, the technical solution adopted by the present invention is:
[0007] According to a first aspect of the present invention, a method for determining target location information is provided, where the target location information is a GeoHash string corresponding to the longitude and latitude of the location of the target Bluetooth at the current time point, and the method comprises the following steps:
[0008] An associated electronic device identification list is obtained, where the associated electronic device identification list includes a plurality of associated electronic device identifications.
[0009] An initial longitude and latitude list set corresponding to the associated electronic device identification list is obtained, wherein the initial longitude and latitude list set includes initial longitude and latitude lists corresponding to all associated electronic device identifications.
[0010] When the number of initial longitude and latitude lists that are not NULL is not less than the preset number of lists, all initial longitude and latitude lists that are not NULL are deduplicated to obtain a first key longitude and latitude list, which includes several first key longitudes and latitudes.
[0011] The target location information is determined according to the GeoHash algorithm, the first preset initial character string length and the first key longitude and latitude list.
[0012] According to a second aspect of the present invention, a device for determining target location information is provided, where the target location information is a GeoHash string corresponding to the longitude and latitude of the location of the target Bluetooth at the current time point, and the device includes:
[0013] The associated electronic device identification list acquisition module is used to acquire an associated electronic device identification list, wherein the associated electronic device identification list includes a plurality of associated electronic device identifications.
[0014] The initial longitude and latitude list set acquisition module is used to acquire the initial longitude and latitude list set corresponding to the associated electronic device identification list, and the initial longitude and latitude list set includes the initial longitude and latitude lists corresponding to all associated electronic device identifications.
[0015] The first key longitude and latitude list acquisition module is used to deduplicate all initial longitudes and latitudes in all non-NULL initial longitude and latitude lists to obtain a first key longitude and latitude list when the number of non-NULL initial longitude and latitude lists is not less than a preset number of lists. The first key longitude and latitude list includes several first key longitudes and latitudes.
[0016] The target location information determination module is used to determine the target location information according to the GeoHash algorithm, the first preset initial character string length and the first key longitude and latitude list.
[0017] According to a third aspect of the present invention, there is provided a non-transitory computer-readable storage medium, in which a computer program is stored. The computer program is loaded and executed by a processor to implement the aforementioned method.
[0018] According to a fourth aspect of the present invention, there is provided an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the aforementioned method when executing the computer program.
[0019] The present invention has at least the following beneficial effects:
[0020] The present invention provides a method, apparatus, device and medium for determining target location information. The method can obtain an associated electronic device identification list and an initial longitude and latitude list set corresponding to the associated electronic device identification list. When the number of initial longitude and latitude lists that are not NULL is not less than the number of preset lists, all initial longitudes and latitudes in all initial longitude and latitude lists that are not NULL are deduplicated to obtain a first key longitude and latitude list. The target location information is determined according to a GeoHash algorithm, a first preset initial string length and a first key longitude and latitude list. It can be seen that in the present invention, the target location information is determined according to the first key longitude and latitude instead of determining the location information according to signal strength. The longitude and latitude will not change due to any influencing factors, and thus determining the target location information according to the first key longitude and latitude will not cause a large error. Therefore, determining the target location information according to the present invention is conducive to improving the accuracy of the determined target location information. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 A flowchart of a method for determining target location information provided in Embodiment 1 of the present invention;
[0023] Figure 2 A flowchart of step S4 provided in the first embodiment of the present invention;
[0024] Figure 3 A flowchart of the first initial processing method in step S42 provided in the first embodiment of the present invention;
[0025] Figure 4 A flowchart of the second initial processing method in step S42 provided in the first embodiment of the present invention;
[0026] Figure 5 A flowchart of a method for obtaining target location information provided in Embodiment 2 of the present invention;
[0027] Figure 6 A flowchart of step S40 provided in the second embodiment of the present invention;
[0028] Figure 7 A flowchart of the first intermediate processing method in step S403 provided in the second embodiment of the present invention;
[0029] Figure 8A flowchart of the second intermediate processing method in step S403 provided in the second embodiment of the present invention;
[0030] Fig. 9 A schematic diagram of the structure of a device for determining target location information provided by Embodiment 3 of the present invention;
[0031] Fig.10 A schematic diagram of the structure of a target location information determination module 4 provided in Embodiment 3 of the present invention;
[0032] Fig.11 A schematic diagram of the structure of a first initial processing subunit in the target position information determination unit 42 provided in the third embodiment of the present invention;
[0033] Fig.12 A schematic diagram of the structure of a second initial processing subunit in the target position information determination unit 42 provided in the third embodiment of the present invention;
[0034] Fig.13 A schematic diagram of the structure of a device for obtaining target location information provided by Embodiment 4 of the present invention;
[0035] Fig.14 A schematic diagram of the structure of a target location information acquisition module 40 provided in Embodiment 4 of the present invention;
[0036] Fig.15 A schematic diagram of the structure of the first intermediate processing subunit in the target position information acquisition unit 403 provided in the fourth embodiment of the present invention;
[0037] Fig.16 This is a schematic diagram of the structure of the second intermediate processing subunit in the target position information acquisition unit 403 provided in the fourth embodiment of the present invention. DETAILED DESCRIPTION
[0038] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0039] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar tasks, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.
[0040] Embodiment 1
[0041] Embodiment 1 of the present invention provides a method for determining target location information, wherein the target location information is a GeoHash string corresponding to the longitude and latitude of the location of the target Bluetooth at the current time point, and the GeoHash string is a string obtained according to the GeoHash algorithm. The method includes the following steps: Figure 1 As shown:
[0042] S1. Obtain an associated electronic device identification list, where the associated electronic device identification list includes several associated electronic device identifications, where the associated electronic device identification is an identity identification of the associated electronic device, where the associated electronic device is an electronic device with an associated Bluetooth, where the associated Bluetooth is other Bluetooths that establish a connection with the target Bluetooth and perform data transmission within a preset time period or are searched by the target Bluetooth; the electronic device can be understood as a mobile phone, tablet computer, or other device.
[0043] Specifically, the end time point of the preset time period is the current time point. In a specific embodiment, those skilled in the art know that the start time point of the preset time period is set by those skilled in the art according to actual needs and will not be described in detail here.
[0044] S2. Obtain an initial longitude and latitude list set corresponding to the associated electronic device identification list, wherein the initial longitude and latitude list set includes an initial longitude and latitude list corresponding to all associated electronic device identifications, wherein the initial longitude and latitude list includes several initial longitudes and latitudes corresponding to the associated electronic device identifications, and the initial longitudes and latitudes are the longitudes and latitudes updated by the GPS in the associated electronic device within a preset time period.
[0045] Specifically, the initial longitude and latitude list can be NULL.
[0046] S3. When the number of initial longitude and latitude lists that are not NULL is not less than the number of preset lists, all initial longitude and latitude in all initial longitude and latitude lists that are not NULL are deduplicated to obtain a first key longitude and latitude list. The first key longitude and latitude list includes several first key longitudes and latitudes. Those skilled in the art know that the preset number of lists is a value pre-set by those skilled in the art according to actual needs. Any deduplication method in the prior art belongs to the protection scope of the present invention and will not be repeated here.
[0047] S4. Determine the target location information according to the GeoHash algorithm, the first preset initial string length and the first key longitude and latitude list, wherein those skilled in the art know that the first preset initial string length is set by those skilled in the art according to actual needs and will not be repeated here.
[0048] Specifically, step S4 also includes the following sub-steps S41-S42: Figure 2 As shown:
[0049] S41. Obtain a first key location information string list corresponding to the first key longitude and latitude list according to the GeoHash algorithm. The first key location information string list includes first key location information strings corresponding to all first key longitudes and latitudes. The first key location information string is a string obtained by converting the first key longitude and latitude into a string using the GeoHash algorithm, the string length of which is a first preset initial string length.
[0050] S42: when any two first key position information character strings in the first key position information character string list are different, determining the target position information according to the first initial processing method; otherwise, determining the target position information according to the second initial processing method.
[0051] Through the above steps, the first key location information character string list corresponding to the first key longitude and latitude list is obtained according to the GeoHash algorithm. When any two first key location information character strings in the first key location information character string list are different, it means that any two first key longitude and latitude do not belong to the same GeoHash coding area. The target location information is determined according to the first initial processing method. Otherwise, it means that there are two or more first key longitude and latitude belonging to the same GeoHash coding area. The target location information is determined according to the second initial processing method. The longitude and latitude will not change due to any influencing factors. Therefore, further determining the target location information according to the first key longitude and longitude will not cause a large error, which is conducive to improving the accuracy of the determined target location information.
[0052] Specifically, in step S42, the first initial processing method includes the following steps S421-S424: Figure 3 As shown:
[0053] S421. Delete the last character in the first key position information string to obtain a second key position information string corresponding to the first key position information string.
[0054] S422. When the second key position information strings corresponding to all the first key position information strings are the same, determine any one of the second key position information strings as the target position information; otherwise, deduplicate the second key position information strings corresponding to all the first key position information strings to obtain a third key position information string list, wherein the third key position information string list includes a plurality of third key position information strings.
[0055] S423: When the second key position information string corresponding to the first key position information string is the same as the third key position information string, use the first key position information string as the fourth key position information string corresponding to the third key position information string.
[0056] S424: Determine the third key location information string having the largest number of corresponding fourth key location information strings among all the third key location information strings as the target location information.
[0057] Through the above steps, the second key location information string is obtained according to the first key location information string. When the second key location information strings corresponding to all the first key location information strings are the same, it means that all the first key longitudes and latitudes belong to the GeoHash coding area corresponding to the second key location information string. It can be understood that all the first key longitudes and latitudes are concentrated in the GeoHash coding area corresponding to the second key location information string. Therefore, any second key location information string is determined to be the target location information. Otherwise, it means that the first key longitudes and latitudes are scattered in the GeoHash coding areas corresponding to several second key location information strings. At this time, the third key location information string is obtained. According to the third key location information string, the corresponding fourth key location information string in the third key location information string is obtained. The third key location information string with the largest number of corresponding fourth key location information strings among all the third key location information strings can be understood as the third key location information string corresponding to the largest number of first key longitude and longitude in the GeoHash encoding area. Therefore, the third key location information string with the largest number of corresponding fourth key location information strings among all the third key location information strings is determined as the target location information. Therefore, further determining the target location information based on the first key longitude and longitude will not cause a large error, which is conducive to improving the accuracy of the determined target location information.
[0058] Specifically, in step S42, the second initial processing method includes the following steps S4201-S4205: Figure 4 As shown:
[0059] S4201. Perform deduplication processing on all first key position information character strings to obtain a first intermediate position information character string list, where the first intermediate position information character string list includes a plurality of first intermediate position information character strings.
[0060] S4202: When the first key position information string is the same as the first intermediate position information string, use the first key position information string as the second intermediate position information string corresponding to the first intermediate position information string.
[0061] S4203: Take the first intermediate position information string with the largest number of corresponding second intermediate position information strings among all the first intermediate position information strings as the third intermediate position information string.
[0062] S4204: When the first key location information string is the same as the third intermediate location information string, use the first key longitude and latitude corresponding to the first key location information string as the second key longitude and latitude to obtain a second key longitude and latitude list, wherein the second key longitude and latitude list includes a plurality of second key longitudes and latitudes.
[0063] S4205. Use the second key longitude and latitude list as the first key longitude and latitude list, use the second preset initial string length corresponding to the first preset initial string length as the first preset initial string length, and determine the target location information according to the GeoHash algorithm, the first preset initial string length and the first key longitude and latitude list, wherein the second preset initial string length is 1 greater than the first preset initial string length.
[0064] Through the above steps, the first intermediate location information string is obtained according to the first key location information string, and the second intermediate location information string is further obtained. The first intermediate location information string with the largest number of corresponding second intermediate location information strings among all the first intermediate location information strings can be understood as the first intermediate location information string corresponding to the first intermediate location information string has the largest number of first key longitudes and latitudes in the GeoHash encoding area. The first intermediate location information string with the largest number of corresponding second intermediate location information strings among all the first intermediate location information strings is used as the third intermediate location information string, which can be understood as using the first intermediate location information string with the largest number of first key longitudes and latitudes in the corresponding GeoHash encoding area as the third intermediate location information string. When the first key location information string is the same as the third intermediate location information string, the first key longitudes and longitudes corresponding to the first key location information string are used as the second key longitudes and longitudes to obtain a second key longitude and longitude list, and the second key longitude and longitude list is used as the first key longitude and longitude list, and the first predetermined longitude and longitude list is used as the first key longitude and longitude list. The second preset initial string length corresponding to the initial string length is set as the first preset initial string length, and the target location information is determined according to the GeoHash algorithm, the first preset initial string length and the first key longitude and latitude list. The first key longitude and latitude in the GeoHash coding area corresponding to the third intermediate location information string is used as the second key longitude and latitude to obtain the second key longitude and latitude list, and then the second key longitude and latitude list is used as the first key longitude and latitude list, and the second preset initial string length corresponding to the first preset initial string length is used as the first preset initial string length to determine the target location information again. As the first preset initial string length increases, the length of the first intermediate location information string obtained again in the process of re-determining the target location information is also longer, and the corresponding GeoHash coding area is smaller, the accuracy is higher, and the longitude and latitude will not change due to any influencing factors. Therefore, further determining the target location information according to the first key longitude and longitude will not cause a large error, which is conducive to improving the accuracy of the determined target location information.
[0065] Embodiment 2
[0066] The second embodiment of the present invention further provides a method for obtaining target location information, which differs from the first embodiment in that it further includes the following steps S10-S40 after step S2: Figure 5 As shown:
[0067] S10. When the number of initial longitude and latitude lists that are not NULL is less than the number of preset lists, obtain a first key mobile hotspot identifier and a second key mobile hotspot identifier list, wherein the first key mobile hotspot identifier is an identity identifier of the first key mobile hotspot, and the first key mobile hotspot is a mobile hotspot connected to the first related electronic device at the current time point. The second key mobile hotspot identifier list includes several second key mobile hotspot identifiers, and the second key mobile hotspot identifier is an identity identifier of the second key mobile hotspot, and the second key mobile hotspot is a mobile hotspot searched for but not connected by the first related electronic device at the current time point. The first related electronic device is another Bluetooth electronic device that can establish a connection with the target Bluetooth at the current time point and transmit data. The mobile hotspot can be understood as Wi-Fi.
[0068] S20. Obtain a first intermediate longitude and latitude list according to the first key mobile hotspot identifier, wherein the first intermediate longitude and latitude list includes several first intermediate longitude and latitude, and the first intermediate longitude and latitude are the longitude and latitude displayed by the GPS in the second related electronic device at the current time point, and the second related electronic device is an electronic device that has been connected to the first key mobile hotspot within a preset time period.
[0069] S30. Obtain a second intermediate longitude and latitude list according to the second key mobile hotspot identifier list, wherein the second intermediate longitude and latitude list includes a plurality of second intermediate longitudes and latitudes, and the second intermediate longitudes and latitudes are the longitudes and latitudes displayed by the GPS in a third related electronic device at the current time point, and the third related electronic device is an electronic device that has been connected to any second key mobile hotspot corresponding to any second key mobile hotspot identifier within a preset time period.
[0070] S40, acquiring target location information according to the GeoHash algorithm, the first preset intermediate character string length, the first intermediate longitude and latitude list, and the second intermediate longitude and latitude list.
[0071] Specifically, step S40 includes the following sub-steps S401-S403: Figure 6 Said:
[0072] S401. Obtain a first candidate location information string list corresponding to the first intermediate longitude and latitude list according to the GeoHash algorithm. The first candidate location information string list includes first candidate location information strings corresponding to all first intermediate longitudes and latitudes. The first candidate location information string is a string obtained by converting the first intermediate longitude and latitude into a string having a length of a first preset intermediate string length through the GeoHash algorithm.
[0073] S402. Obtain a list of second candidate location information strings corresponding to the second intermediate longitude and latitude list according to the GeoHash algorithm. The list of second candidate location information strings includes second candidate location information strings corresponding to all second intermediate longitudes and latitudes. The second candidate location information string is a string obtained by converting the second intermediate longitude and latitude into a string having a length of the first preset intermediate string length through the GeoHash algorithm.
[0074] S403. When any two first candidate location information character strings are different, any two second candidate location information character strings are different, and any first candidate location information character string is different from any second candidate location information character string, obtain the target location information according to the first intermediate processing method; otherwise, obtain the target location information according to the second intermediate processing method.
[0075] Through the above steps, the first candidate location information string list corresponding to the first intermediate longitude and latitude list is obtained according to the GeoHash algorithm, and the second candidate location information string list corresponding to the second intermediate longitude and latitude list is obtained according to the GeoHash algorithm. When any two first candidate location information strings are different, any two second candidate location information strings are different, and any first candidate location information string is different from any second candidate location information string, it means that any two first intermediate longitudes and latitudes, any two second intermediate longitudes and latitudes, or any first intermediate longitude and latitude and any second intermediate longitude and latitude do not belong to the same GeoHash coding area, and the target location information is obtained according to the first intermediate processing method. Otherwise, it means that there are two or more first intermediate longitudes and latitudes or second intermediate longitudes and latitudes that belong to the same GeoHash coding area. According to the second intermediate processing method, the target location information is obtained. The longitude and latitude will not change due to any influencing factors. Therefore, further obtaining the target location information according to the first intermediate longitude and latitude and the second intermediate longitude and latitude will not cause a large error, which is conducive to improving the accuracy of obtaining the target location information.
[0076] Specifically, in step S403, the first intermediate processing method includes the following steps S4031-S4035: Figure 7 As shown:
[0077] S4031. Delete the last character in the first candidate position information string to obtain a third candidate position information string corresponding to the first candidate position information string, and delete the last character in the second candidate position information string to obtain a fourth candidate position information string corresponding to the second candidate position information string.
[0078] S4032. When all third candidate location information strings and all fourth candidate location information strings are the same string, any one of the third candidate location information strings or the fourth candidate location information strings is used as the target location information; otherwise, all third candidate location information strings and all fourth candidate location information strings are deduplicated to obtain a first preferred location information string list, which includes several first preferred location information strings.
[0079] S4033. When the third candidate location information string is the same as the first preferred location information string, the first candidate location information string corresponding to the third candidate location information string is used as the second preferred location information string corresponding to the first preferred location information string; when the fourth candidate location information string is the same as the first preferred location information string, the second candidate location information string corresponding to the fourth candidate location information string is used as the third preferred location information string corresponding to the first preferred location information string.
[0080] S4034. Obtain a first priority corresponding to a first preferred location information string, wherein the value of the first priority corresponding to the first preferred location information string is the sum of the product of the number of second preferred location information strings corresponding to the first preferred location information string and a first preset weight and the product of the number of third preferred location information strings corresponding to the first preferred location information string and a second preset weight, wherein the first preset weight is a pre-set weight representing the importance of the first intermediate longitude and latitude, and the second preset weight is a pre-set weight representing the importance of the second intermediate longitude and latitude.
[0081] Specifically, the first preset weight is greater than the second preset weight.
[0082] S4035. Use the first preferred location information string corresponding to the largest first priority among all first preferred location information strings as the target location information.
[0083] Through the above steps, the third candidate location information string and the fourth candidate location information string are obtained. When all the third candidate location information strings and all the fourth candidate location information strings are the same string, it means that all the first intermediate longitudes and latitudes and all the second intermediate longitudes and latitudes belong to the GeoHash coding area corresponding to the third candidate location information string or the fourth candidate location information string. It can be understood that all the first intermediate longitudes and latitudes and all the second intermediate longitudes and latitudes are gathered in the GeoHash coding area corresponding to the third candidate location information string or the fourth candidate location information string. Therefore, any third candidate location information string or fourth candidate location information string is used as the target location information. Otherwise, it means that the first intermediate longitudes and longitudes and the second intermediate longitudes and longitudes are not in the GeoHash coding area corresponding to the third candidate location information string or the fourth candidate location information string. The latitude is scattered in the GeoHash coding areas corresponding to several third candidate location information strings and fourth candidate location information strings. At this time, a list of first preferred location information strings is obtained, and the first priority corresponding to the first preferred location information string is obtained according to the second preferred location information string and the third preferred location information string corresponding to the first preferred location information string. The first preferred location information string corresponding to the largest first priority among all the first preferred location information strings is used as the target location information. The longitude and latitude will not change due to any influencing factors. Therefore, further obtaining the target location information based on the first intermediate longitude and latitude and the second intermediate longitude and latitude will not cause a large error, which is beneficial to improving the accuracy of obtaining the target location information.
[0084] Specifically, in step S403, the second intermediate processing method includes the following steps S100-S600: Figure 8 As shown:
[0085] S100: De-duplicate all first candidate location information character strings and all second candidate location information character strings to obtain a first designated location information character string list, wherein the first designated location information character string list includes a plurality of first designated location information character strings.
[0086] S200. When the first candidate position information string is the same as the first designated position information string, the first candidate position information string is used as the second designated position information string corresponding to the first designated position information string; when the second candidate position information string is the same as the first designated position information string, the second candidate position information string is used as the third designated position information string corresponding to the first designated position information string.
[0087] S300. Obtain a second priority corresponding to a first specified location information string, wherein the value of the second priority corresponding to the first specified location information string is the sum of the product of the number of second specified location information strings corresponding to the first specified location information string and a first preset weight and the product of the number of third specified location information strings corresponding to the first specified location information string and a second preset weight.
[0088] S400: Take the first designated location information string corresponding to the largest second priority among all the first designated location information strings corresponding to the second priority as the fourth designated location information string.
[0089] S500. When the first candidate location information string is the same as the fourth designated location information string, the first intermediate longitude and longitude corresponding to the first candidate location information string is used as the third intermediate longitude and longitude to obtain a third intermediate longitude and longitude list; when the second candidate location information string is the same as the fourth designated location information string, the second intermediate longitude and longitude corresponding to the second candidate location information string is used as the fourth intermediate longitude and longitude to obtain a fourth intermediate longitude and longitude list, the third intermediate longitude and longitude list includes several third intermediate longitudes and longitudes, and the fourth intermediate longitude and longitude list includes several fourth intermediate longitudes and longitudes.
[0090] S600, using the third intermediate longitude and latitude list as the first intermediate longitude and latitude list, using the fourth intermediate longitude and latitude list as the second intermediate longitude and latitude list, using the second preset intermediate string length corresponding to the first preset intermediate string length as the first preset intermediate string length, and obtaining the target location information according to the GeoHash algorithm, the first preset intermediate string length, the first intermediate longitude and latitude list, and the second intermediate longitude and latitude list, wherein the second preset intermediate string length is 1 greater than the first preset intermediate string length.
[0091] Through the above steps, the first designated location information string is obtained according to the first candidate location information string and the second candidate location information string, the second priority corresponding to the first designated location information string is obtained according to the second designated location information string and the third designated location information string corresponding to the first designated location information string, the first designated location information string corresponding to the largest second priority among all the second priorities corresponding to the first designated location information strings is used as the fourth designated location information string, when the first candidate location information string is the same as the fourth designated location information string, the first intermediate longitude and latitude corresponding to the first candidate location information string is used as the third intermediate longitude and latitude to obtain a third intermediate longitude and latitude list, when the second candidate location information string is the same as the fourth designated location information string, the second intermediate longitude and latitude corresponding to the second candidate location information string is used as the fourth intermediate longitude and latitude to obtain a fourth intermediate Longitude and latitude list, take the third intermediate longitude and latitude list as the first intermediate longitude and latitude list, take the fourth intermediate longitude and latitude list as the second intermediate longitude and latitude list, take the second preset intermediate string length corresponding to the first preset intermediate string length as the first preset intermediate string length, obtain the target location information according to the GeoHash algorithm, the first preset intermediate string length, the first intermediate longitude and latitude list and the second intermediate longitude and latitude list, as the first preset intermediate string length increases, the lengths of the first candidate location information string and the second candidate location information string obtained again in the process of re-determining the target location information are also longer, the corresponding GeoHash encoding area is smaller, the accuracy is higher, the longitude and latitude will not change due to any influencing factors, so further obtaining the target location information according to the first intermediate longitude and latitude and the second intermediate longitude and latitude will not cause a large error, which is conducive to improving the accuracy of obtaining the target location information.
[0092] A method for obtaining target location information provided by the present invention can obtain an associated electronic device identification list and an initial longitude and latitude list set corresponding to the associated electronic device identification list. When the number of initial longitude and latitude lists that are not NULL is less than the preset number of lists, a first key mobile hotspot identification and a second key mobile hotspot identification list are obtained, and a first intermediate longitude and latitude list is obtained according to the first key mobile hotspot identification, and a second intermediate longitude and latitude list is obtained according to the second key mobile hotspot identification list. The target location information is obtained according to the GeoHash algorithm, the first preset intermediate string length, the first intermediate longitude and latitude list and the second intermediate longitude and latitude list. It can be seen that in the present invention, the target location information is determined according to the first intermediate longitude and latitude and the second intermediate longitude and latitude instead of determining the location information according to the signal strength, and the longitude and latitude will not change due to any influencing factors, and further obtaining the target location information according to the first intermediate longitude and latitude and the second intermediate longitude and latitude will not cause a large error, which is beneficial to improving the accuracy of obtaining the target location information.
[0093] The present invention also provides a specific embodiment, which differs from the first embodiment and the second embodiment in that after step S2, the following steps S1000-S3000 are further included to obtain target location information:
[0094] S1000. When the number of initial longitude and latitude lists that are not NULL is less than the number of preset lists, obtain a key base station identification list, wherein the key base station identification list includes several key base station identifications, and the key base station identification is an identity identification of a key base station, and a key base station is a base station that has established a communication connection with any associated electronic device within a preset time period.
[0095] S2000. Obtain a first candidate longitude and latitude list according to a key base station identifier list, wherein the first candidate longitude and latitude list includes a plurality of first candidate longitude and latitude, and the first candidate longitude and latitude are the longitude and latitude displayed by a GPS in a first key electronic device at a current time point, and the first key electronic device is an electronic device that has established a communication connection with any key base station within a preset time period.
[0096] S3000. Obtain target location information according to the GeoHash algorithm, the first preset key string length and the first candidate longitude and latitude list.
[0097] Through the above steps, when the number of initial longitude and latitude lists that are not NULL is less than the number of preset lists, a key base station identifier list is obtained, and a first candidate longitude and latitude list is obtained according to the key base station identifier list. The target location information is obtained according to the GeoHash algorithm, the first preset key string length and the first candidate longitude and latitude list. The longitude and latitude will not change due to any influencing factors, and further obtaining the target location information according to the first candidate longitude and latitude will not cause a large error, which is conducive to improving the accuracy of obtaining the target location information.
[0098] Specifically, step S3000 includes the following sub-steps S3100-S3200:
[0099] S3100. Obtain a first initial location information string list corresponding to the first candidate longitude and latitude list according to the GeoHash algorithm. The first initial location information string list includes first initial location information strings corresponding to all first candidate longitudes and latitudes. The first initial location information string is a string obtained by converting the first candidate longitude and latitude into a string using the GeoHash algorithm, the string length of which is a first preset key string length.
[0100] S3200: When any two first initial position information character strings in the first initial position information character string list are different, obtain the target position information according to the first key processing method; otherwise, obtain the target position information according to the second key processing method.
[0101] Through the above steps, the first initial location information string list corresponding to the first candidate longitude and latitude list is obtained according to the GeoHash algorithm. When any two first initial location information strings in the first initial location information string list are different, it means that any two first candidate longitude and latitude do not belong to the same GeoHash coding area. The target location information is determined according to the first key processing method. Otherwise, it means that there are two or more first candidate longitude and latitude belonging to the same GeoHash coding area. The target location information is determined according to the second key processing method. The longitude and latitude will not change due to any influencing factors, and further obtaining the target location information according to the first candidate longitude and latitude will not cause a large error, which is conducive to improving the accuracy of obtaining the target location information.
[0102] Specifically, in step S3200, the first key processing method includes the following steps S3210-S3250:
[0103] S3210. Delete the last character in the first initial position information string to obtain a second initial position information string corresponding to the first initial position information string.
[0104] S3220. When all second initial position information character strings are the same, any second initial position information character string is used as the target position information. Otherwise, all second initial position information character strings are deduplicated to obtain a third initial position information character string list, wherein the third initial position information character string list includes several third initial position information character strings.
[0105] S3230: When the second initial location information string corresponding to the first initial location information string is the same as the third initial location information string, the first key electronic device corresponding to the first candidate longitude and latitude corresponding to the first initial location information string is used as the second key electronic device corresponding to the third initial location information string.
[0106] S3240. Obtain the key priority corresponding to the third initial location information string. The value of the key priority corresponding to the third initial location information string is the sum of the data reporting frequencies of all second key electronic devices corresponding to the third initial location information string. The data reporting frequency of the second key electronic device is the total number of times the second key electronic device reports data to all key base stations within a preset time period.
[0107] S3250: Take the third initial location information string corresponding to the largest key priority among all the third initial location information string corresponding to key priorities as the target location information.
[0108] Through the above steps, the second initial location information string is obtained. When all the second initial location information strings are the same, any second initial location information string is used as the target location information, indicating that all the first candidate longitudes and latitudes belong to the GeoHash coding area corresponding to the second initial location information string. It can be understood that all the first candidate longitudes and latitudes are concentrated in the GeoHash coding area corresponding to the second initial location information string. Therefore, any second initial location information string is used as the target location information. Otherwise, it means that the first candidate longitudes and latitudes are scattered in the GeoHash coding areas corresponding to several second initial location information strings. At this time, the third initial location information string is obtained, and the key priority corresponding to the third initial location information is obtained according to the second key electronic device corresponding to the third initial location information string. The third initial location information string corresponding to the largest key priority among the key priorities corresponding to all the third initial location information strings is used as the target location information. The longitude and latitude will not change due to any influencing factors, and further obtaining the target location information according to the first candidate longitude and latitude will not cause a large error, which is conducive to improving the accuracy of obtaining the target location information.
[0109] Specifically, in step S3200, the second key processing method includes the following steps S3201-S3206:
[0110] S3201. Perform deduplication processing on all first initial position information character strings to obtain a first candidate position information character string list, where the first candidate position information character string list includes a plurality of first candidate position information character strings.
[0111] S3202: When the first initial location information string is the same as the first candidate location information string, use the first key electronic device corresponding to the first candidate longitude and latitude corresponding to the first initial location information string as the third key electronic device corresponding to the first candidate location information string.
[0112] S3203. Obtain the intermediate priority corresponding to the first candidate location information string. The value of the intermediate priority corresponding to the first candidate location information string is the sum of the data reporting frequencies of all third key electronic devices corresponding to the first candidate location information string. The data reporting frequency of the third key electronic device is the total number of times the third key electronic device reports data to all key base stations within a preset time period.
[0113] S3204: Take the first position information string to be selected, which corresponds to the largest intermediate priority among all the first position information strings to be selected, as the second position information string to be selected.
[0114] S3205. When the first initial location information string is the same as the second candidate location information string, use the first candidate longitude and latitude corresponding to the first initial location information string as the second candidate longitude and latitude to obtain a second candidate longitude and latitude list, wherein the second candidate longitude and latitude list includes a plurality of second candidate longitudes and latitudes.
[0115] S3206. Use the second candidate longitude and latitude list as the first candidate longitude and latitude list, use the second preset key string length corresponding to the first preset key string length as the first preset key string length, and obtain the target location information according to the GeoHash algorithm, the first preset key string length and the first candidate longitude and latitude list. The second preset key string length is 1 greater than the first preset key string length.
[0116] Through the above steps, the first candidate location information string is obtained according to the first initial location information string, the intermediate priority corresponding to the first candidate location information string is obtained according to the third key electronic device corresponding to the first candidate location information string, the first candidate location information string corresponding to the largest intermediate priority among all the intermediate priorities corresponding to the first candidate location information string is used as the second candidate location information string, when the first initial location information string is the same as the second candidate location information string, the first candidate longitude and latitude corresponding to the first initial location information string is used as the second candidate longitude and latitude to obtain a second candidate longitude and latitude list, and the second candidate longitude and latitude list is used as the first candidate longitude and latitude list. The target location information is obtained according to the GeoHash algorithm, the first preset key string length and the first candidate longitude and latitude list, and the second preset key string length corresponding to the first preset key string length is used as the first preset key string length. As the length of the first preset key string increases, the length of the first initial location information string obtained again in the process of re-determining the target location information is also longer, and the corresponding GeoHash encoding area is smaller, the accuracy is higher, and the longitude and latitude will not change due to any influencing factors. Therefore, further obtaining the target location information according to the first candidate longitude and latitude will not cause a large error, which is conducive to improving the accuracy of obtaining the target location information.
[0117] The present invention also provides a specific embodiment, which is different from the above embodiment in that after step S2, it also includes step S21 to obtain target location information:
[0118] S21. When the number of initial longitude and latitude lists that are not NULL is less than the preset number of lists, the target location information is obtained according to a preferred processing method.
[0119] Specifically, in step S21, the preferred processing method includes the following steps a to c:
[0120] Step a: Obtain a first key mobile hotspot identifier and a second key mobile hotspot identifier list and obtain first key location information according to the first key mobile hotspot identifier and the second key mobile hotspot identifier list, wherein the manner of obtaining the first key location information according to the first key mobile hotspot identifier and the second key mobile hotspot identifier list is the same as the manner of obtaining the target location information according to the first key mobile hotspot identifier and the second key mobile hotspot identifier list in Example 2. It can be understood that the target location information obtained according to the first key mobile hotspot identifier and the second key mobile hotspot identifier list in Example 2 is used as the first key location information in this embodiment, and no further details are given here.
[0121] Step b: Obtain a list of key base station identifiers and obtain the second key location information based on the key base station identifier list, wherein the method of obtaining the second key location information based on the key base station identifier list is the same as the method of obtaining the target location information based on the key base station identifier list in steps S2000-S3000. It can be understood that the target location information obtained according to the key base station identifier list in steps S2000-S3000 is used as the second key location information in this embodiment, and will not be repeated here.
[0122] Step c: when the first key position information is the same as the second key position information, the first key position information or the second key position information is used as the target position information; when the first key position information is different from the second key position information and the string length of the first key position information is greater than the string length of the second key position information, the first key position information is used as the target position information; when the first key position information is different from the second key position information and the string length of the first key position information is less than the string length of the second key position information, the second key position information is used as the target position information; when the first key position information is different from the second key position information and the string length of the first key position information is equal to the string length of the second key position information, the first key position information is used as the target position information.
[0123] Through the above steps, the longer the string length of the first key location information or the second key location information is, the smaller the corresponding GeoHash coding area is, and the higher the accuracy is. When the first key location information is the same as the second key location information, the first key location information or the second key location information is used as the target location information. When the first key location information is different from the second key location information and the string length of the first key location information is greater than the string length of the second key location information, it means that the first key location information is more accurate, and the first key location information is used as the target location information; when the first key location information is different from the second key location information and the string length of the first key location information is less than the string length of the second key location information, it means that the second key location information is more accurate, and the second key location information is used as the target location information; when the first key location information is different from the second key location information and the string length of the first key location information is equal to the string length of the second key location information, the first key location information is used as the target location information, which is conducive to improving the accuracy of obtaining the target location information.
[0124] In a specific embodiment, the starting time point of the preset time period is obtained through the following steps A to C:
[0125] Step A: Obtain a target base station identifier list corresponding to a preset geographical area. The target base station identifier list includes several target base station identifiers. The target base station identifier is an identity identifier of the target base station. The target base station is a base station set within the preset geographical area. Technical personnel in this field know that the preset geographical area is a geographical area pre-set by technical personnel in this field according to actual needs, and will not be repeated here.
[0126] Step B: Obtain a target time period list corresponding to the target base station identification list, the target time period list including target time periods corresponding to all target base station identifications, the target time period corresponding to the target base station identification is a time period in which the number of electronic devices communicating with the target base station in the historical time slice has not changed and the number of electronic devices communicating with the target base station is greater than a preset number of electronic devices. Those skilled in the art are aware that the preset number of electronic devices is set by those skilled in the art based on actual needs and will not be elaborated herein.
[0127] Specifically, the length of the target time period is greater than the preset time period. Those skilled in the art know that the preset time period is set by those skilled in the art according to actual needs and will not be described in detail here.
[0128] Specifically, the historical time slice is the time slice before the time slice of the current time point.
[0129] Furthermore, the length of a time slice is one day; a historical time slice can be understood as the day before the current day.
[0130] Step C: The time point obtained by subtracting the length of the preset time period from the current time point is used as the starting time point of the preset time period, and the length of the preset time period is the average length of all target time periods in the target time period list.
[0131] Through the above steps, the length of the preset time period is obtained according to the target time period corresponding to the target base station identifier, and then the starting time point of the preset time period is obtained. Compared with manually setting the starting time point of the preset time period, the above steps are conducive to improving the accuracy of obtaining the starting time point of the preset time period.
[0132] Embodiment 3
[0133] Embodiment 3 of the present invention provides a device for determining target location information, wherein the target location information is a GeoHash string corresponding to the longitude and latitude of the location of the target Bluetooth at the current time point, and the GeoHash string is a string obtained according to the GeoHash algorithm, such as Fig. 9 As shown, the device comprises:
[0134] The associated electronic device identification list acquisition module 1 is used to obtain the associated electronic device identification list, which includes several associated electronic device identifications. The associated electronic device identification is the identity identification of the associated electronic device. The associated electronic device is an electronic device with an associated Bluetooth. The associated Bluetooth is other Bluetooths that establish a connection with the target Bluetooth and transmit data within a preset time period or are searched by the target Bluetooth; electronic devices can be understood as mobile phones, tablet computers and other devices.
[0135] Specifically, the end time point of the preset time period is the current time point. In a specific embodiment, those skilled in the art know that the start time point of the preset time period is set by those skilled in the art according to actual needs and will not be described in detail here.
[0136] The initial longitude and latitude list set acquisition module 2 is used to obtain the initial longitude and latitude list set corresponding to the associated electronic device identification list, the initial longitude and latitude list set includes the initial longitude and latitude lists corresponding to all associated electronic device identifications, the initial longitude and latitude list includes several initial longitudes and latitudes corresponding to the associated electronic device identifications, and the initial longitude and latitude are the longitude and latitude updated by the GPS in the associated electronic device within a preset time period.
[0137] Specifically, the initial longitude and latitude list can be NULL.
[0138] The first key longitude and latitude list acquisition module 3 is used to deduplicate all initial longitudes and latitudes in all non-NULL initial longitude and latitude lists to obtain a first key longitude and latitude list when the number of non-NULL initial longitude and latitude lists is not less than the preset number of lists. The first key longitude and latitude list includes several first key longitudes and latitudes. Those skilled in the art know that the preset number of lists is a value pre-set by those skilled in the art according to actual needs. Any deduplication method in the prior art belongs to the protection scope of the present invention and will not be repeated here.
[0139] The target location information determination module 4 is used to determine the target location information according to the GeoHash algorithm, the first preset initial string length and the first key longitude and latitude list, wherein those skilled in the art know that the first preset initial string length is set by those skilled in the art according to actual needs and will not be repeated here.
[0140] Specifically, Fig.10 As shown, the target location information determination module 4 also includes:
[0141] The first key location information string list acquisition unit 41 is used to obtain the first key location information string list corresponding to the first key longitude and latitude list according to the GeoHash algorithm. The first key location information string list includes the first key location information strings corresponding to all first key longitudes and latitudes. The first key location information string is a string obtained by converting the first key longitude and latitude into a string using the GeoHash algorithm, the string length of which is a first preset initial string length.
[0142] The target position information determining unit 42 is configured to determine the target position information according to the first initial processing method when any two first key position information character strings in the first key position information character string list are different, and otherwise determine the target position information according to the second initial processing method.
[0143] Specifically, the target position information determination unit 42 also includes a first initial processing subunit and a second initial processing subunit. The first initial processing subunit is used to determine the target position information according to a first initial processing method, and the second initial processing subunit is used to determine the target position information according to a second initial processing method.
[0144] Specifically, Fig.11 As shown, the first initial processing subunit in the target position information determination unit 42 also includes:
[0145] The second key position information string acquisition subunit 421 is configured to delete the last character in the first key position information string to acquire a second key position information string corresponding to the first key position information string.
[0146] The first target position information determination subunit 422 is used to determine any second key position information string as the target position information when the second key position information strings corresponding to all first key position information strings are the same; otherwise, deduplicate the second key position information strings corresponding to all first key position information strings to obtain a third key position information string list, which includes several third key position information strings.
[0147] The fourth key location information string obtaining subunit 423 is configured to use the first key location information string as the fourth key location information string corresponding to the third key location information string when the second key location information string corresponding to the first key location information string is the same as the third key location information string.
[0148] The second target location information determining subunit 424 is configured to determine the third key location information string having the largest number of corresponding fourth key location information strings among all the third key location information strings as the target location information.
[0149] Specifically, Fig.12 As shown, the second initial processing subunit in the target position information determination unit 42 also includes:
[0150] The first intermediate position information string list obtaining subunit 4201 is used to perform deduplication processing on all first key position information strings to obtain a first intermediate position information string list, where the first intermediate position information string list includes a plurality of first intermediate position information strings.
[0151] The second intermediate position information string acquiring subunit 4202 is configured to use the first key position information string as a second intermediate position information string corresponding to the first intermediate position information string when the first key position information string is the same as the first intermediate position information string.
[0152] The third intermediate position information string acquisition subunit 4203 is configured to use the first intermediate position information string with the largest number of corresponding second intermediate position information strings among all the first intermediate position information strings as the third intermediate position information string.
[0153] The second key longitude and latitude list acquisition subunit 4204 is used to, when the first key location information string is the same as the third intermediate location information string, use the first key longitude and latitude corresponding to the first key location information string as the second key longitude and latitude to obtain a second key longitude and latitude list, the second key longitude and latitude list including several second key longitudes and latitudes.
[0154] The third target location information determination subunit 4205 is used to use the second key longitude and latitude list as the first key longitude and latitude list, and the second preset initial string length corresponding to the first preset initial string length as the first preset initial string length, and determine the target location information according to the GeoHash algorithm, the first preset initial string length and the first key longitude and latitude list, wherein the second preset initial string length is 1 greater than the first preset initial string length.
[0155] Embodiment 4
[0156] Embodiment 4 of the present invention further provides a device for obtaining target location information, which is different from Embodiment 3 in that: Fig.13 As shown, the device for acquiring target location information further includes, in addition to the associated electronic device identification list acquisition module 1 and the initial longitude and latitude list set acquisition module 2:
[0157] The identification acquisition module 10 is used to obtain the first key mobile hotspot identification and the second key mobile hotspot identification list when the number of initial longitude and latitude lists that are not NULL is less than the preset number of lists. The first key mobile hotspot identification is the identity identification of the first key mobile hotspot, and the first key mobile hotspot is the mobile hotspot connected to the first related electronic device at the current time point. The second key mobile hotspot identification list includes several second key mobile hotspot identifications, and the second key mobile hotspot identification is the identity identification of the second key mobile hotspot. The second key mobile hotspot is the mobile hotspot searched for but not connected by the first related electronic device at the current time point. The first related electronic device is other Bluetooth electronic devices that can establish a connection with the target Bluetooth at the current time point and transmit data. The mobile hotspot can be understood as Wi-Fi.
[0158] The first intermediate longitude and latitude list acquisition module 20 is used to acquire the first intermediate longitude and latitude list according to the first key mobile hotspot identifier, wherein the first intermediate longitude and latitude list includes a plurality of first intermediate longitudes and latitudes, wherein the first intermediate longitude and latitude are the longitude and latitude displayed by the GPS in the second related electronic device at the current time point, and the second related electronic device is an electronic device that has been connected to the first key mobile hotspot within a preset time period.
[0159] The second intermediate longitude and latitude list acquisition module 30 is used to acquire the second intermediate longitude and latitude list according to the second key mobile hotspot identifier list, wherein the second intermediate longitude and latitude list includes a plurality of second intermediate longitudes and latitudes, and the second intermediate longitudes and latitudes are the longitudes and latitudes displayed by the GPS in the third related electronic device at the current time point, and the third related electronic device is an electronic device that has been connected to the second key mobile hotspot corresponding to any second key mobile hotspot identifier within a preset time period.
[0160] The target location information acquisition module 40 is used to acquire the target location information according to the GeoHash algorithm, the first preset intermediate character string length, the first intermediate longitude and latitude list and the second intermediate longitude and latitude list.
[0161] Specifically, Fig.14 As shown, the target location information acquisition module 40 also includes:
[0162] The first candidate location information string list acquisition unit 401 is used to obtain the first candidate location information string list corresponding to the first intermediate longitude and latitude list according to the GeoHash algorithm. The first candidate location information string list includes the first candidate location information strings corresponding to all the first intermediate longitudes and latitudes. The first candidate location information string is a string obtained by converting the first intermediate longitude and latitude into a string having a length of the first preset intermediate string length through the GeoHash algorithm.
[0163] The second candidate location information string list acquisition unit 402 is used to obtain the second candidate location information string list corresponding to the second intermediate longitude and latitude list according to the GeoHash algorithm. The second candidate location information string list includes the second candidate location information strings corresponding to all second intermediate longitudes and latitudes. The second candidate location information string is a string obtained by converting the second intermediate longitude and latitude into a string having a length of the first preset intermediate string length through the GeoHash algorithm.
[0164] The target location information acquisition unit 403 is used to acquire the target location information according to the first intermediate processing method when any two first candidate location information strings are different, any two second candidate location information strings are different, and any first candidate location information string is different from any second candidate location information string, and otherwise, acquire the target location information according to the second intermediate processing method.
[0165] Specifically, the target position information acquisition unit 403 also includes a first intermediate processing subunit and a second intermediate processing subunit. The first intermediate processing subunit is used to acquire the target position information according to a first intermediate processing method, and the second intermediate processing subunit is used to acquire the target position information according to a second intermediate processing method.
[0166] Specifically, Fig.15 As shown, the first intermediate processing subunit in the target position information acquisition unit 403 also includes:
[0167] The other candidate position information string acquisition subunit 4031 is used to delete the last character in the first candidate position information string to obtain a third candidate position information string corresponding to the first candidate position information string, and delete the last character in the second candidate position information string to obtain a fourth candidate position information string corresponding to the second candidate position information string.
[0168] The first target location information acquisition subunit 4032 is used to use any third candidate location information string or fourth candidate location information string as the target location information when all third candidate location information strings and all fourth candidate location information strings are the same string; otherwise, deduplicate all third candidate location information strings and all fourth candidate location information strings to obtain a first preferred location information string list, which includes several first preferred location information strings.
[0169] The preferred location information string acquisition subunit 4033 is used to, when the third candidate location information string is the same as the first preferred location information string, use the first candidate location information string corresponding to the third candidate location information string as the second preferred location information string corresponding to the first preferred location information string; and when the fourth candidate location information string is the same as the first preferred location information string, use the second candidate location information string corresponding to the fourth candidate location information string as the third preferred location information string corresponding to the first preferred location information string.
[0170] The first priority acquisition subunit 4034 is used to obtain the first priority corresponding to the first preferred location information string, and the value of the first priority corresponding to the first preferred location information string is the sum of the product of the number of second preferred location information strings corresponding to the first preferred location information string and the first preset weight and the product of the number of third preferred location information strings corresponding to the first preferred location information string and the second preset weight, the first preset weight is a preset weight representing the importance of the first intermediate longitude and latitude, and the second preset weight is a preset weight representing the importance of the second intermediate longitude and latitude.
[0171] Specifically, the first preset weight is greater than the second preset weight.
[0172] The second target location information acquisition subunit 4035 is configured to use the first preferred location information string corresponding to the largest first priority among all first preferred location information strings as the target location information.
[0173] Specifically, Fig.16 As shown, the second intermediate processing subunit in the target position information acquisition unit 403 also includes:
[0174] The first designated location information string acquisition subunit 100 is used to perform deduplication processing on all first candidate location information strings and all second candidate location information strings to acquire a first designated location information string list, which includes a plurality of first designated location information strings.
[0175] Other designated location information string acquisition subunits 200 are used to, when the first candidate location information string is the same as the first designated location information string, use the first candidate location information string as the second designated location information string corresponding to the first designated location information string; and when the second candidate location information string is the same as the first designated location information string, use the second candidate location information string as the third designated location information string corresponding to the first designated location information string.
[0176] The second priority acquisition subunit 300 is used to obtain the second priority corresponding to the first specified location information string, and the value of the second priority corresponding to the first specified location information string is the sum of the product of the number of second specified location information strings corresponding to the first specified location information string and the first preset weight and the product of the number of third specified location information strings corresponding to the first specified location information string and the second preset weight.
[0177] The fourth designated location information string obtaining subunit 400 is configured to take the first designated location information string corresponding to the largest second priority among all the first designated location information strings corresponding to the first designated location information string as the fourth designated location information string.
[0178] The other intermediate longitude and latitude list acquisition subunit 500 is used to, when the first candidate location information string is the same as the fourth designated location information string, use the first intermediate longitude and latitude corresponding to the first candidate location information string as the third intermediate longitude and latitude to obtain a third intermediate longitude and latitude list; when the second candidate location information string is the same as the fourth designated location information string, use the second intermediate longitude and latitude corresponding to the second candidate location information string as the fourth intermediate longitude and latitude to obtain a fourth intermediate longitude and latitude list, the third intermediate longitude and latitude list includes several third intermediate longitudes and latitudes, and the fourth intermediate longitude and latitude list includes several fourth intermediate longitudes and latitudes.
[0179] The third target location information acquisition subunit 600 is used to use the third intermediate longitude and latitude list as the first intermediate longitude and latitude list, the fourth intermediate longitude and latitude list as the second intermediate longitude and latitude list, and the second preset intermediate string length corresponding to the first preset intermediate string length as the first preset intermediate string length, and acquire the target location information according to the GeoHash algorithm, the first preset intermediate string length, the first intermediate longitude and latitude list, and the second intermediate longitude and latitude list, wherein the second preset intermediate string length is 1 greater than the first preset intermediate string length.
[0180] An embodiment of the present invention also provides a non-transitory computer-readable storage medium, which can be set in an electronic device to store a computer program or at least one computer executable instruction related to implementing a method in a method embodiment. The computer program or at least one computer executable instruction is loaded and executed by the processor to implement the method provided in the above embodiment.
[0181] An embodiment of the present invention further provides an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method provided in the above embodiment when executing the computer program.
[0182] An embodiment of the present invention further provides a computer program product, which includes program code. When the program product is run on an electronic device, the program code is used to enable the electronic device to execute the steps of the method according to various exemplary embodiments of the present invention described above in this specification.
[0183] The present invention provides a method, device, equipment and medium for determining target location information, and relates to the technical field of device positioning. The method can obtain a list of associated electronic device identifiers and a set of initial longitude and latitude lists. When the number of initial longitude and latitude lists that are not NULL is not less than the number of preset lists, all initial longitudes and latitudes in all initial longitude and latitude lists that are not NULL are deduplicated to obtain a first key longitude and latitude list. The target location information is determined according to a GeoHash algorithm, a first preset initial character string length and a first key longitude and latitude list. It can be seen that in the present invention, the target location information is determined according to the first key longitude and latitude, and the longitude and latitude will not change due to any influencing factors, and further, determining the target location information according to the first key longitude and latitude will not cause a large error. Therefore, determining the target location information according to the present invention is conducive to improving the accuracy of the determined target location information.
[0184] Although some specific embodiments of the present invention have been described in detail by way of example, it should be understood by those skilled in the art that the above examples are only for illustration, not for limiting the scope of the present invention. It should also be understood by those skilled in the art that various modifications may be made to the embodiments without departing from the scope and spirit of the present invention.
Claims
1. A method for determining target location information, characterized in that: The target location information is a GeoHash string corresponding to the longitude and latitude of the location of the target Bluetooth at the current time point. The method includes the following steps: Acquire an associated electronic device identification list, where the associated electronic device identification list includes a plurality of associated electronic device identifications; Acquire an initial longitude and latitude list set corresponding to the associated electronic device identification list, wherein the initial longitude and latitude list set includes initial longitude and latitude lists corresponding to all associated electronic device identifications; When the number of initial longitude and latitude lists that are not NULL is not less than the preset number of lists, performing deduplication processing on all initial longitude and latitude in all initial longitude and latitude lists that are not NULL to obtain a first key longitude and latitude list, wherein the first key longitude and latitude list includes a plurality of first key longitudes and latitudes; Determining target location information according to the GeoHash algorithm, the first preset initial string length and the first key longitude and latitude list includes the following steps: Obtaining a first key location information string list corresponding to the first key longitude and latitude list according to the GeoHash algorithm, wherein the first key location information string list includes first key location information strings corresponding to all first key longitudes and latitudes, and the first key location information string is a string obtained by converting the first key longitude and latitude into a string having a length of a first preset initial string length according to the GeoHash algorithm; When any two first key position information character strings in the first key position information character string list are not the same, the target position information is determined according to the first initial processing method, otherwise, the target position information is determined according to the second initial processing method; The first initial processing method includes the following steps: Delete the last character in the first key position information string to obtain a second key position information string corresponding to the first key position information string; When the second key location information strings corresponding to all the first key location information strings are the same, determining any one of the second key location information strings as the target location information; otherwise, performing deduplication processing on the second key location information strings corresponding to all the first key location information strings to obtain a third key location information string list, wherein the third key location information string list includes a plurality of third key location information strings; When the second key position information string corresponding to the first key position information string is the same as the third key position information string, using the first key position information string as the fourth key position information string corresponding to the third key position information string; Determine the third key location information string with the largest number of corresponding fourth key location information strings among all the third key location information strings as the target location information; The second initial processing method includes the following steps: Deduplication processing is performed on all first key position information character strings to obtain a first intermediate position information character string list, where the first intermediate position information character string list includes a plurality of first intermediate position information character strings; When the first key position information string is the same as the first intermediate position information string, using the first key position information string as the second intermediate position information string corresponding to the first intermediate position information string; taking the first intermediate position information string with the largest number of corresponding second intermediate position information strings among all the first intermediate position information strings as the third intermediate position information string; When the first key location information string is the same as the third intermediate location information string, taking the first key longitude and latitude corresponding to the first key location information string as the second key longitude and latitude to obtain a second key longitude and latitude list, wherein the second key longitude and latitude list includes a plurality of second key longitudes and latitudes; The second key longitude and latitude list is used as the first key longitude and latitude list, and the second preset initial string length corresponding to the first preset initial string length is used as the first preset initial string length. The target location information is determined according to the GeoHash algorithm, the first preset initial string length and the first key longitude and latitude list.
2. The method for determining target location information according to claim 1, characterized in that: The GeoHash string is a string obtained using the GeoHash algorithm.
3. The method for determining target location information according to claim 2, characterized in that: The associated electronic device identifier is an identity identifier of the associated electronic device, the associated electronic device is an electronic device with an associated Bluetooth, and the associated Bluetooth is other Bluetooths that establish a connection with the target Bluetooth and perform data transmission within a preset time period or are searched by the target Bluetooth.
4. The method for determining target location information according to claim 1, characterized in that: The second preset initial character string length is 1 greater than the first preset initial character string length.
5. A device for determining target location information, characterized in that: The target location information is a GeoHash string corresponding to the longitude and latitude of the location of the target Bluetooth at the current time point, and the device includes: An associated electronic device identification list acquisition module is used to acquire an associated electronic device identification list, where the associated electronic device identification list includes a plurality of associated electronic device identifications; An initial longitude and latitude list set acquisition module is used to acquire an initial longitude and latitude list set corresponding to the associated electronic device identification list, wherein the initial longitude and latitude list set includes initial longitude and latitude lists corresponding to all associated electronic device identifications; A first key longitude and latitude list acquisition module, configured to, when the number of initial longitude and latitude lists that are not NULL is not less than a preset number of lists, perform deduplication processing on all initial longitudes and latitudes in all initial longitude and latitude lists that are not NULL to acquire a first key longitude and latitude list, wherein the first key longitude and latitude list includes a plurality of first key longitudes and latitudes; The target location information determination module is used to determine the target location information according to the GeoHash algorithm, the first preset initial string length and the first key longitude and latitude list, and includes the following steps: Obtaining a first key location information string list corresponding to the first key longitude and latitude list according to the GeoHash algorithm, wherein the first key location information string list includes first key location information strings corresponding to all first key longitudes and latitudes, and the first key location information string is a string obtained by converting the first key longitude and latitude into a string having a length of a first preset initial string length according to the GeoHash algorithm; When any two first key position information character strings in the first key position information character string list are not the same, the target position information is determined according to the first initial processing method, otherwise, the target position information is determined according to the second initial processing method; The first initial processing method includes the following steps: Delete the last character in the first key position information string to obtain a second key position information string corresponding to the first key position information string; When the second key location information strings corresponding to all the first key location information strings are the same, determining any one of the second key location information strings as the target location information; otherwise, performing deduplication processing on the second key location information strings corresponding to all the first key location information strings to obtain a third key location information string list, wherein the third key location information string list includes a plurality of third key location information strings; When the second key position information string corresponding to the first key position information string is the same as the third key position information string, using the first key position information string as the fourth key position information string corresponding to the third key position information string; Determine the third key location information string with the largest number of corresponding fourth key location information strings among all the third key location information strings as the target location information; The second initial processing method includes the following steps: Deduplication processing is performed on all first key position information character strings to obtain a first intermediate position information character string list, where the first intermediate position information character string list includes a plurality of first intermediate position information character strings; When the first key position information string is the same as the first intermediate position information string, using the first key position information string as the second intermediate position information string corresponding to the first intermediate position information string; taking the first intermediate position information string with the largest number of corresponding second intermediate position information strings among all the first intermediate position information strings as the third intermediate position information string; When the first key location information string is the same as the third intermediate location information string, taking the first key longitude and latitude corresponding to the first key location information string as the second key longitude and latitude to obtain a second key longitude and latitude list, wherein the second key longitude and latitude list includes a plurality of second key longitudes and latitudes; The second key longitude and latitude list is used as the first key longitude and latitude list, and the second preset initial string length corresponding to the first preset initial string length is used as the first preset initial string length. The target location information is determined according to the GeoHash algorithm, the first preset initial string length and the first key longitude and latitude list.
6. A non-transitory computer-readable storage medium, characterized in that: The storage medium stores a computer program, which is loaded and executed by a processor to implement the method for determining target location information as described in any one of claims 1 to 4.
7. An electronic device comprising: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method for determining target location information as described in any one of claims 1 to 4 when executing the computer program.
