A method and system for detecting and translating baby crying

By utilizing millimeter wave radar signals and speech translation optimization models, combined with the transformer network, the problem of false alarms and privacy leakage caused by insufficient samples in baby cry detection is solved, and high-accuracy cry detection and translation results are achieved.

CN118212939BActive Publication Date: 2024-08-27HANGZHOU MEARI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410627276.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-21
Publication Date
2024-08-27
Estimated Expiration
2044-05-21

AI Technical Summary

Technical Problem

Existing baby cry detection methods require a sufficient number of samples for model training. Insufficient samples can easily lead to false positives and translation classification deviations, and adding cameras will raise concerns about privacy leaks and cannot effectively improve detection results.

Method used

Using millimeter wave radar signal detection frequency and amplitude parameters, combined with the speech translation optimization model, self-learning pre-training and fine-tuning training are performed through the transformer network to obtain the type of baby cry, and the detection and translation results are obtained through comprehensive analysis, avoiding the impact on user privacy. infringement.

Benefits of technology

It improves the accuracy of baby cry detection and translation, reduces false positives, has privacy protection, and can still ensure the accuracy of the model when the number of samples is insufficient.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118212939B
    Figure CN118212939B
Patent Text Reader

Abstract

The present application provides a method and system for detecting and translating a baby's cry, which belongs to the field of speech recognition technology, including: collecting millimeter wave radar signals of the baby's environment, calculating the frequency and amplitude parameters based on the millimeter wave radar signals, comparing the calculation results with the preset crying parameter intervals, and obtaining the first crying type of the baby; obtaining sample audio data of the baby's environment, and obtaining a speech translation optimization model after training; collecting audio data of the baby's environment, extracting spectral features from the audio data and inserting them into the speech translation optimization model for calculation, and obtaining the second crying type of the baby; combining the first crying type and the second crying type for comprehensive analysis to obtain the detection translation result. This solution can not only accurately detect crying, but also translate the reasons for the baby's crying, has a strong anti-interference ability, can effectively reduce algorithm misdetection and missed detection, and provide the baby's real-time needs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of speech recognition, and in particular relates to a detection and translation method and system for baby crying. Background Art

[0002] The accelerated pace of life makes it difficult for families who have just gotten married to have children to accompany their babies all the time. As new parents, they often cannot accurately interpret the emotions of their babies. These situations will lead to the problem that parents cannot take care of their babies in time and meet their needs. Babies often express their needs for the outside world through crying. Therefore, it is particularly important to detect the crying of babies through smart devices and accurately give the reasons for crying.

[0003] A method and device for detecting baby crying based on audio and video fusion is currently disclosed (patent application number: CN202111422641.2), which includes: obtaining an audio and video file to be detected, splitting the audio and video file to obtain audio data and video data; extracting a mel spectrum graph of the audio data, and using a ResNet neural network to extract abstract features of the mel spectrum graph to obtain speech features; extracting grayscale images of continuous frames in the video data, and using a 3DCNN network to extract abstract features of the grayscale image to obtain visual features; fusing the speech features and the visual features to obtain mixed features; inputting the mixed features into a trained ResNet residual network to obtain a crying detection result. Disclosed is a method and device for intelligently identifying the category of infant crying (patent application number: CN202110222720.2), which includes: obtaining at least the audio features of the sound when an infant cries and the vibration spectrum corresponding to the vibration of the infant's vocal cords; performing feature fusion on the audio features and the vibration spectrum, and outputting the fused features; inputting the fused features into a preset neural network, and outputting a coded feature vector corresponding to the crying state; and outputting the crying category of the crying state according to the coded feature vector. Disclosed is a method for translating baby crying based on sound feature recognition (patent application number: CN201811114781.1), which includes: according to the sound feature differences of the baby crying under different physiological states, using computer sound processing technology, respectively extracting the baby crying sound feature parameters under different physiological states: timbre, pitch, loudness, energy, frequency and 11 feature parameters of the frequency co-occurrence matrix, a total of 16 feature parameters; through the BP neural network algorithm, collecting the baby crying sound clips under different physiological states, after denoising and filtering the sound clips, establishing the corresponding relationship between the baby crying sound feature differences and the six physiological states of hunger, sleepiness, pain, boredom, fear, and discomfort, and giving the recognition results as: hunger, sleepiness, pain, boredom, fear, and discomfort.

[0004] The above public scheme mainly extracts the spectral features of the audio, or combines it with image information, and uses supervised deep learning training methods for detection. This type of method has strict requirements on data samples, and it is impossible to obtain a sufficient number of samples in actual situations. This leads to frequent abnormal false alarms in crying detection when the model has never seen the scene, and the misclassification of crying translation will be more serious. If the introduction of a camera is added during the translation stage, it will increase users' concerns about privacy leakage, which is difficult to achieve at the same time, and the detection effect will not be qualitatively improved. Summary of the invention

[0005] The present application provides a method and system for detecting and translating baby cries, aiming to solve the problem that existing baby cry detection methods require a sufficient number of samples for model training, which is difficult to achieve in actual situations. When the samples are insufficient, it is easy to cause false positives in the cry detection results, deviations in the translation classification, low accuracy of the detection results, and adding a camera during the translation stage will increase users' concerns about privacy leakage, and cannot effectively improve the detection effect.

