Vehicle synchronization method, device, electronic device and storage medium

By detecting collisions and obtaining vehicle position information in a virtual scene, adjusting the horizontal plane of the virtual vehicle to synchronize with the driving trajectory of the real vehicle, the problem that the virtual vehicle cannot be properly synchronized in uphill or downhill scenarios is solved, and the complete synchronization of the driving trajectory of the virtual vehicle and the real vehicle is achieved.

CN118736127BActive Publication Date: 2025-04-18BEIJING JAYA TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410858427.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2025-04-18
Estimated Expiration
2044-06-28

AI Technical Summary

Technical Problem

In the prior art, when generating the real picture of a virtual vehicle, it is impossible to effectively synchronize the driving trajectory of the virtual vehicle and the real vehicle. Especially in uphill or downhill scenarios, the horizontal plane of the virtual vehicle is not parallel to the ramp surface, so the virtual vehicle cannot enter the ramp correctly.

Method used

By detecting whether the target virtual vehicle collides with the current driving route in a virtual scene, the position coordinates of the directional antenna and the positioning antenna on the target vehicle are obtained, the position coordinates and pitch angle or elevation angle of the target vehicle are calculated, and the horizontal plane of the virtual vehicle is adjusted based on this information to make it parallel to the horizontal plane of the current driving route, thereby achieving synchronization with the driving trajectory of the real vehicle.

Benefits of technology

In uphill or downhill scenarios, the driving trajectory of the virtual vehicle is fully synchronized with the driving trajectory of the real vehicle, solving the problem of the virtual vehicle not matching the surface of the ramp.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118736127B_ABST
    Figure CN118736127B_ABST
Patent Text Reader

Abstract

The present invention discloses a vehicle synchronization method. The method comprises: in a virtual scene, detecting whether a target virtual vehicle collides with a current driving route; if so, respectively obtaining the position coordinates of a directional antenna and a positioning antenna on the target vehicle; calculating the position coordinates of the target vehicle and the pitch angle or elevation angle of the target vehicle according to the position coordinates of the directional antenna and the positioning antenna of the target vehicle; determining the position coordinates of the target virtual vehicle according to the position coordinates of the target vehicle; lowering or raising the horizontal plane of the target virtual vehicle to be parallel to the horizontal plane of the current driving route according to the pitch angle or elevation angle of the target vehicle, so that the target virtual vehicle is synchronized with the driving trajectory of the target vehicle; if not, continuing to execute the step of detecting whether the target virtual vehicle collides with the current driving route in the virtual scene. The present invention also discloses a device, an electronic device and a storage medium for implementing the method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of virtual vehicle simulation, and in particular to a vehicle synchronization method, device, electronic equipment and storage medium. Background Art

[0002] In the prior art, the method for synchronizing a virtual vehicle with a real vehicle is usually: using the on-board equipment on the real vehicle to upload the real-time positioning coordinate information of the real vehicle to the background system, and then the background system generates a display screen of the virtual vehicle in the three-dimensional scene after solving the coordinate information. However, the inventor found that when generating the real screen of the virtual vehicle, the prior art generates the display screen in a fixed manner according to the driving trajectory of the horizontal route, that is, in the prior art, the horizontal plane of the generated virtual vehicle is always parallel to the horizontal direction; however, in the uphill or downhill scene, since the driving route is not horizontal but has a slope, this causes the horizontal plane of the vehicle to have a pitch angle relative to the horizontal direction when the vehicle is driving; and since the horizontal plane of the virtual vehicle in the display screen generated in the prior art is parallel to the horizontal direction, rather than parallel to the ramp surface, this causes the display screen generated in the prior art to have the problem that the virtual vehicle does not match the ramp surface, and the virtual vehicle either enters the ramp or floats above the ramp, and cannot be completely synchronized with the driving trajectory of the real vehicle. Summary of the invention

[0003] The embodiments of the present invention provide a vehicle synchronization method, device, electronic device and storage medium, which are used to solve the problem in the prior art that in uphill or downhill scenarios, the virtual vehicle does not match the ramp surface, and the driving trajectory of the virtual vehicle cannot be completely synchronized with the driving trajectory of the real vehicle because the horizontal plane of the generated virtual vehicle is parallel to the horizontal direction instead of parallel to the ramp surface.

[0004] The specific technical solutions are as follows:

[0005] In a first aspect, an embodiment of the present invention provides a vehicle synchronization method, the method comprising:

[0006] In a virtual scene, detecting whether a target virtual vehicle collides with a current driving route; wherein the virtual scene is a real-scene twin scene constructed by using digital twin technology to identify and simulate real objects in video information of an environment where the target vehicle is located; the target virtual vehicle is a virtual vehicle mapped to the virtual scene by the target vehicle;

[0007] If yes, the position coordinates of the directional antenna and the positioning antenna on the target vehicle are respectively obtained; wherein the target vehicle comprises: a directional antenna and a positioning antenna, there is a distance difference between the directional antenna and the positioning antenna in the horizontal direction, and the directional antenna is located in front of the positioning antenna;

[0008] Calculating the position coordinates of the target vehicle and the depression angle or elevation angle of the target vehicle according to the position coordinates of the directional antenna and the positioning antenna of the target vehicle;

[0009] Determine the position coordinates of the target virtual vehicle according to the position coordinates of the target vehicle;

[0010] Lowering or raising the horizontal plane of the target virtual vehicle to be parallel to the horizontal plane of the current driving route according to the pitch angle or elevation angle of the target vehicle, so that the target virtual vehicle is synchronized with the driving trajectory of the target vehicle;

