An interaction analysis system and method for an AI child companion robot

CN122884346APending Publication Date: 2026-10-09NANJING XIAOZHUANG UNIV
View PDF 1 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

现有的儿童陪伴机器人普遍采用单片机结合微型舵机的低成本硬件架构,在交互分析与运动控制方面存在严重缺陷:首先,现有系统的场景分析依赖于扁平化的特征提取与刚性的状态机逻辑,当系统预设主动任务(如启动睡眠引导模式)与儿童即时物理交互行为(如剧烈摇晃、把玩机器人)发生冲突时,系统采取粗暴的指令打断,引发电机堵转或交互体验生硬;其次,现有系统在控制低成本微型舵机时,直接依据目标角度改变脉冲宽度调制(PWM)的占空比,导致机器人肢体动作表现出机械僵硬感和高频抖动,无法根据儿童的活动状态动态调节肢体柔顺度;最后,现有系统缺乏自适应的物理与听觉安全约束机制,在夜间误触发或遭受外力剧烈干扰时,产生快速的机械臂挥舞或高分贝语音,对儿童造成物理夹伤或心理惊吓风险

Benefits of technology

[0015]本发明的有益效果:本发明引入树状长短期记忆网络(Tree-LSTM)构建多模态情境认知树,并将多主体连续仲裁算法引入意图决策中。通过一阶动态逼近方程,解决了儿童即时把玩意图与系统预设任务之间的零和冲突。摒弃了传统机器人僵化的状态机打断逻辑,使得机器人在不同任务状态间的切换如同流体般平滑,消除了电机控制指令阶跃。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122884346A_ABST
    Figure CN122884346A_ABST
Patent Text Reader

Abstract

The application discloses an interactive analysis system and method of an AI child accompanying robot, relates to the technical field of human-computer interaction, and comprises the following steps: collecting interaction data, constructing a situation cognitive tree through a tree-shaped long short-term memory network, and extracting a structured state vector corresponding to a scene; calculating an intention conflict degree between a preset target task and a child interaction intention, solving an actual behavior weight coefficient based on the structured state vector and the intention conflict degree through a first-order dynamic approximation equation, and generating a preliminary behavior execution instruction based on the actual behavior weight coefficient; extracting action energy features in the interaction data, inputting the preliminary behavior execution instruction and a physical fluid viscosity parameter into a second-order impedance control equation, and performing smooth trajectory calculation through discrete numerical integration to output a smooth target angular trajectory vector; constructing an absolute safety envelope space combined with each other in a decoupled manner of a space boundary condition and a time boundary condition, performing boundary projection, outputting a final control instruction, and executing the final control instruction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of human-computer interaction technology, and in particular to an interaction analysis system and method for an AI child companion robot. Background Technology

[0002] With the development of embodied intelligence technology, AI companion robots designed specifically for children have gradually become a research hotspot in the smart home field. Children's behavior is highly unpredictable, placing extremely high demands on the robot's human-computer interaction system and motion control system. Existing child companion robots generally adopt a low-cost hardware architecture combining a microcontroller and a micro servo motor, which has serious deficiencies in interaction analysis and motion control: First, the scene analysis of existing systems relies on flat feature extraction and rigid state machine logic. When the system's preset active tasks (such as activating sleep guidance mode) conflict with the child's immediate physical interaction behavior (such as violent shaking or playing with the robot), the system takes abrupt interruption commands, causing motor stalling or a stiff interaction experience. Second, when controlling low-cost micro servos, existing systems directly change the duty cycle of pulse width modulation (PWM) based on the target angle, resulting in mechanical stiffness and high-frequency jitter in the robot's limb movements, failing to dynamically adjust the limb flexibility according to the child's activity state. Finally, existing systems lack adaptive physical and auditory safety constraint mechanisms. When accidentally triggered at night or subjected to severe external interference, they may produce rapid robotic arm swings or high-decibel voices, posing a risk of physical injury or psychological fright to children.

[0003] Currently, Chinese invention patent CN121305942A discloses an interactive system for an early childhood education robot, including a control module, a data acquisition module, a decision-making module, and a wireless module. The system comprises the following steps: S1, the control module starts the robot, and the data acquisition module collects multimodal information; S2, a preprocessing module processes the data; S3, the preprocessed data is transmitted to the decision-making module, which acts as a data processor; S4, the decision-making module extracts relevant information from a knowledge base and images from an image library based on the input data, and an AI model organizes and responds; S5, a feedback module provides feedback, which is displayed on a screen and played through a speaker; S6, the wireless module downloads relevant text, images, and emoticons, and transmits recent interactive information to a mobile device. This robot achieves human-like situational awareness and natural interaction by constructing a complete technical closed loop integrating multimodal perception, dynamic cognitive decision-making, and age-appropriate educational content, enhancing the intelligence and realism of companionship. However, existing technologies struggle to smoothly transition between children's immediate intentions and pre-set system tasks. Low-cost servo motor motion control lacks the ability to adjust compliance based on user movement energy, resulting in mechanical stiffness, and also lacks strict physical and auditory safety constraints. Summary of the Invention

[0004] The technical problem solved by this invention is that existing technologies are unable to smoothly transition between children's immediate intentions and system preset tasks. Low-cost servo motor motion control lacks the ability to adjust the smoothness according to the user's motion energy, resulting in mechanical stiffness. At the same time, it lacks strict physical and auditory safety constraints.

[0005] To address the aforementioned technical problems, this invention provides the following technical solution: an interaction analysis method for an AI child companion robot, comprising the following steps: Step S1: Collect interaction data, construct a contextual cognition tree through a tree-like long short-term memory network, and extract the structured state vector corresponding to the scene; Step S2: Calculate the degree of intent conflict between the preset target task and the child's interactive intent. Based on the structured state vector and the degree of intent conflict, solve the actual behavior weight coefficient through a first-order dynamic approximation equation, and generate preliminary behavior execution instructions based on the actual behavior weight coefficient. Step S3: Extract the motion energy features from the interaction data and calculate the physical fluid viscosity parameters using the energy viscosity mapping function; Step S4: Input the initial behavior execution command and physical fluid viscosity parameters into the second-order impedance control equation, and perform smooth trajectory calculation through discrete numerical integration to output the smooth target angle trajectory vector; Step S5: Construct an absolutely safe envelope space that decouples the spatial boundary conditions and the temporal boundary conditions. Input the smooth target angular trajectory vector and the audio output decibel scalar into the absolutely safe envelope space, perform boundary projection, output the final control command, and issue it for execution.

[0006] Preferably, step S1 specifically includes: The interactive data includes human motion amplitude data, posture interaction data, and robot state data; The interaction data is aligned according to timestamps, and the aligned data is mapped to the node features of the context cognition tree. The root node of the context cognition tree is the current time point, the middle nodes are robot state data, and the leaf nodes are human motion amplitude data and posture interaction data. The contextual cognition tree is input into a pre-trained tree-structured long short-term memory network for bottom-up topological information aggregation and forward propagation computation, outputting a structured state vector.

[0007] Preferably, step S2 specifically includes: The degree of intent conflict is calculated based on the expected action vector of the first robot corresponding to the preset target task and the expected action vector of the second robot corresponding to the child's interaction intent. The structured state vector and the degree of intent conflict are input into a nonlinear activation function to obtain continuous target behavior weight coefficients. A first-order dynamic approximation equation is constructed. The logic of the first-order dynamic approximation equation is: the product of the first derivative of the actual behavior weight coefficient with respect to time and the smoothing time constant is equal to the difference between the target behavior weight coefficient and the actual behavior weight coefficient. Solving the first-order dynamic approximation equation yields the actual behavior weight coefficients at the current moment. These coefficients are then used to perform a weighted summation of the expected action vector and the desired action vector to obtain the preliminary behavior execution instructions.

[0008] Preferably, the specific logic for obtaining the intent conflict level includes: A children's standard movement mapping database is constructed by collecting big data. The children's standard movement mapping database includes children's interactive intentions and their corresponding preset target tasks, human body movement amplitude data, posture interaction data, robot state data, and robot standard movement instruction data. The robot standard movement instruction data includes the three-dimensional coordinates of the end effector and posture quaternions. Input the preset target task into the children's standard action mapping database, find all the corresponding robot standard action instruction data, and perform one-dimensional feature expansion and splicing on all robot standard action instruction data to obtain the first robot expected action vector. Input the child's interactive intention into the child's standard action mapping database, find all the corresponding robot standard action instruction data, and perform one-dimensional feature expansion and splicing on all robot standard action instruction data to obtain the second robot expected action vector. Based on the expected motion vector of the first robot and the desired motion vector of the second robot, the position distance and the attitude angular distance are weighted and summed to obtain the intention conflict degree.

[0009] Preferably, step S3 specifically includes: The root mean square value of human motion amplitude data and posture interaction data is calculated as the motion energy feature at the current moment. Based on the different physical intervals in which the motion energy feature is located, the corresponding physical fluid viscosity parameters are output according to the energy viscosity mapping function.

[0010] Preferably, the piecewise logic of the energy viscosity mapping function includes: When the motion energy characteristic is less than or equal to the first energy threshold, the physical fluid viscosity parameter is assigned a high viscosity constant through the energy viscosity mapping function; When the motion energy characteristic is greater than the second energy threshold, the physical fluid viscosity parameter is assigned to zero through the energy viscosity mapping function; When the motion energy characteristic is greater than the first energy threshold and less than or equal to the second energy threshold, linear interpolation is used for output.

[0011] Preferably, step S4 specifically includes: The initial behavior execution instructions are converted into target joint angle vectors for each joint. The difference between the target joint angle vector and the current actual joint angle vector is calculated to obtain the angle deviation vector. Construct a second-order impedance control equation, using the angular deviation vector as input, and solve for the virtual angular displacement vector. The logic of the second-order impedance control equation includes: the sum of the inertial force term, the damping force term, and the stiffness restoring force term, which is equal to the virtual excitation torque represented by the angular deviation vector after dimensional transformation; The inertial force term is the product of the virtual inertial matrix and the second-order time derivative of the angular deviation vector; The damping force term is the product of the dynamic damping matrix and the first-order time derivative of the angular deviation vector; The stiffness restoring force term is the product of the virtual stiffness matrix and the angular deviation vector; The diagonal elements of the dynamic damping matrix are directly proportional to the physical fluid viscosity parameters.

[0012] Preferably, a smooth target angular trajectory vector is generated by numerically integrating and solving the second-order impedance control equation. The specific process includes: The second-order impedance control equations are reduced in order to a first-order state-space equation system. The transformation process includes: The virtual angular displacement vector and its first-order time derivative are combined to obtain the joint state vector. The time derivative of the joint state vector is calculated and substituted into the second-order impedance control equation to construct a first-order state-space equation system. Within each time step, the fourth-order Runge-Kutta algorithm is used to iteratively integrate the first-order state-space equations a fixed number of times, and the final joint state vector is output. Extract the first N elements from the joint state vector to obtain the updated virtual angular displacement vector at the current discrete moment. Add the virtual angular displacement vector to the current actual joint angle vector using an execution matrix to obtain the smooth target angular trajectory vector at the current moment.

[0013] Preferably, step S5 specifically includes: An absolutely secure envelope space is constructed, which is obtained by decoupling and combining spatial boundary conditions and temporal boundary conditions. The expected angular velocity vector is obtained by calculating the first-order time difference corresponding to the smoothed target angular trajectory vector. The spatial boundary conditions include: all components in the expected angular velocity vector are less than or equal to the maximum safe angular velocity constant; The time boundary conditions include: the audio output decibel scalar is less than or equal to the nighttime air sound decibel constant; When any component in the expected angular velocity vector is greater than the maximum safe angular velocity constant, the spatial boundary projection operation is triggered, forcibly truncating the component exceeding the maximum safe angular velocity constant to the maximum safe angular velocity constant, and reconstructing it based on the integral of the truncated expected angular velocity vector to generate the final control command and send it to the robot servo actuator unit. When the current system time is within the nighttime sleep period defined by the time boundary conditions, the time boundary projection operation is triggered, which forcibly truncates the audio output decibel scalar of the system audio output command to within the nighttime air sound decibel constant, and generates the final control command to be sent to the audio output unit. If the spatial boundary projection operation and the temporal boundary projection operation are not triggered, the smoothed target angular trajectory vector will be directly converted into the final control command and executed.

[0014] An interaction analysis system for an AI child companion robot, the system being used to execute an interaction analysis method for an AI child companion robot, including: The perception module is used to collect interaction data, construct a contextual cognition tree through a tree-like long short-term memory network, and extract the structured state vector corresponding to the scene. The intent module is used to calculate the intent conflict degree between the preset target task and the child's interactive intent. Based on the structured state vector and the intent conflict degree, it solves the actual behavior weight coefficient through a first-order dynamic approximation equation, and generates preliminary behavior execution instructions based on the actual behavior weight coefficient. The mapping module is used to extract motion energy features from interactive data and calculate the physical fluid viscosity parameters through the energy viscosity mapping function. The fluid biomimetic module is used to input the initial behavior execution instructions and physical fluid viscosity parameters into the second-order impedance control equation, and to perform smooth trajectory calculation through discrete numerical integration, and output a smooth target angle trajectory vector. The safe projection envelope module is used to construct an absolutely safe envelope space in which spatial boundary conditions and temporal boundary conditions are decoupled and combined. The smooth target angular trajectory vector and the audio output decibel scalar are input into the absolutely safe envelope space, the boundary projection is performed, and the final control command is output and sent for execution.

[0015] The beneficial effects of this invention are as follows: This invention introduces a Tree-LSTM network to construct a multimodal contextual cognitive tree and incorporates a multi-agent continuous arbitration algorithm into intention decision-making. Through a first-order dynamic approximation equation, the zero-sum conflict between a child's immediate play intention and the system's preset task is resolved. It abandons the rigid state machine interruption logic of traditional robots, making the robot's transitions between different task states as smooth as a fluid, eliminating step-like jumps in motor control commands.

[0016] Addressing the industry pain point of stiff movements in low-cost micro servo motors, this invention innovatively constructs a dynamic compliance mapping mechanism based on physical energy fields. It directly mathematically maps the energy characteristics of a child's movements, such as static reading or vigorous shaking, to the physical fluid viscosity parameters of the robot's second-order impedance control layer. When a child is in a static, focused state, the system damping increases, giving the robot's limbs a slow, disturbance-resistant, steady-state reading experience; when a child is in a dynamic, playful state, the system damping resets to zero, exhibiting a crisp and responsive interaction. This endows inexpensive microcontroller-driven hardware with advanced physical compliance control capabilities.

[0017] This invention incorporates an absolute safety envelope at the underlying command output level, encompassing spatial anti-pinch and temporal auditory anti-frightening mechanisms. Through a forced boundary projection operator, it intercepts and corrects any angular velocity or decibel commands generated by the algorithm that violate physical safety standards. Regardless of how the upper-level interaction model experiences numerical mutations due to a child's abnormal actions, this safety envelope ensures that the robot will absolutely not cause physical pinching or auditory fright to children under any circumstances, thus constructing a robust underlying safety interaction barrier. Attached Figure Description

[0018] Figure 1 This is a basic flowchart illustrating the interactive analysis system of an AI child companion robot, as provided in one embodiment of the present invention.

[0019] Figure 2 This is a basic flowchart illustrating an interaction analysis method for an AI child companion robot, provided as an embodiment of the present invention. Detailed Implementation

[0020] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.

[0021] Reference Figure 1 As an embodiment of the present invention, an interaction analysis method for an AI child companion robot is provided, comprising the following steps: Step S1: Collect interaction data, construct a contextual cognition tree through a tree-like long short-term memory network, and extract the structured state vector corresponding to the scene; Step S2: Calculate the degree of intent conflict between the preset target task and the child's interactive intent. Based on the structured state vector and the degree of intent conflict, solve the actual behavior weight coefficient through a first-order dynamic approximation equation, and generate preliminary behavior execution instructions based on the actual behavior weight coefficient. Step S3: Extract the motion energy features from the interaction data and calculate the physical fluid viscosity parameters using the energy viscosity mapping function; Step S4: Input the initial behavior execution command and physical fluid viscosity parameters into the second-order impedance control equation, and perform smooth trajectory calculation through discrete numerical integration to output the smooth target angle trajectory vector; Step S5: Construct an absolutely safe envelope space that decouples the spatial boundary conditions and the temporal boundary conditions. Input the smooth target angular trajectory vector and the audio output decibel scalar into the absolutely safe envelope space, perform boundary projection, output the final control command, and issue it for execution.

[0022] Step S1 specifically includes: Interaction data includes human motion amplitude data, posture interaction data, and robot state data; The interaction data is aligned according to the timestamp, and the aligned data is mapped to the node features of the context cognition tree. The root node of the context cognition tree is the current time point, the middle nodes are robot state data, and the leaf nodes are human motion amplitude data and posture interaction data. The contextual cognition tree is input into a pre-trained tree-like long short-term memory network for bottom-up topological information aggregation and forward propagation computation, outputting a structured state vector.

[0023] In this embodiment, a visual camera is used to collect human motion amplitude data, a gyroscope is used to collect posture interaction data, and robot state data output from the internal system clock is extracted. Human motion amplitude data includes displacement velocity vectors of key skeletal points in children, rate of change of human bounding box area, and energy characteristics of high-frequency visual optical flow field; Among them, the displacement velocity vector of the child's skeletal key points is the rate of change of Euclidean distance between the key points of the child's wrist, shoulder and head in two consecutive frames, which is extracted by a lightweight human posture estimation algorithm and used to characterize the intensity of the child's movements. The rate of change of the human bounding box area is the first derivative of the area of ​​the detection box of the child within the camera's field of view (FOV) with respect to time, which is used to physically characterize whether the child is rapidly approaching or moving away from the robot. The high-frequency visual optical flow field energy feature is the average amplitude of the optical flow field calculated based on consecutive image frames. It is specifically designed to capture the amplitude of irregular high-frequency movements of children in unstructured scenes (such as waving or jumping).

[0024] Attitude interaction data refers to the passive force interaction data perceived by the robot's built-in sensors, including the three-axis transient angular velocity vector, the three-axis acceleration change characteristics, and the real-time Euler angle attitude matrix; Among them, the three-axis transient angular velocity vector is used to record the real-time rotation rate of the robot around the X, Y, and Z axes when it is played with or twisted by a child, and is used to distinguish between touching, twisting and violent shaking behaviors; The three-axis acceleration abrupt feature includes recording the linear acceleration impulse generated by the robot body in space, which is used to extract the physical interaction features with impact such as throwing, falling and slapping. The real-time Euler angle pose matrix records the robot's current spatial pose and is used to identify whether the robot is in a special physical interaction state such as being picked up, pushed over, or upside down.

[0025] Robot status data includes the current operating mode identifier, preset task execution progress value, and accumulated continuous active timestamps. The current operating mode identifier includes the current system task enumeration value represented in discrete one-hot encoding form, including reading mode, sleep guidance mode and standby mode; The preset task execution progress value includes the normalized value of the current active task's lifecycle, such as whether it is at 10% or 90% of the sleep guidance audio playback, which is used to represent the sunk cost of interrupting the current task. The cumulative active timestamp is the total time of high-frequency interaction since the robot was woken up, used to help assess a child's excitement threshold and fatigue state.

[0026] Aligning interactive data according to timestamps specifically includes: extracting the original timestamps attached to human motion amplitude data, posture interaction data, and robot state data; setting a global reference sampling period constant, preferably set to 10 milliseconds; using the global reference sampling period constant as the reference time axis; resampling data points that do not fall accurately on the reference time axis using a linear interpolation algorithm; and strictly aligning all interactive data according to the same time step to generate a time-aligned interactive data sequence.

[0027] Mapping time-aligned interactive data sequences to node features of a context-aware tree involves the following process: In Euclidean space, construct a contextual cognition tree with a three-layer hierarchical unidirectional topology, including a leaf node layer, an intermediate node layer, and a root node layer: The leaf node layer includes motion amplitude nodes and pose interaction nodes. It inputs time-aligned human motion amplitude data into the first linear fully connected layer, mapping it to a dimension of . The first leaf node feature vector is used to input the time-aligned pose interaction data into the second linear fully connected layer, mapping it to a dimension of... The second leaf node feature vector, where d is a preset feature embedding space dimension constant, preferably 256; The intermediate node layer includes robot state nodes, which input time-aligned robot state data into the third linear fully connected layer, mapping it to a dimension of [dimensional value missing]. The feature vector of the intermediate node; The root node layer includes the current time node. It extracts the numerical value corresponding to the current time point and maps it to a dimension of using a sinusoidal position encoding function. The root node feature vector.

[0028] In terms of topological connections, unidirectional directed communication edges are established from the feature vectors of the first leaf node and the second leaf node to the feature vectors of intermediate nodes, and from the feature vectors of intermediate nodes to the feature vectors of the root node, thus obtaining a contextual cognitive tree instantiated from the graph structure. The relationships between nodes are the naturally generated relationships between interactive data.

[0029] Tree-LSTM is a branch of recurrent neural networks that processes graph topologies. It inputs the contextual cognitive tree into a pre-trained tree-LSTM network for bottom-up topological information aggregation and forward propagation computation. The process specifically includes: For any node j in the contextual cognition tree, the computational expressions for information aggregation and state update include a system of partial differential nonlinear matrix equations, the mathematical expressions of which are: ; ; ; ; ; ; ; in, This is the node index variable currently being calculated. Let k be the set of indices of all child nodes contained in node j, and k be the set of indices belonging to the child nodes. The specific child node index variable, The hidden state vector output by child node k has a data dimension of . , The aggregate vector of hidden states of child nodes collected for node j, with data dimension . , The input feature vector for node j itself is the mapped feature vectors of the leaf nodes, intermediate nodes, and root node, with a data dimension of [missing information]. , The input gating vector is used to control the weights of the current input information, and the data dimension is... , The forgetting gating vector is used to control the proportion of historical information forgotten for a specific child node k. The data dimension is... , The output gating vector, which controls the output weights of the current cell state, has a data dimension of [missing information]. , Let be the candidate cell state vector at the current time step, with data dimensions of . , The cell state vector passed to child node k has a data dimension of , Let be the final cell state vector updated after gating of node j, with data dimension . , Let be the final output hidden state vector of node j after output gating filtering, with data dimension . , It is the Sigmoid activation function operator. The hyperbolic tangent activation function operator. The Hadamard product operator for vectors is the element-wise multiplication operation. , , , Input features The corresponding network weight matrix has a data dimension of 1. , , , , These are the hidden aggregation states. The corresponding network weight matrix has a data dimension of 1. , , , , These are the network bias term constant vectors for the corresponding equations, with all data dimensions being [missing information]. .

[0030] In this embodiment, since the contextual cognition tree of the present invention adopts a strict bottom-up topological calculation path, the state of node j can only be triggered after the states of all its child nodes k have been calculated. and The final hidden state vector and the final cell state vector are output by child node k after it has executed the same set of 7 matrix equations as the current node j at its own time step.

[0031] For leaf nodes, since they have no lower-level child nodes, their corresponding child node set C(j) is empty. When performing forward computation on them, the aggregate vector of their collected hidden child node states is... and the cell state vector passed by the child nodes All are forcibly initialized to zero vectors, consisting entirely of their own input feature vectors. This layer is generated independently through a gating mechanism. and and take it as and Pass it to the upper intermediate node layer.

[0032] The process of obtaining the weight matrix and bias term vector includes: We constructed a Tree-LSTM topology model identical to that of the robot using a large-scale, high-performance GPU cluster. We collected a quadruple dataset including human motion amplitude data, posture interaction data, robot state data, and intent labels. We then used a backpropagation algorithm based on a time tree structure, with cross-entropy as the loss function, and performed thousands of iterations of gradient descent calculations on the parameters in the matrix through the Adam optimizer.

[0033] Once the loss function converges to the set minimum value, training stops. All converged weight matrices and bias term vectors are then quantized with INT8 precision and burned into the ROM or Flash memory of the robot's main control chip. In the real-time interactive analysis forward propagation stage of step S1, the main control chip's NPU or CPU simply calls these fixed constant matrices and performs matrix multiplication and addition physical operator operations with the time-aligned feature vectors acquired in real-time. This transforms the computationally demanding deep learning into ultra-fast matrix forward inference suitable for low-power microcontrollers.

[0034] In the bottom-up forward propagation computation, the sequential logic includes: The leaf node layer computation logic includes: using the feature vectors of the first leaf node and the feature vectors of the second leaf node as... The input is the aggregate vector of the hidden states of the leaf nodes, since the leaf nodes have no child nodes. Forced to be set to zero vector, substituted into the above calculation expression, the hidden state vectors of the first leaf node and the second leaf node are output, and together with the corresponding cell state vectors, they are passed along the directed edge to the intermediate node.

[0035] The intermediate node layer computation logic includes: using the feature vectors of intermediate nodes as... Input: The set C(j) contains two leaf nodes. Substitute them into the above calculation expression, and the information fusion is performed by the intermediate node. Output the hidden state vector of the intermediate node and the cell state vector of the intermediate node, and pass them to the root node along the directed edge.

[0036] The root node layer computation logic includes: using the root node feature vector as... Input: At this point, the set C(j) contains only one intermediate node. Substitute it into the above calculation expression for final aggregation, and calculate the root node's final output hidden state vector.

[0037] Extract the hidden state vector of the root node and output it as a structured state vector.

[0038] It should be noted that when processing multi-source heterogeneous data such as interactive data, robot state data, and time data, the existing technology directly concatenates all one-dimensional features and feeds them into a common multilayer perceptron (MLP) or a standard long short-term memory (LSTM) network. This crude sequence flattening process completely destroys the hierarchical relationship of the data in the real physical world, making the model prone to feature confusion and overfitting.

[0039] This invention innovatively establishes a tree-like topological hierarchical model of timestamps, robot internal states, and children's external physical actions. Heterogeneous interactive data is mounted on different levels of the contextual cognition tree, and a rigorous bottom-up information aggregation is performed using a Tree-LSTM long short-term memory network. Forgetting gating vector. Designed to perform independent calculations for each individual child node, the network can accurately determine whether the current state of the robot needs to ignore a child's invalid movement. This technique perfectly preserves the spatiotemporal logical progression of multimodal data, and the resulting structured state vectors possess strong resistance to noise interference, laying a solid mathematical foundation for subsequent accurate intent arbitration.

[0040] Step S2 specifically includes: The degree of intent conflict is calculated based on the expected action vector of the first robot corresponding to the preset target task and the expected action vector of the second robot corresponding to the child's interaction intent. The structured state vector and the degree of intent conflict are input into a nonlinear activation function to obtain continuous target behavior weight coefficients. A first-order dynamic approximation equation is constructed. The logic of the first-order dynamic approximation equation is: the product of the first derivative of the actual behavior weight coefficient with respect to time and the smoothing time constant is equal to the difference between the target behavior weight coefficient and the actual behavior weight coefficient. Solve the first-order dynamic approximation equation to obtain the actual behavior weight coefficients at the current moment, and use the actual behavior weight coefficients to perform a weighted summation calculation on the expected action vector and the desired action vector to obtain the preliminary behavior execution instructions.

[0041] In this embodiment, the preset target tasks are issued by the current background process. The preset target tasks include timed sleep guidance tasks, learning reminder tasks, daily companionship and comfort tasks, posture correction tasks, and weather broadcast tasks. Based on structured state vectors, the current child's interaction intentions are identified. The child's interaction intentions include active play and shaking intentions, seeking comfort and hugs, touching and interacting intentions, and resisting and pushing away intentions, which are determined by multimodal data based on the YOLO algorithm. The structured state vector and the intent conflict degree are concatenated as features and input into the fourth linear fully connected layer for dimensionality reduction and fusion. The non-linear activation function Sigmoid is then input to obtain continuous target behavior weight coefficients.

[0042] The mathematical expression for the first-order dynamic approximation equation is: ; in, The smoothing time constant is in seconds. The first derivative of the actual behavior weight coefficient with respect to time. The target behavior weight coefficient, This refers to the actual behavior weight coefficient, which is the final weight allocation value adopted by the system.

[0043] Since the microprocessor of the edge inference device operates in the discrete-time domain, the above first-order dynamic approximation equation is discretized using the forward Euler method, resulting in a discrete update difference equation, the mathematical expression of which is: ; in, The actual behavior weight coefficients are obtained by solving for the current time step t. These are the actual behavior weight coefficients saved at the previous time step t-1. The preferred step size for the basic control cycle is 10ms. The target behavior weight coefficient is calculated at the current time step t.

[0044] The calculation expression for the initial action execution instruction is: ; in, The initial output behavior is executed as an instruction vector, with a data dimension of [missing information]. , Let the second robot's desired motion vector be... Let M be the expected motion vector of the first robot, where M is the motion space dimension constant of the end effector, preferably 7, and includes the coordinates and attitude quaternions of the end effector in three-dimensional space. Specifically, the optimal setting of the smoothing time constant in the first-order dynamic approximation equation needs to be verified through a large amount of real-machine interactive training. The smoothing time constant determines the evolution rate of the actual behavior weight coefficient, and its value selection directly affects the naturalness of the robot's interaction.

[0045] Referring to Table 1, which shows the training and validation results of the smoothing time constant, the preferred fixed value of the smoothing time constant is 0.5 seconds. Once the smoothing time constant surpasses the golden inflection point of 0.5 seconds, the instruction step abruption rate enters a saturation plateau, dropping below 2.1%, and the naturalness score of the action reaches its peak of 0.94. However, as the constant continues to surge to 2.00 seconds and 5.00 seconds, the system exhibits severe response lag. At 5.00 seconds, due to the over-smoothing effect of the first derivative constraint, the child's immediate interactive intent is forcibly washed away and masked by mechanical equations, causing the robot's intent switching consistency to plummet to 51.2%, making the robot appear extremely sluggish. Therefore, 0.5 seconds was chosen as the optimal smoothing time constant, allowing the model to balance high sensitivity of intent switching with absolute smoothness of action execution.

[0046] It should be noted that traditional dual-source control usually uses simple if-else threshold switching, which causes the robot motor commands to jump instantaneously, resulting in severe mechanical jerking and unpredictable dangers.

[0047] Step S2 of this invention introduces intention conflict quantification and a first-order dynamic approximation equation to transform discrete logical judgments into a standard spring-damped first-order inertial system in physics. Even if a child suddenly exerts force to interrupt the sleep guidance task being performed by the robot, the initial behavioral execution instructions output by the system are completely smooth and differentiable. This mechanism ensures the absolute smoothness of multi-subject collaborative arbitration and the safety of mechanical operation from a mathematical perspective.

[0048] The specific logic for obtaining intent conflict level includes: A children's standard movement mapping database is constructed through big data collection. The children's standard movement mapping database includes children's interactive intentions and their corresponding preset target tasks, human body movement amplitude data, posture interaction data, robot state data, and robot standard movement instruction data. The robot standard movement instruction data includes the end effector's three-dimensional coordinates and posture quaternions. Input the preset target task into the children's standard action mapping database, find all the corresponding robot standard action instruction data, and perform one-dimensional feature expansion and splicing on all robot standard action instruction data to obtain the first robot expected action vector. Input the child's interactive intention into the child's standard action mapping database, find all the corresponding robot standard action instruction data, and perform one-dimensional feature expansion and splicing on all robot standard action instruction data to obtain the second robot expected action vector. Among them, the data dimensions of the expected motion vector of the first robot and the expected motion vector of the second robot are strictly consistent, both being M×1 column vectors; Based on the expected motion vector of the first robot and the desired motion vector of the second robot, the position distance and the attitude angular distance are weighted and summed to obtain the intention conflict degree.

[0049] In this embodiment, for example, when a child interacts with the robot, the intention to actively play with or shake the robot triggers the robot to follow the sway; the intention to seek comfort or a hug triggers the robot to lean forward and hug; the intention to touch and interact triggers the robot to raise its head and simulate the enjoyment of the action; and the intention to resist or push away triggers the robot to back away and retract its limbs.

[0050] Extract the preset end effector position vector and preset attitude quaternion from the first robot's expected action vector corresponding to the preset target task. Extract the expected end effector position vector and expected attitude quaternion from the second robot's expected action vector corresponding to the child's interactive intention. Calculate the intention conflict degree by weighted summing of the position distance and attitude angular distance. The mathematical expression is as follows: ; in, For the degree of conflict of intent, This is the preset end effector position vector corresponding to the preset target task. This is the expected end-effector position vector corresponding to the child's interactive intent. For Euclidean norm operators, The preset attitude quaternion is the preset attitude quaternion corresponding to the preset target task. The expected pose quaternion corresponding to the child's interactive intention. The inverse cosine function operator is used to calculate the attitude angular distance. The preset location distance weighting coefficient is preferably [1, 20]. The preset attitude distance weighting coefficient, preferably [0.01, 0.5], is used for dimension conversion.

[0051] Step S3 specifically includes: The root mean square value of human motion amplitude data and posture interaction data is calculated as the motion energy feature at the current moment. Based on the different physical intervals in which the motion energy feature is located, the corresponding physical fluid viscosity parameters are output according to the energy viscosity mapping function.

[0052] In this embodiment, the mathematical expression for the root mean square value is: ; in, Calculate the output motion energy characteristics at the current moment. This represents the total number of discrete data frames. For data frame time index variables, Let k be the magnitude of the human motion amplitude data corresponding to the k-th frame. Let k be the magnitude of the pose interaction data corresponding to the k-th frame. and These are the pre-defined first normalized weighting coefficient and second normalized weighting coefficient, respectively. The first normalized weighting coefficient... The second normalized weighting coefficient is used to map the virtual motion displacement changes extracted by the image sensor to virtual kinetic energy rate, preferably within the range of [0.1, 5]. The angular velocity read from the gyroscope is used to convert the moment of inertia into kinetic energy, preferably within the range of [0.01, 1].

[0053] The piecewise logic of the energy viscosity mapping function includes: When the motion energy characteristic is less than or equal to the first energy threshold, the physical fluid viscosity parameter is assigned a high viscosity constant through the energy viscosity mapping function; When the motion energy characteristic is greater than the second energy threshold, the physical fluid viscosity parameter is assigned to zero through the energy viscosity mapping function; When the motion energy characteristic is greater than the first energy threshold and less than or equal to the second energy threshold, linear interpolation is used for output.

[0054] In this embodiment, the mathematical expression for the energy viscosity mapping function is: ; in, The output is the physical fluid viscosity parameter. As a characteristic of action energy, The first energy threshold, It is the second energy threshold, and , The high viscosity constant is a preset value, a fixed positive real number, preferably 0.8; First energy threshold Second energy threshold The first energy threshold was determined through experimental calibration. The child was placed in a static reading state, flipping through pictures and sitting quietly. Motion energy characteristics were continuously collected over 5 minutes, and the 95th quantile of its probability distribution was extracted. This energy amplitude was defined as the first energy threshold. , used to determine the maximum boundary of static behavior; Second energy threshold To encourage children to perform high-frequency, vigorous play actions with the robot, tests were conducted involving vigorous shaking and throwing, with continuous data collection. The energy characteristics of the movements were collected over a 5-minute period, and the 5th quantile of its probability distribution was extracted; this energy amplitude was defined as the second energy threshold. It is used to determine the starting boundary of high-frequency active behavior.

[0055] Substitute the current motion energy characteristics into the energy viscosity mapping function for solution and determination: When the motion energy characteristic is less than the first energy threshold, such as less than 10, it indicates that the child is in a static state of focus or a low-frequency activity state. By using the energy viscosity mapping function, the physical fluid viscosity parameter is assigned a high viscosity constant, which enables the robot to have strong anti-disturbance ability and slow and gentle micro-motion characteristics in subsequent control.

[0056] When the motion energy characteristic is greater than the second energy threshold, such as greater than 50, it indicates that the child is in a dynamic and active state or a high-frequency play state. The physical fluid viscosity parameter is assigned to zero through the energy viscosity mapping function, so that the robot can completely release the damping in subsequent control, and the motion performance is crisp, neat and highly agile following characteristics.

[0057] When the motion energy characteristic is greater than the first energy threshold and less than or equal to the second energy threshold, linear interpolation is used for output. The formula shows that the physical fluid viscosity parameter strictly linearly decreases from a high viscosity constant to zero as the child's motion energy characteristic gradually increases.

[0058] The first and second energy thresholds are dimensionless activity thresholds.

[0059] It should be noted that traditional robot servo control often uses PID controllers with fixed parameters. Regardless of changes in the external interactive environment, its damping coefficient D remains constant. This static control causes the robot to appear overly active in quiet environments, while it appears sluggish in response to children's active play, resulting in a strong sense of mechanical incongruity.

[0060] In step S3 of this application, a complete continuous piecewise mapping mathematical model is established between the calculated root mean square value of the child's motion energy and the fluid viscosity parameter in the control theory. By introducing a linear interpolation transition band constructed from a first energy threshold and a second energy threshold, a mathematically continuous damping gradient can be provided between the two extreme states of static focus and dynamic manipulation, i.e., the continuous differentiability of the physical fluid viscosity parameter. This ensures that no sudden torque change that would cause the motors to overheat occurs when the robot changes its behavior.

[0061] This step endows the miniature desktop robot with advanced biomimetic characteristics from a mathematical foundation. The quieter the child, the more steadily and gently the robot moves, as if it were immersed in a thick fluid, naturally exuding the emotional value of companionship and comfort. The more excited and lively the child, the more the robot's fluid viscosity is instantly drained, and its movements become agile and lively, achieving a realistic sense of emotional resonance with the robot.

[0062] Step S4 specifically includes: The initial behavior execution instructions are converted into target joint angle vectors for each joint. The difference between the target joint angle vector and the current actual joint angle vector is calculated to obtain the angle deviation vector. Construct a second-order impedance control equation, using the angular deviation vector as input, and solve for the virtual angular displacement vector. The logic of the second-order impedance control equation includes: the sum of the inertial force term, the damping force term, and the stiffness restoring force term, which is equal to the virtual excitation torque represented by the angular deviation vector after dimensional transformation; The inertial force term is the product of the virtual inertial matrix and the second-order time derivative of the angular deviation vector; The damping force term is the product of the dynamic damping matrix and the first-order time derivative of the angular deviation vector; The stiffness restoring force term is the product of the virtual stiffness matrix and the angular deviation vector; The diagonal elements of the dynamic damping matrix are directly proportional to the viscosity parameters of the physical fluid.

[0063] In this embodiment, the coordinates and attitude quaternions of the three-dimensional end effector in the initial behavior execution command are extracted. These coordinates and attitude quaternions are then input into a pre-established inverse kinematics model of the robot entity. Using a pseudo-inverse iterative algorithm based on the Jacobian matrix, the target rotation angles corresponding to each physical servo are calculated. The target rotation angles of all physical servos are then arranged in a fixed index order, generating a model with dimension [missing information]. The target joint angle vector, where N is the total number of physical joints of the robot.

[0064] The angular deviation vector represents the virtual excitation force from the external input; Construct a second-order impedance control equation, using the angular deviation vector as input, and solve for the state variables after impedance filtering, i.e., the virtual angular displacement vector. The mathematical expression for the second-order impedance control equation is: ; in, For virtual inertia matrix, For dynamic damping matrix, For virtual stiffness matrix, This is the virtual angular displacement vector, i.e., the solution state variable of the impedance system. This is the first-order time derivative of the virtual angular displacement vector, i.e., the virtual angular velocity. This is the second-order time derivative of the virtual angular displacement vector, i.e., the virtual angular acceleration. This is a pre-defined diagonal matrix for dimension transformation, used to map purely geometric angular deviation vectors into virtual excitation torques with dynamic dimensions. The angular deviation vector; It should be noted that the second-order impedance control equation is used to output the virtual angular displacement vector of the state variable x(t) after it has been filtered by the impedance system.

[0065] The inertial force term is the product of the second-order time derivative of the virtual inertial matrix and the virtual angular displacement vector. The virtual inertial matrix... For the preset N An N-dimensional positive definite diagonal matrix is ​​used to limit the maximum angular acceleration of each joint at the moment of start-up and stop to prevent sudden motion changes. Its diagonal elements represent the virtual mass of each joint. For the damping force term, is the product of the dynamic damping matrix and the first-order time derivative of the virtual angular displacement vector; The diagonal elements of the dynamic damping matrix are directly proportional to the viscosity parameters of the physical fluid, and their calculation expression is as follows: ; in, For dynamic damping matrix, For physical fluid viscosity parameters, The data dimension is a pre-calibrated reference damping diagonal matrix. The diagonal data represents the critical damping value for each joint of the robot. Through this direct proportional mapping relationship, the child's motion energy characteristics are directly and in real time coupled to the mechanical damping characteristics of the robot's kinematics underlying layer.

[0066] The stiffness restoring force term is the product of the virtual stiffness matrix and the virtual angular displacement vector. The virtual stiffness matrix... For the preset N An N-dimensional positive definite diagonal matrix used to control the spring restoring force when the joint reaches the target position.

