Track information synchronization methods, devices, computer equipment, and storage media
By matching client control information with server trajectory sets, instruction information is generated to enable the client to obtain target trajectory information, which solves the problem of excessive network resource consumption during trajectory information synchronization and improves the smoothness of action display.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2022-03-17
- Publication Date
- 2026-05-26
AI Technical Summary
In the game, during the synchronization of trajectory information between the client and the server, the data synchronization occurs frequently and in large amounts, consuming a lot of network resources and causing the animation to be unsmooth.
By matching the control information sent by the client with the motion capture trajectory set of the server, indication information is generated to instruct the client to obtain target trajectory information based on the local trajectory set, thereby reducing the consumption of network resources.
It reduces the consumption of network resources and improves the smoothness of animation displayed on the client side.
Smart Images

Figure CN116803455B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, specifically to a method, apparatus, computer device, and storage medium for synchronizing trajectory information, wherein the storage medium is a computer-readable storage medium. Background Technology
[0002] With the development of terminal technology, terminals can provide more and more functions. For example, they can support interactive games. In some games, the movement of game characters can be controlled by the keyboard on the terminal or an external keyboard. The client obtains the control information input for the game character and sends the control information to the server. The server determines the position information of the game character in the next frame based on the control information using a neural network, and then synchronizes the position information of the game character to the client, so that the client can display the pose information of the game character based on the position information. However, the position information contains a lot of data about the game character. Each synchronization requires sending a large amount of data, and the position information of each frame needs to be synchronized, resulting in a large number of data synchronizations and a large amount of synchronized data, which consumes a lot of network resources. Moreover, the client has to wait for a large amount of data to be sent before it can display the corresponding action of the game character, resulting in unsmooth action display. Summary of the Invention
[0003] This application provides a method, apparatus, computer device, and storage medium for synchronizing trajectory information, which can reduce the occupation of network resources.
[0004] This application provides a trajectory information synchronization method, including:
[0005] Obtain control information for the moving object sent by the client, as well as the first set of motion capture trajectories from the server;
[0006] Calculate the current frame trajectory information of the moving object based on the control information;
[0007] The current frame trajectory information is matched with the trajectory information in the first motion capture trajectory set to determine the matching trajectory information from the first motion capture trajectory set;
[0008] Based on the trajectory relationship between the matched trajectory information and the historical matched trajectory information, the target trajectory information is determined, and an instruction message is generated to instruct the client to obtain the target trajectory information;
[0009] The client is instructed to obtain target trajectory information based on a locally preset second motion capture trajectory set, thereby synchronizing the target trajectory information of the moving object with the server.
[0010] Accordingly, embodiments of this application also provide a trajectory information synchronization device, comprising:
[0011] The acquisition unit is used to acquire control information for the moving object sent by the client, as well as the first set of motion capture trajectories from the server.
[0012] The calculation unit is used to calculate the current frame trajectory information of the moving object based on the control information;
[0013] A matching unit is used to match the current frame trajectory information with the trajectory information in the first motion capture trajectory set, so as to determine the matching trajectory information from the first motion capture trajectory set;
[0014] The relationship determination unit is used to determine the target trajectory information based on the trajectory relationship between the matched trajectory information and the historical matched trajectory information, and to generate indication information to instruct the client to obtain the target trajectory information;
[0015] The instruction unit is used to instruct the client to obtain target trajectory information based on a locally preset second motion capture trajectory set according to the instruction information, so that the client and the server synchronize the target trajectory information of the moving object.
[0016] In one embodiment, the relationship determination unit includes:
[0017] The relationship determination subunit is used to determine the matching trajectory information as the target trajectory information if a frame skipping match is determined to occur based on the matching trajectory information and the historical matching trajectory information.
[0018] The first information determination subunit is used to use the trajectory identifier of the target trajectory information as the indication information.
[0019] In one embodiment, the relationship determination unit further includes:
[0020] The second information determination subunit is used to use preset information as indication information if it is determined from the matching trajectory information and the historical matching trajectory information that no frame skipping matching has occurred.
[0021] The identification calculation subunit is used to calculate the candidate trajectory identifier based on the trajectory identifier of the historical matching trajectory information and the cumulative time for the trajectory segment;
[0022] The transition processing subunit is used to perform trajectory transition processing on the candidate trajectory information corresponding to the candidate trajectory identifier in the first motion capture trajectory set to obtain the target trajectory information.
[0023] In one embodiment, the step of performing trajectory transition processing on the candidate trajectory information to obtain target trajectory information includes:
[0024] The coefficient calculation subunit is used to calculate the interpolation coefficients based on the cumulative time of the trajectory segment.
[0025] An interpolation processing subunit is used to interpolate the candidate trajectory information using the interpolation coefficients to obtain the target trajectory information.
[0026] In one embodiment, the trajectory information synchronization device further includes:
[0027] The pose acquisition unit is used to acquire the current frame pose information of the moving object;
[0028] The pose prediction unit is used to perform pose prediction based on the current frame pose information and the target trajectory information to obtain the associated frame pose information of the moving object.
[0029] In one embodiment, the indicating unit includes:
[0030] The instruction subunit is used to instruct the client to obtain target trajectory information based on its second motion capture trajectory set, and to instruct the client to obtain the current frame pose information of the moving object, perform pose prediction based on the current frame pose information and the target trajectory information obtained from the second motion capture trajectory set, obtain the associated frame pose information of the moving object, and display the action corresponding to the moving object based on the associated frame pose information.
[0031] In one embodiment, the matching unit includes:
[0032] A similarity calculation subunit is used to calculate the similarity between the current frame trajectory information and each trajectory information in the first motion capture trajectory set;
[0033] The trajectory determination subunit is used to determine the trajectory information with the highest similarity to the current frame trajectory information in the first motion capture trajectory set as the matching trajectory information.
[0034] Accordingly, this application also provides a computer device, including a memory and a processor; the memory stores a computer program, and the processor is used to run the computer program in the memory to execute any of the trajectory information synchronization methods provided in this application.
[0035] Accordingly, embodiments of this application also provide a computer-readable storage medium for storing a computer program, which is loaded by a processor to execute any of the trajectory information synchronization methods provided in embodiments of this application.
[0036] Accordingly, this application also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the trajectory information synchronization methods provided in this application.
[0037] This application embodiment obtains control information for a moving object sent by the client and a first motion capture trajectory set from the server; calculates the current frame trajectory information of the moving object based on the control information; matches the current frame trajectory information with the trajectory information in the first motion capture trajectory set to determine matching trajectory information from the first motion capture trajectory set; determines the target trajectory information based on the trajectory relationship between the matching trajectory information and historical matching trajectory information, and generates instruction information to instruct the client to obtain the target trajectory information; and instructs the client to obtain the target trajectory information based on a locally preset second motion capture trajectory set, so that the client and the server synchronize the target trajectory information of the moving object.
[0038] This scheme generates corresponding indication information by matching the trajectory information with historically matched trajectory information. Based on the indication information, the client is instructed to obtain the target trajectory information from the second motion capture trajectory set. Therefore, without sending the target trajectory information of the moving object to the client, the target trajectory information of the moving object can be synchronized with the client. This allows the client to obtain the pose information of the moving object based on the target trajectory information, reducing the occupation of network resources. Attached Figure Description
[0039] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0040] Figure 1 This is a scenario diagram of the trajectory information synchronization method provided in the embodiments of this application;
[0041] Figure 2 This is a flowchart of the trajectory information synchronization method provided in the embodiments of this application;
[0042] Figure 3 This is another flowchart of the trajectory information synchronization method provided in the embodiments of this application;
[0043] Figure 4 This is a schematic diagram of the trajectory information synchronization device provided in the embodiments of this application;
[0044] Figure 5 This is a schematic diagram of the terminal structure provided in the embodiments of this application. Detailed Implementation
[0045] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0046] This application provides a method, apparatus, computer device, and computer-readable storage medium for synchronizing trajectory information. The trajectory information synchronization apparatus can be integrated into a computer device, which can be a server or a terminal, etc.
[0047] The terminal may include mobile phones, wearable smart devices, tablets, laptops, personal computers (PCs), and in-vehicle computers, etc.
[0048] The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.
[0049] For example, such as Figure 1 As shown, taking a computer device as a server as an example: The server obtains control information for the moving object sent by the client, as well as the server's first motion capture trajectory set; calculates the current frame trajectory information of the moving object based on the control information; matches the current frame trajectory information with the trajectory information in the first motion capture trajectory set to determine the matching trajectory information from the first motion capture trajectory set; determines the target trajectory information based on the trajectory relationship between the matching trajectory information and historical matching trajectory information, and generates instruction information to instruct the client to obtain the target trajectory information; according to the instruction information, instructs the client to obtain the target trajectory information based on a locally preset second motion capture trajectory set, so that the client and the server synchronize the target trajectory information of the moving object.
[0050] This solution's server generates corresponding indication information by matching trajectory information with historically matched trajectory information. Based on this indication information, the server instructs the client to obtain target trajectory information from the second motion capture trajectory set. Therefore, the server does not need to send the target trajectory information of the moving object to the client, but can synchronize the target trajectory information of the moving object with the client. This allows the client to obtain the pose information of the moving object based on the target trajectory information, reducing the occupation of network resources. Moreover, the client does not need to wait to obtain the target trajectory information sent by the server before it can display the movement of the moving object, improving the smoothness of the motion animation displayed on the client.
[0051] The following sections provide detailed descriptions of each example. It should be noted that the order in which the embodiments are described is not intended to limit the preferred order of the embodiments.
[0052] This embodiment will be described from the perspective of a trajectory information synchronization device, which can be integrated into a computer device, such as a server or a terminal.
[0053] This application provides a method for synchronizing trajectory information, such as... Figure 2 As shown, the specific process of this trajectory information synchronization method can be as follows:
[0054] 101. Obtain the control information sent by the client for the moving object, and the server's first set of motion capture trajectories.
[0055] For example, it could specifically load the first set of motion capture trajectories on the server and obtain the control information sent by the client in response to the user's operation. Optionally, the client can encode the control information input by the user into information related to the direction and speed of movement and send it to the server.
[0056] In this system, a specific communication connection can be established between the client and the server. The client and the server cooperate with each other to provide corresponding services. For example, the client can be a game client or a chess competition client, which contains objects that can be moved according to the control information input by the user. The client can display multiple animation frames to show animation effects, such as the movement of objects (walking and running) or rotation.
[0057] The movable object can be an object in the client that can be moved according to the control information input by the user, such as a game character in a game client, a chess piece in a chess competition client, or a ball in a ball game entertainment client.
[0058] The first motion capture trajectory set can be a preset trajectory set in the server. The first motion capture trajectory set contains multiple trajectory segments, and each trajectory segment contains multiple frames of trajectory information. A frame of trajectory information can contain multiple position information, direction information, velocity information, and phase information within a certain period of time in that frame. For example, the trajectory information can contain the phase, position information, direction information, and velocity information of the current frame, the position information, direction information, and velocity information of the past 5 frames, and the position information, direction information, and velocity information of the next 6 frames. Based on the multiple frames of trajectory information contained in each trajectory segment, the movement path corresponding to the moving object can be represented. Based on the movement path, the animation effect corresponding to the trajectory segment can be obtained. For example, the trajectory segment can represent the effect of the moving object spinning in circles or running back and forth. Different trajectory segments may contain the same sub-trajectory segments.
[0059] In some application scenarios, the moving object can be a virtual character or a virtual reptile, or an object that moves in the same way as a virtual character or virtual reptile. When the moving object moves by walking or running, the left and right feet move forward alternately. The phase can represent the landing state, i.e., whether the left foot lands first or the right foot lands first. In other application scenarios, the moving object does not move with the aid of legs. In this case, the trajectory information may not include the phase, or the phase may be constant.
[0060] Optionally, the first set of motion capture trajectories can be obtained through motion capture technology.
[0061] The second motion capture trajectory set can be a pre-existing client set identical to the first motion capture trajectory set. The client can obtain the same trajectory information as the server from the second motion capture trajectory set based on the trajectory identifier, thus achieving synchronization. The trajectory information in both the first and second motion capture trajectory sets corresponds to a trajectory identifier. Each trajectory identifier uniquely corresponds to a frame of trajectory information in either the first or second motion capture trajectory set. Therefore, based on the same trajectory identifier, the same trajectory information can be obtained from both the first and second motion capture trajectory sets. The trajectory identifier can be a trajectory index or other forms of information.
[0062] The control information can include direction and movement method. The control information can be input through buttons, controls or virtual joysticks provided by the client, or through external devices such as external keyboards or external joysticks. For example, the client can provide buttons for left, right, forward and backward directions. Different control information can be input by clicking or pressing different buttons.
[0063] 102. Calculate the current frame trajectory information of the moving object based on the control information.
[0064] For example, let's take the current frame trajectory information, which includes the phase, position, direction, and velocity information of the current frame, the position, direction, and velocity information of the past 5 frames, and the position, direction, and velocity information of the next 6 frames, as an example. The current frame trajectory information is denoted as (Phase, Pos1, Dir1, Vel1, ..., Pos 12 Dir 12 Vel 12 ).
[0065] Where Ph represents the phase of the moving object in the 6th frame (current frame) of the 12-frame trajectory, Pos1 represents the position information of the moving object in the first frame, Dir1 represents the direction information of the moving object in the first frame, and Vel1 represents the velocity information of the moving object in the first frame.
[0066] Specifically, the direction and speed of the moving object can be determined based on control information. The moving speed is then used as the moving speed of the moving object in the 12th frame. By performing linear interpolation on the moving speed, the moving speed of the moving object in each of the next 6 frames can be obtained. The linear interpolation can be calculated using the following formula:
[0067] Vel i =(1-β) i )·Vel6+β i ·Vel 12
[0068]
[0069] Among them, Vel i β represents the moving speed of the moving object in the i-th frame. i The interpolation coefficients are those corresponding to the i-th frame.
[0070] The time interval between two animation frames can be determined based on the display frame rate. The average speed of the moving object in the 6th and 7th frames can be calculated. Multiplying the average speed by the time interval gives the distance the moving object has traveled. Adding the distance traveled in the direction of movement to the position information of the moving object in the current animation frame gives the position information of the moving object in the 7th frame. And so on, the movement speed and position information of the moving object in each of the next 6 frames can be calculated.
[0071] Optionally, the direction information for the next 6 frames can be the same as the direction information in the control information, or the direction information in the control information can be used as the direction information for the 12th frame. Referring to the method of obtaining the velocity information of each frame in the next 6 frames through linear interpolation, the direction information can be linearly interpolated to obtain the direction information for each frame in the next 6 frames.
[0072] The trajectory information of the current frame is obtained based on the phase, position, direction, and velocity information of the current frame, the position, direction, and velocity information of the past 5 frames, and the position, direction, and velocity information of the next 6 frames.
[0073] The current frame trajectory information can be the trajectory information of the moving object in the animation frame (hereinafter referred to as the current animation frame) when the user inputs control information. The current frame trajectory information can include the phase, position information, direction information and speed information of the moving object in the animation frame, the position information, direction information and speed information of the past 5 frames of the animation frame, and the position information, direction information and speed information of the next 6 frames of the animation frame.
[0074] 103. Match the trajectory information of the current frame with the trajectory information in the first motion capture trajectory set to determine the matching trajectory information from the first motion capture trajectory set.
[0075] Specifically, step 103 may include:
[0076] Calculate the similarity between the current frame trajectory information and each trajectory information in the first motion capture trajectory set;
[0077] The trajectory information with the highest similarity to the trajectory information of the current frame in the first motion capture trajectory set is determined as the matching trajectory information.
[0078] For example, it can be to calculate the distance between the current frame trajectory information and each trajectory information in the first motion capture trajectory set. The smaller the distance, the greater the similarity between the current frame trajectory information and the trajectory information in the first motion capture trajectory set. The trajectory information in the first motion capture trajectory set that is closest to the trajectory information (i.e., has the greatest similarity) is taken as the matching trajectory information.
[0079] The distance can be Euclidean distance, Manhattan distance, Chebyshev distance, or cosine distance, etc.
[0080] 104. Based on the trajectory relationship between the matched trajectory information and the historical matched trajectory information, determine the target trajectory information and generate an instruction message to the client to obtain the target trajectory information.
[0081] The historical matching trajectory information can be obtained by taking the previous animation frame as the current animation frame and executing steps 101-103.
[0082] The trajectory relationship can indicate whether frame skipping matching has occurred. If the matching trajectory information and the historical matching trajectory information belong to the same trajectory segment, and the matching trajectory information is the trajectory information of the next frame of the historical matching trajectory information, then frame skipping matching has not occurred; otherwise, it is frame skipping matching.
[0083] For example, if there are two trajectory segments in the motion capture trajectory set, one trajectory segment can be used to display the animation effect of a moving object spinning in place, and the other trajectory segment can be used to display the animation effect of a moving object running back and forth. If both the historical matching trajectory information and the matching trajectory information belong to the trajectory segment that displays spinning in place, or both belong to the trajectory segment that displays running back and forth, and in the corresponding trajectory segment, the matching trajectory information is the trajectory information of the next frame of the historical matching trajectory information, then no frame skipping matching has occurred; otherwise, frame skipping matching has occurred.
[0084] The target trajectory information can be used to display the movement of the object in the next animation frame of the current animation frame.
[0085] The indication information may include a relationship identifier that represents the trajectory relationship. For example, 0 may indicate that a frame skipping match has occurred, while 1 may indicate that a frame skipping match has not occurred. The indication information may also be other forms of information.
[0086] For example, since the matched trajectory information and the historical matched trajectory information are trajectory information in the motion capture trajectory set, the matched trajectory information and the historical matched trajectory information can each carry the trajectory segment identifier of their corresponding trajectory segment (the trajectory segment identifier can be the name, ID or other information that can represent the trajectory segment). Based on the trajectory segment identifiers carried by the matched trajectory information and the historical matched trajectory information, it can be determined whether the two belong to the same trajectory segment. If the two belong to the same trajectory segment, it can be determined whether the two are adjacent frame trajectory information based on the historical matched trajectory information and the multi-frame information contained in the matched trajectory information.
[0087] The trajectory relationship determines the method of acquiring target trajectory information. For example, if frame skipping matching occurs, the matched trajectory information is used as the target matching trajectory information. If frame skipping matching does not occur, since the trajectory information in the motion capture trajectory set is acquired at a certain acquisition frame rate, a mismatch in timing of the trajectory information will occur when the acquisition frame rate of the acquired trajectory information differs from the display frame rate of the moving object's action displayed on the terminal. For example, for a 1-second spinning motion, a trajectory segment containing n frames of trajectory information can be obtained based on the acquisition frame rate. However, for the terminal to display a 1-second spinning motion based on the display frame rate, m frames of trajectory information are required. The inequality of m and n will cause inconsistencies in the timing of the client and server actions with respect to that trajectory segment (for example, the time corresponding to the 8th frame in the trajectory segment is different from the display frame rate). The trajectory information shown is not the trajectory information of the 8th frame in the trajectory segment, but the trajectory information of the frame number corresponding to that time (e.g., the 10th frame) in the trajectory segment at the display frame rate. In order to ensure the consistency of actions in the timing, an average matching trajectory information can be calculated based on the matching trajectory information and the historical matching trajectory information for transition. Specifically, the average value can be calculated for the same type of data contained in the matching trajectory information and the historical matching trajectory information. For example, the average value can be calculated for the data corresponding to the position information in the matching trajectory information and the historical matching trajectory information to obtain the average matching trajectory information, and this average matching trajectory information can be used as the target matching trajectory information.
[0088] Because the client and server need to synchronize the trajectory information of the moving object, the server also needs to generate corresponding indication information based on the trajectory relationship. The indication information is used to instruct the client to generate the same trajectory information as the server for the moving object. For example, the indication information can be 0 or 1, where 0 can indicate that a frame skipping match has occurred, and 1 can indicate that a frame skipping match has not occurred. The indication information can also be other forms of information, which will not be elaborated here.
[0089] The indication information and the trajectory identifier corresponding to the matching trajectory information are sent to the client so that the client can obtain the matching trajectory information from the locally preset second motion capture trajectory set according to the trajectory identifier, and determine how to obtain the target trajectory information based on the information representing the trajectory relationship in the indication information. For the specific process, please refer to the detailed description of step 104 above, which will not be repeated here.
[0090] In one embodiment, when no frame skipping match occurs, it indicates that the matched trajectory information is the trajectory information of the next frame of the historical matched trajectory information. Therefore, both the client and the server can determine the matched trajectory information based on the historical matched trajectory information. That is, when no frame skipping match occurs, the client does not need to know the relevant information of the matched trajectory information of the current frame trajectory information, such as the trajectory identifier. Therefore, in this case, the server does not need to send the trajectory identifier to the client. It only needs to send the trajectory identifier to the client when a frame skipping match occurs.
[0091] Because the data volume of the trajectory identifier is small, the network resources consumed in sending the data are less, so the occupation of network resources can be reduced. Furthermore, the trajectory identifier is only sent to the client when frame skipping occurs, reducing the number of times data is sent and further reducing the occupation of network resources.
[0092] Optionally, the trajectory identifier can be used as indication information, and the indication information can be sent to the client. That is, in one embodiment, the step "determine the target trajectory information based on the trajectory relationship between the matched trajectory information and the historical matched trajectory information, and generate indication information to instruct the client to obtain the target trajectory" can specifically include:
[0093] If a frame skipping match is determined based on the matched trajectory information and historical matched trajectory information, then the matched trajectory information is determined as the target trajectory information;
[0094] Use the trajectory identifier of the target trajectory information as indication information.
[0095] For example, if the matched trajectory information and the historical matched trajectory information belong to different trajectory segments, or belong to the same trajectory segment, but the matched trajectory information is not the next frame trajectory information of the historical matched trajectory information, then the matched trajectory information is determined as the target trajectory information, the trajectory identifier of the target trajectory information is used as the indication information, and the indication information is sent to the client. When the client receives the indication information, it obtains the trajectory information corresponding to the trajectory identifier from the second motion capture trajectory set as the target trajectory information. At this time, the trajectory information of the moving object obtained by the client and the server are both the target trajectory information, that is, the server and the client synchronize the trajectory information of the moving object.
[0096] In one embodiment, since it is not necessary to send a trajectory identifier to the client when belonging to the same trajectory segment, the indication information may not include trajectory information. Therefore, the trajectory information synchronization method provided in this application embodiment may further include:
[0097] a401. If it is determined that no frame skipping match has occurred based on the matching trajectory information and the historical matching trajectory information, then the preset information will be used as the indication information.
[0098] a402. The candidate trajectory identifier is calculated based on the trajectory identifier of the historical matching trajectory information and the cumulative time for the trajectory segment;
[0099] a403. Perform trajectory transition processing on the candidate trajectory information corresponding to the candidate trajectory identifier in the first motion capture trajectory set to obtain the target trajectory information.
[0100] The preset information can be pre-set information, such as any number, letter, character, or a combination of one or more of them.
[0101] The cumulative time can be the time accumulated since the occurrence of a frame skip match. When a frame skip match occurs, the timer starts and continues until it is determined that no frame skip match has occurred in the current frame. When another frame skip match occurs, the cumulative time is reset to 0 and the timer restarts from 0.
[0102] For example, if no frame skipping match occurs, the preset information can be used as an indication and sent to the client, allowing the client to determine the target trajectory information based on the indication. Optionally, an empty value can be returned to the client based on the indication, allowing the client to determine the target trajectory information. The specific process for determining the target trajectory information can be found in the detailed description of steps a402-a403 below. Optionally, no information can be returned to the client. If the client does not receive the trajectory identifier, the client can refer to the detailed description of steps a402-a403 below.
[0103] The number of frames corresponding to the acquisition frame rate is determined based on the cumulative time. The trajectory identifier when the trajectory information contained in the trajectory segment k (trajectory segment k is any trajectory segment in the motion capture trajectory set) is matched for the first time is denoted as 'a'. Since the trajectory identifier is only sent to the client when a frame skipping match occurs, the trajectory identifier can be called the matched trajectory identifier. The number of frames is added to the matched trajectory identifier to obtain a new trajectory identifier. The new trajectory identifier can be a non-integer. The new trajectory identifier can be rounded down to obtain an integer k. The obtained integer k is used as the first candidate trajectory identifier. The calculation formula is as follows:
[0104]
[0105] Among them, Index new Index is the identifier for the first candidate trajectory. last This is the trajectory identifier for the target trajectory information obtained when frame skipping occurs. Tick represents the cumulative time of the server or client, and FR represents the trajectory acquisition frame rate of the motion capture trajectory library. This is for rounding down to the nearest integer.
[0106] The basic idea for calculating the first candidate trajectory identifier is as follows: calculate the ratio of the cumulative time of the server or client to the single frame time of the trajectory segment, and obtain the number of frames that the server or client needs to display in the cumulative time under the acquisition frame rate. Add the matching trajectory identifier to the number of frames that need to be displayed to obtain the trajectory identifier of the trajectory information that the server or client should display at the current time. Round the trajectory identifier to find the corresponding trajectory information in the trajectory segment.
[0107] Since the new trajectory identifier is located between the first candidate trajectory identifier and the next trajectory identifier of the candidate trajectory identifier (hereinafter referred to as the second candidate trajectory identifier), the target trajectory information can be calculated based on the first candidate trajectory information corresponding to the first candidate trajectory identifier and the second candidate trajectory information corresponding to the second candidate trajectory identifier. For example, the first candidate trajectory information and the second candidate trajectory information can be averaged and the trajectory information obtained by averaging can be used as the target trajectory information.
[0108] In one embodiment, the proportions of the first and second candidate trajectory information in the target trajectory information can be determined based on the relationship between the new trajectory identifier and the first and second candidate trajectory identifiers. For example, if the new trajectory identifier is 1.3, the first candidate trajectory identifier is 1, and the second candidate trajectory identifier is 2, since the new trajectory identifier is closer to the first candidate trajectory identifier, the proportion of the first candidate trajectory information can be higher than that of the second candidate trajectory information when generating the target trajectory information. This ensures a natural transition between the obtained target trajectory information and the trajectory information of the previous frame. Specifically, the step "perform trajectory transition processing on the candidate trajectory information to obtain the target trajectory information" can include:
[0109] The interpolation coefficients are calculated based on the cumulative time of the trajectory segment;
[0110] Interpolation coefficients are used to interpolate the candidate trajectory information to obtain the target trajectory information.
[0111] For example, specifically, one could calculate the number of frames corresponding to the cumulative time, round down to the nearest integer, subtract the integer from the cumulative time to get the decimal part of the frame number, and use this decimal part as the interpolation coefficient. The calculation formula could be as follows:
[0112]
[0113] Where α is the interpolation coefficient.
[0114] From the above formula, we know that α < 1. Therefore, 1-α can be used as the proportion of the first candidate trajectory information, and α can be used as the proportion of the second candidate trajectory information. Specifically, the target trajectory information can be calculated using the following formula:
[0115]
[0116] Among them, Traj new This represents the target trajectory information obtained through interpolation. Index is the first candidate trajectory identifier new The corresponding first candidate trajectory information, The second candidate trajectory is identified by the second candidate trajectory identifier.
[0117] Interpolation processing is performed on the first and second candidate trajectory information to make the transition between the target trajectory information and the trajectory information corresponding to the previous animation frame more natural, the animation displayed by the client based on the target trajectory information is smoother, and the timing of the client or server is consistent with the motion capture trajectory set.
[0118] 105. According to the instruction information, instruct the client to obtain the target trajectory information based on the locally preset second motion capture trajectory set, so that the client and the server can synchronously move the target trajectory information of the object.
[0119] For details on the process, please refer to the relevant description in step 104, which will not be repeated here.
[0120] After obtaining the target trajectory information, if it is necessary to obtain the pose information of the moving object, the pose information of the moving object in the next frame of the animation can be predicted by using a phase-function neural network (PFNN) based on the target trajectory information and the pose information of the moving object in the current animation frame (i.e., the pose information of the current frame). In one embodiment, the trajectory information synchronization method provided in this application may further include:
[0121] Obtain the current frame pose information of the moving object;
[0122] Pose prediction is performed based on the current frame pose information and the target trajectory information to obtain the associated frame pose information of the moving object.
[0123] Among them, the pose information of the associated frame can be the pose information of the moving object to be displayed in the next animation frame of the current animation frame.
[0124] For example, since the current frame animation is an animation frame that has already been displayed on the client, the current frame pose information of the moving object can be obtained from the cache or memory. The current frame pose information and the target trajectory information are then input into the PFNN network for pose prediction to obtain the associated frame pose information of the moving object.
[0125] The client needs to display the corresponding animation frames based on the target trajectory information. Therefore, after obtaining the target trajectory information, the client needs to predict the associated frame pose information of the moving object based on the target trajectory information. That is, in one embodiment, the step "instructing the client to obtain the target trajectory information based on its second motion capture trajectory set" may specifically include:
[0126] The client is instructed to obtain target trajectory information based on its second motion capture trajectory set, and to obtain the current frame pose information of the moving object. Based on the current frame pose information and the target trajectory information obtained from the second motion capture trajectory set, pose prediction is performed to obtain the associated frame pose information of the moving object, and the corresponding action of the moving object is displayed based on the associated frame pose information.
[0127] The process of the client obtaining target trajectory information and related frame pose information can be referred to the above description, and will not be repeated here. The client processes the related frame pose information, such as skinning and rendering, to obtain animation frames, and displays them to show the actions corresponding to the moving object.
[0128] As can be seen from the above, the embodiments of this application obtain control information for the moving object sent by the client and the first motion capture trajectory set of the server; calculate the current frame trajectory information of the moving object according to the control information; match the current frame trajectory information with the trajectory information in the first motion capture trajectory set to determine the matching trajectory information from the first motion capture trajectory set; determine the target trajectory information according to the trajectory relationship between the matching trajectory information and the historical matching trajectory information, and generate instruction information to instruct the client to obtain the target trajectory information; instruct the client to obtain the target trajectory information based on the locally preset second motion capture trajectory set according to the instruction information, so that the client and the server synchronize the target trajectory information of the moving object.
[0129] This solution generates corresponding indication information by matching the trajectory information with historically matched trajectory information. Based on the indication information, the client is instructed to obtain the target trajectory information from the second motion capture trajectory set. Therefore, it is not necessary to send the target trajectory information of the moving object to the client, but can synchronize the target trajectory information of the moving object with the client. This allows the client to obtain the pose information of the moving object based on the target trajectory information, reducing the occupation of network resources. Moreover, the client does not need to wait to obtain the target trajectory information before displaying the movement of the moving object, thus improving the smoothness of the motion animation displayed on the client.
[0130] Based on the above embodiments, the following examples will provide further detailed explanations.
[0131] This embodiment will be described from the perspective of a trajectory information synchronization system. The trajectory information synchronization system may include a server and a client on a terminal. The server pre-stores first motion capture trajectory information, which may include multiple trajectory segments. Each trajectory segment may include multiple frames of trajectory information, and each trajectory information corresponds to a trajectory index. The client pre-stores second motion capture trajectory information, which contains the same content as the first motion capture trajectory information.
[0132] This application provides a method for synchronizing trajectory information, such as... Figure 3 As shown, the specific process of this trajectory information synchronization method can be as follows:
[0133] 2011, The server loads the first set of motion capture trajectories.
[0134] For example, when the client is a game client, the server loads the first set of motion capture trajectories at the start of the game.
[0135] 2012, the client loads the second set of motion capture trajectories.
[0136] For example, when the client is a game client, the client loads the second motion capture trajectory set at the start of the game.
[0137] 202. The client obtains the initial control information for the moving object and sends the control information obtained by encoding the initial control information to the server.
[0138] For example, users can input initial control information for moving objects through clicks, swipes, and other operations on the display page provided by the client. The client obtains this initial control information, encodes it to obtain control information, and then sends the control information to the server.
[0139] 203. The server calculates the current frame trajectory information of the moving object based on the control information.
[0140] For example, the server can determine the direction and speed of a moving object based on control information, using the speed as the moving object's speed in the 12th frame. By performing linear interpolation on the moving speed, the moving object's speed in each of the next 6 frames can be obtained. The linear interpolation can be calculated using the following formula:
[0141] Vel i =(1-β) i )·Vel6+β i ·Vel 12
[0142]
[0143] Among them, Vel i β represents the moving speed of the moving object in the i-th frame. i The interpolation coefficients are those corresponding to the i-th frame.
[0144] The time interval between two animation frames can be determined based on the display frame rate. The average speed of the moving object in the 6th and 7th frames can be calculated. Multiplying the average speed by the time interval gives the distance the moving object has traveled. Adding the distance traveled in the direction of movement to the position information of the moving object in the current animation frame gives the position information of the moving object in the 7th frame. And so on, the movement speed and position information of the moving object in each of the next 6 frames can be calculated.
[0145] Optionally, the direction information for the next 6 frames can be the same as the direction information in the control information, or the direction information in the control information can be used as the direction information for the 12th frame. Referring to the method of obtaining the velocity information of each frame in the next 6 frames through linear interpolation, the server can perform linear interpolation on the direction information to obtain the direction information for each frame in the next 6 frames.
[0146] The server obtains the trajectory information of the current frame based on the phase, position, direction, and velocity information of the current frame, the position, direction, and velocity information of the past 5 frames, and the position, direction, and velocity information of the next 6 frames.
[0147] 204. The server performs trajectory matching between the current frame trajectory information and the trajectory information in the first motion capture trajectory set to determine the matching trajectory information from the first motion capture trajectory set and records the trajectory index of the matching trajectory information.
[0148] For example, it can be to calculate the distance between the current frame trajectory information and each trajectory information in the first motion capture trajectory set. The smaller the distance, the greater the similarity between the current frame trajectory information and the trajectory information in the first motion capture trajectory set. The trajectory information in the first motion capture trajectory set that is closest to the trajectory information (i.e., has the greatest similarity) is taken as the matching trajectory information.
[0149] 205. If a frame skipping match occurs, the server sends the trajectory index of the matching trajectory information to the client and executes step 2061. If no frame skipping match occurs, the server does not return the trajectory index and executes step 2071.
[0150] For example, if a frame skipping match occurs, the server sends the trajectory index to the client. If no frame skipping trajectory occurs, the server does not send the trajectory index and may return other information or not return any information.
[0151] 2061. The server retrieves the matching trajectory information corresponding to the trajectory index from the first motion capture trajectory library as the target trajectory information.
[0152] The server retrieves the matching trajectory information corresponding to the trajectory index from the first motion capture trajectory library as the target trajectory information.
[0153] 2062. If a trajectory index is received, the client retrieves the target trajectory information corresponding to the trajectory index from the second motion capture trajectory library.
[0154] The client retrieves the target trajectory information corresponding to the trajectory index from the second motion capture trajectory library.
[0155] 2071. The server calculates the first candidate trajectory index and the second candidate trajectory index based on the matching trajectory index and the cumulative time of frame skipping matching, and calculates the interpolation coefficient based on the cumulative time and the acquisition frame rate.
[0156] For example, the server can calculate the first candidate trajectory index according to the following formula, and use the trajectory index of the next frame of trajectory information corresponding to the first candidate trajectory index as the second candidate trajectory index.
[0157]
[0158] The server calculates the number of frames corresponding to the cumulative time, and then rounds down to the nearest integer. The frame number is then subtracted from the integer to obtain the decimal part of the frame number. This decimal part is used as an interpolation factor. The calculation formula can be as follows:
[0159]
[0160] Where α is the interpolation coefficient.
[0161] 2081. The server performs interpolation processing on the first candidate trajectory information and the second candidate trajectory information according to the interpolation coefficient to obtain the target trajectory information.
[0162] For example, the target trajectory information can be calculated using the following formula:
[0163]
[0164] The server can move the object's future trajectory information based on the target trajectory information.
[0165] 2072. If no trajectory index is received, the client calculates the first candidate trajectory information and the second candidate trajectory information based on the matching trajectory index, and calculates the interpolation coefficient based on the cumulative time of frame skipping matching and the acquisition frame rate.
[0166] You can refer to the process in step 2071, which will not be repeated here.
[0167] 2082. The client performs interpolation processing on the first candidate trajectory information and the second candidate trajectory information according to the interpolation coefficient to obtain the target trajectory information.
[0168] You can refer to the process in step 2081, which will not be repeated here.
[0169] 209. The client predicts the associated frame pose information of the moving object based on the target trajectory information and the current frame pose information of the moving object.
[0170] The client can use Phase-Functioned Neural Networks (PFNN) to predict the pose information of the moving object in the next frame of the animation based on the target trajectory information and the current frame pose information of the moving object in the current animation frame (associated frame pose information).
[0171] 210. The client plays the animation based on the pose information of the associated frames.
[0172] The client processes the pose information of the associated frames, such as performing skinning and rendering, to obtain animation frames, which are then displayed to show the actions corresponding to the moving objects.
[0173] As can be seen from the above, in this embodiment of the application, the server loads a first motion capture trajectory set; the client loads a second motion capture trajectory set; the client obtains initial control information for the moving object and sends the encoded control information obtained from the initial control information to the server; the server calculates the current frame trajectory information of the moving object based on the control information; the server matches the current frame trajectory information with the trajectory information in the first motion capture trajectory set to determine the matching trajectory information from the first motion capture trajectory set and records the trajectory index of the matching trajectory information; if a frame skipping match occurs, the server sends the trajectory index of the matching trajectory information to the client; if no frame skipping match occurs, the server does not return the trajectory index; the server obtains the matching trajectory information corresponding to the trajectory index from the first motion capture trajectory library as the target trajectory information; the client obtains the matching trajectory information from the second motion capture trajectory library... The server retrieves the target trajectory information corresponding to the trajectory index from the trajectory library; calculates the first and second candidate trajectory indices based on the matching trajectory index and the cumulative time of frame skipping matching, and calculates interpolation coefficients based on the cumulative time and the acquisition frame rate; the server interpolates the first and second candidate trajectory information based on the interpolation coefficients to obtain the target trajectory information; the client calculates the first and second candidate trajectory information based on the matching trajectory index, and calculates interpolation coefficients based on the cumulative time of frame skipping matching and the acquisition frame rate; the client interpolates the first and second candidate trajectory information based on the interpolation coefficients to obtain the target trajectory information; the client predicts the associated frame pose information of the moving object based on the target trajectory information and the current frame pose information of the moving object; the client plays the animation based on the associated frame pose information.
[0174] When a frame skipping match occurs, the server in this scheme instructs the client to obtain the target trajectory information from the second motion capture trajectory set through the trajectory index. When there is no frame skipping match, the trajectory index is not returned. Since the amount of data identified by the index is small, the network resource consumption can be reduced. Furthermore, the trajectory identifier is only returned when a frame skipping match occurs, reducing the number of times information is sent and further reducing the network resource consumption.
[0175] Secondly, the server obtains the target trajectory information through interpolation calculation and instructs the client to obtain the target trajectory information through interpolation calculation as well. This ensures that the timing of the actions of the server and client is consistent with the first motion capture trajectory set (or the second motion capture trajectory set), reducing the frequency of slippage during the movement of the moving object and improving the smoothness of the motion animation displayed on the client.
[0176] To facilitate better implementation of the trajectory information synchronization method provided in this application embodiment, a trajectory information synchronization device is also provided in one embodiment. The meanings of the terms used are the same as in the trajectory information synchronization method described above, and specific implementation details can be found in the description of the method embodiment.
[0177] This trajectory information synchronization device can be integrated into a computer device, such as... Figure 4 As shown, the trajectory information synchronization device may include: an acquisition unit 301, a calculation unit 302, a matching unit 303, a relationship determination unit 304, and an indication unit 305, as detailed below:
[0178] (1) Acquisition unit 301 is used to acquire control information for the moving object sent by the client, and the first motion capture trajectory set of the server.
[0179] (2) Calculation unit 302 is used to calculate the current frame trajectory information of the moving object based on the control information.
[0180] (3) Matching unit 303 is used to match the trajectory information of the current frame with the trajectory information in the first motion capture trajectory set to determine the matching trajectory information from the first motion capture trajectory set.
[0181] In one embodiment, the matching unit includes a similarity calculation subunit and a trajectory determination subunit, specifically:
[0182] The similarity calculation subunit is used to calculate the similarity between the current frame trajectory information and each trajectory information in the first motion capture trajectory set;
[0183] The trajectory determination subunit is used to determine the trajectory information with the highest similarity to the trajectory information of the current frame in the first motion capture trajectory set as the matching trajectory information.
[0184] (4) Relationship determination unit 304 is used to determine the target trajectory information based on the trajectory relationship between the matched trajectory information and the historical matched trajectory information, and generate instruction information to instruct the client to obtain the target trajectory information.
[0185] In one embodiment, the relationship determination unit includes a relationship determination subunit and a first information determination subunit, specifically:
[0186] The relationship determination subunit is used to determine the matching trajectory information as the target trajectory information if a frame skipping match is determined based on the matching trajectory information and the historical matching trajectory information.
[0187] The first information determination subunit is used to use the trajectory identifier of the target trajectory information as indication information.
[0188] In one embodiment, the relationship determination unit further includes a second information determination subunit, an identifier calculation subunit, and a transition processing subunit, specifically:
[0189] The second information determination subunit is used to use preset information as indication information if it is determined from the matching trajectory information and the historical matching trajectory information that no frame skipping matching has occurred.
[0190] The identifier calculation subunit is used to calculate the candidate trajectory identifier based on the trajectory identifier of historical matching trajectory information and the cumulative time for the trajectory segment;
[0191] The transition processing subunit is used to perform trajectory transition processing on the candidate trajectory information corresponding to the candidate trajectory identifier in the first motion capture trajectory set to obtain the target trajectory information.
[0192] In one embodiment, trajectory transition processing is performed on the candidate trajectory information to obtain the target trajectory information, including a coefficient calculation subunit and an interpolation processing subunit, specifically:
[0193] The coefficient calculation subunit is used to calculate the interpolation coefficients based on the cumulative time of the trajectory segment;
[0194] The interpolation processing subunit is used to interpolate the candidate trajectory information using interpolation coefficients to obtain the target trajectory information.
[0195] (5) Instruction unit 305 is used to instruct the client to obtain target trajectory information based on the local preset second motion capture trajectory set according to the instruction information, so that the client and the server can synchronously move the target trajectory information of the object.
[0196] In one embodiment, the indicating unit includes an indicating subunit, specifically:
[0197] The instruction subunit is used to instruct the client to obtain target trajectory information based on its second motion capture trajectory set, and to instruct the client to obtain the current frame pose information of the moving object. Based on the current frame pose information and the target trajectory information obtained from the second motion capture trajectory set, pose prediction is performed to obtain the associated frame pose information of the moving object, and the corresponding action of the moving object is displayed based on the associated frame pose information.
[0198] In one embodiment, the trajectory information synchronization device further includes a pose acquisition unit and a pose prediction unit, specifically:
[0199] The pose acquisition unit is used to acquire the current frame pose information of the moving object;
[0200] The pose prediction unit is used to predict the pose based on the current frame pose information and the target trajectory information to obtain the associated frame pose information of the moving object.
[0201] As can be seen from the above, the trajectory information synchronization device in this application embodiment acquires control information for the moving object sent by the client and the first motion capture trajectory set of the server through the acquisition unit 301; the calculation unit 302 calculates the current frame trajectory information of the moving object according to the control information; the matching unit 303 matches the current frame trajectory information with the trajectory information in the first motion capture trajectory set to determine the matching trajectory information from the first motion capture trajectory set; the relationship determination unit 304 determines the target trajectory information according to the trajectory relationship between the matching trajectory information and the historical matching trajectory information, and generates the instruction information to instruct the client to acquire the target trajectory information; finally, the instruction unit 305 instructs the client to acquire the target trajectory information based on the locally preset second motion capture trajectory set according to the instruction information, so that the client and the server synchronize the target trajectory information of the moving object.
[0202] This solution generates corresponding indication information by matching the trajectory information with historically matched trajectory information. Based on the indication information, the client is instructed to obtain the target trajectory information from the second motion capture trajectory set. Therefore, the trajectory information synchronization device does not need to send the target trajectory information of the moving object to the client, but can synchronize the target trajectory information of the moving object with the client. The client can obtain the pose information of the moving object based on the target trajectory information, which reduces the occupation of network resources. Moreover, the client does not need to wait to obtain the target trajectory information before displaying the movement of the moving object, which improves the smoothness of the motion animation displayed on the client.
[0203] This application also provides a computer device, which can be a terminal or a server, such as... Figure 5 As shown, it illustrates a structural schematic diagram of the computer device involved in the embodiments of this application, specifically:
[0204] The computer device may include components such as a processor 1001 with one or more processing cores, a memory 1002 with one or more computer-readable storage media, a power supply 1003, and an input unit 1004. Those skilled in the art will understand that... Figure 5 The computer device structure shown does not constitute a limitation on the computer device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:
[0205] The processor 1001 is the control center of the computer device. It connects various parts of the computer device via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 1002, and by calling data stored in the memory 1002, it performs various functions of the computer device and processes data, thereby providing overall monitoring of the computer device. Optionally, the processor 1001 may include one or more processing cores; preferably, the processor 1001 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and computer programs, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 1001.
[0206] The memory 1002 can be used to store software programs and modules. The processor 1001 executes various functional applications and data processing by running the software programs and modules stored in the memory 1002. The memory 1002 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, computer programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 1002 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 1002 may also include a memory controller to provide the processor 1001 with access to the memory 1002.
[0207] The computer equipment also includes a power supply 1003 that supplies power to the various components. Preferably, the power supply 1003 can be logically connected to the processor 1001 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 1003 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0208] The computer device may also include an input unit 1004, which can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0209] Although not shown, the computer device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 1001 in the computer device loads the executable files corresponding to the processes of one or more computer programs into the memory 1002 according to the following instructions, and the processor 1001 runs the computer programs stored in the memory 1002 to realize various functions, as follows:
[0210] Obtain control information for the moving object sent by the client, as well as the first set of motion capture trajectories from the server;
[0211] Calculate the current frame trajectory information of the moving object based on the control information;
[0212] The trajectory information of the current frame is matched with the trajectory information in the first motion capture trajectory set to determine the matching trajectory information from the first motion capture trajectory set;
[0213] Based on the trajectory relationship between the matched trajectory information and the historical matched trajectory information, the target trajectory information is determined, and an instruction message is generated to instruct the client to obtain the target trajectory information;
[0214] The client is instructed to obtain target trajectory information based on a locally preset second motion capture trajectory set, so that the client and server can synchronize the target trajectory information of the moving object.
[0215] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0216] As can be seen from the above, the computer device in this application embodiment can obtain control information for a moving object sent by the client and a first motion capture trajectory set of the server; calculate the current frame trajectory information of the moving object based on the control information; match the current frame trajectory information with the trajectory information in the first motion capture trajectory set to determine the matching trajectory information from the first motion capture trajectory set; determine the target trajectory information based on the trajectory relationship between the matching trajectory information and the historical matching trajectory information, and generate instruction information to instruct the client to obtain the target trajectory information; instruct the client to obtain the target trajectory information based on a locally preset second motion capture trajectory set according to the instruction information, so that the client and the server synchronize the target trajectory information of the moving object.
[0217] In this solution, the computer device generates corresponding indication information by matching the trajectory information with historically matched trajectory information. Based on the indication information, the computer device instructs the client to obtain the target trajectory information from the second motion capture trajectory set. Therefore, the computer device does not need to send the target trajectory information of the moving object to the client, but can synchronize the target trajectory information of the moving object with the client. This allows the client to obtain the pose information of the moving object based on the target trajectory information, reducing the occupation of network resources. Moreover, the client does not need to wait to obtain the target trajectory information before displaying the movement of the moving object, thus improving the smoothness of the motion animation displayed on the client.
[0218] According to one aspect of this application, a computer program product is provided, comprising a computer program containing computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various optional implementations of the above embodiments.
[0219] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by a computer program, or by a computer program controlling related hardware. The computer program can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0220] Therefore, embodiments of this application provide a computer-readable storage medium storing a computer program that can be loaded by a processor to execute any of the trajectory information synchronization methods provided in embodiments of this application.
[0221] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0222] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0223] Since the computer program stored in the computer-readable storage medium can execute any of the trajectory information synchronization methods provided in the embodiments of this application, the beneficial effects that any of the trajectory information synchronization methods provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.
[0224] The foregoing has provided a detailed description of a trajectory information synchronization method, apparatus, computer device, and computer-readable storage medium provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A trajectory information synchronization method, characterized by, include: Obtain control information for the moving object sent by the client, as well as the first set of motion capture trajectories from the server; Calculate the current frame trajectory information of the moving object based on the control information; The current frame trajectory information is matched with the trajectory information in the first motion capture trajectory set to determine the matching trajectory information from the first motion capture trajectory set; Based on the trajectory relationship between the matched trajectory information and the historical matched trajectory information, the target trajectory information is determined, and an instruction message is generated to instruct the client to obtain the target trajectory information; The client is instructed to obtain target trajectory information based on a locally preset second motion capture trajectory set, thereby synchronizing the target trajectory information of the moving object with the server.
2. The method of claim 1, wherein, The step of determining the target trajectory information based on the trajectory relationship between the matched trajectory information and the historical matched trajectory information, and generating instruction information to instruct the client to obtain the target trajectory information, includes: If a frame skipping match is determined to have occurred based on the matching trajectory information and the historical matching trajectory information, then the matching trajectory information is determined as the target trajectory information; The trajectory identifier of the target trajectory information is used as the indication information.
3. The method of claim 2, wherein, The method further includes: If it is determined that no frame skipping match has occurred based on the matching trajectory information and the historical matching trajectory information, then the preset information will be used as the indication information. Candidate trajectory identifiers are calculated based on the trajectory identifiers of the historical matching trajectory information and the cumulative time for the trajectory segment; The candidate trajectory information corresponding to the candidate trajectory identifier in the first motion capture trajectory set is subjected to trajectory transition processing to obtain the target trajectory information.
4. The method of claim 3, wherein, The process of performing trajectory transition processing on the candidate trajectory information to obtain the target trajectory information includes: The interpolation coefficients are calculated based on the cumulative time of the trajectory segment. The candidate trajectory information is interpolated using the interpolation coefficients to obtain the target trajectory information.
5. The method of claim 1, wherein, The method further includes: Obtain the current frame pose information of the moving object; Based on the current frame pose information and the target trajectory information, pose prediction is performed to obtain the associated frame pose information of the moving object.
6. The method of claim 5, wherein, The instruction to the client to obtain target trajectory information based on its second motion capture trajectory set includes: The client is instructed to obtain target trajectory information based on its second motion capture trajectory set, and to obtain the current frame pose information of the moving object. Based on the current frame pose information and the target trajectory information obtained from the second motion capture trajectory set, pose prediction is performed to obtain the associated frame pose information of the moving object, and the action corresponding to the moving object is displayed based on the associated frame pose information.
7. The method according to any one of claims 1-6, characterized in that, The step of matching the current frame trajectory information with the trajectory information in the first motion capture trajectory set to determine the matching trajectory information from the first motion capture trajectory set includes: Calculate the similarity between the current frame trajectory information and each trajectory information in the first motion capture trajectory set; The trajectory information in the first motion capture trajectory set that has the highest similarity to the trajectory information of the current frame is determined as the matching trajectory information.
8. A trajectory information synchronization device, characterized in that, include: The acquisition unit is used to acquire control information for the moving object sent by the client, as well as the first set of motion capture trajectories from the server. The calculation unit is used to calculate the current frame trajectory information of the moving object based on the control information; A matching unit is used to match the current frame trajectory information with the trajectory information in the first motion capture trajectory set, so as to determine the matching trajectory information from the first motion capture trajectory set; The relationship determination unit is used to determine the target trajectory information based on the trajectory relationship between the matched trajectory information and the historical matched trajectory information, and to generate indication information that instructs the client to obtain the target trajectory information; The instruction unit is used to instruct the client to obtain target trajectory information based on a locally preset second motion capture trajectory set according to the instruction information, so that the client and the server synchronize the target trajectory information of the moving object.
9. A computer device, characterized in that, It includes a memory and a processor; the memory stores a computer program, and the processor is used to run the computer program in the memory to perform the trajectory information synchronization method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program, which is loaded by a processor to perform the trajectory information synchronization method according to any one of claims 1 to 7.