CN111954300B - Offline positioning method, device, equipment and storage medium - Google Patents

Offline positioning method, device, equipment and storage medium Download PDF

Info

Publication number
CN111954300B
CN111954300B CN202010856449.3A CN202010856449A CN111954300B CN 111954300 B CN111954300 B CN 111954300B CN 202010856449 A CN202010856449 A CN 202010856449A CN 111954300 B CN111954300 B CN 111954300B
Authority
CN
China
Prior art keywords
positioning
record
target
information
wifi
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010856449.3A
Other languages
Chinese (zh)
Other versions
CN111954300A (en
Inventor
常铖
刘畅
袁义龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202010856449.3A priority Critical patent/CN111954300B/en
Publication of CN111954300A publication Critical patent/CN111954300A/en
Application granted granted Critical
Publication of CN111954300B publication Critical patent/CN111954300B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W64/00Locating users or terminals or network equipment for network management purposes, e.g. mobility management

Abstract

The embodiment of the application discloses an offline positioning method, an offline positioning device, offline positioning equipment and a storage medium. Wherein the method comprises the following steps: scanning to obtain target network information, wherein the target network information comprises at least one of target base station information and target WiFi information; searching a historical online positioning record matched with the target network information in a positioning information reference table to serve as a target positioning record; the positioning information reference table comprises a plurality of historical online positioning records, each historical online positioning record comprises network information based on one online positioning and a positioning result of the online positioning, and the network information comprises at least one of base station information and WiFi information; and determining a positioning result included in the target positioning record as an offline positioning result. The method can accurately perform off-line positioning and ensure the accuracy of an off-line positioning result.

Description

Offline positioning method, device, equipment and storage medium
Technical Field
The present application relates to the field of internet technologies, and in particular, to an offline positioning method, apparatus, device, and storage medium.
Background
The offline Positioning refers to determining the current position of the terminal device without connecting to a network and without activating a Positioning function such as a Global Positioning System (GPS). Due to the influences of factors such as unstable network signals and high consumption of flow for online positioning, offline positioning is widely applied to various scenes.
In the related art, offline positioning is mainly achieved in the following manner: the terminal equipment scans and obtains information of surrounding base stations, and then the distance between the terminal equipment and the surrounding base stations is calculated according to the strength of the received base station signals, so that the current position of the terminal equipment is determined. However, the positioning accuracy of such an implementation is generally poor, and the positioning effect of such an implementation is worse especially where base stations are rare.
Disclosure of Invention
The embodiment of the application provides an offline positioning method, an offline positioning device, offline positioning equipment and a storage medium, which can accurately perform offline positioning and ensure the accuracy of an offline positioning result.
In view of the above, a first aspect of the present application provides an offline positioning method, including:
scanning to obtain target network information; the target network information comprises at least one of target base station information and target WiFi information;
searching a historical online positioning record matched with the target network information in a positioning information reference table to serve as a target positioning record; the positioning information reference table comprises a plurality of historical online positioning records, each historical online positioning record comprises network information based on one-time online positioning and a positioning result of the one-time online positioning, and the network information comprises at least one of base station information and WiFi information;
and determining a positioning result included in the target positioning record as an offline positioning result.
A second aspect of the present application provides an offline positioning apparatus, comprising:
the scanning module is used for scanning to obtain target network information; the target network information comprises at least one of target base station information and target WiFi information;
the searching module is used for searching a historical online positioning record matched with the target network information in a positioning information reference table to serve as a target positioning record; the positioning information reference table comprises a plurality of historical online positioning records, each historical online positioning record comprises network information based on one-time online positioning and a positioning result of the one-time online positioning, and the network information comprises at least one of base station information and WiFi information;
and the determining module is used for determining a positioning result included in the target positioning record as an offline positioning result.
A third aspect of the present application provides an offline positioning apparatus, comprising a processor and a memory:
the memory is used for storing a computer program;
the processor is configured to perform the steps of the offline positioning method according to the first aspect as described above according to the computer program.
A fourth aspect of the present application provides a computer-readable storage medium for storing a computer program for performing the steps of the offline positioning method according to the first aspect.
A fifth aspect of the present application provides a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the steps of the offline positioning method according to the first aspect.
According to the technical scheme, the embodiment of the application has the following advantages:
the embodiment of the application provides an offline positioning method, in the method, target network information in the surrounding environment is obtained by scanning, wherein the target network information can comprise at least one of target base station information and target WiFi information; then, searching a historical online positioning record matched with the target network information in a positioning information reference table as a target positioning record, wherein the positioning information reference table usually comprises a plurality of historical online positioning records, each historical online positioning record comprises network information according to one online positioning and a positioning result of the current online positioning, and the network information comprises at least one of base station information and WiFi information; and finally, taking the positioning result included in the searched target positioning record as the positioning result of the offline positioning. In view of the fact that the positioning result generated during online positioning is usually accurate, the method and the device search historical online positioning records matched with the target network information in the positioning information reference table based on the target network information scanned by the terminal device during offline positioning, and further take the positioning result in the historical online positioning record as the positioning result of the offline positioning, so that the accuracy of the offline positioning result is guaranteed by means of the accuracy of the historical online positioning result.
Drawings
Fig. 1 is a schematic view of an application scenario of an offline positioning method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of an offline positioning method according to an embodiment of the present application;
fig. 3 is a schematic overall design diagram of an offline positioning module according to an embodiment of the present application;
fig. 4 is a schematic flowchart of an offline positioning policy according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an offline positioning apparatus according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the drawings described above, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In the related art, when the terminal device performs offline positioning, it is usually required to scan and obtain information of surrounding base stations, and then calculate a distance between itself and the surrounding base stations according to the strength of the received base station signal, so as to determine the current location of itself. The positioning accuracy of the implementation is generally poor, and the positioning effect of the implementation is even worse especially in the places where base stations are rare.
Aiming at the problems in the related art, the embodiment of the application provides an offline positioning method, and the method can improve the accuracy of offline positioning to a certain extent.
Specifically, in the offline positioning method provided in the embodiment of the present application, the terminal device may first scan to obtain target network information in a surrounding environment, where the target network information may include at least one of target base station information and target WiFi information; then, searching a historical online positioning record matched with the target network information in a positioning information reference table as a target positioning record, wherein the positioning information reference table usually comprises a plurality of historical online positioning records, each historical online positioning record comprises network information according to one online positioning and a positioning result of the current online positioning, and the network information comprises at least one of base station information and WiFi information; and finally, taking the positioning result included in the searched target positioning record as the positioning result of the offline positioning.
Because the positioning result generated during online positioning is usually more accurate, the historical online positioning record matched with the target network information is searched in the positioning information reference table based on the target network information scanned by the terminal equipment during offline positioning, and the positioning result in the historical online positioning record is used as the positioning result of the offline positioning, so that the accuracy of the offline positioning result is ensured by means of the accuracy of the historical online positioning result. In addition, since the historical online positioning records included in the positioning information reference table are usually generated in the area where the user frequently moves, when the offline positioning result is determined based on the positioning information reference table, the corresponding historical positioning records can be matched with each other at a high probability, and the practicability of the offline positioning method provided by the embodiment of the application in practical application is ensured.
It should be understood that the offline positioning method provided in the embodiment of the present application may be applied to a terminal device, and the terminal device may specifically be a mobile device such as a smart phone, a tablet computer, and a Personal Digital Assistant (PDA).
In order to facilitate understanding of the offline positioning method provided in the embodiment of the present application, an application scenario to which the offline positioning method is applied is exemplarily described below.
Referring to fig. 1, fig. 1 is a schematic view of an application scenario of an offline positioning method according to an embodiment of the present application. As shown in fig. 1, the application scenario includes the terminal device 110, when the terminal device 110 performs offline positioning, the terminal device 110 may scan and obtain information of surrounding base stations as target base station information, or scan and obtain information of surrounding WiFi as target WiFi information, where the target base station information and the target WiFi information may both be referred to as target network information.
Then, the terminal device 110 may retrieve a local storage location information reference table, where the location information reference table includes a plurality of historical online location records, where the historical online location records correspond to online location operations performed by the terminal device 110 before, specifically, each historical online location record may include network information according to one online location and a location result of the current online location, and the network information according to the online location may specifically include at least one of base station information and WiFi information utilized in the online location. Furthermore, the terminal device 110 may search, in the positioning information reference table, a historical online positioning record matched with the target network information scanned by this offline positioning as a target positioning record; and finally, taking the positioning result included in the target positioning record as the positioning result of the offline positioning.
Therefore, under the condition that the scanned target network information is matched with the network information in a certain historical online positioning record during offline positioning, the positioning result in the historical online positioning record is determined as the positioning result of the offline positioning, and the accuracy of the offline positioning result can be guaranteed by means of the accuracy of the online positioning result.
It should be understood that the application scenario shown in fig. 1 is only an example, and in practical application, the offline positioning method provided in the embodiment of the present application may also be applied to other application scenarios, and the application does not limit any application scenario to which the offline positioning method is applied.
The offline positioning method provided by the present application is described in detail below by way of an embodiment of the method.
Referring to fig. 2, fig. 2 is a schematic flowchart of an offline positioning method provided in an embodiment of the present application, and the following embodiment uses a terminal device as an execution subject. As shown in fig. 2, the offline positioning method includes the following steps:
step 201: scanning to obtain target network information; the target network information includes at least one of target base station information and target WiFi information.
When the terminal equipment is positioned off line, the terminal equipment can automatically scan and obtain the surrounding network information as the target network information. Specifically, the terminal device may automatically scan to obtain surrounding base station information as target base station information, and/or the terminal device may automatically scan to obtain surrounding WiFi information as target WiFi information, where both the target base station information and the target WiFi information may be referred to as target network information.
In some embodiments, the target base station information obtained by scanning by the terminal device may include an identifier (cellid) of the scanned target base station and a code string (cellkey) related to the target base station. The identifier of the target base station can uniquely identify the target base station, and for base stations in different network types (such as a 3G network, a 4G network, and a 5G network), the corresponding identifiers are often represented in different forms. The Code string associated with the target base station is usually formed by splicing character strings such as a Mobile Country Code (MCC), a Mobile Network Code (MNC), and a Location Area Code (LAC), and the Code strings associated with the adjacent base stations are often the same first.
In some embodiments, the target WiFi information obtained by scanning by the terminal device may be represented as a target WiFi list, where the target WiFi list includes an identifier of a target WiFi scanned by the terminal device at this time, and the identifier of the target WiFi may specifically be a MAC (media Access Control address) address of the target WiFi, and different WiFi correspond to different MAC addresses.
It should be understood that, when the WiFi switch of the terminal device is turned on, the terminal device may automatically scan several WiFi around, acquire MAC addresses of the scanned WiFi, and use a WiFi list composed of the MAC addresses of the WiFi as target WiFi information.
Step 202: searching a historical online positioning record matched with the target network information in a positioning information reference table to serve as a target positioning record; the positioning information reference table comprises a plurality of historical online positioning records, each historical online positioning record comprises network information based on one-time online positioning and a positioning result of the one-time online positioning, and the network information comprises at least one of base station information and WiFi information.
After scanning the surrounding target network information when the terminal device performs offline positioning, the terminal device may further call a local storage positioning information reference table, search a historical online positioning record matched with the scanned target network information in the positioning information reference table, and use the historical online positioning record as a target positioning record.
It should be noted that, usually, a plurality of historical online positioning records are stored in the positioning information reference table, and these historical online positioning records correspond to the online positioning operation previously executed by the terminal device, that is, each time the terminal device completes online positioning, a historical online positioning record corresponding to this online positioning may be correspondingly created, and the historical online positioning record may include network information and a positioning result (location) of this online positioning, which are used when this online positioning is performed, and the network information may specifically include at least one of base station information and WiFi information, and after the creation of the historical online positioning record is completed, the created historical online positioning record may be stored in the positioning information reference table.
It should be understood that the base station information in the above historical online positioning record may include an identification (cellid) of a base station according to which online positioning is performed and a code string (cellkey) associated with the base station, where the code string may be formed by concatenating strings such as MCC, MNC, LAC, and the like. The WiFi information in the history online positioning record may be a WiFi list scanned by the terminal device during online positioning, where the WiFi information includes identifiers of WiFi scanned by the terminal device during online positioning, and the identifier of the WiFi may specifically be a MAC address of the WiFi. The positioning result in the history online positioning record can be longitude and latitude, and the longitude and latitude can be converted into a corresponding character string form when the terminal device creates the history online positioning record and stored in the positioning information reference table.
In practical application, the historical online positioning record in the positioning information reference table may include, in addition to the network information and the online positioning result according to the online positioning, an identifier (id) of the historical online positioning record, a positioning accuracy (accuracy) corresponding to the positioning result, and an insertion timestamp (time) of the historical online positioning record, where the identifier of the historical online positioning record can uniquely represent one historical online positioning record, the positioning accuracy corresponding to the positioning result can represent the accuracy of the positioning result, the insertion timestamp of the historical online positioning record is configured when the historical online positioning record is inserted into the positioning information reference table, and the later the historical online positioning record of the positioning information reference table is inserted, the later the corresponding insertion timestamp is located.
Of course, in practical applications, the historical online positioning record may further include other information, and the information included in the historical online positioning record is not limited in any way in this application.
Optionally, before the terminal device stores the created historical online positioning record in the positioning information reference table, it may be determined whether the historical online positioning record is identical to the historical online positioning record stored in the positioning information reference table, and if so, one of the historical online positioning records is selected from the historical online positioning records and the historical online positioning records identical to the historical online positioning record in the positioning information reference table and is stored in the positioning information reference table.
For example, in the case that the historical online positioning record to be stored includes both the base station information and the WiFi information, the terminal device may look up the historical online positioning record that is repeated with the historical online positioning record in the positioning information reference table according to the base station information. Specifically, the terminal device may regard the base station information included in the historical online positioning record to be stored as reference base station information, further search, in the positioning information reference table, whether a historical online positioning record including the reference base station information exists, and if the historical online positioning record exists, select, from the searched historical online positioning record and the historical online positioning record to be stored, a historical online positioning record including the richest WiFi information (i.e., including the most WiFi identifier in the WiFi list), and keep the selected historical online positioning record in the positioning information reference table.
Of course, in practical application, the terminal device may also perform deduplication processing on the historical online positioning record in other manners, and the specific implementation manner of deduplication processing is not limited in this application.
In a possible implementation manner, if the target network information scanned by the terminal device during offline positioning includes target base station information (including an identifier of the target base station and a code string associated with the target base station), and the historical online positioning record in the positioning information reference table includes base station information (including an identifier of the base station based on online positioning and a code string associated with the base station) based on online positioning, the terminal device may search, in the positioning information reference table, a target positioning record matched with the target network information in the following manner:
and searching a historical online positioning record which simultaneously comprises the identification of the target base station and the code string related to the target base station in the positioning information reference table to serve as a first reference positioning record. If the first reference positioning record including both the identifier of the target base station and the code string related to the target base station can be found in the positioning information reference table, the terminal device may determine the target positioning record according to the found first reference positioning record. If the identifier of the target base station and the first reference positioning record of the code string related to the target base station cannot be simultaneously included in the positioning information reference table, the terminal device can further search a historical online positioning record including the code string related to the target base station in the positioning information reference table to serve as a second reference positioning record; if the second reference positioning record including the code string related to the target base station can be found in the positioning information reference table, the terminal device may determine the target positioning record according to the found second reference positioning record.
Specifically, since one base station can be generally and uniquely locked according to the identifier of the base station and the code string related to the base station, in the case that the target base station information scanned by the terminal device includes the identifier of the target base station and the code string related to the target base station, the terminal device may look up, in the positioning information reference table, whether there is a historical online positioning record for performing online positioning based on the target base station, based on the identifier of the target base station and the code string related to the target base station, that is, look up, in the positioning information reference table, whether there is a first reference positioning record including both the identifier of the target base station and the code string related to the target base station. It should be understood that the positioning result included in the first reference positioning record is substantially a positioning result determined when performing online positioning based on the target base station, and the positioning result has a very high reference value for this offline positioning.
If the terminal device finds the first reference positioning record in the positioning information reference table, the terminal device may select a target positioning record from the first reference positioning record. Specifically, if the terminal device finds only one first reference positioning record in the positioning information reference table, the terminal device may directly use the first reference positioning record as the target positioning record; if the terminal device finds multiple first reference positioning records in the positioning information reference table, the terminal device needs to select one first reference positioning record from the multiple first reference positioning records as a target positioning record, and the terminal device can specifically select the target positioning record from the first reference positioning records according to information such as WiFi information and positioning accuracy, and the specific implementation manner of selecting the target positioning record will be described in detail below.
If the terminal device does not find the first reference positioning record in the positioning information reference table, it indicates that the terminal device has not performed online positioning based on the target base station before, and at this time, the terminal device may further find a historical online positioning record including a code string related to the target base station in the positioning information reference table. It should be noted that, in practical applications, the adjacent base stations are usually associated with the same code string, and therefore, if the terminal device does not find the historical online positioning record for performing online positioning based on the target base station in the positioning information reference table, the terminal device may find, based on the code string associated with the target base station, whether or not there is a historical online positioning record for performing online positioning based on the base station adjacent to the target base station in the positioning information reference table, that is, whether or not there is a second reference positioning record including the code string associated with the target base station in the positioning information reference table. It should be understood that the positioning result included in the second reference positioning record is substantially a positioning result determined when performing online positioning based on a base station adjacent to the target base station, and the positioning result also has a certain reference value for this offline positioning.
If the terminal device finds the second reference positioning record in the positioning information reference table, the terminal device may select a target positioning record from the second reference positioning record. Specifically, if the terminal device finds only one second reference positioning record in the positioning information reference table, the terminal device may directly use the second reference positioning record as the target positioning record; if the terminal device finds multiple second reference positioning records in the positioning information reference table, the terminal device needs to select one second reference positioning record from the multiple second reference positioning records as a target positioning record, and the terminal device can specifically select the target positioning record from the second reference positioning records according to information such as WiFi information and positioning accuracy, and the specific implementation manner of selecting the target positioning record will be described in detail below.
As a preferred implementation manner, in a case where the target network information scanned by the terminal device includes target WiFi information (i.e., a target WiFi list), and the historical online positioning records in the positioning information reference list include WiFi information (i.e., a WiFi list), the terminal device may select a target positioning record from the plurality of first reference positioning records (or the plurality of second reference positioning records) according to the target WiFi information and the WiFi information included in the plurality of first reference positioning records (or the WiFi information included in the plurality of second reference positioning records).
The embodiments of the present application provide the following three exemplary implementations of selecting a target positioning record from a plurality of first reference positioning records (or a plurality of second reference positioning records) according to target WiFi information and WiFi information included in the plurality of first reference positioning records (or WiFi information included in the plurality of second reference positioning records). For convenience of description, the following three implementations are described by taking the selection of the target positioning record from the plurality of first reference positioning records as an example, and it should be understood that the implementation of the selection of the target positioning record from the plurality of second reference positioning records is similar to this.
In a first implementation manner, the terminal device may select the target positioning record from the plurality of first reference positioning records based on the contact ratio between the WiFi information. That is, the terminal device may determine, for each first reference positioning record, a contact ratio between WiFi information included in the first reference positioning record and target WiFi information, as a contact ratio corresponding to the first reference positioning record; and then, determining the corresponding first reference positioning record with the highest coincidence degree as the target positioning record.
Specifically, since the target WiFi information and the WiFi information in the first reference positioning record are usually represented as WiFi lists, when the terminal device selects a target positioning record from the plurality of first reference positioning records, for each first reference positioning record, the number of WiFi identifiers that are overlapped in the WiFi list and the target WiFi list included in the first reference positioning record may be determined, and the determined number is used as the overlap ratio corresponding to the first reference positioning record. And finally, selecting the corresponding first reference positioning record with the highest contact ratio as a target positioning record.
In a second implementation manner, in a case that the positioning information reference table further includes online positioning corresponding to the positioning result, the terminal device may select a target positioning record from the plurality of first reference positioning records based on the positioning accuracy. That is, the terminal device may select the first reference positioning record with the highest positioning accuracy from the plurality of first reference positioning records as the target positioning record.
In a third implementation manner, under the condition that the positioning information reference table further includes positioning accuracy corresponding to the positioning result and an insertion timestamp of the historical online positioning record, the terminal device may select the target positioning record from the plurality of first reference positioning records by comprehensively considering the WiFi information, the insertion timestamp and the positioning accuracy. That is, the terminal device may determine, for each first reference positioning record, a contact ratio between WiFi information included in the first reference positioning record and target WiFi information, as a contact ratio corresponding to the first reference positioning record; if the corresponding first reference positioning record with the contact ratio higher than the preset contact ratio threshold exists, the terminal device may select the first reference positioning record with the most posterior insertion timestamp from the corresponding first reference positioning records with the contact ratio higher than the preset contact ratio threshold as the target positioning record; and if the corresponding first reference positioning record with the contact ratio higher than the preset contact ratio threshold value does not exist, selecting the first reference positioning record with the highest positioning precision from the plurality of first reference positioning records as the target positioning record.
Specifically, the terminal device may determine, for each first reference positioning record, the number of WiFi identifiers that are overlapped in the WiFi list in the first reference positioning record and the target WiFi list, as the overlap ratio corresponding to the first reference positioning record. Then, whether a first reference positioning record with the corresponding contact ratio higher than a preset contact ratio threshold exists is judged, illustratively, the preset contact ratio threshold can be set to be 3, and correspondingly, the terminal device needs to judge whether a first reference positioning record with the number of WiFi identifiers in the WiFi list, which are overlapped with the target WiFi list, larger than or equal to 3 exists; if only one first reference positioning record with the contact ratio higher than a preset contact ratio threshold exists, the first reference positioning record can be directly used as a target positioning record; if a plurality of first reference positioning records with the contact ratio higher than a preset contact ratio threshold exist, determining a first reference positioning record with a most backward insertion time stamp included in the first reference positioning records as a target positioning record; on the contrary, if there is no first reference positioning record with the coincidence degree higher than the preset coincidence degree threshold, the terminal device may select, from the plurality of first reference positioning records, the first reference positioning record with the highest positioning accuracy as the target positioning record.
It should be understood that, in practical applications, the terminal device may select the target positioning record from the plurality of first reference positioning records through other implementation manners besides the above three implementation manners, and the implementation manner of selecting the target positioning record from the plurality of first reference positioning records is not limited in this application.
According to the method, the first reference positioning record or the second reference positioning record is determined based on the base station information, the primary search in the large-range positioning information reference table is realized, and then the detailed secondary search is performed in the searched first reference positioning record or the searched second reference positioning record based on the WiFi information, so that the accuracy of the finally searched target positioning record is ensured.
In another possible implementation manner, if the target network information scanned by the terminal device during offline positioning includes target WiFi information (i.e., a target WiFi list), and the historical online positioning record in the positioning information reference table includes WiFi information (i.e., a WiFi list) according to online positioning and positioning accuracy of the positioning result, the terminal device may perform fine-grained lookup in the positioning information reference table directly based on the WiFi information and the positioning accuracy to determine the target positioning record.
Specifically, the terminal device may determine, for each historical online positioning record in the positioning information reference table, a contact ratio between WiFi information included in the historical online positioning record and target WiFi information, as a contact ratio corresponding to the historical online positioning record; that is, for each historical online positioning record in the positioning information reference table, the terminal device may determine the number of WiFi identifiers in the historical online positioning record, which are overlapped in the WiFi list and the target WiFi list, as the degree of overlap corresponding to the historical online positioning record.
And further, selecting a target positioning record from historical online positioning records of which the corresponding contact ratio is higher than a preset contact ratio threshold value and/or the included positioning accuracy is higher than a preset accuracy threshold value. Specifically, the terminal device may determine, in the historical online positioning record whose corresponding contact ratio is higher than the preset contact ratio threshold, the historical online positioning record with the highest positioning accuracy as the target positioning record; or, the terminal device may determine, as the target location record, the historical online location record with the highest corresponding contact ratio among the historical online location records with the accuracy threshold higher than the preset accuracy threshold; or, the terminal device may determine that the corresponding contact ratio is higher than a preset contact ratio threshold, and the included historical online positioning record whose positioning accuracy is higher than the preset accuracy threshold, and if only one historical online positioning record satisfies the condition, may directly determine that the historical online positioning record is the target positioning record, and if the historical online positioning record satisfies the condition includes a plurality of historical online positioning records, under the condition that the insertion timestamp is included in the historical online positioning records, may determine that the historical online positioning record closest to the insertion timestamp is used as the target positioning record.
Of course, in practical applications, the terminal device may also determine the target positioning record based on the WiFi information in other manners, and the implementation manner of determining the target positioning record based on the WiFi information is not limited in this application.
Step 203: and determining a positioning result included in the target positioning record as an offline positioning result.
After the terminal device determines the target positioning record, the positioning result included in the target positioning record can be directly used as the positioning result of the offline positioning, that is, the longitude and latitude included in the target positioning record are used as the positioning result of the offline positioning.
In view of the fact that the positioning result generated during online positioning is usually accurate, the method and the device search historical online positioning records matched with the target network information in the positioning information reference table based on the target network information scanned by the terminal device during offline positioning, and take the positioning result in the historical online positioning record as the positioning result of the offline positioning, so that the accuracy of the offline positioning result is guaranteed by means of the accuracy of the historical online positioning result. In addition, since the historical online positioning records included in the positioning information reference table are usually generated in the area where the user frequently moves, when the offline positioning result is determined based on the positioning information reference table, the corresponding historical positioning records can be matched with each other at a high probability, and the practicability of the offline positioning method provided by the embodiment of the application in practical application is ensured.
In order to further understand the offline positioning method provided in the embodiment of the present application, a general exemplary description of the offline positioning method provided in the embodiment of the present application is provided below.
First, the terminal device needs to construct a local positioning information reference table, which includes several historical online positioning records, and may include 300 historical online positioning records. Before the terminal device stores a certain newly created historical online positioning record into the positioning information reference table, the historical online positioning record can be compared with each historical online positioning record originally stored in the positioning information reference table, if the comparison result shows that the difference between the historical online positioning record and each historical online positioning record originally stored in the positioning information reference table exceeds a preset difference threshold, storing the historical online positioning record into a positioning information reference table, otherwise, if the comparison result shows that the difference between the historical online positioning record and a certain historical online positioning record originally stored in the positioning information reference table does not exceed a preset difference threshold, the terminal device may choose to keep one of the two historical online location records in the location information reference table according to the number of WiFi identifiers in the WiFi list included in the two historical online location records.
It should be noted that each historical online positioning record stored in the positioning information reference table may specifically include the following fields:
the positioning method comprises the steps of identification of historical online positioning records (namely id of the historical online positioning records, a main key), a base station identification cellid (the id of a base station according to online positioning), a code string cellkey (formed by splicing strings such as MCC, MNC and LAC) related to the base station, a WiFi list wifilist (usually converted into json string for storage), positioning result location (longitude and latitude determined during online positioning and usually stored in a string form), positioning accuracy acutacy of the positioning result, and time stamp insertion (a time stamp configured for the historical online positioning records when the historical online positioning records are inserted into a positioning information reference table).
The implementation of the offline positioning method provided in the embodiment of the present application depends on the offline positioning module in the terminal device, and the overall design of the offline positioning module is described below with reference to fig. 3.
As shown in fig. 3, assuming that the positioning information reference table exists in the form of a queue, the capacity of the queue is 300, and the positioning information reference table is characterized in that the positioning information reference table can store 300 historical online positioning records, and each time an adding operation and a deleting operation are performed on the positioning information reference table, the terminal device needs to operate the queue to control the capacity of the positioning information reference table. After the terminal device creates a corresponding historical online positioning record for one online positioning operation, the newly created historical online positioning record can be stored in a cache queue, and the cache queue is connected with an offline positioning management inlet. When the newly created historical online positioning record is inserted into the queue corresponding to the positioning information reference table, whether the new historical online positioning record can be successfully inserted or not can be determined, and it should be understood that when the queue corresponding to the positioning information reference table is full, the new historical online positioning record cannot be successfully inserted, and at this time, the node with the most front timestamp inserted into the queue corresponding to the positioning information reference table needs to be deleted, that is, the historical online positioning record inserted first in the positioning information reference table needs to be deleted.
Optionally, after the offline positioning is completed, the method provided in the embodiment of the present application may further request to obtain a positioning result of the offline positioning, process the positioning result of the offline positioning, and construct a queue for storing the offline positioning record. Specifically, when the queue for storing the offline positioning record is constructed, an operation of inserting the offline positioning record, an operation of deleting the offline positioning record, an operation of obtaining a result of the offline positioning record, and an operation of querying the offline positioning record may be performed on the queue, and these operations are similar to the operations performed on the queue corresponding to the positioning information reference table in the foregoing, and are not described here again. It should be understood that in practical applications, the queue for storing offline positioning records may also provide relevant reference information during offline positioning.
In practical application, a queue corresponding to the positioning information reference table and a queue for storing the offline positioning records both substantially correspond to a database, and accordingly, operations executed on the database in the present application specifically include an insertion operation, a deletion operation, and a query operation.
Next, with reference to the flowchart shown in fig. 4, an exemplary description is given of a retrieval policy in a positioning information reference table during offline positioning according to an embodiment of the present application.
Specifically, when the terminal device performs offline positioning, it may scan and obtain surrounding target base station information (including an identifier of the target base station and a code string related to the target base station) and target WiFi information (including a target WiFi list composed of the scanned WiFi identifiers).
Furthermore, the terminal device may first retrieve a historical online positioning record from the positioning information reference table based on the identifier of the target base station and the code string related to the target base station, further determine whether there is only one historical online positioning record that includes both the identifier of the target base station and the code string related to the target base station, if there is only one historical online positioning record that includes both the identifier of the target base station and the code string related to the target base station, directly use the positioning result in the historical online positioning record as the result of this offline positioning, and if there are more than one historical online positioning records, further retrieve based on the WiFi information and the target WiFi information in the retrieved historical online positioning records.
If no historical online positioning record which simultaneously comprises the identification of the target base station and the code string related to the target base station is searched in the positioning information reference table, only the code string related to the target base station is used for searching in the positioning information reference table, and if no historical online positioning record which comprises the code string related to the target base station is searched in the positioning information reference table, the result that offline positioning cannot be carried out is returned. If historical online positioning records including code strings related to the target base station are searched in the positioning information reference table, whether only one searched historical online positioning record exists is further judged, if only one searched historical online positioning record exists, the positioning result in the historical online positioning record is directly used as the offline positioning result, and if a plurality of historical online positioning records exist, further searching is carried out based on the WiFi information in the searched historical online positioning records and the target WiFi information.
Specifically, when further retrieval is performed based on the WiFi information and the target WiFi information in the retrieved historical online positioning records, the terminal device may determine, for each retrieved historical online positioning record, the number of WiFi identifiers matched in the WiFi list and the target WiFi list included in the historical online positioning record, as the coincidence degree corresponding to the historical online positioning record. Further, it is determined whether there is a historical online positioning record whose corresponding overlap ratio is greater than a preset overlap ratio threshold (for example, may be 3), if so, a historical online positioning record with the highest overlap ratio is selected from the historical online positioning records whose overlap ratio is greater than the preset overlap ratio threshold, a positioning result in the historical online positioning record is used as a result of the offline positioning, and if there are multiple historical online positioning records with the highest overlap ratio, a historical online positioning record with a most-posterior insertion timestamp is searched for from the multiple historical online positioning records, and a positioning result in the historical online positioning record is used as a result of the offline positioning. If the historical online positioning records with the corresponding contact ratio larger than the preset contact ratio threshold value do not exist, the historical online positioning record with the highest positioning accuracy is selected from the retrieved historical online positioning records, the positioning result in the historical online positioning record is used as the result of the offline positioning, if a plurality of historical online positioning records with the highest positioning accuracy exist at the same time, the historical online positioning record with the most back insertion timestamp is searched in the plurality of historical online positioning records, and the positioning result in the historical online positioning record is used as the result of the offline positioning.
For the above-described offline positioning method, the present application also provides a corresponding offline positioning apparatus, so that the offline positioning method is applied and implemented in practice.
Referring to fig. 5, fig. 5 is a schematic structural diagram of an offline positioning apparatus 500 corresponding to the offline positioning method shown in fig. 2, where the offline positioning apparatus 500 includes:
a scanning module 501, configured to scan to obtain target network information; the target network information comprises at least one of target base station information and target WiFi information;
a searching module 502, configured to search, in a positioning information reference table, a historical online positioning record matched with the target network information, as a target positioning record; the positioning information reference table comprises a plurality of historical online positioning records, each historical online positioning record comprises network information based on one-time online positioning and a positioning result of the one-time online positioning, and the network information comprises at least one of base station information and WiFi information;
a determining module 503, configured to determine a positioning result included in the target positioning record as an offline positioning result.
Optionally, the target network information includes target base station information, where the target base station information includes an identifier of a scanned target base station and a code string related to the target base station; the historical online positioning record comprises base station information, and the base station information comprises an identifier of a base station according to online positioning and a code string related to the base station; the code string is formed by splicing a mobile country code MCC, a mobile network number MNC and a location area code LAC; the lookup module 502 includes:
a first searching unit, configured to search, in the positioning information reference table, a historical online positioning record including an identifier of the target base station and a code string related to the target base station, as a first reference positioning record;
a first determining unit, configured to determine the target positioning record according to the first reference positioning record if the first reference positioning record is found in the positioning information reference table;
a second searching unit, configured to search, if the first reference positioning record is not found in the positioning information reference table, a historical online positioning record including a code string related to the target base station in the positioning information reference table, as a second reference positioning record;
a second determining unit, configured to determine the target positioning record according to the second reference positioning record if the second reference positioning record is found in the positioning information reference table.
Optionally, the target network information includes target WiFi information, where the target WiFi information is a target WiFi list, and the target WiFi list includes an identifier of the scanned target WiFi; the historical online positioning record comprises WiFi information, the WiFi information is a WiFi list according to online positioning, and the WiFi list comprises identification of WiFi scanned during online positioning;
the first determination unit includes:
a first determining subunit, configured to determine, when the first reference positioning record includes one piece, that the first reference positioning record is the target positioning record;
a second determining subunit, configured to, when the first reference positioning record includes a plurality of pieces, select the target positioning record from the plurality of pieces of first reference positioning records according to the target WiFi information and WiFi information included in the plurality of pieces of first reference positioning records;
the second determination unit includes:
a third determining subunit, configured to determine, when the second reference positioning record includes one piece, that the second reference positioning record is the target positioning record;
a fourth determining subunit, configured to, when the second reference positioning record includes multiple pieces, select the target positioning record from the multiple pieces of second reference positioning records according to the target WiFi information and WiFi information included in the multiple pieces of second reference positioning records.
Optionally, the second determining subunit is specifically configured to:
for each first reference positioning record, determining the contact ratio between the WiFi information included in the first reference positioning record and the target WiFi information, as the contact ratio corresponding to the first reference positioning record;
and determining the first reference positioning record with the highest contact ratio as the target positioning record.
Optionally, the historical online positioning record further includes a positioning accuracy corresponding to the positioning result; the second determining subunit is specifically configured to:
and selecting the first reference positioning record with the highest positioning precision from the plurality of first reference positioning records as the target positioning record.
Optionally, the historical online positioning record further includes a positioning accuracy and an insertion timestamp corresponding to the positioning result; the second determining subunit is specifically configured to:
for each first reference positioning record, determining the contact ratio between the WiFi information included in the first reference positioning record and the target WiFi information, as the contact ratio corresponding to the first reference positioning record;
if the first reference positioning record with the contact ratio higher than a preset contact ratio threshold exists, selecting the first reference positioning record with the most backward insertion timestamp from the first reference positioning records with the contact ratio higher than the preset contact ratio threshold as the target positioning record;
and if the first reference positioning record with the contact ratio higher than the preset contact ratio threshold value does not exist, selecting the first reference positioning record with the highest positioning precision from the plurality of first reference positioning records as the target positioning record.
Optionally, the target network information includes target WiFi information, where the target WiFi information is a target WiFi list, and the target WiFi list includes an identifier of the scanned target WiFi; the historical online positioning record comprises WiFi information, the WiFi information is a WiFi list according to online positioning, and the WiFi list comprises identification of WiFi scanned during online positioning; the historical online positioning record also comprises positioning accuracy corresponding to the positioning result;
the search module 502 is specifically configured to:
aiming at each historical online positioning record in the positioning information reference table, determining the contact ratio between WiFi information included in the historical online positioning record and the target WiFi information, and taking the contact ratio as the contact ratio corresponding to the historical online positioning record;
selecting the target positioning record from the historical online positioning records meeting the target condition; the target conditions include at least one of: the corresponding contact ratio is higher than a preset contact ratio threshold value, and the included positioning precision is higher than a preset precision threshold value.
In view of the fact that the positioning result generated during online positioning is usually accurate, the method and the device search historical online positioning records matched with the target network information in the positioning information reference table based on the target network information scanned by the terminal device during offline positioning, and take the positioning result in the historical online positioning record as the positioning result of the offline positioning, so that the accuracy of the offline positioning result is guaranteed by means of the accuracy of the historical online positioning result. In addition, since the historical online positioning records included in the positioning information reference table are usually generated in the area where the user frequently moves, when the offline positioning result is determined based on the positioning information reference table, the corresponding historical positioning records can be matched with each other at a high probability, and the practicability of the offline positioning device provided by the embodiment of the application in practical application is ensured.
The embodiment of the present application further provides a terminal device for performing offline positioning, and the terminal device provided in the embodiment of the present application will be introduced from the perspective of hardware materialization.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a terminal device provided in an embodiment of the present application. As shown in fig. 6, for convenience of explanation, only the parts related to the embodiments of the present application are shown, and details of the technology are not disclosed, please refer to the method part of the embodiments of the present application. The terminal can be any terminal equipment including a mobile phone, a tablet computer, a Personal Digital Assistant (Personal Digital Assistant, abbreviated as "PDA"), a Sales terminal (Point of Sales, abbreviated as "POS"), a vehicle-mounted computer, and the like, taking the terminal as a smart phone as an example:
fig. 6 is a block diagram illustrating a partial structure of a smart phone related to a terminal provided in an embodiment of the present application. Referring to fig. 6, the smart phone includes: radio Frequency (RF) circuit 610, memory 620, input unit 630, display unit 640, sensor 650, audio circuit 660, wireless fidelity (WiFi) module 670, processor 680, and power supply 690. Those skilled in the art will appreciate that the smartphone configuration shown in fig. 6 is not limiting and may include more or fewer components than shown, or some components in combination, or a different arrangement of components.
The memory 620 may be used to store software programs and modules, and the processor 680 may execute various functional applications and data processing of the smart phone by operating the software programs and modules stored in the memory 620. The memory 620 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the smartphone, and the like. Further, the memory 620 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 680 is a control center of the smart phone, connects various parts of the entire smart phone using various interfaces and lines, and performs various functions of the smart phone and processes data by operating or executing software programs and/or modules stored in the memory 620 and calling data stored in the memory 620, thereby integrally monitoring the smart phone. Optionally, processor 680 may include one or more processing units; preferably, the processor 680 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 680.
In the embodiment of the present application, the processor 680 included in the terminal further has the following functions:
scanning to obtain target network information; the target network information comprises at least one of target base station information and target WiFi information;
searching a historical online positioning record matched with the target network information in a positioning information reference table to serve as a target positioning record; the positioning information reference table comprises a plurality of historical online positioning records, each historical online positioning record comprises network information based on one-time online positioning and a positioning result of the one-time online positioning, and the network information comprises at least one of base station information and WiFi information;
and determining a positioning result included in the target positioning record as an offline positioning result.
Optionally, the processor 680 is further configured to execute the steps of any implementation manner of the offline positioning method provided in the embodiment of the present application.
The embodiment of the present application further provides a computer-readable storage medium for storing a computer program, where the computer program is used to execute any implementation manner of the offline positioning method described in the foregoing embodiments.
Embodiments of the present application also provide a computer program product or a computer program comprising computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and executes the computer instructions, so that the computer device executes any one of the offline positioning methods described in the foregoing embodiments.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing computer programs.
It should be understood that in the present application, "at least one" means one or more, "a plurality" means two or more. "and/or" for describing an association relationship of associated objects, indicating that there may be three relationships, e.g., "a and/or B" may indicate: only A, only B and both A and B are present, wherein A and B may be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of single item(s) or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, c may be single or plural.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (10)

1. An offline positioning method, the method comprising:
scanning to obtain target network information; the target network information comprises at least one of target base station information and target WiFi information;
searching a historical online positioning record matched with the target network information in a positioning information reference table to serve as a target positioning record; the positioning information reference table comprises a plurality of historical online positioning records, the historical online positioning records correspond to online positioning operations executed by the terminal equipment before, each historical online positioning record comprises network information according to one-time online positioning and a positioning result of the current online positioning, and the network information comprises at least one of base station information and WiFi information;
determining a positioning result included in the target positioning record as an offline positioning result;
the storage mode of the historical online positioning record in the positioning information reference table comprises the following steps:
acquiring a newly created historical online positioning record;
if the difference degree between the newly created historical online positioning record and each historical online positioning record originally stored in the positioning information reference table exceeds a preset difference degree threshold value, storing the newly created historical online positioning record into the positioning information reference table;
and if the difference between the newly created historical online positioning record and a certain historical online positioning record originally stored in the positioning information reference table does not exceed the preset difference threshold, keeping the historical online positioning record with the largest number of WiFi identifications in the WiFi list in the positioning information reference table according to the number of the WiFi identifications in the WiFi list in the two historical online positioning records.
2. The method of claim 1, wherein the target network information comprises target base station information, and wherein the target base station information comprises an identifier of a scanned target base station and a code string associated with the target base station; the historical online positioning record comprises base station information, and the base station information comprises an identifier of a base station according to online positioning and a code string related to the base station; the code string is formed by splicing a mobile country code MCC, a mobile network number MNC and a location area code LAC;
then, the searching for the historical online positioning record matched with the target network information in the positioning information reference table as the target positioning record includes:
searching a historical online positioning record comprising the identification of the target base station and a code string related to the target base station in the positioning information reference table to serve as a first reference positioning record;
if the first reference positioning record is found in the positioning information reference table, determining the target positioning record according to the first reference positioning record;
if the first reference positioning record is not found in the positioning information reference table, finding a historical online positioning record comprising a code string related to the target base station in the positioning information reference table as a second reference positioning record; and if the second reference positioning record is found in the positioning information reference table, determining the target positioning record according to the second reference positioning record.
3. The method of claim 2, wherein the target network information comprises target WiFi information, and the target WiFi information is a target WiFi list, and the target WiFi list comprises an identifier of the scanned target WiFi; the historical online positioning record comprises WiFi information, the WiFi information is a WiFi list according to online positioning, and the WiFi list comprises identification of WiFi scanned during online positioning;
then said determining said target location record from said first reference location record comprises:
when the first reference positioning record comprises one piece, determining the first reference positioning record as the target positioning record;
when the first reference positioning record comprises a plurality of pieces, selecting the target positioning record from the plurality of first reference positioning records according to the target WiFi information and the WiFi information contained in the plurality of first reference positioning records;
then said determining said target location record from said second reference location record comprises:
determining the second reference positioning record as the target positioning record when the second reference positioning record comprises one;
and when the second reference positioning record comprises a plurality of pieces, selecting the target positioning record from the plurality of pieces of second reference positioning record according to the target WiFi information and the WiFi information contained in the plurality of pieces of second reference positioning record.
4. The method of claim 3, wherein selecting the target positioning record from the plurality of first reference positioning records according to the target WiFi information and WiFi information included in the plurality of first reference positioning records comprises:
for each first reference positioning record, determining the contact ratio between the WiFi information included in the first reference positioning record and the target WiFi information, as the contact ratio corresponding to the first reference positioning record;
and determining the first reference positioning record with the highest contact ratio as the target positioning record.
5. The method according to claim 3, wherein the historical online positioning record further comprises a positioning accuracy corresponding to the positioning result;
selecting the target positioning record from the plurality of first reference positioning records according to the target WiFi information and WiFi information included in the plurality of first reference positioning records, including:
and selecting the first reference positioning record with the highest positioning precision from the plurality of first reference positioning records as the target positioning record.
6. The method according to claim 3, wherein the historical online positioning record further comprises a positioning accuracy and an insertion time stamp corresponding to the positioning result;
selecting the target positioning record from the plurality of first reference positioning records according to the target WiFi information and WiFi information included in the plurality of first reference positioning records, including:
for each first reference positioning record, determining the contact ratio between the WiFi information included in the first reference positioning record and the target WiFi information, as the contact ratio corresponding to the first reference positioning record;
if the first reference positioning record with the contact ratio higher than a preset contact ratio threshold exists, selecting the first reference positioning record with the most backward insertion timestamp from the first reference positioning records with the contact ratio higher than the preset contact ratio threshold as the target positioning record;
and if the first reference positioning record with the contact ratio higher than the preset contact ratio threshold value does not exist, selecting the first reference positioning record with the highest positioning precision from the plurality of first reference positioning records as the target positioning record.
7. The method of claim 1, wherein the target network information comprises target WiFi information, and the target WiFi information is a target WiFi list, and the target WiFi list comprises an identifier of a scanned target WiFi; the historical online positioning record comprises WiFi information, the WiFi information is a WiFi list according to online positioning, and the WiFi list comprises identification of WiFi scanned during online positioning; the historical online positioning record also comprises positioning accuracy corresponding to the positioning result;
then, the searching for the historical online positioning record matched with the target network information in the positioning information reference table as the target positioning record includes:
aiming at each historical online positioning record in the positioning information reference table, determining the contact ratio between WiFi information included in the historical online positioning record and the target WiFi information, and taking the contact ratio as the contact ratio corresponding to the historical online positioning record;
selecting the target positioning record from the historical online positioning records meeting the target condition; the target conditions include at least one of: the corresponding contact ratio is higher than a preset contact ratio threshold value, and the included positioning precision is higher than a preset precision threshold value.
8. An offline positioning apparatus, the apparatus comprising:
the scanning module is used for scanning to obtain target network information; the target network information comprises at least one of target base station information and target WiFi information;
the searching module is used for searching a historical online positioning record matched with the target network information in a positioning information reference table to serve as a target positioning record; the positioning information reference table comprises a plurality of historical online positioning records, the historical online positioning records correspond to online positioning operations executed by the terminal equipment before, each historical online positioning record comprises network information according to one-time online positioning and a positioning result of the current online positioning, and the network information comprises at least one of base station information and WiFi information;
the determining module is used for determining a positioning result included in the target positioning record as an offline positioning result;
the storage mode of the historical online positioning record in the positioning information reference table comprises the following steps:
acquiring a newly created historical online positioning record;
if the difference degree between the newly created historical online positioning record and each historical online positioning record originally stored in the positioning information reference table exceeds a preset difference degree threshold value, storing the newly created historical online positioning record into the positioning information reference table;
and if the difference between the newly created historical online positioning record and a certain historical online positioning record originally stored in the positioning information reference table does not exceed the preset difference threshold, keeping the historical online positioning record with the largest number of WiFi identifications in the WiFi list in the positioning information reference table according to the number of the WiFi identifications in the WiFi list in the two historical online positioning records.
9. An offline positioning apparatus, comprising a processor and a memory;
the memory is used for storing a computer program;
the processor is configured to perform the offline positioning method of any of claims 1 to 7 according to the computer program.
10. A computer-readable storage medium for storing a computer program for performing the offline positioning method of any one of claims 1 to 7.
CN202010856449.3A 2020-08-24 2020-08-24 Offline positioning method, device, equipment and storage medium Active CN111954300B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010856449.3A CN111954300B (en) 2020-08-24 2020-08-24 Offline positioning method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010856449.3A CN111954300B (en) 2020-08-24 2020-08-24 Offline positioning method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111954300A CN111954300A (en) 2020-11-17
CN111954300B true CN111954300B (en) 2022-03-25

Family

ID=73360056

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010856449.3A Active CN111954300B (en) 2020-08-24 2020-08-24 Offline positioning method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111954300B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113407569A (en) * 2021-06-29 2021-09-17 北京小米移动软件有限公司 Information processing method, device and storage medium
CN113676833A (en) * 2021-07-21 2021-11-19 北京三快在线科技有限公司 Positioning method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014000090A1 (en) * 2012-06-26 2014-01-03 The Governing Council Of The University Of Toronto System, method and computer program for dynamic generation of a radio map
CN103792559A (en) * 2012-10-31 2014-05-14 纬创资通股份有限公司 Portable device and positioning method applied to same
CN107682926A (en) * 2017-10-12 2018-02-09 珠海市魅族科技有限公司 Offline localization method and offline positioner
CN107889062A (en) * 2017-11-24 2018-04-06 北京小米移动软件有限公司 The data learning method and device positioned offline
CN110166943A (en) * 2018-02-02 2019-08-23 腾讯科技(深圳)有限公司 The processing method of terminal positional information

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9084217B2 (en) * 2012-01-03 2015-07-14 Wavion Ltd. Single-site localization via multipath fingerprinting

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014000090A1 (en) * 2012-06-26 2014-01-03 The Governing Council Of The University Of Toronto System, method and computer program for dynamic generation of a radio map
CN103792559A (en) * 2012-10-31 2014-05-14 纬创资通股份有限公司 Portable device and positioning method applied to same
CN107682926A (en) * 2017-10-12 2018-02-09 珠海市魅族科技有限公司 Offline localization method and offline positioner
CN107889062A (en) * 2017-11-24 2018-04-06 北京小米移动软件有限公司 The data learning method and device positioned offline
CN110166943A (en) * 2018-02-02 2019-08-23 腾讯科技(深圳)有限公司 The processing method of terminal positional information

Also Published As

Publication number Publication date
CN111954300A (en) 2020-11-17

Similar Documents

Publication Publication Date Title
CN107682466B (en) Method and device for searching regional information of IP address
CN109271391B (en) Data storage method, server, storage medium and device
CN111954300B (en) Offline positioning method, device, equipment and storage medium
US10873900B2 (en) Method for wireless fidelity connection and related products
CN105243060A (en) Picture retrieval method and apparatus
US8850341B2 (en) Making address book a source of latitude and longitude coordinates
CN104869615A (en) Network access method and mobile communication terminal
CN105224609A (en) Index query method and device
WO2021129446A1 (en) Network searching method and device, and storage medium
CN104867097A (en) Method and device for generating watermark picture
EP2773151A1 (en) Cellular Tower Disambiguation For Use In GeoLocation Of Mobile Devices
WO2018010693A1 (en) Method and apparatus for identifying information from rogue base station
US20220103506A1 (en) Message reminding method, apparatus, control device and storage medium
US20150195775A1 (en) Wlan radiomap with access points uniquely identified by combination of bssid and mcc
US9954966B2 (en) Method and apparatus for disaster notification
CN112261570B (en) Method, device, server and storage medium for associating interest point with wireless network
US10015727B2 (en) Automatic detection of a network operator for a mobile network device
CN108173973B (en) Public article positioning method and system
CN104284323B (en) A kind of setting method of terminal time
CN111355653B (en) Instant messaging relationship establishing method and device, storage medium and electronic equipment
CN111615174B (en) Method for identifying wireless network, terminal device and computer readable storage medium
CN114222284A (en) Terminal equipment identification method and device and readable storage medium
KR100776824B1 (en) Method for searching nearest-neighbor in wireless broadcast environment, recording medium thereof, apparatus for searching nearest-neighbor in wireless broadcast environment and system thereof
CN112052299B (en) Method, device, equipment and medium for updating interest points
CN105589903A (en) Street lamp location information collection, storage and query method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant