Training method of human factor intelligent physiological state recognition model, physiological state recognition method, device and equipment
By combining real physiological signals and generated physiological signals, using Bayesian neural networks of translation encoders to train physiological state recognition models, the problems of insufficient recognition accuracy and large differences in individualization in the prior art are solved, and higher recognition accuracy is achieved.
Patent Information
- Application Number
- CN202311628678.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-30
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2043-11-30
AI Technical Summary
The prior art is difficult to accurately identify the physiological state of a person, especially in inhibiting differences in individualization of physiological signals.
By obtaining the real physiological signal and the physiological signal generated from the signal, combined with the Bayesian neural network of the translation encoder, a physiological state recognition model that can more accurately identify mental states, emotional states or healthy states is trained.
This method can inhibit individualized differences in physiological signals to a certain extent, so as to train a physiological state recognition model with higher accuracy using relatively few real physiological signals to improve the accuracy of the recognition results.
Smart Images

Figure CN117752336B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of physiological signal recognition, and in particular to a training method for a human factors intelligent physiological state recognition model, a physiological state recognition method, a device and equipment. Background Art
[0002] Physiological signals can reflect a person's mental state, emotional state, and health state (such as whether there is a disease) and other physiological states. How to more accurately identify the user's physiological state based on the user's physiological signals is a problem to be solved. Summary of the invention
[0003] The present application provides a training method, a physiological state recognition method, a device and equipment for a human factors intelligent physiological state recognition model, which can more accurately recognize a person's mental state, emotional state, or health state and other physiological states.
[0004] In the first aspect, the embodiment of the present application provides a training method for a human factor intelligent physiological state recognition model, including: obtaining a first physiological signal, a first state label of the first physiological signal, a second physiological signal corresponding to the first physiological signal, and a second state label of the second physiological signal, wherein the second physiological signal is a physiological signal generated according to the first physiological signal; the first physiological signal is a physiological signal obtained by collection; the first state label is used to indicate the physiological state corresponding to the first physiological signal; the second state label is used to indicate the physiological state corresponding to the second physiological signal; and the physiological state recognition model is trained according to the first physiological signal, the second physiological signal, the first state label, and the second state label. In addition to using the collected real physiological signal, i.e., the first physiological signal, to train the physiological state recognition model, the method also uses the second physiological signal generated according to the first physiological signal to train the physiological state recognition model, thereby suppressing the individual differences of the physiological signal to a certain extent, thereby being able to use relatively fewer real physiological signals to train a relatively more accurate physiological state recognition model, and when the physiological state recognition model is used to identify the mental state, emotional state, or health state of a person, the accuracy of the recognition result is relatively higher.
[0005] In a possible implementation, training a physiological state recognition model according to the first physiological signal, the second physiological signal, the first state label, and the second state label includes:
[0006] Generate a training sample of the physiological state recognition model according to the first physiological signal and the first state label of the first physiological signal; generate another training sample of the physiological state recognition model according to the second physiological signal and the second state label of the second physiological signal;
[0007] The physiological state recognition model is trained using training samples.
[0008] In a possible implementation, acquiring a second physiological signal corresponding to the first physiological signal includes:
[0009] generating a feature vector of a second physiological signal according to the first physiological signal and a first state label of the first physiological signal;
[0010] The feature vector is input into a preset generator to obtain a second physiological signal output by the generator, and the generator is used to generate a physiological signal according to the feature vector.
[0011] In a possible implementation, generating a feature vector of the second physiological signal according to the first physiological signal and the first state label of the first physiological signal includes:
[0012] extracting a preset feature of the first physiological signal;
[0013] generating a feature vector of the first physiological signal according to a preset feature of the first physiological signal and a first state label;
[0014] A feature vector of a second physiological signal is generated according to the feature vector of the first physiological signal.
[0015] In a possible implementation, the physiological signal is an electrocardiogram signal, and the preset feature is an HRV feature.
[0016] In one possible implementation, the training method of the generator includes:
[0017] Acquire a fourth physiological signal and a fourth state label of the fourth physiological signal; the fourth physiological signal is the collected physiological signal;
[0018] generating a feature vector of a fifth physiological signal according to the fourth physiological signal and a fourth state label of the fourth physiological signal;
[0019] Inputting the feature vector of the fifth physiological signal into a preset generator to obtain the fifth physiological signal output by the generator;
[0020] training a preset discriminator according to the fourth physiological signal and the fifth physiological signal;
[0021] Acquire a sixth physiological signal and a sixth state label of the sixth physiological signal; the sixth physiological signal is the collected physiological signal;
[0022] According to the sixth physiological signal and the sixth state label of the sixth physiological signal, adversarial training is performed on the generator and the discriminator to obtain a trained generator.
[0023] In a possible implementation, a preset discriminator is trained according to the fourth physiological signal and the fifth physiological signal;
[0024] A first source tag is set for the fourth physiological signal, the first source tag is used to indicate that the fourth physiological signal is a collected physiological signal; a second source tag is set for the fifth physiological signal, the second source tag is used to indicate that the fifth physiological signal is a generated physiological signal;
[0025] The discriminator is trained according to the fourth physiological signal, the first source label, the fifth physiological signal, and the second source label.
[0026] In a possible implementation, adversarial training is performed on the generator and the discriminator according to the sixth physiological signal and the sixth state label of the sixth physiological signal to obtain a trained generator, including:
[0027] generating a feature vector of a seventh physiological signal according to the sixth physiological signal and a sixth state label of the sixth physiological signal;
[0028] Inputting the feature vector of the seventh physiological signal into the generator to obtain the seventh physiological signal output by the generator;
[0029] A first source tag is set for the sixth physiological signal, and a second source tag is set for the seventh physiological signal; the first source tag is used to indicate that the sixth physiological signal is a collected physiological signal, and the second source tag is used to indicate that the seventh physiological signal is a generated physiological signal;
[0030] generating a training sample for the discriminator according to the sixth physiological signal and the first source label, and generating another training sample for the discriminator according to the seventh physiological signal and the second source label;
[0031] Input the training samples of the discriminator into the discriminator;
[0032] Adjust the parameters of the generator and the discriminator according to the discrimination results output by the discriminator.
[0033] In a possible implementation, the physiological state includes: a mental state, an emotional state, or a health state.
[0034] In one possible implementation, the physiological state recognition model is implemented by a Bayesian neural network combined with a translation encoder.
[0035] In the second aspect, the embodiment of the present application provides a physiological state recognition method, including: obtaining a physiological signal of a user; inputting the physiological signal into a preset physiological state recognition model, the physiological state recognition model is used to recognize the physiological state according to the physiological signal; the preset physiological state recognition model is trained by any method of the first aspect; and the physiological state recognition result output by the physiological state recognition model is obtained as the physiological state recognition result of the user. Since the above method trains a physiological state recognition model with relatively higher accuracy, when the physiological state recognition model is used in the method to identify the mental state, emotional state, or health state of the person, the accuracy of the recognition result is relatively higher.
[0036] In a third aspect, the present application provides a training device for a human factor intelligent physiological state recognition model, including:
[0037] an acquisition module, used to acquire a first physiological signal, a first state label of the first physiological signal, a second physiological signal corresponding to the first physiological signal, and a second state label of the second physiological signal, wherein the second physiological signal is a physiological signal generated according to the first physiological signal; the first physiological signal is a physiological signal obtained by collection; the first state label is used to indicate the physiological state corresponding to the first physiological signal; and the second state label is used to indicate the physiological state corresponding to the second physiological signal;
[0038] The training module is used to train a physiological state recognition model according to the first physiological signal, the second physiological signal, the first state label and the second state label.
[0039] In a fourth aspect, an embodiment of the present application provides a physiological state recognition device, including:
[0040] An acquisition module, used to acquire a user's physiological signals;
[0041] The recognition module is used to input the physiological signal into a preset physiological state recognition model, and the physiological state recognition model is used to recognize the physiological state according to the physiological signal; the preset physiological state recognition model is trained by any method of the first aspect; and the physiological state recognition result output by the physiological state recognition model is obtained as the user's physiological state.
[0042] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory; wherein one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the processor, enable the electronic device to execute any one of the methods of the first aspect or the second aspect.
[0043] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer executes any one of the methods of the first aspect or the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0045] Figure 1 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0046] Figure 2 A flow chart of a method for training a human factor intelligent physiological state recognition model provided in an embodiment of the present application;
[0047] Figure 3 A schematic diagram of the structure of a GAN network provided in an embodiment of the present application;
[0048] Figure 4 A schematic diagram of a flow chart of a training method for a generator provided in an embodiment of the present application;
[0049] Figure 5A Another flowchart of the training method of the generator provided in the embodiment of the present application;
[0050] Figure 5B Another flowchart of a method for training a physiological state recognition model provided in an embodiment of the present application;
[0051] Figure 5C A schematic diagram of an electrocardiogram signal generated by a generator trained in an embodiment of the present application;
[0052] Figure 6 A schematic diagram of a flow chart of a physiological state recognition method provided in an embodiment of the present application;
[0053] Figure 7 A structural schematic diagram of a training device for a human factor intelligent physiological state recognition model provided in an embodiment of the present application;
[0054] Figure 8 A schematic diagram of the structure of a physiological state recognition device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0055] The terms used in the implementation section of this application are only used to explain the specific embodiments of this application and are not intended to limit this application.
[0056] Human factors intelligence is based on human factors engineering technology combined with artificial intelligence (AI) technology. Human factors engineering technology is the application of human psychological and physiological principles to the engineering and design of products, processes and systems. In other words, it is the technology of designing and improving the human-machine-environment system according to human characteristics. Combining this technology with artificial intelligence technology can enable machines to interact with people more intelligently. For example, in some scenarios, the physiological state of a person can be identified based on his or her physiological signals.
[0057] Physiological signals such as electrocardiogram signals can reflect a person's mental state, emotional state, and health state (such as whether a certain disease exists). How to accurately identify the user's physiological state based on the user's physiological signals is a problem to be solved.
[0058] After analysis, it is found that physiological signals have individual differences. Suppressing the individual differences of physiological signals is a way to improve the accuracy of identifying the user's physiological state.
[0059] To this end, an embodiment of the present application provides a training method for a human factors intelligent physiological state recognition model. The trained physiological state recognition model can suppress the individual differences of physiological signals to a certain extent. Therefore, when the physiological state recognition model is used to identify the physiological state of a person based on the physiological signals of the person, the recognition result is relatively more accurate.
[0060] Furthermore, the embodiment of the present application also provides a physiological state recognition method, which can use the physiological state recognition model to identify the physiological state of a person based on the physiological signals of the person. Since the physiological state recognition model can suppress the individual differences of physiological signals to a certain extent, the recognition results of the physiological state recognition method of the embodiment of the present application can be made relatively more accurate.
[0061] like Figure 1 FIG. 1 is a schematic diagram of a structure of an electronic device provided in an embodiment of the present application. The electronic device 100 includes: a processor 110, a memory 120, etc.
[0062] Optionally, in order to improve the functions of the electronic device, the electronic device may also include: a display screen, a camera, a speaker, an antenna, a mobile communication module, a wireless communication module, an audio module, a receiver, a microphone, a headphone interface, a charging management module, a power management module, a battery, etc. One or more devices, the embodiment of the present application is not limited.
[0063] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an ISP, a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0064] The electrical signal transmitted by the camera can be converted into a digital image signal by the ISP. The ISP can output the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in standard RGB, YUV and other formats.
[0065] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0066] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0067] The memory 120 can be used to store computer executable program codes, which include instructions. The memory 120 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data (such as audio data, etc.) created during the use of the electronic device 100, etc. In addition, the memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the memory 120, and / or instructions stored in a memory provided in the processor.
[0068] It should be noted that Figure 1In the illustrated embodiment, the memory 120 is set in the electronic device 100 as an example. In other embodiments provided in the embodiments of the present application, the above-mentioned memory 120 may not be set in the electronic device 100. In this case, the memory 120 can be connected to the electronic device 100 through an interface provided by the electronic device 100, and then can be connected to the processor 110 in the electronic device 100.
[0069] Hereinafter, the training method of the physiological state recognition model and the physiological state recognition method of the embodiment of the present application will be described in detail in combination with the structure of the above-mentioned electronic device.
[0070] The training method of the human factor intelligent physiological state recognition model provided in the embodiment of the present application can be performed by an electronic device having the above structure. The physiological state recognition method provided in the embodiment of the present application can also be performed by an electronic device having the above structure. It can be understood that the electronic device that executes the training method of the human factor intelligent physiological state recognition model and the electronic device that executes the physiological state recognition method can be the same electronic device or different electronic devices.
[0071] The physiological signals in the embodiments of the present application may include electrocardiogram signals or electroencephalogram signals.
[0072] The physiological state in the embodiments of the present application may include: mental state, emotional state, or health state, etc. For example, the mental state may include concentration, lack of concentration, etc., the emotional state may include: happiness, calmness, depression, etc., and the health state may include: health, unhealthy, etc.
[0073] Figure 2 is a flow chart of a training method for a human factor intelligent physiological state recognition model provided in an embodiment of the present application, such as Figure 2 As shown, the method may include:
[0074] Step 201: Acquire a first physiological signal, a first state label of the first physiological signal, a second physiological signal corresponding to the first physiological signal, and a second state label of the second physiological signal in each physiological state.
[0075] The first physiological signal is a physiological signal collected by a physiological detection device such as an electrocardiograph, an electroencephalogram, etc. In other words, it is a real physiological signal collected from a person. The first state label is used to indicate the physiological state corresponding to the first physiological signal.
[0076] Optionally, the timing and object of collecting the first physiological signal may be different based on the different fields in which the physiological state recognition model is applied. For example, if the physiological state recognition model is applied in the field of autonomous driving, such as an autonomous driving assistance system, the first physiological signal may be obtained by using a portable biometric information collection device to collect the driver's physiological signals during driving.
[0077] The second physiological signal is a physiological signal generated according to the first physiological signal. The second state tag is used to indicate the physiological state corresponding to the second physiological signal.
[0078] Optionally, the first state label of the first physiological signal is the same as the second state label of the second physiological signal corresponding to the first physiological signal. For example, if the physiological state is a mental state, if the first state label is mental concentration, the second state label is also mental concentration.
[0079] Optionally, different numerical values may be used to identify different physiological states. For example, assuming that the physiological state includes three types, 1, 2, and 3 may be used to represent a physiological state respectively.
[0080] It can be understood that there is a corresponding relationship between the above-mentioned first physiological signal, the first state label, the second physiological signal and the second state label. For the sake of convenience, they are referred to as a set of signal data (first physiological signal, second physiological signal, first state label and second state label) in the embodiment of the present application. For example, for a first physiological signal a1, it has a corresponding second physiological signal b1, a first state label t1, and the second physiological signal b1 has a corresponding second state label p1. Correspondingly, it constitutes a set of signal data (a1, b1, t1, p1). Correspondingly, in this step, multiple sets of signal data under each physiological state are to be obtained. For example, assuming that the physiological state is a mental state, which is divided into two categories: mental concentration and mental inattention, then in this step, multiple sets of signal data under the mental state of mental concentration can be obtained, and multiple sets of signal data under the mental state of mental inattention can be obtained.
[0081] In one embodiment, a generator for generating physiological signals can be pre-trained. For a specific training method of the generator, please refer to Figure 4 The specific description of the illustrated embodiment is not repeated here. Then, the second physiological signal in this step may be a physiological signal generated by the generator. Specifically, the second physiological signal may be generated in advance using the generator before step 201, or may be generated in real time according to the first physiological signal when executing step 201.
[0082] Optionally, when the second physiological signal is generated in real time according to the first physiological signal during step 201, obtaining the second physiological signal corresponding to the first physiological signal in this step may include:
[0083] generating a feature vector of a second physiological signal according to the first physiological signal and a first state label of the first physiological signal;
[0084] The feature vector is input into a preset generator, and the physiological signal generated by the generator according to the feature vector is used as the second physiological signal corresponding to the first physiological signal.
[0085] Optionally, the generator can be composed of a combination of a convolutional (Conv) layer and a linear (Linear) layer, and the specific structure is not limited in the embodiment of the present application.
[0086] Optionally, generating a feature vector of the second physiological signal according to the first physiological signal and the first state label of the first physiological signal may specifically include:
[0087] extracting a preset feature of the first physiological signal;
[0088] generating a feature vector of the first physiological signal according to a preset feature of the first physiological signal and a first state label;
[0089] A feature vector of a second physiological signal is generated according to the feature vector of the first physiological signal.
[0090] Optionally, generating the feature vector of the second physiological signal according to the feature vector of the first physiological signal may specifically include: performing normalization processing on the feature vector of the first physiological signal to obtain the feature vector of the second physiological signal.
[0091] Taking the case where the first physiological signal is an ECG signal, there are differences in the time intervals between adjacent R waves in the ECG signal, namely, heart rate variability (HRV). In other words, HRV refers to the changes in the differences between successive heartbeat cycles. Accordingly, the preset features in the above steps can be HRV features of the ECG signal. The above-mentioned preset features for extracting the first physiological signal can specifically be the HRV features for extracting the first ECG signal.
[0092] Optionally, the HRV feature may specifically include an HRV time domain feature of the first electrocardiogram signal. In some embodiments, the HRV feature may further include: an HRV frequency domain feature and / or an HRV nonlinear feature.
[0093] Among them, HRV time domain features may include: RR interval mean value mean_nni, RR interval standard deviation sdnn, standard deviation sdsd of differences between adjacent RR intervals, number nni_50 of consecutive RR intervals with interval differences greater than 50ms, expressed as nni_50 / number of RR intervals pnni_50, number nni_20 of consecutive RR intervals with interval differences greater than 20ms, expressed as nni_20 / number of RR intervals pnni_20, square root of mean of the sum of squares of differences of adjacent RR intervals rmssd, absolute value of the median of RR interval differences median_nni, difference between maximum and minimum RR interval values range_nni, coefficient of variation cvcd of consecutive differences, coefficient of variation cvnni, mean heart rate mean_hr, maximum heart rate max_hr, minimum heart rate min_hr, and / or heart rate standard deviation std_hr, etc.
[0094] The above-mentioned HRV frequency domain features may include: the variance lf of HRV at low frequency (0.04~0.15hz), the variance hf of HRV at high frequency (0.15~40hz), the ratio lf / hf of the variance of HRV at low frequency (0.04~0.15hz) to the variance of HRV at high frequency (0.15~40hz), the normalized low frequency power lf_nu, the normalized high frequency power hf_nu, the total power density spectrum total_power, the variance vlf of HRV at very low frequency (0.003~0.04hz), and / or the HRV triangular index measurement value triangular_index.
[0095] The above HRV nonlinear characteristics may include: measuring the baseline width tinn of the distribution with the triangle as the base, the ellipse minor axis sd1, the ellipse major axis sd2, the ratio of the ellipse major axis to the ellipse minor axis sd2 / sd1, the sympathetic nerve index csi, the vagus nerve index cvi, and / or the modified CSImodified_csi, etc.
[0096] Optionally, the extracting of the HRV feature of the first electrocardiogram signal may specifically include:
[0097] Extracting RR interval information of the first electrocardiogram signal;
[0098] The HRV feature of the first electrocardiogram signal is extracted according to the RR interval information of the first electrocardiogram signal.
[0099] The RR interval refers to the distance (time interval) between two adjacent R waves in an electrocardiogram signal. In the embodiment of the present application, the time interval between two adjacent R wave peaks is referred to as the RR interval. The R wave refers to the peak value in an electrocardiogram signal.
[0100] Optionally, in this step, the QRS waveform in the first ECG signal can be detected, the position of the R wave peak in each QRS waveform can be extracted, the distance between each two adjacent R wave peaks can be calculated, and the distance between each two adjacent R wave peaks can be divided by the sampling rate to obtain the RR interval list of the first ECG signal, wherein the RR interval list includes each RR interval RRI in the first ECG signal, wherein the i-th RR interval is recorded as RRI i , represents the time interval between the (i+1)th R wave peak and the i-th R wave peak in the first ECG signal.
[0101] Optionally, detecting the QRS waveform in the first electrocardiogram signal may be implemented using a Pan-Tompkins algorithm.
[0102] Taking the first physiological signal being an EEG signal as an example, the preset features for extracting the first physiological signal may specifically be extracting time domain features, frequency domain features, time-frequency features and / or nonlinear features of the EEG signal.
[0103] The time domain characteristics of the EEG signal may include: amplitude, variance, mean, root mean square, skewness, peak value, etc. of the EEG signal.
[0104] The frequency domain characteristics of EEG signals may include the power, power spectral density, energy, etc. of EEG signals in each frequency band: delta band (0-4 Hz), theta band (4-8 Hz), alpha band (8-13 Hz), beta band (13-25 Hz), and gamma band (25-50 Hz).
[0105] The time-frequency characteristics of the EEG signal may include: the frequency domain characteristics of the EEG signal of each time window in the EEG signals of multiple time windows obtained by dividing the time-frequency analysis method. The frequency domain characteristics of the EEG signal of each time window can refer to the examples of the frequency domain characteristics of the EEG signal mentioned above, which will not be repeated here. The above-mentioned time-frequency analysis methods may include: short-time Fourier transform (STFT), wavelet transform (WT), Hilbert-Huang transform (HHT), etc.
[0106] The nonlinear characteristics of EEG signals may include: various types of entropy of EEG signals, correlation dimension, fractal dimension, etc. Various types of entropy of EEG signals may include: approximate entropy, wavelet entropy characteristics, asymmetric entropy characteristics, etc.
[0107] Optionally, generating a feature vector of the first physiological signal according to a preset feature of the first physiological signal and the first state label may specifically include:
[0108] Normalizing the first state label of the first physiological signal, and using the normalized result as the label component of the first physiological signal;
[0109] The preset feature and the label component of the first physiological signal are respectively used as components in a feature vector to generate a feature vector of the first physiological signal.
[0110] Still taking the first physiological signal being the first ECG signal as an example, assuming that the HRV features of the first ECG signal extracted include all the above 31 HRV features, the above 31 features are respectively recorded as F1, F2, F3, ..., F 31 , the label component can be recorded as F 32 , then the feature vector F of the first ECG signal may include 32 components in total, including HRV features and label components.
[0111] The above-mentioned extraction of the HRV feature of the first electrocardiogram signal based on the RR interval information of the first electrocardiogram signal can be implemented using relevant technologies, which will not be elaborated in the embodiments of the present application.
[0112] Optionally, if the physiological state includes n types, and the first state label is represented by 1, 2, …, n to represent different physiological states, then the normalization processing of the first state label can be the first state label / n. For example, the physiological state is a mental state, which includes 3 types, represented by 1, 2, and 3 respectively. Then, when the first state label is 1, the label component obtained after normalization is 1 / 3, when the first state label is 2, the label component obtained after normalization is 2 / 3, and when the first state label is 3, the label component obtained after normalization is 1.
[0113] Step 202: training a physiological state recognition model according to the first physiological signal, the second physiological signal, the first state label and the second state label.
[0114] Optionally, for each set of signal data (first physiological signal, second physiological signal, first state label and second state label), a training sample (first physiological signal, first state label) can be generated based on the first physiological signal and the first state label, and another training sample (second physiological signal, second state label) can be generated based on the second physiological signal and the second state label, and the above two training samples can be used to train the physiological state recognition model respectively.
[0115] In the above implementation, for each group of signal data (first physiological signal, second physiological signal, first state label and second state label), two training samples (first physiological signal, first state label) and (second physiological signal, second state label) can be generated. Optionally, in order to improve the accuracy of the trained physiological state recognition model, for the two training samples corresponding to different groups of signal data, the order in which the above training samples are input into the physiological state recognition model can be disrupted, so that the order in which the two training samples of the same group of signal data are input into the physiological state recognition model is not adjacent. For example, assuming that there are two training samples (first physiological signal 1, first state label) and (second physiological signal 1, second state label) generated by one set of signal data, and two training samples (first physiological signal 2, first state label) and (second physiological signal 2, second state label) generated by another set of signal data, by disrupting the order in which the above samples are input into the physiological state recognition model, for example, the order in which the above four samples are input into the physiological state recognition model can be: training sample (first physiological signal 1, first state label), training sample (second physiological signal 2, second state label), training sample (second physiological signal 1, second state label), training sample (first physiological signal 2, first state label). In this way, the order in which the training sample (first physiological signal 1, first state label) and the training sample (second physiological signal 1, second state label) are input into the physiological state recognition model is not adjacent, and the order in which the training sample (first physiological signal 2, first state label) and the training sample (second physiological signal 2, second state label) are input into the physiological state recognition model is not adjacent. It can be understood that the order in which the above four training samples are input into the physiological state recognition model is only an example. In actual applications, the number of groups of signal data is greater and more training samples are generated. As long as the order in which two training samples corresponding to the same group of signal data are input into the physiological state recognition model is not adjacent, the specific order in which multiple training samples are input into the physiological state recognition model is not limited in the embodiments of the present application.
[0116] Optionally, the physiological state recognition model in the embodiment of the present application can be implemented by a Bayesian neural network combined with a translation encoder (Transformer Encoder). Specifically, the physiological state recognition model in the embodiment of the present application can increase the parameter dimension calculated by each neuron in the translation encoder on the basis of the translation encoder, for example, the mean and variance of each neuron are fitted, so as to expand the calculated parameters from 1 dimension to 2 dimensions, and obtain the above-mentioned Bayesian neural network combined with the translation encoder. Based on the Bayesian neural network based on the convolution or linear layer, the Bayesian neural network combined with the translation encoder is realized, which can realize the conversion of the original translation encoder's point estimation of the parameter to the new translation encoder's parameter distribution estimation, effectively reduce the sensitivity of the physiological state recognition model to individual differences, and for physiological signals with a relatively long duration, it can more effectively capture the long-term temporal dependency, effectively combine the characteristics of physiological signals such as electrocardiogram signals with long-term temporal dependency, that is, it can combine the "context" information of the physiological signal to give a more accurate recognition result, and improve the recognition accuracy of the physiological state recognition model.
[0117] Optionally, in this step, one or more training samples may be obtained each time, and a preset physiological state recognition model may be input to train the physiological state recognition model. The forward propagation and reverse propagation processes in the training process are not limited in the present application embodiment and may be implemented with reference to related technologies.
[0118] In the physiological state recognition method of the embodiment of the present application, not only the collected real physiological signals are used to train the physiological state recognition model, but also the physiological signals generated according to the real physiological signals are used to train the physiological state recognition model. Therefore, relatively more physiological signals can be used to train the physiological state recognition model, thereby achieving a relatively higher accuracy physiological state recognition model obtained by training with relatively fewer real physiological signals.
[0119] The generator for generating physiological signals in the embodiment of the present application can be trained by generative adversarial methods. Specifically, a generative adversarial network (GAN) can be pre-established in the embodiment of the present application, such as Figure 3 As shown in FIG. 1 , the GAN network may include a generator and a discriminator. The physiological signal generated by the generator can be input into the discriminator for discrimination. The above generator and discriminator can be implemented by neural networks respectively. The generator and discriminator initially established are untrained networks. Figure 4 The generator obtained after training with the method shown can be used as Figure 2 The generator for generating the second physiological signal in the embodiment of the present application is shown.
[0120] like Figure 4As shown, the training method of the generator may include:
[0121] Step 401: Acquire a plurality of fourth physiological signals and fourth state labels of the fourth physiological signals in each physiological state.
[0122] The fourth physiological signal may be a physiological signal collected by a physiological detection device, in other words, a real physiological signal collected from a person. The fourth state tag is used to indicate the physiological state of the fourth physiological signal.
[0123] The number of fourth physiological signals under each physiological state is not limited in this embodiment of the application. It can be understood that the more the number of fourth physiological signals is, the better the performance of the generator obtained by training is.
[0124] The implementation of the fourth state label of the fourth physiological signal may refer to the aforementioned description of the first state label and the second state label, which will not be repeated here.
[0125] Optionally, the fourth physiological signal acquired in this step may be the same physiological signal as the first physiological signal in step 201 , or may be a different physiological signal, as long as it is a real physiological signal.
[0126] Step 402: For each fourth physiological signal, generate a feature vector of a fifth physiological signal according to the fourth physiological signal and a fourth state label of the fourth physiological signal.
[0127] The implementation of this step can refer to the aforementioned description of generating a feature vector of the second physiological signal based on the first physiological signal and the first state label of the first physiological signal. The main difference is that the first physiological signal is replaced by the fourth physiological signal, the first state label is replaced by the fourth state label, and the second physiological signal is replaced by the fifth physiological signal, which will not be repeated here.
[0128] Step 403: For each feature vector of the fifth physiological signal, input the feature vector of the fifth physiological signal into a preset generator, and use the physiological signal output by the generator as the fifth physiological signal.
[0129] Through the processing of this step, the fifth physiological signal corresponding to each fourth physiological signal can be obtained.
[0130] Optionally, in this step, a characteristic vector of the fifth physiological signal can be obtained each time and input into a preset generator to generate a corresponding fifth physiological signal; or, in this step, a plurality of characteristic vectors of the fifth physiological signal can be obtained each time and input into a preset generator to generate a plurality of fifth physiological signals accordingly.
[0131] The generator of the embodiment of the present application generates a physiological signal based on the feature vector of the physiological signal, so that the physiological signal generated by the generator can be relatively more in line with expectations, thereby improving the availability of the generated data.
[0132] Step 404: Train a preset discriminator according to the fourth physiological signal and the fifth physiological signal.
[0133] Optionally, this step may include:
[0134] A first source tag is set for the fourth physiological signal, and the first source tag is used to indicate that the fourth physiological signal is a real physiological signal; a second source tag is set for the fifth physiological signal, and the second source tag is used to indicate that the fifth physiological signal is a physiological signal generated by a generator;
[0135] The discriminator is trained according to the fourth physiological signal, the first source label, the fifth physiological signal, and the second source label.
[0136] Optionally, the first source tag and the second source tag may be implemented by 1 and 0 respectively, that is, 1 is used to indicate that the physiological signal is a real physiological signal, and 0 is used to indicate that the physiological signal is a generated physiological signal.
[0137] The discriminator is used to determine whether the received physiological signal is a real physiological signal or a generated physiological signal.
[0138] The training of the discriminator according to the fourth physiological signal, the first source label, the fifth physiological signal and the second source label may specifically include:
[0139] generating a training sample of the discriminator according to the fourth physiological signal and the first source label of the fourth physiological signal, and generating a training sample of the discriminator according to the fifth physiological signal and the second source label of the fifth physiological signal;
[0140] The discriminator is trained using the above training samples.
[0141] Based on the above processing steps, for each fourth physiological signal, two training samples can be generated correspondingly, which are assumed to be recorded as (fourth physiological signal, first source label) and (fifth physiological signal, second source label). Optionally, in order to improve the processing accuracy of the discriminator, when using the training samples to train the discriminator, the order in which the two training samples corresponding to the same fourth physiological signal are input into the discriminator for discriminator training is not adjacent. For example, assuming that the fourth physiological signal 1 corresponds to two training samples (fourth physiological signal 1, first source label) and (fifth physiological signal 1, second source label), and the fourth physiological signal 2 corresponds to two training samples (fourth physiological signal 2, first source label) and (fifth physiological signal 2, second source label), the order in which the above four training samples are used to train the discriminator, for example, the order in which the above samples are input into the discriminator after being shuffled is: training sample (fourth physiological signal 1, first source label), training sample (fifth physiological signal 2, second source label), training sample (fifth physiological signal 1, second source label), training sample (fourth physiological signal 2, first source label). Thus, the order in which the training samples (fourth physiological signal 1, first source label) and (fifth physiological signal 1, second source label) are input into the discriminator is not adjacent, and the order in which the training samples (fourth physiological signal 2, first source label) and (fifth physiological signal 2, second source label) are input into the discriminator is not adjacent. It can be understood that the order in which the above four training samples are input into the discriminator is only an example. In actual applications, the number of fourth physiological signals is greater and more training samples are generated. As long as the order in which the two training samples corresponding to the same fourth physiological signal are input into the discriminator is not adjacent, the specific order in which the multiple training samples are input into the discriminator is not limited by the embodiment of the present application.
[0142] Among them, the specific implementation of using training samples to train the discriminator can be achieved using relevant training methods of the discriminator, which will not be described in detail in this application.
[0143] Step 405: Acquire a plurality of sixth physiological signals in each physiological state and a sixth state label of each sixth physiological signal.
[0144] The sixth physiological signal may be a physiological signal collected by a physiological detection device, in other words, a real physiological signal collected from a person. The sixth state tag is used to indicate the physiological state of the sixth physiological signal.
[0145] The number of sixth physiological signals under each physiological state is not limited in this embodiment of the application. It can be understood that the more the number of sixth physiological signals is, the better the performance of the generator obtained by training is.
[0146] The implementation of the sixth state label of the sixth physiological signal may refer to the aforementioned description of the first state label and the second state label, which will not be repeated here.
[0147] Optionally, the sixth physiological signal acquired in this step may be the same physiological signal as the fourth physiological signal in step 401 , or may be a different physiological signal, as long as it is a real physiological signal.
[0148] Step 406: According to the sixth physiological signal and the sixth state label of the sixth physiological signal, adversarial training is performed on the generator and the discriminator to obtain a trained generator.
[0149] Optionally, this step may include:
[0150] For each sixth physiological signal, generating a feature vector of a seventh physiological signal according to the sixth physiological signal and a sixth state label of the sixth physiological signal;
[0151] Inputting the feature vector of each seventh physiological signal into a generator, and using the physiological signal outputted by the generator as the seventh physiological signal;
[0152] A first source tag is set for the sixth physiological signal, and a second source tag is set for the seventh physiological signal; the first source tag is used to indicate that the sixth physiological signal is a real physiological signal; the second source tag is used to indicate that the seventh physiological signal is a physiological signal generated by a generator;
[0153] generating a training sample for the discriminator based on the sixth physiological signal and the first source label of the sixth physiological signal, and generating a training sample for the discriminator based on the seventh physiological signal and the second source label of the seventh physiological signal;
[0154] The training samples of the discriminator are input into the discriminator, and the generator and the discriminator are back-propagated according to the discrimination results output by the discriminator, that is, the parameters of the generator and the discriminator are adjusted.
[0155] The implementation of the first source tag and the second source tag can refer to the above corresponding description, which will not be repeated here.
[0156] Optionally, if the sixth physiological signal acquired in step 405 is the same physiological signal as the fourth physiological signal in step 401 , the step of generating a feature vector of the seventh physiological signal in the above steps may be omitted.
[0157] Among them, the implementation of generating the characteristic vector of the seventh physiological signal based on the sixth physiological signal and the sixth state label of the sixth physiological signal can refer to the relevant instructions for generating the characteristic vector of the second physiological signal based on the first physiological signal and the first state label of the first physiological signal. The main difference is that the first physiological signal is replaced by the sixth physiological signal, the first state label is replaced by the sixth state label, and the second physiological signal is replaced by the seventh physiological signal, which will not be repeated here.
[0158] Among them, the specific implementation of the above-mentioned inputting the characteristic vector of the seventh physiological signal into the generator and using the physiological signal output by the generator as the seventh physiological signal can refer to the description in step 403, and the main difference is that the fifth physiological signal is replaced by the seventh physiological signal.
[0159] Among them, the above-mentioned back propagation of the generator and the discriminator according to the discrimination result output by the discriminator can be implemented using relevant technologies, which will not be elaborated in this application.
[0160] In this step, the generator and the discriminator can compete and cooperate with each other through adversarial training. The goal of the generator is to generate physiological signals that are closer and closer to real physiological signals, so that the discriminator cannot accurately distinguish the source of the physiological signals. The goal of the discriminator is to accurately distinguish whether the input physiological signals are physiological signals generated by the generator or real physiological signals. By adjusting the parameters of the generator and the discriminator in adversarial training, the physiological signals generated by the trained generator can eventually be very close to real physiological signals, while the discriminator cannot accurately distinguish the generated physiological signals from real physiological signals.
[0161] In an embodiment of the present application, a generator is trained by generative adversarial training, so that the generator can be used to generate physiological signals that are very close to the real ones for training the physiological state recognition model, thereby increasing the amount of sample data for training the physiological state recognition model and improving the diversity of the sample data. Therefore, when training the physiological state recognition model, the sensitivity of the physiological state recognition model to individual differences in physiological signals can be effectively reduced.
[0162] Below, taking the physiological signal as an electrocardiogram signal, the physiological state as a mental state, and the mental state being divided into three types as an example, the training method of the generator is exemplified.
[0163] like Figure 5A As shown, the method may include:
[0164] Step 501: Acquire a plurality of real ECG signals X and state labels Y corresponding to the real ECG signals X in each mental state.
[0165] The following steps 502 to 504 are performed for each real ECG signal X.
[0166] Step 502: For each real ECG signal X, extract the RR interval information of the real ECG signal X.
[0167] Step 503: Generate a feature vector F of the real ECG signal X.
[0168] In this step, the HRV feature of the real ECG signal X can be extracted according to the RR interval information of the real ECG signal X as the component in the feature vector F of the real ECG signal X, and the mental state label Y of the real ECG signal X is normalized as the label component F in the feature vector F of the real ECG signal X. 32 . .
[0169] Assuming that the HRV feature components include all 31 HRV features in the above example, the feature vector F of the real ECG signal X may include 31 of the above 31 HRV feature components, and the above 31 HRV feature components are respectively denoted as F1, F2, F3, ..., F 31 .
[0170] For example, assuming that the mental state based on ECG signals includes three types, the mental state label Y of the first type of mental state can be recorded as 1, the mental state label Y of the second type of mental state can be recorded as 2, and the mental state label Y of the third type of mental state can be recorded as 3. Then the normalized mental state label Y of the first type of mental state is scaled-1 It can be recorded as 1 / 3, the normalized mental state label Y of the second type of mental state scaled-2 It can be recorded as 2 / 3, the normalized mental state label Y of the third type of mental state scaled-3 It can be recorded as 1.
[0171] Through the processing of this step, corresponding to each real ECG signal X, its feature vector F may include F1~F 32 32 servings in total.
[0172] Step 504: normalize the feature vector F of the real ECG signal X to obtain the feature vector FG of the simulated ECG signal XG corresponding to the real ECG signal X.
[0173] The simulated ECG signal refers to an ECG signal generated based on a real ECG signal.
[0174] For example, the feature vector F of the real ECG signal X includes F1~F 32 Taking a total of 32 components as an example, the feature vector FG of the ECG signal to be generated also includes 32 components, which are assumed to be: FG1, FG2, FG3, ..., FG 32 , where the characteristic component FG i is the component F in the first eigenvector F i The processing result obtained by normalization processing, i ranges from 1 to 32.
[0175] By performing the above steps 502 to 505 on each real electrocardiogram signal X, the feature vector FG of the electrocardiogram signal XG to be generated corresponding to the real electrocardiogram signal X can be obtained. In other words, assuming there are N real electrocardiogram signals X, then N feature vectors FG can be obtained.
[0176] Step 505: Randomly extract M feature vectors FG, and input the extracted M feature vectors FG into the generator to generate the simulated electrocardiogram signal XG corresponding to each feature vector FG.
[0177] Wherein, M is a natural number, and M < N. The specific value of M is not limited in the embodiments of the present application.
[0178] It should be noted that each feature vector FG can be extracted only once, in other words, input into the generator only once, as long as the simulated electrocardiogram signal XG corresponding to each feature vector FG is generated.
[0179] Through the processing of this step, N simulated electrocardiogram signals XG corresponding to N feature vectors FG can be obtained.
[0180] Step 506: The preliminary training step of the discriminator.
[0181] In this step, a first source label L1 can be set for each real electrocardiogram signal X to obtain a real electrocardiogram sample YR(X, L1), and a second source label L2 can be set for each simulated electrocardiogram signal XG to obtain a simulated electrocardiogram sample YG(XG, L2). Randomly input the real electrocardiogram sample YR and the simulated electrocardiogram sample YG into the discriminator respectively for the training of the discriminator to obtain a trained discriminator. Optionally, when inputting the real electrocardiogram sample YR and the simulated electrocardiogram sample YG into the discriminator, the input order of the real electrocardiogram sample YR and the simulated electrocardiogram sample YG corresponding to the same real electrocardiogram signal X is not adjacent.
[0182] The first source label L1 is used to indicate that the electrocardiogram signal is real data, and the second source label L2 is used to indicate that the electrocardiogram signal is generated data. For example, the first source label L1 can be 1, and the second source label L2 can be 0. Then the above real electrocardiogram sample YR can be (X, 1), and the above simulated electrocardiogram sample YG can be (XG, 0).
[0183] Step 507: The adversarial training step of the generator and the discriminator.
[0184] In the first example, if the multiple real ECG signals X obtained in step 501 are still used for adversarial training in this step, the feature vector FG can be input into the generator to obtain the simulated ECG signal XG generated by the generator, and the first source label L1 is set for the real ECG signal X to obtain the adversarial training sample XF (X, L1), and the second source label L2 is set for the simulated ECG signal XG to obtain the adversarial training sample YF (XG, L2). The adversarial training samples XF (X, L1) and YF (XG, L1) are respectively input into the discriminator to obtain the corresponding discrimination results output by the discriminator, and the generator and the discriminator are back-propagated according to the discrimination results, and the above training process is repeated until the ECG signal XG generated by the generator is close enough to the real ECG signal and meets the preset training stop condition.
[0185] In the second example, in this step, real ECG signals other than step 501 can be used for adversarial training. Steps 502 to 504 can be executed for each real ECG signal to obtain the feature vector of each real ECG signal. After that, steps such as inputting the feature vector into the generator are executed in a similar manner to that in the first example to implement adversarial training of the generator and the discriminator.
[0186] In combination with the above embodiments, refer to Figure 5B As shown in the flowchart, in one embodiment provided by the present application, the feature vector of the simulated physiological signal can be first generated according to the real physiological signal, and input into the generator. The generator and the discriminator are subjected to generative adversarial training according to the simulated physiological signal and the real physiological signal generated by the generator to obtain a trained generator. After that, the feature vector of the simulated physiological signal is generated according to the real physiological signal, and input into the trained generator. The generator outputs a simulated physiological signal close to the real one, and the physiological state recognition model is trained according to the real physiological signal and the corresponding simulated physiological signal. See Figure 5C As shown, it is a schematic diagram of a 12-lead ECG signal generated by a trained generator according to an embodiment of the present application.
[0187] Figure 6 A flow chart of a physiological state recognition method provided in an embodiment of the present application, which can be executed by an electronic device, such as a vehicle-mounted device for recognizing a driver's physiological state, a medical device for recognizing a patient's health state, etc. Figure 6 As shown, the method may include:
[0188] Step 601: Acquire the user's physiological signals.
[0189] The above-mentioned users may be, for example, drivers, medical personnel, etc., and different implementations may be possible based on different applicable scenarios of the physiological state recognition method.
[0190] Step 602: Input the physiological signal into a preset physiological state recognition model, where the physiological state recognition model is used to recognize the physiological state according to the physiological signal.
[0191] Optionally, the physiological state recognition model used in this step is a physiological state recognition model trained by the aforementioned method.
[0192] Step 603: Obtain the physiological state recognition result output by the physiological state recognition model as the physiological state recognition result of the user.
[0193] Since the physiological state recognition model of the embodiment of the present application can suppress the individual differences of physiological signals and has a relatively more accurate physiological state recognition result, the physiological state recognition method of the embodiment of the present application can also more accurately realize the recognition of the user's physiological state.
[0194] Figure 7 A structural diagram of a training device for a human factor intelligent physiological state recognition model provided in an embodiment of the present application is shown in FIG. Figure 7 As shown, the apparatus 700 may include:
[0195] The acquisition module 710 is used to acquire a first physiological signal, a first state label of the first physiological signal, a second physiological signal corresponding to the first physiological signal, and a second state label of the second physiological signal, wherein the second physiological signal is a physiological signal generated according to the first physiological signal; the first physiological signal is a physiological signal obtained by collection; the first state label is used to indicate the physiological state corresponding to the first physiological signal; and the second state label is used to indicate the physiological state corresponding to the second physiological signal;
[0196] The training module 720 is used to train a physiological state recognition model according to the first physiological signal, the second physiological signal, the first state label and the second state label.
[0197] Figure 8 A schematic diagram of a physiological state recognition device provided in an embodiment of the present application is shown in FIG. Figure 8 As shown, the apparatus 800 may include:
[0198] An acquisition module 810 is used to acquire a physiological signal of a user;
[0199] The recognition module 820 is used to input the physiological signal into a preset physiological state recognition model, and the physiological state recognition model is used to recognize the physiological state according to the physiological signal; the preset physiological state recognition model is trained by the method provided in the above embodiment; and the physiological state recognition result output by the physiological state recognition model is obtained as the user's physiological state.
[0200] Figure 7 and Figure 8The device provided in the illustrated embodiment can be used to execute the technical solution of the method embodiment of the present application. Its implementation principle and technical effects can be further referred to the relevant description in the method embodiment.
[0201] It should be understood that the above Figure 7 and Figure 8 The division of the various modules of the device shown is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software calling through processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software calling through processing elements, and some modules can be implemented in the form of hardware. For example, the identification module can be a separately established processing element, or it can be integrated in a chip of an electronic device. The implementation of other modules is similar. In addition, all or part of these modules can be integrated together, or they can be implemented independently. In the implementation process, each step of the above method or each of the above modules can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.
[0202] An embodiment of the present application also provides an electronic device, including a processor and a memory, wherein the processor is used to implement the method provided in the embodiment of the present application.
[0203] The embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer executes the method provided by the embodiment of the present application.
[0204] The embodiment of the present application also provides a computer program product, which includes a computer program. When the computer program is run on a computer, it enables the computer to execute the method provided by the embodiment of the present application.
[0205] In the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, c can be single or multiple.
[0206] Those of ordinary skill in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented in a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0207] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0208] In several embodiments provided in the present application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory; hereinafter referred to as: ROM), random access memory (Random Access Memory; hereinafter referred to as: RAM), disk or optical disk, and other media that can store program codes.
[0209] The above is only a specific implementation of the present application. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. The protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A training method for a human factor intelligent physiological state recognition model, characterized in that: include: Acquire a first physiological signal, a first state label of the first physiological signal, a second physiological signal corresponding to the first physiological signal, and a second state label of the second physiological signal, wherein the second physiological signal is a physiological signal generated according to the first physiological signal; the first physiological signal is a physiological signal obtained by collection; the first state label is used to indicate the physiological state corresponding to the first physiological signal; and the second state label is used to indicate the physiological state corresponding to the second physiological signal; training a physiological state recognition model according to the first physiological signal, the second physiological signal, the first state label, and the second state label; The step of training a physiological state recognition model according to the first physiological signal, the second physiological signal, the first state label, and the second state label includes: For each group of the first physiological signal, the second physiological signal, the first state label and the second state label, a first training sample of the physiological state recognition model is generated according to the first physiological signal and the first state label of the first physiological signal; a second training sample of the physiological state recognition model is generated according to the second physiological signal and the second state label of the second physiological signal; Using the first training sample and the second training sample of each group to train the physiological state recognition model; When the first training sample and the second training sample of each group are used to train the physiological state recognition model, the first training sample and the second training sample of the same group are not input into the physiological state recognition model in an adjacent order.
2. The method according to claim 1, characterized in that Acquiring a second physiological signal corresponding to the first physiological signal includes: generating a feature vector of a second physiological signal according to the first physiological signal and a first state label of the first physiological signal; The feature vector is input into a preset generator to obtain a second physiological signal output by the generator, and the generator is used to generate a physiological signal according to the feature vector.
3. The method according to claim 2, characterized in that The step of generating a feature vector of a second physiological signal according to the first physiological signal and a first state label of the first physiological signal includes: extracting a preset feature of the first physiological signal; generating a feature vector of the first physiological signal according to a preset feature of the first physiological signal and a first state label; A feature vector of the second physiological signal is generated according to the feature vector of the first physiological signal.
4. The method according to claim 3, characterized in that The physiological signal is an electrocardiogram signal, and the preset feature is an HRV feature.
5. The method according to any one of claims 2 to 4, characterized in that: The training method of the generator includes: Acquire a fourth physiological signal and a fourth state label of the fourth physiological signal; the fourth physiological signal is a collected physiological signal; generating a feature vector of a fifth physiological signal according to the fourth physiological signal and a fourth state label of the fourth physiological signal; Inputting the feature vector of the fifth physiological signal into a preset generator to obtain a fifth physiological signal output by the generator; Training a preset discriminator according to the fourth physiological signal and the fifth physiological signal; Acquire a sixth physiological signal and a sixth state label of the sixth physiological signal; the sixth physiological signal is a collected physiological signal; According to the sixth physiological signal and the sixth state label of the sixth physiological signal, adversarial training is performed on the generator and the discriminator to obtain a trained generator.
6. The method according to claim 5, characterized in that The preset discriminator is trained according to the fourth physiological signal and the fifth physiological signal; Setting a first source tag for the fourth physiological signal, wherein the first source tag is used to indicate that the fourth physiological signal is a collected physiological signal; setting a second source tag for the fifth physiological signal, wherein the second source tag is used to indicate that the fifth physiological signal is a generated physiological signal; A discriminator is trained according to the fourth physiological signal, the first source label, the fifth physiological signal, and the second source label.
7. The method according to claim 5, characterized in that The method of performing adversarial training on the generator and the discriminator according to the sixth physiological signal and the sixth state label of the sixth physiological signal to obtain a trained generator includes: generating a feature vector of a seventh physiological signal according to the sixth physiological signal and a sixth state label of the sixth physiological signal; Inputting the feature vector of the seventh physiological signal into the generator to obtain the seventh physiological signal output by the generator; A first source tag is set for the sixth physiological signal, and a second source tag is set for the seventh physiological signal; the first source tag is used to indicate that the sixth physiological signal is a collected physiological signal, and the second source tag is used to indicate that the seventh physiological signal is a generated physiological signal; generating a training sample for the discriminator according to the sixth physiological signal and the first source label, and generating another training sample for the discriminator according to the seventh physiological signal and the second source label; Inputting the training samples of the discriminator into the discriminator; The parameters of the generator and the discriminator are adjusted according to the discrimination result output by the discriminator.
8. The method according to any one of claims 1 to 4, characterized in that: The physiological state includes: mental state, emotional state or health state.
9. The method according to any one of claims 1 to 4, characterized in that: The physiological state recognition model is implemented by combining a Bayesian neural network with a translation encoder.
10. A physiological state recognition method, characterized in that: include: Obtaining the user's physiological signals; Inputting the physiological signal into a preset physiological state recognition model, wherein the physiological state recognition model is used to recognize the physiological state according to the physiological signal; The preset physiological state recognition model is obtained by training the method according to any one of claims 1 to 9; A physiological state recognition result output by the physiological state recognition model is obtained as the physiological state recognition result of the user.
11. A training device for a physiological state recognition model, characterized in that: include: an acquisition module, used to acquire a first physiological signal, a first state tag of the first physiological signal, a second physiological signal corresponding to the first physiological signal, and a second state tag of the second physiological signal, wherein the second physiological signal is a physiological signal generated according to the first physiological signal; the first physiological signal is a physiological signal obtained by collection; and the first state tag is used to indicate a physiological state corresponding to the first physiological signal; The second state label is used to indicate the physiological state corresponding to the second physiological signal; a training module, configured to train the physiological state recognition model according to the first physiological signal, the second physiological signal, the first state label, and the second state label; To implement the training of the physiological state recognition model according to the first physiological signal, the second physiological signal, the first state label and the second state label, the training module is specifically used for: For each group of the first physiological signal, the second physiological signal, the first state label, and the second state label, generating a first training sample of the physiological state recognition model according to the first physiological signal and the first state label of the first physiological signal; generating a second training sample of the physiological state recognition model according to the second physiological signal and a second state label of the second physiological signal; Using the first training sample and the second training sample of each group to train the physiological state recognition model; When the first training sample and the second training sample of each group are used to train the physiological state recognition model, the first training sample and the second training sample of the same group are not input into the physiological state recognition model in an adjacent order.
12. A physiological state recognition device, characterized in that: include: An acquisition module, used to acquire a user's physiological signals; An identification module, used for inputting the physiological signal into a preset physiological state identification model, wherein the physiological state identification model is used for identifying the physiological state according to the physiological signal; The preset physiological state recognition model is obtained by training the method according to any one of claims 1 to 9; A physiological state recognition result output by the physiological state recognition model is obtained as the physiological state of the user.
13. An electronic device, characterized in that: include: Processor, memory; One or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the processor, enable the electronic device to perform the method according to any one of claims 1 to 10.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed on a computer, enables the computer to execute the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Method for generating and identifying neurophysiological signal
CN111436929A
Cited By
Method for training human-centered intelligent physiological state recognition model, method and apparatus for physiological state recognition, and device
EP4696237A1