Body movement emotion recognition method of humanoid robot

By constructing a non -linear mapping model of the limb movement and emotional types of human robotics, and the optimization of the reverse propagation neural network and particle group algorithm, the problem of insufficient emotional identification of imitation human robot limbs in existing technologies has been solved. Accurate emotional expression has improved human -machine interaction effects.

CN119380414AActive Publication Date: 2025-01-28NANJING FORESTRY UNIV
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411514657.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-29
Publication Date
2025-01-28
Estimated Expiration
2044-10-29

AI Technical Summary

Technical Problem

The prior art has shortcomings in the recognition of body movements of humanoid robots, and it is difficult to match corresponding emotional needs, resulting in unnatural and accurate expression of body movements of humanoid robots.

Method used

The non -linear mapping method is used to build a mapping model of the body movement and emotional type of imitation of human robotics, and the emotional recognition and prediction of the body movement of imitation of human robotics by reverse the optimization model of neural networks and particle group algorithms.

Benefits of technology

The emotional understanding of people's limbs of the robot has been enhanced, the natural and accuracy of imitating the emotional expression of imitating people and robots, and improving the effect of human -computer interaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119380414A_ABST
    Figure CN119380414A_ABST
Patent Text Reader

Abstract

The invention discloses a humanoid robot body movement emotion recognition method, which comprises the following steps of: (1) emotion and body movement coding: respectively carrying out category coding, region coding, direction coding and mode coding on an emotion state and a humanoid robot body movement; a binary trigger mechanism is adopted to generate binary codes of the emotional state and the limb movement of the humanoid robot; (2) constructing a back propagation neural network topological structure; determining an activation function; obtaining a weight and an offset optimal solution of the neural network; training a neural network by taking the binary code of the limb action of the humanoid robot as neural network input and the binary code of the emotional state as neural network output; and (3) binary coding of predicted humanoid robot limb actions, binary coding input limb action emotion recognition and prediction emotion output. According to the nonlinear mapping calculation model method for the limb movement and the emotional state of the humanoid robot, the defects in the prior art are overcome, and emotional interaction between people and the robot can be further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of robots, and in particular to a method for identifying emotions in body movements of a humanoid robot. Background Art

[0002] With the rapid development of new generation information technology, humanoid robots are widely used in public life, public services, industrial production and other environments. Humanoid robots have a similar appearance to humans and need to have the ability to express emotions similar to humans. Its body movements can often express certain emotions just like human body movements. The emotions of robot body movements play an important role in enhancing the emotional interaction between humans and robots and enhancing emotional understanding. Especially at a long distance (that is, people cannot see the robot's expression or hear the robot's voice clearly, but can see the distance corresponding to the movements of the humanoid robot), the emotions expressed by body movements are easier to be perceived by people.

[0003] Body movements are an integral part of human emotional expression, and rich emotional information can be conveyed through body postures. Existing technologies still have obvious deficiencies in body movement emotion recognition. How to identify the emotional state expressed by body movements is a challenge. There is a lack of computational model support that reflects the body movements of humanoid robots and the corresponding emotional states, which makes it difficult to match the corresponding emotions when designing humanoid robot body movements, and it is also difficult to match the appropriate body movement expressions of humanoid robots for clear emotional needs.

[0004] In order to solve the above problems, it is necessary to propose an emotion recognition method for humanoid robot body movements, thereby enhancing people's emotional understanding of the robot's body movements, which can facilitate the interaction between people and humanoid robots at a long distance; enable humanoid robots to express emotions more naturally and accurately, and improve the effect of human-computer interaction. Summary of the invention

[0005] The technical problem to be solved by the present invention is to provide a method for identifying emotions through the body movements of a humanoid robot in response to the deficiencies of the above-mentioned prior art. The method for identifying emotions through the body movements of a humanoid robot constructs a nonlinear mapping between the body movements of the humanoid robot and the emotion types, thereby realizing the emotion recognition of the body movements of the humanoid robot, enhancing people's emotional understanding of the robot's body movements, and facilitating the interaction between people and humanoid machines.

[0006] In order to achieve the above technical objectives, the technical solution adopted by the present invention is:

[0007] A method for identifying body movements and emotions of a humanoid robot, comprising an emotion and body movement encoding step, a body movement emotion recognition model building step, and a body movement emotion prediction step;

[0008] The emotion and body movement encoding steps include:

[0009] Step S101, classifying the emotions expressed by the humanoid robot into multiple categories;

[0010] Step S102: using a binary trigger mechanism to encode the emotion category in step S101;

[0011] Step S103, dividing the body movements of the humanoid robot into three units, namely, movement part, movement direction and movement mode;

[0012] Step S104, performing regional coding on the limb movement parts of the humanoid robot;

[0013] Step S105, encoding the direction of the limb movement of the humanoid robot;

[0014] Step S106, encoding the limb movement pattern of the humanoid robot;

[0015] Step S107, the camera captures the body movements of the humanoid robot, sets time parameters, and extracts key frames of the body movements of the humanoid robot;

[0016] Step S108, using a binary trigger mechanism, combining steps S104, S105 and S106 to encode the body movements represented by the key frames;

[0017] The steps for building a body movement emotion recognition model include:

[0018] Step S201, constructing a back propagation neural network topology structure;

[0019] Step S202, using logistic regression logsig as the neural network activation function;

[0020] Step S203, optimizing the neural network based on the particle swarm algorithm to obtain the optimal solution of the weight and bias of the neural network;

[0021] Step S204: using the body movement code obtained in step S108 as the input of the neural network, and using the emotion category code obtained in step S102 as the output of the neural network, to train the neural network;

[0022] Step S205, using the RMSProp algorithm to optimize the adaptive learning rate, and then updating the optimal solution of the neural network weights and biases, when the mean square error reaches the target error or the number of iterations reaches the upper limit, the optimal neural network model, that is, the body movement emotion recognition model, is obtained;

[0023] Among them, the steps of predicting body movement emotions include:

[0024] Step S301, extracting key frames from the predicted limb movements of the humanoid robot using the method of step S107, and encoding the limb movements represented by the key frames using the method of step S108;

[0025] Step S302, using the body movement code obtained in step S301 as input to the body movement emotion recognition model in S205;

[0026] Step S303: the body movement emotion recognition model outputs the corresponding emotion category code, decodes the emotion category code, and obtains the predicted emotion category of the humanoid robot.

[0027] As a further improved technical solution of the present invention, the step S101 specifically includes: classifying the emotions expressed by the humanoid robot into six categories, which are happiness, surprise, sadness, disgust, anger and fear.

[0028] As a further improved technical solution of the present invention, in the step S201, the back propagation neural network topology structure is: an input layer, a single hidden layer and an output layer; wherein the input layer contains nodes for the limb movement area coding, direction coding and pattern coding of the humanoid robot; the output layer contains nodes of the six emotion categories in step S01; the number of nodes in the single hidden layer is determined based on the condition of minimizing the mean square error of the neural network.

[0029] As a further improved technical solution of the present invention, the step S203 specifically includes:

[0030] Step S2031, initializing the particle swarm, initializing the position and velocity of the particles; each particle represents a combination of the weight and bias of the neural network;

[0031] Step S2032: using the mean square error of the neural network as the fitness function of each particle;

[0032] Step S2033, updating the local optimal solution and the global optimal solution of the particles;

[0033] Step S2034, updating the position and velocity of the particle according to the local optimal solution and the global optimal solution of the particle;

[0034] Step S2035: When the mean square error reaches the target error or the number of iterations reaches the upper limit, the current global optimal solution is output to obtain the optimal neural network weights and biases.

[0035] As a further improved technical solution of the present invention, the step S2032 specifically includes:

[0036] The mean square error of the neural network is used as the fitness function of each particle. The fitness of each particle is determined by calculating the mean square error between the neural network output and the target value, which is used to evaluate the quality of the particle's current position. The smaller the mean square error, the higher the fitness, indicating that the particle's solution is closer to the global optimal solution.

[0037] To ensure the effectiveness of the search, the speed limit formula is:

