Vehicle position display method and device and vehicle

By using preset trajectory lines and indexes for local searches in the vehicle location display, the problem of location offset caused by low GPS accuracy is solved, achieving accurate and smooth display of vehicle location.

CN121829592APending Publication Date: 2026-04-10BEIJING SHOUGANG AUTOMATION INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-31
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

When GPS accuracy is low, vehicle location display devices are prone to deviating from the actual road.

Method used

By obtaining the vehicle's current location, a local search is performed using preset trajectory lines and indexes to calculate the first minimum distance and the second minimum distance, determine the target location and display it, and make dynamic adjustments based on the vehicle's status.

Benefits of technology

When GPS accuracy is low, ensure that the vehicle location display matches the actual road, reduce offset, improve display accuracy and smoothness, and reduce computational complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121829592A_ABST
    Figure CN121829592A_ABST
Patent Text Reader

Abstract

The invention discloses a vehicle position display method and device and a vehicle. The method comprises the steps that the current position, collected based on a global positioning system, of the vehicle is acquired; if the current state of the vehicle is a moving state, a search range is determined according to the current position, the search range comprises a plurality of first track line segments, and each first track line segment comprises two first track points; and in the search range, updating the current position as a target position, and displaying the target position as the updated current position of the vehicle. When the GPS precision is low, the current position is corrected to be the target position, and the target position is matched with the actual road, so that the displayed vehicle position is not easy to deviate from the actual road.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of vehicle technology, and in particular, to a vehicle location display method, device, and vehicle. Background Technology

[0002] Vehicle map display devices mainly rely on raw GPS (Global Positioning System) location data to display the vehicle's location. If the GPS accuracy is low, the displayed vehicle location may deviate from the actual road. Summary of the Invention

[0003] Embodiments of this application provide a vehicle location display method, apparatus, and vehicle to address the technical problem that when GPS accuracy is low, the vehicle location displayed by the map display device is prone to deviating from the actual road.

[0004] Other features and advantages of this application will become apparent from the following detailed description, or may be learned in part from practice of this application.

[0005] According to a first aspect of this application, a vehicle location display method is provided, wherein the vehicle stores a preset trajectory line, the preset trajectory line comprising a plurality of continuous trajectory line segments, each trajectory line segment comprising two trajectory points at the beginning and end of the line segment, and each trajectory line segment having a unique index, the method comprising:

[0006] Obtain the current location of the vehicle based on data collected by the Global Positioning System;

[0007] If the current state of the vehicle is in a moving state, then the current index in the preset trajectory line corresponding to the current position is obtained, and the search range is obtained with the trajectory line segment corresponding to the current index as the center according to the preset search radius. The search range includes multiple first trajectory line segments, and each first trajectory line segment includes two first trajectory points.

[0008] Obtain a first minimum distance and a second minimum distance, wherein the first minimum distance is the distance corresponding to the second trajectory line segment with the smallest distance to the current position among a plurality of first trajectory line segments, and the second minimum distance is the distance corresponding to the second trajectory point with the smallest distance to the current position among a plurality of first trajectory points;

[0009] If the smaller of the first minimum distance and the second minimum distance is less than or equal to a preset first distance threshold, then if the first minimum distance is less than or equal to the second minimum distance, the projection point of the current position on the second trajectory line segment is taken as the target position; or if the first minimum distance is greater than the second minimum distance, the second trajectory point is taken as the target position.

[0010] The target location is displayed as the updated current location of the vehicle.

[0011] In some embodiments of this application, based on the foregoing scheme, after obtaining the first minimum distance and the second minimum distance, the method further includes:

[0012] If the smaller of the first minimum distance and the second minimum distance is greater than a preset first distance threshold and less than or equal to a preset second distance threshold, then the vehicle is controlled to display the current location.

[0013] In some embodiments of this application, based on the foregoing scheme, after obtaining the first minimum distance and the second minimum distance, the method further includes:

[0014] If the smaller of the first minimum distance and the second minimum distance is greater than the second distance threshold, the search range is updated, and the process returns to the step of obtaining the first minimum distance and the second minimum distance until the smaller of the first minimum distance and the second minimum distance is less than or equal to the preset first distance threshold, or if the updated search range is the preset trajectory line, the traversal of the updated search range is completed, wherein the updated search range is greater than the search range before the update.

[0015] In some embodiments of this application, based on the foregoing scheme, after obtaining the current location of the vehicle collected by the Global Positioning System, the method further includes:

[0016] If the current state of the vehicle is stationary or at low speed, the previous display position of the vehicle remains unchanged. The previous display position is the display position corresponding to the previous position of the vehicle.

[0017] In some embodiments of this application, based on the foregoing scheme, after displaying the target location as the updated current location of the vehicle, the method further includes:

[0018] Obtain the vehicle's previous location based on data collected from the Global Positioning System;

[0019] The direction of the relative displacement of the current position with respect to the previous position is taken as the current heading direction of the vehicle.

[0020] Starting from the target location, connect M trajectory points forward along the preset trajectory line to obtain the target path, where M is an integer greater than or equal to 1;

