A method for emotion recognition based on continuous wave sound signals

The 19KHz continuous wave signal is emitted through the smartphone speaker, and the MO-LSTM network is used to identify breathing characteristics, which solves the problems of unreality and poor user experience of traditional emotion recognition methods, achieving non-contact, user-friendly emotion recognition, and satisfying emotional analysis need.

CN113855018BActive Publication Date: 2024-08-27YANSHAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110927305.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-09
Publication Date
2024-08-27
Estimated Expiration
2041-08-09

AI Technical Summary

Technical Problem

Existing emotion recognition methods suffer from unreality and poor user experience. When traditional methods identify emotions through facial expressions or physiological signals, it is difficult to accurately measure inner feelings and wearing sensors interferes with user activities.

Method used

The smartphone speaker is used to emit a 19KHz continuous wave signal, the reflected signal is received through the microphone, and the MO-LSTM network is used to extract breathing features to identify the four basic emotions of joy, calmness, fear and anger, achieving non-contact, user-friendly emotion recognition.

Benefits of technology

Provides a non-invasive, user-friendly emotion recognition method that monitors breathing signals through smartphones, enriches emotion recognition methods, meets common emotion analysis and emotion recognition needs, and avoids the interference caused by traditional methods of wearing devices .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113855018B
    Figure CN113855018B
Patent Text Reader

Abstract

The present invention discloses a method for emotion recognition based on continuous wave sound signals. A smart phone is designed as a sonar system, and a 19KHz continuous wave signal emitted by a loudspeaker is used to sense the chest displacement of a person, and a microphone receives the reflected signal. A new non-invasive technology is proposed, which does not require users to wear sensors or sensor arrays, and does not require contact with users for measurement. A lightweight network is proposed based on LSTM, and feature extraction and classification of four basic emotions are performed. The method can meet the needs of common sentiment analysis and emotion recognition, is simple to operate, and is user-friendly.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of emotion recognition, in particular to a method for emotion recognition based on continuous wave sound signals. Background Art

[0002] In order to make human-computer interaction more realistic and convenient, emotion recognition has attracted great interest from industry and academia. The inspiration comes from a simple vision: Can humans make machines that can sense their own emotions? If so, such machines will enable smart homes to react to human emotions and adjust lights or music accordingly. Filmmakers will have better tools to evaluate user experience. Advertisers will immediately understand customer reactions, etc. Emotion recognition has been applied in many fields, such as safe driving, health care, and social security. Generally, emotion recognition methods can be divided into two categories. One is to use human physical signals such as facial expressions, voice, gestures, and postures, which have the advantage of being easy to collect and have been studied for many years. However, reliability cannot be guaranteed because it is relatively easy for people to control physical signals such as facial expressions or voice to hide their true emotions, especially in communication. The other is the traditional emotion detection method, which usually uses some sensors to measure physiological signals, has a poor user experience, and wearing devices such as sensors may affect the wearer's emotions.

[0003] In recent years, as human-computer interaction technology continues to mature, the ability of devices to recognize human emotions is required to be higher and higher, and emotion recognition has become a hot topic of research in industry and academia. After continuous efforts by experts and scholars at home and abroad, many research results have emerged. Whether it is through facial expressions, voice, or physiological signals to recognize human emotions, corresponding solutions have been proposed, providing valuable experience for future research. However, both methods have their limitations. Audiovisual technology uses the external expression of emotions and cannot measure internal feelings; the second method is to identify emotions by monitoring physiological signals that change with emotional states (such as heartbeats), which is more related to people's internal feelings. However, the use of human body sensors is cumbersome and interferes with the user's activities and emotions, so this method is not suitable for frequent use. Summary of the invention

[0004] The purpose of the present invention is to provide a non-contact emotion recognition method based on continuous wave sound signals with good user experience in view of the shortcomings of existing emotion recognition methods.

[0005] To achieve the above object, the present invention is implemented according to the following technical solutions:

[0006] A method for emotion recognition based on continuous wave sound signals, comprising the following steps:

[0007] S1, using the speaker of the smartphone to transmit a 19KHz continuous wave signal, which is reflected by the human chest and received by the microphone of the smartphone;

[0008] S2, preprocessing the received signal to obtain a breathing signal;

[0009] S3, split the breathing signal into equal-length time series signals, manually add labels, and use them as the input of the neural network. Then, input them into the MO-LSTM network composed of two layers of bidirectional LSTM and one linear layer for training, extract breathing features, and identify the four basic emotions of joy, calmness, fear and anger based on the breathing features. Finally, a trained MO-LSTM network model is obtained through machine learning.

[0010] S4. The breathing signal is divided into time series signals of equal length and the trained MO-LSTM network model automatically identifies one of the four basic emotions: joy, calmness, fear and anger.

[0011] Furthermore, in S1, the bottom of the smartphone is aimed at the chest of the person, and the smartphone is 8-12 cm away from the chest of the person.

[0012] Furthermore, the S2 specifically includes:

[0013] S21, removing the received signals other than the 19KHz frequency in the received signals by bandpass filtering;

[0014] S22, removing the unknown time delay between the transmitted signal and the received signal;

[0015] S23, after removing the delay between the transmission signal and the reception signal, down-convert the reception signal into a baseband signal to obtain the amplitude information of the reception signal;

[0016] S24, down-sampling the received signal, and then performing window sampling, with the window size set to 5s, to obtain a number of breathing signals including a complete breathing cycle.

[0017] Furthermore, in S3, the MO-LSTM network structure includes a forward propagation LSTM, a backward propagation LSTM, an output layer, and a linear layer. Starting from the input of a one-dimensional signal, it enters the forward propagation LSTM and the backward propagation LSTM containing memory units and related gates to control whether the information is remembered, output, or forgotten, and updates the multidimensional hidden output of the forward propagation LSTM for 3 time steps as the input of the backward propagation LSTM for 3 time steps. Then, it enters the linear layer with a learning bias function, flattens the display, and finally outputs the probability values ​​of the four basic emotions of joy, calmness, fear, and anger, and selects the highest probability as this type of emotion; the learning rate of the MO-LSTM network is 0.001.

[0018] Preferably, in S21, the passband of the bandpass filter is set to 18.5-19.5 KHz.

[0019] Furthermore, in S22, the transmission signal and the breathing signal are aligned using a cross-correlation function to remove the unknown time delay between the transmission signal and the reception signal. The specific steps are as follows:

[0020] For a periodic transmission signal, the cross-correlation function of the main peaks of the transmission signal and the received signal is used to measure the delay within T / 2 reflected from the target. The cross-correlation function is defined as:

[0021]

[0022] Where N is the number of samples of the transmitted signal within a period T, n = -N+1, -N+2, ..., N-1; R(n) measures V rx and n samples offset V rx The similarity between; Assume that R(n) reaches the main peak after Lag samples shift, because V rx Yes V t x is the time shift associated with the decay of the amplitude, which can be measured as V rx is V with Lag sample offsets overlapped tx ;

[0023] Assume that the received signal is set to Lag as the transmitted signal after 1032 samples are shifted. According to the definition of R(n), the main peak is 1032; therefore, the calculation formula of the delay τ is expressed as:

[0024]

[0025] Compared with the prior art, the present invention has the following beneficial effects:

[0026] (1) The present invention designs a smartphone into a sonar system, uses a 19KHz continuous wave signal emitted by a speaker to sense the chest displacement of a person and receives the reflected signal with a microphone, and proposes a new non-invasive technology that does not require the user to wear a sensor or a sensor array, does not require contact with the user for measurement, and is simple to operate and user-friendly.

[0027] (2) The present invention performs relevant denoising processing on the received signal, and uses the cross-correlation function method to calculate the delay of the two signals, generates and analyzes the continuous wave signal, and down-converts it into a baseband signal. Although there are many methods and devices for extracting respiratory signals, the present invention extracts the respiratory signal in a non-contact manner, enriching the method of respiratory signal monitoring.

[0028] (3) The present invention proposes a novel emotion recognition system, which uses a mobile phone to monitor breathing signals under different emotions, and proposes a lightweight network based on LSTM to extract and classify features of four basic emotions, which can meet the needs of common sentiment analysis and emotion recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 It is a flow chart of the present invention.

[0030] Figure 2 It is a respiratory monitoring method.

[0031] Figure 3 It is the preprocessing process of receiving signal.

[0032] Figure 4 Amplitude information obtained for down-converting the received signal to baseband signal.

[0033] Figure 5 This is the MO-LSTM network structure diagram.

[0034] Figure 6 Recognition accuracy diagram of different network structures.

[0035] Figure 7 Recognition accuracy plot for different learning rates set for the MO-LSTM network.

[0036] Figure 8 The breathing error for different users.

[0037] Fig. 9 Breathing error for users wearing different clothes.

[0038] Fig.10 Breathing error for different smartphone placement angles.

[0039] Fig.11 Comparison of emotion recognition accuracy for different users: (a) is the loss curve; (b) is the emotion recognition accuracy.

[0040] Fig.12 Comparison of loss curves and emotion recognition accuracy for different clothing materials: (a) is the loss curve; (b) is the emotion recognition accuracy.

[0041] Fig.13 Comparison of emotion recognition accuracy when the smartphone is at different distances from the user's chest. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with embodiments. The specific embodiments described herein are only used to explain the present invention and are not used to limit the invention.

[0043] like Figure 1 As shown, this embodiment specifically discloses a method for emotion recognition based on continuous wave sound signals, comprising the following steps:

[0044] First, a 19KHz continuous wave signal is transmitted through the speaker of a smartphone, and then reflected by the human chest cavity and received by the microphone of the smartphone.

[0045] Smartphones have become an indispensable item in people's daily lives. On the one hand, smartphones generally include a speaker and two microphones, which meet the necessary hardware conditions for implementing a sonar system. On the other hand, the frequency range that the human ear can hear is 20Hz-20KHz, and the sampling rate of the mobile phone is 48KHz, which meets the frequency range for emitting ultrasonic waves in this embodiment. It is generally believed that humans are insensitive to frequencies above 18KHz. According to the Nyquist sampling theorem, the embodiment uses 19KHz ultrasonic waves that are inaudible to the human ear as the transmission signal.

[0046] This embodiment proposes a non-invasive technology for respiratory monitoring. This method only uses an off-the-shelf smartphone and does not require the user to carry any built-in / in-body equipment. The related design is to use inaudible sound signals to sense respiratory movements. The key is to transform the mobile phone into a sonar that can transmit high-frequency inaudible signals and capture signals reflected from the human chest cavity. These reactions are encoded by chest movements caused by breathing or even heartbeats, which can be decoded to monitor vital signs. The specific implementation of the sonar in this embodiment is by installing a mobile application on the mobile phone (the program can be downloaded directly from the mobile application market), and sending a 19KHz continuous wave signal through the speaker of the smartphone, and analyzing the reflection of the user's chest wall and receiving the signal by the microphone of the smartphone. The way a mobile phone monitors breathing is as follows Figure 2 As shown, Figure 2 The bottom of the smart phone is aimed at the chest of the person, and the smart phone is 8-12 cm away from the chest of the person. Through this way of obtaining breathing, the implementation of this embodiment is non-contact and non-invasive, and is user-friendly.

[0047] Secondly, the signal received by the smartphone microphone may be mixed with environmental noise, such as human voice, air conditioning sound, etc. Therefore, the received signal needs to be preprocessed to obtain the breathing signal, as shown in the figure, which is specifically:

[0048] The received signals other than the 19KHz frequency are removed by bandpass filtering, and the passband of the bandpass filtering is set to 18.5-19.5KHz;

[0049] Remove the unknown time delay between the transmitted signal and the received signal;

[0050] This embodiment converts signal alignment into estimating the time delay between two signals. This embodiment uses a cross-correlation function to align the transmit signal with the breathing signal. For a periodic transmit signal, the cross-correlation of the main peaks of the transmit signal and the received signal can be used to measure the delay within T / 2 reflected from the target. The cross-correlation function is defined as:

[0051]

[0052] Where N is the number of samples of the transmitted signal within a period T, n = -N+1, -N+2, ..., N-1; R(n) measures V rx and n samples offset V rx The similarity between; Assume that R(n) reaches the main peak after Lag samples shift, because V rx Yes V tx Along with the time shift of the amplitude decay, V rx is V with Lag sample offsets overlapped tx ;

[0053] Assume that the received signal is set to Lag as the transmitted signal after 1032 samples are shifted. According to the definition of R(n), the main peak is 1032; therefore, the calculation formula of the delay τ is expressed as:

[0054]

[0055] Then, after removing the delay between the transmitted signal and the received signal, the received signal is down-converted into a baseband signal to obtain the amplitude information of the received signal;

[0056] The received signal is downsampled and then windowed, with the window size set to 5s, to obtain several respiratory signals that include a complete respiratory cycle.

[0057] This system mainly obtains chest changes based on the fluctuation of sound amplitude, and then identifies different breathing patterns. Since the sampling frequency of the mobile phone is 48KHz, the signal obtained through the mobile phone is a time series signal. It is impossible to input an infinitely long signal into the network. Therefore, the signal needs to be sampled in windows. If the window is too large, the signal may be too long, increasing the learning burden of the network model; if the window is too small, the breathing cycle may not be extracted, causing the network to be unable to extract the characteristics of the complete breathing and the network recognition performance to decline. Under normal breathing conditions, 5s can completely include a complete breathing cycle

[34] . Therefore, this system first considers setting the window size to 5s. However, directly taking 5s of data as network input will include 48000*5=240000 sampling points, which may cause network overflow.

[0058] Then, the breathing signal is divided into time series signals of equal length, which are manually labeled as the input of the neural network and input into the MO-LSTM network consisting of two layers of bidirectional LSTM and one linear layer for training. The breathing features are extracted and the four basic emotions of joy, calmness, fear and anger are identified based on the breathing features. Finally, the trained MO-LSTM network model is obtained through machine learning.

[0059] like Figure 4 As shown, the MO-LSTM network structure adopted in this embodiment includes a forward propagation LSTM, a backward propagation LSTM, an output layer, and a linear layer. Starting from the input of a one-dimensional signal, it enters the forward propagation LSTM and the backward propagation LSTM containing memory units and related gates to control whether the information is remembered, output, or forgotten, and updates the multidimensional hidden output of the forward propagation LSTM for 3 time steps as the input of the backward propagation LSTM for 3 time steps. Then, it enters the linear layer with a learning bias function, flattens the display, and finally outputs the probability values ​​of the four basic emotions of joy, calmness, fear, and anger, and selects the highest probability as this type of emotion; the learning rate of the MO-LSTM network is 0.001.

[0060] In order to train the MO-LSTM network, the following experiment is designed:

[0061] 1. Experimental environment

[0062] The experimental environment configuration is as follows.

[0063] (1) Software platform: A mobile application is used to transmit a 19KHz continuous wave, which is reflected by the human chest cavity and returned to the microphone. After collecting the data, the data is exported from the mobile phone using a USB flash drive with a Type-C interface, and the sound signal is subsequently processed using Matlab software.

[0064] (2) Hardware platform: The sound wave signal acquisition platform uses the Honor Note 10 mobile phone, which has a sampling rate of 48000Hz, a speaker (at the bottom) and two microphones (bottom microphone and top microphone). Data processing uses a desktop computer with an Intel i3-2120 3.30GHz CPU, 4G memory, and 500G hard disk.

[0065] (3) Experimental environment: The experimental environment of this system is a laboratory, which contains common items such as tables, stools, air conditioners and computers.

[0066] 2. Respiratory data collection

[0067] A total of 5 volunteers were recruited for this experiment, including 3 boys and 2 girls, aged between 18 and 35. First, the subjects were in an independent room with no one else except the subjects. Before the experiment, the subjects were told the intention of the experiment and the use of the Android program. In order to collect more realistic emotional data, the subjects were asked to relax for 1.5 minutes before each experiment and between watching different videos. Then, the subjects were asked to watch video clips from FilmStim, one of the most widely used emotional film databases, which can stimulate corresponding emotions. While watching the video, the subjects placed their mobile phones in front of their chests to collect breathing signals. The mobile phone was placed on a table about 10 cm away from the subject, and the mobile phone was placed horizontally with the bottom of the phone facing the subject's chest. All experiments required the subjects to maintain an upright posture with their backs against the back of the chair. In this way, the body trunk remained stable during the test, and the measured chest wall movement was only caused by inhalation and exhalation.

[0068] The FilmStim database includes videos of joy, sadness, anger, and fear. This experiment uses the video sources of joy, anger, and fear. Although the length of each video is different, they are all within 1-3 minutes. Each subject conducts an experiment and needs to collect four types of emotional data. The collection order is from positive to negative emotions, which are joy, calmness, anger, and fear. When stimulating some emotions, such as fear, with the consent of the subject, the light in the laboratory can be controlled (turned off and on) to further stimulate the emotion.

[0069] In addition, after watching a video, the subjects must report their emotional reactions and effect levels of the video clips by filling out a questionnaire. This experiment continuously updates the video source based on the questionnaire. If the effect level of a video is less than level four, it means that someone feels that the video cannot arouse the corresponding emotions, and the video will be deleted from the video collection. In addition, this experiment also uses the stimulus source that can produce four types of emotions as an emotion arousal tool.

[0070] 3. Dataset Construction

[0071] In order to analyze the performance of respiratory monitoring, this experiment used a smartphone to collect about 540 minutes of respiratory data at the same time; in order to analyze the performance of emotion classification, this experiment collected about 1200 minutes of respiratory data under different emotions. While collecting data for the experiment, the user will record the time when the emotion occurs. According to the feedback of the subject, the corresponding target signal is extracted from the signal sequence, and then the target signal is intercepted in a 5s time period as a piece of data. After manually adding labels, a complete piece of data is obtained. In the data of different scenarios, this experiment uses 80% of the data as a training set and the remaining 20% ​​as a test set for training and testing. Before network training, the created data set needs to be loaded. Since the data samples of this experiment are large, mini-batch is used to iteratively input the data into the network. If all samples are iterated at once, only one forward propagation and backward propagation can be performed in each iteration, which will be more time-consuming.

[0072] 4. Network parameter selection

[0073] When training the network, the relevant parameters are constantly debugged to achieve the best result. After ensuring the correctness of the data and network structure, use the default hyperparameter settings, observe the changes in loss, and adjust the parameters after determining the range of each parameter. For each hyperparameter, only adjust one parameter each time, and then observe the changes in loss. The debugged parameters mainly include the number of network layers, learning rate, hidden units, etc. In fact, there is no regulation on the number of hidden nodes that should be used. This must be found out through repeated experiments for each situation. Specific problems should be treated specifically. In general, the larger the hidden nodes, the higher the model complexity and the overfitting phenomenon may occur, but an appropriate increase can improve the model effect. The following mainly introduces the selection of network layers and learning rates.

[0074] Network layers: The network structure used in this experiment is a two-layer bidirectional MO-LSTM based on the LSTM basic unit. This system evaluates single-layer unidirectional, single-layer bidirectional, double-layer unidirectional, double-layer bidirectional, three-layer unidirectional and three-layer bidirectional. The evaluation method is to use the same data set to train different networks. The evaluation results are shown in Figure 2. Fig.11 As shown. Fig.11 It can be seen that the single-layer unidirectional network has the lowest accuracy, which may be because the single-layer network structure is too simple and cannot extract the most effective features. However, the accuracy of the single-layer bidirectional is better than that of the unidirectional one, because the signal of this system is a time series signal and the length is relatively long, and there is also a dependency relationship between the front and back. The recognition accuracy of the double-layer bidirectional used in this system is the highest. However, as the number of network layers increases, the performance improvement is not significant, and execution time and memory resources are wasted. Considering all factors, this system selects the most appropriate double-layer bidirectional result for emotion classification.

[0075] Learning rate: The learning rate is the step size of the weight update during network training. It is a configurable parameter in the network training process. It has a small positive value, usually between 0 and 1. In fact, a more accurate range is 0.001-0.01. If the learning rate is too small, it may never converge, or it may fall into a suboptimal solution. If the learning rate is too large, the network model may update faster in the early stage of training, making it easier for the model to approach the local or global optimal solution. However, the model is not really trained well, so there may be large fluctuations in the middle and late stages, and even the value of the loss function will hover and fluctuate greatly, making it difficult to reach the optimal solution.

[0076] This example mainly compares the three learning rates of 0.001, 0.03 and 0.01, and mainly evaluates them through the common evaluation indicators Micro-f1 and Macro-f1 for multi-classification. Fig.12 As shown in the figure, it can be clearly seen that the three evaluation indicators of average recognition accuracy, macro-average F1 and micro-average F1 are all best when the learning rate is 0.001, while the effect of the learning rate of 0.03 is slightly better than that of the learning rate of 0.01. Therefore, the learning rate selected in this embodiment is 0.001.

[0077] The calculation method of multi-classification micro-F1 is as follows:

[0078] Calculate the total

[0079] Calculate the total

[0080] calculate

[0081] Among them, TP i It means that the True Positive of the i-th category is judged as the positive category; FP i It means that the FalsePositive negative class of the i-th class is judged as the positive class; TN i It means that the True Negative positive class of the i-th class is judged as the negative class; FN i It means that the False Negative class of the i-th class is judged as the negative class. Since this system is a four-class classification, the value of i is 1, 2, 3, 4.

[0082] The calculation method of multi-classification macro-F1 is as follows:

[0083] Calculate the value of each category

[0084] calculate

[0085] Finally, the trained MO-LSTM network model is obtained.

[0086] Finally, the MO-LSTM network model trained by dividing the breathing signal into time series signals of equal length can automatically identify one of the four basic emotions: joy, calmness, fear, and anger.

[0087] Furthermore, in order to verify the accuracy of the respiratory signal monitored by the present invention, the period and frequency of the respiratory signal monitored are compared with ECG. Figure 1 As shown in the figure, the subject is asked to hold the two ends of the ECG device tightly with both hands to monitor the heart rate while the mobile phone is used to monitor the user's breathing. The distance between the bottom of the mobile phone and the subject's chest is 10 cm. The subject in the figure kept his torso stable during the test to ensure that the measured chest wall movement was only caused by inhalation and exhalation. Although there are two ways to measure heart rate with this ECG device, one is to use three tags on the chest and abdomen and connect them to the ECG with a connecting wire; the other is as follows Figure 1 As shown, the user needs to hold both ends of the ECG with both hands to measure. Both methods can complete the monitoring of heart rate, but since this embodiment needs to monitor respiration, the first labeling method may affect the collection of respiration, so this embodiment chooses the second method of collecting heart rate. Although the main function of ECG is to measure heartbeats, the number of heartbeats is generally 4 times the number of respirations.

[0088] This embodiment monitors respiration simultaneously by using a smartphone to collect respiration and an ECG to collect heart rate and convert it into respiration. In each scenario, 20 minutes of data are collected, one minute as a group, to calculate the error of smartphone monitoring respiration in each scenario.

[0089] Since this embodiment recruited 5 volunteers to conduct the emotion recognition experiment, this embodiment first analyzed their breathing performance in a calm state and compared it with the ECG to obtain the error. The error between the breathing cycle monitored by this embodiment and the breathing cycle converted by ECG was used as the data of the box plot. The results are shown in Figure 2. Figure 2 As shown. Figure 2 It can be seen that the maximum value of the breathing error of different users is 4, the minimum value is 0, and the median is about 1. Among most users, 75% of the errors are less than 2. Although the errors of each user have some outliers, they will not affect the overall accuracy. The overall error is concentrated between 0.5 and 1.5. This shows the robustness of the breathing monitoring of this system for different users.

[0090] In order to evaluate the performance of breathing monitoring when the user wears clothes of different materials, this embodiment evaluates two common clothes, quick-drying material and pure cotton material. Since the purpose is mainly to analyze different clothes, only the breathing data of a user in a calm mood is collected. The error results of the two collection methods are shown in Figure 9. Fig. 9 It can be clearly seen that the breathing error is very small in both cases. The maximum error when the user wears quick-drying clothes and pure cotton clothes is 3, and the minimum error in both cases is 0.5. The median is about 1, which means that in half of the cases, the data error is less than 1 breathing cycle. This also shows that the user wearing different clothes has little effect on the breathing monitoring method of this system.

[0091] Considering the user's use of the phone, this system uses two angles: 45 degrees and 90 degrees. The angle here refers to the angle between the bottom of the phone and the chest of the person. The same breathing data of a user in a calm mood at different angles is collected, and the error results are shown in Figure 10. Fig.10 It can be seen that at 90 degrees, the median of respiratory monitoring is about 1, while at 45 degrees, the median is about 1.5, and 90 degrees is slightly better than 45 degrees. This may be because if the bottom of the phone is perpendicular to the chest, the rise and fall of the entire chest can be monitored, while at 45 degrees, the bottom of the phone is facing the junction of the chest and abdomen, and may only monitor most of the chest fluctuations, indicating that it is more appropriate to monitor breathing with the phone perpendicular to the chest. However, the difference between the two is not large, indicating that breathing can be monitored at both angles.

[0092] Furthermore, the performance of emotion classification needs to be analyzed. In order to show the robustness of the system, five users are evaluated. The experimental results are as follows: Fig.11 shown. Fig.11 (a) shows the curves of the loss decline of five people. It can be seen that the decline trends of the five curves are very similar. Basically, they all decline rapidly between 0 and 30 rounds, and then gradually stabilize, reaching convergence in about 80 rounds. Although some individual curves fluctuate greatly, they generally show a downward trend. The loss function finally converges to an order near 0, indicating that the stability of this system model is very good. Fig.11 (b) shows the average classification accuracy that depends on the person. As can be seen from the figure, the recognition accuracy of this system for the five people is basically above 80%, with only one slightly below 80%. The highest classification accuracy reached 87%, and the lowest was 79%, which meets the common emotion recognition requirements. In addition, this system also made statistics on the recognition accuracy of different genders. The first three users in the figure are boys, and the last two are girls. As can be seen from the figure, the recognition accuracy of girls is slightly higher than that of boys. This may be related to the fact that girls are more emotional, have richer emotions, are more easily affected, and their corresponding emotions are more easily aroused. From the recognition accuracy of different people and different genders, it can be seen that the recognition accuracy of different people is not much different, which also shows the reliability and robustness of this system.

[0093] In addition, this system also evaluates the different clothes that the subjects wear during the experiment. This system mainly evaluates two common materials: quick-drying material and pure cotton material. During the experiment, the subjects were asked to wear clothes of different materials, and other environmental conditions were the same. Common sense knows that clothes made of quick-drying material are lighter and closer to the body, while pure cotton clothes are slightly thicker than quick-drying material. Fig.12 As shown in a), it can be seen that the downward trends of the two curves are very similar. They both drop rapidly in the first 25 rounds and converge around 80 rounds. Moreover, the loss value at the time of convergence is close to 0. By comparing the recognition accuracy of different clothing materials, it can be seen that this system is less affected by clothing of different materials. Fig.12 b) The average recognition accuracy of quick-drying materials is 86.9565, slightly higher than the 85.5670 of pure cotton materials. However, the difference between the two is not very obvious, which also shows that the influence of users wearing different clothes (provided that they are all thin) on the recognition accuracy of this system is not very large. When this system was experimented, users wore relatively thin clothes, which can better show the fluctuations of the chest caused by breathing. If the user wears thicker clothes, such as sweaters or even down jackets, the recognition accuracy should be relatively poor, and it is even very likely that the breathing signal will not be detected. This is also the limitation of this system. If you want to break through this limitation, you may have to transmit higher frequency signals, but transmitting higher frequency signals requires special equipment, so this aspect is still very challenging.

[0094] The experiment also discusses different signal emission angles. It is mainly evaluated by Micro-f1 and Macro-f1, which are common evaluation indicators for multi-classification. This system mainly discusses the impact of 45 and 90 degrees on the system recognition performance. The signal emission conditions at 45 and 90 degrees are shown respectively. As can be seen from Table 1, at a monitoring angle of 90 degrees, the percentage of multiple indicators evaluated by the system is about 85, which is about 10 percentage points higher than the result at 45 degrees. This may be because the speaker of the mobile phone emits ultrasonic waves in a fan-shaped manner. At 90 degrees, the monitoring area of ​​the mobile phone almost covers the entire chest cavity, which can better monitor the chest fluctuations caused by breathing; while at 45 degrees, the main monitoring position of the mobile phone speaker is the junction of the chest cavity and the abdomen. This position may only contain most of the chest fluctuations and can only reflect most of the changes in the chest cavity caused by breathing. Therefore, the recognition accuracy is lower than that of the case perpendicular to the chest cavity. From this experiment, it is known that the angle at which the speaker of the mobile phone is vertical to the chest cavity is the most suitable for collecting breathing signals.

