Motion sequence prediction method and device, electronic device, computer readable storage medium and computer program product
By selecting representative samples from reference motion sequence samples and using a large language model for context learning, combined with skeleton structure information to generate motion sequence prompts, the problems of high computational resource consumption and inaccurate prediction in existing technologies are solved, achieving efficient and accurate human motion prediction.
Patent Information
- Application Number
- CN202610701118.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2025-05-22
- Filing Date
- 2026-05-20
- Publication Date
- 2026-11-24
AI Technical Summary
Existing technologies require significant computational resources and development costs for predicting human motion, and existing language models struggle to accurately predict human motion sequences with limited sample sizes.
By selecting representative target samples from multiple reference motion sequence samples, using a large language model for context learning, and combining prior information about the skeleton structure to generate motion sequence prompts, the large language model can be directly used for human motion prediction, omitting the training process.
It improves the accuracy and robustness of human motion prediction, reduces computational resource consumption, and supports various application scenarios such as human-computer interaction, human tracking, and autonomous driving.
Smart Images

Figure CN123160737A_ABST
Abstract
Description
[0001] Related cross-references This application claims priority to Singapore application 10202501337W, filed on 22 May 2025, the disclosure of which is incorporated herein by reference in its entirety. Technical Field
[0002] This disclosure relates to artificial intelligence technology, and more specifically, to a method and apparatus for predicting motion sequences, electronic devices, computer-readable storage media, and computer program products. Background Technology
[0003] Human motion prediction aims to predict future human motion sequences based on previously observed motion sequences. It is associated with a variety of applications, such as human-computer interaction, human tracking, and autonomous driving. In recent years, few-shot human motion prediction has received increasing research attention. Studies have noted that for each new human action, only a small number of motion samples are needed to greatly facilitate the application of human motion prediction in the real world. To perform few-shot motion prediction, existing methods typically construct a two-step process: (1) On a large set of motion samples belonging to certain basic human actions, a specific model is first trained through a basic training process specifically designed for the motion prediction task. (2) Then, the specific model obtained in step (1) is adapted to a small number of motion samples belonging to each new human action. Considering that a specific motion prediction model needs to be trained in this process, the two-step process in existing technologies requires a large amount of computational resources and development costs in practical applications. Summary of the Invention
[0004] This disclosure provides a motion sequence prediction method and apparatus, electronic device, computer-readable storage medium, and computer program product, which can eliminate the language model training process to save computing resources and improve the prediction accuracy by using a small amount of third-party text representation to make the motion prediction sequence output by the language model more robust.
[0005] The specific implementation of the technical solution in this disclosure is as follows.
[0006] Embodiments of this disclosure provide a motion sequence prediction method, including: Determine the target motion sequence sample representing the multiple reference motion sequence samples from multiple reference motion sequence samples; Based on the target motion sequence sample, the first language model is used to perform context learning based on the motion sequence prediction task to obtain the second language model; Based on the association between the motion sequence and the description, as well as prior information about the skeleton structure, a first prompt corresponding to the first motion sequence is generated; and Based on the first prompt, a second motion sequence corresponding to the first motion sequence is generated using a second language model, wherein the timestamp of the second motion sequence is adjacent to the timestamp of the first motion sequence, and the timestamp of the second motion sequence is later than the timestamp of the first motion sequence.
[0007] Embodiments of this disclosure provide a motion sequence prediction device, comprising: The sample selection module is configured to: determine a target motion sequence sample representing the multiple reference motion sequence samples from multiple reference motion sequence samples; The context learning module is configured to perform context learning on the first language model based on the target motion sequence sample to obtain a second language model. The prompting module is configured to: generate a first prompt corresponding to the first motion sequence based on the association between the motion sequence and the description, as well as prior information about the skeleton structure; and The prediction module is configured to generate a second motion sequence corresponding to the first motion sequence based on the first prompt and using a second language model, wherein the timestamp of the second motion sequence is adjacent to the timestamp of the first motion sequence and the timestamp of the second motion sequence is later than the timestamp of the first motion sequence.
[0008] In the above scheme, the prompting module is also used to: encode the skeletal animation data corresponding to the first motion sequence to obtain a first text representation of the first motion sequence; and edit the first text representation based on the association between the motion sequence and the description and the prior information of the skeleton structure to obtain a first prompt corresponding to the first motion sequence.
[0009] In the above scheme, the prompting module is further configured to: combine the first coordinates of multiple joints in the first text representation based on prior information about the skeleton structure to obtain coordinate data corresponding to the first motion sequence; and generate a first prompt corresponding to the first motion sequence based on the association between the motion sequence and the description, and the coordinate data corresponding to the first motion sequence. The association between the motion sequence and the description is used to constrain the first prompt to include a first instruction and a second instruction; the first instruction is located before the second instruction in the first prompt; the first instruction is used to instruct the second language model to describe the action corresponding to the first motion sequence based on the coordinate data corresponding to the first motion sequence; and the second instruction is used to instruct the second language model to predict the second coordinates of each joint in the second motion sequence.
[0010] In the above scheme, the prior information of the skeleton structure includes the joint sequence following the kinematic chain of the human skeleton, and the prompting module is also configured to perform the following processing on each of the multiple frames involved in the first text representation: sort the multiple joints in the frame according to the joint sequence to obtain a joint sequence; fill the first coordinates of the multiple joints into the position of each joint in the joint sequence to obtain the coordinate data of the frame; and combine the coordinate data of the multiple frames involved in the first text representation according to the order of the multiple frames to obtain the coordinate data corresponding to the first motion sequence.
[0011] In the above scheme, the prediction module is also configured to: generate a third text representation based on the first cue using a second language pattern; and decode the third text representation to obtain skeletal animation data representing the second motion sequence.
[0012] In the above scheme, the context learning module is further configured to: encode the skeletal animation data corresponding to the target motion sequence sample to obtain a second text representation of the target motion sequence sample; and perform the following processing on the second text representation of each sample in the target motion sequence sample: extract coordinate data of multiple first frames from the second text representation as coordinate data of known frames, and extract coordinate data of multiple second frames from the second text representation as coordinate data of unknown frames, wherein the timestamp of the first frame is earlier than the timestamp of the second frame, and the first frame and the second frame are consecutive frames; generate a second prompt based on the coordinate data of the known frames, wherein the second prompt is used to instruct the first language model to predict the coordinate data of the unknown frames; generate a coordinate prediction result corresponding to the unknown frames through the first language model based on the second prompt; and input the coordinate data of the unknown frames into the first language model.
[0013] In the above scheme, the sample selection module is further configured to: obtain an array corresponding to each of the multiple reference motion sequence samples; initialize the first set as an empty set and initialize the second set as a set including all arrays; when the number of elements in the first set is less than a first threshold, iteratively perform the following processing: obtain arrays belonging to the second set but not to the first set, and merge these arrays with the first set respectively to obtain a third set; determine the representative score of each third set relative to the second set, and obtain the target third set with the highest representative score; remove arrays from the second set that were merged with the first set to obtain the target third set, and add these removed arrays to the first set; and when the number of elements in the first set is equal to the first threshold, determine the reference motion sequence sample corresponding to the array included in the first set as the target reference motion sequence sample.
[0014] In the above scheme, the sample selection module is also configured to: initialize the associated set of the third set to the third set, and initialize the set to be traversed to the third set; when the set to be traversed is not empty, perform the following processing on the set to be traversed: obtain the matching set corresponding to the set to be traversed; when an array related to the set to be traversed is determined in the matching set, add the related array to the associated set, and replace all arrays in the set to be traversed with the related array; and when no array related to the set to be traversed is determined in the matching set, determine the number of arrays included in the associated set as the representative score of the third set, and update the set to be traversed to an empty set.
[0015] In the above scheme, the sample selection module is also configured to: obtain an array that belongs to the second set but not to the associated set; and use the obtained array to form a matching set corresponding to the set to be traversed.
[0016] In the above scheme, the sample selection module is further configured to: determine the relevance between arrays in the second set; perform the following processing on each array in the set to be traversed: based on the relevance between arrays in the second set, obtain the relevance between the arrays in the set to be traversed and each array in the set to be matched; for each array combination formed by the arrays in the set to be traversed and each array in the set to be matched, generate a random number corresponding to each array combination; and when the random number of the array combination is less than the corresponding relevance, determine the array in the set to be matched that corresponds to the array combination as the array related to the set to be traversed.
[0017] Embodiments of this disclosure provide an electronic device, including: Memory, configured to store computer-executable instructions; and The processor is configured to execute a motion sequence prediction method according to embodiments of the present disclosure when executing computer-executable instructions stored in memory.
[0018] Embodiments of this disclosure provide a computer-readable storage medium having computer-executable instructions stored thereon, which, when executed by a processor, cause the processor to perform a motion sequence prediction method according to embodiments of this disclosure.
[0019] Embodiments of this disclosure provide a computer program product including computer-executable instructions that, when executed by a processor, cause the processor to perform a motion sequence prediction method according to embodiments of this disclosure.
[0020] The embodiments disclosed herein have the following beneficial effects.
[0021] A target motion sequence sample representing multiple reference motion sequence samples is determined. By selecting the target motion sequence sample from multiple reference motion sequence samples, the model can focus on key features and reduce the interference of redundant data. Based on the target motion sequence sample, the first language model is subjected to context learning based on the motion sequence prediction task to obtain a second language model. Through context learning based on the motion sequence prediction task, the temporal dependence and physical laws of the motion sequence are embedded into the language model, thereby enabling the language model to understand motion dynamics and improving the accuracy of the model in modeling continuous actions. Based on the association between the motion sequence and the description, as well as prior information on the skeleton structure, a first cue corresponding to the first motion sequence is generated; and based on the first cue, a second motion sequence corresponding to the first motion sequence is generated through the second language model, wherein the timestamp of the second motion sequence is adjacent to the timestamp of the first motion sequence, and the timestamp of the second motion sequence is later than the timestamp of the first motion sequence. Prior information on the skeleton structure is introduced as a constraint to ensure that the generated motion sequence conforms to biomechanical limitations (such as joint range of motion) and avoids unreasonable postures. Through the association between the motion sequence and the description, more precise semantic control is achieved. Furthermore, by combining the text understanding capabilities of language models with motion sequence generation, and bridging natural language descriptions and motion data through first cues, technical support is provided for scenarios such as semantic instruction-based human animation generation and interactive editing. Attached Figure Description
[0022] Figure 1 A schematic diagram of the structure of a motion sequence prediction system according to an embodiment of the present disclosure is shown.
[0023] Figure 2 A schematic diagram of the structure of a motion sequence prediction device according to an embodiment of the present disclosure is shown.
[0024] Figures 3A to 3C This is a schematic flowchart of a motion sequence prediction method according to an embodiment of the present disclosure.
[0025] Figure 4 This is a schematic diagram illustrating the core algorithm of a motion sequence prediction method according to an embodiment of the present disclosure.
[0026] Figure 5 This is a schematic diagram illustrating a user interface showing the association between a motion sequence and a description of a motion sequence prediction method according to an embodiment of the present disclosure.
[0027] Figure 6 This is a flowchart of a motion sequence prediction method according to an embodiment of the present disclosure. Detailed Implementation
[0028] To make the objectives, technical solutions, and advantages of this disclosure clearer, a more detailed description of this disclosure is provided below with reference to the accompanying drawings. The described embodiments should not be considered as limitations on this disclosure. All other embodiments obtained by those skilled in the art without inventive effort should fall within the protection scope of this disclosure.
[0029] In the following description, the term "some embodiments" describes a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0030] In the following description, the terms "first," "second," and "third" are used only to distinguish similar objects and not to describe a particular order of objects. It is understood that the order of "first," "second," and "third" may be interchanged where appropriate, so that the embodiments of this disclosure described herein may be implemented in an order other than that illustrated or described herein.
[0031] Unless otherwise defined, all technical and scientific terms used in the embodiments of this disclosure have the same meaning as commonly understood by one of ordinary skill in the art to which the embodiments of this disclosure pertain. The terminology used in the embodiments of this disclosure is for descriptive purposes only and is not intended to limit the scope of this disclosure.
[0032] Before describing the embodiments of this disclosure in further detail, the terminology used in the embodiments of this disclosure will be explained. The following explanations apply to the terminology used in the embodiments of this disclosure.
[0033] 1) Few-shot learning: It is a learning paradigm in which the model can generalize to new tasks or new categories using only a small number of labeled samples.
[0034] 2) Human Motion Prediction: This refers to the task of predicting future human postures based on observed posture sequences. Each posture is typically represented as 3D joint coordinates of the human skeleton.
[0035] 3) Implicit knowledge: This refers to knowledge acquired during pre-training that is not explicitly encoded in the weights for a specific task, but can be utilized through carefully crafted cues.
[0036] 4) Sequence-Description Linkage (or association between motion sequence and description): This is a technique in the embodiments of this disclosure for guiding a large language model (LLM) to map numerical motion sequences to their more familiar natural language motion descriptions.
[0037] 5) Kinematic-Chain-of-Thought: It is a structured design that predicts joints in an anatomically dependent order (e.g., predicting the trunk first, then the arms and legs) to reflect the natural laws of human movement.
[0038] 6) In-Context Learning: This refers to a learning paradigm that provides a small number of task examples in the same prompt (without updating the model weights), allowing the model to use these examples to infer task patterns and then perform the target operation.
[0039] 7) Motion-in-Context Learning: This is a novel variant of context learning proposed in this disclosure, specifically designed for motion data modeling. Its key innovation lies in: pre-selecting motion samples strongly correlated with the target task for exemplary dynamic demonstration, and establishing a test-feedback loop as an iterative optimization mechanism.
[0040] 8) Practice-Exam-Based Prompting: This is a unique prompting style that first asks the LLM to make a prediction, then gives the correct answer, and then asks them to reflect on and improve, which simulates human learning behavior.
[0041] 9) Representativeness Score: This score is calculated through a recursive diffusion process and measures how well a subset of motion samples captures the diversity and structure of the complete dataset.
[0042] 10) Diffusion-Based Sample Selection: This is an algorithm that selects the most informative and diverse motion samples based on the structural similarity between motion samples and the complete dataset, for use as contextual cues.
[0043] Human motion prediction aims to predict future human motion sequences based on previously observed motion sequences. It is associated with a variety of applications, such as human-computer interaction, human tracking, and autonomous driving. In recent years, few-shot human motion prediction has received increasing research attention. Studies have noted that for each new human action, only a small number of motion samples are needed to greatly facilitate the application of human motion prediction in the real world. To perform few-shot motion prediction, existing methods typically construct a two-step process: (1) On a large set of motion samples belonging to certain basic human actions, a specific model is first trained through a basic training process specifically designed for the motion prediction task. (2) Then, the specific model obtained in step (1) is adapted to a small number of motion samples belonging to each new human action. Considering that a specific motion prediction model needs to be trained in this process, the two-step process in existing technologies requires a large amount of computational resources and development costs in practical applications.
[0044] Furthermore, in implementing embodiments of this disclosure, the applicant discovered that general-purpose LLMs contain rich implicit knowledge. Leveraging this rich knowledge, by providing a small number of demonstrations of a task in the prompts as context (i.e., contextual learning), LLMs have been successfully used to handle various language-related tasks such as translation and question answering in a few-shot manner, without any training or fine-tuning. Based on this, the applicant discovered that LLMs can be directly used as human motion predictors without training a specific motion prediction model, enabling motion prediction in an efficient and completely training-free manner.
[0045] Generally, LLMs possess several useful characteristics for human motion prediction: (1) LLMs are pre-trained on extremely large corpora, which typically include rich descriptions of how humans behave and move when performing different actions (i.e., rich descriptions of human motion under different actions). Therefore, LLMs can possess rich knowledge of human motion. (2) In addition to natural language sentences, LLM-type training corpora typically also include rich programming data. After pre-training based on programming data containing a large number of numbers and coordinates, LLMs can also possess a certain numerical understanding capability. Here, the applicant notes that in human motion prediction tasks, each human posture in a motion sequence can essentially be interpreted as a specific combination of joint coordinates involving prior human motion. Thus, it is possible to utilize existing LLMs with the above two characteristics—by passing previously observed motion sequences as a list of joint coordinates to the LLM, thereby enabling human motion prediction without training.
[0046] However, despite LLM's success in handling various language-related tasks with few-shot approaches, achieving accurate few-shot human motion prediction without any further training is not easy due to the following challenges: (1) Although pre-trained on both natural language sentences and programmed data, LLM is not specifically pre-trained for human motion sequences. In other words, human motion sequences are not a format that LLM is "familiar" with. (2) The knowledge contained in LLM is "implicit." This means that while LLM may possess some knowledge helpful for human motion prediction tasks, successfully extracting this implicit knowledge from LLM remains challenging.
[0047] This disclosure provides a motion sequence prediction method and apparatus, electronic device, computer-readable storage medium, and computer program product, which can omit the language model training process to save computing resources, and improve the prediction accuracy by using a small amount of third-party text representation to make the motion prediction sequence output by the language model more robust.
[0048] The following describes exemplary applications of electronic devices according to embodiments of the present disclosure. These devices can be implemented as various types of user terminals, such as laptops, tablets, desktop computers, set-top boxes, and mobile devices (e.g., mobile phones, portable music players, personal digital assistants, dedicated messaging devices, and portable gaming devices), or as servers. Exemplary applications when the device is implemented as a terminal or server will be described below.
[0049] See Figure 1 , Figure 1 This is a schematic architecture diagram of a motion sequence prediction system according to an embodiment of the present disclosure. Terminal 400 is connected to server 200 via network 300, which may be a wide area network (WAN), a local area network (LAN), or a combination thereof.
[0050] During the data preparation phase, terminal 400 performs data acquisition to collect raw motion sequence data of the user or role in real time through sensors (such as inertial measurement units (IMUs), cameras, and motion capture devices). The raw data undergoes preprocessing such as denoising, interpolation, and timestamp alignment to generate standardized motion sequence samples, which are then uploaded to server 200 as reference motion sequence samples. These reference motion sequence samples are BVH files (Biovision hierarchical motion capture data files).
[0051] Server 200 filters target samples, that is, it selects the (most representative) target motion sequence samples from a large number of reference motion sequence samples. Server 200 loads the first language model (a large language model trained in a general way) and uses the target motion sequence samples to perform context learning to obtain the second language model.
[0052] Terminal 400 receives the input first motion sequence (which may be a current motion segment provided by the user (e.g., the real-time motion of a game character or the actions of a patient in rehabilitation training)); based on the preset association between the motion sequence and the description (e.g., a natural language template) and the prior information of the skeleton structure (motion tagging system), it converts the first motion sequence into a first prompt; and sends the first prompt to server 200.
[0053] The second language model deployed on server 200 parses the first cue, combines the first motion sequence to predict the second motion sequence (future action) with continuous timestamps, compresses the generated second motion sequence (e.g., joint data of the next 10 frames), and sends the compressed second motion sequence to the terminal.
[0054] Terminal 400 converts the second motion sequence into character animation (e.g., 3D skeletal animation, virtual human motion synthesis).
[0055] In a game scenario, the first motion sequence can be player movements captured in real time based on VR headsets or game consoles. Subsequently, the second motion sequence generated by the server can serve as a natural transition action (such as a protective bracing action when falling) to improve animation smoothness and immersion.
[0056] In medical rehabilitation scenarios, the terminal can collect the patient's gait as the first movement sequence through wearable devices, and the server generates personalized corrective movements as the second movement sequence to guide the patient in the next stage of training.
[0057] In film and animation production, the terminal receives keyframe sketches input by the animator as the first motion sequence, and the server automatically completes subsequent frames and optimizes motion details, thereby reducing the cost of manual drawing.
[0058] The terminal handles lightweight data acquisition and rendering, while the server centrally processes high-load computations, thus balancing resource consumption and real-time requirements. The prompting mechanism allows end users (such as developers and animators) to flexibly control the semantics and style of generated actions. The server-side model can support concurrent requests from multiple terminals, making it suitable for large-scale online applications (such as multi-user interactive scenarios in a metaverse).
[0059] In some embodiments, server 200 may be a standalone physical server, a server cluster, or a distributed system comprising multiple physical servers, or a cloud server providing 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, content delivery networks (CDNs), and big data and artificial intelligence platforms. Terminal 400 may be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc., but is not limited thereto. The terminal and server may be directly or indirectly connected via wired or wireless communication, and this disclosure does not impose any limitations on this.
[0060] See Figure 2 , Figure 2 This is a schematic structural diagram of server 200 according to an embodiment of the present disclosure. Figure 2 The terminal 200 shown includes at least one processor 210, a memory 250, and at least one network interface 220. The various components in the terminal 200 are coupled together via a bus system 240. It will be understood that the bus system 240 is configured to enable connectivity and communication between the components. In addition to a data bus, the bus system 240 also includes a power bus, a control bus, and a status signal bus. However, for clarity of description, Figure 2 The various buses are designated as Bus System 240.
[0061] Processor 210 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor can be a microprocessor, any conventional processor, etc.
[0062] Memory 250 may be removable memory, non-removable memory, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. Memory 250 may include one or more storage devices physically located away from processor 210.
[0063] Memory 250 may include volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Non-volatile memory may be read-only memory (ROM). Volatile memory may be random access memory (RAM). The memory 250 described in this disclosure is intended to include any suitable type of memory.
[0064] In some embodiments, the memory 250 is capable of storing data to support various operations. Examples of data include programs, modules, and data structures, or subsets or supersets thereof. Examples are described below: Operating system 251 includes system programs for handling various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, and a driver layer for implementing various basic services and handling hardware-based tasks; The network communication module 252 is configured to reach another electronic device via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 including Bluetooth, Wi-Fi, Universal Serial Bus (USB), etc. Display module 253 is configured to display information using one or more output devices 431 (e.g., a display screen or a speaker) associated with user interface 430 (e.g., a user interface for operating peripheral devices and displaying content and information); and The input processing module 254 is configured to detect one or more user inputs or interactions from one or more input devices 432 and translate the detected inputs or interactions.
[0065] In some embodiments, the motion sequence prediction apparatus according to this disclosure can be implemented using software. Figure 2 A motion sequence prediction device 255 stored in memory 250 is shown. The motion sequence prediction device 255 can be software in the form of a program or plug-in, and includes the following software modules: a sample selection module 2551, a context learning module 2552, a prompting module 2553, and a prediction module 2554. These modules are logical modules and can therefore be flexibly combined or further divided according to the functions implemented. The functions of each module are described below.
[0066] In some other embodiments, the apparatus according to embodiments of the present disclosure may be implemented in hardware. In one example, the apparatus according to embodiments of the present disclosure may be a processor in the form of a hardware decoding processor, which is programmed to perform an error model determination method according to embodiments of the present disclosure. For example, the processor in the form of a hardware decoding processor may use one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex PLDs (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.
[0067] In some embodiments, the terminal or server can implement the motion sequence prediction method provided in this disclosure by running a computer program. For example, the computer program can be a native program or a software module in an operating system. It can be a native application (APP) (i.e., a program that needs to be installed in an operating system to run, such as a live streaming APP, a web conferencing APP, or an instant messaging APP), or it can be a mini-program (i.e., a program that only needs to be downloaded into a browser environment to run). In short, the above-mentioned computer program can be any form of application, module, or plugin.
[0068] The following will describe the motion sequence prediction method provided by the embodiments of this disclosure in conjunction with exemplary applications and implementations of the terminal provided in the embodiments of this disclosure.
[0069] See Figure 3A This is a schematic flowchart of a motion sequence prediction method according to embodiments of the present disclosure. (The text will be combined with...) Figure 3A The operations shown are described below.
[0070] In operation 101, a target motion sequence sample representing the multiple reference motion sequence samples is determined from the multiple reference motion sequence samples.
[0071] As an example, P motion samples (target motion sequence samples) are pre-selected from the basic training set (multiple reference motion sequence samples). The pre-selected motion samples can greatly enhance the language model's understanding of the motion prediction task when used for context learning.
[0072] In operation 102, based on the target motion sequence samples, the first language model is subjected to context learning based on the motion sequence prediction task to obtain the second language model.
[0073] As an example, the contextual learning described here is actually a case of generating motion sequence prediction tasks based on target motion sequence samples. The prompts for the motion sequence prediction task are input into a first language model. After the first language model outputs the predicted answer, the correct answer is input into the first language model. This process is repeated, allowing the first language model to improve its understanding and execution capabilities for the motion sequence prediction task through self-learning.
[0074] In operation 103, a first prompt corresponding to the first motion sequence is generated based on the association between the motion sequence and the description, as well as the prior information of the skeleton structure.
[0075] As an example, skeletal structure priori information refers to the sequence of joint movements in human motion. Since the text representation corresponding to the first motion sequence consists of multiple joint coordinates, the joint movement sequence will be reflected in multiple joint coordinates. The association between the motion sequence and the description is a cue template, where the model is first instructed to extract the action description from the motion sequence, and then instructed to predict subsequent motion sequences.
[0076] In operation 104, based on the first prompt, a second motion sequence corresponding to the first motion sequence is generated through a second language model, wherein the timestamp of the second motion sequence is adjacent to the timestamp of the first motion sequence, and the timestamp of the second motion sequence is later than the timestamp of the first motion sequence.
[0077] In some embodiments, the generation of a second motion sequence corresponding to the first motion sequence based on a first prompt and using a second language model in operation 104 can be achieved by: generating a third text representation based on the first prompt and using a second language model; and decoding the third text representation to obtain skeletal animation data representing the second motion sequence.
[0078] As an example, the decoding method here could be to use a structured template (such as JSON or CSV format) that LLM requires to be filled in, or to add a rule-based parser to enforce bone length constraints or smooth the trajectory, or to use lightweight filters (such as smoothing, inverse kinematics correction) to post-process the output.
[0079] In this embodiment of the disclosure, text representation can be converted into skeletal animation data, thereby enabling the closed-loop use of the large language model, making the large language model compatible with non-verbal application scenarios, and improving the generalization ability of the large language model.
[0080] As an example, the first cue carries a first text representation of the first motion sequence, which includes the coordinates of each joint in each frame from frame 1 to frame 5. Taking frame 1 as an example, the joint coordinates of frame 1 include: "Frame 0: Right knee: 449, 401, 647; Right heel: 439, 343, 475; Right foot: 453, 280, 474; Right toe: 451, 263, 498; Left knee: 553, 351, 596; Left heel: 553, 170, 585; Left foot: 539, 130, 634; Left toe: 535, 118, 661; Spine: 465, 586, 504; Neck: 465, 669, 565; Chin: 472, 6 79, 612; Head: 468, 725, 604; Left shoulder: 519, 645, 551; Left elbow: 539, 538, 528; Left wrist: 516, 603, 601; Left thumb: 529, 631, 575; Left palm: 499, 632, 623; Right shoulder: 406, 656, 564; Right elbow: 413, 568, 496; Right wrist: 422, 483, 442; Right thumb: 431, 473, 479; Right palm: 371, 463, 449. The second motion sequence to be predicted corresponds to frames 6 to 10. The second language model outputs a third text representation, which includes the coordinates of each joint in each frame from frame 6 to 10. Taking frame 6 as an example, the second language model outputs: "Frame 6: Right knee: 448, 401, 647; Right heel: 438, 344, 475; Right foot: 451, 280, 473; Right toe: 450, 263, 498; Left knee: 553, 350, 594; Left heel: 552, 168, 582; Left foot: 538, 128, 632; Left toe: 534, 117" The data is as follows: 659; Spine: 465, 586, 505; Neck: 465, 670, 564; Chin: 470, 680, 611; Head: 464, 725, 604; Left Shoulder: 519, 648, 549; Left Elbow: 537, 541, 523; Left Wrist: 540, 605, 601; Left Thumb: 542, 639, 581; Left Palm: 579, 607, 610; Right Shoulder: 406, 656, 564; Right Elbow: 413, 569, 496; Right Wrist: 422, 484, 442; Right Thumb: 432, 473, 479. Finally, the obtained third text representation is decoded into a BVH file using a motion decoder. Here, the BVH file represents the skeletal animation data of the second motion sequence.
[0081] The following describes in detail how to determine the target motion sequence sample representing multiple reference motion sequence samples from these multiple reference motion sequence samples. In the specific calculation, each reference motion sequence sample is abstracted as an array. Therefore, the terms "motion sequence sample," "sample," and "array" mentioned below all have the same meaning.
[0082] In some embodiments, reference Figure 3B The operation of determining a target motion sequence sample representing multiple reference motion sequence samples from multiple reference motion sequence samples can be performed through... Figure 3B The operations 1011 to 1014 shown are implemented.
[0083] At operation 1011, obtain the array corresponding to each of the multiple reference motion sequence samples.
[0084] As an example, since the correlation between reference motion sequence samples needs to be calculated later, each reference motion sequence is described by an array, and then the correlation between reference motion sequences is calculated through the array.
[0085] In operation 1012, the first set is initialized to an empty set, and the second set is initialized to a set that includes all arrays.
[0086] Here, the second set S corresponds to the set consisting of arrays corresponding to all reference motion sequence samples.
[0087] In operation 1013, when the number of elements in the first set is less than the first threshold, the following processing is performed iteratively: obtain arrays that belong to the second set but not to the first set, and merge these arrays with the first set to obtain multiple third sets; determine the representative score of each third set relative to the second set, and obtain the target third set with the highest representative score; and remove the arrays that were merged with the first set to obtain the target third set from the second set, and add the removed arrays to the first set.
[0088] In operation 1014, when the number of elements in the first set is equal to the first threshold, the reference motion sequence sample corresponding to the array included in the first set is determined as the target reference motion sequence sample.
[0089] Operations 1013 and 1014 above are equivalent to performing the array addition process P times (i.e., the first threshold). Each array addition process involves traversing the arrays in the second set that have not been added to the first set; and selecting an array that, when added to the first set, maximizes the representative score r of the third set, until the size of the first set reaches P.
[0090] In the embodiments of this disclosure, finding representative target reference motion sequence samples can improve the time and space complexity of the search process, thereby improving the overall implementation efficiency of the scheme.
[0091] In some embodiments, determining the representative score of each third set relative to the second set in operation 1013 can be achieved by: initializing the associated set of the third set to the third set and initializing the set to be traversed to the third set; when the set to be traversed is not empty, performing the following processing on the set to be traversed: obtaining the matching set corresponding to the set to be traversed; when an array related to the set to be traversed is determined in the matching set, adding the related array to the associated set and replacing all arrays in the set to be traversed with the related array; and when no array related to the set to be traversed is determined in the matching set, determining the number of arrays included in the associated set as the representative score of the third set and updating the set to be traversed to an empty set.
[0092] As an example, the associated set is initially the third set itself, and then arrays related to arrays in the associated set are searched within the second set. The following practical example further illustrates this process. Assume there are a total of 10 arrays, and the third set includes arrays 1, 2, and 3. Therefore, both the associated set and the set to be iterated over initially include arrays 1, 2, and 3. When the set to be iterated over is not empty, a matching set corresponding to the set to be iterated over is obtained, which includes arrays 4 through 10. When arrays related to the set to be iterated over are identified in the matching set (i.e., related to at least one array in the set to be iterated over), for example, arrays 4 and 5 are determined to be related to array 2, arrays 4 and 5 are added to the associated set and the set to be iterated over. At this point, the associated set includes arrays 1 through 5, and the set to be iterated over includes arrays 4 through 5. Since the set to be iterated over is not empty, a matching set corresponding to the set to be iterated over is obtained, which includes arrays 6 through 10. When no array related to the set to be traversed is determined in the set to be matched (i.e., the remaining five arrays are not related to array 5), the number of arrays included in the associated set (i.e., 5) is determined as the representative score of the third set, and the set to be traversed is updated to an empty set. Since the set to be traversed is an empty set, the iteration ends.
[0093] In embodiments of this disclosure, the representativeness score of the set is measured by recursive diffusion, and the representativeness of a subset relative to the whole set is measured by the size of the associated set of the subset, thereby improving the accuracy of the representativeness score estimation.
[0094] In some embodiments, obtaining the matching set corresponding to the set to be traversed can be achieved by: obtaining an array that belongs to the second set but not to the associated set; and using the obtained array to form the matching set corresponding to the set to be traversed.
[0095] As an example, this is equivalent to performing set subtraction, that is, excluding the part of the second set that intersects with the associated set, and the remaining part of the second set after the exclusion is the set to be matched.
[0096] In this embodiment of the disclosure, the set to be traversed can only be matched with the remaining items to be matched, thereby improving the overall computational efficiency of the scheme.
[0097] In some embodiments, after obtaining the matching set corresponding to the set to be traversed: the correlation between arrays in the second set is determined; and the following processing is performed on each array in the set to be traversed: based on the correlation between arrays in the second set, the correlation between the array in the set to be traversed and each array in the matching set is obtained; for each array combination formed by the array in the set to be traversed and each array in the matching set, a random number corresponding to each array combination is generated; and when the random number of the array combination is less than the corresponding correlation, the array in the matching set that corresponds to the array combination is determined as an array related to the set to be traversed.
[0098] Following the example above, let's take arrays 1 to 3 to be traversed and arrays 4 to 10 to be matched as an example. Here, arrays 1 to 3 and arrays 4 to 10 can be combined in pairs, resulting in 18 combinations. This allows us to calculate 18 relevance scores. Then, we generate 18 random numbers between 0 and 1 for each of these 18 combinations. For each combination, we compare the random number with the relevance score. If the relevance score is greater than the random number, then the two arrays involved in that combination are considered related.
[0099] In embodiments of this disclosure, the relevance between two samples can be evaluated by comparing random numbers and the relevance. Compared to comparing the relevance to a static threshold, random numbers introduce uncertainty into the algorithm, leading to variations in the evaluation of representative scores. Therefore, the algorithm in this disclosure can use different representative samples for the large language model to learn each time, thereby improving the generalization ability of the large language model.
[0100] The sample selection in this embodiment can also be performed through clustering, or the user or developer can manually specify representative samples. Sample selection is not limited to the algorithms provided in this disclosure.
[0101] In some embodiments, the second language model obtained by performing context learning on the first language model based on the motion sequence prediction task based on the target motion sequence samples in operation 102 can be achieved as follows: encoding the skeletal animation data corresponding to the target motion sequence samples to obtain a second text representation of the target motion sequence samples; performing the following processing on the second text representation of each sample in the target motion sequence samples: extracting coordinate data of multiple first frames from the second text representation as coordinate data of known frames, and extracting coordinate data of multiple second frames from the second text representation as coordinate data of unknown frames, wherein the timestamp of the first frame is earlier than the timestamp of the second frame, and the first frame and the second frame are consecutive frames; generating a second prompt based on the coordinate data of the known frames, wherein the second prompt is used to instruct the first language model to predict the coordinate data of the unknown frames; generating a coordinate prediction result corresponding to the unknown frames through the first language model based on the second prompt; and inputting the coordinate data of the unknown frames into the first language model.
[0102] As an example, selecting P motion samples from a base training set (i.e., multiple reference motion sequence samples) and using these samples during context learning can greatly help a large language model become more familiar with the motion prediction task (i.e., the target motion sequence samples). In embodiments of this disclosure, it is proposed to present these P motion sequence samples to the large language model during context learning in a mock exam-based manner. As the name suggests, this mock exam-based presentation process differs from the usual way context learning presents context samples to the large language model (i.e., directly passing the questions and their corresponding correct answers to the large language model). Instead, in the mock exam-based process proposed according to this disclosure, the large language model is required to practice the questions first, and then given the corresponding correct answers. This design is inspired by the observation that when students prepare for exams using mock tests, simply reading the questions and answers often fails to achieve high-quality review. Instead, a better review method for students is to first practice the questions on the test paper and then compare their answers with the correct answers to see where they went wrong and which knowledge points need further review. In embodiments of this disclosure, the instructions passed to the large language model through the mock exam-based presentation process are as follows. 1. "Next, please ask me for examples of excellent predictions"; 2. "Here is an example observation frame: [observed]. Now please give your predictions for all joint coordinates in subsequent frames. Reply 'Finished' when finished," where [observed] represents the past observation sequence of the i-th sample out of P motion samples; 3. "Here is the correct answer: [future]. Please check if your prediction is similar to the correct answer," where [future] represents the ground-truth future motion sequence corresponding to the i-th motion sample. It is important to note that instructions 2 and 3 are repeatedly passed to the large language model until it has practiced with all P motion samples. By showing the large language model these P motion samples in this way, instead of directly passing the correct answers (i.e., the ground-truth future motion sequences) of the P samples, the large language model is encouraged to practice motion prediction tasks that it is not originally familiar with. This practice step motivates the large language model to be better prepared for motion prediction tasks.
[0103] This disclosure differs from traditional context learning methods. In this embodiment, the question and its corresponding correct answer in the context are directly sent to the large language model, thereby enabling the large language model to have self-learning capabilities and to identify error points and knowledge areas that need strengthening, thus improving the large language model's understanding of motion sequence prediction tasks. In some embodiments, references Figure 3C In operation 103, a first prompt corresponding to the first motion sequence is generated based on the association between the motion sequence and the description, as well as prior information about the skeleton structure. Figure 3C This is achieved through operations 1031 and 1032.
[0104] In operation 1031, the skeletal animation data corresponding to the first motion sequence is encoded to obtain a first text representation of the first motion sequence.
[0105] In operation 1032, the first text representation is edited based on the association between the motion sequence and the description, as well as prior information about the skeleton structure, to obtain a first prompt corresponding to the first motion sequence.
[0106] In embodiments of this disclosure, skeletal animation data is encoded into a text representation, enabling a large language model to understand a first motion sequence and to handle motion sequence prediction tasks.
[0107] In some embodiments, the editing of the first text representation based on the association between the motion sequence and the description, as well as prior information about the skeleton structure, in operation 1032 to obtain a first prompt corresponding to the first motion sequence can be achieved as follows: Based on prior information about the skeleton structure, the first coordinates of multiple joints in the first text representation are combined to obtain coordinate data corresponding to the first motion sequence; and based on the association between the motion sequence and the description, and the coordinate data corresponding to the first motion sequence, a first prompt corresponding to the first motion sequence is generated. The association between the motion sequence and the description constrains the first prompt to include a first instruction and a second instruction; the first instruction precedes the second instruction in the first prompt; the first instruction instructs a second language model to describe the action corresponding to the first motion sequence based on the coordinate data corresponding to the first motion sequence; and the second instruction instructs the second language model to predict the second coordinates of each joint in the second motion sequence.
[0108] As an example, embodiments of this disclosure aim to directly utilize large language models for motion prediction. However, since motion sequences are not in a format that large language models are "familiar" with as language models, simply passing previously observed motion sequences to the large language model and asking it to predict future motion sequences may lead to difficulties in its understanding, resulting in poor motion prediction results. This makes familiarizing the large language model with motion sequences an important step in this framework. Specifically, in this embodiment, the framework introduces the following designs to facilitate the extraction of such implicit knowledge from large language models. These designs include: (i) guiding the large language model to associate motion sequences with motion descriptions it is more "familiar" with (i.e., execution sequence-description association), and (ii) introducing kinematic thought chain designs for the large language model.
[0109] Regarding the design of the sequence-description association in (i), the technical idea of this disclosure is inspired by the following: Although unfamiliar with human motion sequences, large language models have seen a large number of human motion descriptions (i.e., descriptions of how people behave and move when performing different actions) during their pre-training phase. With this in mind, in this embodiment, instead of directly asking the large language model to predict future motion sequences, it is instructed to first associate the motion sequences with motion descriptions. In this way, the large language model can better utilize its rich knowledge of motion descriptions to handle the relatively "unfamiliar" task of predicting motion sequences.
[0110] Specifically, in this embodiment, an effective way to guide a large language model in establishing associations is to instruct the large language model using the following command: "Given joints observed in the past [L] frames, first describe these observed frames. Then, for each of the following [J] frames, first describe the joint motion of each joint, and then output your prediction of its coordinates," where L represents the length of the past observed motion sequence, and J represents the length of the future motion sequence to be predicted. (Reference) Figure 5 The figure illustrates an example of how the aforementioned command is passed to a large language model. As shown, by issuing commands to the large language model in this way, it is first required to associate past observed motion sequences with their corresponding motion descriptions. Then, when predicting human poses in future motion sequences, the large language model can leverage its superior ability to predict motion descriptions to assist in its prediction of motion sequences (joint coordinates).
[0111] In particular, such as Figure 5 As shown on the right, without the guidance of sequence-description association (as shown in the upper right portion), the large language model predicts the human pose in frame 6 by almost replicating the last human pose (in frame 5), resulting in low quality. However, with the help of motion descriptions at each joint (as shown in the lower right portion), the large language model predicts a much more reasonable next human pose. This demonstrates the effectiveness of associating motion sequences with motion descriptions. In embodiments of this disclosure, the large language model is instructed to first associate motion sequences with motion descriptions. In this way, the large language model can better utilize its rich knowledge of motion descriptions to handle the relatively "unfamiliar" task of motion sequence prediction.
[0112] In some embodiments, the skeletal structure prior information includes the joint sequence following the human skeletal kinematic chain. The operation of combining the first coordinates of multiple joints in the first text representation based on the skeletal structure prior information to obtain coordinate data corresponding to the first motion sequence can be implemented as follows: For each of the multiple frames involved in the first text representation, the following processing is performed: sorting the multiple joints in the frame according to the joint sequence to obtain a joint sequence; filling the positions of each joint in the joint sequence with the first coordinates of the multiple joints to obtain the coordinate data of the frame; and combining the coordinate data of the multiple frames involved in the first text representation according to the order of the multiple frames to obtain the coordinate data corresponding to the first motion sequence.
[0113] In this embodiment of the disclosure, the structural connectivity of the human skeleton in a motion sequence is utilized through a kinematic thought chain design. Specifically, for humans, who typically have a fixed spatial skeletal structure, their movements naturally propagate from the central part of the torso to the peripheral limbs in a fixed sequence based on the kinematic chain of the human skeleton. In other words, when a person performs a certain action, the movement of the body joints of the peripheral limbs of the human skeleton naturally depends on the movement of their parent body joints in the more central part of the human skeleton. For example, in two consecutive frames, if a person attempts to move his right shoulder, this movement will sequentially affect the position of his right elbow and then the position of his right wrist.
[0114] Inspired by the natural, fixed-order propagation of human movement through different body joints, this embodiment encourages the large language model to also follow this center-to-periphery order of the human skeletal kinematic chain to predict the joint coordinates of each human posture in future motion sequences. To achieve this, for each human posture in a previously observed motion sequence, its body joint coordinates are not presented to the large language model in a random order (e.g., ...). Figure 5 Instead of presenting the body joint coordinates directly to the center and outwards (as shown in the diagram), this approach presents them to the large language model in this order. In this way, the large language model can then be prompted to predict the body joint coordinates for each future human posture in the same order, mimicking the natural propagation sequence of the human skeleton's movements. This method of joint coordinate prediction encourages the large language model to utilize the internal structural connectivity of the human skeleton, making its predictions of joint coordinates in human postures more natural and plausible.
[0115] In some embodiments, in addition to using plain text cues, cues can be enhanced with code snippets, tables, or natural language plus diagrams to aid LLM inference of motion sequences. Future implementations could incorporate image frames or skeleton visualizations embedded as links or tokens, provided the input modality of the large language model supports it. Sequence-description associations can be replaced or supplemented with other natural language expressions, such as visual descriptions ("This person is raising their right arm upwards...") and physical analogies ("Imagine the subject swinging their arm like a pendulum"). Kinematic thought chain mechanisms can also be represented in the cues as dependency graphs or skeleton traversal trees, either explicitly or through a code-like syntax.
[0116] In embodiments of this disclosure, a target motion sequence sample representing multiple reference motion sequence samples is determined from these samples. By selecting the target motion sequence sample from multiple reference motion sequence samples, the model can focus on key features and reduce interference from redundant data. Based on the target motion sequence sample, a first language model is subjected to context learning based on a motion sequence prediction task to obtain a second language model. Through context learning based on a motion sequence prediction task, the temporal dependence and physical laws of the motion sequence are embedded into the language model, thereby enabling the language model to understand motion dynamics and improving the accuracy of the model in modeling continuous actions. A first cue corresponding to the first motion sequence is generated based on the association between the motion sequence and the description, as well as prior information on the skeleton structure; and based on the first cue, a second motion sequence corresponding to the first motion sequence is generated through the second language model, wherein the timestamp of the second motion sequence is adjacent to the timestamp of the first motion sequence, and the timestamp of the second motion sequence is later than the timestamp of the first motion sequence. Prior information on the skeleton structure is introduced as a constraint to ensure that the generated motion sequence conforms to biomechanical limitations (such as joint range of motion) and avoids unreasonable postures. Through the association between the motion sequence and the description, more precise semantic control is achieved. Furthermore, by combining the text understanding capabilities of language models with motion sequence generation, and bridging natural language descriptions and motion data through first cues, technical support is provided for scenarios such as semantic instruction-based human animation generation and interactive editing.
[0117] The following describes exemplary applications of the embodiments of this disclosure in practical application scenarios.
[0118] refer to Figure 6The system acquires raw motion sequence data of the user or character in real time through sensors (such as inertial measurement units (IMUs), cameras, and motion capture devices). Preprocessing of the raw data, including denoising, interpolation, and timestamp alignment, generates standardized motion sequence samples, which are then uploaded to the server as reference motion sequence samples. Here, the reference motion sequence samples are BVH files. The server filters target samples, i.e., it selects the most representative target motion sequence samples from a large number of reference motion sequence samples (motion context selector). The skeletal animation data of the target motion sequence samples is encoded into a second text representation (motion encoder). The server loads a first language model (a large language model trained in a general way) and uses the target motion sequence samples for context learning to obtain a second language model (a mock exam generator generates instructions to obtain fewer motion samples, which are input into the first language model). The terminal receives the input first motion sequence, which can be the current motion segment provided by the user (such as the real-time movement of a game character or the movements of a patient in rehabilitation training), and converts it into a first text representation through the motion encoder. Based on the pre-defined association between the motion sequence and the description (such as a natural language template) and prior information about the skeleton structure (motion tagging system), the first motion sequence is converted into a first cue (carrying the observed motion sequence). This process is equivalent to the function performed by a knowledge embedder. The terminal sends the first cue to the server. The second language model deployed on the server parses the first cue, combines it with the first motion sequence to predict a second motion sequence (future action) with consecutive timestamps, and compresses the generated second motion sequence (such as joint data for the next 10 frames) and sends the compressed second motion sequence to the terminal. The terminal converts the second motion sequence into character animation (motion decoder).
[0119] refer to Figure 4 This diagram illustrates the core algorithm of a motion sequence prediction method according to embodiments of the present disclosure. First, two designs (a sequence-description association design and a kinematic thought chain design) are added to the framework to effectively extract (mine) implicit knowledge from a large language model. Furthermore, embodiments of the present disclosure incorporate a motion context learning mechanism into the framework, which can further improve the large language model's familiarity with human motion prediction tasks.
[0120] In general, in order for a language model to become an accurate motion predictor, within the framework of this disclosure, it is necessary to make the large language model "familiar" with human motion sequences that it was originally "unfamiliar" with. To achieve this familiarization, inspired by the rich implicit knowledge that large language models can possess about human motion, this embodiment proposes two designs to facilitate the extraction of useful implicit knowledge from the large language model. Specifically, these two designs include: (1) guiding the large language model to associate motion sequences with motion descriptions that it is more "familiar" with (i.e., execution sequence-description association), and (2) introducing a kinematic thought chain design for the large language model.
[0121] Furthermore, in implementing the embodiments of this disclosure, the applicant discovered that in few-sample motion prediction, for any new human action, there may be both a small number of supporting motion samples from the new action and a large set of motion samples from some basic actions. Inspired by this, in order to make the large language model an accurate motion predictor, in the framework of this embodiment, in addition to urging the large language model to use its own implicit knowledge, a motion context learning mechanism is introduced to guide the large language model to seek help from the aforementioned available motion samples. Specifically, under this mechanism, through a motion sample pre-selection stage, a subset of motion samples is first pre-selected from all available samples, which can greatly benefit the large language model. Then, these motion samples are effectively presented to the large language model in a simulated exam-based presentation manner. Through the above process, the predicted motion sequence can finally be reliably output directly from the large language model's answers.
[0122] The contributions of this disclosure are as follows: (1) This work is the first to explore the non-linguistic task of predicting human motion with few samples by directly utilizing an off-the-shelf large language model; (2) Several designs are introduced in the framework of this embodiment to familiarize the large language model with motion sequences and promote the large language model to become an accurate motion predictor; (3) The technical solution according to this embodiment achieves state-of-the-art performance on evaluation benchmarks in a completely training-free manner.
[0123] To guide large language models into accurate motion predictors, the above embodiments focus on facilitating the effective extraction of their implicit knowledge. It's worth noting from another perspective that in few-shot motion prediction, for any new human action "a", there are usually other resources available besides the large language model's own knowledge. These resources include N supporting motion samples of "a", and a large set of motion samples from the base training set S. A simple approach is to present all available motion samples as context in the cue to the large language model (i.e., perform context learning using all available motion samples). It's important to note that, theoretically, more context learning samples tend to be more beneficial to the large language model. In practice, excessively long context scans can trigger catastrophic forgetting in large language models and lead to significant performance degradation.
[0124] Considering this, within the framework of this embodiment, a novel motion context learning mechanism is proposed to guide the large language model to seek assistance from available motion samples. Specifically, under this mechanism, before performing context learning on any action, a pre-selection phase is first implemented to pre-select P motion samples from the basic training set. When used during context learning, these samples can significantly deepen the large language model's understanding of the motion prediction task. Furthermore, during context learning on any action "a," to fully utilize these P pre-selected motion samples and N supporting samples from action "a," instead of simply concatenating these P+N samples and passing them to the large language model as is typical in language-related tasks, a further proposal is made to present these samples to the large language model in a simulated exam-based manner. The applicant will now describe in detail the pre-selection phase and the simulated exam-based sample presentation process within the motion context learning mechanism.
[0125] In the pre-selection phase, it is assumed that only P motion samples from the basic training set can be shown to the large language model during context learning, where P is a hyperparameter. This embodiment aims to select a suitable subset of P samples so that their presentation during context learning can greatly deepen the large language model's understanding of the motion prediction task.
[0126] Here, this embodiment aims to measure a set S consisting of P motion samples. sub The representativeness of the motion prediction task. However, since motion prediction itself is only an abstract subject, it is difficult to directly measure it in this way. Therefore, noting that the basic training set S can be regarded as a large set of motion samples sampled from the abstract motion prediction subject, this embodiment approximates S by measuring how well this subset represents S. sub Representativeness.
[0127] As an example, S can be measured in an information diffusion-based manner through the following three steps. sub Representativeness of the second set S. (1) Distance measurement. In order to reformulate S as a similar (social) graph, given the i-th motion sample in S, it is first necessary to measure the distance between the i-th motion sample and the j-th motion sample. In the motion sequence, the joints of different body parts of the human body are usually in different motion modes. Therefore, in addition to measuring the global L2 distance between the i-th motion sample and the j-th motion sample, five local L2 distances are also measured between the i-th motion sample and the j-th motion sample at five different body parts (left arm, right arm, left leg, right leg and torso). After measuring the global L2 distance and the five local L2 distances, the distance between the i-th motion sample and the j-th motion sample is defined as the average of the above six distances. (2) Matrix representation. After measuring the distance between each pair of motion samples in S using the distance function defined in step (1), a similarity matrix M is formed using these measured distances, where the [i,j] terms of M represent the similarity between the i-th motion sample and the j-th motion sample. Finally, each row of M needs to be normalized. It should be noted that the similarity matrix M only needs to be constructed once, and then it can be reused to measure the representativeness of different subsets of S. (3) Representativeness measurement. Once the matrix M is constructed, the third set S is measured by the subsequent Algorithm 1. sub The representative score r of the second set S. Intuitively, Algorithm 1 can be understood as... sub Algorithm 1 describes a recursive diffusion process where moving samples are diffused into the entire basic training set S. At the end of this diffusion process, the representativeness score r is measured as the total number of samples diffused to during the process. It's important to note that Algorithm 1 can also be used to measure the representativeness of subsets of other sizes besides P.
[0128] As an example, Algorithm 1 is introduced below, which is used to measure S by recursive diffusion. sub The representative score r of (the third set in the aforementioned embodiments):
[0129] .
[0130] To find a subset of size P that well represents the motion prediction task, a simple approach is to enumerate all subsets of S containing P motion samples and find the subset with the highest r value. However, in our experiments, we found that for the basic training set S, which typically contains a large number of motion samples, this exhaustive approach is generally computationally infeasible as an NP-hard problem. Considering this, this embodiment proposes an alternative: using Algorithm 2 to actually find S. subIn Algorithm 2, S sub Initialize to an empty set. Then continue until S. sub Until the size reaches P, in each step, S\S sub The one who joined S sub Then, the motion sample with the highest representativeness r is added to S. sub middle.
[0131] Algorithm 2, a practical method for finding S sub Greedy algorithm:
[0132] As described above, selecting P motion samples from the basic training set (i.e., multiple reference motion sequence samples) and using these samples during context learning can greatly help the large language model become more familiar with the motion prediction task (i.e., the target motion sequence samples). In this embodiment, it is proposed to present these P+N motion sequence samples to the large language model during context learning in a simulated exam-based manner. As the name suggests, this simulated exam-based presentation process differs from the usual way context learning presents context samples to the large language model (i.e., directly passing the questions and their corresponding correct answers from the context to the large language model). Instead, in the simulated exam-based process proposed according to this disclosure, the large language model is required to practice the questions first, and then given its corresponding correct answers. This design is inspired by the observation that when students prepare for exams using mock tests, simply reading the questions and answers often fails to achieve high-quality review. Instead, a better review method for students is to first practice the questions on the test paper and then compare their answers with the correct answers to see where they went wrong and which knowledge points need further review.
[0133] In the embodiments of this disclosure, the instructions passed to the large language model through a demonstration process based on a simulated exam are as follows: 1. "Next, please ask me for examples of good predictions"; 2. "Here is an example observation frame: [observed]. Now please give your predictions for all joint coordinates of the subsequent frames. Please reply 'Finished' when finished," where [observed] represents the past observation motion sequence of the i-th sample out of P+N motion samples; 3. "Here is the correct answer: [future]. Please check if your prediction is similar to the correct answer," where [future] represents the ground truth future motion sequence corresponding to the i-th motion sample. It should be noted that instructions 2 and 3 are repeatedly passed to the large language model until it has practiced all P+N motion samples. By showing the large language model these P+N motion samples in this way, instead of directly passing the correct answers (i.e., ground truth future motion sequences) of P samples to the large language model, the large language model can be encouraged to practice motion prediction tasks that it is not originally familiar with. With such a practice step, the large language model can be motivated to be more fully prepared for motion prediction tasks.
[0134] Within the framework of embodiments of this disclosure, the present disclosure aims to directly utilize large language models for motion prediction. However, since motion sequences are not in a format that large language models are "familiar" with as language models, simply passing previously observed motion sequences to the large language model and asking it to predict future motion sequences may lead to difficulties in its understanding, resulting in poor motion prediction results. This makes familiarizing the large language model with motion sequences an important step in this framework. In this embodiment, the framework introduces the following designs to facilitate the extraction of such implicit knowledge from the large language model. These designs include: (i) guiding the large language model to associate motion sequences with motion descriptions it is more "familiar" with (i.e., execution sequence-description association), and (ii) introducing kinematic thought chain designs for the large language model.
[0135] Regarding the design of the sequence-description association in (i), the technical idea of this disclosure is inspired by the following: Although unfamiliar with human motion sequences, large language models have seen a large number of human motion descriptions (i.e., descriptions of how people behave and move when performing different actions) during their pre-training phase. With this in mind, in this embodiment, instead of directly asking the large language model to predict future motion sequences, it is instructed to first associate the motion sequences with motion descriptions. In this way, the large language model can better utilize its rich knowledge of motion descriptions to handle the relatively "unfamiliar" task of predicting motion sequences.
[0136] Specifically, in this embodiment, an effective way to guide a large language model in establishing associations is to instruct the large language model using the following command: "Given joints observed in the past [L] frames, first describe these observed frames. Then, for each of the following [J] frames, first describe the joint motion of each joint, and then output your prediction of its coordinates," where L represents the length of the past observed motion sequence, and J represents the length of the future motion sequence to be predicted. (Reference) Figure 5 The figure illustrates an example of how the aforementioned command is passed to a large language model. As shown, by issuing commands to the large language model in this way, it is first required to associate past observed motion sequences with their corresponding motion descriptions. Then, when predicting human poses in future motion sequences, the large language model can leverage its superior ability to predict motion descriptions to assist in its prediction of motion sequences (joint coordinates).
[0137] In particular, such as Figure 5 As shown on the right, without the guidance of sequence-description association (as shown in the upper right section), the large language model predicts the human pose in frame 6 by almost replicating the last human pose (in frame 5), resulting in low quality. However, with the help of motion descriptions at each joint (as shown in the lower right section), the large language model predicts the next human pose much more reasonably. This demonstrates the effectiveness of associating motion sequences with motion descriptions.
[0138] In embodiments of this disclosure, the structural connectivity of the human skeleton within a motion sequence is utilized through a kinematic thought chain design. Specifically, for humans, who typically have a fixed spatial skeletal structure, their movements naturally propagate from the central part of the torso to the peripheral limbs in a fixed sequence based on the kinematic chain of the human skeleton. In other words, when a person performs a certain action, the movement of the body joints of the peripheral limbs of the human skeleton naturally depends on the movement of their parent body joints in the more central part of the human skeleton. For example, in two consecutive frames, if a person attempts to move their right shoulder, this movement will sequentially affect the position of their right elbow and then the position of their right wrist.
[0139] Inspired by the natural, fixed-order propagation of human movement through different body joints, this embodiment encourages the large language model to also follow this center-to-periphery order of the human skeletal kinematic chain to predict the joint coordinates of each human posture in future motion sequences. To achieve this, for each human posture in a previously observed motion sequence, its joint coordinates are not presented to the large language model in a random order (e.g., ...). Figure 5Instead of presenting the body joint coordinates directly to the center and outwards (as shown in the diagram), this approach presents them to the large language model in this order. In this way, the large language model can then be prompted to predict the body joint coordinates for each future human posture in the same order, mimicking the natural propagation sequence of the human skeleton's movements. This method of joint coordinate prediction encourages the large language model to utilize the internal structural connectivity of the human skeleton, making its predictions of joint coordinates in human postures more natural and plausible.
[0140] The method provided in this disclosure eliminates the need for training and deployment, requiring no pre-training or fine-tuning. Existing few-shot motion prediction methods typically require extensive training on a basic motion dataset, followed by task-specific adaptation. In contrast, this disclosure operates purely through inference, offering immediate usability without the need for a training process. This significantly reduces development time, computational costs, and infrastructure requirements.
[0141] This invention leverages implicit world knowledge encoded in a general language model, including a semantic understanding of body movement and joint dynamics. This allows it to generalize better to unseen or rare movements, even with only a few examples—something traditional models often struggle with due to overfitting to basic movement categories.
[0142] The integration of sequence-descriptive associations with kinematic thought chain cues provides the model with a structured and interpretable understanding of motion sequences. These mechanisms ensure that the model's predictions are anatomically consistent, temporally coherent, and semantically justified.
[0143] By employing a diffusion-based sample selection algorithm, this invention identifies and utilizes a small, highly representative subset of motion examples from a larger base set. This reduces the context size (a known limitation of language models) while preserving maximum task relevance, thus improving model performance even under strict input constraints.
[0144] The simulated exam-style prompts encourage the language model to perform tasks, compare with the truth, and revise its understanding—simulating the human learning process. This improves the robustness of the output and reduces sensitivity to trivial pattern repetitions or degenerate predictions (e.g., copying the last frame).
[0145] Because it requires no task-specific training, the system can be easily adapted across domains, including animation, robotics, AR / VR, sports analytics, and healthcare. Its plug-and-play integration with a minimalist setup makes it ideal for rapid prototyping or real-time interactive applications.
[0146] Empirical results on benchmark datasets such as Human3.6M and CMU Mocap demonstrate that, despite not using any training, the present invention outperforms previous state-of-the-art methods such as GraphHetNet, MoPredNet, and PAML.
[0147] It is understood that the embodiments of this disclosure involve user information and other related data. When the embodiments of this disclosure are applied to specific products or technologies, user permission or consent is required. The collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0148] The following describes an exemplary structure of the motion sequence prediction device 255 provided in embodiments of this disclosure when implemented as a software module. In some embodiments, such as Figure 2 As shown, the software modules of the motion sequence prediction device 255 stored in the memory 250 may include a sample selection module 2551, a context learning module 2552, a prompting module 2553, and a prediction module 2554. The sample selection module 2551 is configured to: determine a target motion sequence sample representing the plurality of reference motion sequence samples from multiple reference motion sequence samples. The context learning module 2552 is configured to: perform context learning on a first language model based on the target motion sequence sample to obtain a second language model. The prompting module 2553 is configured to: generate a first prompt corresponding to the first motion sequence based on the association between the motion sequence and the description, as well as prior information about the skeleton structure. The prediction module 2554 is configured to: generate a second motion sequence corresponding to the first motion sequence using the second language model based on the first prompt. The timestamp of the second motion sequence is adjacent to the timestamp of the first motion sequence, and the timestamp of the second motion sequence is later than the timestamp of the first motion sequence.
[0149] In some embodiments, the prompting module 2553 is further configured to: encode skeletal animation data corresponding to the first motion sequence to obtain a first text representation of the first motion sequence; and edit the first text representation based on the association between the motion sequence and the description and prior information about the skeletal structure to obtain a first prompt corresponding to the first motion sequence.
[0150] In some embodiments, the prompting module 2553 is further configured to: combine the first coordinates of multiple joints in the first text representation based on prior information about the skeleton structure to obtain coordinate data corresponding to the first motion sequence; and generate a first prompt corresponding to the first motion sequence based on the association between the motion sequence and the description and the coordinate data corresponding to the first motion sequence. The association between the sequence and the description constrains the first prompt to include a first instruction and a second instruction; the first instruction precedes the second instruction in the first prompt; the first instruction instructs the second language model to describe the action corresponding to the first motion sequence based on the coordinate data corresponding to the first motion sequence; and the second instruction instructs the second language model to predict the second coordinates of each joint in the second motion sequence.
[0151] In some embodiments, the skeletal structure prior information includes the joint sequence following the kinematic chain of the human skeleton, and the prompting module 2553 is further configured to perform the following processing on each of the plurality of frames involved in the first text representation: sorting the plurality of joints in the frame according to the joint sequence to obtain a joint sequence; filling the first coordinates of the plurality of joints into the position of each joint in the joint sequence to obtain coordinate data of the frame; and combining the coordinate data of the plurality of frames involved in the first text representation according to the order of the plurality of frames to obtain coordinate data corresponding to the first motion sequence.
[0152] In some embodiments, the prediction module 2554 is further configured to: generate a third text representation based on a first cue using a second language model; and decode the third text representation to obtain skeletal animation data characterizing the second motion sequence.
[0153] In some embodiments, the context learning module 2552 is further configured to: encode the skeletal animation data corresponding to the target motion sequence sample to obtain a second text representation of the target motion sequence sample; and perform the following processing on the second text representation of each sample in the target motion sequence sample: extract coordinate data of multiple first frames from the second text representation as coordinate data of known frames, and extract coordinate data of multiple second frames from the second text representation as coordinate data of unknown frames, wherein the timestamp of the first frame is earlier than the timestamp of the second frame, and the first frame and the second frame are consecutive frames; generate a second prompt based on the coordinate data of the known frames. The second prompt is used to instruct the first language model to predict the coordinate data of the unknown frames; based on the second prompt, generate a coordinate prediction result corresponding to the unknown frames using the first language model; and input the coordinate data of the unknown frames into the first language model.
[0154] In some embodiments, the sample selection module 2551 is further configured to: obtain an array corresponding to each of the plurality of reference motion sequence samples; initialize a first set as an empty set and initialize a second set as a set including all arrays; when the number of elements in the first set is less than a first threshold, iteratively perform the following processes: obtain arrays belonging to the second set but not to the first set, and merge these arrays with the first set respectively to obtain a plurality of third sets; determine the representative score of each third set relative to the second set, and obtain a target third set with the highest representative score; remove the arrays merged with the first set to obtain the target third set from the second set, and add the removed arrays to the first set; and when the number of elements in the first set is equal to the first threshold, determine the reference motion sequence sample corresponding to the array included in the first set as the target reference motion sequence sample.
[0155] In some embodiments, the sample selection module 2551 is further configured to: initialize the associated set of the third set to the third set, and initialize the set to be traversed to the third set; when the set to be traversed is not empty, perform the following processing on the set to be traversed: obtain the set to be matched corresponding to the set to be traversed; when an array related to the set to be traversed is determined in the set to be matched, add the related array to the associated set, and replace all arrays in the set to be traversed with the related array; and when no array related to the set to be traversed is determined in the set to be matched, determine the number of arrays included in the associated set as the representative score of the third set, and update the set to be traversed to an empty set.
[0156] In some embodiments, the sample selection module 2551 is further configured to: obtain an array that belongs to the second set but not to the associated set; and use the obtained array to form a matching set corresponding to the set to be traversed.
[0157] In some embodiments, the sample selection module 2551 is further configured to: determine the correlation between arrays in the second set; and perform the following processing on each array in the set to be traversed: based on the correlation between arrays in the second set, obtain the correlation between the arrays in the set to be traversed and each array in the set to be matched; for each array combination formed by the arrays in the set to be traversed and each array in the set to be matched, generate a random number corresponding to each array combination; and when the random number of the array combination is less than the corresponding correlation, determine the array in the set to be matched that corresponds to the array combination as an array related to the set to be traversed.
[0158] Embodiments of this disclosure provide a computer program product including computer-executable instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer-executable instructions from the computer-readable storage medium and executes the computer-executable instructions to cause the electronic device to perform the motion sequence prediction method described above according to embodiments of this disclosure.
[0159] Embodiments of this disclosure provide a computer-readable storage medium storing computer-executable instructions thereon. When executed by a processor, the computer-executable instructions cause the processor to perform a motion sequence prediction method according to embodiments of this disclosure, for example... Figures 3A to 3C The motion sequence prediction method shown.
[0160] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic storage, optical disk, or CD-ROM; or it may be a variety of devices that include one or any combination of the above-mentioned memories.
[0161] In some embodiments, computer-executable instructions may be in the form of programs, software, software modules, scripts, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as stand-alone programs or as modules, components, subroutines, or other units suitable for use in a computing environment.
[0162] As an example, executable instructions may (but are not required to) correspond to files in a file system and may be stored in a section of a file used to store other programs or data, such as in one or more scripts in a Hypertext Markup Language (HTML) document, a single file dedicated to a program of interest, or multiple collaborative files (e.g., files that store one or more modules, submodules, or code sections).
[0163] As an example, executable instructions can be deployed to execute on a single electronic device, or on multiple electronic devices located in one location, or on multiple electronic devices distributed across multiple locations and interconnected through a communication network.
[0164] In embodiments of this disclosure, a target motion sequence sample representing multiple reference motion sequence samples is determined from these samples. By selecting the target motion sequence sample from multiple reference motion sequence samples, the model can focus on key features and reduce interference from redundant data. Based on the target motion sequence sample, a first language model is subjected to context learning based on a motion sequence prediction task to obtain a second language model. Through context learning based on a motion sequence prediction task, the temporal dependence and physical laws of the motion sequence are embedded into the language model, thereby enabling the language model to understand motion dynamics and improving the accuracy of the model in modeling continuous actions. A first cue corresponding to the first motion sequence is generated based on the association between the motion sequence and the description, as well as prior information on the skeleton structure; and based on the first cue, a second motion sequence corresponding to the first motion sequence is generated through the second language model, wherein the timestamp of the second motion sequence is adjacent to the timestamp of the first motion sequence, and the timestamp of the second motion sequence is later than the timestamp of the first motion sequence. Prior information on the skeleton structure is introduced as a constraint to ensure that the generated motion sequence conforms to biomechanical limitations (such as joint range of motion) and avoids unreasonable postures. Through the association between the motion sequence and the description, more precise semantic control is achieved. Furthermore, by combining the text understanding capabilities of language models with motion sequence generation, and bridging natural language descriptions and motion data through first cues, technical support is provided for scenarios such as semantic instruction-based human animation generation and interactive editing.
[0165] The above description is merely an embodiment of this disclosure and is not intended to limit the scope of protection of this disclosure. Any modifications, equivalent substitutions, or improvements made without departing from the spirit and scope of this disclosure shall fall within the scope of protection of this disclosure.
Claims
1. A method for predicting motion sequences, characterized in that, The method includes: Determine a target motion sequence sample representing the multiple reference motion sequence samples from multiple reference motion sequence samples; Based on the target motion sequence samples, the first language model is subjected to context learning based on the motion sequence prediction task to obtain the second language model; Based on the association between the motion sequence and the description, as well as prior information about the skeleton structure, a first prompt corresponding to the first motion sequence is generated; and Based on the first prompt, a second motion sequence corresponding to the first motion sequence is generated using the second language model, wherein the timestamp of the second motion sequence is adjacent to the timestamp of the first motion sequence, and the timestamp of the second motion sequence is later than the timestamp of the first motion sequence.
2. The method according to claim 1, characterized in that, Based on the association between the motion sequence and the description, and the prior information of the skeleton structure, the generation of the first prompt corresponding to the first motion sequence includes: Encode the skeletal animation data corresponding to the first motion sequence to obtain a first text representation of the first motion sequence; and Based on the association between the motion sequence and the description, as well as the prior information of the skeleton structure, the first text representation is edited to obtain the first prompt corresponding to the first motion sequence.
3. The method according to claim 2, characterized in that, Based on the association between the motion sequence and the description, and the prior information of the skeleton structure, the first text representation is edited to obtain the first prompt corresponding to the first motion sequence, including: Based on the prior information of the skeleton structure, the first coordinates of multiple joints in the first text representation are combined to obtain coordinate data corresponding to the first motion sequence; and Based on the association between the motion sequence and the description, and the coordinate data corresponding to the first motion sequence, a first prompt corresponding to the first motion sequence is generated. The association between the motion sequence and the description is used to constrain: the first prompt includes a first instruction and a second instruction; and the first instruction precedes the second instruction in the first prompt; the first instruction instructs the second language model to describe the action corresponding to the first motion sequence based on the coordinate data corresponding to the first motion sequence; and the second instruction instructs the second language model to predict the second coordinates of each joint in the second motion sequence.
4. The method according to claim 3, characterized in that, The skeletal structure prior information includes the joint sequence following the human skeletal kinematic chain, and based on the skeletal structure prior information, combining the first coordinates of the plurality of joints in the first text representation to obtain the coordinate data corresponding to the first motion sequence includes: For each of the multiple frames involved in the first text representation, the following processing is performed: According to the joint order, the plurality of joints in the frame are sorted to obtain a joint sequence; The first coordinates of the plurality of joints are filled into the positions of each joint in the joint sequence to obtain the coordinate data of the frame; and Based on the order of the plurality of frames, the coordinate data of the plurality of frames involved in the first text representation are combined to obtain the coordinate data corresponding to the first motion sequence.
5. The method according to claim 1, characterized in that, Based on the target motion sequence samples, the first language model is subjected to context learning based on the motion sequence prediction task to obtain the second language model, including: Encode the skeletal animation data corresponding to the target motion sequence sample to obtain a second text representation of the target motion sequence sample; and The following processing is performed on the second text representation of each sample in the target motion sequence sample: Multiple coordinate data of the first frame are extracted from the second text representation as coordinate data of the known frame, and multiple coordinate data of the second frame are extracted from the second text representation as coordinate data of the unknown frame, wherein the timestamp of the first frame is earlier than the timestamp of the second frame, and the first frame and the second frame are consecutive frames. Based on the coordinate data of the known frame, a second prompt is generated, wherein the second prompt is used to instruct the first language model to predict the coordinate data of the unknown frame; Based on the second prompt, the first language model is used to generate a coordinate prediction result corresponding to the unknown frame; and The coordinate data of the unknown frame is input into the first language model.
6. The method according to claim 1, characterized in that, Determining the target motion sequence sample representing the plurality of reference motion sequence samples from the plurality of reference motion sequence samples includes: Obtain an array corresponding to each of the plurality of reference motion sequence samples; The first set is initialized to an empty set, and the second set is initialized to a set that includes all the arrays mentioned above; When the number of elements in the first set is less than the first threshold, the following processing is performed iteratively: Obtain arrays that belong to the second set but not to the first set, and merge these arrays with the first set respectively to obtain a third set; Determine the representative score of each of the third sets relative to the second set, and obtain the target third set with the highest representative score; and Remove the array from the second set that was merged with the first set to obtain the target third set, and add the removed array to the first set; and When the number of elements in the first set is equal to the first threshold, the reference motion sequence sample corresponding to the array included in the first set is determined as the target reference motion sequence sample.
7. The method according to claim 6, characterized in that, Determining the representativeness score of each of the third sets relative to the second set includes: The associated set of the third set is initialized to the third set, and the set to be traversed is initialized to the third set; When the set to be traversed is not empty, the following processing is performed iteratively on the set to be traversed: Obtain the matching set corresponding to the set to be traversed; When an array related to the set to be traversed is determined in the set to be matched, the related array is added to the associated set, and all arrays in the set to be traversed are replaced with the related array; and When no array related to the set to be traversed is determined in the set to be matched, the number of arrays included in the associated set is determined as the representative score of the third set, and the set to be traversed is updated to an empty set.
8. The method according to claim 7, characterized in that, Obtaining the matching set corresponding to the set to be traversed includes: Retrieve an array that belongs to the second set but not to the associated set; and The obtained array is used to form the matching set corresponding to the set to be traversed.
9. The method according to claim 7, characterized in that, The method further includes: Determine the correlation between the arrays in the second set; Perform the following processing on each array in the collection to be traversed: Based on the correlation between the arrays in the second set, obtain the correlation between the arrays in the set to be traversed and each array in the set to be matched; For each array combination formed by the arrays in the set to be traversed and each array in the set to be matched, generate a random number corresponding to each array combination; and When the random number of the array combination is less than the corresponding relevance, the array in the set to be matched that corresponds to the array combination is determined as the array related to the set to be traversed.
10. The method according to claim 1, characterized in that, Based on the first prompt, generating the second motion sequence corresponding to the first motion sequence using the second language model includes: Based on the first prompt, a third text representation is generated using the second language pattern; and Decode the third text representation to obtain skeletal animation data characterizing the second motion sequence.
11. A motion sequence prediction device, characterized in that, The device includes: The sample selection module is configured to: determine a target motion sequence sample representing the plurality of reference motion sequence samples from a plurality of reference motion sequence samples; The context learning module is configured to: perform context learning on the first language model based on the target motion sequence sample to obtain a second language model; The prompting module is configured to: generate a first prompt corresponding to the first motion sequence based on the association between the motion sequence and the description, as well as prior information about the skeleton structure; and The prediction module is configured to generate a second motion sequence corresponding to the first motion sequence based on the first prompt using the second language model, wherein the timestamp of the second motion sequence is adjacent to the timestamp of the first motion sequence, and the timestamp of the second motion sequence is later than the timestamp of the first motion sequence.
12. The apparatus according to claim 11, characterized in that, The prompt module is also configured to: Encode the skeletal animation data corresponding to the first motion sequence to obtain a first text representation of the first motion sequence; and Based on the association between the motion sequence and the description, as well as the prior information of the skeleton structure, the first text representation is edited to obtain the first prompt corresponding to the first motion sequence.
13. The apparatus according to claim 12, characterized in that, The prompt module is also configured to: Based on the prior information of the skeleton structure, the first coordinates of multiple joints in the first text representation are combined to obtain coordinate data corresponding to the first motion sequence; and Based on the association between the motion sequence and the description, and the coordinate data corresponding to the first motion sequence, a first prompt corresponding to the first motion sequence is generated. The association between the motion sequence and the description is used to constrain: the first prompt includes a first instruction and a second instruction; and the first instruction precedes the second instruction in the first prompt; the first instruction instructs the second language model to describe the action corresponding to the first motion sequence based on the coordinate data corresponding to the first motion sequence; and the second instruction instructs the second language model to predict the second coordinates of each joint in the second motion sequence.
14. The apparatus according to claim 13, characterized in that, The prior information about the skeletal structure includes the joint sequence following the kinematic chain of the human skeleton, and the prompting module is also configured to: For each of the multiple frames involved in the first text representation, the following processing is performed: According to the joint order, the plurality of joints in the frame are sorted to obtain a joint sequence; The first coordinates of the plurality of joints are filled into the positions of each joint in the joint sequence to obtain the coordinate data of the frame; and Based on the order of the plurality of frames, the coordinate data of the plurality of frames involved in the first text representation are combined to obtain the coordinate data corresponding to the first motion sequence.
15. The apparatus according to claim 11, characterized in that, The context learning module is also configured as follows: Encode the skeletal animation data corresponding to the target motion sequence sample to obtain a second text representation of the target motion sequence sample; The following processing is performed on the second text representation of each sample in the target motion sequence sample: Multiple coordinate data of the first frame are extracted from the second text representation as coordinate data of the known frame, and multiple coordinate data of the second frame are extracted from the second text representation as coordinate data of the unknown frame, wherein the timestamp of the first frame is earlier than the timestamp of the second frame, and the first frame and the second frame are consecutive frames. Based on the coordinate data of the known frame, a second prompt is generated, wherein the second prompt is used to instruct the first language model to predict the coordinate data of the unknown frame; Based on the second prompt, the first language model is used to generate a coordinate prediction result corresponding to the unknown frame; and The coordinate data of the unknown frame is input into the first language model.
16. The apparatus according to claim 11, characterized in that, The sample selection module is also configured to: Obtain an array corresponding to each of the plurality of reference motion sequence samples; The first set is initialized to an empty set, and the second set is initialized to a set that includes all the arrays mentioned above; When the number of elements in the first set is less than the first threshold, the following processing is performed iteratively: Obtain arrays that belong to the second set but not to the first set, and merge these arrays with the first set respectively to obtain a third set; Determine the representative score of each of the third sets relative to the second set, and obtain the target third set with the highest representative score; and Remove the array from the second set that was merged with the first set to obtain the target third set, and add the removed array to the first set; and When the number of elements in the first set is equal to the first threshold, the reference motion sequence sample corresponding to the array included in the first set is determined as the target reference motion sequence sample.
17. The apparatus according to claim 16, characterized in that, The sample selection module is also configured to: The associated set of the third set is initialized to the third set, and the set to be traversed is initialized to the third set; When the set to be traversed is not empty, the following processing is performed iteratively on the set to be traversed: Obtain the matching set corresponding to the set to be traversed; When an array related to the set to be traversed is determined in the set to be matched, the related array is added to the associated set, and all arrays in the set to be traversed are replaced with the related array; and When no array related to the set to be traversed is determined in the set to be matched, the number of arrays included in the associated set is determined as the representative score of the third set, and the set to be traversed is updated to an empty set.
18. An electronic device, characterized in that, include: Memory, configured to store computer-executable instructions; and The processor is configured to execute the motion sequence prediction method according to any one of claims 1 to 10 when executing computer-executable instructions stored in the memory.
19. A computer-readable storage medium having computer-executable instructions stored thereon, characterized in that, The computer-executable instructions, when executed by a processor, cause the processor to perform the motion sequence prediction method according to any one of claims 1 to 10.
20. A computer program product comprising computer-executable instructions, characterized in that, The computer-executable instructions, when executed by a processor, cause the processor to perform the motion sequence prediction method according to any one of claims 1 to 10.
