AI-based dance choreography generation method, device and system
By establishing a three-dimensional spatial coordinate system and using AI iterative evolution algorithms to optimize dance choreography, the problem of coordination between movement combinations and rhythm in dance choreography has been solved, improving the fluidity and visual appeal of the dance.
Patent Information
- Application Number
- CN202511485084.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-17
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2045-10-17
AI Technical Summary
Existing technologies struggle to optimize a wider range of possible movement combinations while maintaining fluidity in dance choreography, and they fail to adequately consider the coordination between basic movement elements and the speed of movement, resulting in a decrease in the aesthetic appeal of the dance.
By establishing a three-dimensional spatial coordinate system for basic motion elements and connecting motion elements, the trajectories and vectors of motion nodes are recorded. AI is used to generate dance choreography schemes, including iterative evolutionary algorithms to optimize the combination of choreography units, ensuring that the movements match the music beat and improving smoothness.
It achieves better fluidity and visual appeal in dance choreography based on music beats, and improves the efficiency and quality of dance choreography by optimizing movement combinations through AI.
Smart Images

Figure CN120953452A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, specifically to an AI-based method, apparatus, and system for generating dance choreography. Background Technology
[0002] Dance is essentially composed of a series of coherent basic movement elements. Experienced dance professionals, through mastery of various basic movement elements and in conjunction with the rhythm of music, combine and string these elements together to form a dance. Basic movement elements can be established based on the body's coordinate axes, such as using the waist as the origin to establish the coordinate relationships of the limbs and head. Another characteristic of basic movement elements is their dynamic nature; the starting points of these elements have a trajectories and movement sequences. Experienced choreographers plan the connections between basic movement elements based on their experience and the rhythm of the music, requiring numerous choreography trials to arrive at the optimal sequence. It is important to note that each basic movement element is closely related to the previous one, as the ending of the previous element needs to connect seamlessly with the current one. Ideally, the direction of the limb's inertial movement in the ending movement should align with the initial direction of the current movement. The overall choreography must consider the types of basic movement elements, their connections, and the speed of movement to achieve optimal fluidity and correspondence with the musical rhythm. This choreography process is extremely time-consuming.
[0003] In existing technologies, some use AI (artificial intelligence) algorithms to match basic movement elements with musical rhythms; however, these technologies face implementation difficulties. First, transitions between basic movement elements involve connecting movements. For example, one basic movement element might end with the dancer standing and arms outstretched, while another connecting basic movement element might end with one leg kneeling and the other extended with arms wrapped around the waist. Second, simply considering the splicing of basic movement elements to form a dance doesn't account for fluidity; the ending of one basic movement element needs to connect seamlessly with the current one. Furthermore, the speed of basic movement elements and connecting movements isn't constant; otherwise, the number of possible dance sequences would be greatly reduced, and the visual appeal of the dance's flow and transitions would be diminished. Summary of the Invention
[0004] (1) Technical problems to be solved
[0005] The purpose of this invention is to provide an AI-based method, device, and system for generating dance choreography, in order to optimize more possible combinations of movements and achieve better fluidity while keeping the dance movements in sync with the beat.
[0006] (2) Technical solution
[0007] To achieve the above objectives, in one aspect, the present invention provides an AI-based dance choreography generation method, the method comprising:
[0008] A basic motion element library is established. A three-dimensional spatial coordinate system is established with the waist as the origin. The joints of the limbs are set as motion nodes. The spatial coordinate motion trajectory of each motion node in each basic motion element relative to the origin is recorded. The starting coordinates and starting motion vectors of each motion node at the start time and the ending coordinates and ending motion vectors of each motion node at the end time are obtained through the spatial coordinate motion trajectory.
[0009] Establish a library of connecting motion elements. Generate connecting motion elements by using the linear motion trajectories of each motion node between the ending coordinates of the first basic motion element and the starting coordinates of the second basic motion element. Record the spatial motion trajectory and duration of the connecting motion elements. Obtain the beat time sequence of the pre-selected music and use the beat time sequence as the time reference point for the motion element transformation.
[0010] An initial population for generating dance choreography schemes is generated. The initial population includes multiple individuals, each representing a dance choreography scheme. Each dance choreography scheme consists of multiple choreography units arranged in chronological order. Each choreography unit includes a unit type, a unit selection state, a unit start time, and a unit speed adjustment coefficient. The unit type is used to mark the basic motion element corresponding to the choreography unit. The unit selection state takes the value 0 or 1. The unit start time represents the start time point of the choreography unit in the dance choreography. The unit speed adjustment coefficient represents the ratio of the choreography unit to the standard speed.
[0011] The initial population is iteratively evolved to obtain the final dance choreography scheme. The choreography unit with state 1 is selected from the units in the final dance choreography scheme. The spatial coordinate motion trajectory and unit speed adjustment coefficient of the basic motion element or connecting motion element corresponding to each choreography unit are output in sequence according to the start time of the unit, generating a complete dance choreography output sequence.
[0012] Furthermore, the method of establishing a three-dimensional spatial coordinate system with the waist as the origin, setting the joints of the limbs as motion nodes, and recording the spatial coordinate motion trajectory of each motion node in each basic motion element relative to the origin; obtaining the starting coordinates and starting motion vector of each motion node of each basic motion element at the starting moment, and the ending coordinates and ending motion vector of each motion node at the ending moment through the spatial coordinate motion trajectory includes:
[0013] Get the Duration of movement of each basic movement element During the duration of exercise Internal to the first Each motion node of a basic motion element is sampled at equal time intervals, and the duration of the motion is recorded. Evenly divided into There are 1 sampling time points, among which The total number of preset sampling time points; the first Each sampling time point The calculation method is as follows:
[0014] ;
[0015] in The value ranges from 1 to Integer variables; recorded by motion capture devices. The first basic action element The motion node at the _th ... Each sampling time point spatial coordinates ,in The value ranges from 1 to Integer variables, This represents the total number of moving nodes;
[0016] No. The first basic action element The initial coordinates of each moving node at the start time are the spatial coordinates corresponding to the first sampling time point. The final coordinate at the closing moment is the first... Spatial coordinates corresponding to each sampling time point ;
[0017] No. The first basic action element The initial motion vector of each moving node at the initial time. The value is calculated by the ratio of the coordinate difference between the first two sampling time points to the time interval, and is:
[0018] ;
[0019] No. The first basic action element The closing motion vector of each motion node at the closing moment The value is calculated by the ratio of the coordinate difference between the last two sampling time points to the time interval, and is:
[0020] .
[0021] Furthermore, the method for generating connecting motion elements by means of the linear motion trajectories of each motion node between the ending coordinates of the first basic motion element and the starting coordinates of the second basic motion element, and recording the spatial motion trajectory and duration of the connecting motion elements, includes:
[0022] Get the The first basic action element The final coordinates of each motion node at the final moment and the The first basic action element The starting coordinates of each moving node at the initial moment ;
[0023] Calculate the first The basic action element to the first Between the basic action elements The linear motion distance of each moving node for:
[0024] ;
[0025] Determine the maximum straight-line motion distance from the straight-line motion distances of all moving nodes. for:
[0026] ;
[0027] Through the maximum straight-line distance With the preset speed of movement The ratio calculation starts from the first The basic action element to the first Duration of the connection between basic action elements :
[0028] ;
[0029] Record from the first The basic action element to the first The spatial motion trajectory of the connecting elements of the basic motion elements, the first The spatial motion trajectory of each motion node in the motion progress parameter spatial coordinates below for:
[0030] ;
[0031] The motion progress parameters The value can be 0 or 1. Indicates that it is located at the th The final coordinates of each basic action element. Indicates that it is located at the th The starting coordinates of each basic action element.
[0032] Furthermore, the method for iteratively evolving the initial population to obtain the final dance choreography scheme includes:
[0033] The iterative evolution steps include calculating the fitness value of each dance choreography scheme. The fitness value is calculated based on the time deviation between the start time of the choreography unit and the time of the pre-selected music beat, the vector angle between the closing motion vector of the previous choreography unit and the starting motion vector of the next choreography unit, and the connection duration of the connecting motion elements between adjacent choreography units.
[0034] The dance choreography schemes are sorted according to the fitness values, and a preset number of winning individuals are selected by roulette wheel selection. The winning individuals are then cross-crossed and mutated to obtain offspring individuals. The initial population is replaced with the offspring individuals, and the iterative evolution process is repeated until the improvement in the fitness values of the offspring individuals and the parent individuals is lower than the set convergence threshold. The optimal individual after the iterative evolution is taken as the final dance choreography scheme.
[0035] Furthermore, the method for calculating the fitness value of each dance choreography scheme includes:
[0036] Get the The dance choreography scheme, the first The dance choreography plan includes The arrangement unit; calculate the first... The average beat deviation of each dance choreography scheme is compared with a preset beat deviation threshold to determine the... Does the dance choreography scheme meet the beat fit constraint?
[0037] When the When a dance choreography scheme satisfies the beat fit constraint, calculate the smoothness value of the h-th dance choreography scheme, and use the smoothness value as the h-th dance choreography scheme. The fitness value of a dance choreography scheme;
[0038] When the first When a dance choreography scheme does not meet the aforementioned beat-matching constraint, the first... The fitness value of each dance choreography scheme is set to zero.
[0039] Furthermore, the calculation of the first The average beat deviation of each dance choreography scheme is compared with a preset beat deviation threshold to determine the... Methods for determining whether a dance choreography scheme meets the beat fit constraint include:
[0040] Get the The first dance choreography scheme Unit selection status of each arrangement unit and the start time of the unit ,in The value ranges from 1 to Integer variables;
[0041] Regarding the unit selection status For an arrangement unit with a value of 1, calculate the start time of that unit. With the pre-selected music beat time sequence Each beat moment The absolute value of the time difference is selected, and the minimum value among all absolute values of time differences is taken as the first. The first dance choreography scheme Time deviation of each arrangement unit for:
[0042] ;
[0043] in The value ranges from 1 to Integer variables, The total number of beat moments;
[0044] Calculate the first The number of choreography units with a state of 1 in each dance choreography scheme. The time deviation of the orchestration unit with state 1 is selected for all units. Calculate the average value to obtain the first... Average beat deviation of each dance choreography scheme for:
[0045] ;
[0046] The average beat deviation Compare with a preset beat deviation threshold to determine the first... Does the dance choreography scheme meet the beat matching constraint?
[0047] Further, the calculation of the first Methods for calculating the smoothness value of a dance choreography scheme include:
[0048] For the first The adjacent dance choreography scheme The first arrangement unit and the first The first arrangement unit, when the first... Unit selection status of each arrangement unit and the Unit selection status of each arrangement unit When both are 1, obtain the first... The first basic motion element corresponding to the first arrangement unit The tail motion vector of each motion node and the The first basic motion element corresponding to the first arrangement unit The initial motion vector of each motion node ,in The value ranges from 1 to Integer variables;
[0049] Calculate the angle between the closing motion vector and the starting motion vector of the j-th motion node. for:
[0050] ;
[0051] The average of the angles between the vectors of all moving nodes is taken as the first... The first dance choreography scheme The first arrangement unit and the first The average vector angle between each arrangement unit for:
[0052] ;
[0053] According to the The basic action meta-index corresponding to the first arrangement unit and the first The basic action meta-index corresponding to each orchestration unit is used to query the corresponding connection duration from the connection action meta-database as the first... The first dance choreography scheme The first arrangement unit and the first Duration of connection between each orchestration unit ;
[0054] Through the average vector angle and the duration of the connection Calculate the first The smoothness of each dance choreography scheme for:
[0055] .
[0056] Based on the same inventive concept, in a second aspect, the present invention also provides an AI-based dance choreography generation device, the device comprising:
[0057] The first library building unit is used to build a basic motion element library. A three-dimensional spatial coordinate system is established with the waist as the coordinate origin. The joints of the limbs are set as motion nodes. The spatial coordinate motion trajectory of each motion node in each basic motion element relative to the coordinate origin is recorded. The starting coordinates and starting motion vectors of each motion node at the start time of each basic motion element are obtained through the spatial coordinate motion trajectory, as well as the ending coordinates and ending motion vectors of each motion node at the end time.
[0058] The second library building unit is used to build a library of connecting action elements. It generates connecting action elements by using the linear motion trajectory of each motion node between the end coordinates of the first basic action element and the start coordinates of the second basic action element. It records the spatial motion trajectory and connection duration of the connecting action elements. It also obtains the beat time sequence of the pre-selected music and uses the beat time sequence as the time reference point for action element transformation.
[0059] The AI algorithm unit is used to generate an initial population of dance choreography schemes. The initial population includes multiple individuals, each representing a dance choreography scheme. Each dance choreography scheme consists of multiple choreography units arranged in chronological order. Each choreography unit includes a unit type, a unit selection state, a unit start time, and a unit speed adjustment coefficient. The unit type is used to mark the basic motion element corresponding to the choreography unit. The unit selection state is 0 or 1. The unit start time represents the starting time point of the choreography unit in the dance choreography. The unit speed adjustment coefficient represents the ratio of the choreography unit to the standard speed. The initial population is iteratively evolved to obtain the final dance choreography scheme. For the choreography units in the final dance choreography scheme with a unit selection state of 1, the spatial coordinate motion trajectory of the basic motion element or connecting motion element corresponding to each choreography unit and the unit speed adjustment coefficient are output in chronological order of the unit start time, generating a complete dance choreography output sequence.
[0060] Based on the same inventive concept, in a third aspect, the present invention also provides an AI-based dance choreography generation system, including a motion capture device for acquiring basic motion elements, one or more processors, a memory, and one or more programs, wherein the motion capture device includes an accelerometer and a gyroscope, the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include methods for executing the AI-based dance choreography generation method.
[0061] (3) Beneficial effects
[0062] Compared with existing technologies, this invention digitizes basic dance movement elements and iteratively optimizes the combination of these elements using AI data, resulting in better fluidity when the basic movement elements match the music beat. Attached Figure Description
[0063] Figure 1 This is a flowchart of the AI-based dance choreography generation method according to Embodiment 1 of the present invention;
[0064] Figure 2 This is a unit block diagram of the AI-based dance choreography generation device according to Embodiment 2 of the present invention. Detailed Implementation
[0065] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0066] Before providing examples, it's necessary to explain the application scenario of this invention. While the fluidity and visual appeal of dance choreography are subjective, it's crucial to analyze the underlying physical meaning behind these qualities. After pre-selecting background music for a dance, extracting its beat can be understood as ensuring that the changes in basic movement elements ideally occur near the beat, giving the dance a rhythmic feel. Secondly, the changes in basic movement elements cannot be arbitrary; rather, the difference between the final limb movement direction of a basic movement element (the head's movement relative to the waist is simple and has a small amplitude, which we ignore in this example, but the principle is the same as for the limbs) and the starting limb movement direction of the next movement should be minimized. Furthermore, all basic movement elements and connecting movements can have speed differences, but these must be within a set range, considering overall coordination. We need to pre-choreograph the basic movement elements and connecting movements, and then use AI algorithms to optimize the corresponding parameters. It is important to note that the direction of the limb movement at the end of some basic movement elements differs significantly from the direction of the limb movement at the beginning of another movement. If a connecting movement is established in advance, the duration and range of limb changes of such connecting movements will naturally increase, which will affect the overall smoothness of the dance. However, if the duration of such connecting movements is shortened, its impact on smoothness will be reduced. Connecting movements can be understood as linear movements of the limbs between two basic movement elements. If the connecting movement has a complex movement trajectory, it can be recorded separately and designed as a basic movement element.
[0067] Example 1: As Figure 1 As shown, this embodiment provides an AI-based dance choreography generation method, the method including:
[0068] S1. Establish a basic motion element library. Establish a three-dimensional spatial coordinate system with the waist as the origin. Set the joints of the limbs as motion nodes. Record the spatial coordinate motion trajectory of each motion node in each basic motion element relative to the origin. Obtain the starting coordinates and starting motion vector of each motion node at the start time and the ending coordinates and ending motion vector of each motion node at the end time through the spatial coordinate motion trajectory.
[0069] S2. Establish a linking motion element library. Generate linking motion elements by the linear motion trajectory of each motion node between the ending coordinates of the first basic motion element and the starting coordinates of the second basic motion element. Record the spatial motion trajectory and linking duration of the linking motion elements. Obtain the beat time sequence of the pre-selected music and use the beat time sequence as the time reference point for motion element transformation.
[0070] S3. Generate an initial population of dance choreography schemes. The initial population includes multiple individuals, each representing a dance choreography scheme. Each dance choreography scheme consists of multiple choreography units arranged in chronological order. Each choreography unit includes a unit type, a unit selection state, a unit start time, and a unit speed adjustment coefficient. The unit type is used to mark the basic motion element corresponding to the choreography unit. The unit selection state takes the value 0 or 1. The unit start time represents the start time point of the choreography unit in the dance choreography. The unit speed adjustment coefficient represents the ratio of the choreography unit to the standard speed.
[0071] S4. Iteratively evolve the initial population to obtain the final dance choreography scheme. Select the choreography unit with state 1 in the final dance choreography scheme, and output the spatial coordinate motion trajectory and unit speed adjustment coefficient of the basic motion element or connecting motion element corresponding to each choreography unit in the order of the unit's start time to generate a complete dance choreography output sequence.
[0072] For example, in a dance choreography using AI, motion capture equipment was used to record and store 10 typical basic movement elements of Dai dance. The first movement element is a three-bend pose, lasting 3.2 seconds; the second movement element is a peacock spreading its wings, lasting 2.8 seconds; the third movement element is a water wave hand gesture, lasting 3.5 seconds; the fourth movement element is a single-leg knee raise and rotation, lasting 4.1 seconds; the fifth movement element is a squatting posture with hands clasped together, lasting 2.6 seconds; the sixth movement element is a fish leap forward, lasting 3.3 seconds; the seventh movement element is a side waist sway, lasting 2.9 seconds; the eighth movement element is a tiptoe turn, lasting 3.8 seconds; the ninth movement element is a knee bend and sinking, lasting 2.4 seconds; and the tenth movement element is an arm wave upward, lasting 3.1 seconds. A three-dimensional coordinate system was established with the center point of the dancer's waist as the origin. Twelve joints—left and right shoulder joints, left and right elbow joints, left and right wrist joints, left and right hip joints, left and right knee joints, and left and right ankle joints—were selected as motion nodes. The shoulder, elbow, and wrist joints constitute the upper limb kinematic chain, while the hip, knee, and ankle joints constitute the lower limb kinematic chain. These joints can comprehensively describe the spatial position and movement of the limbs in dance movements. The head, however, has a relatively small range of motion relative to the waist and its changes are relatively simple; therefore, it is not the primary tracking object in this case. Motion capture equipment was used to uniformly sample each basic motion element at 100 time points, recording the three-dimensional spatial coordinate values of the 12 motion nodes at each sampling time point.
[0073] Detailed data was collected for the first movement, the three-bend pose. The spatial coordinates of the left shoulder joint at the beginning were 18cm to the left, 5cm forward, and 22cm upward relative to the waist, and at the end were 20cm to the left, 8cm forward, and 23cm upward. The starting coordinates of the left elbow joint were 28cm to the left, 12cm forward, and 15cm upward, and the ending coordinates were 32cm to the left, 18cm forward, and 18cm upward. The starting coordinates of the left wrist joint were 23cm to the left, 18cm forward, and 45cm upward, and the ending coordinates were 35cm to the left, 28cm forward, and 52cm upward. The right limbs are symmetrically distributed. The starting coordinates of the right shoulder joint are 18cm to the right, 5cm forward, and 22cm upward, and the ending coordinates are 20cm to the right, 8cm forward, and 23cm upward. The starting coordinates of the right elbow joint are 27cm to the right, 10cm forward, and 16cm upward, and the ending coordinates are 31cm to the right, 17cm forward, and 19cm upward. The starting coordinates of the right wrist joint are 21cm to the right, 12cm backward, and 43cm upward, and the ending coordinates are 32cm to the right, 20cm backward, and 50cm upward. For the lower limbs, the starting coordinates of the left hip joint are 12cm to the left, 2cm forward, and 8cm downward, and the ending coordinates are 13cm to the left, 3cm forward, and 7cm downward; the starting coordinates of the left knee joint are 15cm to the left, 8cm forward, and 45cm downward, and the ending coordinates are 16cm to the left, 10cm forward, and 43cm downward; the starting coordinates of the left ankle joint are 18cm to the left, 12cm forward, and 82cm downward, and the ending coordinates are 19cm to the left, 13cm forward, and 81cm downward. The starting coordinates of the right hip joint are 12cm to the right, 2cm forward, and 8cm downward, and the ending coordinates are 13cm to the right, 3cm forward, and 7cm downward. The starting coordinates of the right knee joint are 16cm to the right, 9cm forward, and 44cm downward, and the ending coordinates are 17cm to the right, 11cm forward, and 42cm downward. The starting coordinates of the right ankle joint are 18cm to the right, 13cm forward, and 83cm downward, and the ending coordinates are 19cm to the right, 14cm forward, and 82cm downward. The starting motion vector of each motion node is calculated by the ratio of the coordinate difference between the first and second sampling time points to the time interval of 0.032 seconds. For example, the starting motion vector of the left wrist joint is 37.5cm / s laterally, 31.25cm / s longitudinally, and 21.875cm / s vertically.The initial motion vector essentially represents the velocity and direction of movement at each joint at the instant the movement begins. This vector contains information about the initial state of force exertion and the direction of limb inertia. When connecting to the next basic motion element after the previous one ends, if the direction of the closing motion vector of the previous movement is close to the direction of the starting motion vector of the next movement, the limb can transition naturally with inertia. Conversely, if the two vectors are opposite in direction or the angle between them is too large, additional energy is required to change the direction of movement, which will lead to a sense of pause and lack of smoothness in the movement. Therefore, the initial motion vector and the closing motion vector are parameters for evaluating the smoothness of movement transitions. Similarly, the closing motion vector is calculated using the last two sampling time points. The closing motion vector of the left wrist joint is 40.625 cm / s laterally, 34.375 cm / s longitudinally, and 25 cm / s vertically.
[0074] Data was collected for the second movement, "Peacock Spreads Wings." The starting coordinates of the left wrist joint were 42cm to the left, 8cm backward, and 58cm upward, with the ending coordinates being 55cm to the left, 18cm backward, and 48cm upward. The starting coordinates of the right wrist joint were 40cm to the right, 6cm backward, and 56cm upward, with the ending coordinates being 53cm to the right, 16cm backward, and 46cm upward. The starting coordinates of the left shoulder joint were 19cm to the left, 2cm backward, and 23cm upward, with the ending coordinates being 22cm to the left and 5cm backward. m, upward 24cm; the starting coordinates of the right shoulder joint are 19cm to the right, 2cm backward, and 23cm upward, and the ending coordinates are 22cm to the right, 5cm backward, and 24cm upward; the starting coordinates of the left elbow joint are 35cm to the left, 5cm backward, and 28cm upward, and the ending coordinates are 43cm to the left, 12cm backward, and 22cm upward; the starting coordinates of the right elbow joint are 34cm to the right, 4cm backward, and 27cm upward, and the ending coordinates are 42cm to the right, 11cm backward, and 21cm upward. The lower limb joint data are as follows: Left hip joint: starting coordinates 11cm to the left, 1cm forward, 7cm downward; ending coordinates 12cm to the left, 2cm forward, 6cm downward. Left knee joint: starting coordinates 14cm to the left, 7cm forward, 43cm downward; ending coordinates 15cm to the left, 9cm forward, 41cm downward. Left ankle joint: starting coordinates 17cm to the left, 11cm forward, 81cm downward; ending coordinates 18cm to the left, 12cm forward, 80cm downward. The right lower limb is symmetrically distributed. The calculated starting motion vectors for the left wrist joint are 46.43cm / s laterally, -35.71cm / s longitudinally, and -35.71cm / s vertically; the ending motion vectors are 48.21cm / s laterally, -37.50cm / s longitudinally, and -39.29cm / s vertically.
[0075] Following this pattern, a linking motion element library is established based on the pairwise connections between the 10 basic motion elements. The spatial straight-line distances between each motion node and the starting coordinates of the first motion element (three-bend pose) and the second motion element (peacock spreading wings) are calculated. The left wrist joint needs to move from the ending coordinates 35cm to the left, 28cm forward, and 52cm upward to the starting coordinates 42cm to the left, 8cm backward, and 58cm upward, with a horizontal movement of 7cm, a vertical movement of 36cm, and a vertical movement of 6cm, resulting in a spatial straight-line distance of 37.3cm. The right wrist joint needs to move from 32cm to the right, 20cm backward, and 50cm upward to the right, 40cm backward, 6cm backward, and 56cm upward, resulting in a spatial straight-line distance of 16.1cm. The movement distances of the 12 motion nodes are calculated sequentially, and the 37.3cm distance for the left wrist joint is found to be the maximum. The movement speed of the joints in the human body in space is subject to coordination constraints. If joints with shorter movement distances are made to reach their positions quickly while joints with longer movement distances move slowly, it will cause asynchrony and distortion in limb movements. Therefore, the time required for the joint with the longest movement distance must be used as a benchmark, ensuring that all joints complete the position transition synchronously within the same time frame. This guarantees the integrity and coordination of the body posture. In other words, although some joints can reach the predetermined position quickly, they must wait for the slowest joint to reach it. Based on a preset transition speed of 50cm per second, the transition duration from the first motion element to the second motion element is 0.75 seconds. The linear motion trajectory parameters of 12 motion nodes from the starting coordinate to the target coordinate are recorded. For example, the motion trajectory parameters of the left wrist joint are: horizontally, linearly changing from 35cm to 42cm; vertically, linearly changing from 28cm to -8cm; and vertically, linearly changing from 52cm to 58cm. The change in the motion progress parameter from 0 to 1 corresponds to the complete transition process from the starting point to the ending point. Using this method, all 90 connection combinations between 10 basic motion elements are calculated. The duration of the transition from the 1st action element to the 3rd action element is 1.02 seconds, from the 2nd action element to the 4th action element is 1.18 seconds, from the 3rd action element to the 5th action element is 0.86 seconds, from the 4th action element to the 6th action element is 0.94 seconds, from the 5th action element to the 7th action element is 1.05 seconds, from the 6th action element to the 8th action element is 0.78 seconds, from the 7th action element to the 9th action element is 1.12 seconds, and from the 8th action element to the 10th action element is 0.91 seconds. The duration of the remaining transition combinations is calculated based on the maximum node movement distance, ranging from 0.65 seconds to 1.38 seconds, thus completing the establishment of the transition action element library. A piece of music for a Dai ethnic dance was selected, with a total duration of 120 seconds. The strong and weak beats in the music were identified using a beat extraction algorithm, and a total of 96 beat points were extracted.The first beat occurs at 0.5 seconds, the second at 1.75 seconds, the third at 3.0 seconds, the fourth at 4.25 seconds, the fifth at 5.5 seconds, and so on, averaging one beat every 1.25 seconds. These 96 beat points serve as the time reference for subsequent movement changes in the choreography. When the start or end of a dance movement falls precisely on the musical beat, the audience's visual and auditory stimuli resonate, and the brain interprets this synchronicity as rhythm and cadence. Conversely, if the movement changes deviate too far from the beat, it creates a feeling of dragging or rushing, reducing the dance's visual appeal.
[0076] The initial population required for the genetic algorithm is generated, with a population size of 50 individuals. Each individual represents a complete dance choreography scheme, and each scheme has 30 choreography unit slots arranged chronologically. Each choreography unit contains four parameters: the first is the unit type, ranging from 1 to 10, corresponding to 10 basic motion elements; the second is the unit selection status, with a value of 0 or 1, where 0 indicates the slot is inactive and 1 indicates it is active; the third is the unit start time, representing the start time of the choreography unit in the dance, in seconds; and the fourth is the unit speed adjustment coefficient, ranging from 0.8 to 1.2, representing the playback ratio of the choreography unit relative to the standard speed. Setting the unit selection status allows the genetic algorithm to flexibly adjust the number of motion elements actually used during evolution. Some basic motion elements may not be suitable for certain music segments; setting their selection status to 0 allows skipping those motion elements without affecting the continuity of the overall choreography sequence. The reason why the speed adjustment factor can vary from 0.8 to 1.2 is that the same basic motion element can adapt to different rhythmic music segments at different playback speeds. For example, a speed factor of 0.8 means that the motion is slowed down to 80% of the standard speed, making the motion more gentle and suitable for slow-tempo music; a speed factor of 1.2 means that the motion is accelerated to 120% of the standard speed, making the motion more agile and powerful, suitable for fast-tempo music. However, the speed adjustment range cannot be too large, otherwise it will lead to motion distortion or violate the laws of human kinematics. An initial population of 50 individuals is randomly generated. For example, the first 5 units of the first individual are: Unit 1, type 3, corresponds to a wave-like hand gesture, selected state 1, start time 0.5 seconds, and speed coefficient 1.05; Unit 2, type 1, corresponds to a three-bend gesture, selected state 1, start time 4.3 seconds, and speed coefficient 0.95; Unit 3, type 7, corresponds to a side-swaying waist gesture, selected state 0, start time 8.1 seconds, and speed coefficient 1.0; Unit 4, type 5, corresponds to a hands-clasped squat, selected state 1, start time 11.8 seconds, and speed coefficient 0.88; Unit 5, type 9, corresponds to a knee-bending sinking gesture, selected state 1, start time 15.2 seconds, and speed coefficient 1.12. Since the selected state of Unit 3 is 0, these units are skipped in the actual arrangement. The first five arrangement units of the second individual are: Type 2, State 1, Time 0.6 seconds, Coefficient 0.92; Type 4, State 1, Time 3.8 seconds, Coefficient 1.08; Type 6, State 1, Time 8.5 seconds, Coefficient 0.85; Type 10, State 0, Time 12.1 seconds, Coefficient 1.0; Type 8, State 1, Time 15.7 seconds, Coefficient 1.15. Following this rule, initial random parameter values are assigned to the 30 arrangement units of each individual, completing the construction of the initial population.The initial population underwent iterative evolution. In each iteration, the fitness value of each individual was calculated. The fitness value considered three core factors: first, the time deviation between the start time of the choreography unit and the timing of the musical beat; a smaller deviation indicates a higher degree of fit between the movement change and the beat; second, the angle between the ending motion vector of the previous choreography unit and the starting motion vector of the next choreography unit; a smaller angle indicates better smoothness of the movement transition; and third, the duration of the connecting motion elements between adjacent choreography units; a shorter duration indicates a more compact movement transition. After 150 generations of genetic evolution iterations, the increase in the fitness value of the population decreased to below 0.1%, satisfying the convergence condition. The individual with the highest fitness value in the final population is selected as the final dance choreography scheme. This scheme contains 23 effective choreography units with a selection state of 1, in the following order: Type 3, Type 1, Type 5, Type 2, Type 7, Type 4, Type 9, Type 6, Type 10, Type 8, Type 3, Type 5, Type 1, Type 7, Type 2, Type 4, Type 6, Type 9, Type 10, Type 8, Type 5, Type 3, and Type 1. Following the start time sequence of these 23 choreography units, the spatial coordinate motion trajectory and speed adjustment coefficient of the corresponding basic motion elements are output sequentially. Simultaneously, the spatial motion trajectory of the corresponding connecting motion elements is inserted between adjacent choreography units, ultimately generating a complete 120-second Dai ethnic dance choreography output sequence. This sequence contains 23 basic motion elements and 22 connecting motion elements, which can directly drive a virtual character or robot to complete the dance movements.
[0077] Furthermore, the method of establishing a three-dimensional spatial coordinate system with the waist as the origin, setting the joints of the limbs as motion nodes, and recording the spatial coordinate motion trajectory of each motion node in each basic motion element relative to the origin; obtaining the starting coordinates and starting motion vector of each motion node of each basic motion element at the starting moment, and the ending coordinates and ending motion vector of each motion node at the ending moment through the spatial coordinate motion trajectory includes:
[0078] Get the Duration of movement of each basic movement element During the duration of exercise Internal to the first Each motion node of a basic motion element is sampled at equal time intervals, and the duration of the motion is recorded. Evenly divided into There are 1 sampling time points, among which The total number of preset sampling time points; the first Each sampling time point The calculation method is as follows:
[0079] ;
[0080] in The value ranges from 1 to Integer variables; recorded by motion capture devices. The first basic action element The motion node at the _th ... Spatial coordinates of each sampling time point 𝑡𝑘 ,in The value ranges from 1 to Integer variables, This represents the total number of moving nodes;
[0081] No. The first basic action element The initial coordinates of each moving node at the start time are the spatial coordinates corresponding to the first sampling time point. The final coordinate at the closing moment is the first... Spatial coordinates corresponding to each sampling time point ;
[0082] No. The first basic action element The initial motion vector of each moving node at the initial time. The value is calculated by the ratio of the coordinate difference between the first two sampling time points to the time interval, and is:
[0083] ;
[0084] No. The first basic action element The closing motion vector of each motion node at the closing moment The value is calculated by the ratio of the coordinate difference between the last two sampling time points to the time interval, and is:
[0085] .
[0086] For example, detailed sampling data is recorded for the first basic motion element, the three-curve shape, with a motion duration of 3.2 seconds. The 3.2-second duration is evenly divided into 100 sampling time points. The total number of sampling points is set to 100 to balance the accuracy of the motion trajectory with the amount of data stored. Too few sampling points will result in insufficient detail in the motion trajectory description, leading to the loss of key motion details; too many sampling points will generate redundant data, increasing the storage burden, and the small coordinate differences between adjacent sampling points will affect the accuracy of motion vector calculation. The specific time values for each sampling time point are calculated: the first sampling time point is 0 seconds, the second is 0.0323 seconds, the third is 0.0646 seconds, the tenth is 0.2909 seconds, the fiftyth is 1.5859 seconds, the ninety-ninth is 3.1677 seconds, and the tenth is 3.2 seconds. The reason for using 99 instead of 100 in the denominator is that equal interval division means dividing the time period into 99 small intervals to generate 100 dividing points. If 100 is used in the denominator, the time value of the last sampling point will be less than the duration of 3.2 seconds, and the attitude data at the end of the action cannot be correctly collected.
[0087] Using a 3D motion capture device, the spatial coordinates of the 12 motion nodes of the first basic motion element's three-curve shape were recorded at each sampling time point. Taking the left wrist joint as an example, detailed data is shown. At the first sampling time point of 0 seconds, the spatial coordinates are 23cm to the left, 18cm forward, and 45cm upward. At the second sampling time point of 0.0323 seconds, the coordinates are 23.12cm to the left, 18.10cm forward, and 45.07cm upward. At the tenth sampling time point of 0.2909 seconds, the coordinates are 24.09cm to the left, 19.01cm forward, and 45.65cm upward. At the fiftyth sampling time point of 1.5859 seconds, the coordinates are 29.06cm to the left, 23.04cm forward, and 48.52cm upward. At the ninety-ninth sampling time point of 3.1677 seconds, the coordinates are 34.88cm to the left, 27.90cm forward, and 51.93cm upward. At the tenth sampling time point of 3.2 seconds, the coordinates are 35cm to the left, 28cm forward, and 52cm upward. The sampling data shows that the left wrist joint exhibits a continuous motion trajectory extending from the left front of the body to the upper left lateral side throughout the entire movement. Using the same method, the spatial coordinate data of the remaining 11 motion nodes were recorded at all 100 sampling time points, completing the complete spatial motion trajectory data acquisition for the first basic motion element. Similarly, the second basic motion element, "Peacock Spreads Wings," was sampled for 2.8 seconds with a sampling interval of 0.0283 seconds; the third basic motion element, "Water Wave Hand Swing," was sampled for 3.5 seconds with a sampling interval of 0.0354 seconds; the fourth basic motion element, "Single Leg Knee Raise and Rotate," was sampled for 4.1 seconds with a sampling interval of 0.0414 seconds; the fifth basic motion element, "Hands Clasped and Squatting," was sampled for 2.6 seconds with a sampling interval of 0.0263 seconds; and the sixth basic motion element, "Fish Leap Forward," was sampled. The duration was 3.3 seconds, with a sampling interval of 0.0333 seconds; the 7th basic movement element, side-swinging waist, was sampled, with a duration of 2.9 seconds and a sampling interval of 0.0293 seconds; the 8th basic movement element, tiptoeing and turning, was sampled, with a duration of 3.8 seconds and a sampling interval of 0.0384 seconds; the 9th basic movement element, knee bending and sinking, was sampled, with a duration of 2.4 seconds and a sampling interval of 0.0242 seconds; and the 10th basic movement element, arm wave upward, was sampled, with a duration of 3.1 seconds and a sampling interval of 0.0313 seconds.
[0088] The coordinates and motion vectors of each motion node for the first basic motion element, the three-bend pose, at the start and end times are calculated using the collected spatial coordinate data. The starting coordinates are directly read from the spatial coordinate values corresponding to the first sampling time point; for the left wrist joint, the starting coordinates are 23cm to the left, 18cm forward, and 45cm upward. The ending coordinates are directly read from the spatial coordinate values corresponding to the 100th sampling time point; for the left wrist joint, the ending coordinates are 35cm to the left, 28cm forward, and 52cm upward. Calculating the starting motion vector requires using the ratio of the coordinate difference between the first two sampling time points to the time interval. The physical essence of a motion vector is a velocity vector. Velocity is defined as the displacement per unit time. The displacement difference is obtained by subtracting the coordinates of the first sampling point from the coordinates of the second sampling point, and then dividing by the time interval between the two sampling points to obtain the instantaneous velocity at that moment. This instantaneous velocity represents the direction and speed of the limb movement at the instant the action begins. Using the first two sampling points, rather than more, is to reflect the true state of the initial movement as accurately as possible without being diluted by the average effect of subsequent movements. If the first and tenth sampling points are used to calculate the initial motion vector, it will include the average movement over the first nine time intervals. The resulting vector cannot accurately represent the initial motion state and instead incorporates information about changes during the movement's development, reducing the representativeness and accuracy of the initial motion vector. The calculated initial motion vector for the left wrist joint is 3.72 cm / s for the lateral component, 3.10 cm / s for the longitudinal component, and 2.17 cm / s for the vertical component. The final motion vector was calculated by the ratio of the coordinate difference between the last two sampling time points to the time interval. The time interval between the 100th and 99th sampling points was 0.0323 seconds. The final motion vector of the left wrist joint was calculated to have a horizontal component of 3.72 cm per second, a vertical component of 3.10 cm per second, and a vertical component of 2.17 cm per second.The starting coordinates, ending coordinates, starting motion vector, and ending motion vector of each of the 12 motion nodes were calculated sequentially. The starting coordinates of the right wrist joint were 21cm to the right, 12cm backward, and 43cm upward; the ending coordinates were 32cm to the right, 20cm backward, and 50cm upward; the starting motion vector was 3.41cm horizontally, -2.48cm vertically, and 2.17cm per second; the ending motion vector was also 3.41cm horizontally, -2.48cm vertically, and 2.17cm per second. The starting coordinates of the left shoulder joint were 18cm to the left, 5cm forward, and 22cm upward. The starting and ending coordinates are 20cm to the left, 8cm forward, and 23cm upward. The initial movement vector is 0.62cm horizontally, 0.93cm vertically, and 0.31cm per second. The ending movement vector is also 0.62cm horizontally, 0.93cm vertically, and 0.31cm per second. The starting coordinates for the right shoulder joint are 18cm to the right, 5cm forward, and 22cm upward. The ending coordinates are 20cm to the right, 8cm forward, and 23cm upward. The starting coordinates for the left elbow joint are 28cm to the left, 12cm forward, and 15cm upward. The ending coordinates are 32cm to the left and 18cm forward. The starting coordinates for the right elbow joint are 27cm to the right, 10cm forward, and 16cm upward, with ending coordinates of 31cm to the right, 17cm forward, and 19cm upward. The starting coordinates for the left hip joint are 12cm to the left, 2cm forward, and 8cm downward, with ending coordinates of 13cm to the left, 3cm forward, and 7cm downward. The starting coordinates for the right hip joint are 12cm to the right, 2cm forward, and 8cm downward, with ending coordinates of 13cm to the right, 3cm forward, and 7cm downward. The starting coordinates for the left knee joint are 15cm to the left, 8cm forward, and 4cm downward. The starting coordinates for the first basic motion element are 5cm, and the ending coordinates are 16cm to the left, 10cm forward, and 43cm downward. The starting coordinates for the right knee joint are 16cm to the right, 9cm forward, and 44cm downward, and the ending coordinates are 17cm to the right, 11cm forward, and 42cm downward. The starting coordinates for the left ankle joint are 18cm to the left, 12cm forward, and 82cm downward, and the ending coordinates are 19cm to the left, 13cm forward, and 81cm downward. The starting coordinates for the right ankle joint are 18cm to the right, 13cm forward, and 83cm downward, and the ending coordinates are 19cm to the right, 14cm forward, and 82cm downward. After completing the data processing of all motion nodes of the first basic motion element, the sampling coordinate recording, starting and ending coordinate determination, and starting and ending motion vector calculation are completed for the remaining 9 basic motion elements in the same way. Finally, a complete basic motion element library is formed, containing the spatial coordinate motion trajectory, starting and ending coordinates, and starting and ending motion vectors of each of the 10 basic motion elements.
[0089] Furthermore, the method for generating connecting motion elements by means of the linear motion trajectories of each motion node between the ending coordinates of the first basic motion element and the starting coordinates of the second basic motion element, and recording the spatial motion trajectory and duration of the connecting motion elements, includes:
[0090] Get the The first basic action element The final coordinates of each motion node at the final moment and the The first basic action element The starting coordinates of each moving node at the initial moment ;
[0091] Calculate the first The basic action element to the first Between the basic action elements The linear motion distance of each moving node for:
[0092] ;
[0093] Determine the maximum straight-line motion distance from the straight-line motion distances of all moving nodes. for:
[0094] ;
[0095] Through the maximum straight-line distance With the preset speed of movement The ratio calculation starts from the first The basic action element to the first Duration of the connection between basic action elements :
[0096] ;
[0097] Record from the first The basic action element to the first The spatial motion trajectory of the connecting elements of the basic motion elements, the first The spatial motion trajectory of each motion node in the motion progress parameter spatial coordinates below for:
[0098] ;
[0099] The motion progress parameters The value can be 0 or 1. Indicates that it is located at the th The final coordinates of each basic action element. Indicates that it is located at the th The starting coordinates of each basic action element.
[0100] For example, the generation and recording of connecting motion elements are performed for a total of 90 possible combinations between 10 basic motion elements. The connection from the first basic motion element (three-bend pose) to the second basic motion element (peacock spreading wings) is explained in detail. The finishing coordinates of the 12 motion nodes of the first basic motion element at the finishing moment and the starting coordinates of the 12 motion nodes of the second basic motion element at the starting moment are obtained. The left wrist joint transitions from the finishing coordinate of the first motion element to the left (35cm), forward (28cm), and upward (52cm) to the starting coordinate of the second motion element (42cm), backward (8cm), and upward (58cm). The calculated horizontal movement of this joint point is 7cm, the vertical movement is 36cm, and the vertical movement is 6cm, resulting in a linear spatial movement distance of 37.3cm. The right wrist joint transitions from the finishing coordinate to the right (32cm), backward (20cm), and upward (50cm) to the starting coordinate (40cm), backward (6cm), and upward (56cm), resulting in a linear spatial movement distance of 16.1cm. The linear motion distances of the left shoulder joint, right shoulder joint, left elbow joint, and right elbow joint are all 3.9 cm and 19.5 cm respectively. The distances are also calculated for each of the 12 motion nodes: left knee joint, right knee joint, left ankle joint, and right ankle joint. After calculating the linear motion distances for each of the 12 nodes, the maximum linear motion distance is determined to be 37.3 cm at the left wrist joint.
[0101] Calculated based on a preset transition speed of 50cm per second, the transition duration from the first basic movement element to the second basic movement element is 0.75 seconds. This speed value is set based on the average movement speed of the human body in a relaxed state, avoiding both abrupt jumps due to excessive speed and sluggishness due to excessive slowness. The spatial movement trajectory from the first basic movement element to the second basic movement element is recorded. Taking the left wrist joint as an example, the spatial movement trajectory of the joint point is described using linear interpolation. When the movement progress parameter is 0, the corresponding ending coordinates are 35cm to the left, 28cm forward, and 52cm upward. When the movement progress parameter is 0.5, the corresponding middle position is 38.5cm to the left, 10cm forward, and 55cm upward. When the movement progress parameter is 1, the corresponding starting coordinates are 42cm to the left, 8cm backward, and 58cm upward. The essential function of connecting movements is to achieve a transition in posture between two basic movement elements. Its core requirements are speed, simplicity, and inconspicuousness. A straight-line movement trajectory is the shortest path between two points, enabling the transition to be completed in the shortest time and with the least energy consumption. If connecting movements use complex curved trajectories, on the one hand, it will increase the duration of the transition and affect the compactness of the dance rhythm; on the other hand, the complex trajectory itself will attract the audience's attention, thereby weakening the expressive effect of the basic movement element as the main body. Moreover, if a certain connecting process does require a complex movement trajectory to reflect artistry, the connecting process should be recorded separately and designed as an independent basic movement element rather than a connecting movement element. Therefore, using straight-line movement for connecting movement elements is a reasonable and necessary design choice. The spatial motion trajectory parameters of 12 motion nodes were recorded sequentially. The right wrist joint linearly changed from 32cm to the right, 20cm to the back, and 50cm to the top to 40cm to the right, 6cm to the back, and 56cm to the top. The left shoulder joint linearly changed from 20cm to the left, 8cm to the front, and 23cm to the top to 19cm to the left, 2cm to the back, and 23cm to the top. The right shoulder joint linearly changed from 20cm to the right, 8cm to the front, and 23cm to the top to 19cm to the right, 2cm to the back, and 23cm to the top. The remaining joints were recorded according to the same rules.
[0102] The parameters for the remaining 89 transition combinations were calculated using the same method. The transition from the first basic movement element to the third basic movement element (water wave hand swing) had a maximum linear distance of 22.1 cm at the left wrist joint and a duration of 0.44 seconds. The transition from the first basic movement element to the fourth basic movement element (single-leg knee raise and rotation) had a maximum linear distance of 18.3 cm at the left knee joint and a duration of 0.37 seconds. The transition from the first basic movement element to the fifth basic movement element (hands clasped in a squatting position) had a maximum linear distance of 12.8 cm at the left hip joint and a duration of 0.26 seconds. The transition duration from the second to the third basic movement element is 0.98 seconds; the transition duration from the second to the fourth basic movement element is 1.18 seconds; the transition duration from the second to the fifth basic movement element is 0.86 seconds; the transition duration from the third to the fourth basic movement element is 0.73 seconds; the transition duration from the third to the fifth basic movement element is 0.52 seconds; the transition duration from the third to the sixth basic movement element (a forward-leaning leap) is 0.81 seconds; the transition duration from the fourth to the fifth basic movement element is 0.94 seconds; the transition duration from the fourth to the seventh basic movement element (a sideways waist swing) is 1.05 seconds; and the transition duration from the fifth to the sixth basic movement element... The duration of the transition from the 5th basic movement element to the 8th basic movement element (tiptoeing and spinning) is 0.67 seconds. The duration of the transition from the 6th basic movement element to the 7th basic movement element is 0.89 seconds. The duration of the transition from the 6th basic movement element to the 9th basic movement element (knee bending and sinking) is 1.12 seconds. The duration of the transition from the 7th basic movement element to the 8th basic movement element is 0.95 seconds. The duration of the transition from the 7th basic movement element to the 10th basic movement element (arm wave upward) is 0.91 seconds. The duration of the transition from the 8th basic movement element to the 9th basic movement element is 0.76 seconds. The duration of the transition from the 8th basic movement element to the 10th basic movement element is 1.03 seconds. The duration of the transition from the 9th basic movement element to the 10th basic movement element is 0.68 seconds. The duration of the remaining connection combinations is calculated based on the ratio of the maximum node movement distance to the preset movement speed of 50 cm per second. The duration of the 90 connection combinations ranges from 0.26 seconds to 1.38 seconds, thus completing the establishment of the connection action library. The library contains the linear motion trajectory parameters of 12 motion nodes for each connection combination and the corresponding connection duration data.
[0103] Furthermore, the method for iteratively evolving the initial population to obtain the final dance choreography scheme includes:
[0104] The iterative evolution steps include calculating the fitness value of each dance choreography scheme. The fitness value is calculated based on the time deviation between the start time of the choreography unit and the time of the pre-selected music beat, the vector angle between the closing motion vector of the previous choreography unit and the starting motion vector of the next choreography unit, and the connection duration of the connecting motion elements between adjacent choreography units.
[0105] The dance choreography schemes are sorted according to the fitness values, and a preset number of winning individuals are selected by roulette wheel selection. The winning individuals are then cross-crossed and mutated to obtain offspring individuals. The initial population is replaced with the offspring individuals, and the iterative evolution process is repeated until the improvement in the fitness values of the offspring individuals and the parent individuals is lower than the set convergence threshold. The optimal individual after the iterative evolution is taken as the final dance choreography scheme.
[0106] For example, iterative evolution is performed on the initial 50 individuals of the population. Each iteration first calculates the fitness value of each dance choreography scheme. The quality of the dance choreography is reflected in different dimensions. The first indicator is the time deviation between the start time of the choreography unit and the pre-selected music beat. This indicator measures the degree of fit between the movement changes and the music rhythm. The smaller the time deviation, the closer the movement changes are to the music beat, resulting in a stronger sense of rhythm and cadence. The second indicator is the vector angle between the ending motion vector of the previous choreography unit and the starting motion vector of the next choreography unit. This indicator measures the smoothness of the movement transition. The smaller the vector angle, the closer the ending direction of the previous movement is to the starting direction of the next movement, allowing the limbs to transition naturally with inertia without drastically changing the direction of movement. The larger the angle, the more energy is required to twist the direction of movement, resulting in a sense of pause and discontinuity. The third metric is the duration of the transition between adjacent choreographic units. This metric measures the tightness of the transition; a shorter transition duration indicates a smaller difference in posture between the two basic movement elements and a more natural transition. A longer transition duration indicates a greater difference in posture, requiring more time for adjustment. Excessive transition duration weakens the expressiveness of the basic movement elements and reduces the dance's visual appeal. Although using linear motion in the transition itself ensures continuity, if the difference in posture between the two basic movement elements is too large, resulting in an excessively long transition duration, the audience will clearly perceive that the dancer is merely adjusting posture during this transition time without performing any meaningful dance movements. This prolonged posture adjustment disrupts the rhythm of the dance and reduces its overall fluidity. Therefore, the fitness function needs to penalize schemes with longer transition durations, guiding the genetic algorithm to favor choreographic combinations with smaller differences in posture between basic movement elements and shorter transition durations, thereby maximizing the dance's fluidity and visual appeal while ensuring movement diversity.
[0107] Taking the first individual as an example, a detailed explanation of fitness calculation is provided. This individual contains 30 arrangement units, of which 23 arrangement units have a selection state of 1. The first selected unit is of type 3, corresponding to a wave-like hand gesture, with a start time of 0.5 seconds and a speed coefficient of 1.05. The standard duration of this unit is 3.5 seconds, and the actual duration after speed coefficient adjustment is 3.33 seconds. The second selected unit is of type 1, corresponding to a three-bend gesture, with a start time of 4.3 seconds and a speed coefficient of 0.95, and an actual duration of 3.37 seconds. The third selected unit is of type 5, corresponding to a hands-clasped squat, with a start time of 8.2 seconds and a speed coefficient of 0.88, and an actual duration of 2.95 seconds. The absolute value of the time difference between the start time (0.5 seconds) of the first selected unit and the 96 musical beats is calculated. The difference is found to be 0 seconds with the first beat (0.5 seconds) and 1.25 seconds with the second beat (1.75 seconds). The minimum difference of 0 seconds is selected as the time deviation for this unit. The time difference between the start time (4.3 seconds) of the second selected unit and each beat is calculated. The difference is 0.05 seconds with the fourth beat (4.25 seconds) and 1.2 seconds with the fifth beat (5.5 seconds). The minimum difference of 0.05 seconds is selected as the time deviation for this unit. The time deviations of all 23 selected units are calculated sequentially, and the sum of these deviations yields a total time deviation of 6.8 seconds. Dividing this by 23 gives an average beat deviation of 0.296 seconds. The smoothness index between the first and second selected units was calculated. The finishing motion vector of the third basic motion element, "Water Wave Hand Swing," and the starting motion vector of the first basic motion element, "Three Bends," were obtained. The vector angles of the 12 motion nodes were calculated and averaged to obtain an average vector angle of 48 degrees. The duration of the transition from the third basic motion element to the first basic motion element was found to be 0.44 seconds, according to the transition motion element library. The average vector angle and transition duration between all 22 pairs of adjacent choreography units were calculated sequentially. The fitness value of the individual was calculated to be 0.582 based on the three indices. The fitness values of the remaining 49 individuals were calculated using the same method: the fitness value of the second individual was 0.514, the fitness value of the third individual was 0.631, the fitness value of the tenth individual was 0.489, the fitness value of the twentieth individual was 0.557, and the fitness value of the fiftyth individual was 0.476. The 50 individuals were sorted in descending order based on their fitness values. The fitness values of the top 10 individuals were 0.631, 0.619, 0.604, 0.595, 0.588, 0.582, 0.571, 0.563, 0.557, and 0.549, respectively.The roulette wheel selection method is used to select a preset number of 25 winning individuals. The mechanism of the roulette wheel selection is that the probability of each individual being selected is proportional to its fitness value. Individuals with higher fitness values occupy a larger sector on the roulette wheel and thus have a higher probability of being selected. However, individuals with lower fitness values still retain a certain chance of being selected to maintain the diversity of the population and prevent premature convergence to a local optimum. This probabilistic selection mechanism reflects both the evolutionary pressure of survival of the fittest and the possibility of exploring new solutions.
[0108] The 25 selected winning individuals were crossovered to generate offspring. Winning individuals were randomly paired for single-point crossover; for example, the first winning individual was paired with the second winning individual, and the crossover point was randomly selected as the 15th arrangement unit. The first 15 arrangement units of the first winning individual were combined with the last 15 arrangement units of the second winning individual to generate the first offspring. Simultaneously, the first 15 arrangement units of the second winning individual were combined with the last 15 arrangement units of the first winning individual to generate the second offspring. This crossover operation can recombine superior gene fragments from different individuals, potentially producing new, even better individuals. After completing the pairing and crossover process for all 25 winning individuals, 50 offspring individuals were generated. Mutation operations are performed on offspring individuals with a mutation probability set to 0.1, meaning each parameter of each arrangement unit has a 10% probability of random mutation. For example, the 8th arrangement unit of the first offspring individual originally had a type of 4, a selection state of 1, a start time of 18.5 seconds, and a velocity coefficient of 0.96. The mutation operation randomly changes its type to 7, keeps the selection state at 1, adjusts the start time to 18.8 seconds, and adjusts the velocity coefficient to 1.03. The purpose of the mutation operation is to introduce random perturbation to prevent the population from getting trapped in local optima and to explore new solution space regions. The initial 50 individuals are completely replaced with 50 newly generated offspring individuals, and the above iterative evolution process is repeated. After the first generation iteration, the fitness value of the best individual in the population increases from 0.631 to 0.647, and the average fitness value increases from 0.541 to 0.558. After the 10th generation iteration, the optimal fitness value is 0.712, and the average fitness value is 0.631. After 50 generations, the optimal fitness value was 0.823, and the average fitness value was 0.746. After 100 generations, the optimal fitness value was 0.891, and the average fitness value was 0.822. After 140 generations, the optimal fitness value was 0.927, and the average fitness value was 0.871. After 150 generations, the optimal fitness value was 0.931, and the average fitness value was 0.875. Compared to the optimal fitness value of 0.930 in generation 149, this was only an improvement of 0.001, representing an improvement of 0.1%. This was below the set convergence threshold of 0.2%, thus meeting the convergence condition and stopping the iteration.The individual with the highest fitness value in the 150th generation population was selected as the final dance choreography scheme. This individual had a fitness value of 0.931 and contained 23 effective choreography units with a selection state of 1. These units were selected in the following order: Type 3 (start time 0.5 seconds, speed coefficient 1.02), Type 1 (start time 4.2 seconds, speed coefficient 0.97), Type 5 (start time 7.8 seconds, speed coefficient 0.91), Type 2 (start time 11.3 seconds, speed coefficient 1.05), Type 7 (start time 15.6 seconds, speed coefficient 0.94), Type 4 (start time 19.8 seconds, speed coefficient 1.08), Type 9 (start time 24.7 seconds, speed coefficient 0.89), Type 6 (start time 28.4 seconds, speed coefficient 1.01), Type 10 (start time 32.9 seconds, speed coefficient 0.96), Type 8 (start time 37.2 seconds, speed coefficient 1.12), and Type 3 (start time 0.931). The following timeframes were set: 42.1 seconds (speed coefficient 0.98), 46.5 seconds (speed coefficient 0.93), 50.2 seconds (speed coefficient 1.04), 54.8 seconds (speed coefficient 0.88), 58.6 seconds (speed coefficient 1.07), 63.2 seconds (speed coefficient 0.95), 68.1 seconds (speed coefficient 1.03), 72.8 seconds (speed coefficient 0.92), 76.4 seconds (speed coefficient 0.99), 80.9 seconds (speed coefficient 1.11), 85.8 seconds (speed coefficient 0.86), 89.7 seconds (speed coefficient 1.06), and 94.3 seconds (speed coefficient 0.94). This completes the final dance choreography plan.
[0109] Furthermore, the method for calculating the fitness value of each dance choreography scheme includes:
[0110] Get the The dance choreography scheme, the first The dance choreography plan includes The arrangement unit; calculate the first... The average beat deviation of each dance choreography scheme is compared with a preset beat deviation threshold to determine the... Does the dance choreography scheme meet the beat fit constraint?
[0111] When the When the dance choreography scheme satisfies the beat fit constraint, calculate the... The smoothness value of the first dance choreography scheme is used as the smoothness value of the second choreography scheme. The fitness value of a dance choreography scheme;
[0112] When the first When a dance choreography scheme does not meet the aforementioned beat-matching constraint, the first... The fitness value of each dance choreography scheme is set to zero.
[0113] For example, in calculating the fitness value of each dance choreography scheme, it is first necessary to determine whether the scheme meets the beat fit constraint. Only schemes that meet the constraint are calculated as fitness values based on their fluency. Schemes that do not meet the constraint have their fitness values set to zero and are thus eliminated during the selection process. Taking the 15th individual in the first generation iteration as an example, this individual contains 30 choreography units, of which 26 units have a selection state of 1. The start time of each of these 26 selected units is obtained one by one: the start time of the first selected unit is 0.8 seconds, the second is 4.6 seconds, the third is 8.9 seconds, the fourth is 13.2 seconds, the fifth is 17.5 seconds, and so on, up to the 26th selected unit, which has a start time of 118.3 seconds. Calculate the absolute value of the time difference between the start time of the first selected unit (0.8 seconds) and the 96 musical beats. The difference is 0.3 seconds with the first beat (0.5 seconds), 0.95 seconds with the second beat (1.75 seconds), and 2.2 seconds with the third beat (3.0 seconds). Select the minimum value of 0.3 seconds as the time deviation of the first selected unit. Calculate the time difference between the start time of the second selected unit (4.6 seconds) and each beat. The difference is 0.35 seconds with the fourth beat (4.25 seconds), and 0.9 seconds with the fifth beat (5.5 seconds). Select the minimum value of 0.35 seconds as the time deviation of this unit. The time deviations of all 26 selected units were calculated sequentially, yielding deviation values of 0.3 seconds, 0.35 seconds, 0.4 seconds, 0.45 seconds, 0.25 seconds, 0.5 seconds, 0.55 seconds, 0.38 seconds, 0.42 seconds, 0.48 seconds, 0.33 seconds, 0.52 seconds, 0.37 seconds, 0.44 seconds, 0.51 seconds, 0.29 seconds, 0.46 seconds, 0.39 seconds, 0.41 seconds, 0.36 seconds, 0.47 seconds, 0.34 seconds, 0.43 seconds, 0.49 seconds, 0.32 seconds, and 0.53 seconds. The sum of these 26 time deviations was 10.4 seconds. Dividing this by 26 yielded an average beat deviation of 0.4 seconds.
[0114] The calculated average beat deviation of 0.4 seconds was compared with a preset beat deviation threshold of 0.35 seconds. Setting 0.35 seconds as the beat deviation threshold is based on the fact that human hearing has a time tolerance window for rhythmic synchronicity. When the time deviation between visual and auditory events is within approximately 0.3 seconds, the brain perceives them as occurring synchronously, thus creating a sense of rhythmic harmony. When the time deviation exceeds 0.35 seconds, the brain begins to clearly perceive asynchrony, reducing the sense of rhythm and aesthetic appeal. Therefore, using 0.35 seconds as the judgment threshold effectively filters out dance choreography schemes with good beat harmony. Furthermore, considering that not all choreography units must strictly fall on the beat, allowing an average deviation within 0.35 seconds means that some choreography units can have slightly larger deviations as long as the overall average remains within an acceptable range. This design ensures both rhythmic harmony and provides a degree of flexibility to the choreography scheme. The average beat deviation of the 15th individual is 0.4 seconds, which is greater than the threshold of 0.35 seconds. Therefore, this individual is determined not to meet the beat-fit constraint, and its fitness value is directly set to 0. In subsequent roulette wheel selection processes, this individual has an extremely low probability of being selected due to its zero fitness value, and is thus naturally eliminated. Taking the 3rd individual in the 1st iteration as an example to illustrate the constraint-compliant situation, this individual contains 24 selected units. The time deviations of these 24 selected units are calculated sequentially, and the average beat deviation is 0.28 seconds, which is less than the preset threshold of 0.35 seconds. Therefore, this individual is determined to meet the beat-fit constraint, and its fluency value is calculated as its fitness value. Calculating the smoothness value requires evaluating the smoothness and compactness of motion transitions between adjacent choreography units. For the first and second selected units of the third individual, the first selected unit is of type 2 (peacock spread wings), and the second selected unit is of type 4 (single-leg raise and rotate). The trailing motion vectors of the 12 motion nodes of the second basic motion element (peacock spread wings) and the starting motion vectors of the 12 motion nodes of the fourth basic motion element (single-leg raise and rotate) are obtained. The vector angles between the 12 corresponding nodes are calculated and averaged, yielding an average vector angle of 52 degrees. The transition duration from the second to the fourth basic motion element is found to be 1.18 seconds, according to the transition motion element library. The average vector angles and transition durations between all 23 pairs of adjacent choreography units are calculated sequentially. Using these data, the smoothness value is calculated and used as the fitness value for the individual, which is 0.631.
[0115] Furthermore, the calculation of the first The average beat deviation of each dance choreography scheme is compared with a preset beat deviation threshold to determine the... Methods for determining whether a dance choreography scheme meets the beat fit constraint include:
[0116] Get the The first dance choreography scheme Unit selection status of each arrangement unit and the start time of the unit ,in The value ranges from 1 to Integer variables;
[0117] Regarding the unit selection status For an arrangement unit with a value of 1, calculate the start time of that unit. With the pre-selected music beat time sequence Each beat moment The absolute value of the time difference is selected, and the minimum value among all absolute values of time differences is taken as the first. The first dance choreography scheme Time deviation of each arrangement unit for:
[0118] ;
[0119] in The value ranges from 1 to Integer variables, The total number of beat moments; Represents the first in the pre-selected music beat time sequence Each beat moment;
[0120] Calculate the first The number of choreography units with a state of 1 in each dance choreography scheme. The time deviation of the orchestration unit with state 1 is selected for all units. Calculate the average value to obtain the first... Average beat deviation of each dance choreography scheme for:
[0121] ;
[0122] The average beat deviation Compare with a preset beat deviation threshold to determine the first... Does the dance choreography scheme meet the beat matching constraint?
[0123] For example, a detailed calculation process for the average beat deviation is described for the third individual in the first generation iteration. This individual contains 30 orchestration units, of which 24 orchestration units have a unit selection state of 1. The unit selection state and start time of these 24 selected units are obtained one by one: the first orchestration unit has a selection state of 1 and a start time of 0.5 seconds; the second orchestration unit has a selection state of 0 and a start time of 3.8 seconds; the third orchestration unit has a selection state of 1 and a start time of 4.3 seconds; the fourth orchestration unit has a selection state of 1 and a start time of 7.9 seconds; the fifth orchestration unit has a selection state of 1 and a start time of 11.2 seconds, and so on. Since the second orchestration unit has a selection state of 0, this unit does not participate in subsequent calculations; only the 24 units with a selection state of 1 are analyzed for beat deviation. For the first selected unit, starting at 0.5 seconds, the absolute value of its time difference with each of the 96 musical beats is calculated. The difference with the first beat at 0.5 seconds is 0 seconds, the difference with the second beat at 1.75 seconds is 1.25 seconds, the difference with the third beat at 3.0 seconds is 2.5 seconds, and the difference with the fourth beat at 4.25 seconds is 3.75 seconds. The time difference increases with the beat number, reaching 119 seconds when the time difference reaches the 96th beat at 119.5 seconds. The minimum value of 0 seconds is selected from these 96 differences as the time deviation of the first selected unit, whose starting time exactly coincides with the first musical beat. The reason for choosing the minimum time difference instead of finding the nearest beat is that in dance choreography, each movement change point only needs to align with one of its nearest beat moments to create a sense of rhythm. It is not required to maintain a fixed relationship with all beat moments. Therefore, by traversing all beat moments, the beat point closest to the start time of the movement is found. The time difference between the two represents the degree of beat deviation of the movement change. The smaller the difference, the closer the movement change is to the beat, and the stronger the sense of rhythm. The larger the difference, the more the movement change point falls somewhere between two beats, and thus lacks a sense of rhythmic anchoring.
[0124] For the third selected unit, starting at 4.3 seconds, the absolute value of its time difference from each beat's time is calculated. The difference is 1.3 seconds from the third beat's time of 3.0 seconds, 0.05 seconds from the fourth beat's time of 4.25 seconds, and 1.2 seconds from the fifth beat's time of 5.5 seconds. The minimum value of 0.05 seconds is selected as the time deviation for this unit. For the fourth selected unit, starting at 7.9 seconds, the difference is 0.1 seconds from the seventh beat's time of 8.0 seconds, which is the smallest and is selected as the time deviation for this unit. For the fifth selected unit, starting at 11.2 seconds, the difference is 0.45 seconds from the ninth beat's time of 10.75 seconds and 0.8 seconds from the tenth beat's time of 12.0 seconds, which is the minimum value of 0.45 seconds. The time deviations of all 24 selected units were calculated sequentially, and the resulting deviation values were 0 seconds, 0.05 seconds, 0.1 seconds, 0.45 seconds, 0.12 seconds, 0.08 seconds, 0.03 seconds, 0.38 seconds, 0.15 seconds, 0.22 seconds, 0.07 seconds, 0.41 seconds, 0.18 seconds, 0.25 seconds, 0.09 seconds, 0.32 seconds, 0.14 seconds, 0.28 seconds, 0.11 seconds, 0.35 seconds, 0.06 seconds, 0.19 seconds, 0.24 seconds, and 0.13 seconds. The number of orchestration units with a selection state of 1 was 24. The sum of the 24 time deviation values was 4.8 seconds, and dividing by 24 yielded an average beat deviation of 0.2 seconds. The calculated average beat deviation of 0.2 seconds is compared with the preset beat deviation threshold of 0.35 seconds. If 0.2 seconds is less than 0.35 seconds, the third individual is determined to meet the beat fit constraint. The smoothness value of the individual is calculated through beat screening.
[0125] Further, the calculation of the first Methods for calculating the smoothness value of a dance choreography scheme include:
[0126] For the first The adjacent dance choreography scheme The first arrangement unit and the first The first arrangement unit, when the first... Unit selection status of each arrangement unit and the Unit selection status of each arrangement unit When both are 1, obtain the first... The first basic motion element corresponding to the first arrangement unit The tail motion vector of each motion node and the The first basic motion element corresponding to the first arrangement unit The initial motion vector of each motion node ,in The value ranges from 1 to Integer variables;
[0127] Calculate the angle between the closing motion vector and the starting motion vector of the j-th motion node. for:
[0128] ;
[0129] The average of the angles between the vectors of all moving nodes is taken as the first... The first dance choreography scheme The first arrangement unit and the first The average vector angle between each arrangement unit for:
[0130] ;
[0131] According to the The basic action meta-index corresponding to the first arrangement unit and the first The basic action meta-index corresponding to each orchestration unit is used to query the corresponding connection duration from the connection action meta-database as the first... The first dance choreography scheme The first arrangement unit and the first Duration of connection between each orchestration unit ;
[0132] Through the average vector angle and the duration of the connection Calculate the first The smoothness of each dance choreography scheme for:
[0133] .
[0134] For example, the fluency value is calculated as the fitness value for the third individual that meets the beat-fit constraint. This individual contains 24 selected units. For the adjacent first and second selected units, the unit selection state of the first selected unit is 1 and the type is 3, corresponding to the water wave hand gesture. The unit selection state of the second selected unit is 1 and the type is 1, corresponding to the three-curve pose. The closing motion vectors of the 12 motion nodes of the third basic motion element water wave hand gesture and the starting motion vectors of the 12 motion nodes of the first basic motion element three-curve pose are obtained. Taking the left wrist joint as an example, the closing motion vector of the left wrist joint of the third basic motion element is 9.09 cm / s horizontally, 21.21 cm / s vertically, and 12.12 cm / s vertically. The starting motion vector of the left wrist joint of the first basic motion element is 3.72 cm / s horizontally, 3.10 cm / s vertically, and 2.17 cm / s vertically. To calculate the angle between these two motion vectors, first calculate the dot product of the two vectors, which is 192.53. The magnitude of the closing motion vector of the third basic motion element is 25.05, and the magnitude of the starting motion vector of the first basic motion element is 5.71. Dividing the dot product by the product of the two magnitudes gives the cosine of the angle, which is 0.7476. The angle is then calculated to be 41.6 degrees using the inverse cosine function. The vector angle reflects the degree of deviation between the direction of limb movement at the end of the previous action and the direction of limb movement at the beginning of the next action. When the angle is 0 degrees, the two directions are completely consistent, which means that the limb can maintain the original direction of movement and seamlessly connect to the next action. In this case, the kinetic energy of the limb is preserved and utilized to the maximum extent, resulting in an extremely smooth feeling. When the angle is 90 degrees, the two directions are orthogonal, which means that the direction of movement needs to be completely changed. The limb must consume energy to convert the kinetic energy of the original direction into the kinetic energy of the new direction. This turning will produce obvious pauses and dissipation. When the angle is 180 degrees, the two directions are completely opposite, which means that the direction of movement needs to be reversed. This is the least smooth case. The original kinetic energy needs to be canceled first and then the reverse kinetic energy needs to be established. Therefore, the smaller the vector angle, the smoother the action connection. The larger the angle, the less smooth the connection. In the calculation of the smoothness value, it is necessary to penalize the connection with a large angle.
[0135] The vector angles of 12 motion nodes—left wrist, right wrist, left shoulder, right shoulder, left elbow, right elbow, left hip, right hip, left knee, right knee, left ankle, and right ankle—were calculated sequentially. The resulting angle values were 41.6 degrees, 39.8 degrees, 28.3 degrees, 27.5 degrees, 35.7 degrees, 34.2 degrees, 18.9 degrees, 19.3 degrees, 22.6 degrees, 23.1 degrees, 15.4 degrees, and 16.2 degrees, respectively. The sum of these 12 vector angles was 322.6 degrees, which, divided by 12, yielded an average vector angle of 26.9 degrees. Based on the basic motion element index 3 corresponding to the first selected unit and the basic motion element index 1 corresponding to the second selected unit, the corresponding connection duration was retrieved from the connection motion element library. The connection duration from the third basic motion element to the first basic motion element was found to be 0.44 seconds. For the second and third adjacent selected units, the second selected unit type 1 corresponds to a three-curve shape, and the third selected unit type 5 corresponds to a hands-clasped squatting posture. The vector angles of the 12 motion nodes are calculated and averaged to obtain an average vector angle of 32.5 degrees. The connection duration is 0.26 seconds. The average vector angles and connection durations between all 23 pairs of adjacent selected units are calculated sequentially, resulting in average vector angles of 26.9 degrees, 32.5 degrees, 41.3 degrees, 29.7 degrees, 35.8 degrees, 38.4 degrees, 27.6 degrees, 33.2 degrees, 30.1 degrees, 36.7 degrees, 28.8 degrees, 34.5 degrees, 31.9 degrees, 37.2 degrees, 29.3 degrees, 33.8 degrees, 32.6 degrees, 35.1 degrees, 28.4 degrees, 34.9 degrees, 31. The corresponding connection durations for 0.5 degrees, 36.3 degrees, and 30.7 degrees are 0.44 seconds, 0.26 seconds, 0.86 seconds, 0.37 seconds, 0.94 seconds, 1.05 seconds, 0.44 seconds, 0.73 seconds, 0.52 seconds, 0.81 seconds, 0.44 seconds, 0.67 seconds, 0.52 seconds, 0.89 seconds, 0.37 seconds, 0.73 seconds, 0.52 seconds, 0.78 seconds, 0.44 seconds, 0.78 seconds, 0.52 seconds, 0.81 seconds, and 0.44 seconds, respectively.
[0136] The smoothness value is calculated by using the average vector angle and the connection duration. First, the smoothness contribution value of each pair of adjacent units is calculated. For the first pair of adjacent units, 180 degrees minus the average vector angle of 26.9 degrees equals 153.1 degrees. This value represents the degree of directional consistency. The smaller the angle, the closer the value is to 180 degrees, indicating a more consistent direction. Multiplying 153.1 degrees by the connection duration of 0.44 seconds gives 67.4. The physical meaning of this product is the smoothness contribution considering the connection duration weight. The shorter the connection duration, the smaller the weight of the connection on the overall smoothness, and the longer the connection duration, the greater the weight of the impact. The smoothness contribution values for 23 pairs of adjacent units were calculated sequentially as follows: 67.4, 38.4, 119.3, 55.6, 135.1, 148.7, 67.1, 107.2, 78.0, 116.2, 66.5, 97.3, 77.0, 127.3, 55.7, 106.6, 76.9, 113.0, 66.9, 113.1, 77.3, 116.4, and 65.7. These 23 values were summed to obtain 1993.7. The denominator was calculated by multiplying 180 degrees by the sum of the durations of all 23 connections. The sum of the 23 connection durations was 14.1 seconds. Multiplying 180 degrees by 14.1 seconds yielded 2538. The smoothness value was calculated by dividing the numerator 1993.7 by the denominator 2538, resulting in 0.786. The numerator converts the included angle into a consistency score by subtracting the included angle from 180 degrees. A 0-degree included angle corresponds to a perfect score of 180 degrees, while a 180-degree included angle corresponds to a minimum score of 0 degrees. Multiplying by the connection duration reflects the weight of different connections' contributions to overall fluency. Long-duration connections with inconsistent directions significantly impact fluency and therefore have a high weight, while short-duration connections, even with large directional deviations, have a limited impact due to their short duration and thus a low weight. The denominator represents the theoretical maximum value, i.e., the case where all connections achieve a perfect 180-degree consistency score. Dividing the actual score by the theoretical maximum normalizes the fluency value to a range between 0 and 1 for easy comparison and evaluation. The calculated fluency value of 0.786 is used as the fitness value for the third individual. The fluency values for other individuals satisfying the beat constraint are calculated using the same method: the fluency value for the first individual is 0.742, for the fifth individual is 0.813, for the eighth individual is 0.691, and for the twelfth individual is 0.768. After 150 generations of iterative evolution, the final dance choreography scheme achieved a fluency score of 0.931. The scheme achieved a high degree of fluidity in movement transitions while ensuring beat matching, completing the entire process of generating dance choreography based on genetic algorithms.
[0137] Example 2: Based on the same inventive concept, such as Figure 2 As shown, this embodiment also provides an AI-based dance choreography generation device, the device comprising:
[0138] The first library building unit is used to build a basic motion element library. A three-dimensional spatial coordinate system is established with the waist as the coordinate origin. The joints of the limbs are set as motion nodes. The spatial coordinate motion trajectory of each motion node in each basic motion element relative to the coordinate origin is recorded. The starting coordinates and starting motion vectors of each motion node at the start time of each basic motion element are obtained through the spatial coordinate motion trajectory, as well as the ending coordinates and ending motion vectors of each motion node at the end time.
[0139] The second library building unit is used to build a library of connecting action elements. It generates connecting action elements by using the linear motion trajectory of each motion node between the end coordinates of the first basic action element and the start coordinates of the second basic action element. It records the spatial motion trajectory and connection duration of the connecting action elements. It also obtains the beat time sequence of the pre-selected music and uses the beat time sequence as the time reference point for action element transformation.
[0140] The AI algorithm unit is used to generate an initial population of dance choreography schemes. The initial population includes multiple individuals, each representing a dance choreography scheme. Each dance choreography scheme consists of multiple choreography units arranged in chronological order. Each choreography unit includes a unit type, a unit selection state, a unit start time, and a unit speed adjustment coefficient. The unit type is used to mark the basic motion element corresponding to the choreography unit. The unit selection state is 0 or 1. The unit start time represents the starting time point of the choreography unit in the dance choreography. The unit speed adjustment coefficient represents the ratio of the choreography unit to the standard speed. The initial population is iteratively evolved to obtain the final dance choreography scheme. For the choreography units in the final dance choreography scheme with a unit selection state of 1, the spatial coordinate motion trajectory of the basic motion element or connecting motion element corresponding to each choreography unit and the unit speed adjustment coefficient are output in chronological order of the unit start time, generating a complete dance choreography output sequence.
[0141] It should be noted that the specific manner in which each unit performs its operation in the apparatus described above has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0142] Example 3: Based on the same inventive concept, this example also provides an AI-based dance choreography generation system, including a motion capture device for acquiring basic motion elements, one or more processors, a memory, and one or more programs. The motion capture device includes an accelerometer and a gyroscope. The one or more programs are stored in the memory and configured to be executed by the one or more processors. The one or more programs include methods for executing the AI-based dance choreography generation method.
[0143] Finally, it should be noted that although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. An AI-based dance choreography generation method, characterized in that, The method includes: A basic motion element library is established. A three-dimensional spatial coordinate system is established with the waist as the origin. The joints of the limbs are set as motion nodes. The spatial coordinate motion trajectory of each motion node in each basic motion element relative to the origin is recorded. The starting coordinates and starting motion vectors of each motion node at the start time and the ending coordinates and ending motion vectors of each motion node at the end time are obtained through the spatial coordinate motion trajectory. Establish a library of connecting motion elements. Generate connecting motion elements by using the linear motion trajectories of each motion node between the ending coordinates of the first basic motion element and the starting coordinates of the second basic motion element. Record the spatial motion trajectory and duration of the connecting motion elements. Obtain the beat time sequence of the pre-selected music and use the beat time sequence as the time reference point for the motion element transformation. An initial population for generating dance choreography schemes is generated. The initial population includes multiple individuals, each representing a dance choreography scheme. Each dance choreography scheme consists of multiple choreography units arranged in chronological order. Each choreography unit includes a unit type, a unit selection state, a unit start time, and a unit speed adjustment coefficient. The unit type is used to mark the basic motion element corresponding to the choreography unit. The unit selection state takes the value 0 or 1. The unit start time represents the start time point of the choreography unit in the dance choreography. The unit speed adjustment coefficient represents the ratio of the choreography unit to the standard speed. The initial population is iteratively evolved to obtain the final dance choreography scheme. The choreography unit with state 1 is selected from the units in the final dance choreography scheme. The spatial coordinate motion trajectory and unit speed adjustment coefficient of the basic motion element or connecting motion element corresponding to each choreography unit are output in sequence according to the start time of the unit, generating a complete dance choreography output sequence.
2. The AI-based dance choreography generation method according to claim 1, characterized in that, The three-dimensional spatial coordinate system is established with the waist as the origin, and the joints of the limbs are set as motion nodes. The spatial coordinate motion trajectory of each motion node in each basic motion element relative to the origin is recorded. The methods for obtaining the initial coordinates and initial motion vectors of each motion node at the start time and the final coordinates and final motion vectors of each motion node at the end time through spatial coordinate motion trajectory include: Get the Duration of movement of each basic movement element During the duration of exercise Internal to the first Each motion node of a basic motion element is sampled at equal time intervals, and the duration of the motion is recorded. Evenly divided into There are 1 sampling time points, among which The total number of preset sampling time points; the first Each sampling time point The calculation method is as follows: ; in The value ranges from 1 to Integer variables; Recorded using motion capture equipment The first basic action element The motion node at the _th ... Each sampling time point spatial coordinates ,in The value ranges from 1 to Integer variables, This represents the total number of moving nodes; No. The first basic action element The initial coordinates of each moving node at the start time are the spatial coordinates corresponding to the first sampling time point. The final coordinate at the closing moment is the first... Spatial coordinates corresponding to each sampling time point ; No. The first basic action element The initial motion vector of each moving node at the initial time. The value is calculated by the ratio of the coordinate difference between the first two sampling time points to the time interval, and is: ; No. The first basic action element The closing motion vector of each motion node at the closing moment The value is calculated by the ratio of the coordinate difference between the last two sampling time points to the time interval, and is: 。 3. The AI-based dance choreography generation method according to claim 1, characterized in that, The method for generating connecting motion elements by means of the linear motion trajectories of each motion node between the ending coordinates of the first basic motion element and the starting coordinates of the second basic motion element, and recording the spatial motion trajectory and duration of the connecting motion elements, includes: Get the The first basic action element The final coordinates of each motion node at the final moment and the The first basic action element The starting coordinates of each moving node at the initial moment ; Calculate the first The basic action element to the first Between the basic action elements The linear motion distance of each moving node for: ; Determine the maximum straight-line motion distance from the straight-line motion distances of all moving nodes. for: ; Through the maximum straight-line distance With the preset speed of motion The ratio calculation starts from the first The basic action element to the first Duration of the connection between basic action elements : ; Record from the first The basic action element to the first The spatial motion trajectory of the connecting elements of the basic motion elements, the first The spatial motion trajectory of each motion node in the motion progress parameter spatial coordinates below for: ; The motion progress parameters The value can be 0 or 1. Indicates that it is located at the th The final coordinates of each basic action element. Indicates that it is located at the th The starting coordinates of each basic action element.
4. The AI-based dance choreography generation method according to claim 1, characterized in that, The method for iteratively evolving the initial population to obtain the final dance choreography scheme includes: The iterative evolution steps include calculating the fitness value of each dance choreography scheme. The fitness value is calculated based on the time deviation between the start time of the choreography unit and the time of the pre-selected music beat, the vector angle between the closing motion vector of the previous choreography unit and the starting motion vector of the next choreography unit, and the connection duration of the connecting motion elements between adjacent choreography units. The dance choreography schemes are sorted according to the fitness values, and a preset number of winning individuals are selected by roulette wheel selection. The winning individuals are then cross-crossed and mutated to obtain offspring individuals. The initial population is replaced with the offspring individuals, and the iterative evolution process is repeated until the improvement in the fitness values of the offspring individuals and the parent individuals is lower than the set convergence threshold. The optimal individual after the iterative evolution is taken as the final dance choreography scheme.
5. The AI-based dance choreography generation method according to claim 4, characterized in that, The method for calculating the fitness value of each dance choreography scheme includes: Get the The dance choreography scheme, the first The dance choreography plan includes The first arrangement unit; calculate the first... The average beat deviation of each dance choreography scheme is compared with a preset beat deviation threshold to determine the... Does the dance choreography scheme meet the beat fit constraint? When the When a dance choreography scheme satisfies the beat fit constraint, calculate the smoothness value of the h-th dance choreography scheme, and use the smoothness value as the h-th dance choreography scheme. The fitness value of a dance choreography scheme; When the first When a dance choreography scheme does not meet the aforementioned beat-matching constraint, the first... The fitness value of each dance choreography scheme is set to zero.
6. The AI-based dance choreography generation method according to claim 5, characterized in that, The calculation of the first The average beat deviation of each dance choreography scheme is compared with a preset beat deviation threshold to determine the... Methods for determining whether a dance choreography scheme meets the beat fit constraint include: Get the The first dance choreography scheme Unit selection status of each arrangement unit and the start time of the unit ,in The value ranges from 1 to Integer variables; Regarding the unit selection status For an arrangement unit with a value of 1, calculate the start time of that unit. With the pre-selected music beat time sequence Each beat moment The absolute value of the time difference is selected, and the minimum value among all absolute values of time differences is taken as the first. The first dance choreography scheme Time deviation of each arrangement unit for: ; in The value ranges from 1 to Integer variables, The total number of beat moments; Calculate the first The number of choreography units with a state of 1 in each dance choreography scheme. The time deviation of the orchestration unit with state 1 is selected for all units. Calculate the average value to obtain the first... Average beat deviation of each dance choreography scheme for: ; The average beat deviation Compare with a preset beat deviation threshold to determine the first... Does the dance choreography scheme meet the beat matching constraint? 7. The AI-based dance choreography generation method according to claim 6, characterized in that, The calculation of the first Methods for calculating the smoothness value of a dance choreography scheme include: For the first The adjacent dance choreography scheme The first arrangement unit and the first The first arrangement unit, when the first... Unit selection status of each arrangement unit and the Unit selection status of each arrangement unit When both are 1, obtain the first... The first basic motion element corresponding to the first arrangement unit The tail motion vector of each motion node and the The first basic motion element corresponding to the first arrangement unit The initial motion vector of each motion node ,in The value ranges from 1 to Integer variables; Calculate the angle between the closing motion vector and the starting motion vector of the j-th motion node. for: ; The average of the angles between the vectors of all moving nodes is taken as the first... The first dance choreography scheme The first arrangement unit and the first The average vector angle between each arrangement unit for: ; According to the The basic action meta-index corresponding to the first arrangement unit and the first The basic action meta-index corresponding to each orchestration unit is used to query the corresponding connection duration from the connection action meta-database as the first... The first dance choreography scheme The first arrangement unit and the first Duration of connection between each orchestration unit ; Through the average vector angle and the duration of the connection Calculate the first The smoothness of each dance choreography scheme for: 。 8. An AI-based dance choreography generation device, characterized in that, The device includes: The first library building unit is used to build a basic motion element library. A three-dimensional spatial coordinate system is established with the waist as the coordinate origin. The joints of the limbs are set as motion nodes. The spatial coordinate motion trajectory of each motion node in each basic motion element relative to the coordinate origin is recorded. The starting coordinates and starting motion vectors of each motion node at the start time of each basic motion element are obtained through the spatial coordinate motion trajectory, as well as the ending coordinates and ending motion vectors of each motion node at the end time. The second library building unit is used to build a library of connecting action elements. It generates connecting action elements by using the linear motion trajectory of each motion node between the end coordinates of the first basic action element and the start coordinates of the second basic action element. It records the spatial motion trajectory and connection duration of the connecting action elements. It also obtains the beat time sequence of the pre-selected music and uses the beat time sequence as the time reference point for action element transformation. The AI algorithm unit is used to generate an initial population of dance choreography schemes. The initial population includes multiple individuals, each representing a dance choreography scheme. Each dance choreography scheme consists of multiple choreography units arranged in chronological order. Each choreography unit includes a unit type, a unit selection state, a unit start time, and a unit speed adjustment coefficient. The unit type is used to mark the basic motion element corresponding to the choreography unit. The unit selection state is 0 or 1. The unit start time represents the starting time point of the choreography unit in the dance choreography. The unit speed adjustment coefficient represents the ratio of the choreography unit to the standard speed. The initial population is iteratively evolved to obtain the final dance choreography scheme. For the choreography units in the final dance choreography scheme with a unit selection state of 1, the spatial coordinate motion trajectory of the basic motion element or connecting motion element corresponding to each choreography unit and the unit speed adjustment coefficient are output in chronological order of the unit start time, generating a complete dance choreography output sequence.
9. An AI-based dance choreography generation system, characterized in that, The method includes a motion capture device for acquiring basic motion elements, one or more processors, a memory, and one or more programs, wherein the motion capture device includes an accelerometer and a gyroscope, the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include methods for performing the AI-based dance choreography generation method according to any one of claims 1-7.
Citation Information
Patent Citations
Multi-modal dance action evaluation method
CN110711374A
Mobile robot global path planning method based on improved mayfly naiad algorithm
CN116652947A
Production maintenance and purchase cooperative scheduling method based on improved dung beetle optimization algorithm
CN119225307A
Dance motion auxiliary generation method and system based on three-dimensional modeling
CN120765860A
