Positioning method and device, terminal and storage medium

By employing scene recognition and utilizing historical fused positioning data in weak signal scenarios, the method improves pedestrian navigation accuracy and reliability in environments with unreliable GNSS signals.

CN119224798APending Publication Date: 2024-12-31GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310781829.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-28
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

Existing pedestrian positioning systems face inaccuracies and failures in weak signal environments due to the inability to obtain reliable GNSS positioning information, leading to PDR positioning failures.

Method used

Implement scene recognition based on the carrier-to-noise ratio of the GNSS signal to identify weak signal scenarios, using either GNSS positioning information or historical fused positioning information when GNSS is unreliable, and perform PDR positioning to maintain accurate navigation.

Benefits of technology

Enhances positioning accuracy and success rates by ensuring continuous navigation through available positioning information, even in weak signal conditions, by combining GNSS and PDR technologies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119224798A_ABST
    Figure CN119224798A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a positioning method and device, a terminal and a storage medium, and belongs to the technical field of terminal positioning. The method comprises the following steps: performing scene recognition based on a carrier-to-noise ratio of a GNSS signal to obtain a scene recognition result; under the condition that the scene recognition result indicates that the scene is in the weak signal scene, available positioning information is obtained, the available positioning information is GNSS positioning information or historical fusion positioning information, and the historical fusion positioning information is a fusion result of historical GNSS positioning and historical PDR positioning; and performing PDR positioning based on the available positioning information to obtain a target positioning result. By adopting the scheme provided by the embodiment of the invention, the signal scene where the positioning terminal is located can be identified so as to obtain the available positioning information, PDR positioning is carried out based on the available positioning information, PDR positioning failure caused by absence of the available positioning information is avoided, the positioning success rate is improved, and meanwhile, the accuracy of a target positioning result is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of terminal positioning technology, and in particular to a positioning method, device, terminal and storage medium. Background Art

[0002] With the continuous development of navigation and positioning technology in smart terminals, the demand for location-based services is also increasing. How to provide reliable and continuous positioning services in different complex environments has attracted more and more attention.

[0003] Positioning technologies such as GNSS (Global Navigation Satellite System) can provide location services for users' positioning terminals. However, in actual use, obstacles, signal attenuation, interference from other signals, and multipath effects of signal propagation often lead to poor satellite signal transmission, which in turn affects positioning accuracy and even makes it impossible to provide positioning services. Pedestrian positioning in weak signal environments often uses the method of transitioning from GNSS positioning to PDR (Pedestrian Dead Reckoning) positioning to achieve positioning, and PDR positioning is performed using the positioning information provided by GNSS.

[0004] However, in a weak signal environment, the positioning terminal may not be able to obtain GNSS positioning information or the accuracy of the obtained GNSS positioning information may not be high enough, resulting in the problem that the positioning terminal cannot perform PDR positioning due to the failure to obtain available positioning information. Summary of the invention

[0005] The embodiments of the present application provide a positioning method, device, terminal and storage medium, which can improve the accuracy of pedestrian positioning results in a weak signal environment. The technical solution is as follows:

[0006] On the one hand, an embodiment of the present application provides a positioning method, the method comprising:

[0007] Perform scene recognition based on the carrier-to-noise ratio of the GNSS signal to obtain a scene recognition result;

[0008] When the scene recognition result indicates that the scene is a weak signal scene, obtain available positioning information, where the available positioning information is GNSS positioning information or historical fused positioning information, where the historical fused positioning information is a fusion result of historical GNSS positioning and historical PDR positioning;

[0009] PDR positioning is performed based on the available positioning information to obtain a target positioning result.

[0010] On the other hand, an embodiment of the present application provides a positioning device, the device comprising:

[0011] A scene recognition module is used to perform scene recognition based on the carrier-to-noise ratio of the GNSS signal and obtain a scene recognition result;

[0012] An information acquisition module, used to acquire available positioning information when the scene recognition result indicates that the scene is in a weak signal scene, wherein the available positioning information is GNSS positioning information or historical fusion positioning information, and the historical fusion positioning information is a fusion result of historical GNSS positioning and historical PDR positioning;

[0013] The positioning module is used to perform PDR positioning based on the available positioning information to obtain a target positioning result.

[0014] On the other hand, an embodiment of the present application provides a terminal, which includes a processor and a memory; the memory stores at least one instruction, and the at least one instruction is used to be executed by the processor to implement the positioning method as described in the above aspects.

[0015] On the other hand, an embodiment of the present application provides a computer-readable storage medium, in which at least one program is stored. The at least one program is loaded and executed by a processor to implement the positioning method as described in the above aspects.

[0016] On the other hand, an embodiment of the present application provides a computer program product, which includes computer instructions, which are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the positioning method provided in the above aspect.

[0017] In the embodiment of the present application, scene recognition is performed based on the carrier-to-noise ratio of the GNSS signal to determine the current signal environment, so that when the positioning terminal is monitored to be in a weak signal scenario, GNSS positioning information or historical fused positioning information can be promptly acquired as available positioning information, so that PDR positioning can be performed based on the available positioning information later. The target positioning result is obtained by combining the GNSS positioning technology and the PDR positioning technology, thereby avoiding PDR failure due to the absence of available positioning information during PDR positioning, and improving the positioning success rate. At the same time, PDR positioning based on accurate available positioning information can improve the certainty of the target positioning result. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0019] Figure 1 is a schematic diagram of an implementation environment shown in an exemplary embodiment of the present application;

[0020] Figure 2 A flowchart of a positioning method provided by an exemplary embodiment of the present application is shown;

[0021] Figure 3 is a flow chart of a scene recognition process shown in an exemplary embodiment of the present application;

[0022] Figure 4 is a flowchart of a process for obtaining available positioning information shown in an exemplary embodiment of the present application;

[0023] Figure 5 A flowchart of a PDR positioning process provided by another exemplary embodiment of the present application is shown;

[0024] Figure 6 A schematic diagram of a positioning terminal coordinate axis provided by another exemplary embodiment of the present application is shown;

[0025] Figure 7 A schematic diagram of determining a PDR heading angle provided by another exemplary embodiment of the present application is shown;

[0026] Figure 8 A schematic diagram of determining PDR positioning accuracy provided by another exemplary embodiment of the present application is shown;

[0027] Fig. 9 A flowchart of a positioning process provided by an exemplary embodiment of the present application is shown;

[0028] Fig.10 A schematic diagram of implementing a positioning process provided by an exemplary embodiment of the present application is shown;

[0029] Fig.11 A structural block diagram of a positioning device provided by an exemplary embodiment of the present application is shown;

[0030] Fig.12 A schematic diagram of the structure of a terminal provided by an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION

[0031] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0032] It should be understood that the "several" mentioned in this article refers to one or more, and "multiple" refers to two or more. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.

[0033] The following is a brief introduction to the terms involved in the embodiments of the present application:

[0034] GNSS: Global Navigation Satellite System, refers to all satellite navigation systems, including global, regional and enhanced ones, such as Beidou Navigation Satellite System (BDS), Global Positioning System (GPS), GLONASS and Galileo, etc. GNSS is a global autonomous geographic and spatial positioning satellite system used for navigation and positioning measurement. It transmits real-time position and time information through satellite signals, thereby calculating the latitude and longitude and other geographic and position information of ground receiving equipment.

[0035] PDR: Pedestrian Dead Reckoning is an inertial navigation method that measures and counts the number of steps, step length, and direction of pedestrians, and calculates the pedestrian's walking trajectory and position. The PDR calculation process mainly includes gait detection (step counting), step length calculation, and azimuth calculation. The next step position is calculated by using the starting position, heading angle, and step length, and the current position can be continuously calculated in combination with the step number information.

[0036] Carrier-to-noise ratio: In the field of communication technology, carrier-to-noise ratio is a standard measurement scale used to indicate the relationship between carrier and carrier noise, usually recorded as CNR (Contrast-to-Noise Ratio) or C / N (dB) (in decibels). A high carrier-to-noise ratio can provide better network reception rate, better network communication quality and better network reliability. Carrier-to-noise ratio is similar to signal-to-noise ratio, both of which are measures of network channel quality. However, carrier-to-noise ratio is often used in satellite communication systems, where better antenna arrangement can obtain better carrier-to-noise ratio values.

[0037] The positioning method provided in the embodiment of the present application can be applied to the scene of positioning in a weak signal environment. Figure 1 , Figure 1 The schematic diagram of an implementation environment provided by an exemplary embodiment of the present application is shown. The implementation environment includes a positioning terminal 110 and a GNSS satellite 120 .

[0038] The GNSS satellite 120 is an artificial satellite that can continuously transmit radio signals (GNSS signals) for navigation and positioning of the user's positioning terminal 110 .

[0039] The positioning terminal 110 is an electronic device with positioning requirements, and the electronic device may be a smart phone, a tablet computer, a wearable device, a personal computer, etc., which is not limited in this embodiment. Figure 1 In the description, the positioning terminal 110 is taken as a personal computer, a smart phone, and a tablet computer used by the user. The positioning terminal 110 has a GNSS positioning component, which can receive the GNSS signal sent by the GNSS satellite 120. The positioning terminal 110 can obtain GNSS positioning information according to the GNSS signal; at the same time, the positioning terminal 110 also has a PDR positioning function. The positioning terminal 110 can obtain data collected by the sensor. When the positioning terminal 110 obtains the initial positioning information required by the PDR, the positioning terminal 110 can perform PDR positioning based on the data collected by the sensor and the initial positioning information to obtain the PDR positioning information.

[0040] For the convenience of description, the following embodiments are described by using a positioning method for a positioning terminal.

[0041] Please refer to Figure 2 , which shows a flowchart of a positioning method provided by an exemplary embodiment of the present application, the method comprising:

[0042] Step 201 : Perform scene recognition based on the carrier-to-noise ratio of the GNSS signal to obtain a scene recognition result.

[0043] In some embodiments, the GNSS positioning method uses multiple satellites to participate in positioning. Each satellite will generate a carrier-to-noise ratio when transmitting signals. The carrier-to-noise ratio of the GNSS signal can reflect the strength of the GNSS signal received by the positioning terminal, and further indicate whether the signal environment currently in which the positioning terminal is located is a weak signal environment.

[0044] Step 202, when the scene recognition result indicates that it is in a weak signal scene, obtain available positioning information, the available positioning information is GNSS positioning information or historical fusion positioning information, and the historical fusion positioning information is the fusion result of historical GNSS positioning and historical PDR positioning.

