Motion animation generation method and device, electronic equipment and readable medium

By receiving and processing the current position data of the target object and generating interpolated track point data using the interpolation strategy, the problem of poor smoothness of motion animation in the prior art is solved, and more efficient motion animation generation is achieved.

CN119478146APending Publication Date: 2025-02-18CHINA UNICOM SMART CONNECTION TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411570548.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-05
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

The existing motion animation generation methods have poor smoothness due to network fluctuations and other factors, which affects the generation effect.

Method used

By receiving the current position data of the target object, the current track point data is generated and added to the track point cache sequence, the interpolated track point data is generated according to the preset interpolation strategy, the cache sequence is inserted, and finally the preset motion is run based on the interpolated track point cache sequence. The model generates motion animation.

Benefits of technology

It improves the smoothness of motion animation, enhances the continuity of trajectory point data, and improves the generation effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119478146A_ABST
    Figure CN119478146A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and particularly discloses a motion animation generation method and device, electronic equipment and a readable medium. The method comprises the following steps: receiving current position data obtained by monitoring a target object; generating current track point data corresponding to the current position data, and adding the current track point data to a track point cache sequence corresponding to the target object; according to a preset interpolation strategy, generating interpolation track point data corresponding to the current track point data, and inserting the interpolation track point data into the track point cache sequence to obtain an interpolated track point cache sequence; and running a preset motion model corresponding to the target object according to the interpolated track point cache sequence, and generating a motion animation corresponding to the target object. According to the method, the smoothness of the generated motion animation can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a motion animation generation method, a generation device, an electronic device, and a readable medium. Background Art

[0002] Motion animation refers to the use of computer technology to display the motion status of entities such as vehicles and pedestrians in the traffic system and the dynamic changes of the traffic environment in the form of animation.

[0003] In the existing motion animation generation method, due to factors such as network fluctuations, the smoothness of the generated motion animation cannot be guaranteed, which affects the generation effect of the motion animation. Summary of the invention

[0004] To this end, the present disclosure provides a motion animation generation method to solve the problem of poor smoothness of motion animation caused by factors such as network fluctuations in the prior art.

[0005] In order to achieve the above-mentioned object, the present disclosure provides a motion animation generation method in a first aspect, the method comprising:

[0006] Receiving current location data obtained by monitoring the target object;

[0007] Generate current track point data corresponding to the current position data, and add the current track point data to a track point cache sequence corresponding to the target object;

[0008] According to a preset interpolation strategy, interpolation trajectory point data corresponding to the current trajectory point data is generated, and the interpolation trajectory point data is inserted into the trajectory point cache sequence to obtain an interpolated trajectory point cache sequence;

[0009] The preset motion model corresponding to the target object is run according to the interpolated trajectory point cache sequence to generate a motion animation corresponding to the target object.

[0010] In an optional implementation, the current position data includes: position sub-data and orientation sub-data; then generating current track point data corresponding to the current position data includes:

[0011] Calculate the time interval between the current reporting time corresponding to the current location data and the historical reporting time corresponding to the historical location data of the target object to obtain the interval duration corresponding to the current location data;

[0012] The current track point data is generated according to the position sub-data, the orientation sub-data and the interval duration corresponding to the current position data.

[0013] In an optional implementation, running a preset motion model corresponding to the target object according to the interpolated trajectory point cache sequence to generate a motion animation corresponding to the target object includes:

[0014] For the i-th trajectory point data in the interpolated trajectory point cache sequence, determine the target position and target orientation of the preset motion model corresponding to the i-th trajectory point data according to the position sub-data and orientation sub-data contained in the i-th trajectory point data;

[0015] For the i-th trajectory point data, according to the target position, target orientation and the interval duration contained in the i-th trajectory point data, the preset motion model is run to generate a target motion animation from the initial position and initial orientation corresponding to the preset motion model to the target position and the target orientation;

[0016] Among them, the initial position and initial orientation corresponding to the preset motion model are determined according to the i-1th trajectory point data in the trajectory point cache data; the motion time corresponding to the target motion animation is the interval duration; and i is a natural number.

[0017] In an optional implementation, before running the preset motion model for the i-th trajectory point data according to the target position, target orientation, and the interval duration included in the i-th trajectory point data, the method further includes:

[0018] Determining the number of trajectory point data included in the trajectory point cache sequence;

[0019] When the number of the track point data is greater than a preset number threshold, the interval durations contained in all the track point data are updated according to the preset reduction threshold, so that the interval durations contained in the updated track point data are shortened.

[0020] In an optional implementation, the interpolation trajectory point data includes interpolation interval duration, interpolation position sub-data, and interpolation direction sub-data, and the interpolation trajectory point data corresponding to the current trajectory point data is generated according to a preset interpolation strategy, including:

[0021] According to the preset interpolation strategy, respectively determine a first data mapping relationship between the interval duration and the position sub-data and a second data mapping relationship between the interval duration and the orientation sub-data;

[0022] Determining the interpolation quantity of the interpolation trajectory point data to be generated, and generating the interpolation interval duration included in the interpolation trajectory point data according to the interpolation quantity and the interval duration included in the current trajectory point data;

[0023] Generate interpolation position sub-data included in the interpolation trajectory point data according to the interpolation interval duration and the first data mapping relationship;

[0024] According to the interpolation interval duration and the second data mapping relationship, interpolation direction sub-data included in the interpolation trajectory point data is generated.

[0025] In an optional implementation, before adding the current trajectory point data to the trajectory point cache sequence corresponding to the target object, the method further includes:

[0026] Calculating a position movement distance corresponding to the current position data according to the current position data and the historical position data corresponding to the target object;

[0027] When the position moving distance meets a preset distance threshold, the current track point data is added to a track point cache sequence corresponding to the target object.

[0028] In an optional implementation, before generating interpolation trajectory point data according to a preset interpolation strategy, the method further includes:

[0029] When the orientation sub-data included in any trajectory point data in the trajectory point cache sequence does not belong to the preset angle range, the orientation sub-data included in the any trajectory point data is updated so that the orientation sub-data included in the any trajectory point data after the update is converted to be within the preset angle range.

[0030] A second aspect of the present disclosure provides a motion animation generating device, the device comprising:

[0031] A receiving module, used for receiving current position data obtained by monitoring the target object;

[0032] A construction module, configured to generate current track point data corresponding to the current position data, and add the current track point data to a track point cache sequence corresponding to the target object;

[0033] An insertion module, configured to generate interpolated trajectory point data corresponding to the current trajectory point data according to a preset interpolation strategy, and insert the interpolated trajectory point data into the trajectory point cache sequence to obtain an interpolated trajectory point cache sequence;

[0034] A generation module is used to run a preset motion model corresponding to the target object according to the interpolated trajectory point cache sequence to generate a motion animation corresponding to the target object.

[0035] A third aspect of the present disclosure provides an electronic device, including:

[0036] one or more processors;

[0037] A storage device having one or more programs stored thereon, when the one or more programs are executed by the one or more processors, the one or more processors implement the above-mentioned motion animation generation method;

[0038] One or more I / O interfaces are connected between the processor and the memory and are configured to implement information interaction between the processor and the memory.

[0039] A fourth aspect of the present disclosure provides a computer-readable medium having a computer program stored thereon, wherein the program implements the above-mentioned motion animation generation method when executed by a processor.

[0040] The present disclosure has the following advantages:

[0041] In the motion animation generation method provided by the embodiment of the present disclosure, first, current position data obtained by monitoring the target object is received; second, current trajectory point data corresponding to the current position data is generated, and the current trajectory point data is added to the trajectory point cache sequence corresponding to the target object, so that in the case of network fluctuations, the trajectory point data of the target object to be generated for the motion animation can be stored; then, according to a preset interpolation strategy, interpolated trajectory point data corresponding to the current trajectory point data is generated, and the interpolated trajectory point data is inserted into the trajectory point cache sequence to obtain the interpolated trajectory point cache sequence to enhance the smoothness of the trajectory point data; finally, the preset motion model corresponding to the target object is run according to the interpolated trajectory point cache sequence to generate the motion animation corresponding to the target object, thereby improving the smoothness of the generated motion animation. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The accompanying drawings are used to provide further understanding of the present disclosure and constitute a part of the specification. They are used to explain the present disclosure together with the following detailed description, but do not constitute a limitation of the present disclosure.

[0043] Figure 1 A flow chart of a motion animation generation method provided by an embodiment of the present disclosure;

[0044] Figure 2 It is the application diagram of the model controller;

[0045] Figure 3 A schematic diagram of a motion animation generation method provided by an embodiment of the present disclosure;

[0046] Figure 4 This is a schematic diagram of the application of the animation controller;

[0047] Figure 5 A block diagram of a motion animation generating device provided by an embodiment of the present disclosure;

[0048] Figure 6 A block diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0049] The specific implementation of the present disclosure is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described herein is only used to illustrate and explain the present disclosure, and is not used to limit the present disclosure.

[0050] As used in this disclosure, the term "and / or" includes any and all combinations of one or more of the associated listed items.

[0051] The terms used in the present disclosure are only used to describe specific embodiments and are not intended to limit the present disclosure.As used in the present disclosure, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.

[0052] When the terms “comprising” and / or “made of…” are used in the present disclosure, it specifies the existence of the stated features, integers, steps, operations, elements and / or components, but does not exclude the existence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0053] The embodiments described in the present disclosure may be described with reference to plan views and / or cross-sectional views by way of ideal schematic views of the present disclosure. Therefore, the exemplary illustrations may be modified according to manufacturing techniques and / or tolerances.

[0054] Unless otherwise defined, all terms (including technical and scientific terms) used in this disclosure have the same meaning as those commonly understood by those of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning unless explicitly defined in this disclosure.

[0055] Motion animation can intuitively present the operation of traffic flow, and through data analysis and processing, it can provide valuable reference information for traffic managers and decision makers.

[0056] In the existing motion animation generation method, due to the influence of factors such as the network environment, the smoothness of the generated motion animation cannot be guaranteed.

[0057] In view of this, the embodiments of the present disclosure provide a motion animation method, a motion animation device, an electronic device, and a readable medium to improve the smoothness of the generated motion animation.

[0058] In a first aspect, an embodiment of the present disclosure provides a motion animation generation method. Figure 1 A flowchart of a motion animation generation method provided by an embodiment of the present disclosure, referring to Figure 1 ,Should

[0059] Methods include:

[0060] Step S110: receiving current position data obtained by monitoring the target object.

[0061] The target object refers to a moving entity monitored in a traffic environment, such as a vehicle, a pedestrian, etc. The number of target objects may be one or more, and the embodiment of the present disclosure does not impose any limitation on this.

[0062] Correspondingly, the current location data obtained by monitoring the target object is used to characterize the geographical location of the target object at the current moment. Specifically, the current location data can be collected by sensors such as OBU (On Board Unit) and RSU (Road Side Unit).

[0063] It should be noted that the current position data is the position data obtained by dynamic monitoring, that is, it is dynamically changing data. Specifically, the sensor can send the current position data obtained by its current monitoring according to a preset sending frequency. Thus, it is possible to continuously receive the current position data corresponding to the target object at different times.

[0064] It should also be noted that, in order to characterize the current motion state of the target object in detail, the current position data may include position sub-data and orientation sub-data.

[0065] The position sub-data is used to represent the current longitude and latitude of the target object, and the heading sub-data is used to represent the current direction of movement of the target object, which can be expressed in the form of an angle value. For example, the position sub-data can be (Px, Py), where Px is the current longitude of the target object and Py is the current latitude of the target object. The heading sub-data can be heading, such as 60°.

[0066] Step S120: Generate current track point data corresponding to the current position data, and add the current track point data to the track point cache sequence corresponding to the target object.

[0067] The current track point data is data used to determine the motion track of the target object, and the current track point data needs to include the current position data of the target object.

[0068] Since the current position data is received dynamically, the movement trajectory of the target object at different times can be determined through the data changes between the current position data received at different times.

[0069] In an optional implementation, in order to enable the generated motion animation corresponding to the target object to represent the motion duration of the target object and improve the content richness of the motion animation, the current trajectory point data may also include the interval duration corresponding to the current position data.

[0070] Correspondingly, the current position data includes: position sub-data and orientation sub-data; then the current trajectory point data corresponding to the current position data is generated, including: calculating the time interval between the current reporting time corresponding to the current position data and the historical reporting time corresponding to the historical position data of the target object, and obtaining the interval duration corresponding to the current position data; generating the current trajectory point data according to the position sub-data, the orientation sub-data and the interval duration corresponding to the current position data.

[0071] The position sub-data and the orientation sub-data are specifically explained above and will not be elaborated here.

[0072] The current reporting time corresponding to the current location data refers to the time corresponding to when the current location data is received.

[0073] The historical location data of the target object refers to the previous current location data of the target object received before the current location data.

[0074] Correspondingly, the historical reporting time corresponding to the historical location data refers to the time corresponding to when the historical location data is received.

[0075] For example, the current location data 1, current location data 2, and current location data 3 of the target object are received at time 1, time 2, and time 3, respectively. Then the current location data 2 is the historical location data of the target object, time 2 is the historical reporting time corresponding to the historical location data, and time 3 is the current reporting time corresponding to the current location data.

[0076] Thus, by calculating the time interval between the current reporting time and the historical reporting time, the interval duration corresponding to the current position data can be obtained. The interval duration can reflect the movement duration of the target object from the trajectory point corresponding to the historical position data to the trajectory point corresponding to the current position data.

[0077] Furthermore, the current track point data may be generated according to the position sub-data and the orientation sub-data included in the current position data and the interval duration corresponding to the current position data.

[0078] After the current track point data is generated, it needs to be added to the track point cache sequence corresponding to the target object.

[0079] It should be noted that the trajectory point cache sequence corresponding to the target object is a data sequence of trajectory point data of the target object for which motion animation is to be generated.

[0080] In actual scenarios, affected by factors such as the data upload time and the model rendering time, it may not be possible to instantly generate the corresponding motion animation for the current trajectory point data of the target object. Therefore, by inserting the current trajectory point data of the target object into the trajectory point cache sequence, the trajectory point data for the motion animation to be generated can be stored in time.

[0081] It should also be noted that in order to ensure the continuity of different trajectory point data in the trajectory point cache sequence, when adding the current trajectory point data to the trajectory point cache sequence corresponding to the target object, it is necessary to add it sequentially according to the receiving timing corresponding to the current trajectory point data. That is, the current trajectory point data needs to be added to the end of the trajectory point cache sequence.

[0082] Exemplarily, if the original trajectory point cache sequence includes (trajectory point data 1, trajectory point data 2), then after the trajectory point data 3 is inserted into the original trajectory point cache sequence, the trajectory point cache sequence includes (trajectory point data 1, trajectory point data 2, trajectory point data 3).

[0083] Step S130: generating interpolated trajectory point data corresponding to the current trajectory point data according to a preset interpolation strategy, inserting the interpolated trajectory point data into a trajectory point cache sequence, and obtaining an interpolated trajectory point cache sequence.

[0084] The interpolated trajectory point data corresponding to the current trajectory point data refers to trajectory point data generated according to a preset interpolation strategy and needs to be inserted before the current trajectory point data.

[0085] Specifically, affected by network fluctuation factors, the positional consistency between the current trajectory point data and its corresponding previous trajectory point data is poor, resulting in poor smoothness of the motion animation corresponding to the generated target object. For example, obvious advances, decelerations, and stops occur at route nodes.

[0086] Therefore, it is necessary to generate corresponding interpolated trajectory point data for the current trajectory point data to improve the positional consistency between different trajectory point data.

[0087] It should be noted that the data structure of the interpolated trajectory point data must be consistent with the data structure of the current trajectory point data. For example, when the current trajectory point data includes position sub-data, orientation sub-data and interval duration, the interpolated trajectory point data also needs to include position sub-data, orientation sub-data and interval duration.

[0088] Among them, the preset interpolation strategy can be any interpolation strategy for generating interpolation data, such as a linear interpolation strategy, a Bezier curve interpolation strategy, a spline interpolation strategy, etc., and the embodiments of the present disclosure are not limited to this.

[0089] It should be noted that when inserting the interpolated trajectory point data into the trajectory point cache sequence, the interpolated trajectory point data needs to be inserted before the current trajectory point data.

[0090] Exemplarily, when the current trajectory point data is the first trajectory point data in the trajectory point cache sequence, the interpolation trajectory point data may be sequentially inserted before the current trajectory point data.

[0091] For example, if the trajectory point cache sequence includes (current trajectory point data 1), then after the interpolated trajectory point data 1 and the interpolated trajectory point data 2 are inserted into the trajectory point cache sequence, the interpolated trajectory point cache sequence includes (interpolated trajectory point data 1, interpolated trajectory point data 2, current trajectory point data 1).

[0092] Exemplarily, when the current trajectory point data is not the first trajectory point data in the trajectory point cache sequence, the interpolation trajectory point data may be sequentially inserted between the current trajectory point data and the previous trajectory point data.

[0093] For example, if the trajectory point cache sequence includes (trajectory point data 1, current trajectory point data 2), then after the interpolated trajectory point data 1 and the interpolated trajectory point data 2 are inserted into the trajectory point cache sequence, the interpolated trajectory point cache sequence includes (trajectory point data 1, interpolated trajectory point data 1, interpolated trajectory point data 2, current trajectory point data 2).

[0094] Step S140: running a preset motion model corresponding to the target object according to the interpolated trajectory point cache sequence to generate a motion animation corresponding to the target object.

[0095] The preset motion model is a three-dimensional model corresponding to the target object. The preset motion model is run through the trajectory point cache sequence to generate a motion animation corresponding to the target object.

[0096] Among them, running the preset motion model corresponding to the target object according to the interpolated trajectory point cache sequence refers to motion rendering of the preset motion model according to the trajectory point cache sequence, that is, creating a corresponding animation instance for the preset motion model, so that the model presents a motion state on the screen, thereby forming a motion animation corresponding to the target object.

[0097] It should be noted that, according to the object type corresponding to the target object, such as a small car, a large car, a pedestrian, etc., corresponding preset motion models can be set respectively, for example, a small car motion model, a large car motion model, and a pedestrian motion model.

[0098] It should also be noted that when there are multiple target objects, in order to reduce GPU resource usage, preset motion models corresponding to different target objects can be generated based on shared model resources. For example, corresponding preset motion models can be created for small cars, large cars, pedestrians, etc. based on shared model resources.

[0099] Specifically, the preset motion model can be generated and managed uniformly through the model controller. Figure 2 This is a schematic diagram of the application of the model controller, refer to Figure 2 :

[0100] The model controller can be used to uniformly manage materials (such as textures and colors) and uniformly allocate elements (such as pedestrians and buildings) to achieve model resource sharing. In addition, the model controller can be used to perform hierarchical and classified rendering according to type and uniformly manage different motion models, thereby achieving flexible use of resources in different scenarios.

[0101] Correspondingly, in the case of multiple target objects, the preset motion model corresponding to each object can be run according to the interpolated trajectory point cache sequence corresponding to each target object, so as to generate corresponding animation instances for different preset motion models, and finally obtain motion animations corresponding to different target objects.

[0102] In the motion animation generation method provided by the embodiment of the present disclosure, first, current position data obtained by monitoring the target object is received; secondly, current trajectory point data corresponding to the current position data is generated, and the current trajectory point data is added to the trajectory point cache sequence corresponding to the target object, so that in the case of network fluctuations, the trajectory point data of the target object to be generated for the motion animation can be stored; then, according to a preset interpolation strategy, interpolated trajectory point data corresponding to the current trajectory point data is generated, and the interpolated trajectory point data is inserted into the trajectory point cache sequence to obtain the interpolated trajectory point cache sequence to enhance the smoothness of the trajectory point data; finally, the preset motion model corresponding to the target object is run according to the interpolated trajectory point cache sequence to generate the motion animation corresponding to the target object, thereby improving the smoothness of the generated motion animation.

[0103] In addition, those skilled in the art may also make various modifications and variations to the method disclosed herein:

[0104] In an optional implementation, in order to comprehensively generate the motion animation corresponding to the target object, the motion animation corresponding to the trajectory point data can be generated in turn for each trajectory point data in the interpolated trajectory point cache sequence in a recursive manner.

[0105] Correspondingly, the preset motion model corresponding to the target object is run according to the interpolated trajectory point cache sequence to generate a motion animation corresponding to the target object, including: for the i-th trajectory point data in the interpolated trajectory point cache sequence, according to the position sub-data and orientation sub-data contained in the i-th trajectory point data, determining the target position and target orientation of the preset motion model corresponding to the i-th trajectory point data; for the i-th trajectory point data, according to the target position, target orientation and interval duration contained in the i-th trajectory point data, running the preset motion model to generate a target motion animation from the initial position and initial orientation corresponding to the preset motion model to the target position and target orientation; wherein the initial position and initial orientation corresponding to the preset motion model are determined according to the i-1-th trajectory point data in the trajectory point cache data; the motion time corresponding to the target motion animation is the interval duration; and i is a natural number.

[0106] Among them, the target position and target direction of the preset motion model corresponding to the i-th trajectory point data refer to the trajectory point position to which the preset motion model needs to move under the i-th trajectory point data and the motion direction when the preset motion model moves to the target trajectory point.

[0107] Specifically, the position sub-data contained in the i-th trajectory point data may be directly used as the target position, and the orientation sub-data contained in the i-th trajectory point data may be directly used as the target orientation.

[0108] Thus, according to the target position, target orientation and interval duration contained in the i-th trajectory point data, the preset motion model is run to generate a target motion animation from the initial position and initial orientation to the target position and target orientation corresponding to the preset motion model.

[0109] That is, the preset motion model moves from the initial position to the target position, and during the movement, the preset motion model is converted from the initial orientation to the target orientation.

[0110] The initial position and initial orientation corresponding to the preset motion model refer to the current position and current orientation of the preset motion model.

