CN117688113A - Method and device for determining motion trail curve, storage medium and electronic equipment - Google Patents

Method and device for determining motion trail curve, storage medium and electronic equipment Download PDF

Info

Publication number
CN117688113A
CN117688113A CN202311688319.3A CN202311688319A CN117688113A CN 117688113 A CN117688113 A CN 117688113A CN 202311688319 A CN202311688319 A CN 202311688319A CN 117688113 A CN117688113 A CN 117688113A
Authority
CN
China
Prior art keywords
target
motion
data packet
moving object
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311688319.3A
Other languages
Chinese (zh)
Inventor
陶文晖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202311688319.3A priority Critical patent/CN117688113A/en
Publication of CN117688113A publication Critical patent/CN117688113A/en
Pending legal-status Critical Current

Links

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The disclosure provides a method and a device for determining a motion trail curve, a computer storage medium and electronic equipment, and relates to the technical field of computers. The method for determining the motion trail curve comprises the following steps: determining an interpolation function table of the target moving object based on a target moving track model which is received at a historical moment and is constructed by a mathematical model aiming at a moving data packet of the target moving object; acquiring a current data packet obtained by aiming at an actual motion trail of a target moving object; determining a target interpolation function from an interpolation function table based on the current data packet and the previous data packet of the current data packet; and determining the target position of the target moving object at the current client time according to the target interpolation function so as to determine the moving track curve of the target moving object according to the target position and the historical position. The method and the device can enable the motion trail of the moving object to accord with the law of physical motion, and improve the accuracy of the determined motion trail curve.

Description

