Moving track generation method and device, electronic equipment and storage medium

By obtaining information such as acceleration data and azimuth, and combining it with map data to generate the user's movement trajectory, the problem of accurately locating the user's position and trajectory in the absence of GPS signals is solved, and accurate navigation is achieved during outdoor exploration.

CN120721089APending Publication Date: 2025-09-30ZHENSHI INFORMATION TECH SHANGHAI CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510936773.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-08
Publication Date
2025-09-30

AI Technical Summary

Technical Problem

In the absence of GPS signals or when the GPS module in the device is damaged, existing technologies cannot accurately locate and calibrate the user's movement trajectory, causing the user to get lost when exploring outdoors.

Method used

By obtaining the user's acceleration data, azimuth, historical geographic coordinates and standard longitude and latitude per unit distance, the preset data analysis method is used to determine the moving distance and two-dimensional coordinates, and the moving trajectory of the current location is generated in combination with the historical positioning points in the map.

Benefits of technology

In the absence of GPS signals, accurate positioning of the user's position and accurate generation of the trajectory are achieved, which improves the accuracy of position calibration and trajectory generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120721089A_ABST
    Figure CN120721089A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a moving track generation method and device, electronic equipment and a storage medium. The method comprises the steps that if a current positioning mode is a preset positioning mode, acceleration data of a user in the moving process, an azimuth angle corresponding to the current position where the user is located, historical geographic coordinates corresponding to historical positioning points in a map where the user is located and standard longitude and latitude corresponding to a unit distance are obtained; analyzing and processing the acceleration data based on a preset data analysis mode, and determining the moving distance of the user in the current moving process; determining a two-dimensional coordinate corresponding to the current position based on the moving distance and the azimuth angle; determining a current geographic coordinate corresponding to the current position based on the historical geographic coordinate, the standard latitude and longitude and the two-dimensional coordinate; and drawing the current positioning point corresponding to the current position in the map based on the current geographic coordinate, and connecting the historical positioning points and the current positioning point to generate the current moving track of the user, thereby improving the accuracy of moving track generation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of navigation and positioning technology, and in particular to a method, device, electronic device, and storage medium for generating a movement trajectory. Background Art

[0002] With the development of technology, more and more areas have achieved Global Positioning System (GPS) signal coverage. However, there are still some areas or environments without GPS signals. Currently, GPS signals are usually used to achieve position calibration and trajectory calibration.

[0003] However, when there is no GPS signal or the GPS module in the device is damaged and cannot receive GPS signals, the method of using GPS signals to achieve positioning cannot accurately locate the position, let alone accurately calibrate the trajectory. For example, when a user is exploring outdoors and there is no GPS signal, especially in mountainous areas, the method of using GPS signals to achieve positioning cannot clearly display the movement position and movement trajectory, which may cause the user to get lost while exploring outdoors. Summary of the Invention

[0004] Embodiments of the present invention provide a method, device, electronic device, and storage medium for generating a movement trajectory, so as to accurately and conveniently generate a user movement trajectory, thereby improving the accuracy of the movement trajectory generation.

[0005] In a first aspect, an embodiment of the present invention provides a method for generating a movement trajectory, comprising:

[0006] If the current positioning mode is the preset positioning mode, the acceleration data of the user during movement, the azimuth corresponding to the user's current location, the historical geographic coordinates corresponding to the historical positioning point on the user's map, and the standard longitude and latitude corresponding to the unit distance are obtained;

[0007] Analyzing and processing the acceleration data based on a preset data analysis method to determine the distance moved by the user during the current movement;

[0008] Determining the two-dimensional coordinates corresponding to the current position based on the movement distance and the azimuth;

[0009] Determining current geographic coordinates corresponding to the current position based on the historical geographic coordinates, the standard longitude and latitude, and the two-dimensional coordinates;

[0010] A current positioning point corresponding to the current position is drawn on the map based on the current geographic coordinates, and the historical positioning points and the current positioning point are connected to generate a current movement trajectory of the user.

[0011] Optionally, the method also includes: obtaining the three-axis geomagnetic component and the three-axis gravitational acceleration component corresponding to the user's current position; determining the pitch angle and roll angle of the device worn by the user based on the three-axis gravitational acceleration component; determining the two-axis geomagnetic component in the horizontal plane based on the three-axis geomagnetic component, the pitch angle and the roll angle; and determining the azimuth corresponding to the user's current position based on the arc tangent value of the two-axis geomagnetic component.

[0012] Optionally, the method further includes: obtaining boundary geographic coordinates corresponding to boundary points in the map where the user is located; performing data processing on the boundary geographic coordinates based on a preset distance calculation method to determine the standard longitude and latitude corresponding to the unit distance in the map where the user is located.

[0013] Optionally, the method also includes: determining the user's movement state during the current movement process based on the acceleration data and the target classification model; determining the user's movement stride during the current movement process based on the movement state, user information and the target stride prediction model; determining the number of steps of the user during the current movement process based on the acceleration data and the target step number prediction model; and determining the user's movement distance during the current movement process based on the movement stride and the number of steps.

[0014] Optionally, the method further includes: determining the relative angle between the historical positioning point and the current position based on the azimuth and a preset coordinate system; the preset coordinate system is pre-established with the historical positioning point as the origin and the north direction as the positive direction of the Y-axis; based on the relative angle and the moving distance, determining the two-dimensional coordinates corresponding to the current position.

[0015] Optionally, the method further includes: performing dimension conversion based on the standard longitude and latitude and the two-dimensional coordinates to determine the candidate longitude and latitude corresponding to the current position; and determining the current geographic coordinates corresponding to the current position based on the historical geographic coordinates and the candidate longitude and latitude.

[0016] In a second aspect, an embodiment of the present invention further provides a movement trajectory generating device, the device comprising:

[0017] A data acquisition module, configured to acquire the user's acceleration data during movement, the azimuth corresponding to the user's current location, the historical geographic coordinates corresponding to the historical location point on the user's map, and the standard longitude and latitude corresponding to the unit distance, if the current positioning mode is the preset positioning mode;

[0018] A movement distance determination module, configured to analyze and process the acceleration data based on a preset data analysis method to determine the movement distance of the user during the current movement process;

[0019] a two-dimensional coordinate determination module, configured to determine the two-dimensional coordinates corresponding to the current position based on the movement distance and the azimuth;

[0020] a current geographic coordinate determination module, configured to determine the current geographic coordinates corresponding to the current position based on the historical geographic coordinates, the standard longitude and latitude, and the two-dimensional coordinates;

[0021] The movement trajectory generation module is used to draw a current positioning point corresponding to the current position in the map based on the current geographic coordinates, and connect the historical positioning points and the current positioning point to generate the user's current movement trajectory.

[0022] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising:

[0023] one or more processors;

[0024] a memory for storing one or more programs;

[0025] When the one or more programs are executed by the one or more processors, the one or more processors implement the movement trajectory generating method provided by any embodiment of the present invention.

[0026] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the movement trajectory generation method provided by any embodiment of the present invention.

[0027] In a fifth aspect, an embodiment of the present invention provides a computer program product, including a computer program, which, when executed by a processor, implements the movement trajectory generation method provided by any embodiment of the present invention.

[0028] The technical solution of the embodiment of the present invention is as follows: if the current positioning mode is a preset positioning mode, the acceleration data of the user during the movement, the azimuth corresponding to the user's current position, and the historical geographical coordinates corresponding to the historical positioning point in the map where the user is located and the standard longitude and latitude corresponding to the unit distance are obtained; the acceleration data are analyzed and processed based on a preset data analysis method to determine the movement distance of the user during the current movement; based on the movement distance and the azimuth, the two-dimensional coordinates corresponding to the current position are determined; based on the historical geographical coordinates, the standard longitude and latitude and the two-dimensional coordinates, the current geographical coordinates corresponding to the current position are determined; based on the current geographical coordinates, the current positioning point corresponding to the current position is drawn in the map based on the current geographical coordinates, and the historical positioning point and the current positioning point are connected to generate the user's current movement trajectory, thereby realizing position calibration and trajectory generation in the preset positioning mode and without a GPS signal, and improving the accuracy of position calibration and trajectory generation.

[0029] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0031] Figure 1 This is a flow chart of a method for generating a movement trajectory provided by the first embodiment of the present invention;

[0032] Figure 2 This is a flow chart of a method for generating a movement trajectory provided by the second embodiment of the present invention;

[0033] Figure 3 This is a schematic structural diagram of a movement trajectory generating device provided by Embodiment 3 of the present invention;

[0034] Figure 4 3 is a schematic structural diagram of an electronic device for implementing the movement trajectory generation method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0035] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0036] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0037] Example 1

[0038] Figure 1 A flow chart of a method for generating a mobile trajectory is provided for the first embodiment of the present invention. This embodiment is applicable to the case where accurate position calibration and accurate trajectory generation are achieved in the absence of GPS signals. The method can be executed by a mobile trajectory generating device, which can be implemented in the form of hardware and / or software. The mobile trajectory generating device can be configured in an electronic device, such as a watch. Figure 1 As shown, the method includes:

[0039] S110. If the current positioning mode is the preset positioning mode, obtain the acceleration data of the user during movement, the azimuth corresponding to the user's current position, and the historical geographic coordinates corresponding to the historical positioning point on the map where the user is located and the standard longitude and latitude corresponding to the unit distance.

[0040] Among them, the current positioning mode may refer to the positioning mode of the mobile terminal (such as a mobile phone or watch) of the user during the movement. When there is a GPS signal, the user can select the positioning mode as the current positioning mode. When there is no GPS signal, the mobile terminal will automatically switch the preset positioning mode to the current positioning mode. In this embodiment, the situation where there is no GPS signal may include but is not limited to no GPS signal coverage, no GPS signal transceiver module in the mobile terminal, or the GPS signal transceiver module in the mobile terminal is damaged. The preset positioning mode may refer to a pre-set positioning mode applicable to the situation where there is no GPS signal. The moving process may refer to the process of moving from a historical positioning point to the current position. In this embodiment, in the process of generating each current moving trajectory, the current positioning point corresponding to the previous moving trajectory is used as the historical positioning point used in the process of generating the next moving trajectory. Acceleration data may refer to continuous acceleration data in the process of the user moving from a historical positioning point to the current position. The current position may refer to the position that currently needs to be positioned.

[0041] Among them, the map may refer to a map of the area where the user is located. In this embodiment, the map may be a map of a regular shape (such as a rectangle) or a map of an irregular shape. The historical positioning point may refer to the positioning point corresponding to the starting position of each movement process of the user. The movement process may refer to the movement process of the user from the historical positioning point to the current position. Geographical coordinates may refer to longitude and latitude. Historical geographic coordinates may refer to the longitude and latitude corresponding to the historical positioning point. The standard longitude and latitude corresponding to the unit distance can be used to represent the conversion relationship between straight-line distance and longitude and latitude. For example, the standard longitude and latitude corresponding to the unit distance may be, but is not limited to, the change in longitude and latitude between two locations one meter apart.

[0042] Specifically, if it is detected that the current positioning mode in the mobile terminal is the preset positioning mode, the acceleration data of the user during the movement is obtained through the accelerometer, and the azimuth corresponding to the user's current position is obtained through the geomagnetic sensor, and the historical geographic coordinates corresponding to the historical positioning point of the user in the map and the standard longitude and latitude corresponding to the unit distance are obtained through the inherent parameters of the map.

[0043] In this embodiment, the current location can be selected by the user, or positioning can be determined based on whether the current angular offset between the user's current azimuth and the historical azimuth of a historical positioning point during the user's movement is greater than a preset angular threshold (e.g., 10°). If the current angular offset is greater than the preset angular threshold, the user's current location is determined as the current location, and positioning is performed based on the current location. This prevents the user from turning too far during movement, which could result in an inaccurate trajectory, further improving the accuracy of trajectory generation.

[0044] Based on the above technical solution, "obtaining the azimuth corresponding to the user's current position" may include: obtaining the three-axis geomagnetic component and three-axis gravitational acceleration component corresponding to the user's current position; determining the pitch angle and roll angle of the device worn by the user based on the three-axis gravitational acceleration component; determining the two-axis geomagnetic component in the horizontal plane based on the three-axis geomagnetic component, pitch angle and roll angle; determining the azimuth corresponding to the user's current position based on the inverse tangent value of the two-axis geomagnetic component.

[0045] Geomagnetic sensors can measure azimuth by detecting the strength and direction of the Earth's magnetic field. The angle between the projection of the Earth's magnetic field on the horizontal plane and the geographic North Pole is the azimuth. The azimuth can be expressed as β. Geomagnetic sensors typically include a three-axis magnetoresistive element, which can measure the components of the Earth's magnetic field in the X, Y, and Z axes, namely the three-axis geomagnetic components (Hx, Hy, Hz). The three-axis gravitational acceleration components can refer to the gravitational acceleration components experienced by a mobile terminal along three orthogonal axes (typically the X, Y, and Z axes). The three-axis gravitational acceleration components include: the gravity component ax in the X-axis direction (e.g., horizontally to the right is positive), the gravity component ay in the Y-axis direction (e.g., horizontally forward is positive), and the gravity component az in the Z-axis direction (typically perpendicular to the XY plane, e.g., downward is positive). The device worn by the user can be a mobile terminal. The pitch angle can refer to the angle of rotation of the mobile terminal about the X-axis (e.g., forward and backward). The pitch angle can be used to indicate the degree to which the mobile terminal is tilted up or down. The pitch angle can be expressed as θ. The roll angle can refer to the angle of rotation of a mobile terminal about the Y axis (e.g., left-right direction). The roll angle can be used to indicate the degree to which the mobile terminal is tilted left or right. The roll angle can be expressed as φ. The two-axis geomagnetic component can refer to the components of the geomagnetic field along the X and Y axes, obtained after eliminating the effect of mobile terminal tilt on geomagnetic measurements. The two-axis geomagnetic components can be expressed as H'x and H'y.

[0046] Specifically, the three-axis geomagnetic components (Hx, Hy, Hz) corresponding to the user's current location are obtained through the geomagnetic sensor, and the three-axis gravity acceleration components (ax, ay, az) corresponding to the user's current location are obtained through the three-axis gravity acceleration components. The pitch angle (θ) and roll angle (φ) of the device worn by the user are determined based on the three-axis geomagnetic components (Hx, Hy, Hz), the pitch angle (θ) and the roll angle (φ), the two-axis geomagnetic components (H'x, H'y) in the horizontal plane are determined. The azimuth (β) corresponding to the user's current location is determined based on the inverse tangent value of the two-axis geomagnetic components (H'x, H'y).

[0047] Exemplarily, one way to determine the azimuth angle (β) corresponding to the user's current location is as follows:

[0048]

[0049] H'x=Hx cosθ+Hz sinθ;

[0050] H'y=Hx sinφsinθ+Hy cosφ-Hz sinφcosθ;

[0051]

[0052] For example, another method of determining the azimuth angle (β) corresponding to the current position of the user is as follows:

[0053]

[0054] H'x=Hx cosθ+Hz sinθ;

[0055] H'y=Hx sinφsinθ+Hy cosφ-Hz sinφcosθ;

[0056]

[0057] Based on the above technical solution, "obtaining the standard longitude and latitude corresponding to the unit distance in the map where the user is located" may include: obtaining the boundary geographic coordinates corresponding to the boundary points in the map where the user is located; performing data processing on the boundary geographic coordinates based on a preset distance calculation method to determine the standard longitude and latitude corresponding to the unit distance in the map where the user is located.

[0058] Among them, the boundary geographic coordinates may refer to the longitude and latitude of the boundary points in the map. For rectangular maps, the four vertices of the map are used as boundary points. For irregularly shaped maps, the point with the largest longitude and the point with the largest latitude are selected, and the point with the largest longitude is extended with the same longitude ray, and the point with the largest latitude is extended with the same latitude ray, thereby forming a closed rectangular map, and at least three vertices in the rectangular map are used as boundary points. The preset distance calculation method may refer to a pre-set method of using boundary geographic coordinates to determine the standard longitude and latitude corresponding to the unit distance in the map where the user is located.

[0059] Specifically, the geographic coordinates of each point in the map are inherent attributes in the map and can be directly obtained. The width (W) and height (H) of the entire rectangular map are calculated using the boundary geographic coordinates of the boundary points, in meters. The boundary geographic coordinates of the boundary points and the width and height of the map are used to calculate how many degrees one meter represents in the GPS coordinate system (i.e., a geocentric, earth-fixed coordinate system), that is, the standard longitude and latitude corresponding to the unit distance. Among them, the unit is degree, and it is accurate to 6 decimal places, such as (114.123456, 22.123456).

[0060] For example, the distance between the two upper vertices of the rectangular map is calculated to determine the width (W) of the rectangular map. The distance between the two left vertices of the rectangular map is calculated to determine the height (H) of the rectangular map. The width of the rectangular map is determined as follows:

[0061] radLat0=lat0*PI / 180.0;

[0062] radLon0=lon0*PI / 180.0;

[0063] radLat1=lat1*PI / 180.0;

[0064] radLon1=lon1*PI / 180.0;

[0065] a=radLat1-radLat0;

[0066] b = radLon1 - radLon0;

[0067]

[0068] Among them, the coordinates of the upper left vertex are (lon0,lat0), the coordinates of the upper right vertex are (lon1,lat1), R (Earth diameter) is = 6371004 (in meters), PI (latitude and longitude angle conversion coefficient) is 3.1415926, radLat0 and radLat1 are the latitudes of the two points (in radians), radLon0 and radLon1 are the longitudes of the two points (in radians), a is the latitude difference of the two points, and b is the longitude difference of the two points.

[0069] For example, the standard longitude and latitude corresponding to the unit distance can be obtained by reversely calculating the number of meters spanned by each longitude and the number of meters spanned by each latitude. The calculation method for the number of meters spanned by each longitude is as follows:

[0070] Lon_per_m = |(D(longitude)–A(longitude))| ÷ W;

[0071] Where A is the top-right corner of the rectangular map. D is the top-left corner of the rectangular map. D (longitude) represents the longitude of point D. A (longitude) represents the longitude of point A. Lon_per_m represents the distance corresponding to each longitude span.

[0072] The calculation method for how many meters each latitude span is as follows:

[0073] Lat_per_m=|(B(latitude)–A(latitude))|÷H;

[0074] Where B is the vertex at the bottom right corner of the rectangular map. C is the vertex at the bottom left corner of the rectangular map. B (latitude) represents the latitude of point B. A (latitude) represents the latitude of point A. Lat_per_m represents the distance corresponding to each latitude span.

[0075] S120: Analyze and process the acceleration data based on a preset data analysis method to determine the movement distance of the user during the current movement.

[0076] The preset data analysis method may refer to a preset method of determining the movement distance using acceleration data. The movement distance may refer to the distance the user has moved from a historical positioning point to the current position.

[0077] Specifically, the preprocessing layer performs sliding window filtering (e.g., denoising + feature extraction) and gait cycle detection (e.g., peak identification) on the acceleration data. The step calculation layer then performs real-time frequency estimation, step accumulation, and total step count updates to determine the total number of steps the user has taken during the current movement. The user's distance traveled during the current movement is determined by multiplying the total number of steps by a preset stride length. The preset stride length can be, but is not limited to, pre-set for the user's gender or height.

[0078] Exemplarily, during the sliding window filtering process, the window size can be set to 2-4 seconds. The filtering method may include, but is not limited to, mean filtering using smooth noise, median filtering using anti-pulse interference, or bandpass filtering that retains the walking frequency range. During the gait cycle detection process, three-axis acceleration synthesis and peak detection conditions (such as amplitude threshold and time interval) are set. During the walking frequency estimation and update process, the frequency calculation is achieved by dividing the detected number of steps by the time window length, and then a sliding average update is performed. Finally, the deployment accumulation and total step count update are performed to obtain the total number of steps the user has taken during the current movement.

[0079] S130: Determine the two-dimensional coordinates corresponding to the current position based on the moving distance and the azimuth.

[0080] Specifically, the azimuth is used to determine the relative orientation of the current position and the historical positioning point, and a length corresponding to the moving distance is extended from the historical positioning point along the relative orientation, so that the two-dimensional coordinates of the current position relative to the historical positioning point can be determined using the historical positioning point.

[0081] On the basis of the above technical solution, "determining the two-dimensional coordinates corresponding to the current position based on the moving distance and azimuth" may include: determining the relative angle between the historical positioning point and the current position based on the azimuth and the preset coordinate system; the preset coordinate system is pre-established with the historical positioning point as the origin and the north direction as the positive direction of the Y-axis; determining the two-dimensional coordinates corresponding to the current position based on the relative angle and the moving distance.

[0082] The relative angle can be represented as α. The relative angle can refer to the angle formed by the current position, the historical positioning point and the coordinate axis in the preset coordinate system. The two-dimensional coordinates can be represented as (X, Y).

[0083] Specifically, there are four quadrants in the preset coordinate system. If the azimuth angle is on the coordinate axis, the relative angle is 0°. There are different relative angle calculation methods for azimuth angles in different quadrants. If the azimuth angle is in the first quadrant, the relative angle α = 90° - β. If the azimuth angle is in the second quadrant, the relative angle α = β - 90°. If the azimuth angle is in the third quadrant, the relative angle α = 270° - β. If the azimuth angle is in the fourth quadrant, the relative angle α = β - 270°. In two-dimensional coordinates, X = moving distance * sin α, Y = moving distance * cos α.

[0084] S140: Determine the current geographic coordinates corresponding to the current position based on the historical geographic coordinates, the standard longitude and latitude, and the two-dimensional coordinates.

[0085] The current geographic coordinates may refer to the geographic coordinates of the current location on a map or in a GPS coordinate system.

[0086] Specifically, the standard longitude and latitude and two-dimensional coordinates are used to determine the longitude and latitude span between the historical positioning point and the current position. The historical geographic coordinates and the longitude and latitude span are used to determine the current geographic coordinates corresponding to the current position.

[0087] Based on the above technical solution, "determining the current geographic coordinates corresponding to the current position based on historical geographic coordinates, standard longitude and latitude, and two-dimensional coordinates" may include: performing dimension conversion based on standard longitude and latitude and two-dimensional coordinates to determine the candidate longitude and latitude corresponding to the current position; determining the current geographic coordinates corresponding to the current position based on historical geographic coordinates and candidate longitude and latitude.

[0088] The candidate longitude and latitude may refer to the longitude and latitude span between the historical positioning point and the current location.

[0089] Specifically, a dimension conversion is performed based on the standard longitude and latitude and the two-dimensional coordinates to determine the candidate longitude and latitude corresponding to the current position. For example, the candidate longitude in the candidate longitude and longitude is determined by multiplying the X in the two-dimensional coordinates with the standard longitude in the standard longitude and longitude. The candidate latitude in the candidate longitude and longitude is determined by multiplying the Y in the two-dimensional coordinates with the standard latitude in the standard longitude and longitude. The candidate longitude and longitude are combined on the basis of the historical geographic coordinates to determine the current geographic coordinates corresponding to the current position. For example, the current longitude in the current geographic coordinates is determined by adding the historical longitude in the historical geographic coordinates to the candidate longitude in the candidate longitude and longitude. The current latitude in the current geographic coordinates is determined by adding the historical latitude in the historical geographic coordinates to the candidate latitude in the candidate longitude and longitude.

[0090] S150: Draw a current positioning point corresponding to the current position on the map based on the current geographic coordinates, and connect the historical positioning points and the current positioning point to generate the user's current movement trajectory.

[0091] The current location point may refer to the display point or display position of the current location on the map. The current movement trajectory may be used to represent the movement trajectory of the user from the historical location point to the current location point.

[0092] Specifically, the point corresponding to the current geographic coordinates on the map is rendered using a preset rendering method (e.g., rendering the location point in red), resulting in the current location point displayed on the map. Due to the pre-set position calibration condition (i.e., the corner does not exceed a threshold), the trajectory of the user moving from the historical location point to the current location point can be approximated as a straight line. Therefore, the historical location points and the current location point can be connected to generate the user's current movement trajectory.

[0093] The technical solution of the embodiment of the present invention is as follows: if the current positioning mode is a preset positioning mode, the acceleration data of the user during movement, the azimuth corresponding to the user's current position, and the historical geographical coordinates corresponding to the historical positioning point in the map where the user is located and the standard longitude and latitude corresponding to the unit distance are obtained; the acceleration data is analyzed and processed based on a preset data analysis method to determine the user's movement distance during the current movement; based on the movement distance and azimuth, the two-dimensional coordinates corresponding to the current position are determined; based on the historical geographical coordinates, the standard longitude and latitude and the two-dimensional coordinates, the current geographical coordinates corresponding to the current position are determined; based on the current geographical coordinates, the current positioning point corresponding to the current position is drawn on the map based on the current geographical coordinates, and the historical positioning point and the current positioning point are connected to generate the user's current movement trajectory, thereby realizing position calibration and trajectory generation in the preset positioning mode and without a GPS signal, and improving the accuracy of position calibration and the accuracy of trajectory generation.

[0094] Example 2

[0095] Figure 2 This is a flow chart of a method for generating a movement trajectory provided by the second embodiment of the present invention. Based on the above embodiments, this embodiment describes in detail the process of determining the movement distance of the user during the current movement process. The explanations of the terms that are the same or corresponding to the above embodiments are not repeated here. Figure 2 As shown, the method includes:

[0096] S210. If the current positioning mode is the preset positioning mode, obtain the acceleration data of the user during movement, the azimuth corresponding to the user's current position, and the historical geographic coordinates corresponding to the historical positioning point on the map where the user is located and the standard longitude and latitude corresponding to the unit distance.

[0097] S220: Determine the movement state of the user during the current movement based on the acceleration data and the target classification model.

[0098] The target classification model can be used to classify user movement states based on user acceleration data. The target classification model can use historical acceleration data from the user's historical movement as model input, and use the user's historical movement states corresponding to the historical acceleration data as training labels. Movement states may include, but are not limited to, walking and running. Different movement states can also be further subdivided into different levels. For example, walking states can be divided into three levels: slow walking, normal walking, and fast walking. Running states can also be divided into three levels: jogging, normal running, and fast running.

[0099] Specifically, the time-series acceleration data is input into a target classification model, where it is subjected to time-segment feature extraction and classification. The model then determines the user's movement state during the current movement based on the output of the target classification model. For example, the user may be walking throughout the current movement, or walking slowly for the first half of the movement and sprinting for the second half.

[0100] S230: Determine the user's stride during the current movement based on the movement state, user information, and the target stride prediction model.

[0101] User information may refer to information related to the user's stride length. For example, user information may include, but is not limited to, age, height, weight, and the user's historical stride lengths during different movement states. User information may be pre-entered by the user on the mobile terminal. The target stride prediction model assigns different attention weights to different types of user information.

[0102] Specifically, the movement state and user information are input into a target stride prediction model. The target stride prediction model uses the user information to predict candidate stride lengths for each movement state. The model then selects the stride that corresponds to the user's current movement state, determining the user's current stride length based on the model output.

[0103] S240: Determine the number of steps taken by the user during the current movement based on the acceleration data and the target step number prediction model.

[0104] The target step count prediction model can be used to analyze acceleration data and separate the acceleration data corresponding to each step in the acceleration data, thereby predicting the user's step count. The target step count prediction model can use the user's historical acceleration data during historical movement as model input and the historical step count corresponding to the historical acceleration as the model training label.

[0105] Specifically, the acceleration data is input into the target step count prediction model. The model then performs feature extraction, feature comparison, and classification on the acceleration data. The model then uses the acceleration characteristics of a user's completed stride to segment the input acceleration data into stages. Each segment of the obtained acceleration data corresponds to a stride, and the number of steps the user has taken during the current movement can be determined based on the number of segments of the acceleration data.

[0106] Exemplarily, the acceleration data can also be time-aligned with the user's movement state during the current movement process, and the time-aligned acceleration data can be input into the target step prediction model according to each movement state to predict the number of walking steps or running steps, thereby determining the number of movement steps corresponding to each movement state of the user during the current movement process based on the model output.

[0107] S250: Determine the distance moved by the user in the current movement process based on the movement stride and the number of movement steps.

[0108] Specifically, the moving stride and the number of moving steps are multiplied to determine the moving distance of the user in the current moving process.

[0109] Exemplarily, the moving stride and the number of moving steps corresponding to each moving state are multiplied to obtain the moving distance corresponding to each moving state, and the moving distances corresponding to all moving states are added together to determine the moving distance of the user in the current moving process.

[0110] S260: Determine the two-dimensional coordinates corresponding to the current position based on the moving distance and the azimuth.

[0111] S270: Determine the current geographic coordinates corresponding to the current position based on the historical geographic coordinates, the standard longitude and latitude, and the two-dimensional coordinates.

[0112] S280: Draw a current positioning point corresponding to the current position on the map based on the current geographic coordinates, and connect the historical positioning points and the current positioning point to generate the user's current movement trajectory.

[0113] The technical solution of the embodiment of the present invention determines the movement state of the user in the current movement process based on acceleration data and a target classification model; determines the movement stride of the user in the current movement process based on the movement state, user information and a target stride prediction model, so that the movement stride of the user in each movement state in the current movement process can be determined for each movement state; determines the number of movement steps of the user in the current movement process based on acceleration data and a target step number prediction model, so that the number of movement steps of the user in each movement state in the current movement process can be determined for each movement state; determines the movement distance of the user in the current movement process based on the movement stride and the movement step number, so that the total movement distance of the user can be accurately determined for different movement states of the user in the current movement process, further improving the accuracy of the current positioning point calibration and the current movement trajectory generation.

[0114] Based on the above technical solution, the mobile terminal can use the generated movement trajectory and the aforementioned trajectory generation method to achieve accurate navigation without GPS signals when the user returns, preventing the user from getting lost and further improving the user experience.