[0006] In order to achieve the above object, the present invention adopts the following technical solutions:

[0007] A method for detecting and translating baby crying, comprising:

[0008] Collecting millimeter-wave radar signals of the baby's environment, calculating frequency and amplitude parameters based on the millimeter-wave radar signals, comparing the calculated parameters with a preset crying parameter interval, and obtaining the baby's first crying type;

[0009] Obtain sample audio data of the baby's environment, including a labeled strong sample data set and an unlabeled weak sample data set. Extract the spectral features of the unlabeled weak sample data set and substitute them into the transformer network for self-learning pre-training of the model to obtain a pre-trained model. Extract the spectral features of the labeled strong sample data set to fine-tune the pre-trained model to obtain a speech translation optimization model.

[0010] Collect audio data of the baby's environment, extract spectral features from the audio data and input them into the speech translation optimization model for calculation to obtain the baby's second cry type;

[0011] A comprehensive analysis is performed on the first cry type and the second cry type to obtain a detection translation result.

[0012] As a preferred embodiment, the process of establishing the preset crying parameter interval is specifically as follows:

[0013] Obtaining sample millimeter-wave radar signals of the infant's environment;

[0014] Perform fast Fourier transform on the sample millimeter-wave radar signal to obtain a spectrum diagram in the distance dimension. By searching the range gate, extract the phase once in each frame period, and transmit N frames in a cycle to obtain the phase value change with the number of frames. Use phase unwrapping to perform phase expansion, perform phase difference calculation on the expanded phase, and obtain the initial phase, where N is a natural number;

[0015] According to the difference between the heart rate and breathing rate of the infant, the frequency value formed by the phase change is filtered and distinguished by using a bandpass filter, and the phase signal is subjected to a fast Fourier transform, and the corresponding breathing rate and heart rate within N frame times are obtained according to the peak value and harmonic wave characteristics;

[0016] The sample millimeter wave radar signals include no baby signal, baby not crying signal, baby crying signal because of hunger, baby crying signal because of sleepiness, baby crying signal because of pain, baby crying signal because of discomfort and baby crying signal because of hiccups. h sin(f h t+φ)+A b sin(f b t+φ) counts the frequency and amplitude ranges of different signal types in the sample millimeter-wave radar signal, and obtains the preset crying parameter range after summarizing, where s(t) represents the sine signal, f h Respiratory frequency, f b Indicates the heart rate, A h Indicates the heartbeat amplitude, A b represents the respiratory amplitude, and φ represents the initial phase.

[0017] Preferably, the process of obtaining the sample audio data of the baby's environment is specifically as follows:

[0018] The audio data of the baby's family scene is obtained and truncated at 6-second intervals. The truncated audio data is labeled manually. When there is crying in the truncated audio data, it is marked as a strong positive sample. When there is no crying in the truncated audio data, it is marked as a strong negative sample. After aggregation, a labeled strong sample dataset is established, where strong positive samples include hunger, sleep, pain, discomfort, and hiccups.

[0019] Audio data from open source audio databases and audio data from daily life are obtained, cut into 6-second time intervals, and aggregated to establish an unlabeled weak sample dataset.

[0020] Preferably, after the audio data is truncated at a time interval of 6 seconds, the truncated audio data needs to be sliced, and the slicing process is specifically as follows:

[0021] Taking 3 seconds as a slicing period, the truncated audio data in the labeled strong sample dataset and the unlabeled weak sample dataset are sliced ​​from the starting position, and the slicing is performed every 1.5 seconds to obtain 0-3 seconds audio data, 1.5-4.5 seconds audio data, and 3-6 seconds audio data of the labeled strong sample dataset and 0-3 seconds audio data, 1.5-4.5 seconds audio data, and 3-6 seconds audio data of the unlabeled weak sample dataset.

[0022] Preferably, the method for extracting the spectral features of the unlabeled weak sample data set is specifically as follows: extracting the Mel spectrum feature maps of the 0-3 seconds audio data, 1.5-4.5 seconds audio data, and 3-6 seconds audio data of the unlabeled weak sample data set respectively, and re-segmenting each Mel spectrum feature map into 16x16 image blocks at a displacement interval of 10x10 to obtain a first feature block, flattening the first feature block and splicing it in the channel dimension to obtain m*3*256 first feature maps, where m is a natural number;

[0023] The method for extracting spectral features of a labeled strong sample data set is specifically as follows: spectral feature maps of 0-3 seconds audio data, 1.5-4.5 seconds audio data, and 3-6 seconds audio data of the labeled strong sample data set are respectively extracted, and mask operations with random initial positions and fixed mask lengths are performed on the obtained three spectral feature maps in the Mel spectrum bin dimension and the time dimension, and the operated spectral feature maps are re-divided into 16x16 image blocks with a displacement interval of 10x10 to obtain second feature blocks, and the second feature blocks are flattened and spliced ​​to obtain M*3*256 second feature maps, where M is a natural number.

[0024] Preferably, a comprehensive analysis is performed in combination with the first cry type and the second cry type to obtain a detection translation result, specifically:

[0025] When the first cry type is no baby, the detection translation result is non-cry;

