Position information acquisition method and related device

By combining GNSS, honeycomb networks and WIFI positioning technology, and the fusion of HDOP value, the existing positioning method of the existing positioning method in indoor and outdoor accuracy is solved, and higher accuracy of location information acquisition is achieved.

CN119383548APending Publication Date: 2025-01-28SHANGHAI GLORY SMART TECH DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411442887.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-15
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

The existing positioning methods have insufficient accuracy in position information obtained indoors and outdoors, making it difficult to achieve accurate positioning.

Method used

By combining GNSS, honeycomb network and WiFi positioning technology, obtain a variety of location information, and fuse through the HDOP value to improve the accuracy of location information.

Benefits of technology

The indoor and outdoor can be accurate, which improves the accuracy of the terminal location information, and makes up for the shortcomings of insufficient accuracy of single -position methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119383548A_ABST
    Figure CN119383548A_ABST
Patent Text Reader

Abstract

The invention provides a position information acquisition method and a related device, an electronic device acquires a positioning result, and the positioning result comprises position information and a horizontal precision factor HDOP value corresponding to the position information. The position information comprises position information obtained through GNSS positioning, position information obtained through cellular network positioning, position information obtained through wireless fidelity WiFi positioning, an HDOP value corresponding to the position information obtained through WiFi positioning, and position information obtained based on WiFi position information, position information of a reference access point and the distance from the electronic equipment to the reference access point; the reference access point is an access point participating in WiFi positioning, the position information is fused based on the HDOP value, the position information of the terminal is acquired, the smaller the HDOP value is, the higher the contribution degree of the position information acquired by the corresponding positioning mode to the position information of the terminal is, and the improvement of the precision of the position information of the terminal is facilitated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a method for obtaining location information and a related device. Background Art

[0002] The terminal positioning service refers to the function of obtaining the location information of the electronic device through a specific positioning technology. Various positioning technologies have certain limitations. For example, the accuracy of the location information obtained by the positioning technology based on the Global Navigation Satellite System (GNSS) is significantly reduced indoors, and the accuracy of the location information obtained by the positioning technology based on the Received Signal Strength Indication (RSSI) is significantly reduced outdoors.

[0003] Therefore, the accuracy of location information obtained by current positioning methods needs to be improved. Summary of the invention

[0004] The present application provides a method and a related device for obtaining location information to improve the accuracy of location information. The disclosed technical solution is as follows:

[0005] The first aspect of the present application provides a method for obtaining location information, which is applied to an electronic device, the method comprising: obtaining a positioning result, the positioning result comprising first location information and a horizontal precision factor HDOP value corresponding to the first location information, the first location information comprising: location information obtained by GNSS positioning (i.e., GNSS location information), location information obtained by cellular network positioning (i.e., cellular network location information), and location information obtained by wireless fidelity WiFi positioning (i.e., WiFi location information), wherein the HDOP value corresponding to the location information obtained by WiFi positioning is obtained based on the location information obtained by WiFi positioning, the location information of a reference access point, and the distance from the electronic device to the reference access point, the reference access point being an access point participating in WiFi positioning, and the first location information is fused based on the HDOP value to obtain the second location information of the terminal, wherein the first location information with a smaller corresponding HDOP value has a greater contribution to the second location information of the electronic device. Here, an innovative method for calculating the HDOP value corresponding to the WiFi location information is provided, laying a foundation for the fusion of the location information (i.e., the first location information) obtained by the three positioning methods. Compared with the location information obtained by a single positioning method, the location information obtained by integrating the three positioning methods has higher accuracy. And because GNSS positioning has higher accuracy outdoors and wireless fidelity WiFi positioning has higher accuracy indoors, the integration of the location information obtained by the three methods can also achieve the effect of accurate positioning both indoors and outdoors. Furthermore, because the HDOP value can more objectively reflect the accuracy of the location information, the smaller the HDOP value, the greater the contribution of the location information obtained by the corresponding positioning method to the terminal's location information, which is conducive to further improving the accuracy of the terminal's location information.

[0006] In some implementations, the HDOP value corresponding to the location information obtained through WiFi positioning is obtained based on the location information obtained through WiFi positioning, the location information of the reference access point, and the distance from the electronic device to the reference access point, including: obtaining the HDOP value corresponding to the location information obtained through WiFi positioning by calculating the diagonal elements of a pseudo-inverse matrix, the pseudo-inverse matrix is ​​obtained by operating a geometric matrix, the elements of any row in the geometric matrix include: a ratio of a position difference to a distance, the position difference is the difference between the WiFi location coordinates obtained through WiFi positioning and the location coordinates of the first access point, the distance is the distance from the WiFi location coordinates to the first access point, and the first access point is any one of the reference access points.