[0111] It should be noted that, since the target motion animation is generated in a recursive manner, under the i-th trajectory point data, the initial position and initial orientation corresponding to the preset motion model can be determined according to the i-1-th trajectory point data in the trajectory point cache data.

[0112] That is to say, the target position and target orientation of the preset motion model corresponding to the i-1th trajectory point data are the initial position and initial orientation corresponding to the preset motion model under the i-th trajectory point data. That is, the initial position and initial orientation of the preset motion model are dynamically changing.

[0113] It should be noted that, in the initial state, default values ​​may be set for the initial position and initial orientation of the preset motion model.

[0114] For example, for the first trajectory point data contained in the interpolated trajectory point cache sequence, if the trajectory point data is the first trajectory point data of the target object, default values ​​can be set for the initial position and initial state of the preset motion model according to actual needs.

[0115] Exemplarily, the initial position and initial state of the preset motion model may be set directly according to the position sub-data and the orientation sub-data included in the first trajectory point data, so that the preset motion model remains stationary under the first trajectory point data.

[0116] It should also be noted that, in actual applications, according to the needs of generating the target motion animation, the initial position and initial orientation corresponding to the preset motion model under the ith trajectory point data can be determined according to the ith trajectory point data in the trajectory point cache data, and the embodiments of the present disclosure do not limit this.

[0117] For example, in the generated target motion animation, the trajectory path Lane of the preset motion model motion may be:

[0118] Lane=[pos itionmesh, positionioncache];

[0119] Wherein, positionmesh is the initial position corresponding to the preset motion model, and positioncache is the target position under the i-th trajectory point data. Wherein, positionmesh and positioncache can both be position data composed of longitude and latitude.

[0120] In the generated target motion animation, the trajectory direction of the preset motion model can be:

[0121] Heading=[headingmesh, headingcache];

[0122] headingmesh is the initial orientation corresponding to the preset motion model, and headingcache is the target orientation under the i-th trajectory point data.

[0123] Therefore, if the interpolated trajectory point cache sequence contains N trajectory point data, the corresponding target motion animation can be generated for each trajectory point data in turn.

[0124] That is, the model moves along the trajectory path and trajectory direction corresponding to a certain trajectory point data, and after generating the target motion animation corresponding to the trajectory point data, it immediately calls the next trajectory point data, thereby moving along the trajectory path corresponding to the next trajectory point data, and generating the target motion animation corresponding to the next trajectory point data.

[0125] It should be noted that after generating the target motion animation corresponding to the trajectory point data, the trajectory point data can be deleted from the trajectory point cache sequence, so that when there is no trajectory point data in the trajectory point cache sequence, the animation instance corresponding to the model can be cleared to release space.

[0126] In the motion animation generation method provided in the embodiment of the present disclosure, a target motion animation corresponding to each trajectory point data in the interpolated trajectory point cache sequence is generated in turn in a recursive manner, thereby improving the accuracy and comprehensiveness of the generated motion animation.

[0127] In an optional implementation, the inventors found that due to the time loss of reporting the current position data and the time loss of the user device during the model rendering process, the generated motion animation lacks synchronization with the actual motion of the target object. Therefore, the synchronization between the motion animation and the actual motion of the target object can be improved by shortening the interval duration of the trajectory point data in the trajectory point cache sequence.

[0128] Correspondingly, before running the preset motion model for the i-th trajectory point data according to the target position, target orientation and the interval duration contained in the i-th trajectory point data, it also includes: determining the number of trajectory point data contained in the trajectory point cache sequence; when the number of trajectory point data is greater than a preset number threshold, updating the interval duration contained in all trajectory point data according to a preset reduction threshold, so that the interval duration contained in the updated trajectory point data is shortened.

[0129] The number of trajectory point data included in the trajectory point cache sequence may be the number of all trajectory point data included in the trajectory point cache sequence, or may be the number of all non-interpolation trajectory point data included in the trajectory point cache sequence, which is not limited in the embodiment of the present disclosure.

[0130] The preset quantity threshold is a threshold value used to measure the quantity of trajectory point data. Its specific data value can be adaptively set according to actual needs, and the embodiment of the present disclosure does not limit this.

[0131] It should be noted that, when the number of trajectory point data contained in the trajectory point cache sequence is the number of all trajectory point data contained in the trajectory point cache sequence, the preset number threshold is used to measure the number of all trajectory point data. For example, the preset number threshold can be set to 5 at this time.

[0132] When the number of trajectory point data contained in the trajectory point cache sequence is the number of all non-interpolation trajectory point data contained in the trajectory point cache sequence, the preset number threshold is used to measure the number of all non-interpolation trajectory point data. For example, the preset number threshold can be set to 2 at this time.

[0133] Therefore, when the number of trajectory point data is greater than the preset number threshold, it indicates that there are more trajectory point data for generating motion animation in the trajectory point cache sequence, that is, the synchronization between the motion animation and the real motion of the target object is poor.

[0134] Therefore, the interval durations included in all the track point data may be updated according to the preset reduction threshold, so that the interval durations included in the updated track point data are shortened.

[0135] Among them, all trajectory point data are all trajectory point data contained in the interpolated trajectory point cache sequence.

[0136] The preset reduction threshold refers to threshold data used to reduce the interval duration included in the trajectory point data. Specifically, it can be a preset reduction ratio or a preset reduction value.

[0137] Therefore, when the interval durations included in all the track point data are updated according to the preset reduction threshold, the interval durations included in all the track point data can be shortened according to the preset reduction ratio or the preset reduction value.

[0138] In an embodiment of the present disclosure, when the number of trajectory point data contained in the trajectory point cache sequence is greater than a preset threshold, the interval duration contained in each trajectory point data is reduced by a large multiple, thereby speeding up the generated motion animation and reducing the delay caused by rendering, so as to improve the synchronization between the generated motion animation and the actual motion of the target object.

[0139] In an optional implementation, in order to improve the generation effect of interpolation trajectory point data, the first data mapping relationship between interval duration and position sub-data and the second data mapping relationship between interval duration and orientation sub-data can be determined according to a preset interpolation strategy, thereby generating interpolation trajectory point data according to the determined data mapping relationship.

[0140] Correspondingly, the interpolation trajectory point data includes interpolation interval duration, interpolation position sub-data and interpolation direction sub-data, and then according to the preset interpolation strategy, the interpolation trajectory point data corresponding to the current trajectory point data is generated, including: according to the preset interpolation strategy, respectively determining the first data mapping relationship between the interval duration and the position sub-data and the second data mapping relationship between the interval duration and the direction sub-data; determining the interpolation number of the interpolation trajectory point data to be generated, and generating the interpolation interval duration contained in the interpolation trajectory point data according to the interpolation number and the interval duration contained in the current trajectory point data; generating the interpolation position sub-data contained in the interpolation trajectory point data according to the interpolation interval duration and the first data mapping relationship; generating the interpolation direction sub-data contained in the interpolation trajectory point data according to the interpolation interval duration and the second data mapping relationship.

[0141] The interpolation interval duration is used to characterize the time required for the target object to move from a trajectory point of the previous trajectory point data to a trajectory point of the interpolation trajectory point data.

[0142] The interpolated position sub-data is the historical motion position of the generated target object, which is not the motion position actually monitored, but the generated virtual position sub-data. The interpolated orientation sub-data is the historical motion orientation of the generated target object, which is not the motion orientation actually monitored, but the generated virtual orientation sub-data.

