Mental stress monitoring system based on clustering processing
By using the similarity factor and entropy to calculate the comprehensive distance in the mental stress monitoring system to determine the initial clustering center, and updating the clustering center in combination with the random search vector, the problem of random selection of the initial clustering center and incomplete consideration of data characteristics is solved, and improves efficiency The adaptability and accuracy of the model; at the same time, through the staged parameter search strategy, the search efficiency and accuracy of the system are improved, ensuring accurate monitoring of mental stress states.
Patent Information
- Application Number
- CN202411338265.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-09-25
AI Technical Summary
In the existing mental stress monitoring system, the initial clustering center is randomly selected and the data characteristics are not fully considered during the classification process, resulting in unstable clustering results and inability to accurately reflect the true state of mental stress. In addition, the parameter search efficiency is low, resulting in inability to Accurate classification of mental stress states and reduced system utility.
Introduce the similarity factor and entropy to calculate the comprehensive distance to determine the initial cluster center, and design a random search vector to update the cluster center; divide the parameter search into the early and late stages, and use the early search method of random opposition positions and search directions, as well as the change amplitude Post-search method of control factors to determine the best model parameters.
It improves the model's adaptability to different data situations, enhances the accuracy and reliability of mental stress state classification, improves parameter search efficiency, and ensures accurate judgment of mental stress conditions.
Smart Images

Figure CN118866408A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data processing, and specifically refers to a mental stress monitoring system based on clustering processing. Background Art
[0002] The mental stress monitoring system uses clustering processing technology to analyze and process mental stress data, monitor the mental stress status of individuals in real time, and accurately identify different levels of stress. However, the existing mental stress monitoring system has the problems of random selection of initial cluster centers and incomplete consideration of data features during the classification process, resulting in unstable clustering results and failure to accurately reflect the true state of mental stress; the existing mental stress monitoring system has the problem of blind parameter search and low search efficiency, resulting in failure to accurately classify mental stress status 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, the present invention 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 and iterating when the convergence tolerance is greater than or equal to the convergence threshold, and obtains the mental stress data. The stress state classification model enhances the model's adaptability to different data situations and can better reflect the differences in different mental stress states. In view of the problems of blind parameter search and low search efficiency in the existing mental stress monitoring system, which lead 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 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 the mental stress condition.
[0004] The present invention provides a mental stress monitoring system based on clustering processing, comprising 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;
[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 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;
[0008] 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;
[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 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, which 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 the 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 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, and specifically includes 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 , 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:
[0015] ;
[0016] ;
[0017] 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;
[0018] Calculate the probability, based on the comprehensive distance, to calculate the probability of each mental stress data being selected as the initial cluster center. The formula used is as follows:
[0019] ;
[0020] In the formula, 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] 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 The probability of
[0024] 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;
[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 stop the initial iteration and complete the confirmation of the initial cluster centers;
[0026] 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;
[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 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:
[0029] ;
[0030] ;
[0031] ;
[0032] ;
[0033] 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;
[0034] Calculate the new cluster center and perform clustering again based on the new cluster center. The formula used is as follows:
[0035] ;
[0036] In the formula, and are the cluster centers of the v-th 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, and stops updating and iterating to obtain a mental stress state classification model. The formula used is as follows:
[0038] ;
[0039] In the formula, 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 initialization individual position unit, a search individual position unit and an optimal model parameter determination unit, which specifically includes 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 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 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 preliminary search, random opposite positions and search directions are introduced to design the preliminary search method. The formula used is as follows:
[0044] ;
[0045] ;
[0046] ;
[0047] 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;
[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] 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;
[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 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. 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 performance and generalization ability of the model, 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 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 for 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. 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 A schematic diagram of a 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, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore should not be understood as limiting the present invention.
[0063] Example 1, see Figure 1 , a mental stress monitoring system based on clustering processing provided by the present invention 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 module for constructing the mental stress state classification model;
[0066] The module for constructing the mental stress state classification model receives the data sent by the data preprocessing module, introduces the similarity factor and entropy to obtain the 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, 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 the 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 the 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 collection 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 electrical 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 constructing a data set 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 updated cluster center unit and a model determination unit, and specifically includes 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 , 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, and consider the similarity and complexity between the data more comprehensively; the formula used is as follows:
[0074] ;
[0075] ;
[0076] 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 in the range of (0, 1) respectively;
[0077] Calculate the probability that each mental stress data is 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] In the formula, 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] 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 The probability of
[0083] 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 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 stop the initial iteration and complete the confirmation of the initial cluster centers;
[0085] 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;
[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 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 β 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] 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, 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 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;
[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 can be improved. The formula used is as follows:
[0094] ;
[0095] In the formula, and are the cluster centers of the v-th 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, then stops updating and iterating, and obtains a 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] In the formula, 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 solve the problems in the existing mental stress monitoring system that the initial clustering center is randomly selected and the data characteristics are not fully considered in the classification process, resulting in unstable clustering results and failure 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 clustering center based on the comprehensive distance, determines the initial clustering center according to the cumulative probability and clusters it, so that the determination of the initial clustering center is more scientific and avoids the uncertainty of random selection; designs a random search vector to update the clustering 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, and 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:
[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 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 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] 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 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 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;
[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] 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 in the range (0, 1), and u is Nonlinear factors in 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 solve 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 for 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, and 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 the 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.
[0115] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0116] While the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that many changes, modifications, substitutions and variations 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, and such 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 ordinary technicians in the field are inspired by it, without departing from the purpose of the invention, they can design a structure and embodiment similar to the technical solution without creativity, which should belong to the protection scope 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 The probability of 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 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 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
Cited By
Three-dimensional atmospheric pollution monitoring system based on big data analysis
CN119207646A
Tire pressure monitoring method based on big data analysis
CN119646764A
A tire pressure monitoring method based on big data analysis
CN119646764B
Poa annua rootstock vegetative propagation growth monitoring method based on clustering processing
CN120408233A