[0095] Table 1

[0096]

[0097] At the end of the experiment, different experimental distances were evaluated. The experiment was conducted with the bottom of the mobile phone about 10cm, 15cm, and 20cm away from the chest. The results are as follows: Fig.13 As shown in the figure, it can be seen that as the distance increases, the recognition accuracy of the system decreases. It can also be concluded that the difference between the two distances of 10cm and 15cm is not very large, indicating that the recognition range of the system can reach at least 15cm. However, from 15cm to 20cm, the accuracy is reduced by almost 15 percentage points. It can be concluded that the accuracy of the system's emotion recognition is good between 10cm and 15cm, and 10cm is the best monitoring distance.

[0098] The technical solution of the present invention is not limited to the above-mentioned specific embodiments. All technical variations made according to the technical solution of the present invention fall within the protection scope of the present invention.

Claims

1. A method for emotion recognition based on continuous wave sound signals, characterized in that: The following steps are involved: S1, using the speaker of the smartphone to transmit a 19KHz continuous wave signal, which is reflected by the human chest and received by the microphone of the smartphone; S2, preprocessing the received signal to obtain a breathing signal; S21, removing the received signals other than the 19KHz frequency in the received signals by bandpass filtering; S22, removing the unknown time delay between the transmitted signal and the received signal; S23, after removing the delay between the transmission signal and the reception signal, down-convert the reception signal into a baseband signal to obtain the amplitude information of the reception signal; S24, down-sampling the received signal, and then performing window sampling, with the window size set to 5s, to obtain a number of breathing signals including a complete breathing cycle; In S22, the transmission signal and the breathing signal are aligned using a cross-correlation function to remove the unknown time delay between the transmission signal and the reception signal. The specific steps are as follows: For a periodic transmission signal, the cross-correlation function of the main peaks of the transmission signal and the received signal is used to measure the delay within T / 2 reflected from the target. The cross-correlation function is defined as: Where N is the number of samples of the transmitted signal within a period T, n = -N+1, -N+2, ..., N-1; R(n) measures V tx and n samples offset V rx similarity between; assuming that R(n) reaches the main peak after Lag samples shift, because V rx Yes V tx Along with the time shift of the amplitude decay, V rx is V with Lag sample offsets overlapped tx ; Assume that the received signal is set to Lag as the transmitted signal after 1032 samples are shifted. According to the definition of R(n), the main peak is 1032; therefore, the calculation formula of the delay τ is expressed as: S3, split the breathing signal into equal-length time series signals, manually add labels, and use them as the input of the neural network. Then, input them into the MO-LSTM network composed of two layers of bidirectional LSTM and one linear layer for training, extract breathing features, and identify the four basic emotions of joy, calmness, fear and anger based on the breathing features. Finally, a trained MO-LSTM network model is obtained through machine learning. In the S3, the MO-LSTM network structure includes a forward propagation LSTM, a backward propagation LSTM, an output layer, and a linear layer. Starting from the input of a one-dimensional signal, it enters the forward propagation LSTM and the backward propagation LSTM containing memory units and related gates to control whether the information is remembered, output, or forgotten, and updates the multidimensional hidden output of the forward propagation LSTM for 3 time steps as the input of the backward propagation LSTM for 3 time steps. Then, it enters the linear layer with a learning bias function, flattens the display, and finally outputs the probability values ​​of the four basic emotions of joy, calmness, fear, and anger, and selects the highest probability as this type of emotion; the learning rate of the MO-LSTM network is 0.001; S4. The breathing signal is divided into time series signals of equal length and the trained MO-LSTM network model automatically identifies one of the four basic emotions: joy, calmness, fear and anger.

2. The method for emotion recognition based on continuous wave sound signal according to claim 1, characterized in that: In S1, the bottom of the smartphone is aimed at the chest of the person, and the smartphone is 8-12 cm away from the chest of the person.

3. The method for emotion recognition based on continuous wave sound signal according to claim 1, characterized in that: In S21, the passband of the bandpass filter is set to 18.5-19.5 KHz.