[0011] If not, continue to execute the step of detecting whether the target virtual vehicle collides with the current driving route in the virtual scene.

[0012] Optionally, the step of detecting whether the target virtual vehicle collides with the current driving route in the virtual scene includes:

[0013] In the virtual scene, respectively obtaining pixel coordinates of the target virtual vehicle and the current driving route;

[0014] Detecting whether the pixel coordinates of the target virtual vehicle have overlapping coordinate points with the pixel coordinates of the current driving route; if so, confirming that the target virtual vehicle has collided with the current driving route; if not, confirming that the target virtual vehicle has not collided with the current driving route.

[0015] Optionally, the step of lowering or raising the horizontal plane of the target virtual vehicle to be parallel to the horizontal plane of the current driving route according to the pitch angle or elevation angle of the target vehicle so as to synchronize the target virtual vehicle with the driving trajectory of the target vehicle comprises:

[0016] Determine the height difference between the directional antenna and the positioning antenna of the target virtual vehicle according to the depression angle or elevation angle of the target vehicle;

[0017] Calculate the pitch plane or elevation plane of the target virtual vehicle according to the height difference between the directional antenna and the positioning antenna of the target virtual vehicle;

[0018] According to the top plane or bottom plane of the target virtual vehicle, the horizontal plane of the target virtual vehicle is lowered or raised to be parallel to the horizontal plane of the current driving route, so that the target virtual vehicle is synchronized with the driving trajectory of the target vehicle.

[0019] Optionally, in an uphill scenario, according to the elevation angle of the target vehicle, the height difference between the directional antenna and the positioning antenna of the target virtual vehicle is determined; according to the height difference between the directional antenna and the positioning antenna of the target virtual vehicle, the elevation plane of the target virtual vehicle is calculated; according to the elevation plane of the target virtual vehicle, the horizontal plane of the target virtual vehicle is raised to be parallel to the horizontal plane of the current driving route, so that the target virtual vehicle is synchronized with the driving trajectory of the target vehicle;

[0020] In a downhill scenario, the height difference between the directional antenna and the positioning antenna of the target virtual vehicle is determined according to the pitch angle of the target vehicle; the pitch plane of the target virtual vehicle is calculated according to the height difference between the directional antenna and the positioning antenna of the target virtual vehicle; according to the pitch plane of the target virtual vehicle, the horizontal plane of the target virtual vehicle is lowered to be parallel to the horizontal plane of the current driving route, so that the target virtual vehicle is synchronized with the driving trajectory of the target vehicle.

[0021] In a second aspect, an embodiment of the present invention provides a vehicle synchronization device, wherein the method device comprises:

[0022] A detection module is used to detect whether a target virtual vehicle collides with a current driving route in a virtual scene; when it is detected that the target virtual vehicle collides with the current driving route, the acquisition module is started; wherein the virtual scene is a real-scene twin scene constructed by using digital twin technology to identify and simulate real objects in video information of the environment where the target vehicle is located; the target virtual vehicle is a virtual vehicle mapped to the virtual scene by the target vehicle;

[0023] The acquisition module is used to respectively acquire the position coordinates of the directional antenna and the positioning antenna on the target vehicle; wherein the target vehicle comprises: a directional antenna and a positioning antenna, there is a distance difference between the directional antenna and the positioning antenna in the horizontal direction, and the directional antenna is located in front of the positioning antenna;

[0024] A calculation module, used to calculate the position coordinates of the target vehicle and the depression angle or elevation angle of the target vehicle according to the position coordinates of the directional antenna and the positioning antenna of the target vehicle;

[0025] A determination module, used to determine the position coordinates of the target virtual vehicle according to the position coordinates of the target vehicle;

[0026] The parallel module is used to lower or raise the horizontal plane of the target virtual vehicle to be parallel to the horizontal plane of the current driving route according to the pitch angle or elevation angle of the target vehicle, so that the target virtual vehicle is synchronized with the driving trajectory of the target vehicle.

[0027] Optionally, the detection module is specifically used to:

[0028] In the virtual scene, respectively obtaining pixel coordinates of the target virtual vehicle and the current driving route;

[0029] Detecting whether the pixel coordinates of the target virtual vehicle have overlapping coordinate points with the pixel coordinates of the current driving route; if so, confirming that the target virtual vehicle has collided with the current driving route; if not, confirming that the target virtual vehicle has not collided with the current driving route.

[0030] Optionally, the parallel module is specifically used for:

[0031] Determine the height difference between the directional antenna and the positioning antenna of the target virtual vehicle according to the depression angle or elevation angle of the target vehicle;

[0032] Calculate the pitch plane or elevation plane of the target virtual vehicle according to the height difference between the directional antenna and the positioning antenna of the target virtual vehicle;

[0033] According to the top plane or bottom plane of the target virtual vehicle, the horizontal plane of the target virtual vehicle is lowered or raised to be parallel to the horizontal plane of the current driving route, so that the target virtual vehicle is synchronized with the driving trajectory of the target vehicle.

[0034] Optionally, in an uphill scenario, according to the elevation angle of the target vehicle, the height difference between the directional antenna and the positioning antenna of the target virtual vehicle is determined; according to the height difference between the directional antenna and the positioning antenna of the target virtual vehicle, the elevation plane of the target virtual vehicle is calculated; according to the elevation plane of the target virtual vehicle, the horizontal plane of the target virtual vehicle is raised to be parallel to the horizontal plane of the current driving route, so that the target virtual vehicle is synchronized with the driving trajectory of the target vehicle;

[0035] In a downhill scenario, the height difference between the directional antenna and the positioning antenna of the target virtual vehicle is determined according to the pitch angle of the target vehicle; the pitch plane of the target virtual vehicle is calculated according to the height difference between the directional antenna and the positioning antenna of the target virtual vehicle; according to the pitch plane of the target virtual vehicle, the horizontal plane of the target virtual vehicle is lowered to be parallel to the horizontal plane of the current driving route, so that the target virtual vehicle is synchronized with the driving trajectory of the target vehicle.

[0036] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0037] The memory is used to store computer programs;

[0038] The processor is used to implement the vehicle synchronization method steps described in the first aspect when executing the program stored in the memory.

[0039] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps for vehicle synchronization described in the first aspect are implemented.

[0040] In summary, the method provided by the embodiment of the present invention adds a function of detecting forces and collisions in the real world in the virtual scene. Based on this function, the method provided by the embodiment of the present invention can be implemented as follows: in the virtual scene, detecting whether the target virtual vehicle collides with the current driving route; and when the target virtual vehicle collides with the current driving route, obtaining the position coordinates of the directional antenna and the positioning antenna on the target vehicle; calculating the position coordinates of the target vehicle and the pitch angle or elevation angle of the target vehicle according to the position coordinates of the directional antenna and the positioning antenna of the target vehicle; determining the position coordinates of the target virtual vehicle according to the position coordinates of the target vehicle; determining the height difference between the directional antenna and the positioning antenna of the target virtual vehicle according to the pitch angle or elevation angle of the target vehicle; calculating the pitch plane or elevation plane of the target virtual vehicle according to the height difference between the directional antenna and the positioning antenna of the target virtual vehicle; according to the pitch plane or elevation plane of the target virtual vehicle, lowering or raising the horizontal plane of the target virtual vehicle to be parallel to the horizontal plane of the current driving route, so that the target virtual vehicle is synchronized with the driving trajectory of the target vehicle. Therefore, the method provided in the embodiment of the present invention can achieve complete synchronization between the driving trajectory of the virtual vehicle and the driving trajectory of the real vehicle in uphill or downhill scenarios, thereby solving the problem in the prior art that in uphill or downhill scenarios, the virtual vehicle does not match the ramp surface, and the driving trajectory of the virtual vehicle cannot be completely synchronized with the driving trajectory of the real vehicle because the horizontal plane of the generated virtual vehicle is parallel to the horizontal direction rather than the ramp surface.

[0041] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings.

[0042] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0044] Figure 1 A schematic diagram of a flow chart of a vehicle synchronization method provided by an embodiment of the present invention;

[0045] Figure 2 A schematic diagram of a flow chart of the method provided by an embodiment of the present invention in an uphill scenario;

[0046] Figure 3 A schematic diagram of a flow chart of the method provided by an embodiment of the present invention in a downhill scenario;

[0047] Figure 4 A schematic diagram of the structure of a vehicle synchronization device provided by an embodiment of the present invention;

[0048] Figure 5 A schematic diagram of the internal structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0049] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.

[0050] Figure 1 A flow chart of a vehicle synchronization method provided by an embodiment of the present invention is shown as follows: Figure 1 As shown, the method includes:

[0051] S101: In a virtual scene, detecting whether a target virtual vehicle collides with a current driving route; if yes, executing step S102; if no, continuing to execute step S101;

[0052] Among them, the virtual scene is a real-life twin scene constructed by using digital twin technology to identify and simulate real objects in the video information of the environment in which the target vehicle is located; the target virtual vehicle is a virtual vehicle mapped to the virtual scene by the target vehicle.

[0053] Specifically, in the virtual scene, the step of detecting whether the target virtual vehicle collides with the current driving route may include:

[0054] In the virtual scene, the pixel coordinates of the target virtual vehicle and the current driving route are obtained respectively;

[0055] The pixel coordinates of the target virtual vehicle are detected to see whether there are overlapping coordinate points with the pixel coordinates of the current driving route; if so, it is confirmed that the target virtual vehicle has collided with the current driving route; if not, it is confirmed that the target virtual vehicle has not collided with the current driving route.

[0056] The virtual scene in the embodiment of the present invention is a 3D virtual scene with the added function of detecting forces and collisions in the real world. Based on this function, the method provided in the embodiment of the present invention can be implemented in the virtual scene to lower or raise the horizontal plane of the target virtual vehicle to be parallel to the horizontal plane of the current driving route, so that the target virtual vehicle is synchronized with the driving trajectory of the target vehicle.

[0057] S102: respectively obtaining the position coordinates of the directional antenna and the positioning antenna on the target vehicle;

[0058] The target vehicle includes: a directional antenna and a positioning antenna. There is a distance difference between the directional antenna and the positioning antenna in the horizontal direction, and the directional antenna is located in front of the positioning antenna.

[0059] In a specific embodiment, the method provided by the embodiment of the present invention is to obtain the position coordinates of the directional antenna and the positioning antenna on the target vehicle by obtaining the GPS positioning information transmitted by the vehicle-mounted equipment on the target vehicle.

[0060] S103: Calculating the position coordinates of the target vehicle and the depression angle or elevation angle of the target vehicle according to the position coordinates of the directional antenna and the positioning antenna of the target vehicle;

[0061] Specifically, in an uphill scenario, the sine function sinA=a / c and the cosine function cosA=b / c in the trigonometric function are used to calculate the position coordinates of the target vehicle and the elevation angle A of the target vehicle according to the position coordinates (x1, y1, z1) of the directional antenna and the position coordinates (x2, y2, z2) of the positioning antenna. In a downhill scenario, the sine function sinA=a / c and / or the cosine function cosA=b / c in the trigonometric function are used to calculate the position coordinates of the target vehicle and the depression angle A of the target vehicle according to the position coordinates (x1, y1, z1) of the directional antenna and the position coordinates (x2, y2, z2) of the positioning antenna.

[0062] S104: Determine the position coordinates of the target virtual vehicle according to the position coordinates of the target vehicle;

[0063] In a specific embodiment, the parameters in the virtual scene may be adjusted according to the position coordinates of the target vehicle so that the position of the target virtual vehicle in the virtual scene is consistent with the position of the target vehicle in the real world.

[0064] S105: according to the pitch angle or elevation angle of the target vehicle, the horizontal plane of the target virtual vehicle is lowered or raised to be parallel to the horizontal plane of the current driving route, so that the target virtual vehicle is synchronized with the driving trajectory of the target vehicle.

[0065] The method provided by the embodiment of the present invention, when a collision between a vehicle and a ramp is detected in a virtual environment, obtains the position coordinates of the directional antenna and the positioning antenna of the target vehicle, and calculates the position coordinates and the pitch angle or elevation angle of the target vehicle using sine function and cosine function (the elevation angle is calculated in an uphill scenario, and the pitch angle is calculated in a downhill environment), and then re-assigns values ​​to the virtual vehicle in the virtual environment according to the position coordinates and the pitch angle or elevation angle of the target vehicle, that is, adjusts the parameters of the virtual vehicle in the virtual environment according to the position coordinates and the pitch angle or elevation angle of the target vehicle, so that the target virtual vehicle is synchronized with the driving trajectory of the target vehicle.

[0066] The step of lowering or raising the horizontal plane of the target virtual vehicle to be parallel to the horizontal plane of the current driving route according to the pitch angle or elevation angle of the target vehicle so as to synchronize the target virtual vehicle with the driving trajectory of the target vehicle may include:

[0067] According to the depression angle or elevation angle of the target vehicle, determine the height difference between the directional antenna and the positioning antenna of the target virtual vehicle;

[0068] Calculate the pitch plane or elevation plane of the target virtual vehicle according to the height difference between the directional antenna and the positioning antenna of the target virtual vehicle;

[0069] According to the downward plane or upward plane of the target virtual vehicle, the horizontal plane of the target virtual vehicle is lowered or raised to be parallel to the horizontal plane of the current driving route, so that the target virtual vehicle is synchronized with the driving trajectory of the target vehicle.

[0070] Specifically, in an uphill scenario, the height difference between the directional antenna and the positioning antenna of the target virtual vehicle is determined according to the elevation angle of the target vehicle; the elevation plane of the target virtual vehicle is calculated according to the height difference between the directional antenna and the positioning antenna of the target virtual vehicle; according to the elevation plane of the target virtual vehicle, the horizontal plane of the target virtual vehicle is raised to be parallel to the horizontal plane of the current driving route, so that the target virtual vehicle is synchronized with the driving trajectory of the target vehicle.

[0071] In a downhill scenario, the height difference between the directional antenna and the positioning antenna of the target virtual vehicle is determined according to the pitch angle of the target vehicle; the pitch plane of the target virtual vehicle is calculated according to the height difference between the directional antenna and the positioning antenna of the target virtual vehicle; according to the pitch plane of the target virtual vehicle, the horizontal plane of the target virtual vehicle is lowered to be parallel to the horizontal plane of the current driving route, so that the target virtual vehicle is synchronized with the driving trajectory of the target vehicle.

[0072] In summary, the method provided by the embodiment of the present invention adds a function of detecting forces and collisions in the real world in the virtual scene. Based on this function, the method provided by the embodiment of the present invention can be implemented as follows: in the virtual scene, detecting whether the target virtual vehicle collides with the current driving route; and when the target virtual vehicle collides with the current driving route, obtaining the position coordinates of the directional antenna and the positioning antenna on the target vehicle; calculating the position coordinates of the target vehicle and the pitch angle or elevation angle of the target vehicle according to the position coordinates of the directional antenna and the positioning antenna of the target vehicle; determining the position coordinates of the target virtual vehicle according to the position coordinates of the target vehicle; determining the height difference between the directional antenna and the positioning antenna of the target virtual vehicle according to the pitch angle or elevation angle of the target vehicle; calculating the pitch plane or elevation plane of the target virtual vehicle according to the height difference between the directional antenna and the positioning antenna of the target virtual vehicle; according to the pitch plane or elevation plane of the target virtual vehicle, lowering or raising the horizontal plane of the target virtual vehicle to be parallel to the horizontal plane of the current driving route, so that the target virtual vehicle is synchronized with the driving trajectory of the target vehicle. Therefore, the method provided in the embodiment of the present invention can achieve complete synchronization between the driving trajectory of the virtual vehicle and the driving trajectory of the real vehicle in uphill or downhill scenarios, thereby solving the problem in the prior art that in uphill or downhill scenarios, the virtual vehicle does not match the ramp surface, and the driving trajectory of the virtual vehicle cannot be completely synchronized with the driving trajectory of the real vehicle because the horizontal plane of the generated virtual vehicle is parallel to the horizontal direction rather than the ramp surface.

[0073] Two practical examples are given below to further illustrate the method provided in the embodiment of the present invention in more detail.

[0074] The scene of Example 1 is an uphill scene, and the scene of Example 2 is a downhill scene. In Example 1 and Example 2, the virtual scene is a real-life twin scene constructed by using digital twin technology to identify and simulate real objects in the video information of the environment in which the target vehicle is located; and the function of detecting forces and collisions in the real world is also added to the virtual scene. The target virtual vehicle is a virtual vehicle mapped to the above-mentioned virtual scene by the target vehicle. The target vehicle includes: a directional antenna and a positioning antenna, and there is a distance difference between the directional antenna and the positioning antenna in the horizontal direction, and the directional antenna is located in front of the positioning antenna; the virtual vehicle corresponding to the target also includes: a directional antenna and a positioning antenna, and there is a distance difference between the directional antenna and the positioning antenna in the horizontal direction, and the directional antenna is located in front of the positioning antenna.

[0075] In Example 1 and Example 2, the GPS location is delivered via the on-board protocol (internal websocket).

[0076] See also Figure 2 The process of the vehicle synchronization method provided in Example 1 is as follows:

[0077] S201: in the virtual scene, respectively obtaining pixel coordinates of the target virtual vehicle and the current driving route;

[0078] S202: Detecting whether the pixel coordinates of the target virtual vehicle overlap with the pixel coordinates of the current driving route; if so, confirming that the target virtual vehicle collides with the current driving route, and executing step S203; if not, confirming that the target virtual vehicle does not collide with the current driving route, and returning to continue executing step S201;

[0079] S203: respectively obtaining the position coordinates of the directional antenna and the positioning antenna on the target vehicle;

[0080] S204: Calculating the position coordinates of the target vehicle and the elevation angle of the target vehicle according to the position coordinates of the directional antenna and the positioning antenna of the target vehicle;

[0081] S205: Determine the position coordinates of the target virtual vehicle according to the position coordinates of the target vehicle;

[0082] S206: Determine the height difference between the directional antenna and the positioning antenna of the target virtual vehicle according to the elevation angle of the target vehicle;

[0083] S207: Calculating the elevation plane of the target virtual vehicle according to the height difference between the directional antenna and the positioning antenna of the target virtual vehicle;

[0084] S208: According to the elevation plane of the target virtual vehicle, the horizontal plane of the target virtual vehicle is raised to be parallel to the horizontal plane of the current driving route, so that the target virtual vehicle is synchronized with the driving trajectory of the target vehicle.

[0085] See also Figure 3 The process of the vehicle synchronization method provided in Example 2 is as follows:

[0086] S301: in a virtual scene, respectively obtaining pixel coordinates of a target virtual vehicle and a current driving route;

[0087] S302: Detect whether the pixel coordinates of the target virtual vehicle overlap with the pixel coordinates of the current driving route; if so, confirm that the target virtual vehicle collides with the current driving route, and execute step S303; if not, confirm that the target virtual vehicle does not collide with the current driving route, and return to continue executing step S301;

[0088] S303: Obtaining the position coordinates of the directional antenna and the positioning antenna on the target vehicle respectively;

[0089] S304: Calculating the position coordinates of the target vehicle and the pitch angle of the target vehicle according to the position coordinates of the directional antenna and the positioning antenna of the target vehicle;

[0090] S305: Determine the position coordinates of the target virtual vehicle according to the position coordinates of the target vehicle;

[0091] S306: Determine the height difference between the directional antenna and the positioning antenna of the target virtual vehicle according to the depression angle of the target vehicle;

[0092] S307: Calculating the overhead plane of the target virtual vehicle according to the height difference between the directional antenna and the positioning antenna of the target virtual vehicle;

[0093] S308: According to the top plane of the target virtual vehicle, the horizontal plane of the target virtual vehicle is lowered to be parallel to the horizontal plane of the current driving route, so that the target virtual vehicle is synchronized with the driving trajectory of the target vehicle.

[0094] Depend on Figure 2-3 As can be seen from the illustrated embodiment, the method provided by the embodiment of the present invention adds a function of detecting forces and collisions in the real world in the virtual scene. Based on this function, the method provided by the embodiment of the present invention can be implemented as follows: in the virtual scene, detecting whether the target virtual vehicle collides with the current driving route; and when the target virtual vehicle collides with the current driving route, obtaining the position coordinates of the directional antenna and the positioning antenna on the target vehicle; calculating the position coordinates of the target vehicle and the pitch angle or elevation angle of the target vehicle according to the position coordinates of the directional antenna and the positioning antenna of the target vehicle; determining the position coordinates of the target virtual vehicle according to the position coordinates of the target vehicle; determining the height difference between the directional antenna and the positioning antenna of the target virtual vehicle according to the pitch angle or elevation angle of the target vehicle; calculating the pitch plane or elevation plane of the target virtual vehicle according to the height difference between the directional antenna and the positioning antenna of the target virtual vehicle; and according to the pitch plane or elevation plane of the target virtual vehicle, lowering or raising the horizontal plane of the target virtual vehicle to be parallel to the horizontal plane of the current driving route, so that the target virtual vehicle is synchronized with the driving trajectory of the target vehicle. Therefore, the method provided in the embodiment of the present invention can achieve complete synchronization between the driving trajectory of the virtual vehicle and the driving trajectory of the real vehicle in uphill or downhill scenarios, thereby solving the problem in the prior art that in uphill or downhill scenarios, the virtual vehicle does not match the ramp surface, and the driving trajectory of the virtual vehicle cannot be completely synchronized with the driving trajectory of the real vehicle because the horizontal plane of the generated virtual vehicle is parallel to the horizontal direction rather than the ramp surface.

[0095] and Figure 1 Corresponding to the embodiment shown in FIG. 1 , the embodiment of the present invention further provides a vehicle synchronization device. Figure 4As shown, the device includes: a detection module 401, an acquisition module 402, a calculation module 403, a determination module 404, and a parallel module 405, wherein:

[0096] The detection module 401 is used to detect whether the target virtual vehicle collides with the current driving route in the virtual scene; when it is detected that the target virtual vehicle collides with the current driving route, the acquisition module 402 is started; wherein the virtual scene is a real-scene twin scene constructed by using digital twin technology to identify and simulate real objects in the video information of the environment where the target vehicle is located; the target virtual vehicle is a virtual vehicle mapped to the virtual scene by the target vehicle;

[0097] The acquisition module 402 is used to respectively acquire the position coordinates of the directional antenna and the positioning antenna on the target vehicle; wherein the target vehicle includes: a directional antenna and a positioning antenna, the directional antenna and the positioning antenna have a distance difference in the horizontal direction, and the directional antenna is located in front of the positioning antenna;

[0098] The calculation module 403 is used to calculate the position coordinates of the target vehicle and the depression angle or elevation angle of the target vehicle according to the position coordinates of the directional antenna and the positioning antenna of the target vehicle;

[0099] The determination module 404 is used to determine the position coordinates of the target virtual vehicle according to the position coordinates of the target vehicle;

[0100] The parallel module 405 is used to lower or raise the horizontal plane of the target virtual vehicle to be parallel to the horizontal plane of the current driving route according to the pitch angle or elevation angle of the target vehicle, so that the target virtual vehicle is synchronized with the driving trajectory of the target vehicle.

[0101] Optionally, the detection module 401 is specifically used for:

[0102] In the virtual scene, the pixel coordinates of the target virtual vehicle and the current driving route are obtained respectively;

[0103] The pixel coordinates of the target virtual vehicle are detected to see whether there are overlapping coordinate points with the pixel coordinates of the current driving route; if so, it is confirmed that the target virtual vehicle has collided with the current driving route; if not, it is confirmed that the target virtual vehicle has not collided with the current driving route.

[0104] Optionally, the parallel module 405 is specifically used for:

[0105] According to the depression angle or elevation angle of the target vehicle, determine the height difference between the directional antenna and the positioning antenna of the target virtual vehicle;

[0106] Calculate the pitch plane or elevation plane of the target virtual vehicle according to the height difference between the directional antenna and the positioning antenna of the target virtual vehicle;

[0107] According to the downward plane or upward plane of the target virtual vehicle, the horizontal plane of the target virtual vehicle is lowered or raised to be parallel to the horizontal plane of the current driving route, so that the target virtual vehicle is synchronized with the driving trajectory of the target vehicle.

[0108] Optionally, in an uphill scenario, according to the elevation angle of the target vehicle, the height difference between the directional antenna and the positioning antenna of the target virtual vehicle is determined; according to the height difference between the directional antenna and the positioning antenna of the target virtual vehicle, the elevation plane of the target virtual vehicle is calculated; according to the elevation plane of the target virtual vehicle, the horizontal plane of the target virtual vehicle is raised to be parallel to the horizontal plane of the current driving route, so that the target virtual vehicle is synchronized with the driving trajectory of the target vehicle;

[0109] In a downhill scenario, the height difference between the directional antenna and the positioning antenna of the target virtual vehicle is determined according to the pitch angle of the target vehicle; the pitch plane of the target virtual vehicle is calculated according to the height difference between the directional antenna and the positioning antenna of the target virtual vehicle; according to the pitch plane of the target virtual vehicle, the horizontal plane of the target virtual vehicle is lowered to be parallel to the horizontal plane of the current driving route, so that the target virtual vehicle is synchronized with the driving trajectory of the target vehicle.

[0110] The device provided by the embodiment of the present invention adds a function of detecting forces and collisions in the real world in a virtual scene. Based on this function, the device provided by the embodiment of the present invention can achieve: in a virtual scene, detecting whether a target virtual vehicle collides with the current driving route; and when detecting that the target virtual vehicle collides with the current driving route, obtaining the position coordinates of the directional antenna and the positioning antenna on the target vehicle; calculating the position coordinates of the target vehicle and the pitch angle or elevation angle of the target vehicle according to the position coordinates of the directional antenna and the positioning antenna of the target vehicle; determining the position coordinates of the target virtual vehicle according to the position coordinates of the target vehicle; determining the height difference between the directional antenna and the positioning antenna of the target virtual vehicle according to the pitch angle or elevation angle of the target vehicle; calculating the pitch plane or elevation plane of the target virtual vehicle according to the height difference between the directional antenna and the positioning antenna of the target virtual vehicle; and according to the pitch plane or elevation plane of the target virtual vehicle, lowering or raising the horizontal plane of the target virtual vehicle to be parallel to the horizontal plane of the current driving route, so that the target virtual vehicle is synchronized with the driving trajectory of the target vehicle. Therefore, the device provided in the embodiment of the present invention can achieve complete synchronization between the driving trajectory of the virtual vehicle and the driving trajectory of the real vehicle in uphill or downhill scenarios, thereby solving the problem in the prior art that in uphill or downhill scenarios, the virtual vehicle does not match the ramp surface, and the driving trajectory of the virtual vehicle cannot be completely synchronized with the driving trajectory of the real vehicle because the horizontal plane of the generated virtual vehicle is parallel to the horizontal direction rather than the ramp surface.

[0111] and Figure 1 Corresponding to the embodiment shown, the embodiment of the present invention further provides an electronic device, see Figure 5 , including a processor 501, a communication interface 502, a memory 503 and a communication bus 504, wherein the processor 501, the communication interface 502, and the memory 503 communicate with each other through the communication bus 504;