[0021] Obtain the tangent direction of the target path. If the deviation between the tangent direction and the current vehicle heading direction is greater than or equal to a preset angle threshold, then the tangent direction is taken as the target direction. If the deviation between the tangent direction and the current vehicle heading direction is less than the angle threshold, then the current vehicle heading direction is taken as the target direction.

[0022] The target direction is displayed as the direction in which the vehicle is facing.

[0023] In some embodiments of this application, based on the foregoing scheme, displaying the target location as the updated current location of the vehicle includes:

[0024] Add the target location to the location display queue;

[0025] If the current number of items in the queue displayed at the location is less than or equal to a preset quantity threshold, it will be displayed using a smooth animation.

[0026] If the current number of items in the location display queue is greater than the number threshold, then the target location is displayed.

[0027] In some embodiments of this application, based on the foregoing scheme, obtaining the current index in the preset trajectory line corresponding to the current position includes:

[0028] Obtain the previous location of the vehicle;

[0029] Take the trajectory line segment corresponding to the previous position as the target trajectory line segment;

[0030] The index corresponding to the target trajectory line segment is used as the current index.

[0031] In some embodiments of this application, based on the foregoing scheme, before the current state of the vehicle is in a moving state, the method further includes:

[0032] Obtain the vehicle's current speed and previous position;

[0033] Determine the positional deviation between the current position and the previous position, and the time difference between the current time and the previous time, wherein the current time is the time the vehicle has been at the current position, and the previous time is the time the vehicle has been at the previous position;

[0034] The current state of the vehicle is determined based on the position deviation, the current vehicle speed, and the time difference. The current state includes the moving state, the stationary state, and the low-speed state.

[0035] According to a second aspect of this application, a vehicle position display device is provided, wherein the vehicle stores a preset trajectory line, the preset trajectory line comprising a plurality of continuous trajectory line segments, each trajectory line segment comprising two trajectory points at the beginning and end of the line segment, and each trajectory line segment having a unique index, the device comprising:

[0036] The first acquisition unit acquires the current location of the vehicle based on data collected by the Global Positioning System;

[0037] The first obtaining unit, if the current state of the vehicle is a moving state, obtains the current index in the preset trajectory line corresponding to the current position, and obtains a search range with the trajectory line segment corresponding to the current index as the center according to the preset search radius. The search range includes multiple first trajectory line segments, and each first trajectory line segment includes two first trajectory points.

[0038] The second acquisition unit acquires a first minimum distance and a second minimum distance, wherein the first minimum distance is the distance corresponding to the second trajectory line segment with the smallest distance to the current position among a plurality of first trajectory line segments, and the second minimum distance is the distance corresponding to the second trajectory point with the smallest distance to the current position among a plurality of first trajectory points;

[0039] The first unit, if the smaller of the first minimum distance and the second minimum distance is less than or equal to a preset first distance threshold, then if the first minimum distance is less than or equal to the second minimum distance, the projection point of the current position on the second trajectory line segment is taken as the target position, or if the first minimum distance is greater than the second minimum distance, the second trajectory point is taken as the target position.

[0040] The display unit displays the target location as the updated current location of the vehicle.

[0041] According to a third aspect of this application, a vehicle is provided, including a processor for performing the method described in any embodiment of the first aspect of this application.

[0042] According to a fourth aspect of this application, a computer-readable storage medium is provided that stores a computer program thereon, the computer program including executable instructions that, when executed by a processor, implement the method described in any embodiment of the first aspect of this application.

[0043] According to a fifth aspect of this application, an electronic device is provided, comprising: one or more processors; and a memory for storing executable instructions of the processors, which, when executed by the one or more processors, cause the one or more processors to implement the method described in any embodiment of the first aspect of this application.

[0044] The beneficial effects of this application are as follows:

[0045] When GPS accuracy is low and the vehicle is in motion, the search range is determined based on the current index corresponding to the current location. The first minimum distance and the second minimum distance are determined based on the search range. The first minimum distance and the second minimum distance represent the distance between the current location and the preset trajectory line. When the smaller of the first minimum distance and the second minimum distance is less than or equal to the preset first distance threshold, it indicates that the current location is relatively close to the preset trajectory line. The current location is then updated to the target location on the preset trajectory line, and the target location is displayed. The preset trajectory line matches the actual road, making it less likely for the displayed vehicle location to deviate from the actual road.

[0046] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0047] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings:

[0048] Figure 1 A flowchart of a vehicle location display method according to an embodiment of this application is shown;

[0049] Figure 2 A block diagram of a vehicle location display device according to an embodiment of this application is shown;

[0050] Figure 3 A schematic diagram of a computer-readable storage medium in an embodiment of this application is shown;

[0051] Figure 4 A schematic diagram of the system structure of an electronic device in an embodiment of this application is shown. Detailed Implementation

[0052] Figure 1 A flowchart of a vehicle location display method according to an embodiment of this application is shown. See also: Figure 1 A method for displaying vehicle location is provided. The vehicle stores a preset trajectory line, which includes multiple continuous trajectory segments. Each trajectory segment includes two trajectory points: the beginning and the end of the segment. Each trajectory segment has a unique index. The method includes at least steps S1 to S5, which are described in detail below:

[0053] In step S1, the current location of the vehicle is obtained based on data collected by a Global Positioning System (GPS).

[0054] In some implementations, obtaining the current location of the vehicle based on the Global Positioning System (GPS) includes: obtaining raw location data based on the GPS; performing an integrity check on the raw location data; if the raw location data is incomplete, returning to the step of obtaining the raw location data based on the GPS until the raw location data is complete; if the raw location data is complete, performing a format normalization conversion to obtain the current location.

[0055] In step S2, if the current state of the vehicle is in a moving state, the current index of the preset trajectory line corresponding to the current position is obtained, and the search range is obtained with the trajectory line segment corresponding to the current index as the center and according to the preset search radius. The search range includes multiple first trajectory line segments, and each first trajectory line segment includes two first trajectory points.

[0056] In step S3, a first minimum distance and a second minimum distance are obtained. The first minimum distance is the distance corresponding to the second trajectory line segment with the smallest distance from the current position among the plurality of first trajectory line segments. The second minimum distance is the distance corresponding to the second trajectory point with the smallest distance from the current position among the plurality of first trajectory points.

[0057] In step S4, if the smaller of the first minimum distance and the second minimum distance is less than or equal to a preset first distance threshold, then if the first minimum distance is less than or equal to the second minimum distance, the projection point of the current position on the second trajectory segment is taken as the target position; or if the first minimum distance is greater than the second minimum distance, the second trajectory point is taken as the target position. In other words, when the current state is a moving state, the local trajectory search and position calibration process is driven, and the target position is taken as the calibrated current position, which can also be understood as the updated current position.

[0058] In step S5, the target location is displayed as the updated current location of the vehicle.

[0059] In some embodiments, after obtaining the first minimum distance and the second minimum distance, the method further includes: if the smaller of the first minimum distance and the second minimum distance is greater than a preset first distance threshold and less than or equal to a preset second distance threshold, then controlling the vehicle to display the current location. The first distance threshold can be 25m, and the second distance threshold can be 50m.

[0060] In some embodiments, after obtaining the first minimum distance and the second minimum distance, the method further includes: if the smaller of the first minimum distance and the second minimum distance is greater than the second distance threshold, then updating the search range and returning to the step of obtaining the first minimum distance and the second minimum distance, until the smaller of the first minimum distance and the second minimum distance is less than or equal to a preset first distance threshold, or if the updated search range is the preset trajectory line, completing the traversal of the updated search range, wherein the updated search range is greater than the search range before the update.

[0061] In some implementations, after obtaining the vehicle's current location based on the Global Positioning System (GPS), the method further includes: if the vehicle's current state is stationary or at low speed, then maintaining the vehicle's previous displayed position unchanged, where the previous displayed position is the position corresponding to the vehicle's previous location. In other words, when the current state is stationary or at low speed, a position freeze is triggered.

[0062] In some implementations, when the current state is a low-speed state, deceleration optimization control is performed.

[0063] Thus, different current states trigger different location processing methods, forming a closed-loop processing link from data input to state classification response.

[0064] In some implementations, before maintaining the vehicle's previous display position unchanged, and the previous display being the display position corresponding to the vehicle's previous position, the method further includes: if the vehicle has stored the current display position, then performing the step of maintaining the vehicle's previous display position unchanged, and the previous display being the display position corresponding to the vehicle's previous position; if the vehicle has not stored the current display position, then controlling the vehicle to display the current position.

[0065] In some embodiments, after the previous state of the vehicle was a stationary state or a low-speed state, the method further includes: keeping the previous heading direction of the vehicle unchanged, wherein the previous heading direction is the heading direction corresponding to the previous position of the vehicle.

[0066] In some embodiments, before maintaining the vehicle's previous heading direction unchanged, the method further includes: if the vehicle has stored the previous heading direction, then performing the step of maintaining the vehicle's previous heading direction unchanged; if the vehicle has not stored the previous heading direction, then controlling the vehicle to display the original heading direction. The original heading direction is a direction based on the Global Positioning System (GPS).

[0067] It should be noted that if the vehicle has stored the previous display position and the previous heading direction, it indicates that the vehicle has valid historical trajectory records. In this case, the vehicle's previous display position and the previous heading direction remain unchanged. That is, the last stable position is maintained. The last stable position can be understood as the position where position stability, time stability, and direction stability meet preset requirements. For example, the preset requirements are that the distance change corresponding to position stability is less than 0.5m, the interval corresponding to time stability is greater than 5s and the vehicle speed is greater than 0.3m / s, and the direction change corresponding to direction stability is less than 10°. Using the last stable position as the display coordinates and using the historical direction value, i.e., the previous heading direction, can avoid direction jumps. If the vehicle has not stored the previous display position and the previous heading direction, it indicates that the vehicle does not have historical trajectory data. In this case, it reverts to the original GPS position, i.e., the current position and the original direction. When the original direction is defaulted, 0° north is used, thereby bypassing the complex calculation process and directly outputting to the direction conversion process. This ensures that position calculation resources are completely frozen in a low-movement-activity state, eliminating invalid rendering consumption.