[0038] v s (t) = max(min(v s (t),v max ),v min ) (1);

[0039] Among them, v max =0.5, v min =-0.5; v s (t) represents the speed of the tth iteration.

[0040] As a further improved technical solution of the present invention, step S2033 specifically includes:

[0041] After each iteration, the fitness of the current particle is compared with the individual optimal solution of the particle; if the current fitness is better than the individual optimal solution, the individual optimal solution of the particle is updated; at the same time, the individual optimal solutions of all particles are compared with the global optimal solution. If the individual optimal solution of a particle is better than the current global optimal solution, the global optimal solution is updated.

[0042] As a further improved technical solution of the present invention, step S205 specifically includes:

[0043] In each iteration, the errors and gradients of each layer of the neural network are calculated;

[0044] The error of each layer of the neural network is:

[0045] δ (i) = logsig′(z (i) )·b (i) δ (i+1) (2);

[0046] δ (i) represents the error of the i-th layer, z (i) represents the net activation value of the i-th layer, b (i) represents the bias of the i-th layer, δ (i+1) represents the error of the i+1th layer;

[0047] The update step size of each parameter is dynamically adjusted by performing exponentially weighted moving average on the square of the gradient; when the mean square error reaches the target error or the number of iterations reaches the upper limit, the current optimized neural network model, i.e. the optimal neural network model, is output;

[0048] The exponentially weighted moving average of the squared gradient is:

[0049] G t =βG t-1 +(1-β)g t g t (3);

[0050] Among them, G t represents the exponentially weighted moving average of the squared gradient of the tth iteration, β = 0.9 is the decay rate, g t is the gradient of the tth iteration, and t is the number of iterations.

[0051] The beneficial effects of the present invention are:

[0052] (1) The coding rules of the action input and emotion output states of the humanoid robot body movement emotion recognition model realize the binary coding expression of the input and output of the humanoid robot body movement recognition, which can serve as the basis of the humanoid robot body movement emotion recognition computational model.

[0053] (2) The construction of the topological structure and training process of the humanoid robot body movement emotion recognition model realizes the nonlinear mapping between the humanoid robot body movement and emotion type, and realizes the emotion recognition of the humanoid robot body movement.

[0054] (3) After encoding the body movements of the humanoid robot, the body movement emotion recognition model can be used to predict the emotion of the movement, which enhances people's emotional understanding of the robot's body movements and facilitates the interaction between people and humanoid robots at a long distance (long distance means that the camera and the user cannot see the robot's expression or hear the robot's voice clearly, but the camera and the user can see the movement of the humanoid robot). This enables the humanoid robot to express emotions more naturally and accurately, improving the effect of human-computer interaction. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 This is a sample diagram of key frame extraction of a humanoid robot's body movements provided by an embodiment of the present invention.

[0056] Figure 2 It is a flowchart of constructing and training a body movement emotion recognition model of a humanoid robot provided by an embodiment of the present invention.

[0057] Figure 3It is a schematic diagram of the neural network topology structure of a humanoid robot body movement emotion recognition model provided by an embodiment of the present invention.

[0058] Figure 4 This is a flow chart of emotion prediction of body movements of a humanoid robot provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0059] The specific embodiments will now be described more fully with reference to the accompanying drawings. The described features, structures or characteristics can be applied to any humanoid robot emotion recognition.

[0060] In the following description, many specific details are provided to give a full understanding of the method of the present application. The flow charts shown in the accompanying drawings do not necessarily include all content and operation steps. For example, some steps / operations can be decomposed, and some steps / operations can be combined or partially combined, so the actual implementation order may change according to actual conditions.

[0061] This embodiment provides a method for identifying body movements and emotions of a humanoid robot, including an emotion and body movement encoding step, a body movement emotion recognition model construction and training step, and a body movement emotion prediction step;

[0062] The emotion and body movement encoding steps include:

[0063] S101. The emotions / emotions expressed by the robot are mainly divided into six categories, namely happiness, surprise, sadness, disgust, anger and fear, as shown in the output state set in Table 1.

[0064] Table 1: Input state set and output state set.

[0065]