[0007] In some implementations, the process of obtaining WiFi location coordinates includes: obtaining scanning data by scanning the WiFi signal of the reference access point, the scanning data includes BSSID and measurement data, the measurement data is data obtained by the electronic device measuring the WiFi signal, wherein the distance is obtained by converting the measurement data, and the WiFi location coordinates are obtained based on the scanning data and the WiFi fingerprint library. The distance is obtained by converting the measurement data, so it is possible to lay a foundation for obtaining the HDOP value corresponding to the location information obtained by WiFi positioning by scanning the WiFi signal. Because scanning the WiFi signal is also a necessary step to obtain the WiFi location coordinates, it is conducive to simplifying the algorithm process.

[0008] In some implementations, the measurement data includes: a received signal strength indication RSSI.

[0009] In some implementations, the measurement data further includes at least one of: mode, standard deviation, and channel distribution. The more parameters included in the measurement data, the more detailed the fingerprint is, and thus the accuracy of the location information obtained through WiFi positioning is higher.

[0010] In some implementations, the location information obtained through cellular network positioning represents a location point, and the location information obtained through WiFi positioning represents a location point. In this case, based on the HDOP value, the first location information is fused to obtain the second location information of the electronic device, including: based on the HDOP value corresponding to the first location information, the weight of the first location information is obtained, and based on the weight, the first location information is fused (such as weighted sum) to obtain the second location information of the electronic device. The weight obtained based on the HDOP values ​​corresponding to various first location information can fully and objectively reflect the contribution of various first location information to the final result based on accuracy, which is conducive to improving the accuracy of the final result (i.e., the second location information).

[0011] In some implementations, the location information obtained through cellular network positioning includes multiple cellular network location information, each cellular network location information represents a location point, and each cellular network location information corresponds to an HDOP value. The location information obtained through WiFi positioning includes multiple WiFi location information, each WiFi location information represents a location point, and each WiFi location information corresponds to an HDOP value. In this case, based on the HDOP value, the first location information is fused to obtain the second location information of the electronic device, including: based on the HDOP values ​​corresponding to the multiple cellular network location information, selecting the cellular network location information to be fused from the multiple cellular network location information, based on the HDOP values ​​corresponding to the multiple WiFi location information, selecting the WiFi location information to be fused from the multiple WiFi location information, and fitting the location information to be fused to obtain the second location information of the electronic device, the location information to be fused includes: the location information obtained through GNSS positioning, the cellular network location information to be fused, and the WiFi location information to be fused. First, based on the HDOP value, the WiFi location information to be fused and the cellular network location information to be fused are selected respectively, and then the location information obtained through GNSS positioning, the cellular network location information to be fused, and the WiFi location information to be fused are fitted to obtain the location information of the terminal, which is conducive to improving the accuracy of the location information of the terminal.

[0012] In some implementations, the process of cellular network positioning includes: obtaining candidate cellular network positioning results using each base station combination as a reference base station, the candidate cellular network positioning results including candidate cellular network location information and a corresponding HDOP value, and based on the size relationship of the HDOP values ​​corresponding to the candidate cellular network location information, selecting the cellular network location information from the candidate cellular network positioning results, and the process of WiFi positioning includes: obtaining candidate WiFi positioning results using each WiFi combination as a reference WiFi, the candidate WiFi positioning results including candidate WiFi location information and a corresponding HDOP value, and based on the size relationship of the HDOP values ​​corresponding to the candidate WiFi location information, selecting the cellular network location information from the candidate cellular network location information.

[0013] In some implementations, the process of obtaining candidate cellular network location information using the first base station combination as a reference base station includes: measuring pre-configured parameters for cells under the first base station combination to obtain parameter measurement results, the parameters including: synchronization difference, comparing the measurement results with fingerprints in a pre-configured cellular network fingerprint library to obtain candidate cellular network location information. Using the synchronization difference as one of the parameters in the fingerprint is conducive to improving the accuracy of the result based on fingerprint positioning.

[0014] In some implementations, the parameter further includes: at least one of a reference signal received power RSRP and a cell global identifier CGI.

[0015] The second aspect of the present application provides an electronic device, which includes: one or more processors, a memory and a touch screen, the memory is used to store program code, and the processor is used to run the program code, so that the electronic device implements the method for obtaining location information provided by the first aspect of the present application.

[0016] The third aspect of the present application provides a computer-readable storage medium having instructions stored thereon. When the instructions are executed on an electronic device, the electronic device executes the method for obtaining location information provided by the first aspect of the present application.

[0017] The fourth aspect of the present application provides a computer program product having codes stored thereon. When the computer program product is executed on an electronic device, the electronic device implements the method for obtaining location information provided in the first aspect of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0019] Figure 1 is a structural example diagram of an electronic device provided in an embodiment of the present application;

[0020] Figure 2 is a flow chart of a method for obtaining location information provided by an embodiment of the present application;

[0021] Figure 3 This is a cellular network-based positioning flow chart provided in an embodiment of the present application;

