Method, device and equipment for predicting psychological stress and storage medium
Patent Information
- Application Number
- CN202110723716.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-29
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2041-06-29
AI Technical Summary
[0003]但是,相关技术中采用可穿戴脑电采集设备监测用户的心理压力时,存在测量误差大以及应用场景受限等问题
[0030]本申请实施例的心理压力的预测方法,在获取到目标用户处于特定状态下的属性信息后,将属性信息输入标准压力预测模型,得到的标准压力预测模型输出的目标用户的预测脑电压力值后,根据目标用户的预测脑电压力值与特定状态下的脑电压力标准值之间的差异,对标准压力预测模型的参数进行调整,以得到目标用户的压力预测模型,进而,采用目标用户的压力预测模型对目标用户进行心理压力预测。由此,考虑到了目标用户的个体差异性,通过对标准压力预测模型的参数进行调整,得到目标用户对应的个性化的压力预测模型后,采用个性化的压力预测模型对目标用户的心理压力进行预测,提高了心理压力预测的准确度。
Smart Images

Figure CN115547490B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of deep learning technology, and in particular to a method, apparatus, device and storage medium for predicting psychological stress. Background Technology
[0002] Stress is a significant issue affecting human physical and mental health in modern society. Its occurrence is believed to be related to a mismatch between external demands placed on individuals and the availability of external resources or the individual's own motivations and needs. Appropriate levels of stress can help stimulate work motivation and potential; however, excessive stress can lead to a series of diseases affecting the cardiovascular, cerebrovascular, and musculoskeletal systems. Therefore, monitoring and assessing psychological stress levels, and providing relevant reminders under high pressure, are crucial means of stress management and preventing related diseases. Physiologically, stressful events and stress responses cause a series of dynamic changes in the autonomic nervous system, such as changes in heart rate variability, skin resistance, respiratory rate, and electroencephalogram (EEG). However, the latest neuroscience research indicates that the brain is the primary target organ for mental stress, as it has the ability to determine whether an event is a stressor or a threat.
[0003] However, when using wearable EEG devices to monitor users' psychological stress, there are problems such as large measurement errors and limited application scenarios. Summary of the Invention
[0004] The purpose of this application is to at least partially solve one of the technical problems in the related art.
[0005] The first aspect of this application proposes a method for predicting psychological stress, comprising:
[0006] Obtain attribute information of the target user in a specific state; wherein, the attribute information includes multiple combinations of gender, age, height, weight, heart rate information, heart rate variability information, activity level information, sleep stage information, or respiratory rate information;
[0007] Obtain a standard stress prediction model; wherein the standard stress prediction model has learned the correspondence between the attribute information and brain electrical stress values;
[0008] The attribute information is input into the standard stress prediction model to obtain the predicted brainwave stress value of the target user output by the standard stress prediction model.
[0009] Based on the difference between the predicted brain electrical stress value of the target user and the standard brain electrical stress value under the specific state, the parameters of the standard stress prediction model are adjusted to obtain the stress prediction model of the target user.
[0010] The target user's stress prediction model is used to predict the target user's psychological stress.
[0011] Optionally, adjusting the parameters of the standard stress prediction model based on the difference between the predicted brainwave stress value of the target user and the standard brainwave stress value under the specific state includes:
[0012] Based on the predicted brain electrical stress value of the target user and the standard brain electrical stress value under the specific state, the mean square error loss term and correlation coefficient loss term of the standard stress prediction model are determined.
[0013] Based on the difference between the predicted brainwave pressure value of the target user and the standard brainwave pressure value under the specific state, the parameters of the standard pressure prediction model are adjusted until the sum of the mean square error loss term and the correlation coefficient loss term is minimized.
[0014] Optionally, the standard pressure prediction model is generated by the following method:
[0015] Obtain attribute information and actual brainwave pressure values from multiple users;
[0016] Based on the attribute information of the multiple users and the actual brain electrical stress values, multiple training samples are generated;
[0017] The standard pressure prediction model is trained using multiple training samples to obtain the trained standard pressure prediction model.
[0018] Optionally, obtaining the user's actual brain electrical stress value includes:
[0019] Obtain the user's electroencephalogram (EEG) data;
[0020] The user's EEG data is bandpass filtered to obtain filtered EEG data;
[0021] The power spectral density of the filtered EEG data is calculated to generate a power spectral density curve.
[0022] The power of the first band and the power of the second band are determined based on the area of the power spectral density curves of the first band and the second band in the filtered EEG data, respectively; wherein the power of the second band is smaller than that of the first band.
[0023] The user's actual brain electrical energy level is determined based on the power ratio of the first band to the power of the second band.
[0024] Optionally, inputting the attribute information into the standard pressure prediction model includes:
[0025] The sleep stage information in the attribute information is input into the first encoding layer of the Long Short-Term Memory (LSTM) network.
[0026] The heart rate variability information in the attribute information is input into the second encoding layer of the LSTM; wherein the second encoding layer is connected to the first encoding layer through a first splicing layer;
[0027] At least one of the attribute information, such as heart rate information, activity level information, or respiratory rate information, is input into the third encoding layer of the LSTM; wherein the third encoding layer is connected to the second encoding layer through a second splicing layer;
[0028] The features output from the third coding layer of the LSTM are combined with the basic information in the attribute information and then input into the decoder to obtain the sequence of the attribute information.
[0029] The sequence of the attribute information is input into the standard pressure prediction model.
[0030] The psychological stress prediction method of this application, after obtaining attribute information of a target user in a specific state, inputs the attribute information into a standard stress prediction model. After obtaining the predicted EEG stress value of the target user output by the standard stress prediction model, the parameters of the standard stress prediction model are adjusted based on the difference between the predicted EEG stress value of the target user and the standard EEG stress value in the specific state, to obtain a stress prediction model for the target user. Then, the target user's stress prediction model is used to predict the psychological stress of the target user. Therefore, considering the individual differences of the target user, by adjusting the parameters of the standard stress prediction model to obtain a personalized stress prediction model corresponding to the target user, and using the personalized stress prediction model to predict the psychological stress of the target user, the accuracy of psychological stress prediction is improved.
[0031] A second aspect of this application provides a device for predicting psychological stress, comprising:
[0032] The first acquisition module is used to acquire attribute information of the target user in a specific state; wherein, the attribute information includes multiple combinations of gender, age, height, weight, heart rate information, heart rate variability information, activity level information, sleep stage information, or respiratory rate information;
[0033] The second acquisition module is used to acquire a standard stress prediction model; wherein the standard stress prediction model has learned the correspondence between the attribute information and the brain electrical stress value;
[0034] The input module is used to input the attribute information into the standard stress prediction model to obtain the predicted brain electrical stress value of the target user output by the standard stress prediction model.
[0035] An adjustment module is used to adjust the parameters of the standard stress prediction model based on the difference between the predicted brain electrical stress value of the target user and the standard brain electrical stress value under the specific state, so as to obtain the stress prediction model of the target user.
[0036] The prediction module is used to predict the psychological stress of the target user using the target user's stress prediction model.
[0037] The psychological stress prediction device of this application, after acquiring attribute information of a target user in a specific state, inputs the attribute information into a standard stress prediction model. After obtaining the predicted EEG stress value of the target user output by the standard stress prediction model, the parameters of the standard stress prediction model are adjusted based on the difference between the predicted EEG stress value of the target user and the standard EEG stress value in the specific state, to obtain a stress prediction model for the target user. Then, the target user's stress prediction model is used to predict the psychological stress of the target user. Therefore, considering the individual differences of the target user, by adjusting the parameters of the standard stress prediction model to obtain a personalized stress prediction model corresponding to the target user, and using the personalized stress prediction model to predict the psychological stress of the target user, the accuracy of psychological stress prediction is improved.
[0038] A third aspect of this application provides a computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the psychological stress prediction method described in the above embodiments.
[0039] A fourth aspect of this application provides a non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that the program, when executed by a processor, implements the psychological stress prediction method as described in the above embodiments.
[0040] A fifth aspect of this application provides a computer program product that, when instructions in the computer program product are executed by a processor, performs the psychological stress prediction method described in the above embodiments.
[0041] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0042] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein,
[0043] Figure 1A flowchart illustrating a method for predicting psychological stress provided in an embodiment of this application;
[0044] Figure 2 A flowchart illustrating a standard stress prediction model training method provided in this application embodiment;
[0045] Figure 3 A flowchart illustrating another method for predicting psychological stress provided in this application embodiment;
[0046] Figure 4 A schematic diagram of an LSTM structure provided in an embodiment of this application;
[0047] Figure 5 This is a flowchart illustrating a method for predicting psychological stress provided in an embodiment of this application. Detailed Implementation
[0048] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0049] Existing stress assessment models based on wearable devices can be divided into two main categories: qualitative stress assessment and quantitative stress assessment models. Qualitative stress assessment classifies users' stress levels into three categories: no psychological stress, some psychological stress, and high psychological stress. Specifically, it first collects multiple physiological parameters of users under normal mental states, and obtains normal reference ranges for these parameters through learning or self-defined methods, such as the average heart rate range for users under normal mental states. These normal ranges are then pre-stored in the system. When assessing a user's stress state within a specific period, the wearable device first acquires the individual's physiological parameters for that period. The presence and severity of psychological stress are determined based on whether multiple indicators exceed pre-stored parameters and the number of parameters exceeding the pre-stored range. Alternatively, psychological abnormality characteristic values can be defined based on prior knowledge, such as sleep abnormality characteristic values and step count abnormality characteristic values. Each characteristic value is mapped to a score between 0 and 5, with higher scores indicating greater stress. The final psychological stress level is then obtained by summing the stress scores corresponding to each characteristic value.
[0050] Qualitative assessments often discretize stress into rating scales, mapping different stress levels to different levels. Quantitative stress assessment, on the other hand, uses machine learning models or quantitative indicators to transform physiological parameters collected by wearable devices into quantifiable stress assessment values. For example, subjective self-ratings of psychological stress obtained after a psychological stress stimulation experiment can be used as the gold standard. A machine learning model is constructed, using the change in physiological parameter measurements compared to reference values as input, and the corresponding psychological stress changes as output. In practical applications, a threshold for psychological stress change can be pre-set; when the model's estimated psychological stress change exceeds the threshold, a high-stress warning is issued to the user. Another example is using a photoplethysmo graph (PPG) sensor in a wearable device to acquire the user's heart rate variability (HRV) parameters, and using frequency domain analysis to decompose HRV into ultra-low frequency, low frequency, and high frequency components. Finally, an indicator that measures stress level, LF / HF, is used to quantitatively characterize the subject's psychological stress.
[0051] However, current qualitative stress assessment methods often rely on prior knowledge or artificially defined standards. For example, defining normal reference values for physiological parameters often relies solely on existing ranges of physiological parameters collected under normal mental states from databases. Using prior knowledge to define normal physiological parameter ranges depends on large amounts of database data and fails to consider individual differences among users. Furthermore, stress grading depends on the number and content of the selected physiological parameters.
[0052] Current quantitative stress assessment methods rely on indirect methods for estimating the gold standard stress rating. For example, some methods use psychological experiments, estimating stress levels by assigning scores to participants. However, psychological experiments are subject to numerous confounding factors, such as demographic characteristics, educational background, and cultural level of the sample. Therefore, this gold standard estimation method is not a direct measurement of stress. Furthermore, current quantitative assessments utilize relatively simple machine learning models, such as support vector machines. In reality, stress assessment models often take into account complex time-series signals, such as heart rate, respiratory rate, and heart rate variability. Simple models may not be able to capture the correlation characteristics between different time points in the input signals.
[0053] To address the problems existing in the prediction of user psychological stress in related technologies, this application proposes a method for predicting psychological stress. The method, according to embodiments of this application, involves obtaining attribute information of a target user in a specific state, inputting this attribute information into a standard stress prediction model, obtaining the predicted brainwave stress value of the target user output by the standard stress prediction model, adjusting the parameters of the standard stress prediction model based on the difference between the predicted brainwave stress value of the target user and the standard brainwave stress value in the specific state, thereby obtaining a stress prediction model for the target user, and then using this target user stress prediction model to predict the psychological stress of the target user.
[0054] The following describes a method, apparatus, device, and storage medium for predicting psychological stress, based on embodiments of this application.
[0055] Figure 1 This is a flowchart illustrating a method for predicting psychological stress provided in an embodiment of this application.
[0056] This application embodiment illustrates the prediction method configured in a prediction device, which can be applied to any computer device to enable the computer device to perform prediction functions.
[0057] Among these, computer equipment can include personal computers, cloud devices, mobile devices, wearable devices, and so on. For example, wearable devices can include smartwatches, smart bracelets, and so on.
[0058] like Figure 1 As shown, the method for predicting psychological stress includes the following steps:
[0059] Step 101: Obtain the attribute information of the target user in a specific state.
[0060] The attribute information includes multiple combinations of gender, age, height, weight, heart rate information, heart rate variability information, activity level information, sleep stage information, or respiratory rate information.
[0061] One possible approach is to obtain attribute information about the target user in a specific state from the electronic device worn by the target user. This electronic device can be a smart fitness tracker, smartphone, or other smart device.
[0062] Specifically, the target user can be in a deep sleep state, meaning that attribute information about the target user in this state can be obtained. The target user wears an electronic device overnight for data collection, and physiological parameter data collected during the target user's deep sleep state is extracted from the collected data.
[0063] In this embodiment of the application, when the target user wears the electronic device, after logging in with user authentication information, the user's basic personal information can be stored in the electronic device. For example, the user's gender, age, height, weight and other attribute information can be recorded in the electronic device. Therefore, the target user's gender, age, height and weight can be obtained from the electronic device.
[0064] In this embodiment, the heart rate information, heart rate variability information, activity level information, sleep stage information, or respiratory rate information in the attribute information of the target user in a specific state can be calculated from the data collected by the accelerometer and PPG in the electronic device worn by the target user.
[0065] In this embodiment of the application, heart rate information refers to information related to the user's heart rate changes, which may include at least one of average heart rate, maximum heart rate, minimum heart rate, or heart rate standard deviation.
[0066] In this embodiment, heart rate variability refers to the variation in the difference between each heartbeat cycle of a user. It is regulated by neurohumoral factors, thereby assessing its impact on the condition and prevention of cardiovascular diseases. Clinically, it is a valuable indicator for predicting sudden cardiac death and arrhythmias. Heart rate variability information may include the mean RR interval, the standard deviation of the RR interval, the standard deviation of the difference between adjacent RR intervals, the square root of the mean of the sum of squares of the differences between adjacent RR intervals, the absolute value of the median of the RR interval difference, the number of consecutive RR interval differences greater than 50 ms, the ratio of the number of consecutive RR interval differences greater than 50 ms to the number of RR intervals, the number of consecutive RR interval differences greater than 20 ms, the ratio of the number of consecutive RR interval differences greater than 20 ms to the number of RR intervals, the difference between the maximum and minimum RR interval values, the coefficient of variation of consecutive differences, the coefficient of variation, the total power density spectrum, and the value at extremely low frequencies (0.00). The variance of HRV (0.04-0.15 Hz) at low frequencies, the variance of HRV at high frequencies (0.15-40 Hz), the ratio of the variance of HRV at low frequencies (0.04-0.15 Hz) to the variance of HRV at high frequencies (0.15-40 Hz), normalized low-frequency power, normalized high-frequency power, sympathetic index, vagus index, modified vagus index, standard deviation of the projection of the Poincaré plot onto a straight line perpendicular to the equation, standard deviation of the Poincaré projection, or the ratio of the standard deviation of the Poincaré projection to the standard deviation of the projection of the Poincaré plot onto a straight line perpendicular to the equation, at least one of the following:
[0067] The RR interval refers to the time interval between two R waves on an electrocardiogram (ECG). The RR interval can be determined using data acquired by a PPG sensor. The square root of the mean of the sum of the variances of adjacent RR intervals reflects the influence of high-frequency (rapid or parasympathetic) activity on heart rate variability (HRV). At very low frequencies (0.003-0.04 Hz), the variance of HRV reflects the intrinsic rhythm generated by the heart, regulated by sympathetic activity. At low frequencies (0.04-0.15 Hz), the variance of HRV reflects both sympathetic and parasympathetic activity. At high frequencies (0.15-40 Hz), the variance of HRV reflects the rapid, beat-by-beat variability caused by parasympathetic (vagus) activity.
[0068] Activity level information refers to the activity level of the target user when wearing the electronic device. Sleep stage information refers to the segmentation of sleep into different phases based on the user's electroencephalogram (EEG) activity during sleep. Respiratory rate information, also known as respiratory frequency information, refers to the number of times the user breathes per minute.
[0069] Step 102: Obtain the standard stress prediction model; wherein the standard stress prediction model has learned the correspondence between attribute information and brain electrical stress values.
[0070] Among them, the brain electrical pressure value refers to the value obtained based on the pressure-related data collected by the brain electrical device.
[0071] In this embodiment of the application, the standard stress prediction model is a prediction model that has been trained with training samples and has learned the correspondence between the user's attribute information and brain electrical stress value.
[0072] It is understandable that, since the physiological data collected by different users wearing electronic devices are not the same and there are specific differences, in order to improve the accuracy of psychological stress prediction, this application first obtains a standard stress prediction model, and then adjusts the parameters of the standard stress prediction model to obtain a stress prediction model for each target user.
[0073] Step 103: Input the attribute information into the standard stress prediction model to obtain the predicted brain electrical stress value of the target user output by the standard stress prediction model.
[0074] Since the standard stress prediction model has learned the correspondence between user attribute information and brain electrical stress value, after obtaining the attribute information of the target user in a specific state, the standard stress prediction model can be used to predict the target user's predicted brain electrical stress value.
[0075] For example, after obtaining the attribute information of target user A in deep sleep, the user's attribute information can be input into a standard stress prediction model to obtain the predicted brain electrical stress value of the target user.
[0076] Step 104: Based on the difference between the predicted brain electrical stress value of the target user and the standard brain electrical stress value under a specific state, adjust the parameters of the standard stress prediction model to obtain the stress prediction model for the target user.
[0077] The standard value for brain electrical stress in a specific state can be the average of brain electrical stress values from multiple users in that state. For example, brain electrical stress values from 1000 users in deep sleep can be collected, and the average of these 1000 user brain electrical stress values can be used as the standard value for brain electrical stress in deep sleep. Since the baseline stress levels in deep sleep are relatively similar among individuals, the average of brain electrical stress values from multiple users in deep sleep can be used as the standard value for brain electrical stress.
[0078] It is understandable that, due to the differences in physiological signals between individuals, the attribute information of different users in a specific state will differ. After inputting the attribute information of the target user into the standard stress prediction model, the parameters of the standard stress prediction model can be adjusted according to the difference between the predicted brain electrical stress value of the target user output by the standard stress prediction model and the standard brain electrical stress value in a specific state, so as to obtain the stress prediction model of the target user.
[0079] As one possible approach, when adjusting the parameters of the standard stress prediction model based on the difference between the target user's predicted EEG stress value and the standard EEG stress value under a specific state, the mean squared error loss term and correlation coefficient loss term of the standard stress prediction model can be determined based on these two values. Then, the parameters of the standard stress prediction model are adjusted according to the difference between the target user's predicted EEG stress value and the standard EEG stress value under a specific state until the sum of the mean squared error loss term and the correlation coefficient loss term is minimized. Thus, by fine-tuning the parameters of the standard stress prediction model, a stress prediction model for the target user is obtained, achieving personalized transfer of the standard stress prediction model and improving the accuracy of model predictions.
[0080] Step 105: Use the target user stress prediction model to predict the psychological stress of the target user.
[0081] In this embodiment of the application, after adjusting the parameters of the standard stress prediction model to obtain the stress prediction model for the target user, the attribute information of the target user can be obtained. The attribute information of the target user is then input into the stress prediction model for the target user, so as to determine the psychological stress of the target user based on the output of the stress prediction model for the target user.
[0082] It should be explained that the input target user's attribute information is not limited to information collected in a specific state. It can be attribute information collected when the target user is in any state, such as attribute information collected when the target user is eating or exercising, etc. This application does not limit this.
[0083] In this application, the target user's attribute information can be obtained through data collected by the electronic device worn by the target user. The electronic device does not need to contain an EEG sensor, thus avoiding the problems of large measurement errors and limited application scenarios that exist in wearable EEG devices.
[0084] The psychological stress prediction method of this application, after obtaining attribute information of a target user in a specific state, inputs the attribute information into a standard stress prediction model. After obtaining the predicted EEG stress value of the target user output by the standard stress prediction model, the parameters of the standard stress prediction model are adjusted based on the difference between the predicted EEG stress value of the target user and the standard EEG stress value in the specific state, to obtain a stress prediction model for the target user. Then, the target user's stress prediction model is used to predict the psychological stress of the target user. Therefore, considering the individual differences of the target user, by adjusting the parameters of the standard stress prediction model to obtain a personalized stress prediction model corresponding to the target user, and using the personalized stress prediction model to predict the psychological stress of the target user, the accuracy of psychological stress prediction is improved.
[0085] The standard pressure prediction model has already been mentioned in the above embodiments; the following will combine it with... Figure 2 The training process of the standard stress prediction model is described in detail. Figure 2 This is a flowchart illustrating a training method for a standard pressure prediction model provided in an embodiment of this application.
[0086] like Figure 2 As shown, the training method may include the following steps:
[0087] Step 201: Obtain attribute information and actual brain electrical stress values for multiple users.
[0088] Understandably, due to differences in gender, age, body shape, weight, heart rate information, heart rate variability, activity level, sleep stage information, and respiratory rate information among different users, their psychological stress levels will vary. Therefore, when training a standard stress prediction model to predict users' psychological stress, the model can be trained based on the attribute information and actual brain electrical stress values of multiple users.
[0089] In this embodiment of the application, attribute information and actual brain electrical stress values can be obtained from multiple users simultaneously wearing electronic devices and EEG devices.
[0090] For example, the Montreal Imaging Stress Task (MIST) can be used to induce different stress states in multiple users in order to obtain attribute information and actual brain electrical stress values of users under different stress states.
[0091] The brain is the most direct organ for humans to respond to stress and stressful situations. Studies have shown that the relative Gamma wave energy of the prefrontal cortex can effectively characterize the brain's stress state. In other words, the relative Gamma wave energy can be used to reflect the user's actual brain electrical stress value.
[0092] As one possible approach, when acquiring a user's actual brainwave stress value, one can first acquire the user's brainwave data collected by the EEG device. After acquiring the user's brainwave data, a bandpass filter can be applied to the data to obtain filtered brainwave data. For example, a 1-100Hz bandpass filter can be applied to the user's brainwave data, and a notch filter can be used to remove power frequency noise.
[0093] Furthermore, the power spectral density of the filtered EEG data is calculated to generate a power spectral density curve. Based on the area under the power spectral density curves of the first and second bands in the filtered EEG data, the power of the first and second bands is determined respectively. The actual EEG power value of the user is then determined based on the ratio of the power of the first band to the power of the second band. The second band power is lower than the first band power.
[0094] As an example, the first band can be the Gamma band, such as 25-45Hz, and the second band can be the low-frequency band, such as 4-13Hz. The power ratio of the Gamma band to the low-frequency band can be calculated to obtain the relative Gamma wave energy. The relative Gamma wave energy characterizes the user's actual brain electrical energy value.
[0095] It should be noted that real-time stress assessment can be performed using a sliding window method. Taking a 3-minute sliding window as an example, a 3-minute segment of physiological data is extracted every second. Within this segment, at least one of the following attributes of multiple users is collected: heart rate, heart rate variability, activity level, sleep stage, or respiratory rate. The corresponding 3-minute actual brain electrical stress value is then extracted.
[0096] Step 202: Generate multiple training samples based on the attribute information and actual brain electrical stress values of multiple users.
[0097] Training samples refer to the samples used to train the standard stress prediction model.
[0098] In this embodiment, each training sample may include the user's attribute information and actual brain electrical stress value. After obtaining the attribute information and actual brain electrical stress value of multiple users, multiple training samples can be generated based on the attribute information and actual brain electrical stress value of each user.
[0099] Step 203: Train the standard stress prediction model using multiple training samples to obtain the trained standard stress prediction model.
[0100] In this embodiment of the application, after generating multiple training samples based on the attribute information and actual brain electrical stress values of multiple users, the standard stress prediction model can be trained using multiple training samples.
[0101] Optionally, after inputting multiple training samples into the standard stress prediction model, the model parameters of the standard stress prediction model can be adjusted based on the difference between the predicted EEG stress value output by the standard stress prediction model and the user's actual EEG stress value, to obtain a trained standard stress prediction model. Since the difference between the predicted EEG stress value and the user's actual EEG stress value is minimal after training, the trained standard stress prediction model can predict the user's EEG stress value based on the input user attribute information.
[0102] As one possible implementation, when training a standard stress prediction model using multiple training samples, multiple training samples can be input into the model to predict multiple predicted brain electrical stress values. Based on these predicted and actual brain electrical stress values, the mean squared error loss term and the correlation coefficient loss term of the stress prediction model are determined. Furthermore, based on the difference between the predicted and actual brain electrical stress values, the parameters of the standard stress prediction model are adjusted until the sum of the mean squared error loss term and the correlation coefficient loss term is minimized. Therefore, compared to conventional models using a loss function, this application adds a correlation coefficient loss term to the loss function, mitigating the impact of outliers in the signal on the regression results.
[0103] As an example, the loss function of a standard stress prediction model can be expressed by the following formula (1):
[0104] Loss=MSE(f(t),g(t))+Correlation_coefficient_loss(f(t),g(t)) (1)
[0105]
[0106] Correlation_coefficient_loss=1-(Pearson'scorrelationcoefficient) 2 (3)
[0107]
[0108] In this context, Loss represents the loss function of the standard stress prediction model, MSE represents the mean squared error loss term, which is the sum of the squared differences between each predicted EEG stress value and the standard EEG stress value output by the standard stress prediction model. f(t) is the predicted EEG stress value, g(t) is the standard EEG stress value, Correlation_coefficient_loss represents the correlation coefficient loss term, which is inversely proportional to the Pearson correlation coefficient between the predicted curve and the gold standard curve in the input window, mean(f(t)) represents the mean of the predicted EEG stress value, and mean(g(t)) represents the mean of the standard EEG stress value. Since the error of using only MSE may be affected by some maximum or minimum values in the collected data, this application adds an additional correlation coefficient loss term to the loss function. The specific calculation method is shown in formulas (3) and (4). The correlation coefficient loss term refers to the correlation between the overall curve between the predicted EEG stress value and the standard EEG stress value, and it has high robustness to outliers in the input data.
[0109] In this embodiment, attribute information and actual brainwave stress values of multiple users are obtained. Multiple training samples are generated based on these data. These training samples are then used to train a standard stress prediction model, resulting in a trained standard stress prediction model. Therefore, by training the standard stress prediction model based on the attribute information and actual brainwave stress values of multiple users, a personalized stress prediction model can be obtained by simply fine-tuning the parameters of the standard model when predicting users' psychological stress, thus improving the accuracy of predicting users' psychological stress.
[0110] Based on the above embodiments, when inputting user attribute information into the standard pressure prediction model, the various parts of the attribute information can be input based on the network structure of each layer of the Long Short Memory Network. The following section combines... Figure 3 A detailed introduction will be provided. Figure 3 A flowchart illustrating another method for predicting psychological stress provided in this application embodiment.
[0111] like Figure 3 As shown, the method for predicting psychological stress may include the following steps:
[0112] Step 301: Input the sleep stage information from the attribute information into the first encoding layer of the Long Short-Term Memory (LSTM) network.
[0113] Among them, Long Short Term Memory Network (LSTM) is a special type of recurrent neural network that can solve time series prediction problems and has a recurrent structure.
[0114] Understandably, since most of the input parameters are time series features, in order to enable the regression network to fully extract the complex relationship features between different time points, LSTM is proposed as the main network structure.
[0115] In this embodiment, the acquisition of various physiological parameter features included in the user's attribute information needs to be statistically calculated within a time window. Furthermore, the calculation windows for different features vary. For example, the calculation cycle for sleep staging results is 30 seconds (i.e., one staging result is generated every 30 seconds, corresponding to a sampling rate of 1 / 30). The calculation window for heart rate variability information (a secondary feature of RR interval data) related indicators is 5 seconds, while other features such as heart rate-related features, respiratory rate features, and raw RR interval data features are all output in 1-second units. Therefore, to reflect the differences in sampling rates of different physiological parameter inputs in the neural network, a method can be adopted... Figure 4 The hierarchical LSTM structure design is shown.
[0116] Optionally, the heart rate information, heart rate variability information, activity level information, sleep stage information, or respiratory rate information contained in the user attribute information can be divided into three different levels according to the sampling rate from low to high. The sleep stage information with the lowest sampling rate is used as the input of the first coding layer, while the heart rate-related feature input with the highest sampling rate is used as the input of the innermost layer.
[0117] In this embodiment of the application, after obtaining the sleep stage information in the user attribute information, the sleep stage information can be feature extracted to obtain sleep stage features. The sleep stage features are then input into the first encoding layer of the LSTM, and the first encoding layer encodes the sleep stage features using LSTM.
[0118] Step 302: Input the heart rate variability information from the attribute information into the second coding layer of the LSTM.
[0119] The second coding layer is connected to the first coding layer through the first splicing layer.
[0120] In this embodiment of the application, after obtaining the heart rate variability information in the user's attribute information, feature extraction can be performed on the heart rate variability information to obtain heart rate variability features, and then the heart rate variability features are input into the second encoding layer of LSTM.
[0121] Step 303: Input at least one of the heart rate information, activity level information, or respiratory rate information from the attribute information into the third encoding layer of the LSTM.
[0122] The third coding layer is connected to the second coding layer through a second splicing layer.
[0123] In this embodiment of the application, after obtaining at least one of the user's attribute information, such as heart rate information, activity level information, or respiratory rate information, feature extraction can be performed on at least one of the heart rate information, activity level information, or respiratory rate information to obtain at least one of the heart rate features, activity level features, or respiratory rate features. Then, at least one of the heart rate features, activity level features, or respiratory rate features is input into the third encoding layer of the LSTM.
[0124] In this embodiment, each encoding layer of the LSTM encodes the input features to fully learn the relationships between time points, and different encoding layers are connected through different concatenation layers.
[0125] Step 304: The features output from the third coding layer of the LSTM are combined with the basic information in the attribute information and then input into the decoder to obtain the sequence of attribute information.
[0126] In this embodiment of the application, after obtaining user attribute information, feature extraction can be performed on the basic information in the attribute information to obtain basic information features. The features output by the third coding layer of LSTM are merged with the basic information features, and the merged features are input into the decoder to obtain the sequence of attribute information.
[0127] Optionally, when merging the features output by the third coding layer of the LSTM with the basic information features, the basic information features can be placed before or after the features output by the third coding layer of the LSTM; no limitation is made here.
[0128] As an example, such as Figure 4As shown, for a 3-minute input data window, assuming the sampling period for sleep stages is 30 seconds, the sampling period for heart rate variability is 5 seconds, and the sampling period for heart rate, activity level, and respiratory rate is 1 second, the input to the first encoding layer of the LSTM has 6 sampling points, and the input to the second encoding layer has 36 sampling points. The input to the first encoding layer, after passing through the first encoding layer of the LSTM, has a dimension of 6*1. After the first concatenation and resampling, the corresponding dimension becomes 36*1. This is then concatenated with the 36*k input of the second encoding layer (where k is the number of physiological parameters corresponding to the input of the second encoding layer), resulting in a feature dimension of 36*(k+1). Finally, the features after passing through the third encoding layer of the LSTM are merged with the basic information, and then a decoder outputs a sequence of attribute information.
[0129] Step 305: Input the sequence of attribute information into the standard pressure prediction model.
[0130] In this embodiment of the application, after obtaining the sequence of attribute information, the sequence of attribute information can be input into the standard stress prediction model to output the predicted brain voltage stress value according to the standard stress prediction model.
[0131] In this embodiment, LSTM is used to extract complex relationship features between different time points from the user's attribute information. Different encoding layers are designed according to the differences in the sampling rate of the input features. The encoding layers with different sampling rates are spliced together by resampling and concatenation.
[0132] To achieve the above embodiments, this application proposes a psychological stress prediction device.
[0133] Figure 5 This is a schematic diagram of the structure of a psychological stress prediction device provided in an embodiment of this application.
[0134] like Figure 5 As shown, the psychological stress prediction device 500 may include: a first acquisition module 510, a second acquisition module 520, an input module 530, an adjustment module 540, and a prediction module 550.
[0135] The first acquisition module 510 is used to acquire attribute information of the target user in a specific state; the attribute information includes multiple combinations of gender, age, height, weight, heart rate information, heart rate variability information, activity level information, sleep stage information, or respiratory rate information.
[0136] The second acquisition module 520 is used to acquire a standard stress prediction model; wherein, the standard stress prediction model has learned the correspondence between attribute information and brain electrical stress values;
[0137] Input module 530 is used to input attribute information into the standard stress prediction model to obtain the predicted brain electrical stress value of the target user output by the standard stress prediction model.
[0138] The adjustment module 540 is used to adjust the parameters of the standard stress prediction model based on the difference between the predicted brain electrical stress value of the target user and the standard brain electrical stress value under a specific state, so as to obtain the stress prediction model of the target user.
[0139] The prediction module 550 is used to predict the psychological stress of the target user using a target user stress prediction model.
[0140] As one possible scenario, adjustment module 540 can also be used for:
[0141] Based on the predicted brain electrical stress value of the target user and the standard brain electrical stress value under the specific state, the mean square error loss term and correlation coefficient loss term of the standard stress prediction model are determined.
[0142] Based on the difference between the predicted brainwave pressure value of the target user and the standard brainwave pressure value under the specific state, the parameters of the standard pressure prediction model are adjusted until the sum of the mean square error loss term and the correlation coefficient loss term is minimized.
[0143] As another possible scenario, the psychological stress prediction device 500 may also include:
[0144] The third acquisition module is used to acquire attribute information and actual brain electrical stress values of multiple users;
[0145] The generation module is used to generate multiple training samples based on the attribute information and actual brain electrical stress values of multiple users;
[0146] The training module is used to train the standard stress prediction model using multiple training samples to obtain the trained standard stress prediction model.
[0147] As another possibility, the third acquisition module can also be used for:
[0148] The system acquires the user's EEG data; performs bandpass filtering on the user's EEG data to obtain filtered EEG data; calculates the power spectral density of the filtered EEG data to generate a power spectral density curve; determines the power of the first and second bands respectively based on the area of the power spectral density curves of the first and second bands in the filtered EEG data; wherein the power of the second band is less than that of the first band; and determines the user's actual EEG power value based on the power ratio of the first band to the second band.
[0149] As another possible scenario, input module 530 can also be used for:
[0150] The sleep stage information from the attribute information is input into the first encoding layer of the Long Short-Term Memory (LSTM) network; the heart rate variability information from the attribute information is input into the second encoding layer of the LSTM; wherein the second encoding layer is connected to the first encoding layer through a splicing layer; at least one of the heart rate information, activity level information, or respiratory rate information from the attribute information is input into the third encoding layer of the LSTM; wherein the third encoding layer is connected to the second encoding layer through a second splicing layer; the features output from the third encoding layer of the LSTM are combined with the basic information from the attribute information and input into the decoder to obtain the sequence of attribute information; the sequence of attribute information is then input into a standard stress prediction model.
[0151] It should be noted that the foregoing explanation of the prediction method embodiment also applies to the prediction device of this embodiment, and will not be repeated here.
[0152] The psychological stress prediction device of this application, after acquiring attribute information of a target user in a specific state, inputs the attribute information into a standard stress prediction model. After obtaining the predicted EEG stress value of the target user output by the standard stress prediction model, the parameters of the standard stress prediction model are adjusted based on the difference between the predicted EEG stress value of the target user and the standard EEG stress value in the specific state, to obtain a stress prediction model for the target user. Then, the target user's stress prediction model is used to predict the psychological stress of the target user. Therefore, considering the individual differences of the target user, by adjusting the parameters of the standard stress prediction model to obtain a personalized stress prediction model corresponding to the target user, and using the personalized stress prediction model to predict the psychological stress of the target user, the accuracy of psychological stress prediction is improved.
[0153] To implement the above embodiments, this application also proposes a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the psychological stress prediction method as described in the above embodiments.
[0154] To implement the above embodiments, this application also proposes a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the psychological stress prediction method described in the above embodiments.
[0155] To implement the above embodiments, this application also proposes a computer program product that, when executed by an instruction processor, implements the psychological stress prediction method described in the above embodiments.
[0156] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0157] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0158] Although embodiments of this application have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of this application, the scope of which is defined by the claims and their equivalents.
Claims
1. A method for predicting psychological stress, characterized in that, include: Obtain attribute information of a target user in a specific state; wherein, the attribute information includes at least one of gender, age, height, and weight, and the attribute information also includes at least one of heart rate information, heart rate variability information, activity level information, sleep stage information, or respiratory rate information; Obtain a standard stress prediction model; wherein the standard stress prediction model has learned the correspondence between the attribute information and brain electrical stress values; The attribute information is input into the standard stress prediction model to obtain the predicted brainwave stress value of the target user output by the standard stress prediction model. Based on the difference between the predicted brain electrical stress value of the target user and the standard brain electrical stress value under the specific state, the parameters of the standard stress prediction model are adjusted to obtain the stress prediction model of the target user, wherein the standard brain electrical stress value is the average of the brain electrical stress values of multiple users under the specific state. The target user's stress prediction model is used to predict the target user's psychological stress. The standard pressure prediction model is generated using the following method: Obtain attribute information and actual brain electrical stress values for multiple users, including: Acquire the user's electroencephalogram (EEG) data; The user's EEG data is bandpass filtered to obtain filtered EEG data; The power spectral density of the filtered EEG data is calculated to generate a power spectral density curve. The power of the first band and the power of the second band are determined based on the area of the power spectral density curves of the first band and the second band in the filtered EEG data, respectively; wherein the power of the second band is smaller than that of the first band. The user's actual brainwave electrical stress value is determined based on the power ratio of the first band to the power of the second band. Based on the attribute information of the multiple users and the actual brain electrical stress values, multiple training samples are generated; The standard pressure prediction model is trained using multiple training samples to obtain the trained standard pressure prediction model.
2. The prediction method according to claim 1, characterized in that, The step of adjusting the parameters of the standard stress prediction model based on the difference between the predicted brainwave stress value of the target user and the standard brainwave stress value under the specific state includes: Based on the predicted brain electrical stress value of the target user and the standard brain electrical stress value under the specific state, the mean square error loss term and correlation coefficient loss term of the standard stress prediction model are determined. Based on the difference between the predicted brainwave pressure value of the target user and the standard brainwave pressure value under the specific state, the parameters of the standard pressure prediction model are adjusted until the sum of the mean square error loss term and the correlation coefficient loss term is minimized.
3. The prediction method according to claim 1 or 2, characterized in that, The step of inputting the attribute information into the standard pressure prediction model includes: The sleep stage information in the attribute information is input into the first encoding layer of the Long Short-Term Memory (LSTM) network. The heart rate variability information in the attribute information is input into the second encoding layer of the LSTM; wherein the second encoding layer is connected to the first encoding layer through a first splicing layer; At least one of the attribute information, such as heart rate information, activity level information, or respiratory rate information, is input into the third encoding layer of the LSTM; wherein the third encoding layer is connected to the second encoding layer through a second splicing layer; The features output from the third coding layer of the LSTM are combined with the basic information in the attribute information and then input into the decoder to obtain the sequence of the attribute information. The sequence of the attribute information is input into the standard pressure prediction model.
4. A device for predicting psychological stress, characterized in that, include: The first acquisition module is used to acquire attribute information of the target user in a specific state; wherein, the attribute information includes at least one of gender, age, height, and weight, and the attribute information also includes at least one of heart rate information, heart rate variability information, activity level information, sleep stage information, or respiratory rate information; The second acquisition module is used to acquire a standard stress prediction model; wherein the standard stress prediction model has learned the correspondence between the attribute information and the brain electrical stress value; The input module is used to input the attribute information into the standard stress prediction model to obtain the predicted brain electrical stress value of the target user output by the standard stress prediction model. An adjustment module is used to adjust the parameters of the standard stress prediction model based on the difference between the predicted brainwave stress value of the target user and the standard brainwave stress value under the specific state, so as to obtain the stress prediction model of the target user, wherein the standard brainwave stress value is the average of the brainwave stress values of multiple users under the specific state. The prediction module is used to predict the psychological stress of the target user using the target user's stress prediction model; The third acquisition module is used to acquire attribute information and actual brain electrical stress values of multiple users; The generation module is used to generate multiple training samples based on the attribute information of the multiple users and the actual brain electrical stress values; The training module is used to train the standard stress prediction model using multiple training samples to obtain the trained standard stress prediction model. The third acquisition module is also used for: Acquire the user's electroencephalogram (EEG) data; The user's EEG data is bandpass filtered to obtain filtered EEG data; The power spectral density of the filtered EEG data is calculated to generate a power spectral density curve. The power of the first band and the power of the second band are determined based on the area of the power spectral density curves of the first band and the second band in the filtered EEG data, respectively; wherein the power of the second band is smaller than that of the first band. The user's actual brainwave electrical stress value is determined based on the power ratio of the first band to the power of the second band.
5. The prediction device according to claim 4, characterized in that, The adjustment module is also used for: Based on the predicted brain electrical stress value of the target user and the standard brain electrical stress value under the specific state, the mean square error loss term and correlation coefficient loss term of the standard stress prediction model are determined. Based on the difference between the predicted brainwave pressure value of the target user and the standard brainwave pressure value under the specific state, the parameters of the standard pressure prediction model are adjusted until the sum of the mean square error loss term and the correlation coefficient loss term is minimized.
6. The prediction device according to claim 4 or 5, characterized in that, The input module is also used for: The sleep stage information in the attribute information is input into the first encoding layer of the Long Short-Term Memory (LSTM) network. The heart rate variability information in the attribute information is input into the second encoding layer of the LSTM; wherein the second encoding layer is connected to the first encoding layer through a splicing layer; At least one of the attribute information, such as heart rate information, activity level information, or respiratory rate information, is input into the third encoding layer of the LSTM; wherein the third encoding layer is connected to the second encoding layer through a second splicing layer; The features output from the third coding layer of the LSTM are combined with the basic information in the attribute information and then input into the decoder to obtain the sequence of the attribute information. The sequence of the attribute information is input into the standard pressure prediction model.
7. A computer device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements the method for predicting psychological stress as described in any one of claims 1-3.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the method for predicting psychological stress as described in any one of claims 1-3.
Citation Information
Patent Citations
Psychological stress assessment method and apparatus
CN110337699A
Wireless portable psychological stress evaluation device
CN210541591U