Dragon and lion dance trajectory topology modeling and formation cooperative optimization method and system

CN123010832APending Publication Date: 2026-10-30TIANJIN UNIV OF SPORT
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611017658.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-09
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0005]针对现有技术的不足,本发明提供了一种舞龙舞狮轨迹拓扑建模与队形协同优化方法及系统,解决了解决传统舞龙队形在训练与表演中因依赖人工指挥、单一传感采集不可靠以及通用优化算法不适配,导致的多人协同精度低、应对突发状况实时性差且安全风险高的问题

Benefits of technology

1、本发明通过构建时空拓扑图模型,并利用指数衰减与线性生长函数生成过渡态拓扑矩阵,在队形切换的时间区间内对节点连接边权进行动态平滑更新,使得队形的拓扑结构能够随时间连续演变,避免了队形突变导致的局部运动指令激变或连通边断裂,实现了多节点群体在复杂阵型变换过程中的轨迹平滑演化与稳定控制。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123010832A_ABST
    Figure CN123010832A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of multi-agent cooperative control, and discloses a lion and dragon dance trajectory topology modeling and formation cooperative optimization method and system, comprising: collecting multi-modal data to generate fusion data flow; constructing a space-time topology graph model, calculating dynamic edge weights to generate a transition state topology matrix; constructing a multi-objective cooperative optimization function, setting the strong coupling subgraph barycenter oscillation phase as a hard constraint; running a swarm intelligence algorithm to generate a path, generating a Bezier smooth merging trajectory when a node deviates; solving control instructions, calculating formation residuals and receiving intervention instructions to complete closed-loop control. The present application realizes smooth evolution of complex array transformation trajectories through the transition state topology matrix; uses phase constraints to ensure strict synchronization of the tempo of cooperative actions and solve the problem of disjointed actions; combines local reconstruction correction and visual residual warning intervention to construct a control closed loop that combines algorithm autonomous adjustment and artificial active intervention, thereby improving the fault tolerance and safety of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of multi-agent cooperative control technology, specifically to a method and system for topology modeling and formation cooperative optimization of dragon and lion dance trajectories. Background Technology

[0002] In dragon dance training, competitions, festival performances, and cultural tourism performances, the precision of formation changes and movement coordination directly affects the overall viewing experience and operational safety. Traditional dragon dance formation coordination mainly relies on the coach's manual command, guiding team members to complete movements through verbal commands or gestures. This method of information transmission has a significant lag, and different team members have different understandings and executions of instructions. In complex formation changes, this can easily lead to missteps, formation deformation, or internal communication breakdowns. Because it is impossible to monitor and correct execution deviations in real time, it often results in low training efficiency and performance errors.

[0003] To improve coordination accuracy, some solutions attempt to introduce digital methods for trajectory acquisition and arrangement, but the effectiveness is limited by the acquisition method and algorithm performance. In the data acquisition stage, systems relying on single-vision acquisition are easily affected by changes in ambient light and mutual occlusion by personnel, making it difficult to effectively recover lost data and thus affecting subsequent control accuracy. While acquisition solutions relying solely on personal inertial sensors eliminate the problem of line-of-sight occlusion, they are prone to cumulative drift errors over long periods of operation, and the system lacks global spatial position information, resulting in the inability to achieve accurate coordinate matching of the overall formation.

[0004] In the trajectory optimization and collaborative control stages, existing formation control solutions mostly employ general swarm intelligence algorithms with fixed parameters. These algorithms lack scene adaptability, cannot dynamically adjust target weights according to the characteristics of dragon dance movements, and struggle to effectively balance the needs of multiple dimensions such as path smoothness, rhythm synchronization, and collision avoidance. When local node positions or rhythm deviations occur during execution, conventional algorithms typically require time-consuming global replanning, and their real-time computational efficiency cannot meet the millisecond-level response requirements of highly dynamic performance scenarios. Furthermore, existing solutions generally lack a complete closed-loop feedback chain from underlying data perception and local trajectory reconstruction to terminal intervention prompts, resulting in insufficient system flexibility in dealing with temporary emergencies and complex environmental interference, making it difficult to balance the artistic presentation of the formation with safe collaboration. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides a method and system for topology modeling of dragon and lion dance trajectories and collaborative optimization of formations. This method solves the problems of low accuracy in multi-person collaboration, poor real-time performance in responding to emergencies, and high safety risks in traditional dragon dance formations during training and performances, which are caused by reliance on manual command, unreliable single-sensor data acquisition, and unsuitability of general optimization algorithms.

[0006] To achieve the above objectives, the present invention provides the following technical solution: a method for topological modeling of dragon and lion dance trajectories and collaborative optimization of formations, characterized by comprising the following steps: Deploy multi-source sensing hardware, use inertial measurement units, visual networks and motion capture devices to collect multimodal data, and generate a fused data stream with consistent timestamps after clock synchronization and linear prediction interpolation anomalies; Based on the fused data stream, a spatiotemporal topology graph model is constructed, dynamic edge weights are calculated, and a transitional topology matrix is ​​generated through exponential decay and linear growth functions. Based on the aforementioned transition state topology matrix, a multi-objective collaborative optimization function is constructed, and constraints on velocity, acceleration, and safety distance are set. The centroid oscillation phase of the strongly coupled subgraph of the lion dance is extracted, and the phase difference deviation is calculated and set as a hard constraint. Based on the hard constraints, a swarm intelligence solution algorithm is run to generate a global cooperative path. When a node is detected to be yawing beyond the fault-tolerant corridor, the restricted sub-topology is extracted and Bezier interpolation is applied to generate a smooth merging trajectory, driving neighboring nodes to perform avoidance. Based on the merged trajectory, the collaborative path is reduced in dimensionality and converted into a set of control instructions, which are then sent to the wearable terminal. The similarity transformation residual between the formation coordinate matrix and the target template is calculated. The residual gradient triggers the instruction to fine-tune or reconstruct the logic, and priority instructions from the visual interface are received to complete the closed-loop control.

[0007] Preferably, the step of generating a fused data stream with consistent timestamps after clock synchronization and linear prediction interpolation anomalies includes: By using edge computing nodes to establish a reference clock through a time protocol, the sensing nodes are synchronously triggered. The external parameter calibration matrix is ​​used to transform visual data in different coordinate systems to the normalized world coordinate system. For abnormal location data points lost by the sensor, a linear prediction mechanism is used for interpolation. The predicted value of the current location component is set to twice the observed coordinate value at the previous sampling time and the difference between the observed coordinate value at the time before that. If the duration of data loss exceeds a preset threshold, the sensor is determined to be faulty and a visual compensation mechanism is executed. Kalman filtering is performed on the multi-source observations to output a fused dataset containing position coordinates, motion velocity, orientation angle, and skeletal joint pose as the fused data stream.

[0008] Preferably, the steps of constructing a spatiotemporal topological graph model and calculating dynamic edge weights include: The key points of the dragon dance team members and props are defined as graph nodes, and the node state vector is composed of spatial position coordinates, velocity vector, posture angle, key bone pose and beat phase. Nested topological subgraphs consisting of head and tail nodes are defined in the topological graph model, and the relative distance and phase lag between the head and tail nodes are set as rigid constraints. When the relative distance or velocity direction angle between nodes is detected to exceed a set threshold, the edge set is reconstructed. The dynamic edge weight is calculated by weighting the exponential decay term of the spatial Euclidean distance between nodes, the linear penalty term of the motion heading angle deviation, and the cosine periodic term of the normalized beat phase difference between nodes.

[0009] Preferably, the step of generating the transition state topology matrix through exponential decay and linear growth functions includes: Set the start and end times for the formation switching time interval; For the node combinations that are to be separated in the original formation, the weight of the connection edges between the node combinations is controlled to decrease exponentially from the start of the switching according to a preset decay constant. For the node combinations that will be adjacent in the new formation, the weights of the connecting edges between the node combinations are updated using a linear growth function; During the time interval from the start of the switchover to the end of the switchover, the weight of the connection edge is controlled to increase linearly with time, and reaches the set target stable weight value at the end of the switchover. After the handover end time has elapsed, the connection edge weight remains unchanged at the target stable weight value; The transitional topology matrix is ​​generated by the topology containing the updated connection edge weights.

[0010] Preferably, the steps of constructing a multi-objective collaborative optimization function and setting velocity, acceleration, and safety distance constraints include: The overall evaluation function is established as a weighted sum of five sub-evaluation indicators, which correspond to the quantitative values ​​of formation matching degree, rhythm synchronization, path smoothness, energy consumption and safety collision risk, respectively. The safety collision risk is constructed based on the principle of artificial potential field method, which establishes a virtual repulsive field around obstacles or non-adjacent nodes; Read the target evaluation weight file for a specific application scenario and adjust the weight coefficients of each sub-evaluation indicator; During the solver's operation, candidate solutions that cause node spacing to be less than the minimum safe distance, node speed to exceed the maximum movement speed limit, or connected edges to break are set as invalid path branches, and pruning operations are performed in the search tree.

[0011] Preferably, the steps of extracting the centroid oscillation phase of the strongly coupled subgraph of the lion dance, calculating the phase difference deviation, and setting it as a hard constraint include: The displacement time series of the center of gravity of the lion's head node and lion's tail node in the vertical direction are extracted, and the periodic oscillation phase is calculated by signal processing methods; Calculate the absolute deviation between the actual phase difference and the standard coordinated phase difference between the lion's head node and the lion's tail node; The absolute deviation is used as a constraint condition for optimizing the search boundary. When the calculated absolute deviation exceeds the pre-calibrated offline phase deviation threshold, the trajectory prediction branch that causes phase misalignment is discarded in the solver.

[0012] Preferably, the step of generating a global cooperative path by running a swarm intelligence solution algorithm includes: The candidate motion trajectory sequence of nodes in the future prediction time domain is encoded by particles, and the particle swarm algorithm is used for rolling optimization solution. During the iterative optimization process, the rate of change of the global optimal evaluation value within multiple consecutive iterations is used as the convergence gradient, and the proportion of particles that trigger constraint projection correction in a single iteration is used as the conflict frequency. When the convergence gradient is lower than the low-order judgment threshold and the conflict frequency is higher than the high-order judgment threshold, the inertia weight is increased and the group learning factor is decreased. When the convergence gradient is higher than the high-order judgment threshold and the conflict frequency is lower than the low-order judgment threshold, the inertia weight is reduced and the group learning factor is increased.

[0013] Preferably, the step of extracting the restricted sub-topology graph and applying Bezier interpolation to generate a smooth merging trajectory, driving neighboring nodes to perform avoidance, includes: Starting from the yaw node that causes the deviation, select the adjacent nodes directly connected to it and the corresponding connecting edges to form a local optimization region, and recalculate the trajectory optimization only for the nodes in the local optimization region. A smooth merging trajectory based on a cubic Bézier curve is generated for the yaw node. The control points of the cubic Bézier curve are determined by the product of the current actual position of the yaw node, the position of the target merging point, and the velocity vectors corresponding to the two, and a preset smoothing adjustment coefficient. During the same period in which the smooth merging trajectory is generated, the safety distance weight for the adjacent nodes in the multi-objective collaborative optimization function is increased to drive the neighboring nodes to perform spatial avoidance.

[0014] Preferably, the steps of calculating the similarity transformation residual between the formation coordinate matrix and the target template, fine-tuning or reconstructing the logic based on the residual gradient trigger command, and receiving priority commands from the visualization interface to complete closed-loop control include: Calculate the overall formation matching residual between the actual physical formation after eliminating spatial scaling, rotation and translation deviations and the target formation template. Based on the numerical range echelon of the overall formation matching residual, trigger the issuance of the original planning instruction, start the local restricted sub-topology replanning or trigger the global collaborative reconstruction mechanism respectively. Obtain the single-point matching residual value corresponding to each node, render it as a residual heatmap through color gradient mapping, and overlay it in the digital twin interface containing physical location and topological connection; Capture the two-dimensional pixel coordinate boundaries of the input on the large screen touch interface, construct a three-dimensional spatial scene frustum using the inverse projection matrix, and find the intersection and match with the spatial position of the current node to delineate the set of abnormal node identifiers; Issue a priority intervention command for the abnormal node identifier set, dynamically mark the attributes of the abnormal node identifier set in the spatiotemporal topology graph as static obstacles or anchored nodes, and trigger local replanning and obstacle avoidance adjustment calculations for the remaining normal nodes.

[0015] Preferably, a system for topological modeling of dragon and lion dance trajectories and collaborative optimization of formations is characterized by comprising: The multi-source sensing module is used to collect multimodal data using inertial measurement units, visual networks and motion capture devices, and generate a fused data stream with consistent timestamps after clock synchronization and linear prediction interpolation anomalies. The topology modeling module is used to construct a spatiotemporal topology graph model based on the fused data stream, calculate dynamic edge weights, and generate a transitional topology matrix through exponential decay and linear growth functions. The optimization constraint module is used to construct a multi-objective collaborative optimization function based on the transition state topology matrix, set velocity, acceleration and safety distance constraints, extract the centroid oscillation phase of the strongly coupled subgraph of the lion dance, calculate the phase difference deviation degree and set it as a hard constraint; The rolling planning module is used to generate a global cooperative path based on the hard constraints by running a swarm intelligence solution algorithm. When a node yaws beyond the fault-tolerant corridor, it extracts the restricted sub-topology map and applies Bezier interpolation to generate a smooth merging trajectory, driving neighboring nodes to perform avoidance. The execution feedback module is used to reduce the dimensionality of the collaborative path based on the merged trajectory and convert it into a set of control instructions, which are then sent to the wearable terminal. It calculates the similarity transformation residual between the formation coordinate matrix and the target template, triggers instructions to fine-tune or reconstruct logic based on the residual gradient, and receives priority instructions from the visualization interface to complete closed-loop control.

[0016] This invention provides a method and system for topology modeling of dragon and lion dance trajectories and collaborative optimization of formations. It has the following beneficial effects: 1. This invention constructs a spatiotemporal topological graph model and uses exponential decay and linear growth functions to generate a transitional topological matrix. During the time interval of formation switching, the weights of the node connection edges are dynamically and smoothly updated, so that the topological structure of the formation can evolve continuously over time. This avoids abrupt changes in local motion commands or breakage of connected edges caused by sudden formation changes, and realizes the smooth evolution and stable control of the trajectory of a multi-node group in the process of complex formation transformation.

[0017] 2. This invention extracts the centroid oscillation phase of the strongly coupled subgraph of the lion dance, calculates the actual phase difference deviation between nodes, and uses it as a hard constraint condition for the swarm intelligence solution algorithm. During the rolling optimization solution process, the system will actively remove trajectory prediction branches that cause phase misalignment, ensuring strict synchronization of the rhythm of the associated nodes in the strongly coupled collaborative action from the algorithm bottom layer, thus solving the problem of disconnection and coordination errors in the actions of two people in high dynamic performance scenarios.

[0018] 3. This invention calculates the similarity transformation residual between the actual physical formation and the target template, overlays and displays the residual heatmap in the digital twin interface, and supports issuing the highest priority manual intervention command by finding the intersection matching of the visual truncated volume region. Combined with the smooth merging trajectory generated by applying Bezier interpolation to the yaw node and the forced avoidance mechanism of the neighboring node, a closed-loop link combining the algorithm's autonomous correction and active manual intervention is constructed, which improves the system's fault tolerance and overall execution security in complex environments. Attached Figure Description

[0019] Figure 1 This is a structural diagram of a dragon and lion dance trajectory collaborative optimization system according to an embodiment of the present invention; Figure 2 This is a flowchart of a method for collaborative optimization of the movement trajectory of a dragon and lion dance according to an embodiment of the present invention; Figure 3 This is a transition state topological edge weight evolution curve provided in an embodiment of the present invention; Figure 4 A comparison chart of the average formation matching residual and the time consumption of a single replanning operation for different algorithms provided in the embodiments of the present invention; Figure 5 The absolute deviation of phase difference is shown in the tracking curve under strong coupling action provided in the embodiment of the present invention. Detailed Implementation

[0020] The technical solutions in 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.

[0021] See attached document Figure 1 This invention provides a collaborative optimization system for the movement trajectory of a dragon and lion dance, comprising: The multi-source sensing module is used to acquire acceleration, global position and limb skeletal motion data through inertial measurement units, visual networks and motion capture devices, and to perform clock synchronization alignment and abnormal data removal operations based on linear prediction formulas.

[0022] The topology modeling module is used to build a spatiotemporal topology graph based on the spatial distribution of nodes and action coordination rules, and to calculate the dynamic edge weights for fusion distance and velocity differences. During formation sequence transformation, a runtime-dependent function adjusts the edge weight values ​​to construct the transition graph structure.

[0023] The optimization constraint module is used to read the target evaluation weight file for a specific scenario, set the kinematic physical boundary values, and extract the center of gravity oscillation phase data of multi-node actions to perform phase difference out-of-bounds constraint calculations.

[0024] The rolling planning module is used to run a swarm intelligence algorithm with adaptive parameter adjustment to generate a global path. It integrates local replanning units and Bezier interpolation units to handle node yaw corrections and spatial avoidance calculations within a constrained topology.

[0025] The execution feedback module is used to reduce the dimensionality of the continuous trajectory into terminal motion commands within the control cycle and execute wireless transmission. It generates a real-time 3D residual heat map of the site, calculates the similarity transformation residuals between multiple matrices, and receives priority intervention commands based on external screen input to complete the control loop.

[0026] See attached document Figure 2 This invention provides a method for collaborative optimization of the movement trajectory of a dragon and lion dance, comprising the following steps: Deploy multi-source sensing hardware, utilize inertial measurement units, visual networks, and motion capture devices to collect multimodal data, and generate a fused data stream with consistent timestamps after clock synchronization and linear prediction interpolation anomalies.

[0027] Based on the fused data stream, a spatiotemporal topological graph model is constructed, dynamic edge weights are calculated, and a transitional topological matrix is ​​generated through exponential decay and linear growth functions to achieve smooth evolution of the formation switching process.

[0028] Based on the transition state topology matrix, a multi-objective collaborative optimization function is constructed. Velocity, acceleration and safety distance constraints are set, the centroid oscillation phase of the strongly coupled subgraph of the lion dance is extracted, the phase difference deviation is calculated and set as a hard constraint.

[0029] Based on hard constraints, a swarm intelligence algorithm is used to generate a global cooperative path. When a node is detected to be yawing beyond the fault-tolerant corridor, a restricted sub-topology is extracted and Bezier interpolation is applied to generate a smooth merging trajectory, which drives neighboring nodes to perform avoidance.

[0030] Based on the merged trajectory, the collaborative path is reduced in dimension and converted into a set of control instructions, which are then sent to the wearable terminal. The similarity transformation residual between the formation coordinate matrix and the target template is calculated. The logic is fine-tuned or reconstructed based on the residual gradient, and priority instructions from the visual interface are received to complete the closed-loop control.

[0031] Deploying multi-source sensing hardware and a data synchronization acquisition system is fundamental to achieving collaborative optimization of dragon dance formations. This embodiment acquires real-time formation status information by installing sensors on key parts of the dancers' bodies and deploying a visual monitoring network around the venue.

[0032] The data acquisition and alignment process includes the following steps: An inertial measurement unit (IMU) is used to collect individual acceleration, angular velocity, and attitude data; a visual acquisition device is used to obtain global spatial position; and a motion capture device is used to acquire limb skeletal motion data. In practice, the IMU's sampling frequency is set to 100Hz to 200Hz, a range that covers the highest frequency components of human limb movement, ensuring no aliasing occurs during dynamic capture. The sampling frame rate of the visual and skeletal acquisition devices is set to no less than 30Hz, a value determined based on the persistence of vision and the requirements for smooth motion.

[0033] By using edge computing nodes as master control devices, hardware clock synchronization technology is used to unify heterogeneous data from multiple sources to a reference time axis. Edge computing nodes establish a reference clock via Network Time Protocol (NTP) or High Precision Time Protocol (PTP) to synchronize and trigger all sensing nodes, eliminating time offsets in data acquisition. After timestamp alignment, an extrinsic calibration matrix is ​​used to transform visual data from different coordinate systems to a normalized world coordinate system with the center of the field as the origin, achieving a unified representation of the team's spatial location information.