[0022] Figure 4 It is a flow chart of the process of building a WiFi fingerprint library provided in an embodiment of the present application;

[0023] Figure 5 is an example diagram of the correspondence between fences and AP data provided in an embodiment of the present application;

[0024] Figure 6 This is a flowchart of obtaining WiFi positioning results based on the WiFi positioning method provided in an embodiment of the present application;

[0025] Figure 7 This is an example diagram of a scenario for applying location information provided in an embodiment of the present application. DETAILED DESCRIPTION

[0026] The terms "first", "second", "third", etc. in the specification, claims and drawings of this application are used to distinguish different objects rather than to limit a specific order.

[0027] In the embodiments of the present application, words such as "in some implementations" or "for example" are used to indicate examples, illustrations or descriptions and should not be interpreted as being more preferred or more advantageous than other embodiments or designs.

[0028] The location information of an electronic device is used to characterize the location of the electronic device. The location is the actual physical location of the electronic device. An example of location information is longitude and latitude. Location information is used in a variety of scenarios. An example of a scenario where location information is used is: a weather application (APP) on a mobile phone responds to a user's trigger and displays weather information for the current location and time. In this case, the weather application needs to first obtain the current location of the mobile phone. Usually, the weather application calls the location acquisition module to obtain the location information of the mobile phone, and then obtains weather information based on the location information.

[0029] The location acquisition module is a module in the mobile phone used for positioning to obtain location information. Common positioning methods include: GNSS-based positioning and Received Signal Strength Indication (RSSI)-based positioning, but GNSS-based positioning has insufficient positioning accuracy indoors, while RSSI-based positioning has insufficient positioning accuracy outdoors.

[0030] Insufficient positioning accuracy will further lead to inaccurate service information provided by applications that rely on location information. For example, the weather information provided by a weather application is not the weather information for the location, which further reduces the user experience.

[0031] In order to solve the problem of inaccurate location information obtained by current positioning methods, an embodiment of the present application provides a method for obtaining location information, which performs joint positioning based on GNSS, cellular network and wireless fidelity (WiFi) to obtain location information with higher accuracy.

[0032] The embodiments of the present application are applied in electronic devices, and the electronic devices include but are not limited to: the electronic devices can be mobile phones, tablet computers, desktops, laptops, notebook computers, ultra-mobile personal computers (Ultra-mobile Personal Computer, UMPC), handheld computers, netbooks, personal digital assistants (Personal Digital Assistant, PDA), wearable electronic devices, smart watches and other devices.

[0033] Take mobile phones as an example of electronic devices. Figure 1 The figure shows a partial structure of a mobile phone 100 related to an embodiment of the present application, including: a processor 110, an internal memory 120, a camera 130, a display screen 140, a mobile communication module 150, a wireless communication module 160, an audio module 170, and a positioning module 180. Those skilled in the art can understand that Figure 1 The hardware structure shown in the figure does not constitute a limitation on the mobile phone. The mobile phone 100 may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0034] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc.

[0035] The internal memory 120 can be used to store computer executable program codes, and the executable program codes include instructions. The processor 110 executes various functional applications and data processing of the mobile phone 100 by running the instructions stored in the internal memory 120. The internal memory 120 may include a program storage area and a data storage area. In some implementations, the internal memory 120 stores instructions for obtaining location information, and the processor 110 can achieve the purpose of obtaining the location information of the location of the mobile phone 100 by executing the instructions stored in the internal memory 120.

[0036] The electronic device implements the display function through the GPU, the display screen 140, and the application processor.

[0037] The display screen 140 is used to display images, video interfaces, etc.

[0038] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0039] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to mobile phone 100. Mobile communication module 150 can receive electromagnetic waves from antenna 1, filter, amplify and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. Mobile communication module 110 can also amplify the signal modulated by the modulation and demodulation processor and convert it into electromagnetic waves for radiation through antenna 1.

[0040] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the mobile phone 100. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signal and filters it, and sends the processed signal to the processor 110. The wireless communication module 150 can also receive the signal to be sent from the processor 110, modulate the frequency, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0041] The audio module 170 is used to convert digital audio information into analog audio signal output, and also used to convert analog audio input into digital audio signal. The audio module 170 can also be used to encode and decode audio signals.

[0042] The positioning module 180 is used to provide a positioning function for the mobile phone 100. The positioning module 180 may include various receivers of signals used for positioning, such as a receiver of GNSS signals for receiving GNSS positioning signals sent by satellites. In addition, the positioning module 180 can also trigger the AP to run the method for obtaining location information provided in the embodiment of the present application, and receive and store the location information sent by the processor. The GNSS signal required for the AP to run the method for obtaining location information can be obtained from the positioning module 180, the required measurement signal for the cellular network can be obtained from the modem, and the required WiFi signal can be obtained from the wireless communication module 160.

[0043] in addition, Figure 1In the electronic device shown, the operating system implemented by the processor 110 by running program code may be an iOS operating system, an Android open source operating system, a Windows operating system, or the like.

[0044] Taking the Android open source operating system as an example, it includes a layered architecture, and each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the layered architecture can be divided into five layers, from top to bottom, namely, the application (APP) layer, the application framework layer (abbreviated as FWK), the system library, the hardware abstraction layer (HAL), and the kernel layer.

[0045] In some embodiments of the present application, a positioning module for acquiring location information may run in an application framework layer or a system library, and may communicate with some applications in an application layer to provide location information for the applications.

[0046] Figure 2 A method for obtaining location information provided in an embodiment of the present application includes the following steps:

[0047] S11. Obtain GNSS position information and a corresponding horizontal dilution of precision (HDOP) value through GNSS positioning.

[0048] GNSS positioning is a satellite-based positioning method. Through the GNSS signal receiver, the GNSS positioning signal sent by the satellite can be obtained. The positioning signal can be directly stored as the GNSS positioning result, or it can be stored as the GNSS positioning result after processing.

[0049] The GNSS positioning result includes the location information and the corresponding HDOP value. In order to distinguish it from the location information obtained by other positioning methods, the location information obtained based on GNSS is called GNSS location information. GNSS location information includes longitude information and latitude information. The HDOP value corresponding to the GNSS location information is used to characterize the accuracy of the GNSS location information. The smaller the HDOP value, the higher the accuracy of the GNSS location information. Usually, the HDOP value corresponding to the GNSS location information is provided by the satellite used for positioning.

[0050] S12. Obtain cellular network location information and a corresponding HDOP value through cellular network-based positioning.

[0051] Cellular network positioning refers to the method of obtaining location information based on the measurement results of the signals of wireless access devices (such as base stations) in the cellular network. Figure 4 The positioning method based on the cellular network is described in detail.

[0052] S13. Obtain WiFi location information and corresponding HDOP value through WiFi-based positioning.

[0053] This embodiment innovatively calculates the HDOP value based on WiFi location information, laying a foundation for the integration of location information obtained by multiple positioning methods.

[0054] The specific implementation of S13 will be combined with Figure 5 Provide detailed explanation.

[0055] S14. Obtaining weights of the position information obtained in various ways based on the HDOP values ​​of the position information obtained in various ways.

[0056] In some implementations, any weight is calculated as follows: Wherein, j is the total number of positioning results obtained in various ways. When the various ways include the above three positioning ways, j=3, and i represents the i-th one in the total number.

[0057] S15. Based on the weight, the location information obtained in various ways is integrated to obtain the location information of the terminal.

[0058] In some implementations, a weighted sum of the position information obtained in various ways is calculated to obtain the position information.

[0059] The GNSS position information is recorded as (x GNSS ,y GNSS ), the weight is denoted by ω GNSS , the cellular network location information is recorded as (x BaseStation ,y BaseStation ), the weight is denoted by ω BaseStation , record the WiFi location information as (x WiFi ,y WiFi ), the weight is denoted by ω WiFi , in some implementations, the location information is:

[0060] x final =ω GNSS × GNSS +ω BaseStation × BaseStation +ω WiFi × WiFi ,

[0061] y final =ω GNSS ×y GNSS +ω BaseStation ×y BaseStation +ω WiFi×y WiFi .

[0062] The weighted sum is only an example, and various obtained position information may also be fused in other ways based on weights, which will be explained in the following embodiments.

[0063] It is understandable that the result of a certain positioning method may be empty. For example, in an indoor scenario, the terminal cannot receive GNSS signals. Therefore, (x GNSS ,y GNSS ) is empty, the weight is calculated based on the HDOP value of the cellular network location information and the HDOP value of the WiFi location information, and based on (x BaseStation ,y BaseStation ),ω BaseStation ,(x WiFi ,y WiFi ), and ω WiFi Calculate the final location information. For example, in areas where base station coverage cannot meet the needs, due to poor base station signals, the terminal may not be able to obtain cellular network positioning results based on the base station signal. Therefore, (x BaseStation ,y BaseStation ) is empty, the weight is calculated based on the HDOP value of the GNSS location information and the HDOP value of the WiFi location information, and based on (x GNSS ,y GNSS ),ω GNSS ,(x WiFi ,y WiFi ), and ω WiFi Calculate the final position information.

[0064] In some implementations, before S15, the data formats of the location information obtained in various ways are unified. One implementation of the unified data format is to unify the GNSS location information, the cellular network location information, and the WiFi location information into one coordinate system for subsequent calculations.

[0065] In this embodiment, location information is obtained respectively through GNSS, cellular network and WiFi, and then the weight of each location information is obtained based on the HDOP value of each location information. The result of fusing each location information is obtained based on the weight, so that more accurate location information can be obtained, thereby compensating for the shortcomings of insufficient outdoor and indoor positioning accuracy.

[0066] Figure 3 This is a cellular network-based positioning process provided by an embodiment of the present application. In the process provided by this embodiment, it is assumed that the number of base stations involved in positioning is N, and M base stations are grouped as a group and divided into Group, C represents a combination operation. In this embodiment, M=4 is taken as an example. For the convenience of description, every 4 base stations are referred to as a base station combination.

[0067] In order to achieve positioning based on cellular networks, it is necessary to pre-build a cellular network fingerprint library, which includes the correspondence between location coordinates and fingerprints. For any location point, the location coordinates of the location point correspond to a unique fingerprint, which can be understood as the measurement data of the superimposed signal of the base station used for positioning received at the location point.

[0068] In some implementations, the cellular network fingerprint includes a Reference Signal Reception Power (RSRP), a Cell Global Identity (CGI), and a synchronization difference.

[0069] That is, the RSRP, CGI and synchronization difference of the received base station signal are measured at any location point as the fingerprint of the location point. In order to distinguish from the measured values ​​in subsequent positioning, the values ​​of each parameter in the fingerprint are referred to as preset reference values.

[0070] The definition and acquisition method of synchronization difference are as follows: the electronic device receives measurement reference signals from different base stations, performs time domain correlation calculation on the measurement reference signal and the known signal sequence generated locally, finds the first arrival path (first arrival path) based on the result of the time domain correlation calculation, and estimates the time when the signal of the base station reaches the electronic device based on the first arrival path, which is called the arrival time. The difference between the arrival time of the signal of other cells outside the reference cell and the arrival time of the signal of the reference cell is calculated to obtain the synchronization difference, wherein the reference cell is the cell where the electronic device is located, and the other cells are neighboring cells. It can be understood that the synchronization difference between a neighboring cell and the reference cell can be calculated, and the synchronization difference between multiple neighboring cells and the reference cell can also be calculated.

[0071] Figure 3 The following steps are included:

[0072] S21, obtaining candidate cellular network positioning results using each base station combination as a reference base station

[0073] The reference base station can be understood as a base station used for positioning. The positioning result of the base station combination includes the cellular network location information and the corresponding HDOP value. Figure 3 For example, the base station combinations are combination 1, combination 2, ..., combination Each base station combination obtains a set of positioning results as candidate cellular network positioning results. Figure 3 It is referred to as candidate position information 1, HDOP value 1, ..., candidate position information HDOP Value

[0074] For any base station combination, the electronic device measures the RSRP, CGI and synchronization difference of the cell under the base station combination to obtain the measurement result, and compares the measurement result with the fingerprint in the cellular network fingerprint library, and takes the location coordinates corresponding to the closest fingerprint as the cellular network location information under the base station combination, which is called candidate cellular network location information.

[0075] Assume that the candidate cellular network location information is obtained as The position of each base station in the base station combination is (x j ,y j ), j = 1, 2, 3, 4, then the calculation method of the HDOP value in the positioning result of this base station combination is:

[0076] in,

[0077] r j is the Euclidean distance from the terminal to the jth base station.

[0078] Figure 3 In the present invention, the cellular network location information and the corresponding HDOP value obtained based on each base station combination are respectively referred to as cellular network location information 1, HDOP1, cellular network location information 2, HDOP2, ..., cellular network location information

[0079] S22. Use the positioning result including the minimum HDOP value as the cellular network positioning result.

[0080] That is, from HDOP1, HDOP2, ..., HDOP The smallest HDOP value is selected, and the candidate cellular network location information corresponding to the smallest HDOP value is the cellular location information. The cellular location information and the smallest HDOP value constitute the cellular network positioning result.

[0081] Figure 3 The method for obtaining cellular network positioning results shown selects the best positioning result as the cellular network positioning result from multiple groups of candidate cellular network positioning results based on the HDOP value, and adds the synchronization difference to the base station fingerprint, which is conducive to obtaining more accurate cellular network positioning results.

[0082] The WiFi-based positioning process is described in detail below.

[0083] Figure 4 The process of building a WiFi fingerprint library includes the following steps:

[0084] S31. Scan the signal of the access point (AP) to obtain scanning data.

[0085] In some implementations, the AP signal is scanned by scanning multiple channels in parallel. A channel refers to a pre-configured channel on which the AP can send signals. Scanning multiple channels in parallel can improve the efficiency of scanning the AP.

[0086] The signal transmitted by the AP includes a Basic Service Set ID (BSSID), and the scan data includes the BSSID and corresponding measurement data, and the measurement data is obtained by measuring the scanned signal by the electronic device. In some implementations, the measurement data is a received signal strength (RSSI), and in other implementations, in addition to RSSI, the measurement data also includes at least one of mode, standard deviation, and channel distribution.

[0087] S32: Process the scanned data to obtain processed scanned data.

[0088] The processing includes at least one of: removing abnormal data, supplementing data, and adjusting weights.