[0143] The first data mapping relationship between the interval duration and the position sub-data is used to characterize the correspondence between the interval duration set and the position sub-data set, that is, for a certain interval duration, its corresponding position sub-data can be determined through the first data mapping relationship.

[0144] The second data mapping relationship between the interval duration and the direction sub-data is used to characterize the correspondence between the interval duration set and the direction sub-data set, that is, for a certain interval duration, its corresponding direction sub-data can be determined through the second data mapping relationship.

[0145] Specifically, the first data mapping relationship and the second data mapping relationship may be determined by selecting target trajectory point data and following a preset interpolation strategy.

[0146] It should be noted that, in the case of different preset interpolation strategies, the number of target trajectory point data required may be different, and the determined data mapping relationship may also be different.

[0147] For example, in the case of a linear interpolation strategy, the current track point data and the previous track point data of the current track point data can be used as the target track point data. If the previous track point data does not exist, the previous track point data can be generated according to a preset default value.

[0148] Under the linear interpolation strategy, the generated first data mapping relationship and the second data mapping relationship are both linear relationships.

[0149] In the case of the spline interpolation strategy, the current trajectory point data and the previous N trajectory point data of the current trajectory point data can be used as the target trajectory point data. It uses a polynomial function between adjacent trajectory point data to approximate the shape of the data, thereby generating a continuous and smooth curve. Therefore, under the spline interpolation strategy, the generated first data mapping relationship and second data mapping relationship are both nonlinear relationships.

[0150] Therefore, in practical applications, the corresponding preset interpolation strategy can be selected according to actual needs to improve the generation accuracy of the interpolation trajectory point data.

[0151] Among them, when determining the interpolation quantity of the interpolation trajectory point data to be generated, the corresponding quantity value can be set according to actual needs, and the embodiment of the present disclosure does not limit this.

[0152] Correspondingly, when generating the interpolation interval duration contained in the interpolation trajectory point data based on the interpolation number and the interval duration contained in the current trajectory point data, the interpolation interval duration of the interpolation number can be uniformly selected within the interval duration in a uniformly distributed manner, or the interpolation interval duration of the interpolation number can be randomly selected within the interval duration in a randomly selected manner. The embodiments of the present disclosure do not impose any restrictions on this.

[0153] For example, if the interval duration of the current trajectory point data is 21ms, and the number of interpolation trajectory point data to be generated is 2, the interpolation interval duration can be selected as 7ms or 14ms by uniform distribution within 21ms, or the interpolation interval duration can be randomly selected as 3ms or 10ms within 21ms.

[0154] Therefore, after generating the interpolation interval duration, the interpolation position sub-data included in the interpolation trajectory point data can be generated according to the first data mapping relationship, and the interpolation direction sub-data included in the interpolation trajectory point data can be generated according to the second data mapping relationship.

[0155] It should be noted that since the interpolation interval duration is the time interval corresponding to the interpolation trajectory point data and its previous trajectory point data, and the data mapping relationship is determined based on the target interpolation trajectory point data, when generating the interpolation position sub-data and the interpolation direction sub-data, it is necessary to convert the interpolation interval duration into the interval duration corresponding to the first target interpolation trajectory data point data, so as to generate the interpolation position sub-data and the interpolation direction sub-data based on the interval duration.

[0156] For example, when a linear interpolation strategy is adopted, the current trajectory point data and the previous trajectory point data of the current trajectory point data are used as the target trajectory point data, so that the data mapping relationship is determined according to the target trajectory point data.

[0157] For example, the second data mapping relationship can be y=y0+x*(y1-y0) / x1, wherein x1 is the interval duration contained in the current trajectory point data, y1 is the orientation sub-data contained in the current trajectory point data, y0 is the orientation sub-data contained in the previous trajectory point data of the current trajectory point data, y is the orientation sub-data contained in the interpolation trajectory point data to be generated, and x is the interval duration corresponding to the interpolation trajectory point data to be generated and the previous trajectory point data of the current trajectory point data, that is, the first target interpolation trajectory point data.

[0158] For example, for the current trajectory point data, the interpolation interval of the generated interpolation trajectory point data A1 is 3ms, and the interpolation interval of the generated interpolation trajectory point data A2 is 7ms. Then the interval duration corresponding to the previous trajectory point data of the current trajectory point data is 3ms, and the interval duration corresponding to the previous trajectory point data of the current trajectory point data is 3ms+7ms=10ms.

[0159] It should also be noted that after the interpolation trajectory point data is generated, the interval duration contained in the current trajectory point data in the trajectory point cache sequence needs to be adjusted, that is, the interval duration is adjusted to the interval duration corresponding to the previous interpolation trajectory point data.

[0160] For example, the original interval duration of the current trajectory point data is 20ms. Since the interpolated trajectory point data A3 with an interval duration of 5ms and the interpolated trajectory point data A4 with an interval duration of 6ms are inserted between the previous trajectory point data and the current trajectory point data, the interval duration of the current trajectory point data needs to be adjusted from 20ms to 20-5-6=9ms. Thus, the interpolated trajectory point cache sequence is finally obtained.

[0161] In an optional implementation, the inventor found that when the target object, such as a car or a person, is in a stationary or slow state, the corresponding position data is basically the same as the original position data. At this time, if the trajectory point data is still generated based on the position data, and interpolation calculations and model rendering are performed, on the one hand, when there are many models, the computing resources of low-end devices will be significantly slow, and on the other hand, when the model is rendered, there will be problems such as jitter and shaking of the model. Therefore, in order to reduce the computing pressure and rendering pressure brought by generating motion animations, the position data corresponding to the monitored position movement distance will be added to the trajectory point cache sequence only when it meets the preset distance threshold.

[0162] Correspondingly, before adding the current trajectory point data to the trajectory point cache sequence corresponding to the target object, it also includes: calculating the position movement distance corresponding to the current position data based on the current position data and the historical position data corresponding to the target object; when the position movement distance meets the preset distance threshold, adding the current trajectory point data to the trajectory point cache sequence corresponding to the target object.

[0163] The historical location data corresponding to the target object refers to the previous current location data of the target object received before the current location data.

[0164] Specifically, by calculating the data distance between the current position data and the historical position data, the position movement distance of the current position data compared to the historical position data can be obtained.

[0165] For example, the position movement distance corresponding to the current position data may be obtained by calculating the Euclidean distance between the current position data and the historical position data.

[0166] The preset distance threshold refers to a preset threshold value data for evaluating the distance of position movement, and its specific value can be adaptively set according to actual applications. For example, it can be set to 2 cm.

[0167] Therefore, when the position movement distance meets the preset distance threshold, it indicates that the target object has moved significantly. At this time, the current trajectory point data can be added to the trajectory point cache sequence corresponding to the target object.

[0168] In the disclosed embodiment, a preset distance threshold is set so that the received current position data will be screened and compared first, and the current trajectory point data that is too close will not be added to the trajectory point cache sequence, and thus will not be included in the calculation process of the model movement, thereby effectively reducing the calculation pressure of the client CPU and the rendering pressure of the GPU.

[0169] In an optional implementation, the inventors found that there may be inconsistencies between the orientation sub-data included in different trajectory point data, so that accurate interpolation orientation sub-data cannot be generated, causing the preset motion model to rotate in the opposite direction during motion rendering, resulting in obvious weird behavior. Therefore, in order to improve the accuracy of generating interpolation orientation sub-data, it is necessary to standardize the orientation sub-data included in the trajectory point data in the trajectory point cache sequence according to a preset angle range.