[0066] S102: Use a binary trigger mechanism and combine it with S101 to encode the emotion category. Examples of robot expressions of emotion are: Figure 1 As shown, the emotional state expressed by the sample robot is happy, and the binary encoding of the emotional state is shown in the output state encoding of Table 2.

[0067] Table 2: Action input state encoding and action output state encoding.

[0068]

[0069] S103, dividing the body movements of the humanoid robot into three units, namely, movement part, movement direction and movement mode.

[0070] S104, regionally encode the limb motion parts of the humanoid robot, as shown in the motion parts of the input state set in Table 1. The parts to be encoded can be selected from partition 1 or partition 2. Partition 1 and partition 2 take into account the bipedal type and wheeled type of the humanoid robot respectively.

[0071] Specifically, when the humanoid robot is a bipedal humanoid robot, the limb movement parts of the humanoid robot are regionally encoded to obtain the head, trunk, right lower limb, left lower limb, right arm and left arm. When the humanoid robot is a wheel-footed humanoid robot, the limb movement parts of the humanoid robot are regionally encoded to obtain the head, trunk, lower limb, right arm and left arm.

[0072] S105, encoding the direction of the limb movement of the humanoid robot, as shown in the movement direction of the input state set in Table 1.

[0073] Specifically, when the humanoid robot is a bipedal humanoid robot or a wheeled humanoid robot, the direction of movement of the limbs of the humanoid robot is encoded to obtain left, right, forward, backward, upward, downward, inward and outward.

[0074] S106, encoding the limb motion pattern of the humanoid robot, as shown in the motion pattern of the input state set in Table 1.

[0075] Specifically, when the humanoid robot is a bipedal humanoid robot or a wheeled humanoid robot, the limb movement patterns of the humanoid robot are pattern-coded to obtain rotation, swing, vertical, extension, approach and bending. Among them, approach refers to the approach of two or more limbs of the right lower limb, left lower limb, right arm and left arm.

[0076] S107, the camera captures the robot's body movements. Set the time parameter to 1s, and extract the robot's body movement key frames. Set the time parameter so that the extracted key frames can respectively show the robot's horizontal and vertical movement states. The action sample is as follows Figure 1 As shown, the body movements of this example are as follows: both feet and the left hand are stretched downward, and the right hand is bent outward and upward.

[0077] S108, using a binary trigger mechanism, combined with S104, S105 and S106 to perform binary coding of the body movements represented by the key frames. Taking the moving parts as an example, the triggered coding of the parts is 1, and the untriggered coding is 0. The binary coding of the action sample is shown in Table 2.

[0078] The steps for building and training the body movement emotion recognition model are as follows: Figure 2 As shown, including:

[0079] S201, construct the back propagation neural network topology, such as Figure 3 As shown. The neural network input code contains 20 nodes, which correspond to the partition 1, movement direction and movement mode of the bipedal humanoid robot's moving parts, namely, the nodes of area code, direction code and mode code. The neural network output code contains 6 nodes, corresponding to six emotional state classifications. With the minimum error of the neural network as the condition, the number of hidden layer nodes is determined according to the input code and output code of the neural network. When the number of hidden layer nodes is 13, the network error is minimized, and this value is exactly half of the sum of the number of nodes in the input layer and the output layer. Therefore, the back propagation neural network structure corresponding to the design of the bipedal humanoid robot is determined as follows: the input layer has 20 nodes, the single hidden layer has 13 nodes, and the output layer has 6 nodes. The back propagation neural network structure corresponding to the design of the wheeled humanoid robot is determined as follows: the input layer has 19 nodes and the output layer has 6 nodes.

[0080] S202, using logistic regression logsig as the neural network activation function, so that the neural network output can be mapped in the interval (0, 1). Initialize the weights and biases of the neural network. The following formula (1) is used to describe the activation value calculation process of a certain layer in the neural network. The a in the formula (i) Represents the activation value of the i-th layer.

[0081] a (i) =logsig(W (i) a (i-1) +b (i) ) (1);