[0068] The above processing method can be understood as a silent processing mechanism. This silent processing mechanism forms an independent closed-loop path and achieves dynamic scheduling of computing resources through state judgment: when the vehicle's movement activity is lower than a set threshold, the trajectory search and coordinate correction links are automatically skipped, and the historical trajectory or original GPS data is used as the display reference. The direction update channel is locked synchronously, which avoids interface element jitter caused by micro fluctuations in positioning signals from the bottom layer, and significantly reduces the system's computing burden in low-power scenarios. However, the same position will not be displayed all the time. A dynamic display strategy is adopted: intelligent switching is performed according to the vehicle's state. When the current state is stationary, the historical trajectory is used to stabilize the position. When the current state is low speed, small updates are allowed when the distance change is greater than 2m. When the current state is moving, the position is optimized by trajectory adsorption, which is to execute steps S2 to S5.

[0069] In some embodiments, after displaying the target location as the updated current location of the vehicle, the method further includes: obtaining the vehicle's previous location based on a global positioning system; using the relative displacement direction of the current location relative to the previous location as the vehicle's current heading direction; starting from the target location, connecting M trajectory points forward along the preset trajectory line to obtain a target path, where M is an integer greater than or equal to 1; obtaining the tangent direction of the target path; if the deviation of the tangent direction from the current heading direction is greater than or equal to a preset angle threshold, then using the tangent direction as the target direction; if the deviation of the tangent direction from the current heading direction is less than the angle threshold, then using the current heading direction as the target direction; and displaying the target direction as the vehicle's heading direction. The angle threshold can be 30°.

[0070] In this application, a hierarchical decision-making mechanism is adopted to accurately calculate the vehicle's heading direction: First, standardized GPS direction data, i.e., the current vehicle heading direction, is obtained and forcibly classified into the 0-360° effective angle range. A Gaode adaptive direction reference value is generated through coordinate system transformation formula. Then, the direction source is selected based on whether the vehicle is in trajectory adsorption mode. In non-adsorption mode, the converted GPS direction is directly used. In adsorption mode, the trajectory tangent direction is calculated. The difference between the trajectory direction and the original GPS direction is weighed through an intelligent fusion algorithm. When the deviation between the two exceeds a set threshold, the trajectory direction is given priority. When the deviation is small, the original GPS direction reference is retained. Finally, the selected direction value is smoothed and filtered to eliminate instantaneous jumps, and continuous and stable vehicle heading direction parameters are output. The trajectory direction is the tangent direction, and the original GPS direction is the current vehicle heading direction.

[0071] The above process constructs a discrete processing link through a three-layer control strategy of mode splitting, direction optimization, and dynamic smoothing. In the adsorption mode, trajectory geometric features are used to correct inherent GPS errors, while in the non-adsorption mode, the authenticity of the original direction is maintained. Automatic optimization switching is achieved through the direction difference threshold to avoid navigation misleading caused by large-angle deflection. End-point filtering processing suppresses high-frequency jitter interference, achieving a balance between the accuracy and reliability of the output direction parameters and the smoothness of the display. This provides a millimeter-level direction calculation basis for vehicle monitoring systems. The entire mechanism strictly follows geometric constraints and real-time requirements, and can adapt to complex road environments without manual parameter intervention.

[0072] In some implementations, displaying the target location as the vehicle's updated current location includes: adding the target location to a location display queue; if the current number in the location display queue is less than or equal to a preset threshold, displaying it using a smooth animation; if the current number in the location display queue is greater than the threshold, displaying the target location directly without animation. The threshold number can be 3.

[0073] In this application, dynamic resource scheduling is achieved by monitoring the number of active animations in real time. When the number of currently executing translation or rotation animations is less than a set threshold (i.e., the current number is less than or equal to the preset threshold), a smooth animation sequence construction mechanism is automatically triggered. Based on continuous interpolation from the starting point to the ending point and a gradual angular transition from the current direction to the set direction, a standard acceleration and deceleration interpolator is configured to generate a coherent animation. After startup, it is included in the active queue management and a completion listener callback is set. Once the number of active animations reaches or exceeds the threshold limit, the animation generation stage is skipped and the position and direction parameters are updated directly to ensure real-time priority. The entire process uses the animation queue as the scheduling center. When the queue is idle, interpolation animation is used to ensure smooth display. When the queue is congested, it switches to instant update mode to avoid lag and stuttering, forming a flexible control mechanism that takes into account both visual effects and responsiveness.