[0170] Correspondingly, before generating the interpolation trajectory point data according to the preset interpolation strategy, it also includes: when the orientation sub-data included in any trajectory point data in the trajectory point cache sequence does not belong to the preset angle range, the orientation sub-data included in any trajectory point data is updated so that the orientation sub-data included in any trajectory point data after the update is converted to within the preset angle range.

[0171] The preset angle range may be an angle range of [0°, 360°]. Thus, the orientation sub-data included in the trajectory point data in the trajectory point cache sequence is updated through the preset angle range to avoid the situation where the positive and negative inconsistency between adjacent trajectory point data or the angle difference between the two is more than 180 degrees.

[0172] For ease of understanding, the following uses an example to describe the technical implementation details in the above embodiment:

[0173] In the existing model motion animation generation method, the generation effect mainly depends on the detail of the model trajectory and the push frequency. In the current common PC software, data is pushed about once every 10ms. Under normal circumstances, the push frequency is about once every 17ms, because the computer's 60-frame frequency per second is an ideal state for users, and the screen animation will be smoother without freezes or jumps. At this time, the time of one frame is 17ms.

[0174] Moreover, in the relevant model motion animation generation method, the data will be encrypted and cached on the vehicle side. At this time, the delay and smoothness of the screen animation relative to the actual vehicle movement will be more realistic.

[0175] In the relevant motion animation generation method, it is directly based on the pushed data points to locate the model to the specified position and complete the model rotation. If the push frequency can be kept consistent with the PC side, there will be a better motion animation generation effect, but the performance of the PC side is much higher than that of the Web side. On the Web side, the data push frequency is currently between 50ms and 200ms, and the frequency will change with network fluctuations, and in most scenarios there is a certain delay. Therefore, the limitations of the Web side limit high-speed data push. On this basis, the inventors found that in the current motion animation generation method, there are the following problems:

[0176] (1) When the network fluctuation is large and the position data is evenly distributed, it will seriously affect the fluidity and smoothness of the vehicle model movement, resulting in severe flickering and freezing behavior;

[0177] (2) When the network fluctuation is stable and the position data is unevenly distributed, the vehicle model movement will be relatively stable, but there will be obvious phenomena such as sudden advance, deceleration, and stop at the route nodes, and the smoothness will be destroyed;

[0178] (3) When the network fluctuation is stable and the position data is unevenly distributed, the smoothness and fluency of the vehicle model are extremely poor;

[0179] (4) Only when the network fluctuation is stable and the location data is evenly distributed, the vehicle model can have good smoothness and fluency, and the visualization effect is better.

[0180] As can be seen from the above, the existing motion animation generation method can only achieve good generation results under the premise of a good network environment and uniform position data intervals. However, the network environment is an uncontrollable factor. In addition, if the data interval is processed too much, it will also affect the real-time display of the vehicle.

[0181] Therefore, how to ensure the smoothness of the generated model motion animation and maintain good synchronization with the real vehicle is the core problem that needs to be solved at present.

[0182] In order to solve the above problems, this example proposes a motion animation generation method. Figure 3 A schematic diagram showing a motion animation generation method is shown, referring to Figure 3 , the method comprising:

[0183] Step S301: receiving current position data obtained by monitoring a target object.

[0184] Among them, data communication between the client and the server can be achieved through websocket, so as to receive the location data of target objects such as vehicles and pedestrians obtained by OBU and RSU sensors.

[0185] Specifically, the current location data can be pushed at a fixed frequency after being processed by edge cloud computing, server storage and service applications. The websocket long connection is maintained by default to ensure real-time reception of data transmission.

[0186] It should be noted that, in addition to receiving the current position data, basic environment data, perceived object space data, etc. may also be received according to the needs of motion animation generation, and the embodiments of the present disclosure do not limit this.

[0187] Among them, the basic environmental data can be range data of preset areas, high-precision road data, building shape data, water systems, green spaces and other series of basic range and thematic element data.

[0188] Step S302: Calculate the position movement distance corresponding to the current position data according to the current position data and the historical position data corresponding to the target object.

[0189] Specifically, the position movement distance corresponding to the current position data can be obtained by calculating the Euclidean distance between the current position data and the historical position data, such as:

[0190]

[0191] Among them, Dis line is the Euclidean distance between the current location data and the historical location data, P1x and P2x are the longitudes contained in the current location data and the historical location data, and P1y and P2y are the latitudes contained in the current location data and the historical location data.

[0192] Step S303: When the position moving distance meets the preset distance threshold, the time interval between the current reporting time corresponding to the current position data and the historical reporting time corresponding to the historical position data of the target object is calculated to obtain the interval duration corresponding to the current position data.

[0193] The interval duration corresponding to the current location data can be calculated using the following formula:

[0194] time 间隔时长 =time 数据当前上报时间 -time 数据历史上报时间 ;

[0195] Among them, time 间隔时长 is the movement time of the model from the trajectory point corresponding to the historical position data to the trajectory point corresponding to the current position data, time 数据当前上报时间 It is the time attribute when websocket pushes the current location data. 数据历史上报时间 It is the time attribute when websocket pushes historical location data.

[0196] Step S304: Generate current track point data according to the position sub-data, the orientation sub-data and the interval duration corresponding to the current position data contained in the current position data, and add the current track point data to the track point cache sequence corresponding to the target object.

[0197] Step S305: according to a preset interpolation strategy, generate interpolated trajectory point data corresponding to the current trajectory point data, insert the interpolated trajectory point data into the trajectory point cache sequence, and obtain the interpolated trajectory point cache sequence.

[0198] Among them, the model motion animation is not smooth mainly due to the uneven density of the model motion trajectory data points and the small number of inflection points caused by multiple reasons such as OBU, RSU device perception, network fluctuations, and server-side data processing. Therefore, in the embodiment of the present disclosure, the trajectory point data in the trajectory point cache sequence is mainly interpolated.

[0199] It should be noted that the above-mentioned data caching and interpolation processing operations can all be performed by the animation controller. Figure 4 This is a schematic diagram of the animation controller application. Figure 4 :

[0200] The animation controller can be used to perform data caching and interpolation processing, wherein the cached data is position sub-data, orientation sub-data and interval duration. Interpolation processing can be used to generate interpolation trajectory point data, namely, interpolation position sub-data, interpolation orientation sub-data and interpolation interval duration (not shown in the figure).

[0201] The preset interpolation strategy may include:

[0202] (1) Linear interpolation strategy

[0203] Linear interpolation is a simple and intuitive interpolation method that estimates the values ​​of other points between two known data points through the linear relationship between the two points, for example:

[0204] y=y0+(y1-y0) / (x-x0)*(x1-x0);

[0205] Where (x0, y0), (x1, y1) are known points, and x and y are the x and y positions that need to be interpolated.

[0206] (2) Bezier curve interpolation strategy

[0207] Bezier curve interpolation generates a smooth curve through a set of control points. These control points determine the shape of the curve, such as:

[0208] B(t)=(1-t)*P0+t*Pi;

[0209] Where P0 and Pi are two control points and t is a parameter (0≤t≤1).

[0210] (3) Spline interpolation strategy

[0211] Spline interpolation is a commonly used interpolation method, especially suitable for curve fitting and smoothing data. It approximates the shape of the data by using a polynomial function between adjacent data points, thereby generating a continuous and smooth curve.