[0082] Formula (2) is used to calculate the net activation value of the i-th layer in the neural network, that is, to complete part of the forward propagation. Specifically, the formula converts the output z of the previous layer into (i-1) Perform nonlinear mapping and then combine it with the weight matrix W of the current layer (i) Multiply, plus the bias b of the current layer (i) , thus obtaining the net activation value z of the current layer (i) .

[0083] z (i) =W (i) logsig(z (i-1) )+b (i) (2);

[0084] S203, initialize the particle swarm, each particle represents the combination of the weight and bias of the neural network. The particle velocity controls the corresponding motion state in the search space. In the particle space, the particle position matrix L and velocity matrix v are as follows:

[0085]

[0086] Among them, s is the particle number, t is the number of iterations, and ps is the individual best (pBest), p g is the global optimum (gBest). c1 and c2 are learning factors, r1 and r2 are random factors, and ω is the inertia weight. The new position of the particle By accumulating the current position and the updated speed This means that the particle will move to a new position according to its current speed, thereby gradually exploring the optimal solution. This formula enables the particle to adjust its position in each iteration so that it can continuously approach the optimal solution under the guidance of the individual optimal solution and the global optimal solution.

[0087] S204. Design the fitness function of the particle according to the mean square error of the neural network and calculate its fitness. The fitness of each particle is determined by calculating the mean square error (MSE) between the neural network output and the target value, which is used to evaluate the quality of the particle's current position. The smaller the MSE, the higher the fitness, indicating that the particle's solution is closer to the global optimal solution. To ensure the effectiveness of the search, the speed limit formula is:

[0088] v s (t) = max(min(v s (t), v max ), v min ) (5);

[0089] Among them, v max =0.5, V min =-0.5.

[0090] S205, update the local optimal solution and the global optimal solution of the particle. After each iteration, compare the fitness of the current particle with the individual optimal solution (pBest) of the particle. If the current fitness is better than the individual optimal solution, update the individual optimal solution of the particle. At the same time, compare the individual optimal solutions of all particles with the global optimal solution (gBest). If the individual optimal solution of a particle is better than the current global optimal solution, update the global optimal solution. In this way, the particle swarm algorithm will gradually approach the optimal solution in each iteration.

[0091] S206. Update the position and velocity of the particle. The velocity and position of the particle need to be dynamically updated in each iteration. Specifically, the update of the velocity is determined by the difference between the particle's previous velocity, the individual optimal solution, and the global optimal solution to balance the exploration and development capabilities. The inertia weight is used to control the degree to which the particle retains the previous velocity, while the learning factor controls the degree to which the particle approaches the optimal solution. After the velocity is updated, the position is updated by accumulating the current position and velocity, so that the particle continuously adjusts its position in the search space to approach the optimal solution.

[0092] S207, output the global optimal solution based on the convergence of the mean square error or the maximum number of iterations, and obtain the optimal solution of the weight and bias of the neural network. When the mean square error (MSE) reaches the preset target error or the number of iterations reaches the upper limit, the algorithm stops and outputs the current global optimal solution to obtain the optimal neural network weights and biases.

[0093] S208, using the body movement code of S108 as the neural network input, using the emotion category code of S102 as the neural network output, training the neural network, and calculating the derivative of each layer parameter of the neural network.

[0094]

[0095] in, represents the loss function, δ (i) is the error of the i-th layer.

[0096] S209, calculate the error and gradient of each layer of the neural network. During the back propagation process, the error and gradient are calculated layer by layer. Among them, the error of each layer is calculated by the derivative of the logsig function, which is used to quantify the contribution of the output of this layer to the loss function. Based on these errors, the gradients of weights and biases are further calculated to provide a basis for subsequent optimization updates. In each iteration, the errors and gradients of each layer of the neural network are calculated. The specific formula is as follows:

[0097] δ (i) = logsig′(z (i) )·b (i) δ (i+1) (8);

[0098] S210, by calculating the exponentially weighted moving average of the squared gradient, updating the neural network weights and biases, and obtaining the optimized neural network model under the condition of minimizing the mean square error or reaching the maximum number of iterations. In each iteration, the update step size of each parameter is dynamically adjusted by performing an exponentially weighted moving average on the squared gradient to ensure that the model converges stably during the training process. When the mean square error reaches the target error or the number of iterations reaches the upper limit, the current optimized neural network model is output.

