Search

US-12626007-B2 - Positioning method and related apparatus

US12626007B2US 12626007 B2US12626007 B2US 12626007B2US-12626007-B2

Abstract

Positioning method and apparatus provide two services: a first, common positioning service and a second, high-precision positioning service to an upper-layer application through permission control and an independent reporting channel design. For a common application, a positioning result can be reported with a first, common precision through a common reporting channel. For a high-precision application, a positioning result with a higher level of precision can be reported through a high-precision reporting channel. In this way, the channel for obtaining the positioning result by the common application is isolated from the channel for obtaining the positioning result by the high-precision application, thus improving output security of the high-precision positioning result and satisfying security requirements of different countries or regions.

Inventors

  • GuoSheng Huang
  • Yongxiang Liu
  • Xiang Shi

Assignees

  • HUAWEI TECHNOLOGIES CO., LTD.

Dates

Publication Date
20260512
Application Date
20211021
Priority Date
20201022

Claims (18)

  1. 1 . A positioning method, comprising: obtaining, by an electronic device, a first positioning instruction of a first application: solving, by the electronic device, high-precision positioning coordinates in a first coordinate system in accordance with the first positioning instruction: adding, by the electronic device, a deflection factor to the high-precision positioning coordinates and performing encryption according to a preset encryption algorithm to obtain encrypted deflection coordinates; and reporting, by the electronic device, the encrypted deflection coordinates to the first application; obtaining, by the electronic device, a second positioning instruction of a second application; solving, by the electronic device, common positioning coordinates in the first coordinate system in accordance with the second positioning instruction; reporting, by the electronic device, the common positioning coordinates to the second application; decrypting, by the electronic device, the encrypted deflection coordinates using a decryption key included in the first application and that corresponds to the preset encryption algorithm, to obtain the high-precision deflection coordinates; and performing, by the electronic device, lane-level navigation using a map resource package provided in the first application and the high-precision deflection coordinates, wherein location coordinates in the map resource package are obtained by adding the deflection factor to real location coordinates.
  2. 2 . The method according to claim 1 , wherein the solving, by the electronic device, high-precision positioning coordinates in a first coordinate system comprises: obtaining, by the electronic device, first global navigation satellite system (GNSS) observation volume data from a global navigation satellite system GNSS chip: obtaining, by the electronic device, positioning assistance data; and solving, by the electronic device, the high-precision positioning coordinates in the first coordinate system based on the first GNSS observation volume data and the positioning assistance data.
  3. 3 . The method according to claim 2 , wherein the obtaining, by the electronic device, first GNSS observation volume data by using a GNSS chip comprises: authenticating, by the electronic device, the first application, and after the first application is successfully authenticated, obtaining, by the electronic device, the first GNSS observation volume data from the GNSS chip.
  4. 4 . The method according to claim 3 , wherein the authenticating, by the electronic device, the first application comprises: sending, by the electronic device, an authentication request to an authentication server, the authentication request comprising an identifier of the first application; and authenticating the first application following receipt by the electronic device of authentication success information sent by the authentication server.
  5. 5 . The method according to claim 3 , wherein the authenticating, by the electronic device, the first application comprises: determining, by the electronic device, whether a high-precision application whitelist comprises an identifier of the first application, and when the high-precision application whitelist comprises the identifier of the first application, successfully authenticating the first application, the high-precision application whitelist comprising an identifier of one or more high-precision applications.
  6. 6 . The method according to claim 2 , wherein the first GNSS observation volume data comprises a carrier phase observation volume and one or more of a pseudorange observation volume and a Doppler frequency observation volume, the method further comprising: obtaining, by the electronic device, a probability location based on the first GNSS observation volume data; and sending, by the electronic device, the probability location to a server: the obtaining, by the electronic device, positioning assistance data comprising: obtaining, by the electronic device, the positioning assistance data that is determined by the server based on the probability location, location information and observation volume data obtained during satellite observation by N reference stations, wherein the positioning assistance data comprises the observation volume data and the location information of the reference station, N being a positive integer; and the solving, by the electronic device, the high-precision positioning coordinates in the first coordinate system based on the first GNSS observation volume data and the positioning assistance data comprises: solving, by the electronic device, the high-precision positioning coordinates in the first coordinate system through real-time kinematic RTK positioning based on the first GNSS observation volume data and the positioning assistance data.
  7. 7 . The method according to claim 2 , wherein the first GNSS observation volume data comprises a carrier phase observation volume and one or more of a pseudorange observation volume and a Doppler frequency observation volume: the obtaining, by the electronic device, positioning assistance data comprises: receiving, by the electronic device, the positioning assistance data from a mobile communications base station or a satellite, wherein the positioning assistance data comprises one or more of a precise ephemeris, ephemeris correction data, and an atmospheric correction quantity; and the solving, by the electronic device, the high-precision positioning coordinates in the first coordinate system based on the first GNSS observation volume data and the positioning assistance data comprises: solving, by the electronic device, the high-precision positioning coordinates in the first coordinate system through precise point positioning PPP based on the first GNSS observation volume data and the positioning assistance data.
  8. 8 . The method according to claim 2 , further comprising: obtaining, by the electronic device, inertial measurement data from an inertial measurement unit, the inertial measurement data comprising acceleration sensor data and gyro sensor data of the electronic device; and the solving, by the electronic device, the high-precision positioning coordinates in the first coordinate system based on the first GNSS observation volume data and the positioning assistance data comprises: performing, by the electronic device, inertial navigation based on the first GNSS observation volume data, the positioning assistance data, and the inertial measurement data to solve the high-precision positioning coordinates in the first coordinate system.
  9. 9 . The method according to claim 1 , wherein the adding, by the electronic device, a deflection factor to the high-precision positioning coordinates and performing encryption according to a preset encryption algorithm to obtain encrypted deflection coordinates comprises: adding, by the electronic device, the deflection factor to the high-precision positioning coordinates to obtain high-precision deflection coordinates in a second coordinate system; and encrypting, by the electronic device, the high-precision deflection coordinates according to a preset encryption algorithm to obtain the encrypted deflection coordinates.
  10. 10 . The method according to claim 1 , wherein the solving, by the electronic device, common positioning coordinates in the first coordinate system comprises: obtaining, by the electronic device, second GNSS observation volume data from the GNSS chip; and solving, by the electronic device, the common positioning coordinates in the first coordinate system based on the second GNSS observation volume data.
  11. 11 . The method according to claim 1 , wherein the second GNSS observation volume data comprises one or more of a pseudorange observation volume and a Doppler frequency observation volume.
  12. 12 . The method according to claim 1 , further comprising: obtaining, by the electronic device, inertial measurement data from an inertial measurement unit, the inertial measurement data comprising acceleration sensor data and gyro sensor data of the electronic device; and the solving, by the electronic device, the common positioning coordinates in the first coordinate system based on the second GNSS observation volume data comprises: performing, by the electronic device, inertial navigation based on the second GNSS observation volume data and the inertial measurement data to solve the common positioning coordinates in the first coordinate system.
  13. 13 . The method according to claim 1 , further comprising: a high-precision positioning engine and a common positioning engine, wherein the solving, by the electronic device, high-precision positioning coordinates in a first coordinate system comprises: solving, by the electronic device, the high-precision positioning coordinates in the first coordinate system by using the high-precision positioning engine; and the solving, by the electronic device, common positioning coordinates in the first coordinate system comprises: solving, by the electronic device, the common positioning coordinates in the first coordinate system by using the common positioning engine.
  14. 14 . The method according to claim 1 , wherein: the electronic device comprises a positioning engine comprising a high-precision positioning function and a common positioning function: the solving, by the electronic device, high-precision positioning coordinates in a first coordinate system comprises: enabling, by the electronic device, the high-precision positioning function of the positioning engine and solving the high-precision positioning coordinates in the first coordinate system by using the positioning engine; and the method further comprises: obtaining, by the electronic device, a second positioning instruction of a second application: adding, by the electronic device, a random error to the high-precision positioning coordinates, to obtain common positioning coordinates when a time difference between a time point of obtaining the first positioning instruction and a time point of obtaining the second positioning instruction is less than preset duration, wherein a precision value of the common positioning coordinates is greater than a precision value of the high-precision positioning coordinates; and reporting, by the electronic device, the common positioning coordinates to the second application.
  15. 15 . The method according to claim 14 , further comprising: enabling, by the electronic device, the common positioning function of the positioning engine when a time difference between the time point of obtaining the first positioning instruction and the time point of obtaining the second positioning instruction is greater than or equal to the preset duration, and obtaining second GNSS observation volume data from the GNSS chip; and solving, by the electronic device, the common positioning coordinates using the positioning engine based on the second GNSS observation volume data.
  16. 16 . The method according to claim 14 , further comprising: determining, by the electronic device, the positioning precision value of the high-precision positioning coordinates; and when the time difference between the time point of obtaining the first positioning instruction and the time point of obtaining the second positioning instruction is less than the preset duration and the positioning precision value of the high-precision positioning coordinates is less than a preset precision value, adding, by the electronic device, the random error to the high-precision positioning coordinates to obtain the common positioning coordinates, wherein the precision value of the common positioning coordinates is greater than the precision value of the high-precision positioning coordinates; or when the time difference between the time point of obtaining the first positioning instruction and the time point of obtaining the second positioning instruction is less than the preset duration and the positioning precision value of the high-precision positioning coordinates is greater than or equal to the preset precision value, determining, by the electronic device, the high-precision positioning coordinates as the common positioning coordinates.
  17. 17 . The method according to claim 1 , wherein the first coordinate system is a world geodetic system WGS84 coordinate system, and the second coordinate system is one of a GCJ02 coordinate system or a BD09 coordinate system.
  18. 18 . The method according to claim 1 , wherein the preset encryption algorithm comprises an SM4 encryption algorithm.