[0212] In the scenario based on vehicle-road collaboration, taking into account real-time performance, spline interpolation requires multiple adjacent data points for fitting, and its real-time performance is poor; Bezier curve interpolation has a good effect on fitting curves, but it is more complicated to select curvature control points. Therefore, the performance of trajectory points of real-time perceived elements may not meet expectations, and a large number of overfitting problems may occur; linear interpolation performs better than the first two. Since the websocket push point frequency is 200ms, it has a relatively good data density even in curved motion.

[0213] Therefore, in the vehicle-road collaboration scenario, the linear interpolation strategy can be selected as the preset interpolation strategy.

[0214] Specifically, in the case of generating model motion animation based on ThreeJS (a three-dimensional graphics library), since the library that integrates linear interpolation and ThreeJS better is the TweenJS library (an animation library for creating and controlling animations), this library can complete the simultaneous interpolation calculation of position sub-data and orientation sub-data according to the interval duration. Therefore, the technical solution of the embodiment of the present disclosure can be implemented based on TweenJS+ThreeJS.

[0215] Step S306: Determine the number of trajectory point data included in the trajectory point cache sequence.

[0216] Step S307: when the number of track point data is greater than a preset number threshold, the interval durations contained in all track point data are updated according to a preset reduction threshold, so that the interval durations contained in the updated track point data are shortened.

[0217] It should be noted that logical judgment is added in the embodiment of the present disclosure, that is, when the number of trajectory point data is greater than a preset threshold value, such as 2, the interval duration contained in each trajectory point data is reduced by a large multiple, thereby speeding up the animation of the perceived object and reducing the delay caused by rendering, ultimately achieving synchronization between the animation and the real perceived object.

[0218] Step S308: for the i-th trajectory point data in the interpolated trajectory point cache sequence, determine the target position and target orientation of the preset motion model corresponding to the i-th trajectory point data according to the position sub-data and orientation sub-data contained in the i-th trajectory point data.

[0219] Wherein, in the case of multiple target objects, motion animation instances can be created for preset motion model sub-models corresponding to different target objects. The animation instance is created based on the position sub-data, orientation sub-data, and interval duration contained in the trajectory point data.

[0220] The interval duration is obtained by calculating the time interval between the last websocket push of the target object's current location data and this time, and the location sub-data and orientation sub-data are obtained through service agreement.

[0221] Step S309: For the i-th trajectory point data, run the preset motion model according to the target position, target orientation and interval duration contained in the i-th trajectory point data, and generate a target motion animation from the initial position and initial orientation corresponding to the preset motion model to the target position and target orientation.

[0222] Among them, the ThreeJS API can be used to achieve motion rendering of the preset motion model, that is, the position and heading of the preset motion model are updated according to the target position and target heading, and the motion duration is set to the interval duration to achieve the change and rotation of the model position.

[0223] Wherein, in a recursive manner, after each time the model moves to the trajectory point corresponding to the trajectory point data, it is listened to whether there is the next trajectory point data, if there is the next trajectory point data, the movement continues, otherwise the movement animation instance is cleared.

[0224] In the embodiment of the present disclosure, OBU, RSU sensors and 5G communication technology are used as the basis, combined with edge cloud and server cluster to support the data acquisition and transmission of the target object, based on ThreeJS and TweenJS, motion animation is generated on the Web side, and the embodiment of the present disclosure takes the position data transmitted by the server as the benchmark, and does not offset or change the data. It is based on the theoretical ideas of caches and listeners and preset interpolation strategies to achieve the purpose of improving the fluency and smoothness of the model motion animation.

[0225] The step division of the above methods is only for the purpose of clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the scope of protection of this patent.

[0226] In a second aspect, an embodiment of the present disclosure provides a motion animation generating device. Figure 5 A block diagram of a motion animation generating device provided by an embodiment of the present disclosure, referring to Figure 5 , the device comprises:

[0227] A receiving module 51 is used to receive current position data obtained by monitoring the target object;

[0228] A construction module 52 is used to generate current track point data corresponding to the current position data, and add the current track point data to a track point cache sequence corresponding to the target object;

[0229] An inserting module 53, configured to generate interpolated trajectory point data corresponding to the current trajectory point data according to a preset interpolation strategy, and insert the interpolated trajectory point data into the trajectory point cache sequence to obtain an interpolated trajectory point cache sequence;

[0230] The generating module 54 is used to run the preset motion model corresponding to the target object according to the interpolated trajectory point cache sequence to generate the motion animation corresponding to the target object.

[0231] In an optional implementation, the current position data includes: position sub-data and orientation sub-data; then generating current track point data corresponding to the current position data includes:

[0232] Calculate the time interval between the current reporting time corresponding to the current location data and the historical reporting time corresponding to the historical location data of the target object to obtain the interval duration corresponding to the current location data;

[0233] The current track point data is generated according to the position sub-data, the orientation sub-data and the interval duration corresponding to the current position data.

[0234] In an optional implementation, running a preset motion model corresponding to the target object according to the interpolated trajectory point cache sequence to generate a motion animation corresponding to the target object includes:

[0235] For the i-th trajectory point data in the interpolated trajectory point cache sequence, determine the target position and target orientation of the preset motion model corresponding to the i-th trajectory point data according to the position sub-data and orientation sub-data contained in the i-th trajectory point data;

[0236] For the i-th trajectory point data, according to the target position, target orientation and the interval duration contained in the i-th trajectory point data, the preset motion model is run to generate a target motion animation from the initial position and initial orientation corresponding to the preset motion model to the target position and the target orientation;

[0237] Among them, the initial position and initial orientation corresponding to the preset motion model are determined according to the i-1th trajectory point data in the trajectory point cache data; the motion time corresponding to the target motion animation is the interval duration; and i is a natural number.

[0238] In an optional implementation, before running the preset motion model for the i-th trajectory point data according to the target position, target orientation, and the interval duration included in the i-th trajectory point data, the device is further used to:

[0239] Determining the number of trajectory point data included in the trajectory point cache sequence;

[0240] When the number of the track point data is greater than a preset number threshold, the interval durations contained in all the track point data are updated according to the preset reduction threshold, so that the interval durations contained in the updated track point data are shortened.

[0241] In an optional implementation, the interpolation trajectory point data includes interpolation interval duration, interpolation position sub-data, and interpolation direction sub-data, and the interpolation trajectory point data corresponding to the current trajectory point data is generated according to a preset interpolation strategy, including:

[0242] According to the preset interpolation strategy, respectively determine a first data mapping relationship between the interval duration and the position sub-data and a second data mapping relationship between the interval duration and the orientation sub-data;

[0243] Determining the interpolation quantity of the interpolation trajectory point data to be generated, and generating the interpolation interval duration included in the interpolation trajectory point data according to the interpolation quantity and the interval duration included in the current trajectory point data;

[0244] Generate interpolation position sub-data included in the interpolation trajectory point data according to the interpolation interval duration and the first data mapping relationship;

[0245] According to the interpolation interval duration and the second data mapping relationship, interpolation direction sub-data included in the interpolation trajectory point data is generated.

[0246] In an optional implementation manner, before adding the current trajectory point data to the trajectory point cache sequence corresponding to the target object, the device is further configured to:

[0247] Calculating a position movement distance corresponding to the current position data according to the current position data and the historical position data corresponding to the target object;

[0248] When the position moving distance meets a preset distance threshold, the current track point data is added to a track point cache sequence corresponding to the target object.