[0099] The following formula is used to calculate the exponentially weighted moving average of the squared gradient and update the parameters:

[0100] G t =βG t -1+(1-β)gtgt (9);

[0101] Among them, G t represents the exponentially weighted moving average of the square of the gradient. β = 0.9 is the decay rate, g tis the current gradient, and i is the number of iterations. When the mean square error reaches the target or reaches the maximum number of iterations, the optimal neural network model weights and biases are output.

[0102] The steps of predicting body movement emotions are as follows: Figure 4 As shown, including:

[0103] S301, a camera captures the body movements of the humanoid robot to be tested and extracts key frames of the body movements; and according to S108, binary encoding is performed on the body movements represented by the key frames of the humanoid robot to be tested.

[0104] S302, using the body movement coding of S301 as the input of the optimal neural network model of S210.

[0105] S303, obtaining the mean square error under the condition of the maximum number of iterations, and decoding the emotion category of the humanoid robot's body movements to obtain the predicted emotional state of the humanoid robot.

[0106] The implementation described here can be implemented by software combined with necessary hardware, or by software. Therefore, the technical solution according to the implementation of the present application can be embodied in the form of "robot + host computer system". The product system combining software and hardware can capture the real-time movement of the humanoid robot through a camera, and then send the captured information to the host computer system, execute the method according to the implementation of the present application in the host computer system, judge the emotion category expressed by the body movements of the humanoid robot through the model, and finally inform the user of the emotion category through voice. The technical solution according to the implementation of the present application can also be embodied in the form of a software product. The software product can exist in a non-volatile storage medium, such as a mobile hard disk, a U disk, or on a network, such as a personal computer, a server, or a touch terminal to execute the method according to the implementation of the present application.

[0107] This application is intended to cover any variations, uses or adaptations of this application, which follow the general principles of this application and include known attempts or customary technical means in the art that are not disclosed in this application.

[0108] It should be understood that the present application is not limited to the detailed processes that have been described and shown in the drawings, and various modifications and adjustments may be made without departing from the scope thereof.

Claims

1. A method for identifying emotion in body movements of a humanoid robot, characterized in that: It includes emotion and body movement encoding steps, body movement emotion recognition model construction steps and body movement emotion prediction steps; The emotion and body movement encoding steps include: Step S101, classifying the emotions expressed by the humanoid robot into multiple categories; Step S102: using a binary trigger mechanism to encode the emotion category in step S101; Step S103, dividing the body movements of the humanoid robot into three units, namely, movement part, movement direction and movement mode; Step S104, performing regional coding on the limb movement parts of the humanoid robot; Step S105, encoding the direction of the limb movement of the humanoid robot; Step S106, encoding the limb movement pattern of the humanoid robot; Step S107, the camera captures the body movements of the humanoid robot, sets time parameters, and extracts key frames of the body movements of the humanoid robot; Step S108, using a binary trigger mechanism, combining steps S104, S105 and S106 to encode the body movements represented by the key frames; The steps for building a body movement emotion recognition model include: Step S201, constructing a back propagation neural network topology structure; Step S202, using logistic regression logsig as the neural network activation function; Step S203, optimizing the neural network based on the particle swarm algorithm to obtain the optimal solution of the weight and bias of the neural network; Step S204: using the body movement code obtained in step S108 as the input of the neural network, and using the emotion category code obtained in step S102 as the output of the neural network, to train the neural network; Step S205, using the RMSProp algorithm to optimize the adaptive learning rate, and then updating the optimal solution of the neural network weights and biases, when the mean square error reaches the target error or the number of iterations reaches the upper limit, the optimal neural network model, that is, the body movement emotion recognition model, is obtained; Among them, the steps of predicting body movement emotions include: Step S301, extracting key frames from the predicted limb movements of the humanoid robot using the method of step S107, and encoding the limb movements represented by the key frames using the method of step S108; Step S302, using the body movement code obtained in step S301 as input to the body movement emotion recognition model in S205; Step S303: The body movement emotion recognition model outputs the corresponding emotion category code, decodes the emotion category code, and obtains the predicted emotion category of the humanoid robot.