[0089] Removing abnormal data refers to removing data that does not meet the conditions in the scan data. In some implementations, the conditions include that the measurement data is outside the preset range. For example, if the RSSI is outside the preset range, the scan data containing the RSSI is abnormal data. Removing abnormal data also includes removing the first scan data obtained by the electronic device from a certain AP that has never been connected. In this case, the measurement data in the scan data is likely to be inaccurate, so it is removed. Removing abnormal data can improve the accuracy of the fingerprint library and lay the foundation for obtaining more accurate location information.

[0090] Data supplementation can be understood as: for scan data that only contains BSSID but not measurement data, or has incomplete measurement data, the measurement data is supplemented based on the AP data contained in the pre-configured geographic fence to obtain complete scan data.

[0091] It can be understood that the correspondence between the fence and the AP data is pre-configured, the fence represents the geographical range, and the AP data includes the BSSID and the measurement data. Figure 5 For example, fence 1, fence 2, ... fence n are each a geographical range, and the boundaries of the geographical range can be represented by coordinates. Each fence contains AP data, and the AP data includes BSSID and measurement data. Figure 1 For example, fence 1 includes data of 50 APs, and the data of each AP includes BSSID and measurement data.

[0092] In some implementations, when a BSSID is scanned for the first time but no corresponding measurement data is obtained, the fence in which the AP that issued the BSSID is located is obtained based on the BSSID, called the target fence, and then the measurement data corresponding to the BSSID is obtained based on the measurement data in the target fence, such as taking the average value of each RSSI as the RSSI corresponding to the BSSID.

[0093] In some implementations, for the BSSID scanned for the first time, if at least one measurement data is scanned, it is determined whether the scanned measurement data is accurate based on the measurement data in the target fence. If so, other measurement data are supplemented. For example, the scanned data includes RSSI but does not include standard deviation. If the difference between the RSSI in the scanned data and the mean of the RSSI in the target fence does not exceed a preset threshold, it means that the scanned measurement data is accurate, and the mean of the standard deviation in the target fence is supplemented as the standard deviation in the scanned data. If the scanned measurement data is inaccurate, the scanned data can be temporarily stored and judged again later, with the purpose of making the judgment result more accurate as the number of fingerprints increases.

[0094] Weight adjustment means: for a BSSID scanned multiple times, if the measurement data corresponding to the BSSID in the scanned data are all accurate and considered to be credible, a higher weight value is configured for the BSSID to increase the possibility of being used as a positioning result in subsequent positioning. In some implementations, the method for determining whether the measurement data corresponding to the BSSID in the scanned data is accurate is to determine whether the measurement data corresponding to the BSSID in the scanned data is within a preset range. In another implementation, the measurement data in the fence to which the BSSID belongs is used as a reference, such as for RSSI, the average value of the RSSI in the fence to which the BSSID belongs, or the range formed is used as a reference to determine whether the measurement data corresponding to the BSSID in the scanned data is accurate.

[0095] S33: Use the processed scan data and the corresponding location data as fingerprints, store the fingerprints, and obtain a WiFi fingerprint library.

[0096] In some implementations, the location data includes: the coordinates of the AP, and in other implementations, the location data also includes: an identifier of the area where the AP is located, such as the number of the floor where the AP is located, thereby improving the accuracy of positioning for various indoor conditions.

[0097] Figure 4 The process shown in the figure processes the WiFi scan data, which can improve the quality of the WiFi fingerprint library and lay a good foundation for obtaining accurate WiFi location information.

[0098] Figure 6This is a specific process for obtaining WiFi positioning results based on the WiFi positioning method. In this embodiment, the WiFi fingerprint includes the coordinates of the AP, BSSID and RSSI as an example.

[0099] Figure 6 The following steps are included:

[0100] S41, scanning AP signals (ie, WiFi signals) to obtain scanning data.

[0101] It can be understood that, in the case where there are multiple APs in the space, the signal scanned at a location point is the superimposed signal of multiple APs at the location point.

[0102] Here, the AP signal can also be scanned in parallel to improve the scanning efficiency.

[0103] In this step, it is assumed that multiple groups of scanning data are obtained, and it is assumed that the terminal can scan the signals of N APs, thereby obtaining N groups of scanning data, each group of scanning data includes BSSID and RSSI.

[0104] In this embodiment, after the scan data is obtained, the abnormal data may be removed. For details, please refer to the above embodiment, which will not be described again here.

[0105] S42: Obtain WiFi location information based on the scan data and the WiFi fingerprint library.

[0106] It is understandable that the scan data is compared with the WiFi fingerprints in the WiFi fingerprint library, and the location information corresponding to the fingerprint closest to the scan data is used as the WiFi location information.

[0107] S43: Calculate the HDOP value corresponding to the WiFi location information.