[0026] When the first crying type is that there is a baby not crying / the baby is hungry / the baby is sleepy / the baby is in pain / the baby is uncomfortable / the baby is hiccuping, determining whether the first crying type is consistent with the second crying type;

[0027] If they are consistent, the detection translation result is the first cry type or the second cry type at this time;

[0028] If they are inconsistent, the comprehensive scores of different types of baby cries are calculated separately using a preset comprehensive scoring algorithm, and the two types with the highest scores are taken as possible results. A baby emotion prediction time series table is established based on the baby's historical information. The possible results are analyzed according to the baby emotion prediction time series table, and one type of possible results is discarded to obtain the detection translation result. The baby crying types include baby not crying, baby hungry, baby sleepy, baby in pain, baby uncomfortable, and baby hiccups.

[0029] As a preference, the preset comprehensive scoring algorithm is specifically:

[0030] The confidence level is set on the baby's cry type according to the first cry type and the second cry type, and the confidence level is set according to the formula Calculate the scores of each type to get the comprehensive scores of each baby crying type, where class(c1,c2) ​​represents the comprehensive scores of the baby crying types. represents the confidence of the first cry type, Indicates the confidence of the second cry type.

[0031] A baby crying detection and translation system, comprising:

[0032] Millimeter-wave radar detection and translation module: used to collect millimeter-wave radar signals from the baby's environment, calculate the frequency and amplitude parameters based on the millimeter-wave radar signals, compare the calculated parameters with the preset crying parameter range, and obtain the baby's first crying type;

[0033] Speech translation optimization model building module: used to obtain sample audio data of the baby's environment. The sample audio data includes a labeled strong sample data set and an unlabeled weak sample data set. The spectral features of the unlabeled weak sample data set are extracted and substituted into the transformer network for self-learning pre-training of the model to obtain a pre-trained model. The spectral features of the labeled strong sample data set are extracted to fine-tune the pre-trained model to obtain a speech translation optimization model.

[0034] Audio data detection and translation module: used to collect audio data of the baby's environment, extract spectral features from the audio data and input them into the speech translation optimization model to calculate and obtain the second crying type of the baby;

[0035] Detection translation result module: used to perform comprehensive analysis on the first cry type and the second cry type to obtain a detection translation result.

[0036] An electronic device comprises a memory and a processor, wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement a method for detecting and translating baby crying as described in any one of the above.

[0037] A computer-readable storage medium, wherein a computer program stored in the storage medium, when executed by a computer, implements any of the above-mentioned methods for detecting and translating baby crying.

[0038] The present invention has the following beneficial effects:

[0039] (1) This solution combines millimeter-wave radar signal detection and audio detection of the speech translation optimization model to detect and translate the baby's crying. The millimeter-wave radar signal monitors the breathing and heart rate of a person. This method can roughly determine the state of the target within the monitoring range without involving the privacy of the person, especially whether the monitored target is within the monitoring area. It is very accurate and is not affected by light. It has high real-time performance and strong penetration. It is also privacy-protecting and will not leak privacy. Combining these properties of millimeter-wave radar monitoring, the speech translation optimization model is used for self-learning based on the unlabeled weak sample data set and fine-tuning on the labeled strong sample data set. This can effectively reduce false alarms of crying and greatly improve the accuracy of crying translation, thereby effectively improving the accuracy of the baby's crying detection and translation results.

[0040] (2) The sample data for training the speech translation optimization model in this scheme is easy to obtain, mainly from open source databases and daily life. The infant sample data plays a role in fine-tuning the trained model. In the case of limited infant sample data, the training of the speech translation optimization model can still be completed. That is, when the amount of infant sample data that can be obtained is insufficient, the accuracy of the model can be guaranteed, and it has practical applicability.

[0041] (3) In this scheme, when two detection translation results, that is, possible results, are obtained, a baby emotion prediction time series table is established, and the two results are analyzed with reference to the rules of baby emotion expression, and one of them is discarded. Finally, the most appropriate detection translation result is output, thereby improving the accuracy of the detection translation of this scheme. In this way, the translation effect can be continuously and effectively improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 A schematic diagram of a flow chart of a method for detecting and translating infant crying in the present invention;

[0043] Figure 2 This is a flow chart of a specific implementation scheme in Example 1 of the present invention;

[0044] Figure 3 It is a schematic diagram of the structure of the detection and translation system in the present invention. DETAILED DESCRIPTION

[0045] Example 1

[0046] like Figure 1As shown, a method for detecting and translating baby crying includes the following steps:

[0047] S11, collecting millimeter-wave radar signals of the environment in which the baby is located, calculating frequency and amplitude parameters based on the millimeter-wave radar signals, comparing the calculated parameters with a preset crying parameter interval, and obtaining the first crying type of the baby;

[0048] S12, obtaining sample audio data of the environment in which the baby is located, the sample audio data including a labeled strong sample data set and an unlabeled weak sample data set, extracting the spectral features of the unlabeled weak sample data set and substituting them into the transformer network for self-learning pre-training of the model to obtain a pre-trained model, extracting the spectral features of the labeled strong sample data set to perform fine-tuning training on the pre-trained model, and obtaining a speech translation optimization model;