Description

This application is a national stage of International Application No. PCT/CN2021/125238 filed on Oct. 21, 2021, which claims priority to Chinese Patent Application No. 202011141757.4 filed on Oct. 22, 2020 and Chinese Patent Application No. 202110131917.5 filed on Jan. 30, 2021. All of the aforementioned applications are hereby incorporated by reference in their entireties. TECHNICAL FIELD This application relates to the field of positioning technologies, and in particular, to a positioning method and a related apparatus. BACKGROUND In electronic devices represented by smartphones, a location based service (location based service, LBS) has become an indispensable basic service for obtaining an accurate user location. Currently, the electronic devices such as smartphones use a global navigation satellite system (global navigation satellite system, GNSS) positioning technologies. For example, pseudorange single point positioning can usually achieve a precision of meters (for example, 3 m to 5 m), and satisfy basic positioning and navigation requirements, for example, road-level navigation, which is referred to as a common positioning service. To further improve a GNSS positioning precision, assistance data needs to be introduced from a third-party base station, to correct a GNSS ephemeris error, an atmospheric error, and the like. For example, typical positioning technologies include a differential global navigation satellite system (differential navigation satellite system, DGNSS) technology based on differential positioning, a real-time kinematic (real-time kinematic, RTK) technology, and a precise point positioning (precise point positioning, PPP) technology based on error correction. Both the RTK technology and the PPP technology use carrier-phase measurement, and can achieve a precision of submeters (<1 m) to centimeters, so that lane information of a vehicle can be accurately identified, and a lane-level navigation requirement can be satisfied. This is referred to as a high-precision positioning service. To ensure homeland security, a common unauthorized device (for example, a consumer electronic device such as a mobile phone) cannot directly output a high-precision positioning result in many countries or regions, so that the positioning result cannot be obtained and used by an unauthorized application. SUMMARY This application provides a positioning method and a related apparatus, to provide two services, namely a common positioning service and a high-precision positioning service, to an upper-layer application through permission control and an independent reporting channel design. In this way, a channel for obtaining a positioning result by a common application is isolated from a channel for obtaining a positioning result by a high-precision application. This can improve output security of the high-precision positioning result, satisfying security requirements of different countries or regions. According to a first aspect, this application provides a positioning method, including: An electronic device obtains a first positioning instruction of a first application. The electronic device solves high-precision positioning coordinates in a first coordinate system in response to the first positioning instruction. The electronic device adds a deflection factor to the high-precision positioning coordinates, and performs encryption according to a preset encryption algorithm, to obtain encrypted deflection coordinates. The electronic device reports the encrypted deflection coordinates to the first application. In the positioning method provided in this application, the electronic device may provide two services, namely a common positioning service and a high-precision positioning service, to an upper-layer application through permission control and an independent reporting channel design. For a common application, the electronic device may report a positioning result with a common precision (for example, a typical precision value of 3 m to 5 m) to the common application through a common reporting channel. For a high-precision application, after authentication succeeds in the high-precision application, the electronic device may report a positioning result with a high precision (for example, a typical precision value of less than 1 m) to the high-precision application through a high-precision reporting channel. This ensures that the channel for obtaining the positioning result by the common application is isolated from the channel for obtaining the positioning result by the high-precision application. This improves output security of the high-precision positioning result, satisfying security requirements of different countries or regions. In a possible implementation, that the electronic device solves high-precision positioning coordinates in a first coordinate system specifically includes: The electronic device obtains first GNSS observation volume data by using a global navigation satellite system GNSS chip.