[0249] In an optional implementation, before generating interpolation trajectory point data according to a preset interpolation strategy, the method further includes:

[0250] When the orientation sub-data included in any trajectory point data in the trajectory point cache sequence does not belong to the preset angle range, the orientation sub-data included in the any trajectory point data is updated so that the orientation sub-data included in the any trajectory point data after the update is converted to be within the preset angle range.

[0251] The functions or modules included in the device provided in the embodiments of the present disclosure can be used to execute the method described in the first aspect of the method embodiment above. Its specific implementation and technical effects can be referred to the description of the method embodiment above. For the sake of brevity, they will not be repeated here.

[0252] It should be noted that all modules involved in this embodiment are logic modules. In practical applications, a logic unit may be a physical unit, or a part of a physical unit, or may be implemented as a combination of multiple physical units. In addition, in order to highlight the innovative part of the present disclosure, this embodiment does not introduce units that are not closely related to solving the technical problems proposed by the present disclosure, but this does not mean that there are no other units in this embodiment.

[0253] Reference Figure 6 , an embodiment of the present disclosure provides an electronic device, comprising:

[0254] One or more processors 601;

[0255] A memory 602, on which one or more programs are stored, when the one or more programs are executed by one or more processors, the one or more processors implement any one of the above motion animation generation methods;

[0256] One or more I / O interfaces 603 are connected between the processor and the memory and are configured to implement information exchange between the processor and the memory.

[0257] Among them, the processor 601 is a device with data processing capabilities, including but not limited to a central processing unit (CPU); the memory 602 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH); the I / O interface (read-write interface) 603 is connected between the processor 601 and the memory 602, and can realize information interaction between the processor 601 and the memory 602, including but not limited to a data bus (Bus), etc.

[0258] In some embodiments, the processor 601 , the memory 602 , and the I / O interface 603 are connected to each other through a bus, and further connected to other components of the computing device.

[0259] This embodiment also provides a computer-readable medium on which a computer program is stored. When the program is executed by a processor, the motion animation generation method provided in this embodiment is implemented. To avoid repeated description, the specific steps of the motion animation generation method are not repeated here.

[0260] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the above invented methods can be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0261] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0262] Those skilled in the art will appreciate that although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features from different embodiments is meant to be within the scope of the present embodiment and to form different embodiments.

[0263] It is to be understood that the above embodiments are merely exemplary embodiments used to illustrate the principles of the present disclosure, but the present disclosure is not limited thereto. For those of ordinary skill in the art, various modifications and improvements can be made without departing from the spirit and substance of the present disclosure, and these modifications and improvements are also considered to be within the scope of protection of the present disclosure.

Claims

1. A motion animation generation method, characterized in that: The method comprises: Receiving current location data obtained by monitoring the target object; Generate current track point data corresponding to the current position data, and add the current track point data to a track point cache sequence corresponding to the target object; According to a preset interpolation strategy, interpolation trajectory point data corresponding to the current trajectory point data is generated, and the interpolation trajectory point data is inserted into the trajectory point cache sequence to obtain an interpolated trajectory point cache sequence; The preset motion model corresponding to the target object is run according to the interpolated trajectory point cache sequence to generate a motion animation corresponding to the target object.

2. The motion animation generation method according to claim 1, characterized in that: The current position data includes: position sub-data and orientation sub-data; then generating the current track point data corresponding to the current position data includes: Calculate the time interval between the current reporting time corresponding to the current location data and the historical reporting time corresponding to the historical location data of the target object to obtain the interval duration corresponding to the current location data; The current track point data is generated according to the position sub-data, the orientation sub-data and the interval duration corresponding to the current position data.

3. The motion animation generation method according to claim 2, characterized in that: The step of running the preset motion model corresponding to the target object according to the interpolated trajectory point cache sequence to generate the motion animation corresponding to the target object includes: For the i-th trajectory point data in the interpolated trajectory point cache sequence, determine the target position and target orientation of the preset motion model corresponding to the i-th trajectory point data according to the position sub-data and orientation sub-data contained in the i-th trajectory point data; For the i-th trajectory point data, according to the target position, target orientation and the interval duration contained in the i-th trajectory point data, the preset motion model is run to generate a target motion animation from the initial position and initial orientation corresponding to the preset motion model to the target position and the target orientation; Among them, the initial position and initial orientation corresponding to the preset motion model are determined according to the i-1th trajectory point data in the trajectory point cache data; the motion time corresponding to the target motion animation is the interval duration; and i is a natural number.

4. The motion animation generation method according to claim 3, characterized in that: Before running the preset motion model for the i-th trajectory point data according to the target position, target orientation, and the interval duration included in the i-th trajectory point data, the method further includes: Determining the number of trajectory point data included in the trajectory point cache sequence; When the number of the track point data is greater than a preset number threshold, the interval durations contained in all the track point data are updated according to the preset reduction threshold, so that the interval durations contained in the updated track point data are shortened.

5. The motion animation generation method according to claim 2, characterized in that: The interpolation trajectory point data includes interpolation interval duration, interpolation position sub-data, and interpolation direction sub-data. Then, generating interpolation trajectory point data corresponding to the current trajectory point data according to a preset interpolation strategy includes: According to the preset interpolation strategy, respectively determine a first data mapping relationship between the interval duration and the position sub-data and a second data mapping relationship between the interval duration and the orientation sub-data; Determining the interpolation quantity of the interpolation trajectory point data to be generated, and generating the interpolation interval duration included in the interpolation trajectory point data according to the interpolation quantity and the interval duration included in the current trajectory point data; Generate interpolation position sub-data included in the interpolation trajectory point data according to the interpolation interval duration and the first data mapping relationship; According to the interpolation interval duration and the second data mapping relationship, interpolation direction sub-data included in the interpolation trajectory point data is generated.

6. The motion animation generation method according to any one of claims 1 to 5, characterized in that: Before adding the current track point data to the track point cache sequence corresponding to the target object, the method further includes: Calculating a position movement distance corresponding to the current position data according to the current position data and the historical position data corresponding to the target object; When the position moving distance meets a preset distance threshold, the current track point data is added to a track point cache sequence corresponding to the target object.

7. The motion animation generation method according to any one of claims 2 to 5, characterized in that: Before generating interpolation trajectory point data according to a preset interpolation strategy, the method further includes: When the orientation sub-data included in any trajectory point data in the trajectory point cache sequence does not belong to the preset angle range, the orientation sub-data included in the any trajectory point data is updated so that the orientation sub-data included in the any trajectory point data after the update is converted to be within the preset angle range.

8. A motion animation generating device, characterized in that: The device comprises: A receiving module, used for receiving current position data obtained by monitoring the target object; A construction module, configured to generate current track point data corresponding to the current position data, and add the current track point data to a track point cache sequence corresponding to the target object; An insertion module, configured to generate interpolated trajectory point data corresponding to the current trajectory point data according to a preset interpolation strategy, and insert the interpolated trajectory point data into the trajectory point cache sequence to obtain an interpolated trajectory point cache sequence; A generation module is used to run a preset motion model corresponding to the target object according to the interpolated trajectory point cache sequence to generate a motion animation corresponding to the target object.

9. An electronic device, characterized in that: include: one or more processors; A storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7; One or more I / O interfaces are connected between the processor and the memory and are configured to implement information interaction between the processor and the memory.

10. A computer readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method according to any one of claims 1 to 7.