[0049] S13, collecting audio data of the baby's environment, extracting frequency spectrum features from the audio data and inputting them into the speech translation optimization model for calculation to obtain the second crying type of the baby;

[0050] S14. Perform a comprehensive analysis on the first cry type and the second cry type to obtain a detection translation result.

[0051] The flowchart of this embodiment is as follows Figure 2 The specific implementation process is as follows:

[0052] 1 Analysis of millimeter wave radar signal processing process.

[0053] 1.1 Millimeter wave radar signal data acquisition.

[0054] In a standard installation environment, the millimeter-wave radar transmit and receive signals are collected and divided into the following categories of data based on whether there is a baby within the known target detection range, whether the baby is crying, and the reason for crying:

[0055] No baby signal;

[0056] There are baby no crying signals;

[0057] Baby crying signals that he is hungry;

[0058] Baby cry signal when he is sleepy;

[0059] Baby cries of pain signals;

[0060] Baby crying signals of discomfort;

[0061] Baby hiccup cry signal;

[0062] 1.2 Millimeter wave radar signal phase difference and frequency domain feature extraction.

[0063] According to research, millimeter waves can detect human breathing and heartbeat by detecting the phase change of the FMCW signal at a specific distance gate caused by the tiny fluctuations of the human chest or heart, and obtaining the changing characteristics of human breathing and heartbeat. The formula is:

[0064]

[0065] Among them, Δφ b is the phase change, and ΔR is the tiny displacement change caused by the heart or chest cavity.

[0066] Perform a fast Fourier transform (FFT) on the original millimeter-wave radar signal data to obtain a spectrum diagram in the distance dimension. By searching the range gate, extracting the phase once in each frame period (50ms), and cyclically transmitting N frames, the target's phase changes with the number of frames. Use phase unwrapping to perform phase expansion, perform phase difference calculation on the expanded phase, and obtain the initial phase, where N is a natural number.

[0067] According to the difference in the infant's heartbeat and breathing frequencies, a bandpass filter is used to filter and distinguish the phase value (the frequency value formed by the phase change), and the phase signal is subjected to a fast Fourier transform. Based on the peak value and its harmonic characteristics, the corresponding breathing and heartbeat frequencies within N frame times are obtained.

[0068] 1.3 Parameter estimation.

[0069] Since the signal wave of breathing and heartbeat is a non-stationary signal that is similar to a sine wave, the millimeter-wave radar signal data set collected in 1.1 is processed separately using the method in 1.2, and the parameters such as frequency and amplitude of each data set are estimated using the following formula.

[0070] s(t)=A h sin(f h t+φ)+A b sin(f b t+φ);

[0071] where f h Respiratory frequency, f b Indicates the heart rate, A h Indicates the heartbeat amplitude, A bRepresents the breathing amplitude, and φ represents the initial phase. By estimating the parameters of frequency and amplitude, the frequency and amplitude ranges of the baby in various crying and non-crying situations are statistically analyzed. Based on these two range values, the preliminary judgment results of the baby's emotions under the millimeter-wave radar signal are obtained. That is, by collecting the millimeter-wave radar signal of the baby's environment, the signal is processed and compared with the preset crying parameter range to determine the crying type of the baby at this time. The crying type of the baby at this time is the first crying type. The first crying type includes seven situations: no baby, baby not crying, baby hungry, baby sleepy, baby in pain, baby uncomfortable, and baby hiccups. It is one of the seven types.

[0072] In 1.2, the radar signal is analyzed and the corresponding frequency domain waveform and initial phase are obtained through FFT transformation. Formula s(t) is the actual modeling of heartbeat and breathing signals in the frequency domain (using actual waveform data to estimate the parameters of this formula). Take the breathing signal as an example: because the signal wave of each breath is approximately a sine wave, the sin sine function is used to estimate the frequency and amplitude range of the breathing signal in different states, that is, the parameters f and A. Through the known classified signal data set, the value range of f and A corresponding to different infant states is statistically determined, and 7 groups of approximate ranges of f and A can be obtained respectively (each signal type corresponds to a group of f and A value ranges). The heartbeat signal also has the same properties. The heartbeat and breathing themselves are independent of each other. Bandpass filtering is performed in 1.2. Therefore, in each state, the heartbeat corresponds to a group of f and A ranges, and the breathing corresponds to a group of f and A ranges. When predicting the actual waveform, we get the estimated parameters f and A of breathing and heartbeat respectively, and compare the seven groups of parameters with the smallest sum of heartbeat and breathing errors (compare the f parameter first, if f is difficult to distinguish, compare the A parameter. The f parameter is the main one, and A is the auxiliary one. If it is still not distinguishable, estimate it according to the position of f in the range), that is, the signal is the corresponding category at this time, and the prediction is completed. (Actual effect: it is more accurate for whether there is a baby and whether it is crying, but the subdivision of crying translation is not as accurate as the speech model). The value range of the above seven groups of f and A is the preset crying parameter range.

[0073] 2 Analysis of speech signal processing process.

[0074] 2.1 Audio data acquisition.

[0075] Audio data of baby family scenes are collected, and the audio is cut every 6 seconds. If a baby cries, it is marked as a strong positive sample (crying sample) through manual calibration, otherwise it is marked as a strong negative sample (non-crying sample), and a labeled strong sample data set is established in a specific environment. The strong positive samples of crying are translated into baby emotions by specific groups such as professional infant medical staff, nannies, and mothers, and the strong positive samples are further divided into five categories of labels: hungry, sleepy, painful, uncomfortable, and hiccups.