2. The method for identifying emotions of body movements of a humanoid robot according to claim 1, characterized in that: The step S101 specifically includes: classifying the emotions expressed by the humanoid robot into six categories, which are happiness, surprise, sadness, disgust, anger and fear.

3. The method for identifying emotions of body movements of a humanoid robot according to claim 2, characterized in that: In step S201, the back propagation neural network topology is: an input layer, a single hidden layer and an output layer; wherein the input layer contains nodes for the limb movement area coding, direction coding and pattern coding of the humanoid robot; the output layer contains nodes of the six emotion categories in step S01; the number of nodes in the single hidden layer is determined based on the condition of minimizing the mean square error of the neural network.

4. The method for identifying emotions of body movements of a humanoid robot according to claim 1, characterized in that: The step S203 specifically includes: Step S2031, initializing the particle swarm, initializing the position and velocity of the particles; each particle represents a combination of the weight and bias of the neural network; Step S2032: using the mean square error of the neural network as the fitness function of each particle; Step S2033, updating the local optimal solution and the global optimal solution of the particles; Step S2034, updating the position and velocity of the particle according to the local optimal solution and the global optimal solution of the particle; Step S2035: When the mean square error reaches the target error or the number of iterations reaches the upper limit, the current global optimal solution is output to obtain the optimal neural network weights and biases.

5. The method for identifying emotions of body movements of a humanoid robot according to claim 4, characterized in that: The step S2032 specifically includes: The mean square error of the neural network is used as the fitness function of each particle. The fitness of each particle is determined by calculating the mean square error between the neural network output and the target value, which is used to evaluate the quality of the particle's current position. The smaller the mean square error, the higher the fitness, indicating that the particle's solution is closer to the global optimal solution. To ensure the effectiveness of the search, the speed limit formula is: v s (t)=max (min(v s (t),v max ),v min ) (1); Among them, v max =0.5, v min =-0.5; v s (t) represents the speed of the tth iteration.

6. The method for identifying emotions of body movements of a humanoid robot according to claim 4, characterized in that: The step S2033 specifically includes: After each iteration, the fitness of the current particle is compared with the individual optimal solution of the particle; if the current fitness is better than the individual optimal solution, the individual optimal solution of the particle is updated; at the same time, the individual optimal solutions of all particles are compared with the global optimal solution. If the individual optimal solution of a particle is better than the current global optimal solution, the global optimal solution is updated.

7. The method for identifying emotions of body movements of a humanoid robot according to claim 1, characterized in that: The step S205 specifically includes: In each iteration, the errors and gradients of each layer of the neural network are calculated; The error of each layer of the neural network is: d (i) =logsig′(z (i) )·b (i) d (i+1) (2); δ (i) represents the error of the i-th layer, z (i) represents the net activation value of the i-th layer, b (i) represents the bias of the i-th layer, δ (i+1) represents the error of the i+1th layer; The update step size of each parameter is dynamically adjusted by performing exponentially weighted moving average on the square of the gradient; when the mean square error reaches the target error or the number of iterations reaches the upper limit, the current optimized neural network model, i.e. the optimal neural network model, is output; The exponentially weighted moving average of the squared gradient is: G t =βG t-1 +(1-β)g t g t (3); Among them, G t represents the exponentially weighted moving average of the squared gradient of the tth iteration, β = 0.9 is the decay rate, g t is the gradient of the tth iteration, and t is the number of iterations.

Citation Information

Patent Citations

  • Multi-module interactive interface description method based on bionic proxy

    CN101174218A

  • Body language-based emotion perception method adopting deep learning and UKF

    CN108363978A

  • Gait recognition method based on particle swarm optimization BP neural network

    CN110232372A

  • Emoji prediction and visual sentiment analysis

    US20200073485A1

  • Robot-aided system and method for diagnosis of autism spectrum disorder

    US20210236032A1