[0045] In some embodiments, when the scene recognition result indicates that it is in a weak signal scene, the positioning terminal determines whether the positioning information received at the current moment is available. If the positioning terminal can obtain available GNSS positioning information, the GNSS positioning information is used as available positioning information. If the positioning terminal cannot obtain available GNSS positioning information, the historical fused positioning information is used as available positioning information. For example, when the weak signal environment in which the positioning terminal is located is close to a no-signal environment, the positioning terminal cannot obtain the GNSS signal and the corresponding GNSS positioning information, or when the positioning terminal can obtain the GNSS signal, but the GNSS positioning information corresponding to the GNSS signal is not suitable for positioning, the positioning terminal cannot perform PDR positioning based on the GNSS information. At this time, the positioning terminal obtains the historical fused positioning information as the available positioning information. The historical fused positioning information is the fusion result of the historical GNSS positioning and the historical PDR positioning. Based on the historical fused positioning information at the previous moment, the positioning terminal can perform PDR positioning to obtain the target positioning result.

[0046] In a possible implementation manner, the positioning terminal may obtain the positioning accuracy of the GNSS positioning information. The positioning terminal determines whether the positioning accuracy of the GNSS positioning information meets the accuracy condition, thereby determining whether the GNSS positioning information is available.

[0047] In some embodiments, when the positioning terminal determines that the positioning accuracy of the GNSS positioning information meets the accuracy condition, the GNSS positioning information is available, indicating that although the positioning terminal is in a weak signal environment at this time, the positioning terminal can receive a GNSS signal containing GNSS positioning information with high positioning accuracy, and the GNSS positioning information can participate in the subsequent PDR positioning of the positioning terminal. Among them, the accuracy condition can be set in advance by the terminal, for example, the accuracy condition is that the accuracy of the GNSS positioning information is less than a threshold of 10m, and the positioning accuracy of the GNSS positioning information at the current moment is 5m, which meets the accuracy condition, and the terminal thus determines that the GNSS positioning information is available.

[0048] In some embodiments, when the positioning terminal determines that the positioning accuracy of the GNSS positioning information does not meet the accuracy condition, the GNSS positioning information is unavailable, indicating that the positioning terminal may be in a no-signal environment at this time, and the positioning terminal cannot obtain the GNSS signal, or the positioning terminal can receive the GNSS signal in the current signal environment, but the positioning terminal receives a GNSS signal containing GNSS positioning information with low positioning accuracy, and the GNSS positioning information cannot participate in the subsequent PDR positioning of the positioning terminal. Among them, the accuracy condition can be set in advance by the terminal, for example, the accuracy condition is that the accuracy of the GNSS positioning information is less than a threshold of 10m, and the positioning accuracy of the GNSS positioning information at the current moment is 15m, which does not meet the accuracy condition, and the terminal thus determines that the GNSS positioning information is unavailable.

[0049] Step 203: Perform PDR positioning based on the available positioning information to obtain a target positioning result.

[0050] In some embodiments, the available positioning information is GNSS positioning information or historical fused positioning information. When the available positioning information is GNSS positioning information, PDR positioning is performed based on the GNSS positioning information to obtain a target positioning result; when the available positioning information is historical fused positioning information, PDR positioning is performed based on the historical fused positioning information to obtain a target positioning result.

[0051] To summarize, in the embodiments of the present application, the positioning terminal performs scene recognition based on the carrier-to-noise ratio of the GNSS signal to determine the current signal environment of the positioning terminal. When the scene recognition result indicates that the positioning terminal is in a weak signal scene, the positioning terminal obtains available positioning information, and the available positioning information is GNSS positioning information or historical fused positioning information. When the positioning terminal can receive a good GNSS signal, the GNSS positioning information is used as the available positioning information to perform PDR positioning. When the current signal scene approaches a no-signal scene and the positioning terminal cannot receive a good GNSS signal, the historical fused positioning information is used as the available positioning information, so that the positioning terminal can perform PDR positioning through the historical fused positioning information to obtain the target positioning result. By identifying the signal scene and obtaining the available positioning information, the PDR failure due to the absence of available positioning information during PDR positioning is avoided, and the success rate of obtaining the target positioning result through PDR positioning is improved.

[0052] In the positioning process, in order to improve the positioning accuracy, first identify the signal environment in which the positioning object is currently located. The carrier-to-noise ratio of the GNSS signal can reflect the strength of the GNSS signal received by the positioning terminal at the current moment. Select the carrier-to-noise ratio of the GNSS signal received by the positioning terminal over a period of time. The change of the carrier-to-noise ratio of the GNSS signal at multiple consecutive moments can be used to determine the signal environment in which the current positioning terminal is located, so that further positioning can be performed based on the corresponding signal environment. Please refer to Figure 3 , which shows a flow chart of a scene recognition process provided by an exemplary embodiment of the present application. The method for identifying the signal environment in which the positioning object is currently located includes:

[0053] Step 301: Obtain a current carrier-to-noise ratio mean value and a current carrier-to-noise ratio variance of a current GNSS signal, and a historical carrier-to-noise ratio mean value of a historical GNSS signal.

[0054] In some embodiments, the current GNSS signal is a GNSS signal received by the terminal at the current moment. Since the GNSS positioning method uses multiple satellites to participate in positioning, each satellite will generate a carrier-to-noise ratio when transmitting signals. Therefore, the positioning terminal obtains the current carrier-to-noise ratio corresponding to all satellites participating in GNSS positioning in the current GNSS signal, and takes the mean and variance of the carrier-to-noise ratios corresponding to all satellites at the current moment as the current carrier-to-noise ratio mean and the current carrier-to-noise ratio variance. The historical GNSS signal can be GNSS signals corresponding to multiple historical moments. All satellites participating in GNSS positioning will generate a carrier-to-noise ratio at each moment. The carrier-to-noise ratios corresponding to satellites participating in GNSS positioning at all moments are averaged as the historical carrier-to-noise ratio mean.

[0055] Step 302: Perform scene recognition based on the current carrier-to-noise ratio mean, the current carrier-to-noise ratio variance, and the historical carrier-to-noise ratio mean to obtain a scene recognition result.

[0056] In some embodiments, the strength of the GNSS signal received at the current moment can be determined through the relationship between the current carrier-to-noise ratio mean and the historical carrier-to-noise ratio mean, as well as the current carrier-to-noise ratio variance, to obtain a scene recognition result, which is used to reflect the current signal environment.

[0057] In an optional implementation, the above scene recognition result can be obtained in the following manner:

[0058] 1. When the current carrier-to-noise ratio mean is greater than the first mean threshold and less than the second mean threshold, the weak signal counter is incremented by one.

[0059] In some embodiments, when the current carrier-to-noise ratio mean is greater than the first mean threshold and less than the second mean threshold, the GNSS signal received by the positioning terminal at the current moment is considered to be a weak signal, and the positioning terminal updates the count value of the weak signal counter and adds one to the weak signal counter. For example, the current count value of the weak signal counter is 2, the current carrier-to-noise ratio mean is 30, the first mean threshold is 25, and the second mean threshold is 35. Since the current carrier-to-noise ratio mean is 30, which is greater than the first mean threshold 25 and the second mean threshold 35, the positioning terminal adds one to the weak signal counter, and the count value of the positioning terminal is updated from 2 to 3.

[0060] 2. When the count value of the weak signal counter reaches the first count threshold, the current carrier-to-noise ratio variance is greater than the variance threshold, and the current carrier-to-noise ratio mean is less than the historical carrier-to-noise ratio mean, the scene recognition result is determined to be a weak signal scene.

[0061] In some embodiments, the count value of the weak signal counter reaches the first count threshold, that is, there are multiple moments when the positioning terminal receives multiple GNSS signals with weak signals. If the current carrier-to-noise ratio variance corresponding to the GNSS signal received by the positioning terminal is greater than the variance threshold, and the current carrier-to-noise ratio mean is less than the historical carrier-to-noise ratio mean, the scene recognition result is determined to be a weak signal scene. For example, the count value of the weak signal counter is 10, the first count threshold is 10, the current carrier-to-noise ratio variance is 2, the variance threshold is 1, the current carrier-to-noise ratio mean is 30, and the historical carrier-to-noise ratio mean is 32. Because the count value of the weak signal counter is 10, the current carrier-to-noise ratio variance 2 is greater than the variance threshold 1, and the current carrier-to-noise ratio mean 30 is less than the historical carrier-to-noise ratio mean 32, the scene recognition result obtained in this case indicates that the positioning terminal is in a weak signal scene at the current moment.

[0062] In a possible application scenario, the above scene recognition result can also be obtained in the following way:

[0063] 1. In a weak signal scenario, when the current carrier-to-noise ratio average is greater than the historical carrier-to-noise ratio average, the signal enhancement counter is incremented by one.

[0064] In some embodiments, when the current carrier-to-noise ratio average is greater than the historical carrier-to-noise ratio average, it indicates that the GNSS signal strength currently received by the positioning terminal is greater than the GNSS signal strength received by the positioning terminal at a historical moment, and the positioning terminal adds one to the signal enhancement counter.

[0065] 2. When the count value of the signal enhancement counter reaches the second count threshold, exit the weak signal scenario.

[0066] In some embodiments, the count value of the signal enhancement counter reaches the second count threshold, that is, there are multiple moments when the positioning terminal receives a GNSS signal with a relatively strong signal, and at this time, the positioning terminal exits the weak signal environment.

[0067] To summarize, in the embodiment of the present application, the positioning terminal obtains the current carrier-to-noise ratio mean and the current carrier-to-noise ratio variance of the current GNSS signal, as well as the historical carrier-to-noise ratio mean of the historical GNSS signal, so that the positioning terminal can determine whether the signal environment in which the current positioning terminal is located is a weak signal environment through the current carrier-to-noise ratio mean, the current carrier-to-noise ratio variance and the historical carrier-to-noise ratio mean, and obtain a scene recognition result, so that positioning can be performed subsequently according to the signal environment indicated by the scene recognition result, thereby improving positioning accuracy.

[0068] During the positioning process, if the positioning terminal can obtain GNSS positioning information with high positioning accuracy, the GNSS positioning information is used as available positioning information, so that PDR positioning can be performed through the GNSS positioning information in the future, thereby obtaining a target positioning result with high positioning accuracy; however, if the current signal scene is close to a no-signal scene, the positioning terminal may not receive a GNSS signal, or the GNSS positioning information corresponding to the GNSS signal received by the positioning terminal has low positioning accuracy. In this case, the positioning terminal can obtain historical fusion positioning information and use the historical fusion positioning information as available positioning information, so that the positioning terminal can perform PDR positioning through the historical fusion positioning information, thereby obtaining a target positioning result. Please refer to Figure 4 , which shows a flowchart of a process for obtaining available positioning information provided by an exemplary embodiment of the present application, the method comprising:

[0069] Step 401: When the scene recognition result indicates that the scene is a weak signal scene, determine the availability of GNSS positioning information.

[0070] In some embodiments, when the scene recognition result indicates a weak signal scene, it is determined whether the positioning terminal can acquire the GNSS signal at this time, or, if the positioning terminal can acquire the GNSS signal, whether the accuracy of the GNSS positioning information corresponding to the GNSS signal is suitable for positioning.

[0071] In a possible implementation manner, the positioning terminal may obtain the positioning accuracy of the GNSS positioning information. The positioning terminal determines whether the positioning accuracy of the GNSS positioning information meets the accuracy condition, thereby determining whether the GNSS positioning information is available.

[0072] Step 402: When the GNSS positioning information is available, determine the GNSS positioning information as available positioning information.

[0073] In some embodiments, when the positioning terminal determines that the positioning accuracy of the GNSS positioning information meets the accuracy conditions, the GNSS positioning information is available, indicating that although the positioning terminal is in a weak signal environment at this time, the positioning terminal can receive a GNSS signal containing GNSS positioning information with higher positioning accuracy, and the GNSS positioning information can participate in the subsequent positioning of the positioning terminal.

[0074] Step 403: When the GNSS positioning information is unavailable and historical fused positioning information exists, the historical fused positioning information is determined as available positioning information.

[0075] In some embodiments, when the positioning terminal determines that the positioning accuracy of the GNSS positioning information does not meet the accuracy conditions, the GNSS positioning information is unavailable, indicating that the positioning terminal may be in a no-signal environment at this time, and the positioning terminal cannot obtain the GNSS signal, or the positioning terminal is still in a weak signal environment, but the positioning terminal receives a GNSS signal containing GNSS positioning information with lower positioning accuracy. This GNSS positioning information cannot participate in the subsequent positioning of the positioning terminal.

[0076] Step 404: When the GNSS positioning information is unavailable and there is no historical fusion positioning information, exit positioning.

[0077] In some embodiments, the historical fused positioning information is the fusion result of historical GNSS positioning and historical PDR positioning. When the GNSS positioning information is not available and there is no historical fused positioning information, it indicates that the positioning terminal has never performed positioning in a weak signal environment involving GNSS positioning and PDR positioning at any time in history. At this time, the positioning terminal cannot obtain available positioning information, and the positioning terminal directly exits positioning.

[0078] To sum up, in the above embodiments, when the scene recognition result indicates that it is in a weak signal scene, the positioning terminal first determines whether the GNSS positioning information is available. When the scene recognition result indicates that it is in a weak signal scene, the availability of the GNSS positioning information is determined. If available, the GNSS positioning information can participate in the subsequent positioning of the positioning terminal. When the GNSS positioning information is not available, it is determined whether there is historical fused positioning information. If so, the historical fused positioning information is determined as available positioning information. Otherwise, the positioning is directly exited, thereby ensuring that the positioning terminal can obtain accurate and available positioning information, so that subsequent positioning terminals can further locate according to the accurate and available positioning information.

[0079] During the positioning process, the user may carry the positioning terminal in different ways, such as holding the positioning terminal in hand, or swinging the positioning terminal naturally. The different ways of carrying the positioning terminal by the user will lead to different movement trajectories of the positioning terminal. Different movement trajectories will affect the PDR heading angle calculated by the positioning terminal PDR positioning, thereby affecting the accuracy of PDR positioning. To improve the accuracy of PDR positioning and obtain accurate target positioning results, after obtaining available positioning information, identify the mode of the user carrying the positioning terminal, perform PDR positioning based on different carrying modes, and obtain the target positioning results. Please refer to Figure 5 , which shows a flowchart of a PDR positioning process provided by an exemplary embodiment of the present application, the method includes:

[0080] Step 501, perform carrying mode identification to obtain the current carrying mode.

[0081] In some embodiments, the carrying mode may include a handheld mode and a carrying mode, wherein, in the handheld mode, the user carries the positioning terminal in a handheld manner (without swinging the arm), and in the carrying mode, the user holds the positioning terminal and naturally swings the arm to move. The positioning terminal can obtain the acceleration data corresponding to the positioning terminal collected by the accelerometer, analyze the acceleration data, and determine the current carrying mode of the positioning terminal by comparing the size relationship between the sub-axis accelerations.

[0082] In a possible application scenario, the current carrying mode can be obtained by the following method:

[0083] 1. Get the acceleration variance in each coordinate axis direction.

[0084] In some embodiments, the positioning terminal obtains data collected by a three-axis accelerometer to obtain accelerations in the directions of the x-axis, y-axis, and z-axis coordinates, such as Figure 6 As shown, it shows a schematic diagram of the coordinate axes of the positioning terminal provided by an exemplary embodiment of the present application, wherein the z-axis is perpendicular to the positioning terminal screen, the x-axis is the width direction of the positioning terminal, the y-axis is the length direction of the positioning terminal, and the variance of the acceleration in the direction of each coordinate axis is taken.

[0085] 2. When the z-axis acceleration variance is greater than the x-axis acceleration variance, and the z-axis acceleration variance is greater than the y-axis acceleration variance, or the z-axis acceleration variance is greater than the x-axis acceleration variance, and the difference between the z-axis acceleration variance and the y-axis acceleration variance is less than the difference threshold, it is determined that the current carrying mode is the handheld mode.

[0086] In some embodiments, when the carrying mode is the handheld mode, during walking, because the user holds the positioning terminal and moves forward, the movement amplitude of the terminal in the width direction of the positioning terminal is small, and when the user walks at a constant speed, the movement amplitude of the positioning terminal in the length direction of the positioning terminal is also small, but affected by the user's walking gait (stepping action), the movement amplitude of the terminal in the vertical positioning terminal screen direction is large. The change in the magnitude of the movement amplitude can be represented by the acceleration variance. Therefore, according to the magnitude relationship between the three-axis acceleration variances of the positioning terminal, the current carrying mode of the positioning terminal can be determined, that is, when the z-axis acceleration variance is greater than the x-axis acceleration variance, and the z-axis acceleration variance is greater than the y-axis acceleration variance, it can be determined that the current carrying mode is the handheld mode. For example, the x-axis acceleration variance VarX, the y-axis acceleration variance VarY, and the z-axis acceleration variance VarZ, then the positioning terminal considers that the carrying mode corresponding to the positioning terminal is the handheld mode when VarZ>VarX and VarZ>VarY are satisfied.

[0087] In addition, during walking, when the user is walking at a non-uniform speed (sudden acceleration or deceleration), the movement amplitude of the positioning terminal in the length direction of the positioning terminal is large, and may even be slightly larger than the movement amplitude of the terminal in the direction perpendicular to the positioning terminal screen, while the user holds the positioning terminal and moves forward, and the movement amplitude of the terminal in the width direction of the positioning terminal is always small. In the case where the movement amplitude in the length direction of the positioning terminal is slightly larger than the movement amplitude in the direction perpendicular to the positioning terminal screen, the positioning terminal is still considered to be in handheld mode, that is, when the z-axis acceleration variance is greater than the x-axis acceleration variance, and the difference between the z-axis acceleration variance and the y-axis acceleration variance is less than the difference threshold, the current carrying mode is determined to be the handheld mode. For example, the x-axis acceleration variance VarX, the y-axis acceleration variance VarY, and the z-axis acceleration variance VarZ, the difference threshold is 0.5, then the positioning terminal satisfies: VarZ>VarX and VarZ+0.5>VarY, and the carrying mode corresponding to the positioning terminal is considered to be the handheld mode.

[0088] 3. When the z-axis acceleration variance is smaller than the x-axis acceleration variance, and the z-axis acceleration variance is smaller than the y-axis acceleration variance, it is determined that the current carrying mode is the swing arm mode.

[0089] In some embodiments, when the carrying mode is the swinging arm mode, during walking, the user naturally swings his arm when holding the positioning terminal forward, and the movement amplitude of the positioning terminal in the width direction and the length direction of the positioning terminal is large, while the movement amplitude of the positioning terminal in the vertical positioning terminal screen direction is small. Therefore, according to the size relationship between the three-axis acceleration variances of the positioning terminal, the current carrying mode of the positioning terminal can be determined, that is, when the z-axis acceleration variance is less than the x-axis acceleration variance, and the z-axis acceleration variance is less than the y-axis acceleration variance, the positioning terminal determines that the current carrying mode is the swinging arm mode. For example, the x-axis acceleration variance VarX, the y-axis acceleration variance VarY, and the z-axis acceleration variance VarZ, then the positioning terminal considers that the carrying mode corresponding to the positioning terminal is the swinging arm mode when VarX>VarZ and VarY>VarZ are satisfied.

[0090] Step 502, determining PDR parameters based on the current carrying mode and sensor data.

[0091] In some embodiments, the PDR parameters include a PDR heading angle, and the determined PDR heading angle may vary depending on the carrying mode of the positioning terminal.

[0092] In a possible implementation, the PDR parameter may be obtained in the following manner:

[0093] 1. When the current carrying mode is the handheld mode, the PDR heading angle is determined based on the rotation vector data at the current moment.

[0094] In some embodiments, when the current carrying mode is the handheld mode, the positioning terminal can directly obtain the rotation vectors in various directions from the rotation vector sensor (android Rotation Vector), obtain the rotation matrix composed of Euler angles based on the rotation vector, and then use the rotation matrix to calculate the yaw angle. Based on the rotation vector data at the current moment, the heading angle is determined. The heading angle is the magnetic heading angle. According to the WMM (World Magnetic Model), the magnetic declination corresponding to the location of the positioning terminal is obtained, and the heading angle is corrected using the magnetic declination to obtain the PDR heading angle.

[0095] 2. When the current carrying mode is the swing arm mode, the pitch angle and heading angle at each moment are determined based on the rotation vector data; when the pitch angle at the i-th moment is in opposite directions to the pitch angle at the i+1-th moment, the target heading angle at the lowest point of the swing arm trajectory is determined based on the pitch angles and heading angles at the i-th moment and the i+1-th moment; the target heading angle is determined as the PDR heading angle.