[0076] The audio data in the open source audio database and the audio data in daily life are truncated every 6 seconds to establish an unlabeled weak sample dataset under common environments.

[0077] 2.2 Audio data slicing.

[0078] In actual applications, it is found that the probability of false alarms and missed alarms is high when detecting 3 seconds of audio alone, which affects the actual use effect of the algorithm. Taking into account the strong correlation between two adjacent audio segments, the probability of false alarms and missed alarms can be effectively reduced by comprehensively judging the results of multiple detections of continuous audio. Combined with the real-time requirements, 6 seconds of audio is used to output the results in this embodiment. The input 6 seconds of audio is sliced, and the specific slicing method is as follows: every 3 seconds is used as a slice, and it is cut once every 1.5 seconds from the starting position of the last cut. If the above method is used, a 6-second audio can be converted into three 3-second audios of 0-3 seconds, 1.5-4.5 seconds, and 3-6 seconds.

[0079] Taking 3 seconds as a slicing period, the truncated audio data in the labeled strong sample dataset and the unlabeled weak sample dataset are sliced ​​from the starting position, and the slicing is performed every 1.5 seconds to obtain 0-3 seconds audio data, 1.5-4.5 seconds audio data, and 3-6 seconds audio data of the labeled strong sample dataset and 0-3 seconds audio data, 1.5-4.5 seconds audio data, and 3-6 seconds audio data of the unlabeled weak sample dataset.

[0080] 2.3 Spectral feature preprocessing.

[0081] For each audio in the unlabeled weak sample dataset in 2.1, use the method 2.2 to slice and extract the Mel spectrum feature map, and obtain the Mel spectrum feature map of the corresponding samples in 3 segments. Re-segment each spectrum feature map into 16x16 image blocks, set the displacement interval of the segmentation to 10x10, and obtain the corresponding feature blocks (number: M). Randomly select 80% to participate in training (m=M*0.8), flatten each feature block, and then each audio spectrum feature becomes m 1x256 features. Select a feature block to participate in training from each of the three audio segments, and perform feature concatenation in the channel dimension to obtain m 3*256 feature maps. Send the feature to the transformer network for model self-learning pre-training to obtain a pre-trained model. Where m and M are both natural numbers.

[0082] Similarly, each sample in the labeled strong sample data set in 2.1 is sliced ​​and the spectrum features are extracted. The three spectrum features obtained are masked in the Mel spectrum bin dimension and time dimension with random initial positions and fixed mask lengths. Each spectrum feature map is re-divided into M image blocks. The size and displacement interval of each image block are consistent with the weak sample data processing, and they are flattened and spliced ​​to obtain M 3*256 feature maps. The feature maps obtained using the strong sample data set are fine-tuned on the basis of the pre-trained model to obtain the speech translation optimization model.

[0083] In actual application, all the reorganized and blocked spectral features (M*3*256) are directly sent to the model. After optimizing the model reasoning, the final network feature map and the corresponding speech translation result are obtained.

[0084] 2.4 Speech model self-training and fine-tuning.

[0085] According to 2.3, the unlabeled weak sample data set is feature preprocessed, and the feature reconstruction results of the 20% feature blocks that are not involved in the training are compared with the feature similarity between the actual feature blocks using the model. In this embodiment, MSE (mean square error) is used to calculate the error between the two. The MSE calculation result is used to complete the self-learning of the transformer network to obtain the initial pre-training model. The loss function is as follows:

[0086] loss = MSE(NT patch ,R patch );

[0087] NT patch Represents the feature block that is not involved in training, R patch It represents the feature block at the corresponding position reconstructed by the model, and loss represents the loss function.

[0088] Using the feature preprocessing of the labeled strong sample data set in 2.3, on the basis of the pre-trained model obtained by self-learning, the pre-processed features of the strong sample data set are used to perform model fine-tuning training, optimize the parameters of the backbone network model, and complete the detection and translation of baby crying by adding average pooling and linear classification to the features obtained by the backbone. That is, the audio data of the baby's environment is collected, the spectral features of the audio data are extracted, and then the audio data is input into the speech translation optimization model for calculation to obtain the second crying type of the baby. The second crying type includes six situations: non-crying, baby hungry, baby sleepy, baby pain, baby discomfort, and baby hiccups, which is one of the six types.

[0089] 3 Comprehensive decision-making module.

[0090] In practical applications, this solution needs to combine the millimeter wave radar monitoring results (i.e., the first crying type) and the audio classification results (i.e., the second crying type) to make a comprehensive decision. Given that radar monitoring data is relatively accurate in detecting the presence or absence of babies, but when it comes to the segmentation of crying emotion translation, the effect is weaker than that of the large voice model classification. Therefore, based on this actual situation, the following results can be obtained:

[0091] When the radar monitoring data shows that there is no baby, that is, the first crying type is no baby, if the audio classification result is emotional crying, the output analysis result is: non-crying (that is, the detection translation result is non-crying). This audio segment is the crying detection false positive data. With the customer's authorization, the audio segment is saved to the local user database. When the collection reaches a certain amount, the customer can confirm whether to fine-tune the model of the false positive data in the database according to their own needs to optimize the false positives of the voice detection model in actual applications.

