A mental stress monitoring system based on clustering processing
By using similarity factor and entropy to calculate the initial clustering center in the mental stress monitoring system, and combining random search vectors and multi-stage parameter search, the problems of unstable clustering results and low parameter search efficiency are solved, and the adaptation of the model is improved and accuracy, achieving accurate monitoring of mental stress status.
Patent Information
- Application Number
- CN202411338265.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2044-09-25
AI Technical Summary
In the existing mental stress monitoring system, the initial cluster center is randomly selected and the data characteristics are not comprehensively considered during the classification process, resulting in unstable clustering results and inaccurately unable to accurately reflect the true state of mental stress. The parameter search efficiency is low, which reduces the The practicality of the system.
Introduce similarity factor and entropy calculation comprehensive distance to determine the initial clustering center, design a random search vector to update the clustering center, and divide the parameter search into early and late stages, and use random opposing position and change amplitude control factors to search to improve search efficiency and accuracy.
By scientifically determining the initial clustering center and optimizing parameter search, the adaptability and accuracy of the model are improved, the differences in different mental stress states can be better reflected, and the performance and reliability of the system are improved.
Smart Images

Figure CN118866408B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data processing, and in particular relates to a mental stress monitoring system based on clustering processing. Background Art
[0002] Stress monitoring systems utilize clustering technology to analyze and process stress data, monitor individual stress levels in real time, and accurately identify varying degrees of stress. However, existing stress monitoring systems suffer from random selection of initial cluster centers and incomplete consideration of data features during the classification process, leading to unstable clustering results and an inability to accurately reflect the true state of stress. Furthermore, existing stress monitoring systems suffer from blind and inefficient parameter searches, resulting in inaccurate stress classification and reduced system practicality. Summary of the Invention
[0003] In view of the above situation, in order to overcome the defects of the prior art, the present invention provides a mental stress monitoring system based on clustering processing. In view of the problems in the existing mental stress monitoring system that the initial cluster center is randomly selected and the data features are not fully considered during the classification process, resulting in unstable clustering results and the inability to accurately reflect the true state of mental stress, this scheme introduces similarity factor and entropy to obtain comprehensive distance, calculates the probability of each mental stress data being selected as the initial cluster center based on the comprehensive distance, determines the initial cluster center according to the cumulative probability and clusters it, so that the determination of the initial cluster center is more scientific; designs a random search vector to update the cluster center, stops updating iterations when the convergence tolerance is greater than or equal to the convergence threshold, and obtains mental stress data. The stress state classification model enhances the model's adaptability to different data situations and can better reflect the differences between different mental stress states. In response to the problems of blind parameter search and low search efficiency in existing mental stress monitoring systems, which lead to the inability to accurately classify mental stress states and reduce system practicality, this scheme introduces a degree factor to divide parameter search into early search and late search, introduces random opposing positions and search directions to design an early search method, introduces a change amplitude control factor to design a late search method, determines the optimal model parameters, and uses different early and late search strategies to improve the efficiency of parameter search, thereby better constructing a mental stress state classification model and accurately completing the judgment of mental stress conditions.
[0004] The present invention provides a mental stress monitoring system based on clustering processing, which includes a data acquisition module, a data preprocessing module, a mental stress state classification model construction module, a mental stress state classification model parameter search module and a mental stress monitoring module;
[0005] The data collection module collects historical mental stress data;
[0006] The data preprocessing module performs data cleaning, data conversion, data normalization and data set construction on the collected data;
[0007] The module for constructing a mental stress state classification model introduces a similarity factor and entropy to obtain a comprehensive distance, calculates the probability of each mental stress data being selected as an initial cluster center based on the comprehensive distance, determines the initial cluster center and clusters it according to the cumulative probability, designs a random search vector to update the cluster center, and stops updating and iterating when the convergence tolerance is greater than or equal to the convergence threshold, thereby obtaining a mental stress state classification model;
[0008] The stress state classification model parameter search module introduces a degree factor to divide the parameter search into an early search and a late search, introduces random opposing positions and search directions to design an early search method, and introduces a variation amplitude control factor to design a late search method to determine the optimal model parameters;
[0009] The mental stress monitoring module inputs data into a mental stress state classification model constructed based on the optimal model parameters, obtains the current mental stress state based on the output clustering result, and realizes the monitoring of the mental stress state.
[0010] Furthermore, the data acquisition module collects historical mental stress data; the historical mental stress data includes physiological data, behavioral data, self-report data, environmental data, voice feature data and mental stress state; the physiological data includes heart rate, blood pressure, respiratory rate, skin conduction response and body temperature; the behavioral data includes daily exercise data, sleep data and social interaction data; the self-report data includes stress assessment questionnaire data and emotional state questionnaire data; the environmental data includes noise level and light intensity; the voice feature data includes tone, speaking speed and sound intensity; the mental stress state includes mild stress state, moderate stress state, severe stress state, stress state and exhaustion state, and the mental stress state is used as a data label. The data label is not considered during clustering and is only used when selecting cluster labels.
[0011] Furthermore, the data preprocessing module performs data cleaning, data conversion, data normalization and data set construction on the collected data; data cleaning includes processing missing values, outliers and duplicate values; data conversion is to convert data into vector form; data normalization is based on the maximum and minimum normalization method to unify the data range; and data set construction is to construct a mental stress monitoring data set based on the processed data.
[0012] Furthermore, the module for constructing a mental stress state classification model includes determining an initial cluster center unit, a clustering unit, an updating cluster center unit, and a model determination unit, specifically including the following contents:
[0013] Determine the initial cluster center unit, including the following:
[0014] To calculate the comprehensive distance, first calculate the mean of the mental stress monitoring dataset , then introduce the similarity factor and entropy to obtain the comprehensive distance between each mental stress data and the mean, and rearrange the data in the mental stress monitoring dataset from small to large based on the size of the comprehensive distance. The formula used is as follows:
[0015] ;
[0016] ;
[0017] Where, is the i-th mental stress data x in the mental stress monitoring dataset i and mean The similarity factor between is the mental stress data x i and mean The comprehensive distance between them, i and q are the mental stress data index and feature dimension index respectively, Q is the total number of feature dimensions of mental stress data, is the mental stress data x i and mean Cosine similarity in the qth feature dimension, σ q is the standard deviation of the qth feature dimension, and They are mental stress data x i and mean The entropy of is the mental stress data x i and mean The mutual information of x iq and They are mental stress data x i and mean The value of the qth feature dimension, ω q is the weight of the qth feature dimension, α1 and α2 are the similarity weight and entropy weight respectively;
[0018] Calculate the probability. Based on the comprehensive distance, calculate the probability of each mental stress data being selected as the initial cluster center. The formula used is as follows:
[0019] ;
[0020] Where, is the mental stress data x i The probability of , F is the mental stress monitoring data set;
[0021] Select the first initial cluster center, pre-set the number of initial cluster centers w and the control value c, calculate the cumulative probability corresponding to each mental stress data, and A random number a1 is randomly generated within When selecting mental stress data x i As the first initial cluster center, the mental stress data x i The cluster center dataset is deleted and constructed from the mental stress monitoring dataset. The formula used is as follows:
[0022] ;
[0023] Where, and are the probabilities and values of the first i and first i-1 mental stress data in the mental stress monitoring dataset, respectively. and As mental stress data x i and mental stress data x i-1 The corresponding cumulative probability; b is the mental stress data index, is the bth mental stress data x in the mental stress monitoring dataset b probability;
[0024] Determine the remaining initial cluster centers, recalculate the cumulative probability corresponding to the remaining mental stress data in the mental stress monitoring dataset, and then A random number a2 is randomly generated within When selecting mental stress data x j As the next initial cluster center, the mental stress data x j Delete from the mental stress monitoring dataset and add to the cluster center dataset, f is the number of data in the cluster center dataset, j is the mental stress data index, and are the probability sum of the first j and first j-1 mental stress data in the mental stress monitoring dataset, respectively. and As mental stress data x j and mental stress data x j-1 The corresponding cumulative probability;
[0025] Initial iteration: Repeat the steps of determining the remaining initial cluster centers until the number of data f in the cluster center data set is equal to the preset number of initial cluster centers w. Then, the initial iteration is stopped and the confirmation of the initial cluster centers is completed.
[0026] The clustering unit calculates the comprehensive distance between the remaining mental stress data in the mental stress monitoring dataset and each initial cluster center, and assigns it to the cluster where the initial cluster center with the closest comprehensive distance is located, obtaining w clusters;
[0027] Update the cluster center unit, including the following:
[0028] Design a random search vector and pre-set the initial values of the upper and lower bounds of each cluster to and , and the initial value of the search factor is β0. Before each update of the cluster center, the random search vector is adjusted by reducing the upper and lower bounds of each cluster and the search factor β. The formula used is as follows:
[0029] ;
[0030] ;
[0031] ;
[0032] ;
[0033] Where, and are the upper and lower bounds of the v-th cluster at the t+1th update, and are the upper and lower bounds of the vth cluster at the tth update, v and t are the cluster index and update number index, γ1, γ2 and γ3 are the first reduction factor, the second reduction factor and the third reduction factor, respectively. t+1 and β t are the search factors for the t+1th and tth updates respectively, U(·) is the uniform distribution function, and are two independent 0-1 distribution functions with probability p, is the random search vector of cluster v at the t+1th update, express obey distributed;
[0034] Calculate the new cluster center and perform clustering again based on the new cluster center. The formula used is as follows:
[0035] ;
[0036] Where, and are the cluster centers of the vth cluster at the t+1th and tth updates respectively;
[0037] The model determination unit pre-sets a convergence threshold and repeatedly executes the step of updating the cluster center until the convergence tolerance is greater than or equal to the convergence threshold, stopping the update iteration and obtaining a mental stress state classification model. The formula used is as follows:
[0038] ;
[0039] Where, is the convergence tolerance when updating the cluster center for the t+1th time, and are the MSE loss functions at the t+1th and tth updates respectively.
[0040] Furthermore, the mental stress state classification model parameter search module includes an individual position initialization unit, an individual position search unit, and an optimal model parameter determination unit, specifically including the following contents:
[0041] Initialize the individual position unit, establish a parameter search space based on the similarity weight α1, entropy weight α2, control value c, initial value β0 of the search factor, first reduction factor γ1, second reduction factor γ2, third reduction factor γ3 and convergence threshold in the mental stress state classification model, randomly initialize N individual positions in the parameter search space, use the individual position as a representative of the stress state detection model parameters, and use the loss function of the stress state detection model established based on the individual position as the individual fitness value;
[0042] Search individual position units, and calculate the current degree factor before each search of individual positions , G h is the degree factor of the hth search, h is the search number index, h max is the maximum number of searches; if the degree factor is less than or equal to 0.5, it is an early search, and the early search method is used to search all individual positions; otherwise, it is a late search, and the late search method is used to search all individual positions, including the following:
[0043] In the early search, random opposite positions and search directions are introduced to design the early search method. The formula used is as follows:
[0044] ;
[0045] ;
[0046] ;
[0047] Where, and are the random opposing position and original position of the sth individual in the hth search, yes The new position after the individual position search is performed using the previous search method, lb and ub are the lower and upper bounds of the parameter search space, s and h are the individual index and search count index, respectively. is the adjustment factor, θ is the random angle, and are two different individual positions randomly selected during the h-th search, d is the dimension of the parameter search space, and O is the search direction; Generate a random number vector of dimension d consisting of 1 and -1, and generate a random number between 0 and 1 for each element. If the random number is less than 0.5, the element value is -1; otherwise, the element value is 1.
[0048] In the later stage search, the change amplitude control factor is introduced to design the later stage search method. The formula used is as follows:
[0049] ;
[0050] ;
[0051] Where, is the change amplitude control factor during the h-th search, yes The new position after the individual position search is performed using the late search method, m is a random number, u is a nonlinear factor, is the global optimal position during the h-th search;
[0052] The optimal model parameter determination unit pre-sets the fitness threshold, updates the individual fitness value and the global optimal position, and when the fitness value corresponding to the global optimal position is lower than the fitness threshold, the model parameters corresponding to the global optimal position are the optimal model parameters, and a mental stress state classification model is constructed based on the optimal model parameters; otherwise, if the maximum number of searches is reached, the individual position is reinitialized; otherwise, the search number is indexed and the individual position is searched again.
[0053] Furthermore, the mental stress monitoring module collects real-time mental stress data; the real-time mental stress data includes physiological data, behavioral data, self-report data, environmental data and voice feature data; after data preprocessing of the real-time mental stress data, the real-time mental stress data and historical mental stress data are input into the mental stress state classification model for clustering processing, and based on the output clustering results, the label type with the largest number of historical mental stress data in the cluster is selected as the cluster label to obtain the current mental stress state and realize the monitoring of the mental stress state.
[0054] The beneficial effects achieved by the present invention using the above scheme are as follows:
[0055] (1) In order to solve the problems in the existing mental stress monitoring system, such as random selection of initial cluster centers and incomplete consideration of data features during the classification process, which leads to unstable clustering results and inability to accurately reflect the true state of mental stress, this scheme introduces similarity factor and entropy to obtain comprehensive distance. Based on the comprehensive distance, the probability of each mental stress data being selected as the initial cluster center is calculated. The initial cluster center is determined and clustered according to the cumulative probability, making the determination of the initial cluster center more scientific and avoiding the uncertainty of random selection. A random search vector is designed to update the cluster center. When the convergence tolerance is greater than or equal to the convergence threshold, the update iteration is stopped to obtain a mental stress state classification model, which enhances the model's adaptability to different data situations, improves the model's performance and generalization ability, improves the accuracy and reliability of mental stress state classification, and can better reflect the differences between different mental stress states.
[0056] (2) In view of the problems of blind parameter search and low search efficiency in the existing mental stress monitoring system, which leads to the inability to accurately classify mental stress status and reduces the practicality of the system, this scheme introduces a degree factor to divide the parameter search into early search and late search, introduces random opposing positions and search directions to design the early search method, introduces a change amplitude control factor to design the late search method, determines the optimal model parameters, uses different search strategies in the early and late stages, improves the efficiency of parameter search, helps to find the optimal model parameters more comprehensively and accurately, thereby better constructing a mental stress status classification model, improving the performance and reliability of the model, and accurately completing the judgment of the mental stress status. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 A schematic diagram of a mental stress monitoring system based on clustering processing provided by the present invention;
[0058] Figure 2 Schematic diagram of the module for constructing a mental stress state classification model;
[0059] Figure 3 Schematic diagram of the parameter search module for the mental stress state classification model.
[0060] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention. DETAILED DESCRIPTION
[0061] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0062] In the description of the present invention, it should be understood that terms such as "upper", "lower", "front", "back", "left", "right", "top", "bottom", "inside" and "outside" indicating directions or positional relationships are based on the directions or positional relationships shown in the accompanying drawings. They 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 direction, be constructed and operated in a specific direction. Therefore, they should not be understood as limiting the present invention.
[0063] Example 1, see Figure 1 The present invention provides a mental stress monitoring system based on clustering processing, which includes a data acquisition module, a data preprocessing module, a mental stress state classification model building module, a mental stress state classification model parameter search module and a mental stress monitoring module;
[0064] The data acquisition module collects historical mental stress data and sends the data to the data preprocessing module;
[0065] The data preprocessing module receives the data sent by the data acquisition module, performs data cleaning, data conversion, data normalization and data set construction on the collected data, and sends the data to the mental stress state classification model construction module;
[0066] The mental stress state classification model construction module receives data sent by the data preprocessing module, introduces a similarity factor and entropy to obtain a comprehensive distance, calculates the probability of each mental stress data being selected as an initial cluster center based on the comprehensive distance, determines the initial cluster center and clusters it according to the cumulative probability, designs a random search vector to update the cluster center, stops updating and iterating when the convergence tolerance is greater than or equal to the convergence threshold, obtains a mental stress state classification model, and sends the data to the mental stress state classification model parameter search module;
[0067] The mental stress state classification model parameter search module receives data sent by the mental stress state classification model construction module, introduces a degree factor to divide the parameter search into an early search and a late search, introduces random opposing positions and search directions to design an early search method, introduces a change amplitude control factor to design a late search method, determines the optimal model parameters, and sends the data to the mental stress monitoring module;
[0068] The mental stress monitoring module receives data sent by the mental stress state classification model parameter search module, inputs the data into the mental stress state classification model constructed based on the optimal model parameters, obtains the current mental stress state based on the output clustering results, and realizes the monitoring of the mental stress state.
[0069] Example 2, see Figure 1 This embodiment is based on the above embodiment. In the data acquisition module, the historical mental stress data includes physiological data, behavioral data, self-report data, environmental data, voice feature data and mental stress state; physiological data includes heart rate, blood pressure, respiratory rate, skin electrode response and body temperature; behavioral data includes daily exercise data, sleep data and social interaction data; self-report data includes stress assessment questionnaire data and emotional state questionnaire data; environmental data includes noise level and light intensity; voice feature data includes tone, speaking speed and sound intensity; mental stress state includes mild stress state, moderate stress state, severe stress state, stress state and exhaustion state. The mental stress state is used as a data label. The data label is not considered during clustering and is only used when selecting cluster labels.
[0070] Example 3, see Figure 1 This embodiment is based on the above embodiment. In the data preprocessing module, data cleaning includes processing missing values, outliers and duplicate values; data conversion is to convert data into vector form; data normalization is to unify the data range based on the maximum and minimum normalization method; and data set construction is to construct a mental stress monitoring data set based on the processed data.
[0071] Example 4, see Figure 1 and Figure 2 Based on the above embodiment, this embodiment constructs a mental stress state classification model module, including determining an initial cluster center unit, a clustering unit, an updating cluster center unit, and a model determination unit, specifically including the following contents:
[0072] Determine the initial cluster center unit, including the following:
[0073] To calculate the comprehensive distance, first calculate the mean of the mental stress monitoring dataset , then introduce the similarity factor and entropy to obtain the comprehensive distance between each mental stress data and the mean, and rearrange the data in the mental stress monitoring dataset from small to large based on the size of the comprehensive distance, so as to more comprehensively consider the similarity and complexity between the data; the formula used is as follows:
[0074] ;
[0075] ;
[0076] Where, is the i-th mental stress data x in the mental stress monitoring dataset i and mean The similarity factor between is the mental stress data x i and mean The comprehensive distance between them, i and q are the mental stress data index and feature dimension index respectively, Q is the total number of feature dimensions of mental stress data, is the mental stress data x i and mean Cosine similarity in the qth feature dimension, σ q is the standard deviation of the qth feature dimension, and They are mental stress data x i and mean The entropy of is the mental stress data x i and mean The mutual information of x iq and They are mental stress data x i and mean The value of the qth feature dimension, ω q is the weight of the qth feature dimension, α1 and α2 are the similarity weight and entropy weight in the range of (0, 1) respectively;
[0077] Calculate the probability of each mental stress data point being selected as the initial cluster center based on the comprehensive distance, which helps to select the initial cluster center more fairly and avoid excessive randomness. The formula used is as follows:
[0078] ;
[0079] Where, is the mental stress data x i The probability of , F is the mental stress monitoring data set;
[0080] Select the first initial cluster center, pre-set the number of initial cluster centers w and the control value c in the range of (0, 1), calculate the cumulative probability corresponding to each mental stress data, and A random number a1 is randomly generated within When selecting mental stress data x i As the first initial cluster center, the mental stress data x i The cluster center dataset is deleted and constructed from the mental stress monitoring dataset. The formula used is as follows:
[0081] ;
[0082] Where, and are the probabilities and values of the first i and first i-1 mental stress data in the mental stress monitoring dataset, respectively. and As mental stress data x i and mental stress data x i-1 The corresponding cumulative probability; b is the mental stress data index, is the bth mental stress data x in the mental stress monitoring dataset b probability;
[0083] Determine the remaining initial cluster centers, recalculate the cumulative probability corresponding to the remaining mental stress data in the mental stress monitoring dataset, and then A random number a2 is randomly generated within When selecting mental stress data x j As the next initial cluster center, the mental stress data x j Delete from the mental stress monitoring dataset and add to the cluster center dataset, f is the number of data in the cluster center dataset, j is the mental stress data index, and are the probability sum of the first j and first j-1 mental stress data in the mental stress monitoring dataset, respectively. and As mental stress data x j and mental stress data x j-1 The corresponding cumulative probability gradually determines the initial cluster center and improves the adaptability of the model;
[0084] Initial iteration: Repeat the steps of determining the remaining initial cluster centers until the number of data f in the cluster center data set is equal to the preset number of initial cluster centers w. Then, the initial iteration is stopped and the confirmation of the initial cluster centers is completed.
[0085] The clustering unit calculates the comprehensive distance between the remaining mental stress data in the mental stress monitoring dataset and each initial cluster center, and assigns it to the cluster where the initial cluster center with the closest comprehensive distance is located, obtaining w clusters;
[0086] Update the cluster center unit, including the following:
[0087] Design a random search vector and pre-set the initial values of the upper and lower bounds of each cluster to and , and the initial value of the search factor is β0. Before each update of the cluster center, the upper and lower bounds of each cluster and the search factor β are reduced to adjust the random search vector, so as to more flexibly explore the update direction of the cluster center and improve the performance of the model. The formula used is as follows:
[0088] ;
[0089] ;
[0090] ;
[0091] ;
[0092] Where, and are the upper and lower bounds of the v-th cluster at the t+1th update, and are the upper and lower bounds of the vth cluster at the tth update, v and t are the cluster index and update number index, γ1, γ2 and γ3 are the first, second and third reduction factors in the range of (0, 1), respectively. t+1 and β t are the search factors for the t+1th and tth updates respectively, U(·) is the uniform distribution function, and are two independent 0-1 distribution functions with probability p, is the random search vector of cluster v at the t+1th update, express obey distributed;
[0093] Calculate new cluster centers and perform clustering again based on the new cluster centers. By continuously updating the cluster centers, the accuracy and adaptability of the model are improved. The formula used is as follows:
[0094] ;
[0095] Where, and are the cluster centers of the vth cluster at the t+1th and tth updates respectively;
[0096] The model determination unit pre-sets a convergence threshold and repeatedly executes the step of updating the cluster center until the convergence tolerance is greater than or equal to the convergence threshold, stopping the update iteration to obtain the mental stress state classification model, ensuring that the model reaches a certain degree of convergence and improving the stability and reliability of the model; the formula used is as follows:
[0097] ;
[0098] Where, is the convergence tolerance when updating the cluster center for the t+1th time, and are the MSE loss functions at the t+1th and tth updates respectively.
[0099] By performing the above operations, in order to address the problems in existing mental stress monitoring systems, such as random selection of initial cluster centers and incomplete consideration of data features during the classification process, which lead to unstable clustering results and inability to accurately reflect the true state of mental stress, this scheme introduces similarity factor and entropy to obtain comprehensive distance, calculates the probability of each mental stress data being selected as the initial cluster center based on the comprehensive distance, determines the initial cluster center according to the cumulative probability and clusters it, making the determination of the initial cluster center more scientific and avoiding the uncertainty of random selection; designs a random search vector to update the cluster center, stops updating and iterating when the convergence tolerance is greater than or equal to the convergence threshold, and obtains a mental stress state classification model, which enhances the model's adaptability to different data situations, improves the model's performance and generalization ability, improves the accuracy and reliability of mental stress state classification, and can better reflect the differences between different mental stress states.
[0100] Example 5, see Figure 1 and Figure 3 This embodiment is based on the above embodiment. The mental stress state classification model parameter search module includes an individual position initialization unit, an individual position search unit, and an optimal model parameter determination unit. Specifically, it includes the following contents:
[0101] Initialize the individual position unit, establish a parameter search space based on the similarity weight α1, entropy weight α2, control value c, initial value β0 of the search factor, first reduction factor γ1, second reduction factor γ2, third reduction factor γ3 and convergence threshold in the mental stress state classification model, randomly initialize N individual positions in the parameter search space, use the individual position as a representative of the stress state detection model parameters, and use the loss function of the stress state detection model established based on the individual position as the individual fitness value;
[0102] Search individual position units, and calculate the current degree factor before each search of individual positions , G h is the degree factor of the hth search, h is the search number index, h max is the maximum number of searches; if the degree factor is less than or equal to 0.5, it is an early search, and the early search method is used to search all individual positions; otherwise, it is a late search, and the late search method is used to search all individual positions, including the following:
[0103] In the early search, random opposing positions and search directions are introduced to design the early search method, which increases the diversity and randomness of the search and helps avoid falling into the local optimal solution. The formula used is as follows:
[0104] ;
[0105] ;
[0106] ;
[0107] Where, and are the random opposing position and original position of the sth individual in the hth search, yes The new position after the individual position search is performed using the previous search method, lb and ub are the lower and upper bounds of the parameter search space, s and h are the individual index and search count index, respectively. is a regulation factor in the range of (0, 1), θ is a random angle in the range of (0, 2π), and are two different individual positions randomly selected during the h-th search, d is the dimension of the parameter search space, and O is the search direction; Generate a random number vector of dimension d consisting of 1 and -1, and generate a random number between 0 and 1 for each element. If the random number is less than 0.5, the element value is -1; otherwise, the element value is 1.
[0108] In the later stage search, the change amplitude control factor is introduced to design the later stage search method, which realizes the fine control of the search step size and direction, and helps to improve the efficiency and accuracy of the search. The formula used is as follows:
[0109] ;
[0110] ;
[0111] Where, is the change amplitude control factor during the h-th search, yes The new position after the individual position search using the late search method, m is a random number in the range of (0, 1), u is Nonlinear factors within the range, is the global optimal position during the h-th search, and the global optimal position is the individual position with the smallest fitness value;
[0112] The optimal model parameter determination unit pre-sets the fitness threshold, updates the individual fitness value and the global optimal position, and when the fitness value corresponding to the global optimal position is lower than the fitness threshold, the model parameters corresponding to the global optimal position are the optimal model parameters, and a mental stress state classification model is constructed based on the optimal model parameters; otherwise, if the maximum number of searches is reached, the individual position is reinitialized; otherwise, the search number is indexed and the individual position is searched again to ensure that the optimal model parameters that meet the requirements can be found, thereby improving the performance and accuracy of the model.
[0113] By performing the above operations, in order to address the problems of blind parameter search and low search efficiency in the existing mental stress monitoring system, which leads to the inability to accurately classify the mental stress state and reduce the practicality of the system, this scheme introduces a degree factor to divide the parameter search into early search and late search, introduces random opposing positions and search directions to design the early search method, introduces a change amplitude control factor to design the late search method, determines the optimal model parameters, and uses different search strategies in the early and late stages, which improves the efficiency of parameter search and helps to find the optimal model parameters more comprehensively and accurately, thereby better constructing a mental stress state classification model, improving the performance and reliability of the model, and accurately completing the judgment of the mental stress condition.
[0114] Example 6, see Figure 1 This embodiment is based on the above embodiment. The mental stress monitoring module collects real-time mental stress data; the real-time mental stress data includes physiological data, behavioral data, self-report data, environmental data and voice feature data; after data preprocessing of the real-time mental stress data, the real-time mental stress data and historical mental stress data are input into the mental stress state classification model for clustering processing. Based on the output clustering results, the label type with the largest number of historical mental stress data in the cluster is selected as the cluster label to obtain the current mental stress state and realize the monitoring of the mental stress state.
[0115] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus.
[0116] While the embodiments of the present invention have been shown and described, it will be apparent to those skilled in the art that various changes, modifications, substitutions, and alterations can be made to the embodiments without departing from the principles and spirit of the invention.
[0117] The present invention and its embodiments are described above. This description is not restrictive. The drawings show only one embodiment of the present invention, and the actual structure is not limited thereto. In short, if a person skilled in the art is inspired by this and, without departing from the purpose of the present invention, designs structures and embodiments similar to this technical solution without inventiveness, they shall fall within the scope of protection of the present invention.
Claims
1. A mental stress monitoring system based on clustering processing, characterized in that: It includes a data acquisition module, a data preprocessing module, a module for building a mental stress state classification model, a mental stress state classification model parameter search module and a mental stress monitoring module; The data collection module collects historical mental stress data; The data preprocessing module performs data cleaning, data conversion, data normalization and data set construction on the collected data; The module for constructing the mental stress state classification model introduces a similarity factor and entropy to obtain a comprehensive distance, calculates the probability of each mental stress data being selected as an initial cluster center based on the comprehensive distance, determines the initial cluster center and clusters it according to the cumulative probability, designs a random search vector to update the cluster center, stops updating and iterating when the convergence tolerance is greater than or equal to the convergence threshold, and obtains a mental stress state classification model; The mental stress state classification model parameter search module introduces a degree factor to divide the parameter search into an early search and a late search, introduces random opposing positions and search directions to design an early search method, introduces a change amplitude control factor to design a late search method, and determines the optimal model parameters; The mental stress monitoring module inputs data into a mental stress state classification model constructed based on the optimal model parameters, obtains the current mental stress state based on the output clustering result, and realizes the monitoring of the mental stress state; The module for constructing the mental stress state classification model includes determining an initial cluster center unit, a clustering unit, an updating cluster center unit and a model determination unit; The determining of the initial cluster center unit includes calculating the probability, specifically, calculating the probability of each mental stress data being selected as the initial cluster center based on the comprehensive distance, and the formula used is as follows: ; In the formula, is the mental stress data x i The probability of, F is the mental stress monitoring data set, is the mental stress data x i and mean The combined distance between .
2. The mental stress monitoring system based on clustering processing according to claim 1, characterized in that: The module for constructing a mental stress state classification model specifically includes the following contents: Determine the initial cluster center unit, including the following: Calculate the comprehensive distance; Calculate probabilities; Select the first initial cluster center, pre-set the number of initial cluster centers w and the control value c, calculate the cumulative probability corresponding to each mental stress data, and A random number a1 is randomly generated within When selecting mental stress data x i As the first initial cluster center, the mental stress data x i The cluster center dataset is deleted and constructed from the mental stress monitoring dataset. The formula used is as follows: ; In the formula, and are the probabilities and of the first i and first i-1 mental stress data in the mental stress monitoring dataset, respectively. and As mental stress data x i and mental stress data x i-1 The corresponding cumulative probability; b is the mental stress data index, is the bth mental stress data x in the mental stress monitoring dataset b probability; Determine the remaining initial cluster centers, recalculate the cumulative probability corresponding to the remaining mental stress data in the mental stress monitoring data set, and then A random number a2 is randomly generated within When selecting mental stress data x j As the next initial cluster center, the mental stress data x j Delete from the mental stress monitoring dataset and add to the cluster center dataset, f is the number of data in the cluster center dataset, j is the mental stress data index, and are the probabilities and of the first j and first j-1 mental stress data in the mental stress monitoring dataset, respectively. and As mental stress data x j and mental stress data x j-1 The corresponding cumulative probability; Initial iteration: Repeat the steps of determining the remaining initial cluster centers until the number of data f in the cluster center data set is equal to the preset number of initial cluster centers w, then stop the initial iteration and complete the confirmation of the initial cluster centers; The clustering unit calculates the comprehensive distances from the remaining mental stress data in the mental stress monitoring data set to each initial cluster center, and assigns it to the cluster where the initial cluster center with the closest comprehensive distance is located, to obtain w clusters; Update cluster center units; The model determination unit pre-sets a convergence threshold, and repeatedly executes the step of updating the cluster center until the convergence tolerance is greater than or equal to the convergence threshold, then stops updating and iterating, and obtains a mental stress state classification model.
3. The mental stress monitoring system based on clustering processing according to claim 2, characterized in that: The calculation of the comprehensive distance is specifically as follows: firstly, the mean of the mental stress monitoring data set is calculated: , and then introduce the similarity factor and entropy to obtain the comprehensive distance between each mental stress data and the mean, and rearrange the data in the mental stress monitoring data set from small to large based on the size of the comprehensive distance. The formula used is as follows: ; ; In the formula, is the i-th mental stress data x in the mental stress monitoring dataset i and mean The similarity factor between is the mental stress data x i and mean The comprehensive distance between them, i and q are the mental stress data index and feature dimension index respectively, Q is the total number of feature dimensions of mental stress data, is the mental stress data x i and mean Cosine similarity in the qth feature dimension, σ q is the standard deviation of the qth feature dimension, and They are respectively mental stress data x i and mean The entropy of is the mental stress data x i and mean The mutual information of x iq and They are respectively mental stress data x i and mean The value of the qth feature dimension, ω q is the weight of the qth feature dimension, α1 and α2 are the similarity weight and entropy weight respectively.
4. The mental stress monitoring system based on clustering processing according to claim 2, characterized in that: The updating cluster center unit specifically includes the following contents: Design a random search vector and pre-set the initial values of the upper and lower bounds of each cluster to and , and the initial value of the search factor is β0. Before updating the cluster center each time, the random search vector is adjusted by reducing the upper and lower bounds of each cluster and the search factor β. The formula used is as follows: ; ; ; ; In the formula, and are the upper and lower bounds of the v-th cluster at the t+1th update, respectively. and are the upper and lower bounds of the vth cluster at the tth update, v and t are the cluster index and update number index, γ1, γ2 and γ3 are the first reduction factor, the second reduction factor and the third reduction factor, respectively. t+1 and β t are the search factors for the t+1th and tth updates respectively, U(·) is the uniform distribution function, and They are two independent 0-1 distribution functions with probability p, is the random search vector of the vth cluster at the t+1th update, express obey distributed; Calculate the new cluster center and perform clustering again based on the new cluster center. The formula used is as follows: ; In the formula, and are the cluster centers of the v-th cluster at the t+1th and tth updates respectively.
5. The mental stress monitoring system based on clustering processing according to claim 1, characterized in that: The mental stress state classification model parameter search module includes an initialization individual position unit, a search individual position unit and an optimal model parameter determination unit, and specifically includes the following contents: Initialize the individual position unit, establish a parameter search space based on the similarity weight α1, entropy weight α2, control value c, initial value β0 of the search factor, first reduction factor γ1, second reduction factor γ2, third reduction factor γ3 and convergence threshold in the mental stress state classification model, randomly initialize N individual positions in the parameter search space, use the individual position as a representative of the stress state detection model parameters, and use the loss function of the stress state detection model established based on the individual position as the individual fitness value; Search individual position cells, and calculate the current degree factor before each search of individual positions. , G h is the degree factor of the hth search, h is the search count index, h max is the maximum number of searches; if the degree factor is less than or equal to 0.5, it belongs to the early search, and the early search method is used to search all individual positions; otherwise, it belongs to the late search, and the late search method is used to search all individual positions; The optimal model parameter determination unit pre-sets the fitness threshold, updates the individual fitness value and the global optimal position, and when the fitness value corresponding to the global optimal position is lower than the fitness threshold, the model parameters corresponding to the global optimal position are the optimal model parameters, and a mental stress state classification model is constructed based on the optimal model parameters; otherwise, if the maximum number of searches is reached, the individual position is reinitialized; otherwise, the search number is indexed and the individual position is searched again.
6. The mental stress monitoring system based on clustering processing according to claim 5, characterized in that: The searching of individual location units specifically includes the following contents: In the preliminary search, random opposite positions and search directions are introduced to design the preliminary search method. The formula used is as follows: ; ; ; In the formula, and are the random opposing position and original position of the sth individual in the hth search, yes The new position after the individual position search is performed using the previous search method. lb and ub are the lower and upper bounds of the parameter search space, respectively. s and h are the individual index and search count index, respectively. is the adjustment factor, θ is the random angle, and are two different individual positions randomly selected in the h-th search, d is the dimension of the parameter search space, and O is the search direction; Generate a random number vector with dimension d and composed of 1 and -1, and generate a random number between 0 and 1 for each element. If the random number is less than 0.5, the element value is -1; otherwise, the element value is 1; In the later stage search, the change amplitude control factor is introduced to design the later stage search method. The formula used is as follows: ; ; In the formula, is the change amplitude control factor during the h-th search, yes The new position after the individual position search using the post-search method, m is a random number, u is a nonlinear factor, is the global optimal position during the h-th search.
7. The mental stress monitoring system based on clustering processing according to claim 1, characterized in that: The data collection module collects historical mental stress data; the historical mental stress data includes physiological data, behavioral data, self-report data, environmental data, voice feature data and mental stress state; the physiological data includes heart rate, blood pressure, respiratory rate, skin conduction response and body temperature; the behavioral data includes daily exercise data, sleep data and social interaction data; the self-report data includes stress assessment questionnaire data and emotional state questionnaire data; the environmental data includes noise level and light intensity; the voice feature data includes tone, speaking speed and sound intensity; the mental stress state includes mild stress state, moderate stress state, severe stress state, stress state and exhaustion state, and the mental stress state is used as a data label. The data label is not considered during clustering and is only used when selecting cluster labels.
8. The mental stress monitoring system based on clustering processing according to claim 1, characterized in that: The mental stress monitoring module collects real-time mental stress data; the real-time mental stress data includes physiological data, behavioral data, self-report data, environmental data and voice feature data; After data preprocessing of the real-time mental stress data, the real-time mental stress data and historical mental stress data are input into the mental stress state classification model for clustering processing. Based on the output clustering results, the label type with the largest number of historical mental stress data in the cluster is selected as the cluster label to obtain the current mental stress state and realize the monitoring of the mental stress state.
9. The mental stress monitoring system based on clustering processing according to claim 1, characterized in that: The data preprocessing module performs data cleaning, data conversion, data normalization and data set construction on the collected data; data cleaning includes processing missing values, outliers and duplicate values; Data conversion is to convert data into vector form; data normalization is to unify the data range based on the maximum and minimum normalization method; and data set construction is to construct a mental stress monitoring data set based on the processed data.
Citation Information
Patent Citations
Image enhancement method based on clustering algorithm and ant colony algorithm
CN109993721A
Social relation evaluation method based on user life trajectories
CN111460332A
DEAMPOA-based improved FCM information entropy point cloud simplification method
CN117788869A
Nursing information management system based on clustering processing
CN118585847A
Massive high-dimensional AIS trajectory data clustering method
WO2023029461A1