[0096] In some embodiments, Figure 7 As shown, it shows a schematic diagram of determining the PDR heading angle provided by an exemplary embodiment of the present application. When the current carrying mode is the swing arm mode, the pitch angle of the positioning terminal changes greatly during walking. In order to avoid excessive errors in the determined heading angle, after the positioning terminal obtains the rotation vectors in various directions from the rotation vector sensor, the pitch angle and heading angle of the positioning terminal at each moment are first determined based on the rotation vector, thereby determining the target heading angle at the lowest point of the swing arm trajectory, and determining the target heading angle as the PDR heading angle. When the positioning terminal is at the lowest point of the swing arm trajectory, the direction of the pitch angle of the positioning terminal at the previous moment (not reaching the lowest point) is opposite to the direction of the pitch angle at the next moment (passing the lowest point). Since the moment when the pitch angle is 0 (at the lowest point) may not be obtained in the actual positioning process, the heading angle at the lowest point can be calculated by the following formula:

[0097]

[0098] In the formula, is the target heading angle, θ1 is the pitch angle at the i-th moment, is the heading angle at the i-th moment, θ2 is the pitch angle at the i+1-th moment, is the heading angle at the i+1th moment.

[0099] When the pitch angle at the i-th moment is in opposite directions to the pitch angle at the i+1-th moment, the target heading angle at the lowest point of the swing arm trajectory is determined based on the pitch angles and heading angles at the i-th moment and the i+1-th moment; the target heading angle is determined as the PDR heading angle to obtain a rotation matrix composed of Euler angles, and then the rotation matrix is ​​used to calculate the yaw angle. The heading angle is determined based on the rotation vector data at the current moment, and the heading angle is the magnetic heading angle. The magnetic declination corresponding to the location of the positioning terminal is obtained according to the WMM (World Magnetic Model), and the heading angle is corrected using the magnetic declination to obtain the PDR heading angle.

[0100] In a possible implementation, after the carrying mode of the current positioning terminal is identified, it is necessary to further verify whether the identified carrying mode is accurate, so as to obtain accurate PDR parameters. The identified carrying mode can be verified in the following manner:

[0101] 1. Generate a historical combined acceleration sequence based on the mean and variance of the historical combined acceleration.

[0102] In a possible implementation, the positioning terminal obtains the combined acceleration collected by the accelerometer at the historical collection time, takes the mean and variance of the historical combined acceleration within a period of historical time, normalizes the historical combined acceleration based on the mean and variance, and generates a historical combined acceleration sequence.

[0103] 2. When the sequence matching degree between the historical combined acceleration sequence and the reference combined acceleration sequence corresponding to the current carrying mode is greater than the matching degree threshold, the PDR parameter is determined based on the current carrying mode and the sensor data.

[0104] In a possible implementation, the reference combined acceleration sequence includes a reference combined acceleration sequence in handheld mode and a reference combined acceleration sequence in swing arm mode, both of which are sequences generated based on sample acceleration data in corresponding carrying modes. The positioning terminal matches the historical combined acceleration sequence with the reference combined acceleration sequence corresponding to the current carrying mode through DTW (Dynamic Time Warping) to determine whether the matching degree exceeds the matching degree threshold, and further determines whether the carrying mode corresponding to the current positioning terminal is accurately identified by judging the matching of the historical combined acceleration sequence with the reference combined acceleration sequence. For example, when the current carrying mode is handheld mode, DTW is used to match the historical combined acceleration sequence with the reference combined acceleration sequence in handheld mode. When the matching degree is 0.8, which is less than the matching degree threshold of 0.6, it is considered that the carrying mode of the positioning terminal is consistent with the handheld mode. At this time, the positioning terminal can determine the PDR parameters based on sensor data (such as data of the rotation vector sensor).

[0105] Step 503: Perform PDR positioning based on the available positioning information and PDR parameters to obtain a target positioning result.

[0106] In some embodiments, the terminal processes the available positioning information and PDR parameters in combination with the PDR algorithm to obtain PDR positioning information. After obtaining the PDR positioning information, the terminal further positions based on the PDR positioning information and the available positioning information to obtain a target positioning result.

[0107] In a possible implementation manner, the PDR positioning information may be obtained in the following manner:

[0108] The positioning terminal processes the available positioning information and PDR parameters in combination with the PDR algorithm, wherein the PDR algorithm mainly includes three parts: gait detection (step counting), step length calculation, and azimuth calculation. When an initial position is given, gait detection data such as the time it takes for the user to take a step with the terminal is obtained through gait detection, and the step length of the user's step is calculated based on the gait detection data. At the same time, azimuth calculation is performed, and the heading information is determined based on the heading angle in the PDR parameters. The initial position is updated through the heading information and step length, and the position information of the user from the initial position to the next step is obtained. The PDR positioning information includes the position information and heading information. Therefore, the positioning terminal processes the available positioning information and PDR parameters in combination with the PDR algorithm to obtain the process of PDR positioning information, that is, taking the available positioning information as the initial position in the PDR algorithm, and performing gait detection, step length calculation, and azimuth calculation based on the initial position in combination with the PDR parameters to obtain the PDR positioning information.

[0109] Optionally, the gait detection part in the PDR algorithm can be detected using the peak and trough method. The positioning terminal obtains the acceleration data collected by the accelerometer, generates a waveform of acceleration and time, excludes the pseudo peaks and pseudo valleys in the waveform, and takes the largest amplitude between adjacent peaks and valleys as the true peak or true valley. The amplitude and corresponding walking time are obtained based on the true peak and true valley. The positioning terminal first obtains the three-axis acceleration collected by the accelerometer, takes the root mean square of the three-axis acceleration, and then takes the average of the root mean square, and stores the result as a eigenvalue in an acceleration analysis array of a fixed size. Then, the trough point is found in the analysis array. To prevent a false trough from being obtained, the trough point is selected from a fixed position in the acceleration analysis array. For example, the size of the acceleration analysis array is 100, and the trough point is fixedly selected from the 15th point in the array. If the eigenvalue corresponding to a point in the array is smaller than the eigenvalues ​​corresponding to the left and right points, the point is marked as a trough. Then, the peak point is found in the analysis array. To prevent false peaks, the acceleration analysis array is traversed. If the eigenvalue of a point is greater than the eigenvalue threshold, and the 2 times of the corresponding eigenvalue of the point is greater than the sum of the eigenvalues ​​of the left and right points, the point is marked as a peak. The one with the largest amplitude is selected as the peak among the adjacent peaks; the one with the smallest amplitude is selected as the trough among the adjacent troughs. The positioning terminal calculates the amplitude and walking time of each step based on the peak points and trough points. If the amplitude is greater than the amplitude threshold and the corresponding walking time is within the time range, it is considered that the user has taken a step. For example, the amplitude is greater than 3M / s 2 , and the walking time is between 0.3s and 1s, it is counted as one step taken by the user.

[0110] Optionally, the amplitude obtained by gait detection and the walking time of one step are input into a step length estimation model to obtain the single step length of the user, wherein the step length estimation model can be expressed as the following formula:

[0111] S=a+b*T+c*A

[0112] Wherein, S represents the step length, T is the walking time of one step, A is the amplitude obtained by gait detection, a, b, and c are all fixed coefficients, and a, b, and c can be obtained by fitting a series of acceleration sample data and step length sample data through the least squares method.

[0113] Optionally, the positioning terminal determines the PDR parameter (ie, the PDR heading angle) determined by the current carrying mode as the heading information corresponding to the positioning terminal.

[0114] To sum up, in the above embodiment, after the positioning terminal obtains the available positioning information, the positioning terminal first performs carrying mode recognition to determine whether the mode of the user carrying the terminal is handheld mode or swing arm mode, and determines different PDR parameters according to the current different carrying modes and sensor data, so as to perform PDR positioning based on the available positioning information and the determined PDR parameters to obtain the target positioning result, reduce the error caused by the user's carrying mode during the positioning process, and thus improve the positioning accuracy.

[0115] After obtaining the available positioning information, the positioning terminal performs PDR positioning based on the available positioning information to obtain the target positioning result, wherein the available positioning information may be GNSS information or historical fusion positioning information. When the available positioning information is GNSS information, it means that although the terminal is in a weak signal environment at this time, it can still receive a good GNSS signal, so PDR is performed based on the GNSS information to obtain the target positioning result; however, when the available positioning information is historical fusion positioning information, it means that the positioning terminal may be in a no-signal environment and cannot receive the GNSS signal, or the positioning terminal is in a weak signal environment and cannot receive a good GNSS signal, therefore, PDR is performed based on the historical fusion positioning information to obtain the target positioning result.

[0116] When the available positioning information is GNSS positioning information, the GNSS positioning information and the PDR positioning information are fused to obtain the target positioning result.

[0117] In some embodiments, when the available positioning information is GNSS positioning information, it means that the positioning terminal is in a weak signal environment, and at this time the positioning terminal can receive a GNSS signal of good quality, and the GNSS signal is suitable for positioning. Therefore, when the GNSS positioning method gives an available positioning information and the PDR method also gives an available positioning information, the two positioning information are fused to obtain a more accurate target positioning result.

[0118] In a possible implementation, the following method may be used to fuse the GNSS positioning information and the PDR positioning information to obtain a target positioning result:

[0119] 1. Based on the GNSS positioning information and the PDR positioning information at the same time, determine the positioning error between the GNSS positioning and the PDR positioning, where the positioning error includes at least one of a first direction position error, a second direction position error, a first direction speed error, a second direction speed error, and a heading error.

[0120] In some embodiments, the positioning error may include at least one of a first direction position error, a second direction position error, a first direction speed error, a second direction speed error, and a heading error. For example, the positioning error may include: a first direction position error, a first direction speed error, and a heading error. Determining the positioning error between GNSS positioning and PDR positioning can enable subsequent filtering based on the positioning error to obtain a target positioning error. The more types of errors the positioning error contains, the more accurate the target positioning error obtained subsequently.

[0121] In a possible implementation, the GNSS positioning information includes the position information, speed information and heading information corresponding to the positioning terminal, wherein the position information may include the position information in the four directions of north, south, east and west. Similarly, the PDR positioning information also includes the heading information corresponding to the positioning terminal, the position information in the four directions and the speed information in the four directions. Since the position of the positioning terminal can be determined based on the position information in two mutually perpendicular directions, when calculating the position error between the GNSS positioning and the PDR positioning, it is only necessary to calculate the error between the GNSS positioning and the PDR positioning in the two mutually perpendicular directions, and the speed error is similar. For example, the position error in the first direction is the difference between the GNSS north position and the PDR north position, and the position error in the second direction is the difference between the GNSS east position and the PDR east position. Accordingly, the speed error in the first direction is the difference between the GNSS north speed and the PDR north speed, and the speed error in the second direction is the difference between the GNSS east speed and the PDR east speed. The heading error is the deviation angle between the GNSS heading information and the PDR heading information.

[0122] 2. Perform Kalman filtering on the positioning error to obtain the target positioning error.

[0123] In some embodiments, random noise in the process of obtaining the positioning error can be filtered out by Kalman filtering to obtain the optimal estimate of the positioning error, and the optimal estimate is used as the target positioning error to subsequently correct the GNSS positioning information or PDR positioning information based on the target positioning error.

[0124] In a possible implementation, the positioning errors between GNSS positioning and PDR positioning, i.e., the first direction position error, the second direction position error, the first direction velocity error, the second direction velocity error and the heading error, are input into the Kalman filter as state vectors. The Kalman filter is mainly divided into two parts, a prediction part and an update part. The prediction part obtains the predicted value of the state quantity at the next moment based on the state quantity and the observation quantity at the previous moment, and the update part obtains the optimal estimated value of the state quantity based on the predicted value of the state quantity at the next moment and the observation quantity at the next moment.

[0125] For example, the first direction position error δNP k is the difference between the GNSS north position and the PDR north position, and the second direction position error δEP k is the difference between the GNSS east position and the PDR east position. Correspondingly, the velocity error in the first direction δNV k is the difference between the GNSS north velocity and the PDR north velocity, and the second direction velocity error δEV k is the difference between the GNSS east velocity and the PDR east velocity, the heading error is the deviation angle between the GNSS heading information and the PDR heading information. These five errors are input into the Kalman filter as state quantities, and the corresponding equation of the prediction part is:

[0126]

[0127]

[0128] in, t k The predicted value of the state quantity at time t k-1 The optimal estimate of the state quantity at the moment, is the state transfer matrix, P k (-) is t k The predicted value of the variance-covariance matrix at the moment, P k-1 (+) is t k-1 The optimal estimate of the variance-covariance matrix at time , is the system noise variance covariance matrix. Among them, The state transfer matrix can be expressed as follows.

[0129]

[0130] Where t is t k-1 Time to t k The time interval between the moments, correspondingly, the corresponding equation of the update part is:

[0131]

[0132]

[0133]

[0134] in, t k The optimal estimate of the state quantity at time z k t k The observed quantity at time, K k is the gain matrix, t k The observation state matrix at time, R k is the measurement noise variance-covariance matrix, P k (+) is t k The optimal estimate of the variance-covariance matrix at time t is , and I is the unit matrix. In the case where the GNSS positioning information is corrected with the target positioning error, t k The observed quantity z at time k It can be expressed as the following formula:

[0135]

[0136] Among them, PDR first direction position NPpdr k , PDR second direction position EPpdr k , PDR first direction speed NVpdr k , PDR second direction speed EVpdr k , PDR heading GNSS first direction position NPgnss k , GNSS second direction position EPgnss k , GNSS first direction speed NVgnss k , GNSS second direction speed EVgnss k , GNSS heading φgnss k .

[0137] Optionally, when the PDR positioning information is corrected using the target positioning error, z k In the equation, the observed GNSS positioning information is used as the subtraction, as shown in the following formula:

[0138]

[0139] 3. Correct the GNSS positioning information or PDR positioning information based on the target positioning error to obtain the target positioning result.

[0140] In some embodiments, the target positioning error includes a target first direction position error, a target second direction position error, a target first direction speed error, a target second direction speed error, and a target navigation error. When the target positioning error is used to correct the GNSS positioning information, the GNSS first direction position and the GNSS second direction position observed at the current moment are added with the target first direction position error and the target second direction position error, respectively. Accordingly, the GNSS first direction speed and the GNSS second direction speed observed at the current moment are corrected with the target first direction speed error and the target second direction speed error, respectively, and the GNSS heading is corrected with the target GNSS heading error to obtain the corrected GNSS first direction position and GNSS second direction position. The corrected GNSS first direction position, GNSS second direction position, GNSS first direction speed, GNSS second direction speed, and GNSS heading are used as the target positioning result.

[0141] Optionally, when the PDR positioning information is corrected with the target positioning error, the PDR first direction position and PDR second direction position observed at the current moment are added with the target first direction position error and target second direction position error, respectively; accordingly, the PDR first direction speed and PDR second direction speed observed at the current moment are corrected with the target first direction speed error and target second direction speed error, respectively, and the PDR heading is corrected with the target PDR heading error to obtain the corrected PDR first direction position and PDR second direction position; the corrected PDR first direction position, PDR second direction position, PDR first direction speed, PDR second direction speed and PDR heading are used as the target positioning result.

[0142] In a possible implementation manner, when the GNSS positioning information is corrected using the target positioning error, t k-1 The corrected GNSS first direction position obtained at the time plus the corrected GNSS first direction speed multiplied by the current time (t k-1 time) to the next time (t k time) time interval, we can get t k The predicted value of the GNSS first direction position at time t k-1 The corrected GNSS second direction position obtained at time t plus the corrected GNSS second direction velocity multiplied by t k-1 Time to t k The time interval can be obtained as t k Similarly, the PDR side can also obtain the predicted value of the GNSS second direction position at time t kThe predicted value of the first direction position of the PDR at the moment is the predicted value of the second direction position of the PDR, so that the difference between the predicted value of the first direction position of the GNSS and the predicted value of the first direction position of the PDR can be used as the predicted value of the first direction position error, and the difference between the predicted value of the second direction position of the GNSS and the predicted value of the second direction position of the PDR can be used as the predicted value of the second direction position error. The predicted value of the first direction position error and the predicted value of the second direction position error can be used as the predicted value of the first direction position error in step 2. k The predicted value of the state quantity at time t k The optimal estimate of the positioning error is calculated at this moment.

[0143] Optionally, in the process of fusing GNSS positioning information and PDR positioning information, when the available positioning information is GNSS positioning information and the positioning accuracy of the PDR positioning information meets the accuracy conditions, the GNSS positioning information and the PDR positioning information can be fused to obtain the target positioning result.

[0144] When the available information is GNSS positioning information, it indicates that the GNSS positioning information meets the accuracy requirements at this time. In the process of fusing the GNSS positioning information and the PDR positioning information, it is also necessary to ensure that the PDR positioning information meets the accuracy requirements, so as to obtain a more accurate target positioning result through fusion.

[0145] In a possible implementation manner, the positioning accuracy of the PDR positioning information can be obtained in the following manner:

[0146] To determine the PDR positioning accuracy, it is necessary to determine the error generated in the PDR process. Since PDR obtains PDR positioning information through gait detection (step counting), step length calculation and azimuth calculation, the PDR error mainly comes from step length calculation and azimuth calculation. Therefore, the PDR error can be calculated from the step length error and heading error. When the PDR error is less than the error threshold, it can be considered that the PDR positioning information obtained at this time meets the accuracy requirements.

[0147] like Figure 8 As shown, it shows a schematic diagram of determining the PDR positioning accuracy provided by an exemplary embodiment of the present application. In the figure, O1 is the starting point of PDR, the user holds the terminal starting from O1 and travels to O2, O2 is the end point that the user actually walks to, O1-O2 is the actual walking track of the user holding the positioning terminal, and the step length error is generated due to the step length calculation during the PDR process. When only the step length error is considered, the pedestrian position calculated by PDR may be located at a difference of σ from the actual end point O2. s Since heading error will be generated in the PDR process, the pedestrian position calculated by PDR may be located at a heading error σ2 away from the actual end point O2 if only the heading error is considered.g The corresponding angle is point O3 or point O4. When both the step error and the heading error exist, the estimated pedestrian position may be at point A1, point A2, point B1 or point B2.

[0148] The relationship between PDR error, step error and heading error can be defined as:

[0149]

[0150] In the above formula, σ represents the PDR error is the step error, is the heading error.

[0151] Among them, regarding the step length error, the step length error can be modeled as Gaussian random noise, and the step length error is calculated based on the following formula.

[0152] S i =S+ω i

[0153] ω i ~N(0,σ 2 )

[0154]

[0155] Among them, S i is the actual step length, S is the step length calculated according to the step length model, ω i is the step size error of a single step, σ 2 is the variance of Gaussian noise, n is the number of steps, and n can be obtained by gait detection of PDR.

[0156] The heading error is mainly caused by the heading drift caused by the built-in gyroscope of the terminal. The curve with the maximum deviation from the actual route caused by the heading drift is regarded as a circle with a radius of R. The heading error can be calculated based on the following formula:

[0157] R=L / θ

[0158] σ G =R(1-cosθ)

[0159] Among them, L is the cumulative step length obtained by step length extrapolation during the PDR process, and θ is the heading drift caused by the gyroscope. θ can be calculated based on the zero bias instability of the gyroscope and the walking time.

[0160] When the available positioning information is historical fused positioning information, PDR positioning is performed using the historical fused positioning information as initial positioning information to obtain the target positioning result.

[0161] In some embodiments, when the available positioning information is historical fused positioning information, it indicates that the positioning terminal is in a no-signal environment and cannot obtain the GNSS signal, or the positioning terminal is still in a weak signal environment and the quality of the currently obtained GNSS signal is poor and is not suitable for positioning. In this case, the historical fused positioning information of the positioning terminal at the previous moment can be obtained, and the historical fused positioning information can be used as the initial positioning information combined with the PDR algorithm to perform positioning to obtain PDR positioning information, and the PDR positioning information can be used as the target positioning result.

[0162] In some embodiments, if the positioning terminal cannot obtain the historical fusion positioning information of the previous moment, but there is historical fusion positioning information at the historical moment, the positioning terminal obtains the PDR information of the previous moment. Then, the positioning terminal uses the PDR information of the previous moment as the initial positioning information in the PDR positioning, combines the PDR algorithm for positioning, and obtains the PDR positioning information corresponding to the current moment. The positioning terminal determines the obtained PDR positioning information corresponding to the current moment as the target positioning result corresponding to the positioning terminal at position 3.

[0163] Optionally, when the available positioning information is historical fused positioning information and the positioning accuracy of the historical fused positioning information meets the accuracy condition, PDR positioning is performed using the historical fused positioning information as initial positioning information to obtain a target positioning result.

[0164] When the available information is historical fused positioning information, determine whether the historical fused positioning information meets the accuracy requirements. If the historical fused positioning information meets the accuracy requirements, perform PDR based on the initial positioning information to obtain more accurate PDR positioning information, thereby fusing to obtain a more accurate target positioning result.