[0034] To address potential packet loss during wireless communication, the system performs anomaly removal and numerical interpolation. Let... Indicates team members exist Position components at time, and These respectively indicate that the team member was in and Position components at time, Let be any one-dimensional coordinate component in the three-dimensional spatial coordinate system. For abnormal location data points lost by the sensor, interpolation is performed using a linear prediction formula: ; in, For the predicted Time and location value, These are the observed coordinate values ​​at the previous sampling time. These are the observed coordinates at the last sampling time. The linear interpolation method is suitable for predicting the movement trends of team members over a short period, provided that the sampling interval is much smaller than the time it takes for the movement state to change. If the duration of missing data exceeds a 100ms threshold, the system determines it as a sensor malfunction and stops interpolation, switching to a visual compensation mechanism.

[0035] Kalman filtering is performed to suppress sensor drift and noise interference. The system combines accelerometer, magnetometer, and visual observations to estimate and update the team member's posture, outputting a fused dataset containing position coordinates, motion velocity, orientation angle, and skeletal joint pose. The core principle of Kalman filtering is to achieve optimal estimation of noisy observations through two steps: prediction and update. The state transition matrix is ​​constructed based on the dynamic equations of the inertial sensor, while the observation matrix is ​​determined based on the imaging geometry model of the visual camera. The fused dataset serves as the input for subsequent topology modeling, with end-to-end latency strictly controlled within 50ms to ensure the real-time response capability of the system's collaborative optimization.

[0036] The above processing procedure, by spatiotemporally fusing inertial measurement data, visual coordinate data, and motion capture data, eliminates the cumulative drift error or blind spot interference caused by using a single sensor. In actual execution, the sensing module preprocesses and locally caches the data through a portable terminal device, further improving the data reliability of the system in high-frequency dynamic dragon dance scenarios. For the interface protocol conversion and data packet encapsulation methods of the various sensors in the sensing network, those skilled in the art can refer to general industrial communication standards.

[0037] In this embodiment, the system constructs the formation information of dragon and lion dances into a dynamic spatiotemporal topology graph and executes the corresponding update and evolution rules to realize dynamic edge weight calculation in the formation evolution process.

[0038] Construct a directed topological graph of the dragon dance formation, defining key points such as dragon dance members and props as graph nodes. Node state vectors. It consists of three-dimensional spatial position coordinates, velocity vectors, attitude angles, key skeletal poses (such as arm lifting height), and beat phase. The connection relationships between nodes are established based on adjacent segment constraints, spatial proximity relationships, role dependencies, and motion coordination rules. For the lion dance motion attributes, a strongly coupled topological subgraph of two lion dance nodes is nested in the model, and the relative distance and phase lag between the lion head and lion tail nodes are set as rigid constraints.

[0039] The topology graph is dynamically maintained using a periodic update and event-triggered mechanism. Periodic updates run at fixed time intervals of 50ms to 100ms, fusing data from the sensing module and smoothly tracking motion using a state prediction model. The prediction model formula is: ; In this embodiment, For the team members exist The state vector at time t, For prediction Time-state vector The state transition matrix characterizes the kinematic inertia of the human body. To control the input matrix, For preset motion control input, This is to account for environmental process noise. Event-triggered updates handle sudden changes in formation. When a change in relative distance exceeding 0.5m or a change in the velocity direction angle exceeding 30° is detected, the edge set is reconstructed and edge weights are calculated. The calculation formula is: ; in, Let be the Euclidean distance between nodes. This is the spatial scale factor, which is set based on the site reference length and is used to normalize the distance influence. This refers to the deviation in the heading angle of the motion; and They are nodes With nodes exist The normalized beat phase at time, with phase values ​​in the interval [0,1]; The weighting coefficients are calibrated offline based on the performance scenario's evaluation configuration file to ensure that the priority of various constraints matches under different formations.

[0040] The topology reconstruction evolution logic is triggered, and a transitional topology is established by introducing dynamic edge weight decay and growth functions to complete the smooth transition of formation switching. Upon receiving the formation change command, the system sets the time interval for formation switching. ,in To switch the start time, This is the end time of the switch. The nodes to be separated in the original formation are grouped together, and the edge weights are decayed using a time exponential function, calculated as follows: ; In this embodiment, The preset decay constant controls the rate at which the edge weights decrease. In the new formation, the edge weights of adjacent nodes are combined and gradually increased using a linear growth function, with the piecewise calculation formula as follows: ; In this embodiment, The stable edge weights are the corresponding edges in the target formation. To switch the start time; This is the end time of the switch. This mechanism guides the topology to continuously transform within a preset time and maintains stable stiffness weights after the switch is completed, avoiding kinematic abrupt changes caused by instantaneous breakage or excessive growth of the graph theory edge set.

[0041] The basic graph theory algorithms involved in topology modeling, such as connectivity detection, can be implemented by those skilled in the art using existing graph computation library functions, and will not be elaborated here. The system updates node states every control cycle based on the real-time position coordinates of the sensing module and simultaneously calculates the adjacency matrix. During large-scale formation reconstruction, the original topology matrix is ​​residual-matched with the new template to identify offset nodes. For the strongly coupled subgraph of the lion dance, additional phase constraints are added to ensure that the two-person collaborative movements remain synchronized during formation switching. This embodiment, by constructing the above model, transforms unstructured motion data into a structured topological graph model, providing a mathematical foundation for subsequent multi-objective optimization and trajectory planning.

[0042] In this embodiment, a scene-adaptive multi-objective evaluation function system is constructed based on the transition state topology matrix, and the rhythm phase hard constraint unique to lion dance is introduced in the solution process to define the evaluation criteria and safety bottom line for cooperative trajectory optimization.

[0043] Based on the transition state topology matrix, a multi-objective collaborative optimization function is constructed. The core form of the evaluation function is a weighted sum of five sub-evaluation indicators, and the overall evaluation function is... The calculation formula is: ; In this embodiment, As an index for the sub-indicators, there are five sub-indicators. These are used to quantify formation matching, rhythm synchronization, path smoothness, energy consumption, and collision risk, respectively. Formation matching is calculated using the root mean square error of node positions between the current formation and the target topology; rhythm synchronization is measured using the cross-correlation coefficient of the velocity envelopes of each node; path smoothness is quantified using the integral of the rate of curvature change of the trajectory curve; energy consumption corresponds to the integral value of the overall motion acceleration; and collision risk is constructed based on the principle of artificial potential field method, establishing a virtual repulsive field around obstacles or non-adjacent nodes, with the potential field penalty value increasing exponentially as the distance increases. The weighting coefficients for the corresponding sub-indicators are given, and each weight satisfies the following conditions: and The normalization conditions.

[0044] Based on the target evaluation weight file for a specific application scenario, dynamically switch the evaluation weights to adjust the target weights. The numerical values ​​are as follows. In this embodiment, in daily training scenarios, the weights of formation matching and rhythm synchronization are increased, and the sum of the two weight coefficients is set to be greater than 0.6; in sports event scenarios, the weights of path smoothness and formation matching are increased; in commercial performance scenarios, the weight of safety collision risk is increased, and the safety risk weight is set to... The value should be set to no less than 0.5. The mechanism for reading the weight configuration file can be implemented by those skilled in the art using standard file parsing methods, and will not be elaborated upon here.

[0045] Kinematic physical boundary values ​​are set to establish constraint boundary conditions. Based on human physiological functions and the physical properties of the dragon dance props, the minimum safe distance between nodes, the maximum movement speed of individuals, and the connectivity determination range of topological roles are set. In this embodiment, the maximum movement speed of individuals is set to 5m / s to 8m / s based on the human sprint limit, and the minimum safe distance is set to 1.5m to 2.0m based on the dragon's body diameter and the personnel's arm span. During the solver's operation, candidate solutions that cause node distances to be less than the minimum safe distance, speeds to exceed the maximum movement speed limit, or broken connected edges will be set as invalid path branches and pruned in the search tree.

[0046] To address the collaborative motion characteristics of the strongly coupled subgraph of a lion dance, the oscillation phase of the lion's center of gravity is extracted, and phase difference boundary constraint calculations are performed. During the lion dance movements, the lion head and tail nodes maintain a specific undulating rhythm. A sensing module is used to extract the real-time displacement time series of the lion head and tail's center of gravity in the vertical direction, and the periodic oscillation phase is calculated using signal processing methods. and The peak detection or Hilbert transform algorithm involved in the oscillation phase extraction operation is a well-known technology in this field.

[0047] The phase difference deviation between the lion's head and tail is calculated using the following formula: ; In this embodiment, This represents the absolute deviation of the phase difference. The standard phase difference required for a specific coordinated action. For example, when performing an alternating step action, Values When performing synchronized force exertion actions, The value is 0.

[0048] The phase difference deviation is set as a constraint condition for optimizing the search boundary. An allowable phase deviation threshold is set in the solver. In this embodiment, the threshold is calibrated offline based on the human neuromuscular response delay time and action tolerance, and its value range is set to... Interval. When a state of strong cooperative action exists, if the calculated deviation... If the set threshold is exceeded, the solver restricts the optimization search boundary, discards trajectory prediction branches that cause phase misalignment, and ensures synchronization of the two-person action rhythm. This embodiment configures the above constraints so that the output global cooperative path satisfies the dual constraints of physical laws and cooperative logic.

[0049] In this embodiment, the rolling optimization solution of the trajectory is completed by improving the particle swarm algorithm, and the trajectory correction under abnormal conditions is achieved by combining local replanning and Bessel interpolation mechanism.

[0050] First, particle encoding is performed on the motion trajectory within the future prediction time domain. The length of the prediction time domain is denoted as... Typically, 10 to 20 sampling points are taken, and the number of nodes is denoted as... In three-dimensional space, the dimension of each particle is set to... Each particle position vector corresponds to a sequence of candidate trajectories.

[0051] In this embodiment, constraint checks are first performed after candidate trajectories are generated. When the trajectory point corresponding to a particle exceeds the maximum motion speed limit, or the distance between adjacent nodes is less than the safe distance threshold, the portion exceeding the constraint is projected and corrected, causing the particle to be remapped within the feasible region boundary. In this way, it can be ensured that all trajectories participating in subsequent evaluation and iterative calculations meet the basic motion constraint requirements.

[0052] After initialization, the particle swarm optimization algorithm is used for rolling optimization. The particle velocity update formula is: ; in, Indicates the number of iterations; Indicates the first Particles in the next iteration The velocity vector; Represents the particle position vector; Indicates the best position in the particle's history; This indicates the current globally optimal position; and The range of values ​​is Random numbers; Inertial weights; and These represent individual learning factors and group learning factors, respectively.

[0053] To balance search capability and convergence speed, this embodiment adaptively adjusts the parameters based on the population state. The convergence gradient is defined as the rate of change of the global optimal evaluation value over five consecutive iterations, and the conflict frequency is defined as the proportion of particles that trigger constraint projection correction in a single iteration out of the total number of particles.

[0054] Preset corresponding low-order and high-order judgment thresholds. Specifically, when the convergence gradient is lower than the low-order judgment threshold (e.g., set to 0.01) and the conflict frequency is higher than the high-order judgment threshold (e.g., set to 20%), it indicates that the current population is prone to getting trapped in a local optimum. In this case, the inertia weight is appropriately increased and the population learning factor is decreased to improve the search range. When the convergence gradient is higher than the high-order judgment threshold (e.g., set to a higher level such as 0.05) and the conflict frequency is lower than the low-order judgment threshold (e.g., set to 5%), the inertia weight is appropriately decreased while the population learning factor is increased to make particles quickly gather in the dominant region. In one set of implementations, the inertia weight can be adjusted in the range of 0.4 to 0.9, and the population learning factor can be adjusted in the range of 1.2 to 2.0.

[0055] During operation, the allowable deviation between the actual position and the planned trajectory is set as a fault tolerance corridor. When a node yaw is detected to exceed the fault tolerance corridor (e.g., when the deviation between the actual position and the planned trajectory exceeds 0.5m), a local replanning mechanism is triggered.

[0056] In this embodiment, local associated regions are extracted based on the connectivity relationships in the transitional topology matrix. Specifically, starting from the node that caused the deviation, its directly connected adjacent nodes and corresponding connecting edges are selected to form a local optimization region. In subsequent iterations, trajectory encoding and optimization calculations are only performed on nodes within the local optimization region, while the remaining nodes continue to move according to the original planned trajectory. By reducing the optimization scale, the computational load can be reduced and the real-time response capability can be improved.

[0057] For nodes with significant deviations, the merging trajectory is regenerated to restore the formation structure. The merging trajectory is constructed using cubic Bézier curves, and its expression is: ; in, Indicates the current actual location coordinates; Indicates the coordinates of the target inflow point; This is the normalized time parameter, and its value range is... .

[0058] To ensure the continuity and smoothness of the trajectory, control points and Determined in the following ways: ; ; in, This represents the velocity vector corresponding to the current position. This represents the desired velocity vector corresponding to the target position. This represents the smoothing adjustment coefficient, with a preferred value range of 0.5 to 1.5.

[0059] In practical applications, adjustments can be made based on the steering capability, acceleration constraints, and trajectory smoothing requirements of the motion platform. The value of . When When the radius increases, the turning radius of the trajectory increases accordingly; when When the trajectory is reduced, it can merge into the target path more quickly.

[0060] While generating the merging trajectory, neighboring nodes within the local optimization region simultaneously perform avoidance adjustments. Specifically, the safety distance weight in the evaluation function can be temporarily increased, allowing neighboring nodes to proactively reserve movement space, thus providing a safe merging channel for deviating nodes. After merging is complete, each node reverts to its normal optimization weight and continues with subsequent rolling planning.

[0061] In this embodiment, the optimized collaborative path is transformed into physical actions, and a multi-level closed-loop control link is established in combination with human intervention.