[0112] Memory 503, used for storing computer programs;

[0113] The processor 501 is used to implement any vehicle synchronization method steps described in the above embodiments when executing the program stored in the memory.

[0114] The electronic device provided by the embodiment of the present invention has a function of detecting forces and collisions in the real world in a virtual scene. Based on this function, the electronic device provided by the embodiment of the present invention can realize: in a virtual scene, detecting whether a target virtual vehicle collides with the current driving route; and when detecting that the target virtual vehicle collides with the current driving route, obtaining the position coordinates of the directional antenna and the positioning antenna on the target vehicle; calculating the position coordinates of the target vehicle and the pitch angle or elevation angle of the target vehicle according to the position coordinates of the directional antenna and the positioning antenna of the target vehicle; determining the position coordinates of the target virtual vehicle according to the position coordinates of the target vehicle; determining the height difference between the directional antenna and the positioning antenna of the target virtual vehicle according to the pitch angle or elevation angle of the target vehicle; calculating the pitch plane or elevation plane of the target virtual vehicle according to the height difference between the directional antenna and the positioning antenna of the target virtual vehicle; and according to the pitch plane or elevation plane of the target virtual vehicle, lowering or raising the horizontal plane of the target virtual vehicle to be parallel to the horizontal plane of the current driving route, so that the target virtual vehicle is synchronized with the driving trajectory of the target vehicle. Therefore, the electronic device provided by the embodiment of the present invention can achieve complete synchronization of the driving trajectory of the virtual vehicle and the driving trajectory of the real vehicle in uphill or downhill scenarios, thereby solving the problem in the prior art that in uphill or downhill scenarios, the virtual vehicle does not match the ramp surface, and the driving trajectory of the virtual vehicle cannot be completely synchronized with the driving trajectory of the real vehicle.

[0115] and Figure 1 Corresponding to the embodiment shown, an embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the method steps of any vehicle synchronization described in the above embodiments are implemented.

[0116] The storage medium provided by the embodiment of the present invention has added the function of detecting forces and collisions in the real world in the virtual scene. Based on this function, the storage medium provided by the embodiment of the present invention can realize: in the virtual scene, detecting whether the target virtual vehicle collides with the current driving route; and when the target virtual vehicle collides with the current driving route, obtaining the position coordinates of the directional antenna and the positioning antenna on the target vehicle; calculating the position coordinates of the target vehicle and the pitch angle or elevation angle of the target vehicle according to the position coordinates of the directional antenna and the positioning antenna of the target vehicle; determining the position coordinates of the target virtual vehicle according to the position coordinates of the target vehicle; determining the height difference between the directional antenna and the positioning antenna of the target virtual vehicle according to the pitch angle or elevation angle of the target vehicle; calculating the pitch plane or elevation plane of the target virtual vehicle according to the height difference between the directional antenna and the positioning antenna of the target virtual vehicle; according to the pitch plane or elevation plane of the target virtual vehicle, lowering or raising the horizontal plane of the target virtual vehicle to be parallel to the horizontal plane of the current driving route, so that the target virtual vehicle is synchronized with the driving trajectory of the target vehicle. Therefore, the storage medium provided in the embodiment of the present invention can achieve complete synchronization between the driving trajectory of the virtual vehicle and the driving trajectory of the real vehicle in uphill or downhill scenarios, thereby solving the problem in the prior art that in uphill or downhill scenarios, the virtual vehicle does not match the ramp surface, and the driving trajectory of the virtual vehicle cannot be completely synchronized with the driving trajectory of the real vehicle because the horizontal plane of the generated virtual vehicle is parallel to the horizontal direction rather than the ramp surface.

[0117] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.

[0118] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0119] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0120] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0121] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A vehicle synchronization method, characterized in that: The method comprises: In a virtual scene, detecting whether a target virtual vehicle collides with a current driving route; wherein the virtual scene is a real-scene twin scene constructed by using digital twin technology to identify and simulate real objects in video information of an environment where the target vehicle is located; the target virtual vehicle is a virtual vehicle mapped to the virtual scene by the target vehicle; If yes, the position coordinates of the directional antenna and the positioning antenna on the target vehicle are respectively obtained; wherein the target vehicle comprises: a directional antenna and a positioning antenna, there is a distance difference between the directional antenna and the positioning antenna in the horizontal direction, and the directional antenna is located in front of the positioning antenna; Calculating the position coordinates of the target vehicle and the depression angle or elevation angle of the target vehicle according to the position coordinates of the directional antenna and the positioning antenna of the target vehicle; Determine the position coordinates of the target virtual vehicle according to the position coordinates of the target vehicle; Lowering or raising the horizontal plane of the target virtual vehicle to be parallel to the horizontal plane of the current driving route according to the pitch angle or elevation angle of the target vehicle, so that the target virtual vehicle is synchronized with the driving trajectory of the target vehicle; If not, continue to execute the step of detecting whether the target virtual vehicle collides with the current driving route in the virtual scene; The step of detecting whether the target virtual vehicle collides with the current driving route in the virtual scene includes: In the virtual scene, respectively obtaining pixel coordinates of the target virtual vehicle and the current driving route; Detecting whether the pixel coordinates of the target virtual vehicle have overlapping coordinate points with the pixel coordinates of the current driving route; if so, confirming that the target virtual vehicle has collided with the current driving route; if not, confirming that the target virtual vehicle has not collided with the current driving route.

2. The method according to claim 1, characterized in that The step of lowering or raising the horizontal plane of the target virtual vehicle to be parallel to the horizontal plane of the current driving route according to the pitch angle or elevation angle of the target vehicle so as to synchronize the target virtual vehicle with the driving trajectory of the target vehicle comprises: Determine the height difference between the directional antenna and the positioning antenna of the target virtual vehicle according to the depression angle or elevation angle of the target vehicle; Calculate the pitch plane or elevation plane of the target virtual vehicle according to the height difference between the directional antenna and the positioning antenna of the target virtual vehicle; According to the top plane or bottom plane of the target virtual vehicle, the horizontal plane of the target virtual vehicle is lowered or raised to be parallel to the horizontal plane of the current driving route, so that the target virtual vehicle is synchronized with the driving trajectory of the target vehicle.

3. The method according to claim 2, characterized in that In an uphill scenario, according to the elevation angle of the target vehicle, the height difference between the directional antenna and the positioning antenna of the target virtual vehicle is determined; according to the height difference between the directional antenna and the positioning antenna of the target virtual vehicle, the elevation plane of the target virtual vehicle is calculated; according to the elevation plane of the target virtual vehicle, the horizontal plane of the target virtual vehicle is raised to be parallel to the horizontal plane of the current driving route, so that the target virtual vehicle is synchronized with the driving trajectory of the target vehicle; In a downhill scenario, determining the height difference between the directional antenna and the positioning antenna of the target virtual vehicle according to the pitch angle of the target vehicle; The bird's-eye view plane of the target virtual vehicle is calculated according to the height difference between the directional antenna and the positioning antenna of the target virtual vehicle; according to the bird's-eye view plane of the target virtual vehicle, the horizontal plane of the target virtual vehicle is lowered to be parallel to the horizontal plane of the current driving route, so that the target virtual vehicle is synchronized with the driving trajectory of the target vehicle.

4. A vehicle synchronization device, characterized in that: The device comprises: A detection module is used to detect whether a target virtual vehicle collides with a current driving route in a virtual scene; when it is detected that the target virtual vehicle collides with the current driving route, the acquisition module is started; wherein the virtual scene is a real-scene twin scene constructed by using digital twin technology to identify and simulate real objects in video information of the environment where the target vehicle is located; the target virtual vehicle is a virtual vehicle mapped to the virtual scene by the target vehicle; The acquisition module is used to respectively acquire the position coordinates of the directional antenna and the positioning antenna on the target vehicle; wherein the target vehicle comprises: a directional antenna and a positioning antenna, there is a distance difference between the directional antenna and the positioning antenna in the horizontal direction, and the directional antenna is located in front of the positioning antenna; A calculation module, used to calculate the position coordinates of the target vehicle and the depression angle or elevation angle of the target vehicle according to the position coordinates of the directional antenna and the positioning antenna of the target vehicle; A determination module, used to determine the position coordinates of the target virtual vehicle according to the position coordinates of the target vehicle; A parallel module, used to lower or raise the horizontal plane of the target virtual vehicle to be parallel to the horizontal plane of the current driving route according to the pitch angle or elevation angle of the target vehicle, so that the target virtual vehicle is synchronized with the driving trajectory of the target vehicle; The detection module is specifically used for: In the virtual scene, respectively obtaining pixel coordinates of the target virtual vehicle and the current driving route; Detecting whether the pixel coordinates of the target virtual vehicle have overlapping coordinate points with the pixel coordinates of the current driving route; if so, confirming that the target virtual vehicle has collided with the current driving route; if not, confirming that the target virtual vehicle has not collided with the current driving route.

5. The device according to claim 4, characterized in that The parallel module is specifically used for: Determine the height difference between the directional antenna and the positioning antenna of the target virtual vehicle according to the depression angle or elevation angle of the target vehicle; Calculate the pitch plane or elevation plane of the target virtual vehicle according to the height difference between the directional antenna and the positioning antenna of the target virtual vehicle; According to the top plane or bottom plane of the target virtual vehicle, the horizontal plane of the target virtual vehicle is lowered or raised to be parallel to the horizontal plane of the current driving route, so that the target virtual vehicle is synchronized with the driving trajectory of the target vehicle.

6. The device according to claim 5, characterized in that In an uphill scenario, according to the elevation angle of the target vehicle, the height difference between the directional antenna and the positioning antenna of the target virtual vehicle is determined; according to the height difference between the directional antenna and the positioning antenna of the target virtual vehicle, the elevation plane of the target virtual vehicle is calculated; according to the elevation plane of the target virtual vehicle, the horizontal plane of the target virtual vehicle is raised to be parallel to the horizontal plane of the current driving route, so that the target virtual vehicle is synchronized with the driving trajectory of the target vehicle; In a downhill scenario, determining the height difference between the directional antenna and the positioning antenna of the target virtual vehicle according to the pitch angle of the target vehicle; The bird's-eye view plane of the target virtual vehicle is calculated according to the height difference between the directional antenna and the positioning antenna of the target virtual vehicle; according to the bird's-eye view plane of the target virtual vehicle, the horizontal plane of the target virtual vehicle is lowered to be parallel to the horizontal plane of the current driving route, so that the target virtual vehicle is synchronized with the driving trajectory of the target vehicle.

7. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; The memory is used to store computer programs; The processor is used to implement the method steps described in any one of claims 1-3 when executing the program stored in the memory.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 3 are implemented.

Citation Information

Patent Citations

  • Vehicle lane change detection method and system based on Internet of Vehicles technology

    CN112687103A

  • Information processing method and device, electronic equipment, storage medium and product

    CN113537133A