[0074] This design achieves adaptive rendering through a two-way closed-loop path: on the one hand, when resources allow, it constructs a composite animation sequence that includes position movement and angle rotation, uses physical simulation interpolation to avoid abrupt changes, and embeds lifecycle monitoring to achieve automatic recycling of queue resources; on the other hand, when resources are overloaded, it activates a short-circuit mechanism to directly synchronize the latest data, compressing the map update delay to the millisecond level. The two sets of logic share the final position and direction input source, with the only difference being whether to enable animation transitions. Dynamic diversion is achieved through a single threshold judgment, solving the interface lag problem caused by rendering resource contention from the bottom layer, and providing a sustainable guarantee of smooth display for high-concurrency vehicle monitoring scenarios.

[0075] In some implementations, obtaining the current index in the preset trajectory line corresponding to the current position includes: obtaining the previous position of the vehicle; using the trajectory line segment corresponding to the previous position as the target trajectory line segment; and using the index corresponding to the target trajectory line segment as the current index.

[0076] Thus, to achieve a closed loop for trajectory optimization, the current index is first located based on historical trajectory records, i.e., the target trajectory segment. Based on this, the local search boundary range, i.e., the search range, is determined. Then, all trajectory points within this range are traversed, and the spatial distance between the current location and each trajectory point is accurately calculated to identify the nearest reference point, i.e., the second trajectory point. Alternatively, the vehicle position can be dynamically snapped to the optimal trajectory segment, i.e., the second trajectory segment, through vertical projection calculation. If the first minimum distance is less than or equal to the second minimum distance and less than a preset first distance threshold, the index corresponding to the second trajectory segment is used as the next index of the next position. If the second minimum distance is less than or equal to the first minimum distance and less than the preset first distance threshold, the index of the trajectory segment corresponding to the second trajectory point is used as the next index of the next position. In other words, the index value is updated synchronously to achieve iterative improvement in local search efficiency, forming a self-reinforcing processing link from index positioning to geometric position optimization.

[0077] The above process innovatively maps the global trajectory discretization into a dynamic local optimization problem. It establishes a restricted search domain (search range) through the preceding index (i.e., the current index), and uses spatial distance calculation and projection correction to achieve geometric path matching of the vehicle position. Finally, the closed-loop update mechanism of the index provides an optimization benchmark for subsequent positioning. While ensuring the accuracy of trajectory display, it compresses the computational complexity to a constant level. The entire processing chain is based on pure geometric operations, avoiding reliance on parameter threshold intervention, and ensuring the universality and adaptability of the algorithm in various road network topologies. The closed-loop update mechanism of the index can be understood as follows: GPS data input, acquisition of the current index, local search, projection calculation, index update, state storage, and feedback to the next positioning. Its core idea is that each positioning result serves as the starting reference point for the next positioning, narrowing the search range and improving efficiency.

[0078] The process of determining the current index can be understood as a positioning algorithm. This positioning algorithm is based on a local search algorithm of historical trajectory records, such as coordinate position. The closest historical trajectory point and direction are used for local search positioning: starting from the last index point, the search searches for the nearest line segment within a range of 12 trajectory points before and after. The function of historical trajectory records is to provide intelligent strategies such as predictive positioning and trend positioning. Positioning accuracy optimization includes multi-level search strategies, accuracy verification, and expanding the search range.

[0079] In some embodiments, before the current state of the vehicle is in a moving state, the method further includes: acquiring the vehicle's current speed and previous position; determining the positional deviation between the current position and the previous position, and the time difference between the current time and the previous time, wherein the current time is the time the vehicle has been in the current position, and the previous time is the time the vehicle has been in the previous position; determining the vehicle's current state based on the positional deviation, the current speed, and the time difference, wherein the current state includes a moving state, a stationary state, and a low-speed state. In other words, the current state is classified. The current speed can be the ratio of the positional deviation to the time difference.

[0080] In some implementations, after determining the current state of the vehicle based on the position deviation, the current vehicle speed, and the time difference, the method further includes: outputting the current state. That is, based on the current state, a corresponding state signal is output; for example, if the current state is a moving state, a state signal corresponding to the moving state is output.

[0081] In some implementations, determining the current state of the vehicle based on the position deviation, the current vehicle speed, and the time difference includes: if the position deviation is less than or equal to a preset second distance threshold, the current state is a stationary state; if the current vehicle speed is greater than a preset first speed threshold, less than or equal to a preset second speed threshold, and the time difference is greater than a preset time threshold, the current state is a low-speed state; if the position deviation is greater than a preset second distance threshold, or the current vehicle speed is greater than a preset second speed threshold, the current state is a moving state. The second distance threshold can be 0.5m, the time threshold can be 5s, the first speed threshold can be 0, and the second speed threshold can be 0.3m / s.

[0082] In some implementations, after the format normalization conversion, the steps of determining the positional deviation between the current position and the previous position, and the time difference between the current time and the previous time, are performed. Determining the positional deviation can be understood as calculating the displacement, and determining the time difference can be understood as calculating the time interval. The current position, the positional deviation, and the time difference can be temporarily stored and output to the state judgment module to determine the current state of the vehicle, i.e., whether it is stationary, at low speed, or moving. This forms a self-verifying system for the entire process from data acquisition to preprocessing output, achieving highly reliable data supply to downstream modules. The state judgment module is used to perform the step of determining the current state of the vehicle based on the positional deviation, the current vehicle speed, and the time difference, where the current state includes the moving state, the stationary state, and the low-speed state.

[0083] In this application, after determining the nearest trajectory point and distance, a hierarchical distance judgment mechanism dynamically selects the position optimization mode. When the distance between the vehicle positioning point and the preset trajectory is within the minimum threshold range, i.e., less than or equal to the preset first distance threshold, the strong adsorption mode is automatically activated, projecting the vehicle position onto the nearest trajectory line segment, i.e., the second trajectory line segment, or adsorbing it onto the second trajectory point. If the distance exceeds the preset first distance threshold but does not reach the maximum critical value, i.e., the preset second distance threshold, the mode is switched to deviation mode, retaining the original GPS positioning information. When the distance significantly exceeds the maximum critical value, the extended search mechanism is activated, performing a full trajectory scan to find the optimal matching point, and adaptively selecting trajectory adsorption or maintaining the deviation state based on the search results. Finally, the calibrated position parameters are output for use by the direction calculation engine. The entire process forms a closed-loop decision system, ensuring a dynamic balance between trajectory fitting accuracy and actual driving state through a distance-driven three-level processing strategy.

[0084] The above-mentioned position matching process adopts a hierarchical judgment-adaptive mode switching architecture. With geometric spatial relationship as the decision core, the trajectory route is discretized into a dual logical path of local optimization and global correction. While ensuring the efficiency of automatic absorption and correction of short-distance deviations, it provides a tolerant processing channel for significant deviation path states, avoiding positioning distortion caused by overcorrection. Ultimately, it achieves accurate mapping from trajectory points to dynamic vehicle positions, providing a highly reliable position benchmark for driving direction calculation.

[0085] In some implementations, the method further includes: performing a mirror conversion calculation: output angle = (360° - target direction), standardizing the angle range through modulo operation, and outputting the calibrated Amap direction value.

[0086] It should be noted that if you find that directly using the direction and angle provided by the GPS device to set the vehicle icon in Gaode Map will cause directional deviation: when the vehicle is actually traveling east, the icon will face west, and when traveling west, the icon will face east. There is also a systematic deviation in other diagonal directions (such as northeast and southwest).

[0087] Through testing and analysis, it was determined that the problem stemmed from the difference in angle measurement methods used by GPS and Gaode Map: GPS standard direction system: clockwise measurement, north 0°, east 90°, south 180°, west 270°; Gaode Map direction system: counterclockwise measurement, north 0°, east 270°, south 180°, west 90°. The key pattern is that, except for north (0°) and south (180°) which remain unchanged, all other directions are mirror images. For example: GPS 90° (East) → Gaode 270° (West); GPS 270° (West) → Gaode 90° (East). Therefore, a mathematical conversion formula is used. Based on the mirror symmetry law, a general conversion formula is derived: Gaode map direction = (360° - GPS standard direction) % 360°. % 360° ensures that the result is always within the effective range of 0° to 360°. This formula achieves mirror flipping by subtracting the GPS angle from 360° and is compatible with all directions, such as GPS 45° Northeast → Gaode 315° Northwest.

[0088] It not only solved technical problems in practical applications, but more importantly, it revealed the differences in directional representation between different map coordinate systems, providing an important theoretical foundation and practical guidance for related technical fields.

[0089] Thus, the process begins with receiving the final optimized location and direction data to drive the dynamic update of the Gaode Map Marker. Then, it implements dual-track processing based on the enabled / disabled follow mode: when enabled, it performs smooth tracking of the camera view and synchronous drawing of the trajectory line; when disabled, it maintains the current view and only updates the Marker display. After the trajectory line is rendered in layers, the driven segments are differentiated in color, and the undriven segments are semi-transparently previewed. The UI information panel is refreshed simultaneously, and the real-time speed display is updated based on the original GPS data. This forms a closed-loop refresh mechanism from core positioning data to the full-element map interface, ensuring real-time visualization of vehicle status changes.

[0090] The above method can be understood as the display engine using modes to adaptively optimize rendering logic: in follow mode, the camera view and marker movement are driven synchronously by the physical animation engine, i.e., the built-in easing function eliminates jumps; in non-follow mode, the display layer is updated separately to reduce the computational load; the trajectory line adopts a dual-thread drawing architecture—the traveled trajectory uses a persistent vector layer to ensure rendering efficiency, and the untraveled trajectory uses a lightweight overlay layer to support dynamic preview. When displaying speed, the native GPS sensor data is read directly, bypassing intermediate processing delays. Finally, while ensuring accurate mapping of position and direction, the map refresh latency is compressed to within the 16ms (60fps) smooth threshold range.

[0091] In this application, an intelligent motion state judgment mechanism effectively solves the problem of vehicle direction jitter caused by GPS accuracy errors, a hierarchical distance trajectory adsorption strategy achieves precise position optimization, a local search algorithm reduces the computational complexity from O(N) to O(1), and adaptive animation queue management ensures the stability and smoothness of the system. This method can achieve accurate, smooth, and low-power display of vehicle position, significantly improving the user experience.

[0092] Figure 2 A block diagram of a vehicle location display device according to an embodiment of this application is shown. See also: Figure 2 According to a second aspect of this application, a vehicle location display device 100 is provided, wherein the vehicle stores a preset trajectory line, the preset trajectory line comprising a plurality of continuous trajectory segments, each trajectory segment comprising two trajectory points at the beginning and end of the segment, and each trajectory segment having a unique index, the device comprising:

[0093] The first acquisition unit 101 acquires the current location of the vehicle based on the global positioning system.

[0094] The first obtaining unit 102, if the current state of the vehicle is a moving state, obtains the current index in the preset trajectory line corresponding to the current position, and obtains the search range according to the preset search radius with the trajectory line segment corresponding to the current index as the center. The search range includes multiple first trajectory line segments, and each first trajectory line segment includes two first trajectory points.

[0095] The second acquisition unit 103 acquires a first minimum distance and a second minimum distance. The first minimum distance is the distance corresponding to the second trajectory line segment with the smallest distance to the current position among a plurality of first trajectory line segments. The second minimum distance is the distance corresponding to the second trajectory point with the smallest distance to the current position among a plurality of first trajectory points.

[0096] The first unit 104, if the smaller of the first minimum distance and the second minimum distance is less than or equal to a preset first distance threshold, then if the first minimum distance is less than or equal to the second minimum distance, the projection point of the current position on the second trajectory line segment is taken as the target position, or if the first minimum distance is greater than the second minimum distance, the second trajectory point is taken as the target position.

[0097] The display unit 105 displays the target location as the updated current location of the vehicle.

[0098] According to a third aspect of this application, a vehicle is provided, including a processor for performing the method described in any embodiment of the first aspect of this application.

[0099] Based on the same inventive concept, as a fourth aspect, this application also provides a computer-readable storage medium having a computer program stored thereon, the computer program including executable instructions that, when executed by a processor, implement the method described in any embodiment of the first aspect of this application.

[0100] In some possible implementations, various aspects of this application may also be implemented as a program product comprising program code that, when the program product is run on a terminal device, causes the terminal device to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this application.

[0101] refer to Figure 3 As shown, a program product 200 for implementing the above-described method according to an embodiment of this application is described. It may employ a portable compact disc read-only memory (CD-ROM) and include program code, and can run on a terminal device, such as a personal computer. However, the program product of this application is not limited thereto. In this document, a readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0102] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0103] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.

[0104] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0105] Program code for performing the operations of this application can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0106] In another respect, this application also provides an electronic device capable of implementing the above-described method.

[0107] Those skilled in the art will understand that various aspects of this application can be implemented as a system, method, or program product. Therefore, various aspects of this application can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, collectively referred to herein as a "circuit," "module," or "system."

[0108] The following reference Figure 4 To describe an electronic device 300 according to this embodiment of the present application. Figure 4 The electronic device 300 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0109] like Figure 4 As shown, the electronic device 300 is manifested in the form of a general-purpose computing device. The components of the electronic device 300 may include, but are not limited to: at least one processing unit 310, at least one storage unit 320, and a bus 330 connecting different system components (including storage unit 320 and processing unit 310).

[0110] The storage unit stores program code that can be executed by the processing unit 310, causing the processing unit 310 to perform the steps described in the "Embodiment Methods" section above according to various exemplary embodiments of this application.

[0111] Storage unit 320 may include readable media in the form of volatile storage units, such as random access memory (RAM) 321 and / or cache memory 322, and may further include read-only memory (ROM) 323.

[0112] Storage unit 320 may also include a program / utility 324 having a set (at least one) of program modules 325, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.

[0113] Bus 330 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.

[0114] Electronic device 300 can also communicate with one or more external devices 400 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with the electronic device 300, and / or with any device that enables the electronic device 300 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 350. Furthermore, electronic device 300 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 360. Figure 4 As shown, network adapter 360 communicates with other modules of electronic device 300 via bus 330. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with electronic device 300, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0115] The functions described herein may be implemented in hardware, software executed by a processor, firmware, or any combination thereof. If implemented in software executed by a processor, the functions may be stored as one or more instructions or codes on or transmitted via a computer-readable medium. Other examples and embodiments are within the scope and spirit of this application and the appended claims. For example, due to the nature of software, the functions described above may be implemented using software executed by a processor, hardware, firmware, hardwired, or any combination thereof. Furthermore, the functional units may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit.