[0165] In summary, in the above embodiments, when the available positioning information is GNSS positioning information, the positioning terminal determines the positioning error between GNSS positioning and PDR positioning, and obtains an accurate target positioning error through Kalman filtering. The target positioning error is used to correct the GNSS positioning information or PDR positioning information, thereby obtaining a target positioning result with higher accuracy. When the available positioning information is historical fused positioning information, the historical fused positioning information is used as the initial positioning information combined with the PDR algorithm to obtain PDR positioning information, and the PDR positioning information is used as the target positioning result. In this way, when the GNSS signal cannot be obtained or the GNSS signal is poor, the positioning terminal can still obtain the available positioning information for PDR positioning, thereby improving the success rate of PDR positioning. In addition, the positioning terminal can use the PDR algorithm to infer the positioning information at the next moment based on the accurate historical fused positioning information at the previous moment, thereby improving the accuracy of the target positioning result.

[0166] In one possible application scenario, since PDR is suitable for estimating the user's walking positioning, it is possible to determine whether the user's current walking state is walking by the user's walking speed. When the user is moving at a low speed, PDR positioning is performed based on the available positioning information to obtain the target positioning result.

[0167] In some embodiments, the positioning terminal obtains speed information in the GNSS positioning information, determines whether the positioning terminal is in a low-speed state, and in the case of being in a low-speed state, the positioning terminal performs PDR positioning based on the available positioning information to obtain a target positioning result, and the low-speed state refers to a state in which the movement speed corresponding to the positioning terminal at consecutive moments is less than a speed threshold. The positioning terminal performs PDR positioning based on the available positioning information to obtain a target positioning result. The process can refer to the above embodiment. When the available positioning information is GNSS positioning information, the GNSS positioning information and the PDR positioning information are fused to obtain a target positioning result, or when the available positioning information is historical fused positioning information, PDR positioning is performed with the historical fused positioning information as the initial positioning information to obtain a target positioning result, which will not be repeated here.

[0168] The following takes the scenario where a user carries a positioning terminal and walks to locate in a weak signal environment as an example to introduce an embodiment based on the above positioning method. Fig. 9 As shown, Fig. 9 A flowchart of a positioning process provided by an exemplary embodiment of the present application is shown.

[0169] In step 901, the positioning terminal first performs scene recognition. The positioning terminal obtains the current carrier-to-noise ratio mean and the current carrier-to-noise ratio variance of the current GNSS signal, as well as the historical carrier-to-noise ratio mean of the historical GNSS signal, so that the positioning terminal can determine whether the signal environment in which the current positioning terminal is located is a weak signal environment through the current carrier-to-noise ratio mean, the current carrier-to-noise ratio variance and the historical carrier-to-noise ratio mean, and obtain the scene recognition result.

[0170] Step 902: The positioning terminal determines whether the positioning terminal is currently in a weak signal scene according to the scene recognition result.

[0171] Step 903, when the scene recognition result indicates that the current positioning terminal is in a weak signal scene, the positioning terminal obtains the speed information in the GNSS positioning information, determines whether the speed information of the positioning terminal exceeds the speed threshold, and thus determines whether the positioning terminal is in a low-speed state. If the positioning terminal is not in a low-speed state, the positioning is exited.

[0172] Step 904: When the positioning terminal is in a low-speed state, the positioning terminal determines whether the GNSS positioning information is available, thereby determining whether the positioning terminal can obtain the GNSS signal at this time, and when the positioning terminal can obtain the GNSS signal, determines whether the accuracy of the GNSS positioning information corresponding to the GNSS signal is suitable for positioning. The positioning terminal can obtain the positioning accuracy of the GNSS positioning information, and determine whether the GNSS positioning information is available by determining whether the positioning accuracy of the GNSS positioning information meets the accuracy condition.

[0173] Step 905, when the GNSS positioning information is available, it indicates that the GNSS positioning information can be used as available positioning information to participate in the subsequent positioning of the positioning terminal. In this case, the positioning terminal performs carrying mode recognition to determine whether the mode in which the user carries the positioning terminal is a handheld mode or a swing arm mode. The positioning terminal thus determines different PDR parameters based on different carrying modes and sensor data to perform subsequent PDR positioning. The positioning terminal can obtain the acceleration data corresponding to the positioning terminal collected by the accelerometer, analyze the acceleration data, and compare the size relationship between the variances of the sub-axis accelerations to determine whether the carrying mode of the current positioning terminal is a handheld mode or a swing arm mode. After preliminarily identifying the carrying mode of the current positioning terminal, the historical combined acceleration sequence of the positioning terminal can also be matched with the reference combined acceleration sequence to further verify whether the identified carrying mode is accurate.

[0174] Step 906, determine the PDR parameters, which include the PDR heading angle. Depending on the different carrying modes of the positioning terminal, the determined PDR heading angle is also different. The positioning terminal can directly obtain the rotation vector data in each direction from the rotation vector sensor. When the current carrying mode is the handheld mode, the positioning terminal uses the rotation vector data at the current moment to determine the PDR heading angle; when the current carrying mode is the swing arm mode, the positioning terminal uses the rotation vector data to determine the pitch angle and heading angle at each moment; when the pitch angle at the i-th moment is opposite to the pitch angle at the i+1-th moment, the target heading angle at the lowest point of the swing arm trajectory is determined based on the pitch angle and heading angle at the i-th moment and the i+1-th moment, thereby determining the target heading angle as the PDR heading angle.

[0175] Step 907: The positioning terminal performs PDR positioning based on the available positioning information (GNSS positioning information) and the determined PDR parameters to obtain PDR positioning information. The positioning terminal can process the available positioning information and PDR parameters in combination with the PDR algorithm, and use the GNSS positioning information as the initial positioning information in the PDR algorithm, and perform gait detection, step length calculation and azimuth calculation based on the initial positioning information and the PDR parameters, and update the initial positioning information to obtain PDR positioning information. The PDR obtains gait detection data such as the time it takes for the user to take a step with the terminal through gait detection, calculates the step length of the user's step based on the gait detection data, and performs azimuth calculation at the same time, determines the heading information based on the heading angle in the PDR parameters, and updates the initial positioning information through the heading information and step length, and obtains the positioning information of the user from the initial position to the next step, and obtains the PDR positioning information. The PDR positioning information includes the position information and heading information.

[0176] Step 908, after obtaining the PDR positioning information, the positioning terminal determines the positioning error between the GNSS positioning and the PDR positioning, and performs Kalman filtering on the positioning error to obtain an accurate target positioning error. The positioning terminal determines the positioning error between the GNSS positioning and the PDR positioning based on the GNSS positioning information and the PDR positioning information at the same time. The positioning error includes a first direction position error, a second direction position error, a first direction speed error, a second direction speed error, and a heading error. The above five errors are used as state quantities to perform Kalman filtering, and random noise in the process of obtaining the positioning error is filtered out to obtain the optimal estimate of the positioning error. The optimal estimate is used as the target positioning error, so that the positioning terminal corrects the GNSS positioning information or the PDR positioning information based on the target positioning error.

[0177] Step 909: The positioning terminal uses the target positioning error to correct the GNSS positioning information or the PDR positioning information, thereby obtaining a target positioning result with high accuracy. The target positioning error includes the target first direction position error, the target second direction position error, the target first direction speed error, the target second direction speed error, and the target navigation error. The positioning terminal adds the target first direction position error and the target second direction position error to the GNSS first direction position and the GNSS second direction position observed at the current moment, respectively. Accordingly, the GNSS first direction speed and the GNSS second direction speed observed at the current moment are corrected by the target first direction speed error and the target second direction speed error, respectively, and the GNSS heading is corrected by the target GNSS heading error to obtain the corrected GNSS first direction position and the GNSS second direction position, and the corrected GNSS first direction position, the GNSS second direction position, the GNSS first direction speed, the GNSS second direction speed, and the GNSS heading are used as the target positioning result.

[0178] Step 910, based on the judgment result of step 904, when the GNSS positioning information is not available, the positioning terminal determines whether there is historical fusion positioning information, and if there is historical fusion positioning information, the historical fusion positioning information is used as available positioning information, so that the positioning terminal can still perform PDR positioning based on the available positioning information, thereby improving the success rate of PDR positioning; if there is no historical fusion positioning information, the positioning terminal directly exits.

[0179] Step 911, when there is historical fused positioning information, the positioning terminal determines the historical fused positioning information as available positioning information, uses the historical fused positioning information as the initial positioning information combined with the PDR algorithm for positioning, obtains PDR positioning information, and uses the PDR positioning information as the target positioning result. The process of obtaining PDR positioning information by PDR positioning can refer to step 907 and will not be repeated here.

[0180] In a possible application scenario, please refer to Fig.10 , which shows a schematic diagram of an implementation of a positioning process provided by an exemplary embodiment of the present application.

[0181] In an open environment with no obstructions or few obstructions, the positioning terminal can receive a strong GNSS signal and thus obtain accurate GNSS positioning information. However, when there are many obstructions in the environment, the GNSS signal received by the positioning terminal is weak, resulting in the GNSS positioning information obtained by the positioning terminal being inaccurate. Even in a no-signal scenario, the positioning terminal cannot receive a GNSS signal and cannot obtain GNSS positioning information.

[0182] Therefore, if Fig.10 As shown, the user holds the positioning terminal (smartphone) and walks from an open area to indoors. The house as an obstruction will affect the process of the positioning terminal receiving the GNSS signal. The user first moves to position 1, which is outside the house. At this position, the positioning terminal can receive the GNSS signal, and the positioning terminal performs scene recognition based on the carrier-to-noise ratio of the received GNSS signal to obtain a scene recognition result. Since the positioning terminal is less obstructed by the house at position 1, the influence of the house obstruction on the received GNSS signal is limited, so the scene recognition result indicates that the positioning terminal is in a normal signal scene. At this time, the positioning terminal determines that the accuracy of the acquired GNSS positioning information meets the accuracy requirements for GNSS positioning in a normal signal scene. Therefore, the positioning terminal determines the GNSS positioning information as the target positioning result corresponding to the positioning terminal at position 1.

[0183] Then, the user moves from position 1 to position 2, which is located indoors, near the entrance of the house. At this position, the positioning terminal can receive the GNSS signal, and the positioning terminal performs scene recognition based on the carrier-to-noise ratio of the received GNSS signal to obtain a scene recognition result. Due to the influence of the house occlusion on the received GNSS signal, the scene recognition result indicates that the positioning terminal is in a weak signal scene. Then, because the positioning terminal determines that the accuracy of the acquired GNSS positioning information meets the positioning accuracy, the positioning terminal determines the GNSS positioning information as available positioning information. Then, the positioning terminal performs carrying mode recognition and determines that the mode in which the user currently carries the positioning terminal is the swing arm mode. The positioning terminal uses the acquired rotation vector data to determine the pitch angle and heading angle of the positioning terminal at each moment, thereby obtaining the target heading angle (i.e., the PDR heading angle) at the lowest point of the user's swing arm trajectory. The positioning terminal uses the GNSS positioning information as the initial positioning information in PDR positioning, and performs PDR positioning in combination with the PDR heading angle to obtain PDR positioning information. Based on the GNSS positioning information and PDR positioning information at the same time, the positioning terminal determines the positioning error between GNSS positioning and PDR positioning and performs Kalman filtering to obtain the target positioning error, and then corrects the GNSS positioning information or PDR positioning information based on the target positioning error to obtain the target positioning result corresponding to the user at position 2.

