Psychological stress machine learning combination model classification method and device, equipment and medium
By adopting the HRV-based psychological stress machine learning combination model classification method in psychological stress recognition, the problems of insufficient feature extraction and weak model generalization ability in the existing technology are solved, and higher classification accuracy and efficient utilization of computing resources are achieved.
Patent Information
- Application Number
- CN202411441429.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-02-25
AI Technical Summary
The prior art has problems such as insufficient feature extraction, weak model generalization ability, and waste of computing resources in psychological stress recognition.
The HRV-based psychological stress machine learning combination model classification method is adopted, and HRV features are extracted by obtaining the original ECG data, multiple different classification models are constructed and the final classification results are obtained through the voting mechanism, and data and models are distributed in parallel to improve computing efficiency.
It improves the accuracy and generalization ability of psychological stress classification, reduces the waste of computing resources, and improves the interpretability of the method through the use of combined models.
Smart Images

Figure CN119513522A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of psychological stress recognition technology, and in particular to a psychological stress machine learning combined model classification method, device, equipment and medium. Background Art
[0002] In order to enable individuals to understand whether they are in a high-pressure state of psychological stress in a timely manner, the existing technology has proposed some machine learning psychological stress classification methods, but these solutions still have shortcomings, as analyzed below:
[0003] (1) A single deep learning neural network combined with photoplethysmography (PPG) data segments. This method is suitable for mobile pressure detection of wearable devices such as smart watches. It uses a deep learning neural network and directly uses PPG segments for pressure detection. The essence of this method is to input all the data recorded by PPG into the neural network at one time, allowing the neural network to process the relevant data content by itself, find the association between the data and make classifications. The disadvantage of this method is that although the neural network has a powerful automatic feature extraction capability, its powerful feature extraction capability not only extracts relevant information, but also extracts a large amount of irrelevant information. The irrelevant information can easily cause deviations in the training process, making it unable to correctly understand the data relationship, and the method has poor interpretability.
[0004] (2) Extracting HRV time domain parameters from PPG data for classification. Although this method screened out HRV time domain parameters with high correlation through experiments, it ignored the role of HRV frequency domain parameters in the psychological stress classification process. Although there are few basic HRV parameters, many different parameters can be generated through certain mathematical transformations or certain mathematical comparisons between data. This method only extracts basic parameters and does not further transform and process the HRV parameters in a mathematical way. Therefore, it is not possible to reasonably extract frequency domain parameters, and only extracts time domain parameters. Through literature research, it is found that frequency domain indicators that have been mathematically processed play an extremely critical role in the classification task of psychological stress based on HRV, and whether or not there is stress has a high correlation with some frequency domain parameters. Therefore, in the task of psychological stress classification, abandoning frequency domain information for machine learning model training will affect the psychological stress classification performance of the model.
[0005] (3) A stress classification method based on HRV parameters using a single machine learning model. This method processes the ECG signal accordingly and extracts relevant HRV parameters as features in the actual machine learning model training process. The essence of this method is to use a machine learning model as a classification model to directly extract some HRV parameters to classify the psychological stress state. However, a single machine learning method often has certain methodological limitations, its generalization ability in classification performance is weak, and it cannot fully utilize the computer's computing power resources, which may cause a waste of computer computing power resources. Summary of the invention
[0006] In order to solve at least one of the technical problems existing in the prior art to a certain extent, the purpose of the present invention is to provide a method, device, equipment and medium for classifying a psychological stress machine learning combined model based on HRV.
[0007] The first technical solution adopted by the present invention is:
[0008] A psychological stress machine learning combined model classification method comprises the following steps:
[0009] Obtaining original ECG data, and obtaining HRV data according to the original ECG data;
[0010] Construct multiple different classification models and use the obtained HRV data to train each classification model;
[0011] The trained multiple classification models are combined into a combined model, and the final classification result is obtained through a voting mechanism;
[0012] In the process of training the classification model, a parallel computing method is adopted to distribute the HRV data and multiple classification models to multiple computing units, so that each computing unit can independently train a classification model.
[0013] Furthermore, the HRV data includes 8 key features: the mean value MEAN_RR of the heart rate interval, the standard deviation SDRR of the heart rate interval, the root mean square RMSSD of the difference between adjacent heart rate intervals in the heart rate interval sequence, the percentage pNN50 of the difference between adjacent heart rate intervals in the heart rate interval sequence greater than 50ms, the standard deviation SD1 of the minor axis of the Poincare scatter plot ellipse, the standard deviation SD2 of the major axis of the Poincare scatter plot ellipse, the very low frequency power VLF, and the ratio of low frequency power to high frequency power LF_HF.
[0014] Further, the obtaining of original ECG data and obtaining HRV data according to the original ECG data includes:
[0015] The original ECG data is obtained, and a 5-minute heartbeat interval is extracted from the electrocardiogram signal of each subject according to the original ECG data. The features are calculated for each peak in the 5-minute heartbeat interval to obtain HRV data.
[0016] Furthermore, the multiple classification models include: five machine learning models, namely, extreme gradient boosting decision tree XGBoost, K-nearest neighbor algorithm KNN, random forest RF, support vector machine SVM, and gradient boosting decision tree GBDT, as well as two deep learning models, namely, multi-layer perceptron MLP and convolutional neural network CNN.
[0017] Furthermore, the method of using the obtained HRV data to train each classification model includes:
[0018] Use grid search to tune parameters or optimize structure of each classification model to train a machine learning or deep learning model.
[0019] Furthermore, the multiple trained classification models are combined into a combined model, and the final classification result is obtained through a voting mechanism, including:
[0020] In the combined model, a weight is assigned to each classification model; when different classification models predict different results under the same classification task, the combined model performs accumulation operations in counters of different categories according to the prediction results of different classification models and the weights of the classification models, and compares the values of counters of different categories using a comparator, and finally selects the category with the larger count result in the accumulator as the output.
[0021] Furthermore, the process of training the classification model includes:
[0022] For each model, a processor in a multi-processor computer is used for training to achieve parallel training of the algorithm, and in subsequent combined model updates, a single classification model can be easily added or deleted.
[0023] The second technical solution adopted by the present invention is:
[0024] A psychological stress machine learning combined model classification device, comprising:
[0025] A data acquisition module, used for acquiring raw ECG data, and acquiring HRV data according to the raw ECG data;
[0026] A model training module is used to build multiple different classification models and train each classification model using the obtained HRV data;
[0027] The model combination module is used to form a combination model from multiple trained classification models and obtain the final classification result through a voting mechanism;
[0028] In the process of training the classification model, a parallel computing method is adopted to distribute the HRV data and multiple classification models to multiple computing units, so that each computing unit can independently train a classification model.
[0029] The third technical solution adopted by the present invention is:
[0030] An electronic device comprises a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement a psychological stress machine learning combined model classification method as described above.
[0031] The fourth technical solution adopted by the present invention is:
[0032] A computer-readable storage medium, wherein at least one instruction, at least one program, code set or instruction set is stored in the storage medium, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor to implement a psychological stress machine learning combined model classification method as described above.
[0033] The fifth technical solution adopted by the present invention is:
[0034] A computer program product or a computer program includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above method.
[0035] The beneficial effects of the present invention are as follows: the present invention adopts a combination of multiple machine learning method models; in the use of algorithm models, not only a deep learning method with strong automatic feature extraction capability is adopted, but also a machine learning method is adopted to increase the overall interpretability of the model; in the feature extraction scheme, in addition to some HRV basic parameters, more HRV basic parameters are used after mathematical transformation or mathematical comparison processing, and combined with the time domain analysis characteristics and frequency domain analysis characteristics of HRV, which can better enable the machine learning method to obtain clear learning features and reduce the influence of noise in the data. In addition, since the present invention adopts a multi-model combined voting method, in the process of training the model, a parallel computing method is adopted to distribute the data to multiple computing units, so that each computing unit can independently train a model and give full play to the computing power of the computer. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the embodiments of the present invention or the drawings of related technical solutions in the prior art are introduced below. It should be understood that the drawings introduced below are only for the convenience of clearly describing some embodiments of the technical solutions of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0037] Figure 1 is a flowchart of the steps of a psychological stress machine learning combined model classification method in an embodiment of the present invention;
[0038] Figure 2 is a schematic diagram of a classification method of a psychological stress machine learning combined model based on HRV in an embodiment of the present invention;
[0039] Figure 3 is a schematic diagram of the relationship between pressure and HRV feature extraction in an embodiment of the present invention;
[0040] Figure 4 It is a schematic diagram of the construction principle of the combined model in an embodiment of the present invention;
[0041] Figure 5 Schematic diagram of the application of a wearable device in an embodiment of the present invention. DETAILED DESCRIPTION
[0042] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and are not to be construed as limitations of the present invention. For the step numbers in the following embodiments, they are only provided for the convenience of explanation, and the order between the steps is not limited in any way, and the execution order of each step in the embodiment can be adaptively adjusted according to the understanding of those skilled in the art.
[0043] In the description of the present invention, it should be understood that descriptions involving orientations, such as up, down, front, back, left, right, etc., and orientations or positional relationships indicated are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.
[0044] In the description of the present invention, "several" means one or more, "more" means more than two, "greater than", "less than", "exceed" etc. are understood as not including the number itself, and "above", "below", "within" etc. are understood as including the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing the technical features, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0045] In the description of the present invention, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention based on the specific content of the technical solution.
[0046] Terminology explanation:
[0047] ECG: Electrocardiogram is a technology that uses an electrocardiograph to record the changes in electrical activity produced by each heart cycle from the body surface.
[0048] HRV: Heart rate variability refers to the irregularity and variability of heartbeat intervals. HRV reflects the regulatory function of the cardiac autonomic nervous system, that is, the balance between the sympathetic nervous system and the parasympathetic nervous system. The sympathetic nervous system is generally associated with stress and activation, while the parasympathetic nervous system is associated with recovery and calmness. Higher HRV is generally associated with better cardiovascular health, stronger adaptive capacity, and a lower risk of chronic diseases. Conversely, lower HRV may be associated with poor health conditions such as cardiovascular disease, stress, and anxiety. HRV analysis methods are divided into time domain analysis and frequency domain analysis. Time domain analysis usually involves measuring the standard deviation of adjacent heartbeat intervals, while frequency domain analysis decomposes HRV into different frequency bands, such as high frequency (HF) and low frequency (LF), thereby providing more detailed information.
[0049] Example 1
[0050] like Figure 1 and Figure 2 As shown, this embodiment provides a classification method for a psychological stress machine learning combined model based on HRV, comprising the following steps:
[0051] S1, obtaining original ECG data, and obtaining HRV data according to the original ECG data;
[0052] S2, construct multiple different classification models, and use the obtained HRV data to train each classification model;
[0053] S3, the trained multiple classification models are combined into a combined model, and the final classification result is obtained through a voting mechanism;
[0054] In the process of training the classification model, a parallel computing method is adopted to distribute the HRV data and multiple classification models to multiple computing units, so that each computing unit can independently train a classification model.
[0055] In the implementation process of the method of this embodiment, the original ECG data needs to be processed first to obtain HRV data, extract and formulate features and standardize them. Secondly, different machine learning classification models are constructed, and the processed data are sent to different classification models respectively. Then, the classification model and HRV data are sent to different processors of a multi-processor computer for model training. Finally, a combined model is constructed based on each trained model. The classification function of the combined model is realized by voting on the classification results of each model to produce the final classification decision. The combined model constructed by this method can well feature the screened HRV parameters to achieve a good psychological stress classification function.
[0056] The above method is explained in detail below with reference to the accompanying drawings and specific embodiments.
[0057] (1) Feature extraction
[0058] See also Figure 3 The human autonomic nervous system (ANS) consists of two parts: the sympathetic nervous system (SNS) and the parasympathetic nervous system (PNS). HRV, as a biomarker that can reflect the activity of the autonomic nervous system, can promptly reflect the regulatory ability of the autonomic nervous system in the current state of the human body. When the human body generates stress signals, the sympathetic and parasympathetic nerves will respond quickly to the stress signals. Under long-term stress, the sympathetic nervous system will be activated, causing the heart rate to increase, while the parasympathetic nerves will be inhibited, affecting its role in helping the body recover. In addition, stress will also lead to an increase in the stress hormone cortisol, further affecting the relevant indicators of HRV.
[0059] The embodiment of the present invention obtains the existing ECG signal and calculates the HRV feature according to the standard and calculation method proposed by the European Society Working Group. The 5-minute heartbeat interval is extracted from the ECG signal of each subject, and the HRV parameters are calculated for each peak in the 5-minute heartbeat interval. Based on the obtained HRV parameters, 8 key features are screened out, as shown in Table 1 below:
[0060] Table 1 HRV parameter feature selection and its meaning
[0061]
[0062] Among them, MEAN_RR and pNN50 have significant differences before and after the human body is subjected to labor stress. VLF is related to the activity of the autonomic nervous system, and LF_HF is used to evaluate the balance between sympathetic and parasympathetic nerve activity. SDNN (or SDRR) is an indicator of physiological resilience to stress, while RMSSD is affected by the parasympathetic nerves and reflects the changes between heartbeats. In addition, considering that SD1 represents short-term variability and reflects parasympathetic nerve activity, while SD2 represents long-term variability, it reflects more sympathetic nerve activity than SD1.
[0063] (2) Model construction
[0064] The embodiment of the present invention adopts five machine learning methods, namely, extreme gradient boosting decision tree (XGBoost), K-nearest neighbor algorithm (KNN), random forest (RF), support vector machine (SVM), gradient boosting decision tree (GBDT), and two deep learning methods, namely, multi-layer perceptron (MLP) and convolutional neural network (CNN). Specifically:
[0065] XGBoost uses CART decision tree as the basic model. It can iteratively add new tree models so that each new tree learns the residual of the previous round of predictions, thereby gradually reducing the error of model prediction and improving the prediction accuracy of the model.
[0066] KNN is a widely used supervised learning algorithm. Supervised classification is the core problem it solves. It can quickly and efficiently solve classification problems on specific data sets.
[0067] RF is an ensemble learning method that performs classification tasks by building multiple decision trees and integrating them together. Unlike XGBoost, its core is to randomly select and put back the data set each time, and randomly select some features as input;
[0068] SVM is a powerful algorithm commonly used in machine learning for binary classification problems. It has many advantages. It performs well in high-dimensional spaces and has strong generalization ability, which can effectively handle binary classification problems.
[0069] GBDT algorithm is a multi-model integration strategy. The decision trees it uses are all CART regression trees, which can be used for regression and classification tasks. In this invention, it is applied to the binary classification task of psychological stress state classification. Although the efficiency is lower than that of XGBoost, GBDT occupies less resources in actual application and is more interpretable. It is a more efficient choice, especially for small and medium-sized data.
[0070] MLP is a deep learning model, a type of feedforward neural network. It consists of multiple neural network layers, including an input layer, multiple hidden layers, and an output layer. It has strong nonlinear modeling capabilities. By introducing nonlinearity through activation functions, it can better capture complex relationships in data and has excellent performance in classification tasks.
[0071] CNN is a deep learning network architecture that learns directly from data. It is also a type of feedforward neural network and a variant of MLP. Its main change is the use of local connections and weight sharing. While reducing the number of weights to facilitate network optimization, it also reduces the complexity of the model and reduces the risk of overfitting.
[0072] As an optional implementation, this embodiment uses a grid search method to tune parameters or optimize the structure of each model separately, constructs the above-mentioned machine learning or deep learning model, and lays a good basic model foundation for the construction of the combined model.
[0073] In order to improve the overall generalization performance of the model under limited conditions and act on wearable devices to realize psychological stress detection tasks in multiple scenarios, the construction of the combined model is based on the above 7 basic models and is combined by predictive voting.
[0074] See also Figure 4 As an implementation method, in the combined model, the weight of each single classification model is set to 1.0. It should be noted that the weight can be adjusted according to the actual situation. When different models predict different results under the classification task, the combined model will perform accumulation operations in counters of different categories according to the weights of the current model based on the prediction results of different models, and compare the values of the two category counters by using a comparator, and finally select the category with the larger count result in the accumulator as the output. Since the psychological stress classification task in the embodiment of the present invention is a binary classification task, the designed combined model consists of 7 single models, and the weight of each single model in the combined model in the current study is 1.0. Therefore, in the actual application process, the situation where the two categories have the same count will not occur, avoiding the situation where the counts in the two categories of counters are equal. If the weight of the single model is changed, when the counts in the counters are equal, the "stressed" category is given priority as the output result.
[0075] By using a combination of models, the accuracy and generalization of the model are significantly improved. Compared with the single model method, the combined model not only has a higher accuracy, but also because it is composed of individual models that can be trained independently, and the weights of the individual models in the combined model can be adjusted according to actual needs, this makes the combined model not only have the potential for parallel computing, but also has better scalability. In actual use, when the data scale is large, the combined model can achieve efficient deployment of high-accuracy and high-generalization models.
[0076] (3) Parallel Computing
[0077] Since the basic single models that constitute the combined model can all be trained using data sets alone, each single model can be trained using one of the processors in a multi-processor computer, achieving parallel training of algorithms, greatly reducing the waste of computer resources, and improving the overall training speed of the combined model. Especially in the process of actual application, the data scale will gradually increase with use, so the model needs to be trained according to actual needs, and the distributed parallel computing method has greatly improved the efficiency of model training.
[0078] Combined with the combined model used in the embodiment of the present invention and its parallel computing characteristics, it can be well applied to smart wearable devices, such as Figure 5 Wearable devices can collect a large number of ECG signals in different scenarios, transmit the ECG signals to the server for HRV analysis, realize stress recognition through pre-trained models, and provide real-time reminders to users in a timely manner.
[0079] In addition, since the combined model designed in the embodiment of the present invention has the characteristics of distributed parallel computing, the method can use wearable devices as a medium to collect a large number of ECG signals in multiple scenarios, and based on this, quickly and timely train a combined model with stronger generalization ability, thereby realizing multi-scenario psychological stress detection in a true sense.
[0080] In summary, the method of the present invention has at least the following advantages and beneficial effects compared with the prior art:
[0081] (1) The present invention selects eight key HRV features so that the model can analyze the relationship between data by specifying the features, thereby obtaining good classification performance.
[0082] (2) The combined model of the present invention combines 5 machine learning methods and 2 deep learning methods, which can combine the advantages of multiple machine learning methods and increase the generalization ability of model prediction classification. Machine learning algorithms have low requirements for data, that is, scale. When deployed in tasks with more obvious data features, they can achieve considerable classification effects with less computer hardware resource consumption and good interpretability. Deep learning algorithms have powerful automatic feature learning capabilities, and their powerful data fitting capabilities can accurately capture nonlinear relationships in data and improve the prediction accuracy of the model. Combining the advantages of both and combining them in a voting manner effectively increases the ability of the model to be used in actual scenarios and its ability to cope with various scenarios. More importantly, the combined model method can add or delete the basic models therein, and the performance improvement of any model will improve the overall performance of the model, and has good scalability.
[0083] (3) The present invention adopts a distributed parallel method in parallel computing, so that a single model can be trained in parallel on a device that supports parallel computing, greatly reducing the training time of the model. As the present invention is put into practical use, the data that can be used for model training will increase greatly. Parallel computing can reduce the phenomenon of excessive training time caused by the increase in data size, and realize the training and deployment of models on large-scale data. In addition, in actual use, due to the need to update the model caused by the increase in data, this method can greatly improve the training speed of the model and reduce the time cost required to update the model.
[0084] Example 2
[0085] This embodiment provides a psychological stress machine learning combined model classification device, including:
[0086] A data acquisition module, used for acquiring raw ECG data, and acquiring HRV data according to the raw ECG data;
[0087] A model training module is used to build multiple different classification models and train each classification model using the obtained HRV data;
[0088] The model combination module is used to form a combination model from multiple trained classification models and obtain the final classification result through a voting mechanism;
[0089] In the process of training the classification model, a parallel computing method is adopted to distribute the HRV data and multiple classification models to multiple computing units, so that each computing unit can independently train a classification model.
[0090] Since the device is a psychological stress machine learning combined model classification device of an embodiment of the present invention, and the principle of solving the problem by the device is similar to that of the method, the implementation of the device can refer to the implementation process of the above-mentioned method embodiment, and the repeated parts will not be repeated.
[0091] Example 3
[0092] An embodiment of the present invention further provides an electronic device, the electronic device comprising a processor and a memory, the memory storing at least one instruction, at least one program, a code set or an instruction set, the at least one instruction, the at least one program, the code set or the instruction set being loaded and executed by the processor to implement the following Figure 1 A psychological stress machine learning combined model classification method is shown.
[0093] It is understandable that the memory may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory includes a non-transitory computer-readable storage medium. The memory may be used to store instructions, programs, codes, code sets, or instruction sets. The memory may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function, instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data created according to the use of the server, etc.
[0094] The processor may include one or more processing cores. The processor uses various interfaces and lines to connect the various parts of the entire server, and executes various functions of the server and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory, and calling data stored in the memory. Optionally, the processor can be implemented in at least one hardware form of digital signal processing (DSP), field programmable gate array (FPGA), and programmable logic array (PLA). The processor can integrate one or a combination of a central processing unit (CPU) and a modem. Among them, the CPU mainly processes the operating system and application programs; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor, but may be implemented separately through a chip.
[0095] Since the electronic device is an electronic device corresponding to a psychological stress machine learning combined model classification method in an embodiment of the present invention, and the principle of solving the problem by the electronic device is similar to that of the method, the implementation of the electronic device can refer to the implementation process of the above-mentioned method embodiment, and the repeated parts will not be repeated.
[0096] Example 4
[0097] The embodiment of the present invention further provides a computer-readable storage medium, wherein the storage medium stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, the at least one program, the code set or instruction set is loaded and executed by a processor to implement the following Figure 1 A psychological stress machine learning combined model classification method is shown.
[0098] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, the storage medium including a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable programmable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.
[0099] Since the storage medium is a storage medium corresponding to a psychological stress machine learning combined model classification method in an embodiment of the present invention, and the principle of solving the problem by the storage medium is similar to that of the method, the implementation of the storage medium can refer to the implementation process of the above-mentioned method embodiment, and the repeated parts will not be repeated.
[0100] Example 5
[0101] In some possible implementations, various aspects of the method of the embodiment of the present invention may also be implemented in the form of a program product, which includes a program code. When the program product is run on a computer device, the program code is used to enable the computer device to execute the steps of a psychological stress machine learning combined model classification method according to various exemplary embodiments of the present application described above in this specification. Among them, the executable computer program code or "code" for executing each embodiment can be written in a high-level programming language such as C, C++, C#, Smalltalk, Java, JavaScript, Visual Basic, structured query language (e.g., Transact-SQL), Perl, or in various other programming languages.
[0102] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0103] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0104] The above embodiments are only for illustrating the technical concept and features of the present invention, and their purpose is to enable ordinary technicians in the field to understand the content of the present invention and implement it accordingly, and they cannot be used to limit the protection scope of the present invention. Any equivalent changes or modifications made based on the essence of the content of the present invention should be included in the protection scope of the present invention.
Claims
1. A psychological stress machine learning combined model classification method, characterized in that: The following steps are involved: Obtaining original ECG data, and obtaining HRV data according to the original ECG data; Construct multiple different classification models and use the obtained HRV data to train each classification model; The trained multiple classification models are combined into a combined model, and the final classification result is obtained through a voting mechanism; In the process of training the classification model, a parallel computing method is adopted to distribute the HRV data and multiple classification models to multiple computing units, so that each computing unit can independently train a classification model.
2. The psychological stress machine learning combined model classification method according to claim 1 is characterized in that: The HRV data includes 8 key features: the mean value MEAN_RR of the heart rate interval, the standard deviation SDRR of the heart rate interval, the root mean square RMSSD of the difference between adjacent heart rate intervals in the heart rate interval sequence, the percentage pNN50 of the difference between adjacent heart rate intervals in the heart rate interval sequence greater than 50ms, the standard deviation SD1 of the minor axis of the Poincare scatter plot ellipse, the standard deviation SD2 of the major axis of the Poincare scatter plot ellipse, the very low frequency power VLF, and the ratio of low frequency power to high frequency power LF_HF.
3. The psychological stress machine learning combined model classification method according to claim 2 is characterized in that: The obtaining of the original ECG data and obtaining the HRV data according to the original ECG data includes: The original ECG data is obtained, and a 5-minute heartbeat interval is extracted from the electrocardiogram signal of each subject according to the original ECG data. The features are calculated for each peak in the 5-minute heartbeat interval to obtain HRV data.
4. The psychological stress machine learning combined model classification method according to claim 1 is characterized in that: The multiple classification models include five machine learning models: extreme gradient boosting decision tree XGBoost, K-nearest neighbor algorithm KNN, random forest RF, support vector machine SVM, gradient boosting decision tree GBDT, and two deep learning models: multi-layer perceptron MLP and convolutional neural network CNN.
5. The psychological stress machine learning combined model classification method according to claim 4 is characterized in that: The method of using the obtained HRV data to train each classification model includes: Use grid search to tune parameters or optimize structure of each classification model to train a machine learning or deep learning model.
6. The psychological stress machine learning combined model classification method according to claim 1 is characterized in that: The multiple trained classification models are combined into a combined model, and the final classification result is obtained through a voting mechanism, including: In the combined model, a weight is assigned to each classification model; when different classification models predict different results under the same classification task, the combined model performs accumulation operations in counters of different categories according to the prediction results of different classification models and the weights of the classification models, and compares the values of counters of different categories using a comparator, and finally selects the category with the larger count result in the accumulator as the output.
7. The psychological stress machine learning combined model classification method according to claim 1 is characterized in that: The process of training the classification model includes: For each model, a processor in a multi-processor computer is used for training to achieve parallel training of the algorithm, and in subsequent combined model updates, a single classification model can be easily added or deleted.
8. A psychological stress machine learning combined model classification device, characterized in that: include: A data acquisition module, used for acquiring raw ECG data, and acquiring HRV data according to the raw ECG data; A model training module is used to build multiple different classification models and train each classification model using the obtained HRV data; The model combination module is used to form a combination model from multiple trained classification models and obtain the final classification result through a voting mechanism; In the process of training the classification model, a parallel computing method is adopted to distribute the HRV data and multiple classification models to multiple computing units, so that each computing unit can independently train a classification model.
9. An electronic device, characterized in that: The electronic device includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the method described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the method according to any one of claims 1 to 7.