[0116] The above description is merely an embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A vehicle position display method characterized by comprising: The vehicle stores a preset track line, the preset track line comprises a plurality of continuous track line segments, each track line segment comprises two track points at a line segment head and a line segment tail, and each track line segment has a unique index, and the method comprises: acquiring a current position of the vehicle collected based on a global positioning system; if the current state of the vehicle is a moving state, acquiring a current index in the preset track line corresponding to the current position, taking the track line segment corresponding to the current index as a center, and obtaining a search range according to a preset search radius, the search range comprises a plurality of first track line segments, and each first track line segment comprises two first track points; acquiring a first minimum distance and a second minimum distance, the first minimum distance is a distance corresponding to a second track line segment with a minimum distance from the current position in the plurality of first track line segments, and the second minimum distance is a distance corresponding to a second track point with a minimum distance from the current position in the plurality of first track points; if a smaller value of the first minimum distance and the second minimum distance is less than or equal to a preset first distance threshold, in a case where the first minimum distance is less than or equal to the second minimum distance, a projection point of the current position on the second track line segment is taken as a target position, or in a case where the first minimum distance is greater than the second minimum distance, the second track point is taken as the target position; displaying the target position as an updated current position of the vehicle.

2. The vehicle position display method according to claim 1, characterized by After the first minimum distance and the second minimum distance are acquired, the method further comprises: if the smaller value of the first minimum distance and the second minimum distance is greater than the preset first distance threshold and less than or equal to a preset second distance threshold, controlling the vehicle to display the current position.

3. The vehicle position display method according to claim 2, wherein After the first minimum distance and the second minimum distance are acquired, the method further comprises: if the smaller value of the first minimum distance and the second minimum distance is greater than the second distance threshold, updating the search range, and returning to the step of acquiring the first minimum distance and the second minimum distance, until the smaller value of the first minimum distance and the second minimum distance is less than or equal to the preset first distance threshold, or in a case where the updated search range is the preset track line, completing traversal of the updated search range, wherein the updated search range is greater than the search range before updating.

4. The vehicle position display method according to claim 1, characterized by After the current position of the vehicle collected based on the global positioning system is acquired, the method further comprises: if the current state of the vehicle is a stationary state or a low-speed state, keeping the last display position of the vehicle unchanged, the last display position is a display position corresponding to the last position of the vehicle.

5. A vehicle position display method according to any one of claims 1 to 4, characterized by After the target position is displayed as the updated current position of the vehicle, the method further comprises: acquiring a last position of the vehicle collected based on a global positioning system; taking a relative displacement direction of the current position relative to the last position as a current heading direction of the vehicle; Connecting M track points in front of the target position along the preset track line to obtain a target path, M is an integer greater than or equal to 1; Obtaining a tangent direction of the target path, if a deviation between the tangent direction and the current heading direction is greater than or equal to a preset angle threshold, taking the tangent direction as a target direction, if the deviation between the tangent direction and the current heading direction is less than the angle threshold, taking the current heading direction as the target direction; Displaying the target direction as the heading direction of the vehicle.

6. A vehicle position display method according to any one of claims 1 to 4, characterized by The displaying the target position as the updated current position of the vehicle includes: Adding the target position to a position display queue; If a current number of the position display queue is less than or equal to a preset number threshold, displaying through a smooth animation display mode; If the current number of the position display queue is greater than the number threshold, displaying the target position.

7. A vehicle position display method according to any one of claims 1 to 4, characterized by The obtaining the current index in the preset track line corresponding to the current position includes: Obtaining a previous position of the vehicle; Taking a target track line segment corresponding to the previous position as the target track line segment; Taking an index corresponding to the target track line segment as the current index.

8. A vehicle position display method according to any one of claims 1 to 4, characterized by Before the current state of the vehicle is the moving state, the method further includes: Obtaining a current speed and a previous position of the vehicle; Determining a position deviation between the current position and the previous position and a time difference between a current time and a previous time, the current time being a time when the vehicle is at the current position, the previous time being a time when the vehicle is at the previous position; Determining the current state of the vehicle according to the position deviation, the current speed and the time difference, the current state including the moving state, a static state and a low-speed state.

9. A vehicle position display device characterized by comprising: The vehicle stores a preset track line, the preset track line including a plurality of continuous track line segments, each track line segment including two track points of a line segment head and a line segment tail, and each track line segment having a unique index, and the device includes: A first obtaining unit that obtains a current position of the vehicle based on a global positioning system; A first obtaining unit that, if the current state of the vehicle is a moving state, obtains a current index in the preset track line corresponding to the current position, and takes a track line segment corresponding to the current index as a center to obtain a search range according to a preset search radius, the search range including a plurality of first track line segments, each first track line segment including two first track points; A second obtaining unit that obtains a first minimum distance and a second minimum distance, the first minimum distance being a distance corresponding to a second track line segment with a minimum distance from the current position in the plurality of first track line segments, and the second minimum distance being a distance corresponding to a second track point with a minimum distance from the current position in the plurality of first track points; The first unit, if the smaller value of the first minimum distance and the second minimum distance is less than or equal to a preset first distance threshold, the projection point of the current position on the second trajectory segment is taken as a target position in the case that the first minimum distance is less than or equal to the second minimum distance, or the second trajectory point is taken as the target position in the case that the first minimum distance is greater than the second minimum distance. The display unit displays the target position as the updated current position of the vehicle.

10. A vehicle characterized by comprising: A processor is configured to perform the method of any one of claims 1-8.