[0184] Then, the user moves from position 2 to position 3, which is located indoors, away from the entrance and exit of the house. At this position, the GNSS signal that the positioning terminal can receive is weak, and may even not receive the GNSS signal at certain times. The positioning terminal performs scene recognition based on the carrier-to-noise ratio of the received GNSS signal to obtain a scene recognition result. Since the house occlusion affects the received GNSS signal, the scene recognition result indicates that the positioning terminal is in a weak signal scene. Then, because the positioning terminal determines that the accuracy of the acquired GNSS positioning information does not meet the positioning accuracy, the GNSS positioning information cannot be used as available positioning information to participate in PDR positioning. At this time, the positioning terminal determines that there is historical fused positioning information at the previous moment, wherein the historical fused positioning information is the positioning information obtained by the positioning terminal by fusing the GNSS positioning information and PDR information at the previous moment, so that the positioning terminal determines the historical positioning fusion information as available positioning information. Then, the positioning terminal performs carrying mode recognition and determines that the mode in which the user currently carries the positioning terminal is the swing arm mode. Similar to the process of obtaining the PDR heading angle at position 2, the positioning terminal can obtain the target heading angle (i.e., the PDR heading angle) at the lowest point of the user's swing arm trajectory. The positioning terminal uses the historical fusion positioning information of the previous moment as the initial positioning information in PDR positioning, combines the PDR heading angle to perform PDR positioning, and obtains PDR positioning information. The positioning terminal determines the obtained PDR positioning information as the target positioning result corresponding to the positioning terminal at position 3. In addition, if the positioning terminal determines that there is no historical fusion positioning information at the previous moment, but there is historical fusion positioning information at the historical moment, the positioning terminal obtains the PDR information at the previous moment. Then, the positioning terminal performs carrying mode recognition and obtains the PDR heading angle. The positioning terminal uses the PDR information of the previous moment as the initial positioning information in PDR positioning, combines the PDR heading angle to perform PDR positioning, and obtains PDR positioning information. The positioning terminal determines the obtained PDR positioning information as the target positioning result corresponding to the positioning terminal at position 3.

[0185] Then, the user moves from position 3 to position 4, which is outside the house, near the exit of the house. At this position, the positioning terminal can receive the GNSS signal, and the positioning terminal performs scene recognition based on the carrier-to-noise ratio of the received GNSS signal to obtain a scene recognition result. Similar to position 1, the positioning terminal is less obstructed by the house at position 4, and the influence of the house obstruction on the received GNSS signal is limited. Therefore, the scene recognition result indicates that the positioning terminal is in a normal signal scene. At this time, the positioning terminal determines that the accuracy of the acquired GNSS positioning information meets the accuracy requirements for GNSS positioning in a normal signal scene. Therefore, the positioning terminal determines the GNSS positioning information as the target positioning result corresponding to the positioning terminal at position 4.

[0186] Please refer to Fig.11, which shows a structural block diagram of a positioning device provided by an exemplary embodiment of the present application, the device includes:

[0187] A scene recognition module 1101 is used to perform scene recognition based on the carrier-to-noise ratio of the GNSS signal to obtain a scene recognition result;

[0188] The information acquisition module 1102 is used to acquire available positioning information when the scene recognition result indicates that the scene is a weak signal scene, where the available positioning information is GNSS positioning information or historical fusion positioning information, where the historical fusion positioning information is a fusion result of historical GNSS positioning and historical PDR positioning;

[0189] The positioning module 1103 is used to perform PDR positioning based on the available positioning information to obtain a target positioning result.

[0190] Optionally, the scene recognition module 1101 is further used for:

[0191] Obtain the current carrier-to-noise ratio mean and current carrier-to-noise ratio variance of the current GNSS signal, as well as the historical carrier-to-noise ratio mean of historical GNSS signals;

[0192] Scene recognition is performed based on the current carrier-to-noise ratio mean, the current carrier-to-noise ratio variance, and the historical carrier-to-noise ratio mean to obtain the scene recognition result.

[0193] Optionally, the scene recognition module 1101 is further used for:

[0194] When the current carrier-to-noise ratio mean is greater than the first mean threshold and less than the second mean threshold, adding one to the count value of the weak signal counter;

[0195] When the count value of the weak signal counter reaches a first count threshold, the current carrier-to-noise ratio variance is greater than a variance threshold, and the current carrier-to-noise ratio mean is less than the historical carrier-to-noise ratio mean, the scene recognition result is determined to be a weak signal scene.

[0196] Optionally, the scene recognition module 1101 is further used for:

[0197] In a weak signal scenario, when the current carrier-to-noise ratio average is greater than the historical carrier-to-noise ratio average, adding one to the count value of the signal enhancement counter;

[0198] When the count value of the signal enhancement counter reaches a second count threshold, the weak signal scenario is exited.

[0199] Optionally, the information acquisition module 1102 is further used to:

[0200] When the scene recognition result indicates that the scene is in a weak signal scene, determining the availability of GNSS positioning information;

[0201] In a case where the GNSS positioning information is available, determining the GNSS positioning information as the available positioning information;

[0202] When the GNSS positioning information is unavailable and there is historical fused positioning information, the historical fused positioning information is determined as the available positioning information.

[0203] Optionally, the information acquisition module 1102 is further used to:

[0204] When the GNSS positioning precise information is unavailable and the historical fused positioning information does not exist, exit positioning.

[0205] Optionally, the positioning module 1103 is further used for:

[0206] In a case where the available positioning information is the GNSS positioning information, fusing the GNSS positioning information with the PDR positioning information to obtain the target positioning result;

[0207] In a case where the available positioning information is the historical fused positioning information, PDR positioning is performed using the historical fused positioning information as initial positioning information to obtain the target positioning result.

[0208] Optionally, the positioning module 1103 is further used for:

[0209] Determine a positioning error between the GNSS positioning and the PDR positioning based on the GNSS positioning information and the PDR positioning information at the same time, wherein the positioning error includes at least one of a first direction position error, a second direction position error, a first direction speed error, a second direction speed error, and a heading error;

[0210] Performing Kalman filtering on the positioning error to obtain a target positioning error;

[0211] The GNSS positioning information or the PDR positioning information is corrected based on the target positioning error to obtain the target positioning result.

[0212] Optionally, the positioning module 1103 is further used for:

[0213] When the available positioning information is the GNSS positioning information and the positioning accuracy of the PDR positioning information meets the accuracy condition, the GNSS positioning information and the PDR positioning information are merged to obtain the target positioning result;

[0214] When the available positioning information is the historical fused positioning information, performing PDR positioning using the historical fused positioning information as initial positioning information to obtain the target positioning result includes:

[0215] When the available positioning information is the historical fused positioning information and the positioning accuracy of the historical fused positioning information meets the accuracy condition, PDR positioning is performed using the historical fused positioning information as initial positioning information to obtain the target positioning result.

[0216] Optionally, the information acquisition module 1102 is further used to:

[0217] Perform carrying mode recognition to obtain the current carrying mode;

[0218] determining a PDR parameter based on the current carrying mode and the sensor data;

[0219] PDR positioning is performed based on the available positioning information and the PDR parameters to obtain the target positioning result.

[0220] Optionally, the information acquisition module 1102 is further used to:

[0221] Get the acceleration variance in each coordinate axis direction;

[0222] In the case where the z-axis acceleration variance is greater than the x-axis acceleration variance, and the z-axis acceleration variance is greater than the y-axis acceleration variance, or the z-axis acceleration variance is greater than the x-axis acceleration variance, and the difference between the z-axis acceleration variance and the y-axis acceleration variance is less than a difference threshold, determining that the current carrying mode is the handheld mode;

[0223] When the z-axis acceleration variance is smaller than the x-axis acceleration variance, and the z-axis acceleration variance is smaller than the y-axis acceleration variance, determining that the current carrying mode is the swing arm mode;

[0224] Among them, the z-axis is perpendicular to the positioning terminal screen, the x-axis is the width direction of the positioning terminal, and the y-axis is the length direction of the positioning terminal.

[0225] Optionally, the information acquisition module 1102 is further used to:

[0226] In the case where the current carrying mode is the handheld mode, determining the PDR heading angle based on the rotation vector data at the current moment;

[0227] When the current carrying mode is the swing arm mode, the pitch angle and the heading angle at each moment are determined based on the rotation vector data; when the pitch angle at the i-th moment is in opposite directions to the pitch angle at the i+1-th moment, the target heading angle at the lowest point of the swing arm trajectory is determined based on the pitch angles and heading angles at the i-th moment and the i+1-th moment; the target heading angle is determined as the PDR heading angle.

[0228] Optionally, the information acquisition module 1102 is further used to:

[0229] Generate a historical combined acceleration sequence based on the mean and variance of the historical combined acceleration;

[0230] When a sequence matching degree between the historical combined acceleration sequence and a reference combined acceleration sequence corresponding to the current carrying mode is greater than a matching degree threshold, the PDR parameter is determined based on the current carrying mode and the sensor data.

[0231] Optionally, the positioning module 1103 is further used for:

[0232] In the case of a low-speed state, PDR positioning is performed based on the available positioning information to obtain the target positioning result, and the low-speed state refers to a state in which the movement speed is less than the speed threshold at consecutive moments.

[0233] To summarize, in the embodiments of the present application, the terminal performs scene recognition based on the carrier-to-noise ratio of the GNSS signal, determines the current signal environment, further locates according to the current signal environment, and when the positioning environment is in a weak signal scenario, when the available positioning information is GNSS positioning information, PDR positioning is performed through the GNSS positioning information to obtain PDR positioning information, and the GNSS positioning information and the PDR positioning information are fused to obtain the target positioning result, or when the available positioning information is historical fused positioning information, PDR positioning is performed using the historical fused positioning information to obtain the target positioning result; in the positioning process, the signal environment is first determined, and then the GNSS positioning technology and the PDR positioning technology are combined to obtain the target positioning result, thereby improving the accuracy of positioning in a weak signal environment.

[0234] It should be noted that: the device provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and the implementation process thereof is detailed in the method embodiment, which will not be repeated here.

[0235] Please refer to Fig.12, which shows a block diagram of a terminal provided by an exemplary embodiment of the present application. The terminal 1200 may be a smart phone, a tablet computer, a wearable device, etc. The terminal 1200 in the present application may include one or more of the following components: a processor 1210, a memory 1220, a GNSS component 1230, and a sensor 1240.

[0236] The processor 1210 may include one or more processing cores. The processor 1210 uses various interfaces and lines to connect various parts within the entire terminal 1200, and executes various functions and processes data of the terminal 1200 by running or executing instructions, programs, code sets or instruction sets stored in the memory 1220, and calling data stored in the memory 1220. Optionally, the processor 1210 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 1210 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processor (Graphics Processing Unit, GPU), a neural network processor (Neural-network Processing Unit, NPU) and a modem. Among them, the CPU mainly processes the operating system, applications and data reported by MEMS1230; the GPU is responsible for rendering and drawing the content that needs to be displayed on the touch screen; the NPU is used to implement artificial intelligence (AI) functions; and the modem is used to process wireless communications. It is understandable that the above-mentioned modem can also be implemented by a separate chip instead of being integrated into the processor 1210.

[0237] The memory 1220 may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory 1220 includes a non-transitory computer-readable storage medium. The memory 1220 may be used to store instructions, programs, codes, code sets, or instruction sets. The memory 1220 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc.; the data storage area may store data (such as image data, audio data), etc., created according to the use of the terminal 1200.

[0238] The GNSS component 1230 is a component with a GNSS positioning function, which can receive GNSS signals and collect GNSS positioning information. Optionally, the GNSS component 1230 may include a GNSS positioning chip such as a GPS chip, a Beidou positioning chip, or a GLONASS positioning chip.

[0239] The sensor 1240 is a component for collecting positioning data. The sensor 1240 may include: an accelerometer, a magnetometer, and a gyroscope, etc., wherein the accelerometer may be a capacitive accelerometer, a piezoresistive accelerometer, a piezoelectric accelerometer, a hot plate accelerometer, a heated gas accelerometer, the gyroscope may be a monolithic silicon gyroscope, and the magnetometer may be a three-axis magnetometer, which is not limited in this embodiment.

[0240] In addition, those skilled in the art will appreciate that the structure of the terminal 1200 shown in the above figures does not constitute a limitation on the terminal 1200, and the terminal may include more or fewer components than shown, or combine certain components, or arrange the components differently. For example, the terminal 1200 also includes radio frequency circuits, sensors, audio circuits, wireless fidelity (WiFi) components, power supplies, Bluetooth components, and other components, which will not be described in detail here.

[0241] An embodiment of the present application also provides a computer-readable storage medium, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the positioning control method in the virtual relationship development application as described in the above embodiments.

[0242] The embodiment of the present application provides a computer program product, which includes computer instructions, which are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the positioning control method described in the above embodiment.

[0243] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0244] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A positioning method, characterized in that: The method comprises: Perform scene recognition based on the carrier-to-noise ratio of the GNSS signal to obtain a scene recognition result; When the scene recognition result indicates that the scene is a weak signal scene, obtain available positioning information, where the available positioning information is GNSS positioning information or historical fused positioning information, where the historical fused positioning information is a fusion result of historical GNSS positioning and historical PDR positioning; PDR positioning is performed based on the available positioning information to obtain a target positioning result.

2. The method according to claim 1, characterized in that The scene recognition is performed based on the carrier-to-noise ratio of the GNSS signal to obtain a scene recognition result, including: Obtain the current carrier-to-noise ratio mean and current carrier-to-noise ratio variance of the current GNSS signal, as well as the historical carrier-to-noise ratio mean of historical GNSS signals; Scene recognition is performed based on the current carrier-to-noise ratio mean, the current carrier-to-noise ratio variance, and the historical carrier-to-noise ratio mean to obtain the scene recognition result.

3. The method according to claim 2, characterized in that The performing scene recognition based on the current carrier-to-noise ratio mean, the current carrier-to-noise ratio variance, and the historical carrier-to-noise ratio mean to obtain the scene recognition result includes: When the current carrier-to-noise ratio mean is greater than the first mean threshold and less than the second mean threshold, adding one to the count value of the weak signal counter; When the count value of the weak signal counter reaches a first count threshold, the current carrier-to-noise ratio variance is greater than the variance threshold, and the current carrier-to-noise ratio mean is less than the historical carrier-to-noise ratio mean, the scene recognition result is determined to be a weak signal scene.

4. The method according to claim 2, characterized in that: The performing scene recognition based on the current carrier-to-noise ratio mean, the current carrier-to-noise ratio variance, and the historical carrier-to-noise ratio mean to obtain the scene recognition result includes: In a weak signal scenario, when the current carrier-to-noise ratio average is greater than the historical carrier-to-noise ratio average, adding one to the count value of the signal enhancement counter; When the count value of the signal enhancement counter reaches a second count threshold, the weak signal scenario is exited.

5. The method according to claim 1, characterized in that When the scene recognition result indicates that the scene is in a weak signal scene, obtaining available positioning information includes: When the scene recognition result indicates that the scene is in a weak signal scene, determining the availability of GNSS positioning information; In a case where the GNSS positioning information is available, determining the GNSS positioning information as the available positioning information; When the GNSS positioning information is unavailable and there is historical fused positioning information, the historical fused positioning information is determined as the available positioning information.

6. The method according to claim 5, characterized in that The method further comprises: When the GNSS positioning information is unavailable and the historical fusion positioning information does not exist, exit positioning.

7. The method according to claim 1, characterized in that The performing PDR positioning based on the available positioning information to obtain a target positioning result includes: In a case where the available positioning information is the GNSS positioning information, fusing the GNSS positioning information with the PDR positioning information to obtain the target positioning result; In a case where the available positioning information is the historical fused positioning information, PDR positioning is performed using the historical fused positioning information as initial positioning information to obtain the target positioning result.

8. The method according to claim 7, characterized in that The fusing the GNSS positioning information and the PDR positioning information to obtain the target positioning result includes: Determine a positioning error between the GNSS positioning and the PDR positioning based on the GNSS positioning information and the PDR positioning information at the same time, wherein the positioning error includes at least one of a first direction position error, a second direction position error, a first direction speed error, a second direction speed error, and a heading error; Performing Kalman filtering on the positioning error to obtain a target positioning error; The GNSS positioning information or the PDR positioning information is corrected based on the target positioning error to obtain the target positioning result.

9. The method according to claim 7, characterized in that: When the available positioning information is the GNSS positioning information, fusing the GNSS positioning information and the PDR positioning information to obtain the target positioning result includes: When the available positioning information is the GNSS positioning information and the positioning accuracy of the PDR positioning information meets the accuracy condition, the GNSS positioning information and the PDR positioning information are merged to obtain the target positioning result; When the available positioning information is the historical fused positioning information, performing PDR positioning using the historical fused positioning information as initial positioning information to obtain the target positioning result includes: When the available positioning information is the historical fused positioning information and the positioning accuracy of the historical fused positioning information meets the accuracy condition, PDR positioning is performed using the historical fused positioning information as initial positioning information to obtain the target positioning result.

10. The method according to claim 1, characterized in that The performing PDR positioning based on the available positioning information to obtain a target positioning result includes: Perform carrying mode recognition to obtain the current carrying mode; determining a PDR parameter based on the current carrying mode and the sensor data; PDR positioning is performed based on the available positioning information and the PDR parameters to obtain the target positioning result.

11. The method according to claim 10, characterized in that The carrying mode identification is performed to obtain the current carrying mode, including: Get the acceleration variance in each coordinate axis direction; In the case where the z-axis acceleration variance is greater than the x-axis acceleration variance, and the z-axis acceleration variance is greater than the y-axis acceleration variance, or the z-axis acceleration variance is greater than the x-axis acceleration variance, and the difference between the z-axis acceleration variance and the y-axis acceleration variance is less than a difference threshold, determining that the current carrying mode is the handheld mode; When the z-axis acceleration variance is smaller than the x-axis acceleration variance, and the z-axis acceleration variance is smaller than the y-axis acceleration variance, determining that the current carrying mode is the swing arm mode; Among them, the z-axis is perpendicular to the positioning terminal screen, the x-axis is the width direction of the positioning terminal, and the y-axis is the length direction of the positioning terminal.

12. The method according to claim 11, characterized in that The PDR parameter includes a PDR heading angle, and determining the PDR parameter based on the current carrying mode and sensor data includes: In the case where the current carrying mode is the handheld mode, determining the PDR heading angle based on the rotation vector data at the current moment; When the current carrying mode is the swing arm mode, the pitch angle and the heading angle at each moment are determined based on the rotation vector data; when the pitch angle at the i-th moment is in opposite directions to the pitch angle at the i+1-th moment, the target heading angle at the lowest point of the swing arm trajectory is determined based on the pitch angles and heading angles at the i-th moment and the i+1-th moment; the target heading angle is determined as the PDR heading angle.

13. The method according to claim 10, characterized in that The method further comprises: determining the PDR parameter based on the current carrying mode and the sensor data; Generate a historical combined acceleration sequence based on the mean and variance of the historical combined acceleration; When a sequence matching degree between the historical combined acceleration sequence and a reference combined acceleration sequence corresponding to the current carrying mode is greater than a matching degree threshold, the PDR parameter is determined based on the current carrying mode and the sensor data.

14. The method according to claim 1, characterized in that The performing PDR positioning based on the available positioning information to obtain a target positioning result also includes: In the case of a low-speed state, PDR positioning is performed based on the available positioning information to obtain the target positioning result, and the low-speed state refers to a state in which the movement speed is less than the speed threshold at consecutive moments.

15. A positioning device, characterized in that: The device comprises: A scene recognition module is used to perform scene recognition based on the carrier-to-noise ratio of the GNSS signal and obtain a scene recognition result; An information acquisition module, used to acquire available positioning information when the scene recognition result indicates that the scene is in a weak signal scene, wherein the available positioning information is GNSS positioning information or historical fusion positioning information, and the historical fusion positioning information is a fusion result of historical GNSS positioning and historical PDR positioning; The positioning module is used to perform PDR positioning based on the available positioning information to obtain a target positioning result.

16. A terminal, characterized in that: The terminal includes a processor and a memory; the memory stores at least one instruction, and the at least one instruction is used to be executed by the processor to implement the walking positioning method according to any one of claims 1 to 14.

17. A computer-readable storage medium, characterized in that: The storage medium stores at least one instruction, and the at least one instruction is used to be executed by a processor to implement the walking positioning method according to any one of claims 1 to 14.

18. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium; a processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device implements the pedestrian positioning method as described in any one of claims 1 to 14.