[0067] A smooth target angular trajectory vector is generated by numerically integrating the second-order impedance control equation. The specific process includes: The second-order impedance control equations are reduced in order to a first-order state-space equation system. The transformation process includes: The virtual angular displacement vector and its first-order time derivative are combined to obtain the joint state vector. The time derivative of the joint state vector is taken and substituted into the second-order impedance control equation to construct a first-order state-space equation system. Within each time step, the fourth-order Runge-Kutta algorithm is used to iteratively integrate the first-order state-space equations a fixed number of times, and the final joint state vector is output. Extract the first N elements from the joint state vector to obtain the updated virtual angular displacement vector at the current discrete moment. Add the virtual angular displacement vector to the current actual joint angle vector using an execution matrix to obtain the smooth target angular trajectory vector at the current moment.

[0068] In this embodiment, a smooth target angular trajectory vector is generated by numerically integrating the second-order impedance control equation. The specific process includes: Since microprocessors cannot directly solve second-order differential equations, the second-order impedance control equations need to be reduced in order and converted into a set of first-order state-space equations.

[0069] The virtual angular displacement vector x(t) and its first-order time derivative are combined to obtain the joint state vector. For a one-dimensional joint state vector Regarding the time derivative, combining the second-order impedance control equations, we construct a first-order state-space equation system, the mathematical expression of which is: ; ; in, The joint state vector has a data dimension of . N is the total number of physical joints of the robot. The position state subvector is equivalent to the virtual angular displacement vector. Data dimensions are , The velocity state vector is equivalent to the first-order time derivative of the virtual angular displacement vector. Data dimensions are , For state-space derivative function mapping operators, the output dimension is... , The inverse of the virtual inertia matrix has a data dimension of . , The input angular deviation vector has a data dimension of . , This is a pre-defined diagonal matrix with dimension transformation.

[0070] Through the above-mentioned order reduction calculation, the original complex dynamic system is transformed into a standard first-order ordinary differential equation, which is suitable for numerical integration operations of edge devices.

[0071] Set the system time away from the walk length The preferred setting is 10 milliseconds, a value that suits the physical control cycle of most servos. To ensure the absolute convergence and high-precision approximation of the impedance control numerical integral, and to avoid system divergence caused by low-frequency sampling, the step size is set at each time step. The fourth-order Runge-Kutta algorithm is used to iteratively integrate the first-order state-space equations a fixed number of times. The specific steps include: Let P be the fixed number of iterations for the alternating loop execution, preferably set to 20 times, and define the internal discrete integral microstep size. At the current time, a long walk During the integration period, let the iteration index variable m traverse from 0 to P-1, and cyclically execute the fourth-order Runge-Kutta difference formula, the calculation expression of which is: ; ; ; ; ; Where m is the loop iteration index variable, and its value range is an integer { }, where h is the internal discrete integral microstep size, in seconds. The joint state vector at the start of the m-th iteration. Let this be the joint state vector at the start of the (m+1)th iteration. Let be the slope vector of the function at the starting point of the integral microstep, with data dimension . , , Let be the slope vector of the approximate function at the midpoint of the integral microstep, with data dimension . , Let be the slope vector of the function at the endpoint of the integral microstep, with data dimension . ; After completing P iterations, output the final joint state vector. ,extract The first N elements in the vector are used to obtain the updated virtual angular displacement vector x(t) at the current discrete moment, which represents the compliant displacement increment generated after the command is filtered by the hydrodynamic impedance.

[0072] The virtual angular displacement vector x(t) is added to the current actual joint angle vector using an execution matrix to obtain the smooth target angle trajectory vector at the current moment. The generated smooth target angle trajectory vector completely eliminates any possible step abrupt changes and mechanical jitter factors in the original target angle. It is then used as a safety inspection command and output to step S5 for absolute safety boundary constraints.

[0073] Traditional robots typically use a simple first-order Euler method for direct integration when dealing with differential kinematic equations. However, when the damping term of the system changes drastically, such as when the fluid viscosity parameter introduced in this invention instantly drops to zero or spikes, the simple Euler method is prone to accumulating truncation errors, leading to trajectory divergence or even causing the motor system to collapse and twitch.

[0074] This invention creatively incorporates deep, micro-step-size, high-order Runge-Kutta iterations within each macro-control cycle. To demonstrate the rationality and superiority of setting the fixed number of iterations to 20, detailed trajectory smoothing tracking experiments were conducted for verification. Referring to Table 2, the training and validation test table for the number of iterations of the fourth-order Runge-Kutta integral is as follows: As shown in Table 2, when the number of iterations within the microstep is less than 5, the trajectory truncation error is as high as 4.18%, which is at the divergence or critical edge and cannot present a smooth biomimetic fluid feel. When the number of iterations exceeds the golden inflection point of 20, the trajectory truncation error has converged to the extreme plateau period of 0.03%, and the biomimetic compliance fitting rate is as high as 96.6%.

[0075] However, blindly increasing the number of iterations to 50 or 100 yields negligible improvement in error convergence, reducing it only from 0.03% to 0.02%, and the single-calculation latency of the module spikes to 22.1ms and 43.5ms respectively, since the macroscopic communication baseline period of the hardware is only 10ms. At this point, the calculation time has far exceeded the physical control cycle, causing communication congestion and timeout frame drops on edge devices.

[0076] Therefore, this invention strictly limits the number of alternating loops to a fixed 20 times. This constraint ensures high-precision convergence of the fourth-order ordinary differential equation while perfectly suppressing the computational latency to 9.4ms, achieving absolute performance optimization under limited end-side computing power.

[0077] It should be noted that existing low-cost children's robots, especially those using SG90 miniature inexpensive servo motors, typically employ a closed-loop direct control mode. In this control method, the motors always rush towards the target position with maximum mechanical power, resulting in a severely stiff, broom-like motion and a high-frequency vibration due to mechanical inertia upon reaching the target position.

[0078] This invention innovatively incorporates a second-order impedance control model before the command is issued. Any abrupt command, such as requiring the head to rotate 90 degrees instantaneously, must pass through a layer of impedance control. , , The equation mathematically forces the massless command signal to possess inertia and resistance, resulting in the output smooth target angle trajectory vector exhibiting a gentle acceleration / deceleration curve S-shaped velocity planning characteristic that conforms to Newtonian mechanics, thus eliminating mechanical vibration.

[0079] Existing companion robots typically express emotions by playing different sounds or changing screen animations. The parameters of their physical body movements remain static and rigid, failing to create a deep and immersive interactive experience.

[0080] In step S4 of this invention, the energy of the child's movements perceived by the upper layer is cleverly injected as a variable into the partial differential motion equation of the lower layer through the dynamic damping matrix calculation formula.

[0081] When a child is quiet and depressed As the impedance increases, the damping force term in the impedance equation increases dramatically. The slope of the trajectory x(t) obtained by integration is severely suppressed, making the robot appear as if it is stuck in mud, with extremely slow and gentle movements, physically exuding a cautious and prudent sense of reassurance. Conversely, the damping disappears, and the movements are crisp and agile. This technical approach of achieving closed-loop coupling between macroscopic scene cognition and microscopic motor dynamic parameters is completely absent in existing children's electronic toys and smart home appliances, constructing a very deep technical barrier.

[0082] Step S5 specifically includes: An absolutely secure envelope space is constructed, which is obtained by decoupling and combining spatial boundary conditions and temporal boundary conditions. The expected angular velocity vector is obtained by calculating the first-order time difference corresponding to the smoothed target angular trajectory vector. Spatial boundary conditions include: all components in the expected angular velocity vector are less than or equal to the maximum safe angular velocity constant; The time boundary conditions include: the audio output decibel scalar is less than or equal to the nighttime airborne sound decibel constant; When any component in the expected angular velocity vector is greater than the maximum safe angular velocity constant, the spatial boundary projection operation is triggered, forcibly truncating the component exceeding the maximum safe angular velocity constant to the maximum safe angular velocity constant, and reconstructing it based on the integral of the truncated expected angular velocity vector to generate the final control command and send it to the robot servo actuator unit. When the current system time is within the nighttime sleep period defined by the time boundary conditions, the time boundary projection operation is triggered, which forcibly truncates the audio output decibel scalar of the system audio output command to within the nighttime air sound decibel constant, and generates the final control command to be sent to the audio output unit. If the spatial boundary projection operation and the temporal boundary projection operation are not triggered, the smoothed target angular trajectory vector will be directly converted into the final control command and executed.

[0083] Step S51, construct the absolutely secure envelope space, whose set mathematical definition is: ; ; ; in, For an absolutely secure envelope space set, For the Cartesian product operator, For the set of spatial boundary conditions, For the time boundary condition set, Let be any angular velocity vector. Let i be the i-th component of the angular velocity vector. The maximum safe angular velocity constant is set to a preset value. A is the audio output decibel scalar. The current system time. This is a dynamic decibel threshold function with the current system time as the independent variable. For N-dimensional real space, Let be the set of all real numbers.

[0084] The dynamic decibel threshold function includes: taking the maximum allowable volume of 80dB during the daytime from 8 am to 9 pm, taking the maximum allowable volume of 40dB during the nighttime sleep period from 10 pm to 7 am, and taking a continuous linear smooth curve based on the cosine function for the time periods from 7 am to 8 am and from 9 pm to 10 pm.

[0085] The expected angular velocity vector is obtained by calculating the first-order time difference corresponding to the smoothed target angular trajectory vector using the first-order backward difference method. Its mathematical expression is as follows: ; in, Let be the expected angular velocity vector at the current moment, with data dimensions of . , This is the smooth target angle trajectory vector output at the current moment. This is the smoothed target angular trajectory vector saved at the previous discrete time step.

[0086] The expected angular velocity vector is input into the spatial boundary condition set for verification. The verification logic includes: When any component of the expected angular velocity vector exceeds the maximum safe angular velocity constant defined by the spatial boundary conditions, a spatial boundary projection operation is triggered, forcibly truncating the component exceeding the maximum safe angular velocity constant to the boundary of that constant, thus generating a corrected angular velocity vector. Its mathematical expression is: ; in, For symbolic functions, The i-th component of the expected angular velocity vector; Based on the truncated corrected angular velocity vector, inverse integration is performed to reconstruct the final safe target angular trajectory vector, whose mathematical expression is: ; The reconstructed final safe target angle trajectory vector is converted into a PWM duty cycle signal, which is then sent to the robot servo actuator as the final control command.

[0087] Extract current system time Extract the raw audio output decibel scalar from the system audio output command. Determine the current system time Whether the system is within a set nighttime sleep period, such as the preset 10:00 PM to 7:00 AM the next morning. When the current system time is determined to be within the nighttime sleep period, time boundary projection is triggered, forcibly truncating the original audio output decibel scalar to the set nighttime airborne sound decibel constant. Within a certain range, for example, a preset value of 40 decibels, its mathematical expression is: ; The truncated corrected audio output decibel scalar The encapsulation is used as the final control command to be sent to the audio output unit.

[0088] Within the same control cycle, if the expected angular velocity vector does not exceed the maximum safe angular velocity constant, and the system is not in the nighttime sleep period or the original output decibel of the system audio output command is not greater than the nighttime air noise decibel constant, the spatial boundary projection operator and the temporal boundary projection operator are not triggered. Stop the inverse integral reconstruction and truncation operations, and smooth the target angular trajectory vector. and the original audio output decibel scalar It is directly converted into final control commands and issued for execution.

[0089] It should be noted that the absolute safety envelope space constructed in step S5 of this application belongs to the final physical safety constraint layer in the system architecture. Its core design concept lies in the bottom-level veto system: only when the expected action or sound command substantially exceeds the safety boundary, i.e., spatial boundary conditions or temporal boundary conditions, will the forced truncation and inverse integration reconstruction mechanism of this layer be triggered. In normal, stable interaction scenarios, projection operations will not be triggered, and the command will be transmitted without loss. This mechanism not only ensures that the robot has an insurmountable safety bottom line, preventing algorithm crashes or uncontrolled erratic swinging caused by external forces, but also retains the biomimetic compliance calculated by the preceding steps, such as second-order impedance control, to the greatest extent within the safety range, achieving a perfect balance between safety and natural interaction.

[0090] It should be noted that most traditional AI child companion robots place safety judgment logic at the software application layer, relying on sensor thresholds for intervention. Once the upper-layer algorithm crashes, the sensor short-circuits and malfunctions, or the robot is subjected to a violent impact from a child, the underlying motors are very prone to outputting uncontrolled high-frequency PWM signals, causing them to swing wildly and resulting in pinching accidents.

[0091] Innovatively, step S5 of this invention inserts an absolutely secure envelope space based on mathematical projection operators at the very end of the instruction-driven register. This is equivalent to adding a physical-level security lock to the robot's digital nervous system. This mechanism is completely independent of the preceding contextual cognition and impedance calculation, and employs a veto system.

[0092] Reference Figure 1 As an embodiment of the present invention, an interaction analysis system for an AI child companion robot is provided. This system is used to execute an interaction analysis method for an AI child companion robot, comprising: The perception module is used to collect interaction data, construct a contextual cognition tree through a tree-like long short-term memory network, and extract the structured state vector corresponding to the scene. The intent module is used to calculate the intent conflict degree between the preset target task and the child's interactive intent. Based on the structured state vector and the intent conflict degree, it solves the actual behavior weight coefficient through a first-order dynamic approximation equation, and generates preliminary behavior execution instructions based on the actual behavior weight coefficient. The mapping module is used to extract motion energy features from interactive data and calculate the physical fluid viscosity parameters through the energy viscosity mapping function. The fluid biomimetic module is used to input the initial behavior execution instructions and physical fluid viscosity parameters into the second-order impedance control equation, and to perform smooth trajectory calculation through discrete numerical integration, and output a smooth target angle trajectory vector. The safe projection envelope module is used to construct an absolutely safe envelope space in which spatial boundary conditions and temporal boundary conditions are decoupled and combined. The smooth target angular trajectory vector and the audio output decibel scalar are input into the absolutely safe envelope space, the boundary projection is performed, and the final control command is output and sent for execution.

[0093] This invention introduces a Tree-LSTM network to construct a multimodal contextual cognitive tree and incorporates a multi-agent continuous arbitration algorithm into intention decision-making. Through a first-order dynamic approximation equation, it resolves the zero-sum conflict between a child's immediate play intention and the system's preset task. It abandons the rigid state machine interruption logic of traditional robots, making the robot's transitions between different task states as smooth as fluid, and eliminating step jumps in motor control commands.

[0094] Addressing the industry pain point of stiff movements in low-cost micro servo motors, this invention innovatively constructs a dynamic compliance mapping mechanism based on physical energy fields. It directly mathematically maps the energy characteristics of a child's movements, such as static reading or vigorous shaking, to the physical fluid viscosity parameters of the robot's second-order impedance control layer. When a child is in a static, focused state, the system damping increases, giving the robot's limbs a slow, disturbance-resistant, steady-state reading experience; when a child is in a dynamic, playful state, the system damping resets to zero, exhibiting a crisp and responsive interaction. This endows inexpensive microcontroller-driven hardware with advanced physical compliance control capabilities.

[0095] This invention incorporates an absolute safety envelope at the underlying command output level, encompassing spatial anti-pinch and temporal auditory anti-frightening mechanisms. Through a forced boundary projection operator, it intercepts and corrects any angular velocity or decibel commands generated by the algorithm that violate physical safety standards. Regardless of how the upper-level interaction model experiences numerical mutations due to a child's abnormal actions, this safety envelope ensures that the robot will absolutely not cause physical pinching or auditory fright to children under any circumstances, thus constructing a robust underlying safety interaction barrier.

[0096] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0097] The program code used to implement the methods of the present invention can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the program code causes the functions or operations specified in the flowcharts and / or block diagrams to be implemented. The program code can be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0098] In the context of this invention, a machine-readable medium can be a tangible medium that may contain or store a program for use by, or in conjunction with, an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include: electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0099] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer. The computer has: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0100] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet. Computer systems can include clients and servers. Clients and servers are generally geographically distant and typically interact via communication networks. Client-server relationships are created by computer programs running on respective computers and having client-server relationships with each other. Servers can be cloud servers, servers for distributed systems, or servers incorporating blockchain technology.

[0101] It should be understood that the various forms of processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this invention can be achieved, and this is not limited herein.

[0102] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the principles of this invention should be included within the scope of protection of this invention.

Claims