[0062] The globally optimal trajectory is discretized to generate a periodic control command set. The discretized command set includes the target position coordinates, desired velocity, steering action trigger time, rhythm synchronization marker, and safety attention level. During the trajectory discretization calculation, the velocity command must meet the maximum motion capability limit of a single unit; the corresponding velocity calculation formula is as follows: ; In this embodiment, Indicates the topology node number; Indicates the first The start time of each control cycle; Indicates the time step of the control cycle; Indicates that the node is Ideal target coordinates at any given moment; This represents the expected speed vector of a node's execution within the corresponding period. The time step is determined based on computing power and terminal response latency. The value range is set to 0.1s to 0.2s.

[0063] Using a wireless communication module, the calculated periodic instruction set is sent to each execution terminal. After receiving the instruction, the execution terminal issues a prompt in a multimodal manner based on the attention level information carried in the instruction. When the instruction attention level is in the normal follow-up state, the execution terminal triggers light flashing at different frequencies; when the instruction attention level is in the safe avoidance state, the execution terminal superimposes high-frequency vibration and voice broadcast to improve the accuracy of action instruction acquisition.

[0064] During instruction execution, a risk monitoring module runs in parallel. Edge computing nodes on-site collect the real-time 3D physical coordinates of participants and synchronize the coordinate data to a large visualization screen terminal. In this embodiment, the large visualization screen constructs a digital twin interface based on a 3D rendering engine. The digital twin interface employs a multi-layer overlay display mechanism; the bottom layer displays real-time physical positions and motion postures, while the upper layer is a semi-transparent overlay of the topological connections of the target formation template.

[0065] To quantitatively assess the degree of formation topology preservation during collaborative execution, the matching residuals after spatial similarity transformation between the actual physical formation and the target formation template are calculated. The formula for calculating the matching residuals is as follows: ; In this embodiment, This represents the overall formation matching residual; This represents the total number of nodes contained in the formation. Indicates the first Real-time physical coordinates of each node; Indicates the reference coordinates of the corresponding node in the target formation template; Indicates the space scaling factor; Represents a three-dimensional rotation matrix; This represents the translation vector. By solving for the transformation parameters that minimize the sum of squared errors, we can isolate the deviations caused by the overall translation or rotation of the formation, reflecting the degree of breakage in the relative topological structure within the formation.

[0066] To visually represent local deviations, the single-point matching residual values ​​of each node are obtained and mapped to a heatmap color matrix, which is then overlaid and displayed on the digital twin interface. In this embodiment, a linear interpolation algorithm is used for gradient rendering of colors. When the single-point residual of a node is less than 0.5m, it is rendered as a green halo; when the single-point residual is between 0.5m and 1.5m, it is rendered as a yellow halo; and when the single-point residual exceeds 1.5m, it is rendered as a red spot. The color gradient change of the residual heatmap reflects the distribution of the breakage risk in the formation topology.

[0067] Based on the calculated overall formation matching residuals Execute a tiered early warning judgment. When the matching residual is less than 0.5m, the deviation is judged to be within the normal fluctuation range, and the original planning instruction is issued. When the matching residual is between 0.5m and 1.5m, it is judged that there is a local deviation exceeding the standard, and local restricted sub-topology replanning is initiated. When the matching residual is greater than 1.5m, it is judged that the position deviation is seriously exceeding the standard, and global collaborative reconstruction is triggered.

[0068] A real-time early warning interaction module is configured in the large-screen visualization interface to establish a mapping link from the input of the visualization interface to the output of the underlying physical commands. When a red highlighted area appears in the residual heat map, indicating an abnormal state such as action loss of synchronization or path intersection, the operator can directly select the corresponding abnormal area through the large-screen touch interface. In this embodiment, the two-dimensional pixel coordinate boundary of the touch selection on the screen is captured, and the inverse projection matrix of the 3D rendering engine is used to reverse map the two-dimensional pixel coordinates of the screen and construct a view frustum in the three-dimensional physical space. The view frustum region is then intersected and matched with the spatial position data of all current nodes to delineate the set of affected abnormal node identifiers.

[0069] Once the abnormal nodes are identified, the operator issues the highest-priority intervention command through the interface. The intervention command includes safety plans such as emergency deceleration, maintaining position, or dispersing. Upon receiving the intervention command, the trajectory optimization calculation for the corresponding abnormal node set is paused, and the intervention command is directly transmitted to the corresponding terminal for execution via the wireless communication link.

[0070] Simultaneously, the system dynamically marks the attributes of abnormal nodes in the intervention state as static obstacles or anchored nodes in the global spatiotemporal topology map, forcibly triggering local replanning and obstacle avoidance adjustment calculations for other normal nodes. By adopting a method of prioritizing instructions to override regular optimization instructions and linking them with global obstacle avoidance, a control link combining algorithm correction and manual intervention is established, thoroughly reducing the execution risk in complex field environments.

[0071] Specific application examples: This embodiment uses a scenario where a 9-person dragon dance formation changes from a straight long dragon formation to a spiral coiled dragon formation as an example to illustrate in detail the specific numerical calculations and operational logic of each module of the system.

[0072] Data acquisition and anomaly interpolation calculation: during formation march to At that time, the visual acquisition system was obstructed by the venue lights, and the third node of the dragon's body ( The visual position data of the device is briefly lost (lasting 40ms). At this time, the system triggers the linear prediction interpolation mechanism.

[0073] Given that the node is located in the X-axis direction of the spatial coordinate system, at the previous sampling time ( The observed coordinates are: upsampling time ( The observed coordinates are: System call prediction formula: ; Substituting the numerical values, we can obtain the following results. The predicted position value at any given time is 2 × 2.2m - 2.0m = 2.4m. This mechanism ensures the spatial continuity of the fused data stream even under short-term packet loss.

[0074] Dynamic calculation of transitional topological edge weights: Upon receiving the Panlong transformation command, the system sets the formation switching time interval to be... End time For adjacent node combinations in a long dragon formation but need to be separated in a coiled dragon formation (such as node 1 and node 5), the weight of their connecting edge decays exponentially over time: ; Set initial edge weights Attenuation constant When the journey reached When, substituting into the formula, the edge weight decay is calculated as follows: .

[0075] For new adjacent node combinations in the Panlong Formation (such as the head node 1 and the tail node 9), their edge weights are updated using a linear growth function: ; Set target stability weights When the journey reached When switching the midpoint of the time interval, the edge weight is calculated by substituting into the formula. .

[0076] Smooth Bezier inflow under node yaw: In the evolution of Panlong At that time, node number 4 deviated from the target trajectory due to inertia, and its actual position was... Its target inflow point is At this point, a local replanning mechanism is triggered to generate a cubic Bézier curve: ; The system obtains the current actual velocity vector. Target desired velocity vector Set the smoothing adjustment coefficient .

[0077] First, calculate the control points: ; ; The system then uses normalized time. A smooth curved trajectory is generated, and the 3rd and 5th neighboring nodes are driven to increase the safety potential field weight to perform avoidance, guiding the 4th node to merge into the target trajectory without collision within 0.5s.

[0078] Overall residual assessment and closed-loop intervention: After the import is complete, the edge computing nodes are based on the actual physical coordinates of each node. Reference coordinates with the target formation template Calculate the overall formation matching residual: ; If we calculate the overall residual after eliminating translation and rotation at this point... Since the value falls within the range of [0.5m, 1.5m], the system automatically triggers a local restricted subtopology replanning and renders a yellow warning circle in the corresponding 4th node area on the visualization screen. At this time, the operator does not need to perform the highest priority forced global reconstruction.

[0079] Experimental verification and effect comparison: To verify the effectiveness of the technical solution of this invention, a comparative experiment was conducted in a standard laboratory equipped with twenty-four optical motion capture lenses and edge computing nodes. A continuous nine-person dragon dance dynamic scene, including linear acceleration, S-shaped movement, and rapid coiling, was selected, with a total duration of 60 seconds. The benchmarks for comparison were the traditional artificial potential field method and the standard particle swarm optimization algorithm. The verification results for each indicator are as follows: Verification of smooth evolution of edge weights: refer to Figure 3 The graph shows the evolution of topological edge weights in the transition state. The horizontal axis represents time in seconds, and the vertical axis represents the edge weight values. After receiving the formation switching command, the system enters a switching process lasting three seconds. The graph shows that the edge weights of the separated nodes in the original formation are represented by solid lines, decaying exponentially with time. In the new formation, the edge weights of adjacent nodes are represented by dashed lines, increasing linearly over time and reaching a stable baseline value after the transition period. This cross-evolution method ensures a smooth transition during the formation structure transformation process, preventing discontinuities in the planned trajectory caused by sudden changes in the data matrix.

[0080] Verification of formation matching accuracy and planning efficiency: refer to Figure 4 The chart compares the average formation matching residual with the time taken for a single replanning iteration. The chart uses a dual vertical axis structure; dark bars correspond to the formation matching residual on the left, and light bars correspond to the replanning time on the right. Throughout the entire testing period, the average residual for the traditional artificial potential field method was 1.85m, while the average residual for the standard particle swarm optimization algorithm was 1.20m. This invention combines a dynamic topology correction mechanism, achieving an average residual of 0.42m and reducing formation maintenance errors. When the system detects a node position deviation exceeding 0.5m, it triggers a single local replanning. Traditional artificial potential field methods take 12ms, and standard particle swarm optimization requires iterating over all nodes, taking 150ms, which is longer than the set control period. This invention's method solves and interpolates the locally related regions, reducing replanning time to 35ms. The results show that this system meets the real-time response time requirements of collaborative management while controlling formation matching errors.

[0081] Action synchronization verification: refer to Figure 5 The curves illustrate the fluctuations in phase deviation over time under different algorithms during two-person collaborative actions. The traditional artificial potential field method is represented by a light gray dotted line, and the standard particle swarm optimization algorithm by a dark gray dashed line. These two methods do not impose restrictions on the action rhythm, and their peak deviations reach 0.45 radians and 0.38 radians respectively, exceeding the 0.26 radian tolerance threshold, which is marked by a black dotted line. The method of this invention is represented by a solid black line, setting phase deviation as the boundary condition for optimization calculations and discarding planned trajectories that do not meet the constraints. Test data shows that the average deviation of the method of this invention is within 0.12 radians, and the overall value remains within the set threshold range, maintaining the synchronization state of the collaborative actions.

Claims

1. A method for topological modeling of dragon and lion dance trajectories and collaborative optimization of formations, characterized in that, Includes the following steps: Deploy multi-source sensing hardware, use inertial measurement units, visual networks and motion capture devices to collect multimodal data, and generate a fused data stream with consistent timestamps after clock synchronization and linear prediction interpolation anomalies; Based on the fused data stream, a spatiotemporal topology graph model is constructed, dynamic edge weights are calculated, and a transitional topology matrix is ​​generated through exponential decay and linear growth functions. Based on the aforementioned transition state topology matrix, a multi-objective collaborative optimization function is constructed, and constraints on velocity, acceleration, and safety distance are set. The centroid oscillation phase of the strongly coupled subgraph of the lion dance is extracted, and the phase difference deviation is calculated and set as a hard constraint. Based on the hard constraints, a swarm intelligence solution algorithm is run to generate a global cooperative path. When a node is detected to be yawing beyond the fault-tolerant corridor, the restricted sub-topology is extracted and Bezier interpolation is applied to generate a smooth merging trajectory, driving neighboring nodes to perform avoidance. Based on the merged trajectory, the collaborative path is reduced in dimensionality and converted into a set of control instructions, which are then sent to the wearable terminal. The similarity transformation residual between the formation coordinate matrix and the target template is calculated. The residual gradient triggers the instruction to fine-tune or reconstruct the logic, and priority instructions from the visual interface are received to complete the closed-loop control.

2. The method for topological modeling of dragon and lion dance trajectories and collaborative optimization of formations according to claim 1, characterized in that, The steps for generating a fused data stream with consistent timestamps after clock synchronization and linear predictive interpolation anomalies include: By using edge computing nodes to establish a reference clock through a time protocol, the sensing nodes are synchronously triggered. The external parameter calibration matrix is ​​used to transform visual data in different coordinate systems to the normalized world coordinate system. For abnormal location data points lost by the sensor, a linear prediction mechanism is used for interpolation. The predicted value of the current location component is set to twice the observed coordinate value at the previous sampling time and the difference between the observed coordinate value at the time before that. If the duration of data loss exceeds a preset threshold, the sensor is determined to be faulty and a visual compensation mechanism is executed. Kalman filtering is performed on the multi-source observations to output a fused dataset containing position coordinates, motion velocity, orientation angle, and skeletal joint pose as the fused data stream.

3. The method for topological modeling of dragon and lion dance trajectories and collaborative optimization of formations according to claim 1, characterized in that, The steps for constructing a spatiotemporal topological graph model and calculating dynamic edge weights include: The key points of the dragon dance team members and props are defined as graph nodes, and the node state vector is composed of spatial position coordinates, velocity vector, posture angle, key bone pose and beat phase. Nested topological subgraphs consisting of head and tail nodes are defined in the topological graph model, and the relative distance and phase lag between the head and tail nodes are set as rigid constraints. When the relative distance or velocity direction angle between nodes is detected to exceed a set threshold, the edge set is reconstructed. The dynamic edge weight is calculated by weighting the exponential decay term of the spatial Euclidean distance between nodes, the linear penalty term of the motion heading angle deviation, and the cosine periodic term of the normalized beat phase difference between nodes.

4. The method for topological modeling of dragon and lion dance trajectories and collaborative optimization of formations according to claim 1, characterized in that, The steps for generating the transition state topology matrix using exponential decay and linear growth functions include: Set the start and end times for the formation switching time interval; For the node combinations that are to be separated in the original formation, the weight of the connection edges between the node combinations is controlled to decrease exponentially from the start of the switching according to a preset decay constant. For the node combinations that will be adjacent in the new formation, the weights of the connecting edges between the node combinations are updated using a linear growth function; During the time interval from the start of the switchover to the end of the switchover, the weight of the connection edge is controlled to increase linearly with time, and reaches the set target stable weight value at the end of the switchover. After the handover end time has elapsed, the connection edge weight remains unchanged at the target stable weight value; The transitional topology matrix is ​​generated by the topology containing the updated connection edge weights.

5. The method for topological modeling of dragon and lion dance trajectories and collaborative optimization of formations according to claim 1, characterized in that, The steps for constructing a multi-objective collaborative optimization function and setting velocity, acceleration, and safety distance constraints include: The overall evaluation function is established as a weighted sum of five sub-evaluation indicators, which correspond to the quantitative values ​​of formation matching degree, rhythm synchronization, path smoothness, energy consumption and safety collision risk, respectively. The safety collision risk is constructed based on the principle of artificial potential field method, which establishes a virtual repulsive field around obstacles or non-adjacent nodes; Read the target evaluation weight file for a specific application scenario and adjust the weight coefficients of each sub-evaluation indicator; During the solver's operation, candidate solutions that cause node spacing to be less than the minimum safe distance, node speed to exceed the maximum movement speed limit, or connected edges to break are set as invalid path branches, and pruning operations are performed in the search tree.

6. The method for topological modeling of dragon and lion dance trajectories and collaborative optimization of formations according to claim 1, characterized in that, The steps for extracting the centroid oscillation phase of the strongly coupled subgraph of the lion dance, calculating the phase difference deviation, and setting it as a hard constraint include: The displacement time series of the center of gravity of the lion's head node and lion's tail node in the vertical direction are extracted, and the periodic oscillation phase is calculated by signal processing methods; Calculate the absolute deviation between the actual phase difference and the standard coordinated phase difference between the lion's head node and the lion's tail node; The absolute deviation is used as a constraint condition for optimizing the search boundary. When the calculated absolute deviation exceeds the pre-calibrated offline phase deviation threshold, the trajectory prediction branch that causes phase misalignment is discarded in the solver.

7. The method for topological modeling of dragon and lion dance trajectories and collaborative optimization of formations according to claim 1, characterized in that, The steps for generating a global cooperative path using a swarm intelligence algorithm include: The candidate motion trajectory sequence of nodes in the future prediction time domain is encoded by particles, and the particle swarm algorithm is used for rolling optimization solution. During the iterative optimization process, the rate of change of the global optimal evaluation value within multiple consecutive iterations is used as the convergence gradient, and the proportion of particles that trigger constraint projection correction in a single iteration is used as the conflict frequency. When the convergence gradient is lower than the low-order judgment threshold and the conflict frequency is higher than the high-order judgment threshold, the inertia weight is increased and the group learning factor is decreased. When the convergence gradient is higher than the high-order judgment threshold and the conflict frequency is lower than the low-order judgment threshold, the inertia weight is reduced and the group learning factor is increased.

8. The method for topological modeling and formation optimization of dragon and lion dance trajectories according to claim 1, characterized in that, Extracting the restricted subtopology and applying Bezier interpolation to generate a smooth merging trajectory, driving neighboring nodes to perform avoidance steps, including: Starting from the yaw node that causes the deviation, select the adjacent nodes directly connected to it and the corresponding connecting edges to form a local optimization region, and recalculate the trajectory optimization only for the nodes in the local optimization region. A smooth merging trajectory based on a cubic Bézier curve is generated for the yaw node. The control points of the cubic Bézier curve are determined by the product of the current actual position of the yaw node, the position of the target merging point, and the velocity vectors corresponding to the two, and a preset smoothing adjustment coefficient. During the same period in which the smooth merging trajectory is generated, the safety distance weight for the adjacent nodes in the multi-objective collaborative optimization function is increased to drive the neighboring nodes to perform spatial avoidance.

9. The method for topological modeling of dragon and lion dance trajectories and collaborative optimization of formations according to claim 1, characterized in that, The steps of calculating the similarity transformation residual between the formation coordinate matrix and the target template, fine-tuning or reconstructing the logic based on the residual gradient trigger command, and receiving priority commands from the visualization interface to complete closed-loop control include: Calculate the overall formation matching residual between the actual physical formation after eliminating spatial scaling, rotation and translation deviations and the target formation template. Based on the numerical range echelon of the overall formation matching residual, trigger the issuance of the original planning instruction, start the local restricted sub-topology replanning or trigger the global collaborative reconstruction mechanism respectively. Obtain the single-point matching residual value corresponding to each node, render it as a residual heatmap through color gradient mapping, and overlay it in the digital twin interface containing physical location and topological connection; Capture the two-dimensional pixel coordinate boundaries of the input on the large screen touch interface, construct a three-dimensional spatial scene frustum using the inverse projection matrix, and find the intersection and match with the spatial position of the current node to delineate the set of abnormal node identifiers; Issue a priority intervention command for the abnormal node identifier set, dynamically mark the attributes of the abnormal node identifier set in the spatiotemporal topology graph as static obstacles or anchored nodes, and trigger local replanning and obstacle avoidance adjustment calculations for the remaining normal nodes.

10. A system for topological modeling of dragon and lion dance trajectories and collaborative optimization of formations, characterized in that, Applied to the method for topology modeling and formation collaborative optimization of dragon and lion dance trajectories as described in any one of claims 1-9, comprising: The multi-source sensing module is used to collect multimodal data using inertial measurement units, visual networks and motion capture devices, and generate a fused data stream with consistent timestamps after clock synchronization and linear prediction interpolation anomalies. The topology modeling module is used to construct a spatiotemporal topology graph model based on the fused data stream, calculate dynamic edge weights, and generate a transitional topology matrix through exponential decay and linear growth functions. The optimization constraint module is used to construct a multi-objective collaborative optimization function based on the transition state topology matrix, set velocity, acceleration and safety distance constraints, extract the centroid oscillation phase of the strongly coupled subgraph of the lion dance, calculate the phase difference deviation degree and set it as a hard constraint; The rolling planning module is used to generate a global cooperative path based on the hard constraints by running a swarm intelligence solution algorithm. When a node yaws beyond the fault-tolerant corridor, it extracts the restricted sub-topology map and applies Bezier interpolation to generate a smooth merging trajectory, driving neighboring nodes to perform avoidance. The execution feedback module is used to reduce the dimensionality of the collaborative path based on the merged trajectory and convert it into a set of control instructions, which are then sent to the wearable terminal. It calculates the similarity transformation residual between the formation coordinate matrix and the target template, triggers instructions to fine-tune or reconstruct logic based on the residual gradient, and receives priority instructions from the visualization interface to complete closed-loop control.