[0092] When the radar monitoring data shows that the result is one of the following six situations: baby not crying, baby hungry, sleepy, in pain, uncomfortable, or hiccups (i.e., when the first cry type is baby not crying / baby hungry / baby sleepy / baby in pain / baby uncomfortable / baby hiccups), it is determined whether the first cry type is consistent with the second cry type. If they are consistent, the detection translation result is the first cry type or the second cry type at this time. For example, if the first cry type is baby hungry and the second cry type is baby hungry, then the detection translation result at this time is baby hungry.

[0093] If they are inconsistent, the confidence of the corresponding category is set to 1 according to the first cry type, and the other categories are set to 0. For example, when the first cry type at this time is that the baby is hungry, the confidence of the six types of baby cry types in the first cry type is 0-1-0-0-0-0. ; Six confidences under the corresponding labels will also be obtained in audio detection, that is, the confidence is set on the corresponding category according to the second cry type, and the sum of the confidences of the six categories is 1. For example, the second cry type is that the baby is sleepy, and the confidence is 0-0-1-0-0-0. The non-crying sound in the second cry type corresponds to the baby not crying in the baby cry type. The baby cry types include six types: baby not crying, baby hungry, baby sleepy, baby in pain, baby uncomfortable, and baby hiccups.

[0094] Combining the radar detection confidence and the audio detection confidence, the comprehensive score of each category is calculated using the following formula:

[0095]

[0096] Where class(c1,c2) ​​represents the comprehensive score of the baby's crying type. represents the confidence of the first cry type, represents the confidence of the second cry type, Indicates the confidence level that the radar detected a baby but was not crying. Indicates the confidence level of the audio detection as non-crying, and the other labels are corresponding (1: hungry 2: sleepy 3: pain 4: uncomfortable 5: hiccups). According to this formula, by multiplying the respective coefficients, the comprehensive score of each category of baby crying type can be obtained. For example, the type of baby hungry, is equal to 1, =0, the comprehensive score is 0.3*1+0.7*0=0.3; the type of baby sleepiness, is equal to 0, Equal to 1, the comprehensive score is 0.3*0+0.7*1=0.7; the other categories are 0, and the top two scores are the baby is sleepy and the baby is hungry, and the baby is sleepy and the baby is hungry are possible results.

[0097] In order to improve the reliability of the baby emotion translation results, this solution also adds a baby emotion prediction time series table with reference to the actual application situation. By querying the classification results of the previous period and combining the current analysis, the final decision is given. Record once every hour, and the recording period defaults to 48 hours (can be set according to the actual needs of the user). The sequence record is as follows: After the device is working, if the radar classification and voice classification results are consistent, the category corresponding to the current maximum score is recorded, and the number of times each category appears in this hour is counted. The category with the most occurrences is recorded in the list (the first recording period can also be given by the customer, and manual calibration is performed according to the reason for the baby's crying, such as 7 o'clock, the baby is hungry and crying, etc.). At this stage, the output category is based on the category corresponding to the maximum comprehensive score. The establishment of the sequence table requires the classification results of each cry. The state with the most categories in 1 hour will be recorded. The calculation formula for each test result is the calculation method of class (c1, c2) mentioned above. The test result will give a result every 6 seconds, but the record table is recorded once every hour.

[0098] After the initial baby emotion prediction time series table is established, the possible results are analyzed based on the baby's habit of expressing emotions in the table as an auxiliary reference, and the inappropriate types are discarded. For example: the record of the previous hour is that the baby is hungry and crying, then in the current hour, there are two types: baby sleepy and baby hungry. The baby hungry is not in line with the actual situation, so the baby sleepy is finally used as the final detection translation result. Use the same method to count the number of times each category appears in this hour, and the category with the most occurrences is updated to the baby emotion prediction time series to ensure that the current sequence is the latest record cycle. This method can greatly reduce the misclassification of baby emotion translation, and the translation results will become more accurate with use.

[0099] Example 2

[0100] like Figure 3 As shown, a detection and translation system for baby crying includes:

[0101] Millimeter wave radar detection and translation module 10: used to collect millimeter wave radar signals of the baby's environment, calculate frequency and amplitude parameters based on the millimeter wave radar signals, compare the calculated parameters with the preset crying parameter interval, and obtain the first crying type of the baby;

[0102] Speech translation optimization model establishment module 20: used to obtain sample audio data of the environment in which the baby is located, the sample audio data includes a labeled strong sample data set and an unlabeled weak sample data set, extract the spectral features of the unlabeled weak sample data set and substitute them into the transformer network for self-learning pre-training of the model to obtain a pre-trained model, extract the spectral features of the labeled strong sample data set to perform fine-tuning training on the pre-trained model, and obtain a speech translation optimization model;

[0103] Audio data detection and translation module 30: used to collect audio data of the baby's environment, extract spectral features from the audio data and input them into the speech translation optimization model for calculation to obtain the second crying type of the baby;

[0104] The detection translation result module 40 is used to perform a comprehensive analysis on the first crying type and the second crying type to obtain a detection translation result.