[0108] The HDOP value corresponding to the WiFi location information is obtained based on the WiFi location information, the location information of the reference AP, and the distance from the electronic device to the reference AP. The reference AP is the AP scanned in S41, that is, the AP participating in the WiFi-based positioning.

[0109] It can be understood that, assuming that a scanned data is (BSSID, RSSI), where BSSID represents an AP, RSSI is the measurement data of the signal transmitted by the electronic device used for scanning to the AP, in some implementations, the RSSI in the scan data is converted into a distance, and the distance is the distance between the electronic device used for scanning and the AP. In one example, the RSSI is converted into a distance using a path loss model. After obtaining the distance, the location coordinates of the AP represented by the BSSID corresponding to the RSSI are obtained based on the distance and the WiFi location coordinates.

[0110] In some implementations, Among them, G + is the pseudo-inverse matrix, G + =(G T G) - 1 G T .

[0111] Wherein, (x, y) is the WiFi location information, (xn, yn) is the location coordinate of the nth AP, n = 1, 2, ... N, dn is the distance between the nth AP and the terminal, as described above, obtained by converting RSSI. and It is the diagonal element of the pseudo inverse matrix. It can be understood that the first two elements of the diagonal elements are taken as an example here, but it is not limited to this, and other diagonal elements can also be added.

[0112] Figure 6 In the illustrated embodiment, the HDOP value of the WiFi location information is innovatively obtained, laying the foundation for fusion positioning.

[0113] In combination with the above embodiments, it can be known that multiple WiFi combinations can be set, each WiFi combination is based on Figure 6 The process shown is to obtain the WiFi positioning result. It can be understood that, from multiple groups of WiFi positioning results, based on the corresponding HDOP value, the WiFi location information in at least one group of WiFi positioning results is selected as the WiFi location information to be fused, for example, the WiFi location information in the WiFi positioning result whose corresponding HDOP value is not greater than the preset threshold is used as the WiFi location information to be fused. Similarly, from the cellular network positioning results determined by multiple groups of base station combinations, based on the corresponding HDOP value, the cellular network location information in at least one group of cellular network positioning results is selected as the cellular network location information to be fused, and the location information obtained by GNSS positioning (that is, GNSS is the location information), the WiFi location information to be fused, and the cellular network location information to be fused are fitted based on KNN to obtain the location information of the terminal. This method is an alternative to S14 and S15 to obtain the location information of the terminal.

[0114] Figure 7 is an example of a scenario where location information is applied. In this example, joint positioning is performed based on GNSS, base stations, and WiFi. Figure 7 As shown in the hardware facilities.

[0115] Figure 7In the example, the service application (APP) is a weather APP, which is used to provide weather information of a certain area. It can be understood that in order for the weather APP to provide weather information of a certain area, it is necessary to first obtain the area where the user equipment is located.

[0116] In some implementations, the weather app responds to the user's trigger and calls the location information acquisition module in the UE. The location information acquisition module in the UE obtains the location information of the UE based on the location information acquisition method provided in the above embodiment. In this example, the location information acquisition module calls the cloud service to obtain the location information. Specifically, the data used to obtain the location information, such as GNSS data received from satellites, measured RSRP, and WiFi scan data, etc. ( Figure 6 The cloud service also pre-stores the cellular network fingerprint library and the WiFi fingerprint library, and can also store Figure 5 The correspondence between the fence and the AP data is taken as an example. The location information calculation module calculates and obtains the location information of the UE based on the received measurement data and the pre-stored data.

[0117] The location information calculation module obtains the administrative area location corresponding to the UE's location information (such as longitude and latitude), such as the name of the administrative district in a city, from the geographic location providing module of the map providing end as the regional information. The location information calculation module sends the regional information to the location information acquisition module in the UE, and the location information acquisition module sends the regional information to the weather APP.

[0118] The weather app sends the regional information to the service push module of the service provider. The service push module obtains the meteorological data of the area represented by the regional information and sends the meteorological data to the weather app.

[0119] Understandably, Figure 7 The UE and the cloud service jointly obtain the location information of the UE. In addition, the function of the cloud service can be integrated into the location information acquisition module in the UE, that is, the location information is obtained by the UE.

[0120] An embodiment of the present application further provides a computer-readable storage medium having instructions stored thereon. When the instructions are executed on an electronic device, the electronic device executes the method for obtaining location information provided in the above embodiment.

[0121] An embodiment of the present application further provides a computer program product having codes stored thereon. When the computer program product is executed on an electronic device, the electronic device implements the method for obtaining location information provided in the above embodiment.

[0122] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for obtaining location information, characterized in that: Applied to electronic equipment, the method comprises: Acquire a positioning result, the positioning result including first position information of the electronic device and a horizontal dilution of precision (HDOP) value corresponding to the first position information, the first position information including: position information acquired through GNSS positioning, position information acquired through cellular network positioning, and position information acquired through wireless fidelity (WiFi) positioning, wherein the HDOP value corresponding to the position information acquired through WiFi positioning is acquired based on the position information acquired through WiFi positioning, the position information of a reference access point, and the distance from the electronic device to the reference access point, the reference access point being an access point participating in the WiFi positioning; Based on the HDOP value, the first location information is fused to obtain the second location information of the electronic device, wherein the first location information with a smaller corresponding HDOP value has a greater contribution to the second location information of the electronic device.