[0115] The following is an embodiment of a motion trajectory generation device provided by an embodiment of the present invention. This device and the motion trajectory generation methods of the aforementioned embodiments are based on the same inventive concept. For details not fully described in the embodiments of the motion trajectory generation device, reference can be made to the embodiments of the aforementioned motion trajectory generation methods.

[0116] Example 3

[0117] Figure 3 This is a schematic diagram of the structure of a movement trajectory generating device provided by the third embodiment of the present invention. Figure 3 As shown, the device includes: a data acquisition module 310 , a movement distance determination module 320 , a two-dimensional coordinate determination module 330 , a current geographic coordinate determination module 340 and a movement trajectory generation module 350 .

[0118] Among them, the data acquisition module 310 is used to obtain the acceleration data of the user during the movement, the azimuth corresponding to the user's current position, and the historical geographical coordinates corresponding to the historical positioning point in the map where the user is located and the standard longitude and latitude corresponding to the unit distance if the current positioning mode is the preset positioning mode; the moving distance determination module 320 is used to analyze and process the acceleration data based on the preset data analysis method to determine the user's moving distance during the current movement; the two-dimensional coordinate determination module 330 is used to determine the two-dimensional coordinates corresponding to the current position based on the moving distance and azimuth; the current geographical coordinate determination module 340 is used to determine the current geographical coordinates corresponding to the current position based on the historical geographical coordinates, standard longitude and latitude and two-dimensional coordinates; the moving trajectory generation module 350 is used to draw the current positioning point corresponding to the current position in the map based on the current geographical coordinates, and connect the historical positioning point and the current positioning point to generate the user's current moving trajectory.

[0119] The technical solution of the embodiment of the present invention is as follows: if the current positioning mode is a preset positioning mode, the acceleration data of the user during movement, the azimuth corresponding to the user's current position, and the historical geographical coordinates corresponding to the historical positioning point in the map where the user is located and the standard longitude and latitude corresponding to the unit distance are obtained; the acceleration data is analyzed and processed based on a preset data analysis method to determine the user's movement distance during the current movement; based on the movement distance and azimuth, the two-dimensional coordinates corresponding to the current position are determined; based on the historical geographical coordinates, the standard longitude and latitude and the two-dimensional coordinates, the current geographical coordinates corresponding to the current position are determined; based on the current geographical coordinates, the current positioning point corresponding to the current position is drawn on the map based on the current geographical coordinates, and the historical positioning point and the current positioning point are connected to generate the user's current movement trajectory, thereby realizing position calibration and trajectory generation in the preset positioning mode and without a GPS signal, and improving the accuracy of position calibration and the accuracy of trajectory generation.

[0120] Based on the above technical solution, the data acquisition module 310 may include:

[0121] The geomagnetic data acquisition submodule is used to obtain the three-axis geomagnetic component and the three-axis gravitational acceleration component corresponding to the user's current location;

[0122] A tilt angle determination submodule, configured to determine the pitch angle and roll angle of the device worn by the user based on the three-axis gravity acceleration components;

[0123] A two-axis geomagnetic component determination submodule, for determining the two-axis geomagnetic component in the horizontal plane based on the three-axis geomagnetic component, the pitch angle and the roll angle;

[0124] The azimuth determination submodule is used to determine the azimuth corresponding to the user's current position based on the arc tangent value of the two-axis geomagnetic component.

[0125] Based on the above technical solution, the data acquisition module 310 may include:

[0126] The boundary geographic coordinate acquisition submodule is used to obtain the boundary geographic coordinates corresponding to the boundary point in the map where the user is located;

[0127] The standard longitude and latitude determination submodule is used to process the boundary geographic coordinates based on a preset distance calculation method to determine the standard longitude and latitude corresponding to the unit distance in the map where the user is located.

[0128] Based on the above technical solution, the moving distance determination module 320 is specifically used to: determine the user's moving state during the current movement process based on acceleration data and target classification model; determine the user's moving stride during the current movement process based on movement state, user information and target stride prediction model; determine the user's moving steps during the current movement process based on acceleration data and target step number prediction model; determine the user's moving distance during the current movement process based on moving stride and moving step number.

[0129] Based on the above technical solution, the two-dimensional coordinate determination module 330 is specifically used to: determine the relative angle between the historical positioning point and the current position based on the azimuth and the preset coordinate system; the preset coordinate system is pre-established with the historical positioning point as the origin and the north direction as the positive direction of the Y axis; based on the relative angle and the moving distance, determine the two-dimensional coordinate corresponding to the current position.

[0130] Based on the above technical solution, the current geographic coordinate determination module 340 is specifically used to: perform dimension conversion based on standard longitude and latitude and two-dimensional coordinates to determine the candidate longitude and latitude corresponding to the current position; and determine the current geographic coordinates corresponding to the current position based on historical geographic coordinates and candidate longitude and latitude.

[0131] The movement trajectory generating device provided in the embodiment of the present invention can execute the movement trajectory generating method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the movement trajectory generating method.