[0105] One implementation of the above system is that in the millimeter wave radar detection and translation module 10, the millimeter wave radar signal of the baby's environment is collected, and the frequency and amplitude parameters are calculated based on the millimeter wave radar signal. The calculated parameters are compared with the preset crying parameter interval to obtain the first crying type of the baby. In the speech translation optimization model establishment module 20, sample audio data of the baby's environment is obtained, and the sample audio data includes a labeled strong sample data set and an unlabeled weak sample data set. The spectral features of the unlabeled weak sample data set are extracted and substituted into the transformer network for self-learning pre-training of the model to obtain a pre-trained model, and the spectral features of the labeled strong sample data set are extracted to fine-tune the pre-trained model to obtain a speech translation optimization model. In the audio data detection and translation module 30, audio data of the baby's environment is collected, and the spectral features of the audio data are extracted and substituted into the speech translation optimization model for calculation to obtain the second crying type of the baby. In the detection and translation result module 40, a comprehensive analysis is performed in combination with the first crying type and the second crying type to obtain a detection and translation result.

[0106] Example 3

[0107] Based on the above embodiments, this embodiment provides an electronic device.

[0108] Example 4

[0109] Based on the above embodiments, this embodiment provides a storage medium.

[0110] The above description is only a specific embodiment of the present invention, but the technical features of the present invention are not limited thereto. Any changes or modifications made by any technician in the field of the present invention are included in the patent scope of the present invention.

Claims

1. A method for detecting and translating baby crying, characterized in that: include: The millimeter-wave radar signal of the environment in which the baby is located is collected, and the frequency and amplitude parameters are calculated based on the millimeter-wave radar signal. The calculated parameters are compared with the preset crying parameter interval to obtain the first crying type of the baby. The process of establishing the preset crying parameter interval is specifically as follows: obtaining a sample millimeter-wave radar signal of the environment in which the baby is located; performing a fast Fourier transform on the sample millimeter-wave radar signal to obtain a spectrum diagram in the distance dimension, extracting a phase once in each frame period by searching the range gate, cyclically transmitting N frames, obtaining a phase change with the number of frames, performing phase unwrapping on the phase, performing a phase difference operation on the unfolded phase, and obtaining an initial phase, wherein N is a natural number; According to the difference between the heart rate and breathing rate of the baby, the frequency value formed by the phase change is filtered and distinguished by a bandpass filter, and the phase signal is fast Fourier transformed. According to the peak value and harmonic wave characteristics, the corresponding breathing frequency and heart rate within N frame time are obtained; the sample millimeter wave radar signal includes a signal of no baby, a signal of a baby not crying, a signal of a baby crying because of hunger, a signal of a baby crying because of sleepiness, a signal of a baby crying because of pain, a signal of a baby crying because of discomfort, and a signal of a baby crying because of hiccups. The formula s(t)=A h sin(f h t+φ)+A b sin(f b t+φ) counts the frequency and amplitude ranges of different signal types in the sample millimeter-wave radar signal, and obtains the preset crying parameter range after summarizing, where s(t) represents the sine signal, f h Respiratory frequency, f b Indicates the heart rate, A h Indicates the heartbeat amplitude, A b represents the respiratory amplitude, φ represents the initial phase; Obtain sample audio data of the baby's environment, including a labeled strong sample data set and an unlabeled weak sample data set. Extract the spectral features of the unlabeled weak sample data set and substitute them into the transformer network for self-learning pre-training of the model to obtain a pre-trained model. Extract the spectral features of the labeled strong sample data set to fine-tune the pre-trained model to obtain a speech translation optimization model. Collect audio data of the baby's environment, extract spectral features from the audio data and input them into the speech translation optimization model for calculation to obtain the baby's second cry type; A comprehensive analysis is performed on the first cry type and the second cry type to obtain a detection translation result.

2. The method for detecting and translating baby crying according to claim 1, characterized in that: The process of obtaining sample audio data of the baby's environment is as follows: The audio data of the baby's family scene is obtained and truncated at 6-second intervals. The truncated audio data is labeled manually. When there is crying in the truncated audio data, it is marked as a strong positive sample. When there is no crying in the truncated audio data, it is marked as a strong negative sample. After aggregation, a labeled strong sample dataset is established, where strong positive samples include hunger, sleep, pain, discomfort, and hiccups. Audio data from open source audio databases and audio data from daily life are obtained, cut into 6-second time intervals, and aggregated to establish an unlabeled weak sample dataset.

3. The method for detecting and translating baby crying according to claim 2, characterized in that: After the audio data is truncated at 6-second intervals, the truncated audio data needs to be sliced. The slicing process is as follows: Taking 3 seconds as a slicing period, the truncated audio data in the labeled strong sample dataset and the unlabeled weak sample dataset are sliced ​​from the starting position, and the slicing is performed every 1.5 seconds to obtain 0-3 seconds audio data, 1.5-4.5 seconds audio data, and 3-6 seconds audio data of the labeled strong sample dataset and 0-3 seconds audio data, 1.5-4.5 seconds audio data, and 3-6 seconds audio data of the unlabeled weak sample dataset.

