A positioning method and device of a vehicle, an electronic device, and a storage medium
By filtering and retaining the optimal position coordinates in the pixel coordinate system, the vehicle positioning error problem is solved, the vehicle position is accurately displayed, and the accuracy of navigation is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WOHANG TECH (NANJING) CO LTD
- Filing Date
- 2025-12-29
- Publication Date
- 2026-04-21
AI Technical Summary
Existing vehicle positioning technology suffers from satellite signal attenuation in tree-shaded road sections, leading to positioning errors, causing vehicle icons to deviate from the actual lane, and even resulting in navigation misjudgments.
The system acquires the location coordinates of the target vehicle at multiple times via satellite, converts them into a pixel coordinate system using a preset transformation matrix, and then filters and retains the optimal location coordinates based on the projection relationship between the pixel coordinate system and the road, while deleting erroneous coordinates to achieve accurate display of the vehicle's location.
It improves the accuracy of vehicle positioning, especially in scenarios with weak satellite signals, ensuring the accuracy of vehicle location display and reducing navigation misjudgments.
Smart Images

Figure CN121454575B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicle positioning technology, and more specifically, to a vehicle positioning method, device, electronic device, and storage medium. Background Technology
[0002] With the widespread application of Global Navigation Satellite System (GNSS) technology, vehicle positioning has become one of the fundamental functions of modern intelligent transportation systems and in-vehicle navigation. Existing technologies mainly achieve real-time vehicle location calculation and road matching by receiving signals from satellite systems such as GPS, GLONASS, and BeiDou, combined with inertial navigation unit (IMU) data.
[0003] In real-world applications, vehicle positioning accuracy is affected by multiple factors, especially in tree-shaded sections where leaves can attenuate L-band satellite signals by 10-20 dB, causing abrupt changes in receiver carrier phase measurements. While existing road matching algorithms can project the positioning point onto the nearest road using weighted Bayesian estimation, when the satellite positioning error exceeds the lane width, the vehicle icon may still deviate from the actual lane or even appear on an adjacent road. This deviation can lead to misinterpretations of navigation commands. Summary of the Invention
[0004] The purpose of this application is to provide a vehicle positioning method, device, electronic device, and storage medium to solve the technical problem in the prior art where inaccurate vehicle satellite positioning causes errors in vehicle display on maps.
[0005] In a first aspect, the present invention provides a vehicle positioning method, the method comprising: acquiring first position coordinates of a target vehicle in a satellite coordinate system at multiple different times within a preset time period via satellite; converting each first position coordinate into a second position coordinate in a pixel coordinate system using a preset transformation matrix; determining whether to retain the second position coordinate at the current time based on the projection relationship between the target vehicle and the currently driven road in the pixel coordinate system; if retained, using the second position coordinate at the current time as the position of the target vehicle within the preset time period to display the corresponding position marker of the target vehicle on a map; if not retained, deleting the current second position coordinate.
[0006] In an optional implementation, whether to retain the second position coordinates is determined by the following method:
[0007] For each moment, calculate the projected coordinates of the target vehicle relative to the road it is currently traveling on;
[0008] For each moment, calculate the distance and angle between the target vehicle's projected coordinates and the road it is currently traveling on;
[0009] Based on the included angle and distance values at each time point, determine whether to retain the second position coordinates.
[0010] In an optional implementation, the step of determining whether to retain the second position coordinates based on the included angle and distance values at each time point specifically includes:
[0011] For each moment, determine whether the included angle value corresponding to that moment is between 0° and 90°;
[0012] If so, determine whether the distance value at that moment is the minimum distance value;
[0013] If so, then determine to retain the second position coordinates at that moment.
[0014] In an optional implementation, the projected coordinates of the target vehicle relative to the road it is currently traveling on are calculated in the following manner. :
[0015] ;
[0016] ;
[0017] in, The coordinates of the starting point of the road currently being traveled. This is the road direction vector of the road currently being traveled by the target vehicle. Let be the direction vector of the target vehicle's travel.
[0018] In an optional implementation, the road direction vector of the road currently being traveled by the target vehicle is calculated in the following manner:
[0019] ;
[0020] in, The coordinates of the destination of the current road being traveled;
[0021] The target vehicle's direction vector is calculated as follows:
[0022] ;
[0023] in, The coordinates of the target vehicle's second position at the current moment.
[0024] In an optional implementation, the distance value is calculated in the following manner. :
[0025] .
[0026] In an optional implementation, the included angle value is calculated in the following manner. :
[0027]
[0028]
[0029] ;
[0030] in, The slope of the projected coordinates relative to the road currently being traveled.
[0031] Secondly, the present invention provides a vehicle positioning device, the device comprising:
[0032] The acquisition module is used to acquire the first position coordinates of the target vehicle in the satellite coordinate system at multiple different times within a preset time period via satellite.
[0033] The mapping module is used to convert each first position coordinate into a second position coordinate in the pixel coordinate system using a preset transformation matrix;
[0034] The judgment module is used to determine whether to retain the second position coordinates at the current moment based on the projection relationship between the target vehicle and the road it is currently traveling on in the pixel coordinate system.
[0035] If retained, the second location coordinates at the current moment will be used as the location of the target vehicle within the preset time period, so as to display the location marker of the target vehicle on the map;
[0036] If not retained, the current second position coordinates will be deleted.
[0037] Thirdly, the present invention provides an electronic device, comprising: a processor, a memory, and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the memory via the bus, and the processor executes the machine-readable instructions to perform the steps of the positioning method for any of the vehicles described in the foregoing embodiments.
[0038] Fourthly, the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the vehicle positioning method as described in any of the foregoing embodiments.
[0039] This application provides a vehicle positioning method, device, electronic device, and storage medium. The method includes acquiring first position coordinates of a target vehicle in a satellite coordinate system at multiple different times within a preset time period; converting each first position coordinate into a second position coordinate in a pixel coordinate system using a preset transformation matrix; determining whether to retain the second position coordinate at the current time based on the projection relationship between the target vehicle and the currently traveled road in the pixel coordinate system; if retained, using the second position coordinate at the current time as the target vehicle's position within the preset time period to display the corresponding location marker of the target vehicle on a map; if not retained, deleting the current second position coordinate. By correcting vehicle positioning offset based on the spatial projection relationship between the vehicle and the road, the vehicle's position is accurately determined, resulting in more accurate vehicle positioning visualization. Attached Figure Description
[0040] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0041] Figure 1 A flowchart illustrating the steps of a vehicle positioning method provided in this application embodiment;
[0042] Figure 2 A flowchart of a coordinate correction step provided in an embodiment of this application;
[0043] Figure 3 A schematic diagram of the structure of a vehicle positioning device provided in an embodiment of this application;
[0044] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0045] In current vehicle positioning visualization displays, the positioning data obtained is often biased due to the complex factors of vehicle operation scenarios. Errors caused by signal reflection and multipath effects result in jitter and drift of most displayed targets, which has a significant impact on users' judgment of vehicle location.
[0046] Therefore, this application provides a vehicle positioning method, device, electronic device, and storage medium.
[0047] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.
[0048] Example 1
[0049] Figure 1 This is a flowchart illustrating the steps of a vehicle positioning method provided in an embodiment of this application. Figure 1 As shown in the embodiment of this application, a vehicle positioning method is provided, the method comprising:
[0050] S10. Obtain the first position coordinates of the target vehicle in the satellite coordinate system at multiple different times within a preset time period via satellite.
[0051] In this embodiment, taking a park sightseeing vehicle as an example, the satellite may upload multiple first location coordinates every 30 seconds. Here, the satellite positioning refresh frequency can be 3 seconds or 5 seconds, that is, 10 or 6 first location coordinates are uploaded every 30 seconds.
[0052] The first location coordinates here can be the latitude and longitude of the target vehicle.
[0053] S11. Using a preset transformation matrix, each first position coordinate is converted into a second position coordinate in the pixel coordinate system.
[0054] The pixel coordinate system here can be the pixel coordinate system constructed in the map for vehicle positioning visualization.
[0055] The preset transformation matrix here is used for coordinate mapping transformation between the satellite coordinate system and the pixel coordinate system, and can be obtained through pre-calibration.
[0056] In a specific embodiment, the conversion can be performed in the following manner:
[0057] ;
[0058] in, These are the degrees of freedom parameters of the transformation matrix. The first position coordinates, These are the coordinates of the second position.
[0059] In one feasible embodiment, the transformation matrix can also be dynamically adjusted, for example, by configuring different transformation matrices based on different driving scenarios and different vehicle speeds.
[0060] S12. Based on the projection relationship between the target vehicle and the road it is currently traveling on in the pixel coordinate system, determine whether to retain the second position coordinates at the current moment.
[0061] Figure 2 This is a flowchart illustrating a coordinate correction step provided in an embodiment of this application. Figure 2 As shown, in step S12, whether to retain the second position coordinates can be determined in the following way:
[0062] S120. For each moment, calculate the projected coordinates of the target vehicle relative to the road it is currently traveling on.
[0063] In step S120, the projected coordinates of the target vehicle relative to the road it is currently traveling on can be calculated in the following way. :
[0064] ;
[0065] ;
[0066] in, The coordinates of the starting point of the road currently being traveled. This is the road direction vector of the road currently being traveled by the target vehicle. Let be the direction vector of the target vehicle's travel.
[0067] Here, the road direction vector of the road currently being traveled by the target vehicle can be calculated in the following way:
[0068] ;
[0069] in, The coordinates of the destination of the current road being traveled;
[0070] The target vehicle's direction vector is calculated as follows:
[0071] ;
[0072] in, The coordinates of the target vehicle's second position at the current moment.
[0073] S121. For each moment, calculate the distance and angle between the projected coordinates of the target vehicle and the road it is currently traveling on.
[0074] The distance value can be calculated in the following way. :
[0075] .
[0076] And the included angle value is calculated in the following way. :
[0077]
[0078]
[0079] ;
[0080] in, The slope of the projected coordinates relative to the road currently being traveled.
[0081] S122. For each moment, determine whether the included angle value corresponding to that moment is between 0° and 90°.
[0082] S123. If yes, then determine whether the distance value corresponding to that moment is the minimum distance value.
[0083] S124. If so, then determine to retain the second position coordinates at that moment.
[0084] In a specific embodiment, one can choose Furthermore, the second position coordinate corresponding to the projection coordinate with the shortest distance value is used as the vehicle's actual position coordinates and displayed on the map interface.
[0085] In one feasible embodiment, coordinates can also be filtered using corresponding slope and distance values. Furthermore, a weighted score can be calculated based on parameters such as distance, slope / angle, current vehicle speed, acceleration, or steering angular velocity. Coordinates with scores exceeding a preset score are retained, while those below the preset score are deleted. The weights can be dynamically adjusted; for example, in tunnels / elevated areas, the confidence level of the angle is reduced, and distance becomes more dominant; in urban areas and canyons, short-term predictions from inertial navigation are incorporated.
[0086] S13. If retained, the second position coordinates at the current moment will be used as the position of the target vehicle within the preset time period, so as to display the corresponding position marker of the target vehicle on the map.
[0087] S14. If not to be retained, delete the current second position coordinates.
[0088] Based on all the retained second location coordinates, a continuous vehicle trajectory can be formed and displayed on the map interface.
[0089] This application provides a vehicle positioning method that corrects vehicle positioning offset based on the spatial projection relationship between the vehicle and the road, thereby accurately positioning the vehicle and making the vehicle positioning visualization display more accurate, especially in scenarios where satellite signals are available, it can also accurately display the vehicle position.
[0090] In another feasible embodiment of this application, the coordinates retained from the first N time steps can be introduced to form a driving trend vector. Based on the similarity between the trend vector and the road direction vector, it is determined whether to retain the coordinates to avoid the "jumping" phenomenon.
[0091] Example 2
[0092] Figure 3This is a schematic diagram of the structure of a vehicle positioning device provided in an embodiment of this application. Figure 3 As shown, based on the same inventive concept, this application also provides a vehicle positioning device, the device 30 including:
[0093] The acquisition module 310 is used to acquire the first position coordinates of the target vehicle in the satellite coordinate system at multiple different times within a preset time period via satellite.
[0094] The mapping module 320 is used to convert each first position coordinate into a second position coordinate in the pixel coordinate system through a preset transformation matrix;
[0095] The judgment module 330 is used to determine whether to retain the second position coordinates at the current moment based on the projection relationship between the target vehicle and the road it is currently traveling in the pixel coordinate system.
[0096] If retained, the second location coordinates at the current moment will be used as the location of the target vehicle within the preset time period, so as to display the location marker of the target vehicle on the map;
[0097] If not retained, the current second position coordinates will be deleted.
[0098] In a preferred embodiment, the determination module 330 determines whether to retain the second position coordinates in the following manner:
[0099] For each moment, calculate the projected coordinates of the target vehicle relative to the road it is currently traveling on;
[0100] For each moment, calculate the distance and angle between the target vehicle's projected coordinates and the road it is currently traveling on;
[0101] Based on the included angle and distance values at each time point, determine whether to retain the second position coordinates.
[0102] In a preferred embodiment, the step of determining whether to retain the second position coordinates based on the included angle value and distance value at each time point by the determining module 330 specifically includes:
[0103] For each moment, determine whether the included angle value corresponding to that moment is between 0° and 90°;
[0104] If so, determine whether the distance value at that moment is the minimum distance value;
[0105] If so, then determine to retain the second position coordinates at that moment.
[0106] In a preferred embodiment, the determination module 330 calculates the projected coordinates of the target vehicle relative to the currently traveling road in the following manner. :
[0107] ;
[0108] ;
[0109] in, The coordinates of the starting point of the current road being traveled. This is the road direction vector of the road currently being traveled by the target vehicle. Let be the direction vector of the target vehicle's travel.
[0110] In a preferred embodiment, the determination module 330 calculates the road direction vector of the road currently being traveled by the target vehicle in the following manner:
[0111] ;
[0112] in, The coordinates of the destination of the current road being traveled;
[0113] The judgment module 330 calculates the target vehicle's driving direction vector in the following way:
[0114] ;
[0115] in, The coordinates of the target vehicle's second position at the current moment.
[0116] In a preferred embodiment, the determination module 330 calculates the distance value in the following manner. :
[0117] .
[0118] In a preferred embodiment, the determination module 330 calculates the included angle value in the following manner. :
[0119]
[0120]
[0121] ;
[0122] in, The slope of the projected coordinates relative to the road currently being traveled.
[0123] Please see Figure 4 , Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 4As shown, the electronic device 400 includes a processor 410, a memory 420, and a bus 430.
[0124] The memory 420 stores machine-readable instructions that can be executed by the processor 410. When the electronic device 400 is running, the processor 410 and the memory 420 communicate via the bus 430. When the machine-readable instructions are executed by the processor 410, the steps of a vehicle positioning method as described in the above method embodiment can be executed. For specific implementation details, please refer to the method embodiment, which will not be repeated here.
[0125] This application also provides a computer-readable storage medium storing a computer program. When the computer program is run by a processor, it can execute the steps of a vehicle positioning method as described in the above method embodiments. For specific implementation details, please refer to the method embodiments, which will not be repeated here.
[0126] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0127] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0128] Furthermore, the units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0129] Furthermore, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0130] It should be noted that if the function is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0131] In this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, without necessarily requiring or implying any such actual relationship or order between these entities or operations.
[0132] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of 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 protection of this application.
Claims
1. A method for locating a vehicle, characterized in that, The method includes: The first position coordinates of the target vehicle in the satellite coordinate system are obtained at multiple different times within a preset time period using satellite. By using a preset transformation matrix, each first position coordinate is converted into a second position coordinate in the pixel coordinate system; Based on the projection relationship between the target vehicle and the road it is currently traveling on in the pixel coordinate system, determine whether to retain the second position coordinates at the current moment; If retained, the second location coordinates at the current moment will be used as the location of the target vehicle within the preset time period, so as to display the location marker of the target vehicle on the map; If not retained, then delete the current second position coordinates; Determine whether to retain the second position coordinates using the following method: For each moment, calculate the projected coordinates of the target vehicle relative to the road it is currently traveling on; For each moment, calculate the distance and angle between the target vehicle's projected coordinates and the road it is currently traveling on; Based on the included angle and distance values at each time point, determine whether to retain the second position coordinates; The projected coordinates of the target vehicle relative to the road it is currently traveling on are calculated using the following method. : ; ; in, The coordinates of the starting point of the current road being traveled. This is the road direction vector of the road currently being traveled by the target vehicle. Let be the direction vector of the target vehicle's travel.
2. The method according to claim 1, characterized in that, The step of determining whether to retain the second position coordinates based on the included angle and distance values at each time point specifically includes: For each moment, determine whether the included angle value corresponding to that moment is between 0° and 90°; If so, determine whether the distance value at that moment is the minimum distance value; If so, then determine to retain the second position coordinates at that moment.
3. The method according to claim 1, characterized in that, The road direction vector of the road currently being traveled by the target vehicle is calculated in the following way: ; in, The coordinates of the destination of the current road being traveled; The target vehicle's direction vector is calculated as follows: ; in, The coordinates of the target vehicle's second position at the current moment.
4. The method according to claim 3, characterized in that, The distance value is calculated using the following method. : 。 5. The method according to claim 2, characterized in that, The included angle value is calculated using the following method. : ; ; in, The slope of the projected coordinates relative to the road currently being traveled.
6. A vehicle positioning device, characterized in that, The device, applicable to the vehicle positioning method as described in any one of claims 1-5, comprises: The acquisition module is used to acquire the first position coordinates of the target vehicle in the satellite coordinate system at multiple different times within a preset time period via satellite. The mapping module is used to convert each first position coordinate into a second position coordinate in the pixel coordinate system using a preset transformation matrix; The judgment module is used to determine whether to retain the second position coordinates at the current moment based on the projection relationship between the target vehicle and the road it is currently traveling on in the pixel coordinate system. If retained, the second location coordinates at the current moment will be used as the location of the target vehicle within the preset time period, so as to display the location marker of the target vehicle on the map; If not retained, the current second position coordinates will be deleted.
7. An electronic device, characterized in that, include: The device includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus, and the processor executes the machine-readable instructions to perform the steps of the vehicle positioning method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the vehicle positioning method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Vehicle error state updating method and device
CN112347205A