[0132] It is worth noting that in the above-mentioned embodiment of movement trajectory generation, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other and are not used to limit the scope of protection of the present invention.

[0133] Example 4

[0134] Figure 4A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0135] like Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0136] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0137] The processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the movement trajectory generation method.

[0138] In some embodiments, the movement trajectory generation method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the movement trajectory generation method described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to perform the movement trajectory generation method in any other appropriate manner (e.g., by means of firmware).

[0139] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0140] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0141] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0142] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0143] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0144] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.

[0145] An embodiment of the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements the movement trajectory generation method provided in any embodiment of the present application.

[0146] During the implementation of the computer program product, the computer program code for performing the operation of the present invention can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and also conventional procedural programming languages ​​such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet). The program product and the mobile trajectory generation method disclosed in each embodiment of the present application belong to the same inventive concept, so they are not described here.

[0147] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.

[0148] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.

Claims

1. A method for generating a moving trajectory, characterized in that: include: If the current positioning mode is the preset positioning mode, the acceleration data of the user during movement, the azimuth corresponding to the user's current location, the historical geographic coordinates corresponding to the historical positioning point on the user's map, and the standard longitude and latitude corresponding to the unit distance are obtained; Analyzing and processing the acceleration data based on a preset data analysis method to determine the distance moved by the user during the current movement; Determining the two-dimensional coordinates corresponding to the current position based on the movement distance and the azimuth; Determining current geographic coordinates corresponding to the current position based on the historical geographic coordinates, the standard longitude and latitude, and the two-dimensional coordinates; A current positioning point corresponding to the current position is drawn on the map based on the current geographic coordinates, and the historical positioning points and the current positioning point are connected to generate a current movement trajectory of the user.

2. The method according to claim 1, characterized in that Get the azimuth corresponding to the user's current location, including: Get the three-axis geomagnetic component and three-axis gravitational acceleration component corresponding to the user's current location; Determining a pitch angle and a roll angle of a device worn by a user based on the three-axis gravity acceleration components; determining a two-axis geomagnetic component in a horizontal plane based on the three-axis geomagnetic component, the pitch angle, and the roll angle; The azimuth corresponding to the current position of the user is determined based on the arc tangent value of the two-axis geomagnetic component.

3. The method according to claim 1, characterized in that Get the standard longitude and latitude corresponding to the unit distance on the user's map, including: Get the boundary geographic coordinates corresponding to the boundary point on the map where the user is located; The boundary geographic coordinates are processed based on a preset distance calculation method to determine the standard longitude and latitude corresponding to the unit distance in the map where the user is located.

4. The method according to claim 1, wherein The analyzing and processing the acceleration data based on a preset data analysis method to determine the movement distance of the user during the current movement process includes: Determining a movement state of the user during a current movement based on the acceleration data and the target classification model; Determining the user's movement stride during the current movement based on the movement state, user information, and a target stride prediction model; Determining the number of steps taken by the user during the current movement based on the acceleration data and the target step number prediction model; Based on the movement stride and the number of movement steps, a movement distance of the user in the current movement process is determined.

5. The method according to claim 1, wherein The determining, based on the moving distance and the azimuth, the two-dimensional coordinates corresponding to the current position includes: Determining the relative angle between the historical positioning point and the current position based on the azimuth and a preset coordinate system; the preset coordinate system is pre-established with the historical positioning point as the origin and due north as the positive direction of the Y axis; Based on the relative angle and the moving distance, a two-dimensional coordinate corresponding to the current position is determined.

6. The method according to claim 1, characterized in that The determining, based on the historical geographic coordinates, the standard longitude and latitude, and the two-dimensional coordinates, the current geographic coordinates corresponding to the current position includes: Performing dimension conversion based on the standard longitude and latitude and the two-dimensional coordinates to determine candidate longitude and latitude corresponding to the current position; Based on the historical geographic coordinates and the candidate longitude and latitude, current geographic coordinates corresponding to the current position are determined.

7. A moving trajectory generating device, characterized in that: The device comprises: A data acquisition module, configured to acquire the user's acceleration data during movement, the azimuth corresponding to the user's current location, the historical geographic coordinates corresponding to the historical location point on the user's map, and the standard longitude and latitude corresponding to the unit distance, if the current positioning mode is the preset positioning mode; A movement distance determination module, configured to analyze and process the acceleration data based on a preset data analysis method to determine the movement distance of the user during the current movement process; a two-dimensional coordinate determination module, configured to determine the two-dimensional coordinates corresponding to the current position based on the movement distance and the azimuth; a current geographic coordinate determination module, configured to determine the current geographic coordinates corresponding to the current position based on the historical geographic coordinates, the standard longitude and latitude, and the two-dimensional coordinates; The movement trajectory generation module is used to draw a current positioning point corresponding to the current position in the map based on the current geographic coordinates, and connect the historical positioning points and the current positioning point to generate the user's current movement trajectory.

8. An electronic device, characterized in that: The electronic device comprises: one or more processors; a memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the movement trajectory generation method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the movement trajectory generation method according to any one of claims 1 to 6 is implemented.

10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements the movement trajectory generation method according to any one of claims 1 to 6.