Real-time control and simulation method and device for vehicle animation in digital twin project
By acquiring and analyzing the real-time and historical information of the vehicle, determining the vehicle model and performing real-time simulation and displaying, the problem of inability to display the real vehicle driving status and real-time control of vehicle animation in the prior art is solved, and a high-realistic driving animation display is achieved.
Patent Information
- Application Number
- CN202411836729.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-04-11
AI Technical Summary
The prior art cannot display the driving state of a vehicle in a real scene, and cannot meet the need to control the display of vehicle animations in real time according to the driving state of the vehicle, resulting in a lack of realism in driving animations.
By obtaining the real-time vehicle information and historical vehicle information of the target vehicle, the current driving speed and direction of the vehicle are determined, the target vehicle model is determined based on the vehicle type and license plate type, and real-time simulation and display are performed based on the real-time coordinate information.
The need to display the driving status of a vehicle in a real scene is realized, and the need to control the display of vehicle animations in real time according to the driving status of a vehicle is met, making the driving animations feel realistic.
Smart Images

Figure CN119792935A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of digital twin technology, and more specifically, to a real-time control and simulation method and device for vehicle animation in a digital twin project. Background Art
[0002] In digital twin projects, it is usually necessary to use animations that simulate vehicle driving to increase the realism of three-dimensional scenes. Therefore, a method for generating animations that simulate vehicle driving is urgently needed.
[0003] In the prior art, technicians usually create a sequence frame animation of a vehicle model directly in a three-dimensional scene, so that the created vehicle travels in a cycle according to a pre-set route and driving mode.
[0004] However, the methods in the prior art can neither display the driving status of the vehicle in a real scene nor meet the demand for real-time control of the display of the vehicle according to the driving status of the vehicle. Summary of the invention
[0005] The purpose of this application is to provide a real-time control and simulation method and device for vehicle animation in a digital twin project in response to the above-mentioned deficiencies in the prior art, so as to solve the problem that the prior art cannot display the actual vehicle driving status.
[0006] To achieve the above objectives, the technical solutions adopted in this application are as follows:
[0007] In a first aspect, the present application provides a real-time control and simulation method for vehicle animation in a digital twin project, the method comprising:
[0008] Acquire real-time vehicle information of the target vehicle and historical vehicle information of the target vehicle, wherein the real-time vehicle information includes: real-time coordinate information, real-time heading angle, vehicle type, license plate type and data upload time, and the historical vehicle information includes at least: historical coordinate information, historical heading angle and historical data upload time;
[0009] Determine the current speed and direction of the target vehicle according to the historical coordinate information and the historical heading angle included in the historical vehicle information, and the real-time coordinate information and the real-time heading angle in the real-time vehicle information;
[0010] Determine a target vehicle model corresponding to the target vehicle according to the pre-stored vehicle storage information and the vehicle type and the license plate type in the real-time vehicle information, wherein the target vehicle model includes the vehicle type and the license plate type, and the vehicle storage information is used to indicate the currently displayed vehicle model;
[0011] The simulated vehicle coordinates of the target vehicle model are determined according to the real-time coordinate information, and the target vehicle model is simulated and displayed in real time based on the simulated vehicle coordinates, the current driving speed and the current driving direction.
[0012] Optionally, the acquiring real-time vehicle information of the target vehicle includes:
[0013] The application end establishes a connection with the server end through a preset connection method, and the server stores a plurality of vehicle information;
[0014] Sending a vehicle information subscription request to the server;
[0015] Receive the real-time vehicle information sent by the server.
[0016] Optionally, the method further comprises:
[0017] If the real-time vehicle information of the target vehicle is not obtained, the target path point is determined according to the historical vehicle information and a plurality of pre-set path point information, wherein the path point information includes the path point coordinates and the path point heading angle;
[0018] Determining a predicted driving speed and a predicted driving direction of the target vehicle according to the target path point;
[0019] A target vehicle model corresponding to the target vehicle is determined according to the vehicle type and license plate type of the target vehicle, and the target vehicle model is simulated and displayed in real time based on the predicted driving speed and the predicted driving direction.
[0020] Optionally, determining the target path point according to the historical vehicle information and the preset multiple path point information includes:
[0021] According to the historical data upload time described in the historical vehicle information, determine the historical coordinate information to be predicted and the historical heading angle to be predicted;
[0022] The target path point is determined according to the historical coordinate information to be predicted, the historical heading angle to be predicted and the information of the plurality of path points, wherein the difference between the coordinates of the target path point and the line connecting the coordinates indicated by the historical coordinate information to be predicted and the historical heading angle to be predicted is less than a preset angle.
[0023] Optionally, determining the current driving speed and the current driving direction of the target vehicle according to the historical coordinate information and the historical heading angle included in the historical vehicle information and the real-time coordinate information and the real-time heading angle in the real-time vehicle information includes:
[0024] Determine the current speed of the target vehicle according to the historical coordinate information, the real-time coordinate information, and the difference between the data upload time and the historical data upload time;
[0025] The current driving direction of the target vehicle is determined according to the historical heading angle and the real-time heading angle.
[0026] Optionally, determining the target vehicle model according to the pre-stored vehicle storage information and the vehicle type and the license plate type in the real-time vehicle information includes:
[0027] Determining whether the model in the vehicle storage information matches the vehicle type and license plate type in the real-time vehicle information;
[0028] If not, creating a target vehicle model according to the vehicle type and the license plate type;
[0029] If yes, the model in the vehicle storage information is used as the target vehicle model.
[0030] Optionally, determining the simulated vehicle coordinates of the target vehicle model according to the real-time coordinate information includes:
[0031] Establishing a simulation scene according to a plurality of registration points and a center point in the actual scene to be simulated, wherein the coordinate information in the simulation scene has a preset transformation relationship with the coordinate information in the actual scene to be simulated;
[0032] The real-time coordinate information is transformed according to the preset transformation relationship to obtain the simulated vehicle coordinates.
[0033] In a second aspect, the present application provides a real-time control and simulation device for vehicle animation in a digital twin project, the device comprising:
[0034] An acquisition module is used to acquire real-time vehicle information of a target vehicle and historical vehicle information of the target vehicle, wherein the real-time vehicle information includes: real-time coordinate information, real-time heading angle, vehicle type, license plate type and data upload time, and the historical vehicle information includes at least: historical coordinate information, historical heading angle and historical data upload time;
[0035] A first determination module, used to determine the current driving speed and current driving direction of the target vehicle according to the historical coordinate information and the historical heading angle included in the historical vehicle information, and the real-time coordinate information and the real-time heading angle in the real-time vehicle information;
[0036] A second determination module is used to determine a target vehicle model corresponding to the target vehicle according to the pre-stored vehicle storage information and the vehicle type and the license plate type in the real-time vehicle information, wherein the target vehicle model includes the vehicle type and the license plate type, and the vehicle storage information is used to indicate the currently displayed vehicle model;
[0037] The simulation module is used to determine the simulated vehicle coordinates of the target vehicle model according to the real-time coordinate information, and to perform real-time simulation display of the target vehicle model based on the simulated vehicle coordinates, the current driving speed and the current driving direction.
[0038] Optionally, the acquisition module specifically includes:
[0039] The application end establishes a connection with the server end through a preset connection method, and the server stores a plurality of vehicle information;
[0040] Sending a vehicle information subscription request to the server;
[0041] Receive the real-time vehicle information sent by the server.
[0042] Optionally, the simulation module further includes:
[0043] If the real-time vehicle information of the target vehicle is not obtained, the target path point is determined according to the historical vehicle information and a plurality of pre-set path point information, wherein the path point information includes the path point coordinates and the path point heading angle;
[0044] Determining a predicted driving speed and a predicted driving direction of the target vehicle according to the target path point;
[0045] A target vehicle model corresponding to the target vehicle is determined according to the vehicle type and license plate type of the target vehicle, and the target vehicle model is simulated and displayed in real time based on the predicted driving speed and the predicted driving direction.
[0046] Optionally, the simulation module specifically includes:
[0047] According to the historical data upload time described in the historical vehicle information, determine the historical coordinate information to be predicted and the historical heading angle to be predicted;
[0048] The target path point is determined according to the historical coordinate information to be predicted, the historical heading angle to be predicted and the information of the plurality of path points, wherein the difference between the coordinates of the target path point and the line connecting the coordinates indicated by the historical coordinate information to be predicted and the historical heading angle to be predicted is less than a preset angle.
[0049] Optionally, the first determining module specifically includes:
[0050] Determine the current speed of the target vehicle according to the historical coordinate information, the real-time coordinate information, and the difference between the data upload time and the historical data upload time;
[0051] The current driving direction of the target vehicle is determined according to the historical heading angle and the real-time heading angle.
[0052] Optionally, the second determining module specifically includes:
[0053] Determining whether the model in the vehicle storage information matches the vehicle type and license plate type in the real-time vehicle information;
[0054] If not, creating a target vehicle model according to the vehicle type and the license plate type;
[0055] If yes, the model in the vehicle storage information is used as the target vehicle model.
[0056] Optionally, the simulation module specifically includes:
[0057] Establishing a simulation scene according to a plurality of registration points and a center point in the actual scene to be simulated, wherein the coordinate information in the simulation scene has a preset transformation relationship with the coordinate information in the actual scene to be simulated;
[0058] The real-time coordinate information is transformed according to the preset transformation relationship to obtain the simulated vehicle coordinates.
[0059] In the third aspect, the present application provides an electronic device comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor and the storage medium communicate through the bus, and the processor executes the machine-readable instructions to perform the steps of the real-time control and simulation method of vehicle animation in the above-mentioned digital twin project.
[0060] In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is run by a processor, the steps of the real-time control and simulation method of vehicle animation in the above-mentioned digital twin project are executed.
[0061] The beneficial effects of the present application are as follows: first, by acquiring the real-time vehicle information of the target vehicle and the historical vehicle information of the target vehicle, then determining the current driving speed and current driving direction of the target vehicle based on the above information, and then determining the target vehicle model corresponding to the target vehicle based on the vehicle type and license plate type in the pre-stored vehicle storage information and the real-time vehicle information, and finally determining the simulated vehicle coordinates of the target vehicle model based on the real-time coordinate information, and performing real-time simulation display of the target vehicle model based on the simulated vehicle coordinates, the current driving speed and the current driving direction. The present application determines the target vehicle model based on the real-time vehicle information and the historical vehicle information, and simulates and displays the target vehicle model according to the real-time operating status of the target vehicle, thereby displaying the driving status of the vehicle in the real scene, and meets the demand for real-time control of the vehicle animation display according to the vehicle driving status, so that the driving animation has a sense of reality. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0063] Figure 1 It is a schematic diagram of an application scenario of a real-time control and simulation method of vehicle animation in a digital twin project provided in an embodiment of the present application;
[0064] Figure 2 It is a flow chart of a method for real-time control and simulation of vehicle animation in a digital twin project provided in an embodiment of the present application;
[0065] Figure 3 It is a flow chart of a method for obtaining real-time vehicle information of a target vehicle provided in an embodiment of the present application;
[0066] Figure 4 It is a flow chart of another method for real-time control and simulation of vehicle animation in a digital twin project provided in an embodiment of the present application;
[0067] Figure 5 It is a flow chart of a method for determining a target vehicle model provided by an embodiment of the present application;
[0068] Figure 6 It is a structural schematic diagram of a real-time control and simulation device for vehicle animation in a digital twin project provided in an embodiment of the present application;
[0069] Figure 7 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0070] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.
[0071] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0072] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.
[0073] In the prior art, technicians usually create a sequence frame animation of a vehicle model directly in a three-dimensional scene, so that the created vehicle drives in a cycle according to a pre-set route and driving mode. However, the methods in the prior art can neither display the driving status of the vehicle in the real scene, nor meet the demand for real-time control of the vehicle display according to the driving status of the vehicle, and the driving animation lacks realism.
[0074] Based on the above problems, this application proposes a real-time control and simulation method for vehicle animation in a digital twin project. This method determines the current running speed and current driving of the target vehicle based on the acquired real-time vehicle information and historical vehicle information, and determines the target vehicle model based on the vehicle storage information and the vehicle type and license plate type of the target vehicle. After determining the simulated vehicle coordinates of the target vehicle model, the target vehicle model is simulated and displayed in real time based on the simulated vehicle coordinates, current driving speed and current direction. This application determines the target vehicle model based on real-time vehicle information and historical vehicle information, and simulates and displays the target vehicle model according to the real-time running status of the target vehicle, thereby displaying the driving status of the vehicle in the real scene, and meets the demand for real-time control of vehicle animation display according to the vehicle driving status.
[0075] Figure 1 Schematic diagram of an application scenario of a real-time control and simulation method of vehicle animation in a digital twin project provided by an embodiment of the present application. Figure 1 As shown in the figure, the real-time control and simulation method of vehicle animation in the digital twin project can be applied to the application side, wherein the application side is connected to the server side in communication, and the server side is used to receive and store the vehicle information of each vehicle. When the application side needs to obtain vehicle information, it requests and receives the vehicle information of the target vehicle from the server side, and generates and simulates the target vehicle model based on the vehicle information.
[0076] Figure 2 This is a flow chart of a real-time control and simulation method of vehicle animation in a digital twin project provided by an embodiment of the present application. Figure 2 This paper introduces the real-time control and simulation methods of vehicle animation in digital twin projects. The above methods can be applied in Figure 1 In the application side.
[0077] S201. Acquire real-time vehicle information of the target vehicle and historical vehicle information of the target vehicle. The real-time vehicle information includes: real-time coordinate information, real-time heading angle, vehicle type, license plate type and data upload time. The historical vehicle information includes at least: historical coordinate information, historical heading angle and historical data upload time.
[0078] The target vehicle is any one of the vehicles to be displayed. The real-time coordinate information may be the latitude and longitude information of the target vehicle, the vehicle type may include the model and color, etc., and the license plate type may include the location of the license plate, etc.
[0079] It is worth noting that the real-time vehicle information is the information uploaded at the current moment, and at the next moment, the real-time vehicle information will be converted into historical vehicle information for storage. At this time, the real-time coordinate information in the real-time vehicle information is converted into historical coordinate information, the real-time heading angle is converted into historical heading angle, and the data upload time is converted into historical data upload time. In addition, the historical vehicle data can also include the vehicle type and license plate type of the target vehicle at multiple historical data upload times.
[0080] S202: Determine the current driving speed and current driving direction of the target vehicle based on the historical coordinate information and the historical heading angle included in the historical vehicle information and the real-time coordinate information and the real-time heading angle included in the real-time vehicle information.
[0081] Optionally, the heading angle is the angle between the vehicle's center of mass velocity and the horizontal axis, wherein the horizontal axis may be a preset axis in the actual scene to be simulated.
[0082] It is worth noting that in this step, the coordinate information and heading angles in the historical vehicle information and real-time vehicle information are all information of the actual scene dimension to be simulated, and this step aims to convert the information of the actual scene dimension into the driving speed and driving direction in the virtual scene dimension.
[0083] S203. Determine a target vehicle model corresponding to the target vehicle based on the pre-stored vehicle storage information and the vehicle type and license plate type in the real-time vehicle information. The target vehicle model includes the vehicle type and license plate type. The vehicle storage information is used to indicate the currently displayed vehicle model.
[0084] Optionally, the target vehicle model may be a vehicle model to be displayed. It may be determined whether the vehicle model to be displayed already exists based on the currently displayed vehicle model. If it does, there is no need to create a new vehicle model, but the displayed vehicle model may be used directly or modified. If it does not exist, a new vehicle model needs to be created as the target vehicle model.
[0085] S204, determining the simulated vehicle coordinates of the target vehicle model according to the real-time coordinate information, and performing real-time simulation display of the target vehicle model based on the simulated vehicle coordinates, the current driving speed and the current driving direction.
[0086] Optionally, since the target vehicle coordinates are coordinates of the dimensions of the actual scene to be simulated, it is necessary to convert the target vehicle coordinates into coordinates of the dimensions of the simulated scene, so as to perform real-time simulation display based on the simulated vehicle coordinates, current driving speed and current driving direction. If there is a currently displayed vehicle model corresponding to the vehicle type and license plate type of the target vehicle, then based on the displayed vehicle model, a real-time simulation is performed based on the simulated vehicle coordinates, current driving speed and current driving direction based on a preset method, wherein the preset method may be DOMove and DORotate, etc. The above method can smoothly transition the target vehicle from the historical state to the current state, and the animation is more coherent.
[0087] It is worth mentioning that gravity parameters can be set for the target vehicle model. If the road surface where the target vehicle model is located is uneven or has height differences, the target vehicle can drive on the road surface based on gravity simulation to ensure the authenticity of the animation.
[0088] In this embodiment, firstly, the real-time vehicle information of the target vehicle and the historical vehicle information of the target vehicle are obtained, and then the current driving speed and current driving direction of the target vehicle are determined based on the above information, and then the target vehicle model corresponding to the target vehicle is determined according to the vehicle type and license plate type in the pre-stored vehicle storage information and the real-time vehicle information, and finally the simulated vehicle coordinates of the target vehicle model are determined according to the real-time coordinate information, and the target vehicle model is simulated and displayed in real time based on the simulated vehicle coordinates, the current driving speed and the current driving direction. This application determines the target vehicle model according to the real-time vehicle information and the historical vehicle information, and simulates and displays the target vehicle model according to the real-time running status of the target vehicle, thereby displaying the driving status of the vehicle in the real scene, and meets the demand of controlling the vehicle animation display in real time according to the vehicle driving status, so that the driving animation has a sense of reality.
[0089] As an optional implementation, refer to Figure 3 , the specific method of obtaining the real-time vehicle information of the target vehicle in the above steps may include the following steps. It is worth noting that the application end and the server end are connected in full-duplex communication via the websocket protocol.
[0090] S301. The application end establishes a connection with the server end through a preset connection method, and the server stores multiple vehicle information.
[0091] Optionally, the application can establish a connection with the server by means of a connect request, wherein the connect request can establish a direct connection with the server.
[0092] S302: Send a vehicle information subscription request to the server.
[0093] After the application establishes a connection with the server, the application sends a subscription request to the server through the send method according to the subscription requirements preset by the server and the application.
[0094] S303: Receive real-time vehicle information sent by the server.
[0095] When the server receives the subscription request, it sends real-time vehicle information to the application in real time according to the content of the subscription request. It is worth noting that due to the characteristics of the websocket protocol, after the application establishes a connection with the server, the server can continue to send real-time vehicle information to the application. When the reception is completed and no longer needs to obtain real-time vehicle information, the server can use the close method to disconnect the connection with the server.
[0096] It is worth noting that in addition to sending real-time vehicle information, the server can also send functional information corresponding to the target vehicle. Among them, the functional information includes real-time vehicle passing function and non-real-time vehicle passing function. The real-time vehicle passing function can be used to simulate and display vehicles in real scenes in real time, and the non-real-time vehicle passing function is used to display vehicle passing scenes that have already occurred. Specifically, if the functional information indicates that the target vehicle needs to apply the non-real-time vehicle passing function, the target vehicle's real-time vehicle information is sorted according to the data upload time, and the target vehicle is animatedly simulated from the data upload time to the back.
[0097] In this embodiment, the application end establishes a connection with the server end through a preset connection method, sends a vehicle information subscription request to the server end, and receives real-time vehicle information sent by the server end, thereby improving data transmission efficiency and is suitable for data transmission scenarios with large data volumes.
[0098] As another optional implementation, in a data transmission scenario with a small amount of data, the server side can transmit data to the application side regularly according to a preset time period.
[0099] The above steps describe in detail how to achieve the target vehicle's driving display based on real-time vehicle information and historical vehicle information. Figure 4 This article introduces how to simulate the driving animation of the target vehicle when the received implementation vehicle information is empty.
[0100] S401. If the real-time vehicle information of the target vehicle is not obtained, the target path point is determined according to the historical vehicle information and a plurality of pre-set path point information, where the path point information includes the path point coordinates and the path point heading angle.
[0101] Optionally, before simulating the driving animation, multiple path points may be set on each lane according to driving rules, and the coordinates of each path point may be used as path point information, wherein the coordinates of the path point are coordinates under the simulation scene dimension.
[0102] Failure to obtain the real-time vehicle information of the target vehicle may include the following situations: one is that the real-time vehicle information content is empty or incomplete, and the other is that the real-time vehicle information does not indicate that the information is used for driving simulation. When the above two situations occur, in order to ensure the continuity of the animation of the driving simulation, it is necessary to predict the direction of the target vehicle based on the waypoint information and generate a coherent simulation animation.
[0103] S402: Determine the predicted driving speed and predicted driving direction of the target vehicle according to the target path point.
[0104] Optionally, the predicted driving speed and predicted driving direction of the target vehicle can be determined based on the path point information of the target path point. Specifically, the coordinates of the target path point are used as the real-time coordinates of the target vehicle, and the coordinates of the historical coordinate information of the target vehicle in the historical vehicle information in the virtual scene dimension and the coordinate information of the target path point are used to determine the predicted driving direction. Among them, the predicted driving direction can be determined by subtracting the coordinates of the historical coordinate information in the virtual scene dimension from the coordinate information of the target path point.
[0105] Furthermore, the predicted driving speed is determined based on the time point when the real-time vehicle information of the target vehicle is not obtained, the time when the historical data in the historical vehicle information is uploaded, the coordinates of the historical coordinate information of the target vehicle in the historical vehicle information in the virtual scene dimension, and the coordinate information of the target path point. Specifically, the first time interval is calculated based on the time point when the real-time vehicle information of the target vehicle is not obtained and the time when the historical data in the historical vehicle information is uploaded, and then the first distance is calculated based on the coordinates of the historical coordinate information of the target vehicle in the historical vehicle information in the virtual scene dimension and the coordinate information of the target path point, and the ratio of the first distance to the first time interval is used as the predicted driving speed.
[0106] S403: determining a target vehicle model corresponding to the target vehicle according to the vehicle type and license plate type of the target vehicle, and simulating and displaying the target vehicle model in real time based on the predicted driving speed and predicted driving direction.
[0107] Optionally, the target vehicle model corresponding to the target vehicle can be determined based on the vehicle type and license plate type in the historical vehicle information of the target vehicle. Specifically, it is determined whether the vehicle model displayed in the vehicle storage information matches the vehicle type and license plate type in the historical vehicle information. If they match, the matched displayed vehicle model is used as the target vehicle model. It is worth noting that since this embodiment is intended to predict the vehicle direction based on the historical vehicle information and path points of the target vehicle, the animation of the historical driving of the target vehicle already exists in the display interface.
[0108] As an optional implementation, an end time threshold may be preset. When the real-time vehicle information of the target vehicle is still not obtained after the preset time threshold, the historical vehicle information of the target vehicle and the matched displayed vehicle model are deleted.
[0109] In this embodiment, if the real-time vehicle information of the target vehicle is not obtained, the target path points are determined based on the historical vehicle information and the pre-set multiple path point information, the predicted driving speed and predicted driving direction of the target vehicle are determined based on the target path points, the target vehicle model corresponding to the target vehicle is determined based on the vehicle type and license plate type of the target vehicle, and the target vehicle model is simulated and displayed in real time based on the predicted driving speed and predicted driving direction, thereby ensuring the continuity of the driving animation and improving the user's visual experience.
[0110] Next, how to determine the target path point according to the historical vehicle information and the pre-set multiple path point information in the above step S301 is introduced:
[0111] First, according to the upload time of historical data in the historical vehicle information, the historical coordinate information to be predicted and the historical heading angle to be predicted are determined.
[0112] Optionally, since historical vehicle information may include information corresponding to multiple data upload times, the historical vehicle information with the latest historical data upload time can be selected, and the historical coordinate information contained therein can be used as the historical coordinate information to be predicted, and the historical heading angle can be used as the historical heading angle to be predicted.
[0113] Then, the target path point is determined according to the historical coordinate information to be predicted, the historical heading angle to be predicted and the information of multiple path points, and the difference between the path point heading angle of the target path point and the historical heading angle to be predicted is less than the preset angle.
[0114] Since the path point information includes the path point coordinates and the path point heading angle, the intermediate path points can be determined based on the historical heading angle to be predicted and the path point heading angle, and then the target path point can be determined based on the intermediate path points, the path point coordinates and the historical coordinate information to be predicted.
[0115] Specifically, a path point is selected from among multiple path points, where the difference between the path point heading angle and the historical heading angle to be predicted is less than a preset angle, and the path point is used as an intermediate path point. The preset angle may be 45 degrees, for example. After obtaining at least one intermediate path point, the path point in the target path point information whose path point course angle is closest to the historical coordinate information to be predicted is used as the target path point.
[0116] As another optional implementation, the path point whose route angle of the path point in the target path point information is closest to the historical coordinate information to be predicted can be first selected as the intermediate path point, and then it is determined whether the difference between the path point heading angle of the intermediate path point and the historical heading angle to be predicted is less than the preset angle. If so, the intermediate path point is used as the target path point. If not, the path point whose route angle of the path point in the target path point information other than the intermediate path point is closest to the historical coordinate information to be predicted is used as the intermediate path point as the first intermediate path point, and then it is determined whether the difference between the path point heading angle of the first intermediate path point and the historical heading angle to be predicted is less than the preset angle. This cycle is repeated until a path point whose difference between the path point heading angle and the historical heading angle to be predicted is less than the preset angle is found, and the path point is used as the target path point.
[0117] In this embodiment, the historical coordinate information to be predicted and the historical heading angle to be predicted are determined based on the historical data upload time in the historical vehicle information, and then the target path point is determined based on the historical coordinate information to be predicted, the historical heading angle to be predicted and multiple path point information, so that a continuous travel animation is generated using the target path point to improve the user experience.
[0118] Next, the specific steps of determining the current speed and direction of the target vehicle according to the historical coordinate information and the historical heading angle included in the historical vehicle information and the real-time coordinate information and the real-time heading angle in the real-time vehicle information in the above step S202 are introduced:
[0119] First, the current speed of the target vehicle is determined based on the historical coordinate information, the real-time coordinate information, and the difference between the data upload time and the historical data upload time.
[0120] Specifically, first, according to the data upload time in the real-time vehicle information, determine the historical data upload time in the historical vehicle information that is closest to the data upload time, and use the difference between the historical data upload time and the data upload time as the time interval. Then determine the path interval based on the historical coordinate information and the real-time coordinate information. It should be understood that since the historical coordinate information and the real-time coordinate information are both coordinates under the actual scene dimension, it is necessary to use the conversion relationship between the actual scene dimension and the simulation scene dimension to convert the path interval into the converted path interval. Then use the ratio of the converted path interval to the time interval as the current driving speed of the target vehicle. At this time, the current driving speed is the speed under the simulation scene dimension.
[0121] As an optional implementation, the current driving direction of the target vehicle is determined based on the historical heading angle and the real-time heading angle.
[0122] Specifically, the difference between the historical heading angle and the real-time heading angle may be used as the current driving direction of the target vehicle.
[0123] As another optional implementation, the current driving direction of the target vehicle can be calculated based on the historical coordinate information and the real-time coordinate information. Specifically, the historical coordinate information is converted into converted historical coordinate information based on the conversion relationship, and the real-time coordinate information is converted into converted real-time coordinate information based on the conversion relationship, and then the vector obtained by subtracting the converted historical coordinate information from the converted real-time coordinate information is used as the direction vector, and the arc tangent conversion is performed on the direction vector to obtain the current driving direction.
[0124] In this embodiment, the current speed of the target vehicle is determined based on the historical coordinate information, the real-time coordinate information, and the difference between the data upload time and the historical data upload time, and then the current driving direction of the target vehicle is determined based on the historical heading angle and the real-time heading angle, so that the driving animation can be simulated according to the current driving direction and the current driving speed, thereby improving the authenticity of the animation.
[0125] Next, refer to Figure 5 The specific steps of how to determine the target vehicle model according to the pre-stored vehicle storage information and the vehicle type and license plate type in the real-time vehicle information in step S303 are introduced as follows:
[0126] S501. Determine whether the model in the vehicle storage information matches the vehicle type and license plate type in the real-time vehicle information.
[0127] Optionally, if the vehicle type and license plate type corresponding to the model in the vehicle storage information are the same as the vehicle type and license plate type in the real-time vehicle information, it means that the model of the target vehicle has been displayed in the current page.
[0128] S502: If not, create a target vehicle model according to the vehicle type and license plate type.
[0129] Optionally, if there is no match, it means that there is no model corresponding to the target vehicle in the current page. It is necessary to first create a model with the same vehicle type as the real-time vehicle information based on the vehicle type and license plate type, and then modify the license plate model in the created model according to the license plate type to obtain the target vehicle model.
[0130] S503: If yes, use the model in the vehicle storage information as the target vehicle model.
[0131] Optionally, the model in the vehicle storage information is used as the target vehicle model, and then only the target vehicle model needs to be animated according to the real-time vehicle, so that the authenticity and consistency of the animation can be maintained.
[0132] In this embodiment, by determining whether the model in the vehicle storage information matches the vehicle type and license plate type in the real-time vehicle information, the target vehicle model is obtained to achieve the continuity of the vehicle animation.
[0133] As an optional implementation, the specific steps of determining the simulated vehicle coordinates of the target vehicle model according to the real-time coordinate information in the above step S205 are as follows:
[0134] First, a simulation scene is established according to a plurality of registration points and a center point in the actual scene to be simulated, and the coordinate information in the simulation scene has a preset transformation relationship with the coordinate information in the actual scene to be simulated.
[0135] Optionally, multiple alignment points and a center point are set in advance in the actual scene to be simulated, and the forward and backward vectors of longitude and latitude are converted into a determinant. Then, the transformed determinant is determined by the method of finding the average of the binomial. Then, the binomial is created by the transformed determinant, and the binomial is used as the preset transformation relationship between the coordinate information in the simulation scene and the coordinate information in the actual scene to be simulated.
[0136] Then, the real-time coordinate information is transformed according to a preset transformation relationship to obtain the simulated vehicle coordinates.
[0137] Optionally, the real-time coordinate information is transformed based on a binomial to obtain simulated vehicle coordinates.
[0138] In this embodiment, a simulation scene is established based on multiple alignment points and a center point in the actual scene to be simulated, and the real-time coordinate information is transformed according to a preset transformation relationship to obtain the simulated vehicle coordinates, thereby realizing the display of the vehicle in the actual scene to be simulated on the large screen to achieve a realistic effect.
[0139] Based on the same inventive concept, the embodiment of the present application also provides a real-time control and simulation device for vehicle animation in a digital twin project corresponding to the real-time control and simulation method for vehicle animation in a digital twin project. Since the principle of solving the problem by the device in the embodiment of the present application is similar to the real-time control and simulation method for vehicle animation in the above-mentioned digital twin project in the embodiment of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0140] Reference Figure 6 As shown, it is a schematic diagram of a real-time control and simulation device for vehicle animation in a digital twin project provided in an embodiment of the present application, and the device includes: an acquisition module 601, a first determination module 602, a second determination module 603 and a simulation module 604; wherein:
[0141] The acquisition module 601 is used to acquire the real-time vehicle information of the target vehicle and the historical vehicle information of the target vehicle, wherein the real-time vehicle information includes: real-time coordinate information, real-time heading angle, vehicle type, license plate type and data upload time, and the historical vehicle information includes at least: historical coordinate information, historical heading angle and historical data upload time;
[0142] A first determination module 602 is used to determine the current driving speed and current driving direction of the target vehicle according to the historical coordinate information and the historical heading angle included in the historical vehicle information, and the real-time coordinate information and the real-time heading angle in the real-time vehicle information;
[0143] A second determination module 603 is used to determine a target vehicle model corresponding to the target vehicle according to the pre-stored vehicle storage information and the vehicle type and the license plate type in the real-time vehicle information, wherein the target vehicle model includes the vehicle type and the license plate type, and the vehicle storage information is used to indicate the currently displayed vehicle model;
[0144] The simulation module 604 is used to determine the simulated vehicle coordinates of the target vehicle model according to the real-time coordinate information, and to perform real-time simulation display of the target vehicle model based on the simulated vehicle coordinates, the current driving speed and the current driving direction.
[0145] Optionally, the acquisition module 601 specifically includes:
[0146] The application end establishes a connection with the server end through a preset connection method, and the server stores a plurality of vehicle information;
[0147] Sending a vehicle information subscription request to the server;
[0148] Receive the real-time vehicle information sent by the server.
[0149] Optionally, the simulation module 604 further includes:
[0150] If the real-time vehicle information of the target vehicle is not obtained, the target path point is determined according to the historical vehicle information and a plurality of pre-set path point information, wherein the path point information includes the path point coordinates and the path point heading angle;
[0151] Determining a predicted driving speed and a predicted driving direction of the target vehicle according to the target path point;
[0152] A target vehicle model corresponding to the target vehicle is determined according to the vehicle type and license plate type of the target vehicle, and the target vehicle model is simulated and displayed in real time based on the predicted driving speed and the predicted driving direction.
[0153] Optionally, the simulation module 604 specifically includes:
[0154] According to the historical data upload time described in the historical vehicle information, determine the historical coordinate information to be predicted and the historical heading angle to be predicted;
[0155] The target path point is determined according to the historical coordinate information to be predicted, the historical heading angle to be predicted and the information of the plurality of path points, wherein the difference between the coordinates of the target path point and the line connecting the coordinates indicated by the historical coordinate information to be predicted and the historical heading angle to be predicted is less than a preset angle.
[0156] Optionally, the first determining module 602 specifically includes:
[0157] Determine the current speed of the target vehicle according to the historical coordinate information, the real-time coordinate information, and the difference between the data upload time and the historical data upload time;
[0158] The current driving direction of the target vehicle is determined according to the historical heading angle and the real-time heading angle.
[0159] Optionally, the second determining module 603 specifically includes:
[0160] Determining whether the model in the vehicle storage information matches the vehicle type and license plate type in the real-time vehicle information;
[0161] If not, creating a target vehicle model according to the vehicle type and the license plate type;
[0162] If yes, the model in the vehicle storage information is used as the target vehicle model.
[0163] Optionally, the simulation module 604 specifically includes:
[0164] Establishing a simulation scene according to a plurality of registration points and a center point in the actual scene to be simulated, wherein the coordinate information in the simulation scene has a preset transformation relationship with the coordinate information in the actual scene to be simulated;
[0165] The real-time coordinate information is transformed according to the preset transformation relationship to obtain the simulated vehicle coordinates.
[0166] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.
[0167] The present application also provides an electronic device, such as Figure 7 , which is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, includes: a processor 701, a memory 702 and a bus. The memory 702 stores machine-readable instructions executable by the processor 701 (for example, Figure 6 In the device, the execution instructions corresponding to the acquisition module 601, the first determination module 602, the second determination module 603 and the simulation module 604 are obtained, etc.), when the computer device is running, the processor 701 communicates with the memory 702 through a bus, and when the machine-readable instructions are executed by the processor 701, the real-time control and simulation method of the vehicle animation in the above-mentioned digital twin project is executed.
[0168] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the real-time control and simulation method of vehicle animation in the above-mentioned digital twin project are executed.
[0169] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, and will not be repeated in this application. In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. There may be other division methods in the current implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0170] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. If the function is implemented in the form of a software functional unit 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 the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), disk or optical disk and other media that can store program code.
[0171] The above are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be covered by the protection scope of the present application.
Claims
1. A real-time control and simulation method for vehicle animation in a digital twin project, characterized in that: The method comprises: Acquire real-time vehicle information of the target vehicle and historical vehicle information of the target vehicle, wherein the real-time vehicle information includes: real-time coordinate information, real-time heading angle, vehicle type, license plate type and data upload time, and the historical vehicle information includes at least: historical coordinate information, historical heading angle and historical data upload time; Determine the current speed and direction of the target vehicle according to the historical coordinate information and the historical heading angle included in the historical vehicle information, and the real-time coordinate information and the real-time heading angle in the real-time vehicle information; Determine a target vehicle model corresponding to the target vehicle according to the pre-stored vehicle storage information and the vehicle type and the license plate type in the real-time vehicle information, wherein the target vehicle model includes the vehicle type and the license plate type, and the vehicle storage information is used to indicate the currently displayed vehicle model; The simulated vehicle coordinates of the target vehicle model are determined according to the real-time coordinate information, and the target vehicle model is simulated and displayed in real time based on the simulated vehicle coordinates, the current driving speed and the current driving direction.
2. The real-time control and simulation method of vehicle animation in the digital twin project according to claim 1 is characterized in that: The obtaining of real-time vehicle information of the target vehicle includes: The application end establishes a connection with the server end through a preset connection method, and the server stores a plurality of vehicle information; Sending a vehicle information subscription request to the server; Receive the real-time vehicle information sent by the server.
3. The real-time control and simulation method of vehicle animation in the digital twin project according to claim 1 is characterized in that: The method further comprises: If the real-time vehicle information of the target vehicle is not obtained, the target path point is determined according to the historical vehicle information and a plurality of pre-set path point information, wherein the path point information includes the path point coordinates and the path point heading angle; Determining a predicted driving speed and a predicted driving direction of the target vehicle according to the target path point; A target vehicle model corresponding to the target vehicle is determined according to the vehicle type and license plate type of the target vehicle, and the target vehicle model is simulated and displayed in real time based on the predicted driving speed and the predicted driving direction.
4. The real-time control and simulation method of vehicle animation in the digital twin project according to claim 3 is characterized in that: The step of determining the target path point according to the historical vehicle information and the pre-set multiple path point information includes: According to the historical data upload time described in the historical vehicle information, determine the historical coordinate information to be predicted and the historical heading angle to be predicted; The target path point is determined according to the historical coordinate information to be predicted, the historical heading angle to be predicted and the information of the plurality of path points, wherein the difference between the coordinates of the target path point and the line connecting the coordinates indicated by the historical coordinate information to be predicted and the historical heading angle to be predicted is less than a preset angle.
5. The real-time control and simulation method of vehicle animation in the digital twin project according to claim 1 is characterized in that: Determining the current driving speed and the current driving direction of the target vehicle according to the historical coordinate information and the historical heading angle included in the historical vehicle information and the real-time coordinate information and the real-time heading angle in the real-time vehicle information includes: Determine the current speed of the target vehicle according to the historical coordinate information, the real-time coordinate information, and the difference between the data upload time and the historical data upload time; The current driving direction of the target vehicle is determined according to the historical heading angle and the real-time heading angle.
6. The real-time control and simulation method of vehicle animation in the digital twin project according to claim 1 is characterized in that: Determining the target vehicle model according to the pre-stored vehicle storage information and the vehicle type and the license plate type in the real-time vehicle information includes: Determining whether the model in the vehicle storage information matches the vehicle type and license plate type in the real-time vehicle information; If not, creating a target vehicle model according to the vehicle type and the license plate type; If yes, the model in the vehicle storage information is used as the target vehicle model.
7. The real-time control and simulation method of vehicle animation in the digital twin project according to claim 1 is characterized in that: Determining the simulated vehicle coordinates of the target vehicle model according to the real-time coordinate information includes: Establishing a simulation scene according to a plurality of registration points and a center point in the actual scene to be simulated, wherein the coordinate information in the simulation scene has a preset transformation relationship with the coordinate information in the actual scene to be simulated; The real-time coordinate information is transformed according to the preset transformation relationship to obtain the simulated vehicle coordinates.
8. A real-time control and simulation device for vehicle animation in a digital twin project, characterized in that: The device comprises: An acquisition module is used to acquire real-time vehicle information of a target vehicle and historical vehicle information of the target vehicle, wherein the real-time vehicle information includes: real-time coordinate information, real-time heading angle, vehicle type, license plate type and data upload time, and the historical vehicle information includes at least: historical coordinate information, historical heading angle and historical data upload time; A first determination module, used to determine the current driving speed and current driving direction of the target vehicle according to the historical coordinate information and the historical heading angle included in the historical vehicle information, and the real-time coordinate information and the real-time heading angle in the real-time vehicle information; A second determination module is used to determine a target vehicle model corresponding to the target vehicle according to the pre-stored vehicle storage information and the vehicle type and the license plate type in the real-time vehicle information, wherein the target vehicle model includes the vehicle type and the license plate type, and the vehicle storage information is used to indicate the currently displayed vehicle model; The simulation module is used to determine the simulated vehicle coordinates of the target vehicle model according to the real-time coordinate information, and to perform real-time simulation display of the target vehicle model based on the simulated vehicle coordinates, the current driving speed and the current driving direction.
9. An electronic device, characterized in that: include: A processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor executes the machine-readable instructions to perform the steps of the real-time control and simulation method of vehicle animation in a digital twin project as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, executes the steps of the real-time control and simulation method of vehicle animation in a digital twin project as described in any one of claims 1 to 7.