2. The method according to claim 1, characterized in that: The HDOP value corresponding to the location information obtained through WiFi positioning is obtained based on the location information obtained through WiFi positioning, the location information of the reference access point, and the distance from the electronic device to the reference access point, including: The HDOP value corresponding to the position information obtained through WiFi positioning is obtained by calculating the diagonal elements of the pseudo-inverse matrix, the pseudo-inverse matrix is ​​obtained by operating a geometric matrix, and the elements of any row in the geometric matrix include: a ratio of a position difference to a distance, the position difference is a difference between the WiFi position coordinates obtained through WiFi positioning and the position coordinates of the first access point, the distance is a distance from the WiFi position coordinates to the first access point, and the first access point is any one of the reference access points.

3. The method according to claim 2, characterized in that The process of obtaining the WiFi location coordinates includes: Scanning the WiFi signal of the reference access point to obtain scanning data, wherein the scanning data includes a basic service set identifier BSSID and measurement data, and the measurement data is data obtained by the electronic device measuring the WiFi signal; wherein the distance is obtained by converting the measurement data; The WiFi location coordinates are obtained based on the scan data and the WiFi fingerprint library.

4. The method according to claim 3, characterized in that The measurement data include: Received signal strength indication RSSI.

5. The method according to claim 4, characterized in that The measurement data also includes: At least one of a mode, a standard deviation, and a channel distribution.

6. The method according to claim 1, characterized in that The location information obtained through cellular network positioning represents a location point; the location information obtained through WiFi positioning represents a location point; The step of fusing the first location information based on the HDOP value to obtain second location information of the electronic device includes: Obtaining a weight of the first position information based on a HDOP value corresponding to the first position information; Based on the weight, the first location information is fused to obtain the second location information of the electronic device.

7. The method according to claim 1, characterized in that: The location information obtained by cellular network positioning includes a plurality of cellular network location information, each cellular network location information represents a location point, and each cellular network location information corresponds to an HDOP value; the location information obtained by WiFi positioning includes a plurality of WiFi location information, each WiFi location information represents a location point, and each WiFi location information corresponds to an HDOP value; The step of fusing the first location information based on the HDOP value to obtain second location information of the electronic device includes: Selecting the cellular network location information to be merged from the multiple cellular network location information based on the HDOP values ​​corresponding to the multiple cellular network location information; Selecting the to-be-fused WiFi location information from the multiple WiFi location information based on the HDOP values ​​corresponding to the multiple WiFi location information; The second location information of the electronic device is obtained by fitting the location information to be fused, where the location information to be fused includes: location information obtained through GNSS positioning, the cellular network location information to be fused, and the WiFi location information to be fused.

8. The method according to claim 1, 6 or 7, characterized in that: The cellular network positioning process includes: Acquire candidate cellular network positioning results using each base station combination as a reference base station, the candidate cellular network positioning results including candidate cellular network location information and a corresponding HDOP value, and select cellular network location information from the candidate cellular network positioning results based on a magnitude relationship between the HDOP values ​​corresponding to the candidate cellular network location information; The process of WiFi positioning includes: A candidate WiFi positioning result is obtained using each WiFi combination as a reference WiFi, wherein the candidate WiFi positioning result includes candidate WiFi location information and a corresponding HDOP value, and based on a size relationship between the HDOP values ​​corresponding to the candidate WiFi location information, a cellular network location information is selected from the candidate cellular network location information.

9. The method according to claim 8, characterized in that The process of obtaining candidate cellular network location information using the first base station combination as a reference base station includes: By measuring pre-configured parameters for cells under the first base station combination, a measurement result of the parameter is obtained, where the parameter includes: synchronization difference; The measurement result is compared with the fingerprint in a pre-configured cellular network fingerprint library to obtain the candidate cellular network location information.

10. The method according to claim 9, characterized in that The parameters also include: At least one of a reference signal received power RSRP and a cell global identifier CGI.

11. An electronic device, characterized in that: The electronic device comprises: one or more processors, a memory and a touch screen; the memory is used to store program code; the processor is used to run the program code, so that the electronic device implements the method for obtaining location information as described in any one of claims 1 to 10.

12. A computer-readable storage medium, characterized in that: Instructions are stored thereon, and when the instructions are executed on an electronic device, the electronic device executes the method for acquiring location information as described in any one of claims 1 to 10.

13. A computer program product, characterized in that Codes are stored thereon, and when the computer program product is run on an electronic device, the electronic device implements the method for obtaining location information as described in any one of claims 1 to 10.