4. The method for detecting and translating baby crying according to claim 3, characterized in that: The method of extracting the spectral features of the unlabeled weak sample data set is specifically as follows: extracting the Mel spectrum feature maps of the 0-3 second audio data, 1.5-4.5 second audio data, and 3-6 second audio data of the unlabeled weak sample data set respectively, re-segmenting each Mel spectrum feature map into 16x16 image blocks at a displacement interval of 10x10 to obtain the first feature block, flattening the first feature block and splicing it in the channel dimension to obtain m*3*256 first feature maps, where m is a natural number; The method for extracting spectral features of a labeled strong sample data set is specifically as follows: spectral feature maps of 0-3 seconds audio data, 1.5-4.5 seconds audio data, and 3-6 seconds audio data of the labeled strong sample data set are respectively extracted, and mask operations with random initial positions and fixed mask lengths are performed on the obtained three spectral feature maps in the Mel spectrum bin dimension and the time dimension, and the operated spectral feature maps are re-divided into 16x16 image blocks with a displacement interval of 10x10 to obtain second feature blocks, and the second feature blocks are flattened and spliced ​​to obtain M*3*256 second feature maps, where M is a natural number.

5. The method for detecting and translating baby crying according to claim 1, characterized in that: A comprehensive analysis is performed on the first cry type and the second cry type to obtain the detection translation results, which are as follows: When the first cry type is no baby, the detection translation result is non-cry; When the first crying type is that there is a baby not crying / the baby is hungry / the baby is sleepy / the baby is in pain / the baby is uncomfortable / the baby is hiccuping, determining whether the first crying type is consistent with the second crying type; If they are consistent, the detection translation result is the first cry type or the second cry type at this time; If they are inconsistent, the comprehensive scores of different types of baby cries are calculated separately using a preset comprehensive scoring algorithm, and the two types with the highest scores are taken as possible results. A baby emotion prediction time series table is established based on the baby's historical information. The possible results are analyzed according to the baby emotion prediction time series table, and one type of possible results is discarded to obtain the detection translation result. The baby crying types include baby not crying, baby hungry, baby sleepy, baby in pain, baby uncomfortable, and baby hiccups.

6. The method for detecting and translating baby crying according to claim 5, characterized in that: The preset comprehensive scoring algorithm is as follows: The confidence level is set on the baby's cry type according to the first cry type and the second cry type, and the confidence level is set according to the formula Calculate the scores of each type to get the comprehensive scores of each baby crying type, where class(c1,c2) ​​represents the comprehensive scores of the baby crying types. represents the confidence of the first cry type, Indicates the confidence of the second cry type.

7. A baby crying detection and translation system, characterized in that: include: Millimeter-wave radar detection and translation module: used to collect millimeter-wave radar signals from the baby's environment, calculate frequency and amplitude parameters based on the millimeter-wave radar signals, compare the calculated parameters with the preset crying parameter interval, and obtain the first crying type of the baby. The process of establishing the preset crying parameter interval is as follows: obtain a sample millimeter-wave radar signal from the baby's environment; perform a fast Fourier transform on the sample millimeter-wave radar signal to obtain a spectrum diagram in the distance dimension, extract a phase once in each frame period by searching the range gate, cyclically transmit N frames, obtain the phase change with the number of frames, use phase unwrapping to perform phase unfolding, perform phase difference calculation on the unfolded phase, and obtain the initial phase, where N is a natural number; According to the difference between the heart rate and breathing rate of the baby, the frequency value formed by the phase change is filtered and distinguished by a bandpass filter, and the phase signal is fast Fourier transformed. According to the peak value and harmonic wave characteristics, the corresponding breathing frequency and heart rate within N frame time are obtained; the sample millimeter wave radar signal includes a signal of no baby, a signal of a baby not crying, a signal of a baby crying because of hunger, a signal of a baby crying because of sleepiness, a signal of a baby crying because of pain, a signal of a baby crying because of discomfort, and a signal of a baby crying because of hiccups. The formula s(t)=A h sin(f h t+φ)+A b sin(f b t+φ) counts the frequency and amplitude ranges of different signal types in the sample millimeter-wave radar signal, and obtains the preset crying parameter range after summarizing, where s(t) represents the sine signal, f h Respiratory frequency, f b Indicates the heart rate, A h Indicates the heartbeat amplitude, A b represents the respiratory amplitude, φ represents the initial phase; Speech translation optimization model building module: used to obtain sample audio data of the baby's environment. The sample audio data includes a labeled strong sample data set and an unlabeled weak sample data set. The spectral features of the unlabeled weak sample data set are extracted and substituted into the transformer network for self-learning pre-training of the model to obtain a pre-trained model. The spectral features of the labeled strong sample data set are extracted to fine-tune the pre-trained model to obtain a speech translation optimization model. Audio data detection and translation module: used to collect audio data of the baby's environment, extract spectral features from the audio data and input them into the speech translation optimization model to calculate and obtain the second crying type of the baby; Detection translation result module: used to perform comprehensive analysis on the first cry type and the second cry type to obtain a detection translation result.

8. An electronic device, characterized in that: It comprises a memory and a processor, wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement a method for detecting and translating baby crying as described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that: When the computer program stored in the storage medium is executed by a computer, the method for detecting and translating baby crying as described in any one of claims 1 to 6 is implemented.