1. An interaction analysis method for an AI child companion robot, characterized in that, Includes the following steps: Step S1: Collect interaction data, construct a contextual cognition tree through a tree-like long short-term memory network, and extract the structured state vector corresponding to the scene; Step S2: Calculate the degree of intent conflict between the preset target task and the child's interactive intent. Based on the structured state vector and the degree of intent conflict, solve the actual behavior weight coefficient through a first-order dynamic approximation equation, and generate preliminary behavior execution instructions based on the actual behavior weight coefficient. Step S3: Extract the motion energy features from the interaction data and calculate the physical fluid viscosity parameters using the energy viscosity mapping function; Step S4: Input the initial behavior execution command and physical fluid viscosity parameters into the second-order impedance control equation, and perform smooth trajectory calculation through discrete numerical integration to output the smooth target angle trajectory vector; Step S5: Construct an absolutely safe envelope space that decouples the spatial boundary conditions and the temporal boundary conditions. Input the smooth target angular trajectory vector and the audio output decibel scalar into the absolutely safe envelope space, perform boundary projection, output the final control command, and issue it for execution.

2. The interaction analysis method for the AI ​​child companion robot as described in claim 1, characterized in that: Step S1 specifically includes: The interactive data includes human motion amplitude data, posture interaction data, and robot state data; The interaction data is aligned according to timestamps, and the aligned data is mapped to the node features of the context cognition tree. The root node of the context cognition tree is the current time point, the middle nodes are robot state data, and the leaf nodes are human motion amplitude data and posture interaction data. The contextual cognition tree is input into a pre-trained tree-structured long short-term memory network for bottom-up topological information aggregation and forward propagation computation, outputting a structured state vector.

3. The interaction analysis method for the AI ​​child companion robot as described in claim 2, characterized in that: Step S2 specifically includes: The degree of intent conflict is calculated based on the expected action vector of the first robot corresponding to the preset target task and the expected action vector of the second robot corresponding to the child's interaction intent. The structured state vector and the intention conflict degree are input into a nonlinear activation function to obtain continuous target behavior weight coefficients; A first-order dynamic approximation equation is constructed. The logic of the first-order dynamic approximation equation is: the product of the first derivative of the actual behavior weight coefficient with respect to time and the smoothing time constant is equal to the difference between the target behavior weight coefficient and the actual behavior weight coefficient. Solving the first-order dynamic approximation equation yields the actual behavior weight coefficients at the current moment. These coefficients are then used to perform a weighted summation of the expected action vector and the desired action vector to obtain the preliminary behavior execution instructions.

4. The interaction analysis method for the AI ​​child companion robot as described in claim 3, characterized in that: The specific logic for obtaining the intent conflict level includes: A children's standard movement mapping database is constructed by collecting big data. The children's standard movement mapping database includes children's interactive intentions and their corresponding preset target tasks, human body movement amplitude data, posture interaction data, robot state data, and robot standard movement instruction data. The robot standard movement instruction data includes the three-dimensional coordinates of the end effector and posture quaternions. Input the preset target task into the children's standard action mapping database, find all the corresponding robot standard action instruction data, and perform one-dimensional feature expansion and splicing on all robot standard action instruction data to obtain the first robot expected action vector. Input the child's interactive intention into the child's standard action mapping database, find all the corresponding robot standard action instruction data, and perform one-dimensional feature expansion and splicing on all robot standard action instruction data to obtain the second robot expected action vector. Based on the expected motion vector of the first robot and the desired motion vector of the second robot, the position distance and the attitude angular distance are weighted and summed to obtain the intention conflict degree.

5. The interaction analysis method for the AI ​​child companion robot as described in claim 4, characterized in that: Step S3 specifically includes: The root mean square value of human motion amplitude data and posture interaction data is calculated as the motion energy feature at the current moment. Based on the different physical intervals in which the motion energy feature is located, the corresponding physical fluid viscosity parameters are output according to the energy viscosity mapping function.

6. The interaction analysis method for the AI ​​child companion robot as described in claim 5, characterized in that: The piecewise logic of the energy viscosity mapping function includes: When the motion energy characteristic is less than or equal to the first energy threshold, the physical fluid viscosity parameter is assigned a high viscosity constant through the energy viscosity mapping function; When the motion energy characteristic is greater than the second energy threshold, the physical fluid viscosity parameter is assigned to zero through the energy viscosity mapping function; When the motion energy characteristic is greater than the first energy threshold and less than or equal to the second energy threshold, linear interpolation is used for output.

7. The interaction analysis method for the AI ​​child companion robot as described in claim 6, characterized in that: Step S4 specifically includes: The initial behavior execution instructions are converted into target joint angle vectors for each joint. The difference between the target joint angle vector and the current actual joint angle vector is calculated to obtain the angle deviation vector. Construct a second-order impedance control equation, using the angular deviation vector as input, and solve for the virtual angular displacement vector. The logic of the second-order impedance control equation includes: the sum of the inertial force term, the damping force term, and the stiffness restoring force term, which is equal to the virtual excitation torque represented by the angular deviation vector after dimensional transformation; The inertial force term is the product of the virtual inertial matrix and the second-order time derivative of the angular deviation vector; The damping force term is the product of the dynamic damping matrix and the first-order time derivative of the angular deviation vector; The stiffness restoring force term is the product of the virtual stiffness matrix and the angular deviation vector; The diagonal elements of the dynamic damping matrix are directly proportional to the physical fluid viscosity parameters.

8. The interaction analysis method for the AI ​​child companion robot as described in claim 7, characterized in that: A smooth target angular trajectory vector is generated by numerically integrating the second-order impedance control equation. The specific process includes: The second-order impedance control equations are reduced in order to a first-order state-space equation system. The transformation process includes: The virtual angular displacement vector and its first-order time derivative are combined to obtain the joint state vector. The time derivative of the joint state vector is calculated and substituted into the second-order impedance control equation to construct a first-order state-space equation system. Within each time step, the fourth-order Runge-Kutta algorithm is used to iteratively integrate the first-order state-space equations a fixed number of times, and the final joint state vector is output. Extract the first N elements from the joint state vector to obtain the updated virtual angular displacement vector at the current discrete moment. Add the virtual angular displacement vector to the current actual joint angle vector using an execution matrix to obtain the smooth target angular trajectory vector at the current moment.

9. The interaction analysis method for the AI ​​child companion robot as described in claim 8, characterized in that: Step S5 specifically includes: An absolutely secure envelope space is constructed, which is obtained by decoupling and combining spatial boundary conditions and temporal boundary conditions. The expected angular velocity vector is obtained by calculating the first-order time difference corresponding to the smoothed target angular trajectory vector. The spatial boundary conditions include: all components in the expected angular velocity vector are less than or equal to the maximum safe angular velocity constant; The time boundary conditions include: the audio output decibel scalar is less than or equal to the nighttime air sound decibel constant; When any component in the expected angular velocity vector is greater than the maximum safe angular velocity constant, the spatial boundary projection operation is triggered, forcibly truncating the component exceeding the maximum safe angular velocity constant to the maximum safe angular velocity constant, and reconstructing it based on the integral of the truncated expected angular velocity vector to generate the final control command and send it to the robot servo actuator unit. When the current system time is within the nighttime sleep period defined by the time boundary conditions, the time boundary projection operation is triggered, which forcibly truncates the audio output decibel scalar of the system audio output command to within the nighttime air sound decibel constant, and generates the final control command to be sent to the audio output unit. If the spatial boundary projection operation and the temporal boundary projection operation are not triggered, the smoothed target angular trajectory vector will be directly converted into the final control command and executed.

10. An interaction analysis system for an AI child companion robot, the system being used to execute an interaction analysis method for an AI child companion robot, characterized in that, include: The perception module is used to collect interaction data, construct a contextual cognition tree through a tree-like long short-term memory network, and extract the structured state vector corresponding to the scene. The intent module is used to calculate the intent conflict degree between the preset target task and the child's interactive intent. Based on the structured state vector and the intent conflict degree, it solves the actual behavior weight coefficient through a first-order dynamic approximation equation, and generates preliminary behavior execution instructions based on the actual behavior weight coefficient. The mapping module is used to extract motion energy features from interactive data and calculate the physical fluid viscosity parameters through the energy viscosity mapping function. The fluid biomimetic module is used to input the initial behavior execution instructions and physical fluid viscosity parameters into the second-order impedance control equation, and to perform smooth trajectory calculation through discrete numerical integration, and output a smooth target angle trajectory vector. The safe projection envelope module is used to construct an absolutely safe envelope space in which spatial boundary conditions and temporal boundary conditions are decoupled and combined. The smooth target angular trajectory vector and the audio output decibel scalar are input into the absolutely safe envelope space, the boundary projection is performed, and the final control command is output and sent for execution.

Citation Information

Patent Citations

  • Children early education robot interaction system

    CN121305942A