Method and device for determining motion trail curve, storage medium and electronic equipment
Technical Field
The disclosure relates to the field of computer technology, and in particular, to a method and device for determining a motion trajectory curve, a computer storage medium and electronic equipment.
Background
When a virtual object in the online game moves, a complex motion trail curve is usually generated, and a large amount of data synchronization is necessarily required for expressing the motion trail curve of the virtual object correspondingly and completely, so that the expenditure of game resources is huge. In this regard, a position interpolation algorithm is generally used to smooth the position change of a virtual object in a motion state in a network game, so that an actual motion trajectory curve of the virtual object is restored by using less data.
In related technical schemes, dead Reckoning (Dead Reckoning) and linear interpolation algorithm are generally used for performing approximate restoration of a motion track curve, wherein the interpolation algorithm predicts the position of a virtual object on a server in a future period of time according to information such as position, speed and acceleration contained in a server data packet, and then a continuous smooth jitter-free curve is constructed.
However, the motion track curve restored by the read Reckoning algorithm and the linear interpolation algorithm is suitable for simulating dynamic objects such as players, and has a phenomenon of obviously violating physical rules for the dynamic objects driven by physics, so that the accuracy of the restored motion track curve is low.
Disclosure of Invention
The present disclosure provides a method for determining a motion trajectory curve, a device for determining a motion trajectory curve, a computer storage medium, and an electronic device, so that a motion trajectory of a moving object conforms to a law of physical motion, and accuracy of the determined motion trajectory curve is improved.
In a first aspect, an embodiment of the present disclosure provides a method for determining a motion trajectory curve, including: determining an interpolation function table of the target moving object based on a target moving track model which is received at a historical moment and is constructed by a mathematical model aiming at a moving data packet of the target moving object; acquiring a current data packet obtained by aiming at an actual motion trail of a target moving object; determining a target interpolation function from an interpolation function table based on the current data packet and the previous data packet of the current data packet; and determining the target position of the target moving object at the current client time according to the target interpolation function so as to determine the moving track curve of the target moving object according to the target position and the historical position.
In a second aspect, an embodiment of the present disclosure provides a motion trajectory curve determining device, including: the function table determining module is used for determining an interpolation function table of the target moving object based on a target motion trail model which is received at the historical moment and is constructed by a mathematical model aiming at a motion data packet of the target moving object; the data acquisition module is used for acquiring a current data packet obtained by aiming at the actual motion trail of the target moving object; the piecewise function determining module is used for determining a target interpolation function from the interpolation function table based on the current data packet and the data packet before the current data packet; and the position determining module is used for determining the target position of the target moving object at the current client time according to the target interpolation function so as to determine the movement track curve of the target moving object according to the target position and the historical position.
In a third aspect, an embodiment of the present disclosure provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of determining a motion profile as above.
In a fourth aspect, one embodiment of the present disclosure provides an electronic device, including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the method of determining a motion profile as described above via execution of the executable instructions.
The technical scheme of the present disclosure has the following beneficial effects:
according to the method for determining the motion trail curve, the interpolation function table of the target moving object is determined through the target motion trail model constructed based on the mathematical model of the motion data packet of the target moving object received at the historical moment; acquiring a current data packet obtained by aiming at an actual motion trail of a target moving object; determining a target interpolation function from an interpolation function table based on the current data packet and the previous data packet of the current data packet; and determining the target position of the target moving object at the current client time according to the target interpolation function so as to determine the moving track curve of the target moving object according to the target position and the historical position. According to the method, the actual motion track curve is sampled to obtain the motion data packet for mathematical modeling under the physical rule, so that the mathematical model (target motion track model) is obtained based on the mathematical modeling to generate the interpolation function table, the phenomenon that the physical rule is obviously violated for a physical driven dynamic object in the related technical scheme is avoided, the technical problem that the accuracy of the restored motion track curve is low is solved, and the technical effect of improving the accuracy is achieved. The method can reduce the technical problem of calculation power consumption caused by directly using interpolation function curves to calculate the positions through interpolation function tables to cope with target moving objects in different moving states, so that a customer can obtain a correct moving track curve with less calculation consumption.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure. It will be apparent to those of ordinary skill in the art that the drawings in the following description are merely some embodiments of the present disclosure and that other drawings may be derived from these drawings without undue effort.
Fig. 1 schematically illustrates an effect diagram of a motion trajectory curve of an object corresponding to each position interpolation function in the present exemplary embodiment;
fig. 2 schematically shows a system configuration diagram of a system for determining a motion trajectory curve in the present exemplary embodiment;
fig. 3 schematically shows a flowchart of a method for determining a motion trajectory curve in the present exemplary embodiment;
fig. 4 schematically shows a flowchart of a method for constructing a target motion trajectory model in the present exemplary embodiment;
fig. 5 schematically shows a schematic diagram of determining a plurality of motion parameter components in the present exemplary embodiment;
Fig. 6 schematically illustrates a motion profile effect diagram obtained by a determination method using a motion profile in the present exemplary embodiment;
fig. 7 schematically illustrates a schematic diagram of a determining apparatus for a motion trajectory curve in the present exemplary embodiment;
fig. 8 schematically shows a structural diagram of an electronic device in the present exemplary embodiment.
Detailed Description
Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the present disclosure. However, those skilled in the art will recognize that the aspects of the present disclosure may be practiced with one or more of the specific details, or with other methods, components, devices, steps, etc. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present disclosure.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus a repetitive description thereof will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software or in one or more hardware modules or integrated circuits or in different networks and/or processor devices and/or microcontroller devices.
The flow diagrams depicted in the figures are exemplary only and not necessarily all steps are included. For example, some steps may be decomposed, and some steps may be combined or partially combined, so that the order of actual execution may be changed according to actual situations.
In the related art, when a virtual object (such as a Player-controlled game Character, a Non-Player Character (NPC) or other virtual objects) moves in a network game, a complex motion track curve is usually generated, and a large amount of data synchronization is necessarily required for the corresponding complete expression of the motion track curve of the virtual object, which results in huge expenditure of game resources. For the above technical problems, a position interpolation algorithm is generally used to smooth the position change of the virtual object in the network game, so that a reasonable position is calculated by interpolation using less position data and speed information, so as to compensate the position difference caused by network delay and jitter, and the actual motion trail of the virtual object is restored, so that the movement of the virtual object is approximately presented on the client. However, if the interpolation algorithm is not good, the position and speed change of the virtual object are not smooth, so that the motion trail is not in line with common knowledge, and the game experience of the player is greatly affected.
At present, the following two general position interpolation algorithms are available:
1) Read readout algorithm:
the read reporting algorithm predicts the position of the virtual object on the server in a future period of time according to the information such as position, speed, acceleration, etc. contained in the server data packet. And then comparing the position, the speed, the acceleration and other information of the current client side with the position of the current client side, and predicting a future time period to construct a continuous smooth jitter-free curve.
Specifically, assume that at T 0 At the moment, virtual object A in the client is at P c Position, velocity V c Acceleration is A c The method comprises the steps of carrying out a first treatment on the surface of the When the client receives the data packet of the server, if the virtual object A is located at P on the server s Position, velocity V s Acceleration is A s . The position at time t is calculated as follows:
V t =V c +(V s -V c )*T 01 formula (1)
P t =P t ′+(P t ″-P t ′)*T 01 Formula (4)
In the above formulas (1) to (4), T 0 The time when the client receives the data packet at the server end is referred to as the starting time of interpolation; t (T) 1 The time when the interpolation of the current data packet is finished; t (T) 01 Is the percentage of the interpolation progress, 0 represents the interpolation start, 1 represents the interpolation end; t (T) t The current time represents the time period when interpolation is completed; the speed at time t is V t The position is P t . P in the above formula t ' and P t "is an intermediate variable and has no actual physical meaning.
2) Linear interpolation algorithm:
in this linear interpolation algorithm, the position at time t is calculated using the following formula:
in the above formula (5), T 01 Is the percentage of the interpolation progress, 0 represents the interpolation start, 1 represents the interpolation end; t (T) 0 The time of receiving the data packet at the server end is also the starting time of interpolation; t (T) 0 At the moment, the virtual object A in the client is positioned at P c Position, velocity V c The method comprises the steps of carrying out a first treatment on the surface of the When the client receives the data packet of the server, the virtual object A is positioned at P on the server s Position, velocity V s
In the two existing position interpolation algorithms, in an application scenario, fig. 1 schematically illustrates an effect diagram of a motion track curve of an object corresponding to each position interpolation function in the present exemplary embodiment; as shown in fig. 1, assuming that an object freely falls from a height of 10m, is stationary on the ground after bouncing twice, a data packet curve transmitted by a server, an actual object motion track, a motion track curve generated by using a read Reckoning interpolation algorithm, and a motion track curve generated by using a linear interpolation algorithm are respectively shown in fig. 1. In the motion trajectory curve shown in fig. 1, the abscissa indicates the time corresponding to the client, and the ordinate indicates the height of the target moving object from the ground, and in general, when the ordinate of the target moving object is 0, it indicates that the target moving object is on the ground.
As can be seen from the motion trace curve in fig. 1:
A. the motion trajectory curve for the read pick interpolation algorithm can be as follows: in practical application, a player can see the phenomenon that the object falls below the ground and floats again in a game scene, so that the physical rule is violated. Meanwhile, for the Dead Reckoning interpolation algorithm, for example, the time period from t=3 to t=4, the speed of the object when ascending is obviously lower than the speed of the object when descending can be observed, and the method is also against the physical rule.
In addition, the object can bounce many times, and the actual object only bounces 2 times, but the motion track curve generated based on the read pick-up interpolation algorithm bounces many times, so that a player can observe that the object is difficult to be stationary and stable.
B. The motion trajectory curve for the linear interpolation algorithm can be known: there is a large difference between the slope of the motion trajectory curve of the linear interpolation algorithm and the actual object motion trajectory (e.g., time period t=3 to t=4). And the player can observe that the object suddenly decelerates when falling to the ground, slowly floats in the air and falls, and the real physical effect is also greatly different.
In general, the above-mentioned existing position interpolation algorithm is more suitable for simulating the motion track curve of Dynamic objects (kinetic objects) such as players, but not for simulating the motion track curve of Dynamic objects (Dynamic objects) driven by pure physics, and for virtual objects under the action of physical mechanics, the restored motion track curve has obvious violation of physical rules, thereby affecting the reality of the game experience of players.
In view of the above problems, exemplary embodiments of the present disclosure provide a method for determining a motion trajectory curve, which determines an interpolation function table of a target moving object based on a target motion trajectory model that is constructed by performing mathematical model on a motion data packet of the target moving object received at a historical time; acquiring a current data packet obtained by aiming at an actual motion trail of a target moving object; determining a target interpolation function from an interpolation function table based on the current data packet and the previous data packet of the current data packet; and determining the target position of the target moving object at the current client time according to the target interpolation function so as to determine the moving track curve of the target moving object according to the target position and the historical position.
According to the method, the data packet at the historical moment is used for carrying out mathematical modeling under the laws of physical kinematics and Newton mechanics to obtain the target motion trail model, and then the target piecewise function corresponding to the motion condition of the current target motion object is determined from the interpolation function table when the target motion object is in different motion states. The method not only can better cope with the delay and the jitter of network transmission under the condition of the same less data volume as the traditional position interpolation algorithm, but also can make up for the position difference caused by the network delay, the jitter and the like, thereby restoring the correct motion track curve of the virtual object and further ensuring the realism of the game experience of the player.
In order to solve the above-mentioned problems, the present disclosure proposes a method and apparatus for determining a motion trajectory curve, which can be applied to the system architecture of the exemplary application environment shown in fig. 2.
As shown in fig. 2, the system architecture 200 may include one or more of terminal devices 201, 202, 203, 204 (in the following description, may also be referred to as clients 201, 202, 203, 204), a network 205, and a server 206. The network 105 serves as a medium for providing communication links between the terminal devices 201, 202, 203, 204 and the server 206. The network 205 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others. The terminal devices 201, 202, 203, 204 may be, for example, smart phones, palmtops (Personal Digital Assistant, PDAs), notebooks, servers, desktop computers or any other computing device with networking capabilities, but are not limited thereto.
It should be understood that the number of terminal devices, networks and servers (i.e., servers) in fig. 2 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation. For example, the server 206 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery network (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms.
The method for determining a motion trajectory curve provided in the embodiments of the present disclosure may be executed at the server 206, and accordingly, the device for determining a motion trajectory curve is generally disposed in the server 206. The method for determining the motion trail curve provided by the embodiment of the disclosure can also be executed in the terminal equipment, and correspondingly, the device for determining the motion trail curve can also be arranged in the terminal equipment. The method for determining the motion trail curve provided in the embodiments of the present disclosure may be partially executed in the server 206 and partially executed in the terminal device, and accordingly, a part of modules of the device for determining the motion trail curve may be disposed in the server 206 and a part of modules are disposed in the terminal device.
For example, in one exemplary embodiment, the server 206 may sample the motion data packet based on the actual motion trajectory of the target moving object, so as to send the motion data packet to one or more of the clients 201, 202, 203, 204; after any client receives the motion data packet, mathematical modeling can be performed in advance on the basis of a well-known kinematics law, newton's law and the like to construct a target motion trail model so as to obtain an interpolation function table aiming at a target motion object on the basis of the target motion trail model, wherein the interpolation function table comprises segment functions corresponding to different motion conditions of the target motion object, and the target position of the target motion object at the current client is determined according to the target interpolation function so as to determine a motion trail curve of the target motion object according to the target position and the historical position.
However, it is easy to understand by those skilled in the art that the above application scenario is only for example, and the present exemplary embodiment is not limited thereto.
The following will take the server 206 as an execution subject, and the application of the method for determining the motion trajectory curve to the server 206 will be exemplified. Fig. 3 schematically illustrates a flowchart of a method for determining a motion trajectory curve in the present exemplary embodiment, referring to fig. 3, the method for determining a motion trajectory curve provided by the embodiment of the present disclosure includes the following steps S301 to S303:
Step S301, determining an interpolation function table of the target moving object based on a target moving track model which is received at a historical time and is constructed by a mathematical model aiming at a moving data packet of the target moving object.
Step S302, obtaining a current data packet obtained by aiming at the actual motion trail of the target moving object.
Step S303, determining a target interpolation function from the interpolation function table based on the current data packet and the data packet before the current data packet.
And step S304, determining the target position of the target moving object at the current client time according to the target interpolation function so as to determine the movement track curve of the target moving object according to the target position and the historical position.
In the technical solutions provided in some embodiments of the present disclosure, an interpolation function table of a target moving object is determined by a target motion trajectory model constructed based on a mathematical model of a motion data packet for the target moving object received at a historical moment; acquiring a current data packet obtained by aiming at an actual motion trail of a target moving object; determining a target interpolation function from an interpolation function table based on the current data packet and the previous data packet of the current data packet; and determining the target position of the target moving object at the current client time according to the target interpolation function so as to determine the moving track curve of the target moving object according to the target position and the historical position.
According to the method, the actual motion track curve is sampled to obtain the motion data packet for mathematical modeling under the physical rule, so that the mathematical model (target motion track model) is obtained based on the mathematical modeling to generate the interpolation function table, the phenomenon that the physical rule is obviously violated for a physical driven dynamic object in the related technical scheme is avoided, the technical problem that the accuracy of the restored motion track curve is low is solved, and the technical effect of improving the accuracy is achieved. The method can reduce the technical problem of calculation power consumption caused by directly using interpolation function curves to calculate the positions through interpolation function tables to cope with target moving objects in different moving states, so that a customer can obtain a correct moving track curve with less calculation consumption.
The following describes in detail the implementation of each step in the embodiment shown in fig. 3 with reference to specific embodiments:
in step S301, an interpolation function table of the target moving object is determined based on the target motion trajectory model, which is mathematically modeled for the motion data packet of the target moving object received at the historic time.
The historical moment is any moment when a dynamic object is in any state in a network synchronous environment. Assuming that the client receives the motion data packet from the kth moment sent by the server, the motion data packet from the 0 th moment before the kth moment to the K-1 th moment is the motion data packet received at the historical moment of the client. Any of the above states may be, for example, a motion state, a collision state, or a static state, and the motion state may be a plurality of types of motion states, for example, free falling motion, uniform acceleration motion, or motion after hitting the ground, which is not limited in any way by the embodiments of the present disclosure.
The motion data packet may include a weight of the target moving object, a speed and an acceleration corresponding to a time of collecting the motion data packet, an actual position of the target moving object when the server samples, and the like. The target moving object is any moving object in the game scene, and particularly can be a moving object under pure physical driving. The moving object under the pure physical driving is particularly an object which can be driven by external force to move, for example, the target moving object can be basketball, and can only move under the external force driving of a game character.
It should be understood that the motion state of a moving object under pure physical driving is constrained by the laws of kinematics and newton's mechanics.
It should be further explained that the interpolation function table determined based on the target motion trail model includes piecewise interpolation functions corresponding to different motion conditions of multiple target moving objects. For example, the target moving object at the sampling time is in a completely stationary state, or smoothly transitions from stationary to moving, or jumps from moving to stationary, etc., and embodiments of the present disclosure are not exhaustive herein.
For example, a marking operation may be performed on moving objects in a game scene in determining a target moving object to screen out moving objects among a plurality of virtual objects in the game scene. And determining the actual motion trail of each marked moving object so that the server side sends a motion data packet to the client side.
In some example embodiments of the present disclosure, when a client receives a motion data packet at each historical time, mathematical modeling may be performed based on the motion data packet at each historical time to construct a target motion trajectory model of a target motion object, and further determine an interpolation function table of the target motion object based on the target motion trajectory model.
Prior to performing the above step S301, mathematical modeling is required to construct a target motion trajectory model based on the motion data packets at each history time, and a process of constructing the target motion trajectory model will be exemplarily described with reference to specific embodiments.
In an optional embodiment of the present disclosure, mathematical modeling is performed according to a physical kinematics law and a motion data packet at a historical time, and an initial motion trail model for a target moving object is constructed; and under the condition that the collision times of the target moving object are set to be smaller than the preset collision times, simplifying the initial motion trail model to obtain the target motion trail model.
For example, since the moving object is constrained by the laws of physical motion and newton's mechanics, mathematical modeling can be performed on the basis of the laws of physical motion, newton's mechanics and the motion data packet received by the client under the historic moment to construct a motion track model for the target moving object, so as to ensure that the motion process of the target moving object is performed under the constraint of the laws of physical motion, so as to ensure the accuracy of the motion track curve of the target moving object to be restored later.
In the following, an application scenario of network synchronization will be taken as an example, and a motion track model of an object is constructed by performing mathematical modeling on two typical cases of physical collision and stress free motion for a target motion object driven by physics.
Specifically, the client acquires the motion data packet at the Kth moment, and the current state of the client is similar to the actual motion state through restoration. At this time, when the client receives the motion data packet at the k+1st time, the motion track curve of the target motion object from the K time to the k+1 time needs to be restored.
Under the assumption that the object is collided with other objects for N times during the motion of the object driven by external force according to Newton's law of mechanics and physical laws of kinematics, the collision time is negligible due to the extremely short collision event. After the collision is completed, the object is subjected to only gravity and friction, and thus makes a uniform acceleration motion (also referred to as free motion). By integrating the information, the initial motion trail model of the target moving object can be obtained as shown in a formula (6):
the constraint conditions are as follows:
in the formula (6), v i The object speed after the i-1 th collision is finished; t is t i Representing the length of time that an object is free to move between collision events; t (T) K Representing a time point of sampling of a kth motion data packet; s is S K Representing the position of the object at the time of sampling the kth motion data packet; s is S K+1 Representing the position of the object at the time of sampling the K+1st motion data packet; t is the sampling interval between the motion packet at the kth time and the motion packet at the k+1th time, and S is the difference between the object positions at the two samplings.
After the initial motion trajectory model is obtained, the time interval T for transmitting the data packet is not long, and is generally about 0.2s, considering that the data packet is applied to games. The number of collisions N that occur during this period will not be too large. Therefore, the initial motion trajectory model can be simplified under the condition that the number of times of collision of the limited target motion object is set to be smaller than the preset number of times of collision, and the target motion trajectory model can be obtained.
For example, it is assumed that the number of collisions N <2 (i.e., the preset number of collisions=2) of the target moving object may occur only once at the maximum (it should be noted that, even if the number of collisions N of the moving track in the real scene is large, the simulation may be performed with only one collision due to the short time interval T).
In some example embodiments of the present disclosure, one situation that may also occur is: the object is subject to friction or impact and is stationary in place. At this time, it is assumed that the above-described situation can occur only once at most. This approximation does not produce a significant violation of the physical laws due to the short time interval T.
In any of the above cases (i.e., the limited number of collisions is smaller than the preset number of collisions only if the collision is included, if the object is affected by friction or the collision only, and if the object is stationary in place, the limited number of collisions is smaller than the preset number of stationary times at this time, if both are present, both are set), the initial motion trajectory model of the formula (6) may be simplified, and then the obtained target motion trajectory model is shown in the following formula (7):
the constraint conditions are as follows:
in the above formula (6), t c Representing the duration of the first time slice; t is t 0 Representing the length of a time slice in which the target moving object is stationary; t is t s Representing the duration of the second time slice, the first time slice t c The velocity value at the beginning is denoted as v c Acceleration is denoted as a c The method comprises the steps of carrying out a first treatment on the surface of the And the speed value sent by the server is recorded as v s Acceleration is denoted as a s
In another alternative embodiment of the present disclosure, the time interval for the client to receive the kth motion data packet and the k+1th motion data packet is quite different from the time interval T for the server to sample the data, because of transmission delay or network fluctuations that may occur during network transmission. Therefore, the motion trail model simplified by the formula (6) can be further optimized to improve the robustness of the motion trail model to network transmission disturbance.
In an alternative embodiment of the present disclosure, when a target motion trajectory model is constructed based on a mathematical model of motion data packets received at historical moments for a target moving object, a client needs to receive the motion data packets from a server.
The motion data packet is obtained by sampling the service end based on the actual motion trail of the target moving object, obtaining motion data information corresponding to the target sampling moment, and encoding the motion data information corresponding to the target sampling moment. And the server side sends the sampled motion data packet to the client side.
On the basis of the above embodiment, the motion trajectory model obtained by the following formula (7) may be further optimized by the following embodiment in combination with fig. 4, so as to construct a target motion trajectory model of a target moving object, and fig. 4 schematically illustrates a flowchart of a method for constructing a target motion trajectory model in this exemplary embodiment, where the method for constructing a target motion trajectory model may include steps S401 to S404:
and S401, carrying out mathematical modeling according to the laws of physical kinematics and the motion data packet at the historical time, and constructing an initial motion trail model aiming at the target moving object.
Step S402, simplifying the initial motion trail model to obtain an intermediate motion trail model based on the condition that the collision times of the target moving object are set to be smaller than the preset collision times;
and S403, restraining the intermediate motion trail model based on the client interpolation time to obtain a target motion trail model.
The client interpolation time is used for representing the local time of the client when the client receives the latest motion data packet.
In an alternative embodiment of the present disclosure, the client interpolation time may be set to be greater than the time difference of the server state due to network delay occurring in the transmission of the motion data packet from the server to the client.
The time difference of the server state is used for representing the time difference between the time when the server obtains the latest motion data packet through sampling and the local time of the server corresponding to the latest motion data packet received by the client.
For the convenience of understanding by those skilled in the art, the following will define the time involved in constructing the target motion trajectory model:
the time for obtaining the Kth motion data packet by the server through sampling is defined as TargetServerStatueTime (K);
The server side sends a time interval of a K-th motion data packet to the client side, wherein the time interval is defined as T;
when the client receives the Kth motion data packet, the client is in the interpolation state at the moment and corresponds to the local time of the server: startServerStatusTime (K). Specifically, the client uses the K-1 motion data bank sent by the server side at this time) and the K-2 motion data packet to interpolate, and the client is in an intermediate state of interpolation, and the time is the local time of the server side corresponding to the intermediate state;
client local time: clientTime;
client local time when the client receives the kth motion data packet: lerpStartClientTime (K);
and client local time when interpolation of the kth motion data packet by the client is finished: lerpEndClientTime (K).
Based on the above defined time parameters, the following time slice (or time interval) parameters are obtained:
client interpolation time TL, which may also be referred to as client interpolation total time tl= LerpEndClientTime (K) -LerpStartClientTime (K); server state time difference TS: ts= TargetServerStatueTime (K) -StartServerStatusTime (K); as can be seen from the formula, TS > =t.
The remaining interpolation time, TL, of the last motion packet (K-1 th motion packet) Left =LerpEndClientTime(K-1)–LerpStartClientTime(K);
Client local time in interpolation process: lerpcurrenttime=clienttime-LerpStartClientTime (K).
For example, due to transmission delay or network fluctuations that may occur during network transmission, the time interval between the reception of the kth motion data packet and the kth+1th motion data packet by the client is different from the time interval T between the sampling of the kth motion data packet and the kth+1th motion data packet by the server. Therefore, it may be set such that the client interpolation time TL is greater than the time difference TS of the server state.
In an alternative embodiment of the present disclosure, in practical applications, the client interpolation time tl=1.1×ts is generally set.
For example, in constructing the target motion trajectory model, the embodiment of the disclosure may use the time difference TS of the server state as a time parameter to perform the construction of the mathematical model, and since the mathematical model is a restoration of the server state, it is necessary to exclude the network fluctuation effect. However, when the mathematical model parameter solution is performed based on the target motion trail model later, the client interpolation time TL should be used as a time parameter, because the client interpolation time is required to constrain the intermediate motion trail model, and at this time, a system error caused by network transmission fluctuation needs to be considered when the interpolation simulation motion trail curve needs to be performed in the client. Therefore, the motion trajectory model of the above formula (7) may be further optimized, so as to obtain a final target motion trajectory model as shown in the following formula (8):
The constraint conditions are as follows:
in the above formula (7), t c Representing the duration of the first time slice; t is t 0 Representing the length of a time slice in which the target moving object is stationary; t is t s Representing the duration of the second time slice, the first time slice t c The velocity value at the beginning is denoted as v c Acceleration is denoted as a c The method comprises the steps of carrying out a first treatment on the surface of the And the speed value sent by the server is recorded as v s Acceleration is denoted as a s TS represents the time difference of the server state.
It should be noted that, from the time when the client receives the server state corresponding to the kth motion data packet to the time when the client receives the kth+1th motion data packetFor example, the time interval of the time points of the server state of the packet, the first time slice t c May be the time interval, t, between the object being subjected to friction and coming to rest 0 Representing the length of a time slice in which the target moving object is stationary, t s The second time slice is represented by the time interval between the collision of the object and the change of speed from the stationary state.
After the target motion trail model is constructed, an interpolation function table of the target motion object can be determined based on the target motion trail model. And determining a table formed by interpolation functions corresponding to the target moving object in different moving states based on the target moving track model.
When the client receives the K+1th motion data packet, the K+1th motion data packet is input into the target motion track model, and the value solution can be obtained as an interpolation parameter, so that the target position at the moment of the current client is obtained.
However, in the above-described embodiment, there are the following two problems:
on one hand, the robustness of the interpolation parameter solving process is poor, and when the network transmission generates slight fluctuation, the numerical solution generates larger deviation; on the other hand, the target motion trail model has a plurality of constraint conditions, and the calculation cost for solving the numerical solution according to the linear programming scheme is high.
In order to solve the above-mentioned technical problems, in an optional embodiment of the present disclosure, determining interpolation piecewise functions corresponding to different motion states of a target moving object based on a target motion trajectory model; and determining an interpolation function table according to the interpolation piecewise functions corresponding to the target moving object in different moving states.
For example, a piecewise function may be used to approximate the target motion trajectory model under different input conditions (i.e., with the target moving object in different motion states) in order to achieve faster solving speeds and better robustness against fluctuations.
Specifically, the interpolation segmentation function table formed by the interpolation segmentation functions corresponding to the target moving object under different moving states is shown in the following table 1:
TABLE 1
As shown in table 1, the interpolation function table (which may also be referred to as an interpolation piecewise function table at this time) lists determination conditions that are satisfied correspondingly in various motion states and piecewise interpolation functions that are satisfied correspondingly under the determination conditions.
It should be explained that, when the target motion trajectory model is constructed, the embodiment of the disclosure may use TS as a time parameter to construct a mathematical model, and because the mathematical model is a reduction of the server state, the judgment conditions of table 1 all use TS as the time parameter; and when the mathematical model is carried out to obtain a parameter solution (namely, segment interpolation is carried out) based on the target motion trail model, the client interpolation time TL is used as a time parameter.
In some example embodiments of the present disclosure, the interpolation piecewise function includes one or more of a remaining interpolation time of a previous packet of the current packet, a client interpolation time, a time difference of a server state, a time point at which a collision of the target moving object occurs or a movement speed is changed.
The client interpolation time is used for representing the local time of the client when the client receives the latest motion data packet; the time difference of the server state is used for representing the difference between the time of obtaining the latest motion data packet by the server through sampling and the local time of the server corresponding to the latest motion data packet received by the client.
Typically, when the client receives the current data packet, the client performs interpolation processing on a previous data packet of the current data packet, and at this time, the remaining interpolation time of the previous data packet can be obtained based on the time when the interpolation of the previous data packet is finished and the current time.
In table 1 above, the current packet of the client: the position is Pc, and the speed is Vc; the data of the previous motion data packet sampled by the server side is: the position is Pp, the speed is Vp, and if the speed is not present, the data of the current client is obtained; the data of the motion data packet sampled by the current server side are as follows: the position is Ps, the speed is Vs, and the acceleration is As; the point in time at which the collision/velocity change occurs is denoted TChaos; time has client interpolation time TL, server state time difference TS and residual interpolation time TL of last motion data packet Left . The auxiliary functions used in the piecewise functions used in table 1 are defined as follows:
lerp function: lerp (start, end, t_01) =start+ (end-start) ×t 01
Clamp function: lerp (value, minV, maxV) =max (min, maxV), minV
t 01 Represents a time interval from the start of interpolation to the end of interpolation, start represents the start of interpolation, and end represents the end of interpolation.
Further, when determining the judgment condition, A TH Representing an upper acceptable acceleration limit; s is S TH Represents an upper limit of acceptable travel distance, S TH =A TH * TS, factor, wherein Factor is a coefficient.
In the embodiment, the interpolation parameters are solved through the piecewise function, so that the technical problem that the solved interpolation parameters generate larger deviation due to slight fluctuation of network transmission can be avoided, and the technical effect of improving the robustness is achieved; in addition, computational overhead may also be reduced.
In step S302, a current packet obtained for an actual motion trajectory of a target moving object is acquired.
The client receives a current data packet obtained for an actual motion trail of the target moving object, where the current data packet is a latest data packet received by the client.
In some example embodiments of the present disclosure, a current data packet sent by a server is received.
The current data packet is obtained by sampling the service end based on the actual motion trail of the target moving object, obtaining the motion data information corresponding to the target sampling moment, and encoding the motion data information corresponding to the target sampling moment.
The target sampling time corresponds to the current data packet, namely, the motion data information acquired by the server at the target sampling time is encoded and then sent to the client to obtain the current data packet.
In this embodiment, the current data packet can be obtained by encoding the motion data information acquired at the target sampling time and then transmitting the encoded motion data information to the client, so that the efficiency of data transmission can be improved.
In step S303, a target interpolation function is determined from the interpolation function table based on the current packet and the packet preceding the current packet.
In some example embodiments of the present disclosure, the target interpolation function may be determined from the interpolation function table directly based on the inclusion of the decision condition in the interpolation function table, by acquiring the current packet and the previous packet of the current packet.
In order to make the solved interpolation function more accurate and simple:
in another optional embodiment of the disclosure, the interpolation function table includes one or more determination conditions, and splits a current data packet and a previous data packet into a plurality of motion parameter components; for each of the plurality of motion parameter components, determining a piecewise interpolation function corresponding to the satisfaction of the target determination condition from the interpolation function table as a target interpolation function corresponding to each motion parameter component; then, in the step S304, the target position of the target moving object at the current client moment is determined according to the target interpolation function, and a plurality of component positions of the target moving object at the current client moment can be determined based on the target interpolation function corresponding to each motion parameter component; and combining the plurality of component positions to obtain the target position.
Wherein the target determination condition is any one of one or more determination conditions.
For example, the client may divide the received motion data packet into a plurality of motion parameter components based on the type of data contained.
In an alternative embodiment of the present disclosure, in performing the above splitting of the current data packet and the previous data packet into a plurality of motion parameter components, the current data packet and the previous data packet may be split into a plurality of motion parameter components based on a cartesian coordinate system, so as to obtain the target position in the three-dimensional world determined based on the cartesian coordinate system.
For example, the current data packet and the previous data packet may be split into X, Y, Z three motion parameter components (for example X, Y, Z, the position, the speed and the acceleration of the target moving object respectively) based on the cartesian coordinate system, so as to obtain the target position in the three-dimensional world determined by the cartesian coordinate system.
In the embodiment, the current data packet and the previous data packet are split into a plurality of motion parameter components based on the Cartesian coordinate system, so that complexity caused by data redundancy or poor space caused by insufficient data can be avoided, and the interest of a game is improved.
In order to facilitate understanding that, for each of the plurality of motion parameter components, a piecewise interpolation function that satisfies the determination condition is determined from the interpolation function table as the target interpolation function for each motion parameter component, an exemplary description will be made below with reference to fig. 5.
Let the current packet be the k+1th motion packet, the previous packet be the K motion packet. The current data packet and the previous data packet are respectively split into X, Y, Z motion parameter components according to a cartesian coordinate system.
Then the segmentation processing table (i.e. the interpolation function table or the segmentation interpolation function table in the above embodiment) can be traversed for the X motion parameter component of the k+1th motion data packet and the X motion parameter component of the K motion data packet, and if a certain target judgment condition in the segmentation processing table is met, the segmentation interpolation function corresponding to the target judgment condition is determined as a target interpolation function under the X motion parameter component; otherwise, if the current judging condition is not met, continuing to judge whether the next judging condition is met or not until the target interpolation function is obtained.
The Y motion parameter component of the K+1th motion data packet, the Y motion parameter component of the K motion data packet, the Z motion parameter component of the K+1th motion data packet and the Z motion parameter component of the K motion data packet can be used for determining target interpolation functions under the Y motion parameter component and the Z motion parameter component respectively.
In this way, in executing step S304, the target position of the target moving object at the current client time is determined according to the target interpolation function, so that a plurality of component positions of the target moving object at the current client time can be determined based on the target interpolation function corresponding to each motion parameter component; and combining the plurality of component positions to obtain the target position.
In step S304, the target position of the target moving object at the current client time is determined according to the target interpolation function, so as to determine the movement track curve of the target moving object according to the target position and the history position.
For example, the motion trail curve of the target moving object can be restored based on the determined position information at different moments.
Also on the basis of fig. 1, fig. 6 schematically illustrates a motion trajectory curve effect diagram obtained by using the method for determining a motion trajectory curve provided by the present disclosure in the present exemplary embodiment. As shown in fig. 6, the graph includes a data packet curve sent by a server to a client, an actual motion track curve of a target motion object, and a motion track curve determined by using the technical scheme of the present disclosure. In fig. 6, the abscissa indicates the time corresponding to the client, and the ordinate indicates the height of the target moving object from the ground, and in general, when the ordinate of the target moving object is 0, it indicates that the target moving object is on the ground. As can be seen from fig. 6, the motion trajectory curve determined based on the embodiment of the present disclosure is completely consistent with the actual motion trajectory curve, and it can be seen that the method for determining the motion trajectory curve provided by the embodiment of the present disclosure can accurately restore the motion trajectory of the object, and completely conforms to the physical motion law, thereby improving the game experience of the player.
It should be noted that, by applying the method for determining the motion trail curve provided by the embodiment of the application, after network synchronization is realized, the accurate motion trail curve of the virtual object can be obtained on the premise that the client consumes a small amount of calculation overhead, so that a player can watch the motion trail of the virtual object conforming to the physical rule in the game process, and further the game experience of the player is improved.
The calculation cost of the method for determining the motion trail curve provided by the embodiment of the application is as follows:
on a personal computer (Personal Computer, abbreviated as PC) platform using Intel i7-8700, assuming 2000 dynamic moving objects are synchronized, the frame rate of interpolation recovery performed by the client is 60 frames/second, and the calculation overhead obtained by the test is shown in table 2:
TABLE 2
Peak value Average value of
Data synchronous communication bandwidth 11KB/s
The client calculates a piecewise function: 0.3ms 0.03ms
the client calculates interpolation: 0.15ms 0.12ms
client synchronization location overhead: 0.43ms 0.15ms
as can be seen from table 2, the calculation cost of each part of the method for determining the motion trail curve provided by the present disclosure is small, so that the calculation cost of determining the motion trail change of the client is greatly saved, and the calculation resource is saved.
In order to implement the above method for determining a motion profile, an embodiment of the present disclosure provides a device for determining a motion profile. Fig. 7 schematically shows a schematic structural diagram of a determination device of a motion trajectory curve.
The motion trajectory curve determining device 700 includes a function table determining module 701, a data obtaining module 702, a function determining module 703, and a position determining module 704.
The function table determining module 701 is configured to determine an interpolation function table of the target moving object based on a target motion trajectory model that is configured by performing mathematical model construction on a motion data packet of the target moving object received at a historical moment;
the data acquisition module 702 is configured to acquire a current data packet obtained for an actual motion trail of a target moving object;
a function determining module 703, configured to determine a target interpolation function from the interpolation function table based on the current data packet and a data packet previous to the current data packet;
the position determining module 704 is configured to determine a target position of the target moving object at the current client time according to the target interpolation function, so as to determine a motion trail curve of the target moving object according to the target position and the historical position.
In an optional embodiment of the disclosure, the determining device 700 of the motion trajectory curve may further include a model building module, configured to perform mathematical modeling according to a physical kinematics law and a motion data packet at a historical time, and build an initial motion trajectory model for the target moving object; and simplifying the initial motion trail model based on the condition that the collision times of the target motion object are smaller than the preset collision times, so as to obtain the target motion trail model.
In an optional embodiment of the present disclosure, the data acquisition module 702 is specifically configured to receive a current data packet sent by a server; the current data packet is obtained by sampling the service end based on the actual motion trail of the target moving object, obtaining the motion data information corresponding to the target sampling moment, and encoding the motion data information corresponding to the target sampling moment.
In an optional embodiment of the disclosure, a model building module is configured to perform mathematical modeling according to a physical kinematics law and a motion data packet at a historical time, and build an initial motion trail model for a target moving object; simplifying the initial motion track model based on the condition that the collision times of the target moving object are set to be smaller than the preset collision times, so as to obtain an intermediate motion track model; constraining the intermediate motion trail model based on the interpolation time of the client to obtain a target motion trail model; the client interpolation time is used for representing the local time of the client when the client receives the latest motion data packet.
In an optional embodiment of the disclosure, the model building module is configured to set a client interpolation time greater than a time difference of a server state; the time difference of the server state is used for representing the difference between the time of obtaining the latest motion data packet by the server through sampling and the local time of the server corresponding to the latest motion data packet received by the client.
In an optional embodiment of the present disclosure, the function table determining module 701 is configured to update the target motion trajectory model to an interpolation piecewise function corresponding to different motion states based on the target motion object in the different motion states; and determining an interpolation function table according to the interpolation piecewise functions corresponding to the target moving object in different moving states.
In an optional embodiment of the disclosure, the interpolation piecewise function includes one or more of a remaining interpolation time of a previous data packet of the current data packet, a client interpolation time, a time difference of a server state, and a time point when the target moving object collides or a moving speed changes; the client interpolation time is used for representing the local time of the client receiving the latest motion data packet, and the time difference of the state of the server is used for representing the difference between the time of the latest motion data packet obtained by sampling by the server and the local time of the server corresponding to the latest motion data packet received by the client.
In an alternative embodiment of the present disclosure, the interpolation function table includes one or more decision conditions, and the function determining module 703 is configured to split the current data packet and the previous data packet into a plurality of motion parameter components; determining a piecewise interpolation function corresponding to a target judgment condition from an interpolation function table as a target interpolation function corresponding to each motion parameter component for the motion parameter component in the plurality of motion parameter components, wherein the target judgment condition is any judgment condition in one or more judgment conditions; the position determining module 704 is configured to determine a plurality of component positions of the target moving object at the current client time based on the target interpolation function corresponding to each motion parameter component; and combining the plurality of component positions to obtain the target position.
In an alternative embodiment of the present disclosure, the current data packet and the previous data packet are split into a plurality of motion parameter components based on a Cartesian coordinate system to obtain a target position in a three-dimensional world determined based on the Cartesian coordinate system.
The motion trajectory curve determining device 700 provided in the embodiments of the present disclosure may execute the technical scheme of the motion trajectory curve determining method in any of the embodiments, and the implementation principle and beneficial effects of the motion trajectory curve determining device are similar to those of the motion trajectory curve determining method, and may refer to the implementation principle and beneficial effects of the motion trajectory curve determining method, and will not be described herein.
In an exemplary embodiment of the present disclosure, a computer-readable storage medium having stored thereon a program product capable of implementing the method described above in the present specification is also provided. In some possible embodiments, the aspects of the invention may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps according to the various exemplary embodiments of the invention as described in the "exemplary method" section of this specification, when the program product is run on the terminal device.
A program product for implementing the above-mentioned method according to an embodiment of the present invention may employ a portable compact disc read Only Memory (CD-ROM) and include a program code, and may be run on a terminal device such as a personal computer. However, the program product of the present invention is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, a random access Memory (Random Access Memory, RAM), a Read-Only Memory (ROM), an erasable programmable Read-Only Memory (EPROM or flash Memory), an optical fiber, a portable compact disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, radio Frequency (RF), etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a local area network (Local Area Network, LAN) or wide area network (Wide Area Network, WAN), or may be connected to an external computing device (e.g., connected through the internet using an internet service provider).
In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
Those skilled in the art will appreciate that the various aspects of the invention may be implemented as a system, method, or program product. Accordingly, aspects of the invention may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
An electronic device 800 according to such an embodiment of the invention is described below with reference to fig. 8. The electronic device 800 shown in fig. 8 is merely an example and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in fig. 8, the electronic device 800 is embodied in the form of a general purpose computing device. Components of electronic device 800 may include, but are not limited to: the at least one processing unit 810, the at least one storage unit 820, a bus 830 connecting the different system components (including the storage unit 820 and the processing unit 810), and a display unit 840.
Wherein the storage unit stores program code that is executable by the processing unit 810 such that the processing unit 810 performs steps according to various exemplary embodiments of the present invention described in the above section of the "exemplary method" of the present specification. For example, the processing unit 810 may perform steps S301 to S304 as shown in fig. 3.
The storage unit 820 may include readable media in the form of volatile storage units, such as Random Access Memory (RAM) 8201 and/or cache memory 8202, and may further include Read Only Memory (ROM) 8203.
Storage unit 820 may also include a program/utility 8204 having a set (at least one) of program modules 8205, such program modules 8205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
Bus 830 may be one or more of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 800 may also communicate with one or more external devices 1500 (e.g., keyboard, pointing device, bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 800, and/or any device (e.g., router, modem, etc.) that enables the electronic device 800 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 850. Also, electronic device 800 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through network adapter 860. As shown, network adapter 860 communicates with other modules of electronic device 800 over bus 830. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 800, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, disk array (Redundant Arrays of Independent Disks, RAID) systems, tape drives, data backup storage systems, and the like.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, including several instructions to cause a computing device (may be a personal computer, a server, a terminal device, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.
Furthermore, the above-described drawings are only schematic illustrations of processes included in the method according to the exemplary embodiment of the present invention, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of modules.
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (12)

1. A method for determining a motion profile, the method comprising:
determining an interpolation function table of the target moving object based on a target moving track model which is received at a historical moment and is constructed by a mathematical model aiming at a moving data packet of the target moving object;
acquiring a current data packet obtained by aiming at the actual motion trail of the target moving object;
Determining a target interpolation function from the interpolation function table based on the current data packet and a data packet previous to the current data packet;
and determining the target position of the target moving object at the current client time according to the target interpolation function so as to determine a moving track curve of the target moving object according to the target position and the historical position.
2. The method according to claim 1, wherein before the determining the interpolation function table of the target moving object based on the target moving track model mathematically modeled on the moving data packet of the target moving object received at the history time, the method further comprises:
performing mathematical modeling according to a physical kinematics law and the motion data packet at the historical time, and constructing an initial motion trail model aiming at the target moving object;
and simplifying the initial motion track model based on the condition that the collision times of the target motion object are set to be smaller than the preset collision times, so as to obtain the target motion track model.
3. The method for determining a motion profile according to claim 1, wherein the acquiring the current data packet obtained for the actual motion profile of the target moving object includes:
Receiving the current data packet sent by a server;
the current data packet is obtained by sampling the current data packet by the server based on the actual motion trail of the target moving object, obtaining motion data information corresponding to the target sampling moment, and encoding the motion data information corresponding to the target sampling moment.
4. The method according to claim 1, wherein before the determining the interpolation function table of the target moving object based on the target moving track model mathematically modeled on the moving data packet of the target moving object received at the history time, the method further comprises:
performing mathematical modeling according to a physical kinematics law and the motion data packet at the historical time, and constructing an initial motion trail model aiming at the target moving object;
simplifying the initial motion track model based on the condition that the collision times of the target motion object are set to be smaller than preset collision times, so as to obtain an intermediate motion track model;
constraining the intermediate motion trail model based on client interpolation time to obtain the target motion trail model; the client interpolation time is used for representing the local time of the client when the client receives the latest motion data packet.
5. The method for determining a motion profile according to claim 4, wherein the client interpolation time is set to be greater than a time difference of a server state; the time difference of the server state is used for representing the difference between the time of obtaining the latest motion data packet by the server through sampling and the local time of the server corresponding to the latest motion data packet received by the client.
6. The method according to claim 1, wherein determining the interpolation function table of the target moving object based on a target moving track model which is mathematically modeled for a moving data packet of the target moving object received at a history time, comprises:
updating the target motion trail model into interpolation piecewise functions corresponding to different motion states based on the target motion object in the different motion states;
and determining the interpolation function table according to the interpolation piecewise functions corresponding to the target moving object in different moving states.
7. The method for determining a motion trajectory curve according to claim 6, wherein the interpolation piecewise function includes one or more of a remaining interpolation time of a previous packet of the current packet, a client interpolation time, a time difference of a server state, and a time point when the target moving object collides or a moving speed changes;
The client interpolation time is used for representing the client local time of the latest motion data packet, and the time difference of the server state is used for representing the difference between the time of the latest motion data packet obtained by sampling by the server and the server local time corresponding to the latest motion data packet received by the client.
8. The method for determining a motion profile according to claim 1, wherein the interpolation function table includes one or more determination conditions, and the determining a target interpolation function from the interpolation function table based on the current packet and a packet previous to the current packet includes:
splitting the current data packet and the previous data packet into a plurality of motion parameter components;
determining a piecewise interpolation function corresponding to a target judgment condition from the interpolation function table as a target interpolation function corresponding to each motion parameter component for the motion parameter component in the plurality of motion parameter components, wherein the target judgment condition is any judgment condition in the one or more judgment conditions;
the determining, according to the target interpolation function, the target position of the target moving object at the current client time includes:
Determining a plurality of component positions of the target moving object at the moment of the current client based on the target interpolation function corresponding to each motion parameter component;
and combining the plurality of component positions to obtain the target position.
9. The method of claim 8, wherein the current data packet and the previous data packet are split into a plurality of motion parameter components based on a cartesian coordinate system to obtain the target position in the three-dimensional world determined based on the cartesian coordinate system.
10. A motion profile determination apparatus, the apparatus comprising:
the function table determining module is used for determining an interpolation function table of the target moving object based on a target motion trail model which is received at the historical moment and is constructed by a mathematical model aiming at a motion data packet of the target moving object;
the data acquisition module is used for acquiring a current data packet obtained aiming at the actual motion trail of the target moving object;
the function determining module is used for determining a target interpolation function from the interpolation function table based on the current data packet and the data packet before the current data packet;
And the position determining module is used for determining the target position of the target moving object at the current client time according to the target interpolation function so as to determine the movement track curve of the target moving object according to the target position and the historical position.
11. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the method of determining a movement track curve according to any one of claims 1 to 9.
12. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the method of determining a motion profile of any one of claims 1 to 9 via execution of the executable instructions.
CN202311688319.3A 2023-12-08 2023-12-08 Method and device for determining motion trail curve, storage medium and electronic equipment Pending CN117688113A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311688319.3A CN117688113A (en) 2023-12-08 2023-12-08 Method and device for determining motion trail curve, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311688319.3A CN117688113A (en) 2023-12-08 2023-12-08 Method and device for determining motion trail curve, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN117688113A true CN117688113A (en) 2024-03-12

Family

ID=90134656

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311688319.3A Pending CN117688113A (en) 2023-12-08 2023-12-08 Method and device for determining motion trail curve, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN117688113A (en)

Similar Documents

Publication Publication Date Title
CN111353582B (en) Particle swarm algorithm-based distributed deep learning parameter updating method
CN109902820B (en) AI model training method, device, storage medium and equipment
US11833422B2 (en) Providing automated user input to an application
CN106709976B (en) Skeleton animation generation method and device
CN111985640A (en) Model training method based on reinforcement learning and related device
US10406437B1 (en) Route navigation system within a game application environment
CN110503944B (en) Method and device for training and using voice awakening model
CN112994980B (en) Time delay test method, device, electronic equipment and storage medium
CN113052253A (en) Hyper-parameter determination method, device, deep reinforcement learning framework, medium and equipment
CN109568948A (en) The motion state synchronous method and device of object in online game
CN112925926B (en) Training method and device of multimedia recommendation model, server and storage medium
JP2022091919A (en) Backbone network generation method and device, electronic apparatus, storage medium and computer program
CN113534790B (en) Path planning method and device, electronic equipment and computer readable storage medium
CN113657468A (en) Pre-training model generation method and device, electronic equipment and storage medium
CN117688113A (en) Method and device for determining motion trail curve, storage medium and electronic equipment
Chen et al. A path-assisted dead reckoning algorithm for distributed virtual environments
CN116476042B (en) Mechanical arm kinematics inverse solution optimization method and device based on deep reinforcement learning
CN110975294A (en) Game fighting implementation method and terminal
CN111753855B (en) Data processing method, device, equipment and medium
CN114974438A (en) Particle motion simulation method, device, apparatus, storage medium and program product
CN116196611A (en) Somatosensory game method based on waving action
CN112836381B (en) Multi-source information-based ship residual life prediction method and system
Seifeddine et al. Dynamic hierarchical neural network offloading in IoT edge networks
CN113052252A (en) Hyper-parameter determination method, device, deep reinforcement learning framework, medium and equipment
KR102096935B1 (en) Computing device for providing replay

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination