Mental health status auxiliary assessment system based on big data

By combining a transformer model based on radial basis function networks and manta ray foraging optimization, the problems of subjectivity and hyperparameter tuning in traditional mental health assessment methods are solved, enabling real-time capture and efficient assessment of complex emotional characteristics.

CN118861843BActive Publication Date: 2025-01-07石家庄市第八医院(石家庄市精神病医院)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411346157.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-26
Publication Date
2025-01-07
Estimated Expiration
2044-09-26

AI Technical Summary

Technical Problem

Traditional methods for assessing mental health status are easily limited by subjective factors, failing to capture the dynamic changes in mental state and complex emotional characteristics, making it difficult to analyze and predict long-term mental health trends. At the same time, traditional hyperparameter tuning methods are too time-consuming and computationally expensive, lacking flexibility and efficiency.

Method used

A transformer model incorporating radial basis function networks is used for mental state assessment. By introducing radial basis function networks, the ability to capture complex emotional features is enhanced. Furthermore, manta ray foraging optimization is employed to optimize the model's hyperparameters, reducing time consumption and computational costs, and quickly finding the optimal solution.

Benefits of technology

It improves the model's real-time performance and stability, enabling it to better capture complex emotional features, quickly find the optimal solution, and enhance the model's flexibility and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118861843B_ABST
    Figure CN118861843B_ABST
Patent Text Reader

Abstract

The present invention discloses a mental health status auxiliary assessment system based on big data, which includes a data acquisition module, a data preprocessing module, a mental state assessment model construction module, a hyperparameter optimization module, and an auxiliary mental health status assessment module. The present invention relates to the field of mental health status assessment technology, and specifically refers to a mental health status auxiliary assessment system based on big data. The present invention obtains a historical patient data set through data acquisition; adopts a data preprocessing method of data cleaning, data labeling, data encoding, data normalization, feature extraction, and data set segmentation; adopts a transformer model combined with a radial basis function network to perform mental state assessment, and by introducing a radial basis function network, the ability to capture complex emotional features is enhanced, and the transformer structure can focus on long-distance dependencies, thereby improving the real-time performance of the model; and adopts manta ray foraging optimization to perform hyperparameter optimization, thereby improving the stability and efficiency of the model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of mental health status assessment, and in particular to a mental health status auxiliary assessment system based on big data. Background Art

[0002] Mental health status assessment refers to a systematic evaluation process of an individual's psychological functions and emotional state. Its purpose is to fully understand their mental health status. By collecting and analyzing the individual's subjective experience and behavioral manifestations to assess their mental state, it not only helps to detect and intervene in psychological problems at an early stage, but also provides a scientific basis for the formulation of personalized treatment plans, thereby improving treatment outcomes and quality of life.

[0003] However, traditional mental health status assessment methods are easily limited by subjective factors and cannot capture the dynamic changes of mental states and complex emotional characteristics, making it difficult to analyze and predict long-term mental health trends; traditional mental health status assessment methods have technical problems such as traditional hyperparameter tuning methods are time-consuming and computationally expensive, and it is difficult to quickly and accurately find the optimal solution in a complex hyperparameter space, lacking flexibility and efficiency. Summary of the invention

[0004] In view of the above situation, in order to overcome the defects of the prior art, the present invention provides a mental health status auxiliary assessment system based on big data. In view of the technical problems that traditional mental health status assessment methods are easily limited by subjective factors and cannot capture the dynamic changes of mental states and complex emotional characteristics, and are difficult to analyze and predict long-term mental health trends, this solution creatively adopts a transformer model combined with a radial basis function network for mental state assessment. By introducing a radial basis function network, the ability to capture complex emotional characteristics is enhanced. At the same time, the transformer structure can pay attention to the long-distance dependencies between different parts, thereby improving the real-time performance of the model. In view of the technical problems that traditional mental health status assessment methods have excessive time consumption and computational costs of traditional hyperparameter tuning methods and are difficult to quickly and accurately find the optimal solution in a complex hyperparameter space, and lack flexibility and efficiency, this solution creatively adopts manta ray foraging optimization for model hyperparameter optimization, which can reduce time consumption and computational costs while quickly finding the optimal solution in the hyperparameter space, has good global search capabilities, and improves the stability and efficiency of the model.

[0005] The technical solution adopted by the present invention is as follows: the mental health status auxiliary assessment system based on big data provided by the present invention includes a data acquisition module, a data preprocessing module, a mental state assessment model construction module, a hyperparameter optimization module, and an auxiliary mental health status assessment module;

[0006] The data collection module obtains historical patient data sets through data collection;

[0007] The data preprocessing module performs preprocessing by data cleaning, data labeling, data encoding, data normalization, feature extraction and data set segmentation to obtain a feature training set and a feature test set;

[0008] The mental state assessment model construction module obtains the mental state assessment model by constructing a transformer model combined with a radial basis function network;

[0009] The hyperparameter optimization module uses manta ray foraging optimization to perform hyperparameter optimization on the mental state assessment model to obtain an optimized mental state assessment model;

[0010] The auxiliary mental health status assessment module uses the optimized mental state assessment model to perform mental state assessment, obtain mental health reference data, and assist in mental health status assessment.

[0011] Furthermore, in the data collection module, the historical patient data set specifically includes historical patient behavior data, historical patient psychological test data, historical patient emotional state data, historical patient physiological data and historical patient basic information.

[0012] Furthermore, in the data preprocessing module, the data cleaning is specifically to remove missing values ​​and duplicate values, the data annotation is specifically to annotate the data as normal, slightly abnormal, moderately abnormal and highly abnormal, and use the annotations as data labels, the data encoding is specifically to encode using the one-hot encoding method, the data normalization is specifically to normalize using the minimum-maximum normalization method, the feature extraction is specifically to extract features and convert them into vector form, and the data set segmentation is specifically to segment the historical patient data set after the data cleaning, the data annotation, the data encoding, the data normalization and the feature extraction to obtain a feature training set and a feature test set.

[0013] Further, in the mental state assessment model construction module, the transformer model combined with the radial basis function network specifically includes a radial basis function network submodule and an emotion perception transformer submodule, and the mental state assessment model construction module specifically includes radial basis function network submodule construction, emotion perception transformer submodule construction, calculation model output, loss function design, and model construction and training;

[0014] The radial basis function network submodule construction includes determining the kernel center, calculating the width parameter, designing the kernel function and calculating the submodule output;

[0015] The determining of the core center is used to determine the core center of the radial basis function, specifically determining the core center of the radial basis function of the radial basis function network submodule by using a K-means clustering method, and includes:

[0016] Initialize the cluster center, specifically randomly select N data points as the initial cluster center, where N represents the number of cluster centers;

[0017] Assign clusters, specifically, calculate the distance from the data point to the cluster center, and assign the data point to the nearest cluster center. The formula used to calculate the distance from the data point to the cluster center is as follows:

[0018] ;

[0019] In the formula, represents the distance from the mth data point to the nth cluster center, represents the mth data point, represents the nth cluster center, Indicates calculation of Euclidean distance;

[0020] Update the cluster center using the following formula:

[0021] ;

[0022] In the formula, represents the updated nth cluster center, represents the number of data points in the nth cluster, represents the lth data point in the nth cluster, Represents the set of data points in the nth cluster;

[0023] Iterative update, specifically, continuously iteratively updating the K-means clustering until the change in the cluster center is less than a threshold or the maximum number of iterations is reached;

[0024] The calculated width parameter is used to determine the width parameter of the radial basis function neuron, specifically, the average distance from the data points in the cluster to the cluster center is used as the width parameter, and the formula used is as follows:

[0025] ;

[0026] In the formula, Represents the width parameter of the nth radial basis function neuron;

[0027] The designed kernel function is used to determine the radial basis function kernel function, specifically using the Gaussian kernel function as the radial basis function kernel function, and the formula used is as follows:

[0028] ;

[0029] In the formula, represents the output function of the nth radial basis function neuron, and I represents the input of the radial basis function network submodule;

[0030] The calculation submodule output is as follows:

[0031] ;

[0032] Where O represents the output of the radial basis function network submodule, represents the output weight of the nth radial basis function neuron, and Rb represents the output bias term of the radial basis function network submodule;

[0033] The emotion perception transformer submodule is constructed, including calculating emotion perception head self-attention, designing emotion perception multi-head self-attention and designing emotion perception feedforward neural network;

[0034] The calculation of emotion perception head self-attention uses the following formula:

[0035] ;

[0036] In the formula, represents the self-attention of the a-th head, represents the softmax function, Q represents the query matrix, K represents the key matrix, V represents the value matrix, and E represents the emotional state embedding. represents the dimension of the key, represents the linear transformation matrix of the a-th head for query, represents the linear transformation matrix of the a-th head for the key, represents the linear transformation matrix of the a-th head for the value, Represents the weight of the emotional state embedded in the self-attention mechanism;

[0037] The emotion-aware multi-head self-attention is designed, and the formula used is as follows:

[0038] ;

[0039] In the formula, represents the emotion-aware multi-head self-attention function, represents the concatenation function, represents the self-attention of the first head, represents the self-attention of the second head, represents the self-attention of the Ath head, A represents the total number of heads, Represents the linear transformation matrix of emotion-aware multi-head self-attention output;

[0040] The emotion perception feedforward neural network is designed, and the formula used is as follows:

[0041] ;

[0042] In the formula, represents the emotion perception feedforward neural network function, represents the ReLU activation function, s represents the input of the emotion-aware feedforward neural network, represents the weight matrix of the first linear transformation of the emotion-aware feedforward neural network, represents the weight matrix of the second linear transformation of the emotion-aware feedforward neural network, represents the weight of the emotional state embedded in the emotion-aware feedforward neural network, represents the bias term of the first linear transformation of the emotion-aware feedforward neural network, The bias term representing the second linear transformation of the emotion-aware feedforward neural network;

[0043] The calculation model output is as follows:

[0044] ;

[0045] In the formula, y represents the output of the model, represents the fully connected layer function, and h represents the input of the model output layer;

[0046] The design loss function uses the following formula:

[0047] ;

[0048] In the formula, Loss represents the loss function value, B represents the total number of samples, and G represents the total number of categories. Indicates that sample b belongs to the true label of category g, Represents the model's predicted probability that sample b belongs to category g;

[0049] The constructing and training the model specifically involves constructing the transformer model combined with the radial basis function network through the radial basis function network submodule construction, the emotion perception transformer submodule construction, the calculation model output and the design loss function, and training the model based on the feature training set, verifying the performance based on the feature test set, and obtaining the mental state assessment model.

[0050] Furthermore, in the hyperparameter optimization module, the manta ray foraging optimization is used to optimize the hyperparameters of the mental state assessment model to obtain an optimized mental state assessment model. The hyperparameter optimization module specifically includes: initialization, position update and iterative update;

[0051] The initialization includes initializing the search space, initializing the speed matrix and initializing the optimal position;

[0052] The initialization search space is specifically to construct a manta unit set and initialize the manta unit position matrix. The manta unit is used to represent a candidate solution. The manta unit position matrix is ​​expressed as follows:

[0053] ;

[0054] In the formula, represents the initial manta ray unit position matrix, represents the position of the i-th manta ray unit in the j-th dimension, u represents the total number of manta ray units, and v represents the total number of dimensions;

[0055] The initialization velocity matrix, the manta ray unit velocity matrix, is expressed as follows:

[0056] ;

[0057] In the formula, represents the initial manta ray unit velocity matrix, represents the velocity of the i-th manta ray unit in the j-th dimension;

[0058] The initialization of the optimal position is specifically to calculate the fitness of the manta ray unit and select the position of the manta ray unit with the lowest fitness as the optimal position, wherein the fitness is specifically the loss function of the mental state assessment model;

[0059] The updating position includes speed update, position update, spiral update, fitness update and best position update;

[0060] The speed is updated using the following formula:

[0061] ;

[0062] In the formula, represents the manta ray unit velocity matrix at the t+1th iteration, represents the manta ray unit velocity matrix at the tth iteration, represents the manta ray unit position matrix at the tth iteration, represents the best position of the current iteration number, Indicates the best historical position, represents the inertia weight, represents the acceleration constant used to adjust the manta unit to the best position of the current iteration number, represents the acceleration constant used to adjust the manta unit to the best historical position, represents a random number in the range [0,1], Represents a random number in the range [0,1];

[0063] The position update uses the following formula:

[0064] ;

[0065] In the formula, represents the manta ray unit position matrix at the t+1th iteration;

[0066] The spiral update uses the following formula:

[0067] ;

[0068] In the formula, represents the updated position of the i-th manta ray unit in the j-th dimension, represents the position of the current iteration number of the i-th manta ray unit in the j-th dimension, represents a random number in the range [-1,1], Sf represents the spiral factor;

[0069] The fitness updating specifically calculates the fitness of the updated manta ray unit and compares it with the fitness of the manta ray unit before the update. If the fitness of the updated manta ray unit is low, the new position of the manta ray unit is retained and the fitness is updated. If the fitness of the updated manta ray unit is high, the original position of the manta ray unit is retained.

[0070] The optimal position updating is specifically updating the optimal position based on the fitness of the updated manta ray unit;

[0071] The iterative update is specifically to continuously iterate and update until the fitness of the manta ray unit is less than a threshold or reaches a maximum number of iterations, thereby obtaining an optimized mental state assessment model.

[0072] Furthermore, in the auxiliary mental health status assessment module, the optimized mental state assessment model is specifically used to perform mental state assessment to obtain mental health reference data, and the mental health status assessment is assisted based on the mental health reference data.

[0073] The beneficial effects achieved by the present invention using the above scheme are as follows:

[0074] (1) In view of the technical problems that traditional mental health status assessment methods are easily restricted by subjective factors and cannot capture the dynamic changes of mental state and complex emotional characteristics, making it difficult to analyze and predict long-term mental health trends, this scheme creatively adopts the transformer model combined with the radial basis function network for mental state assessment. By introducing the radial basis function network, the ability to capture complex emotional characteristics is enhanced. At the same time, the transformer structure can pay attention to the long-distance dependencies between different parts, thereby improving the real-time performance of the model.

[0075] (2) In view of the technical problems of traditional mental health status assessment methods, such as the high time consumption and computational cost of traditional hyperparameter tuning methods, the difficulty in quickly and accurately finding the optimal solution in a complex hyperparameter space, and the lack of flexibility and efficiency, this solution creatively uses manta ray foraging optimization to optimize model hyperparameters. It can reduce time consumption and computational cost while quickly finding the optimal solution in the hyperparameter space. It has good global search capabilities and improves the stability and efficiency of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] Figure 1 A schematic diagram of a module of a mental health status auxiliary assessment system based on big data provided by the present invention;

[0077] Figure 2 It is a flowchart of the data preprocessing module;

[0078] Figure 3 Schematic diagram of the process of building modules for the mental state assessment model;

[0079] Figure 4 Schematic diagram of the hyperparameter optimization module.

[0080] 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

[0081] 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.

[0082] 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.

[0083] Example 1, see Figure 1 The mental health status auxiliary assessment system based on big data provided by the present invention includes a data acquisition module, a data preprocessing module, a mental state assessment model construction module, a hyperparameter optimization module, and an auxiliary mental health status assessment module;

[0084] The data acquisition module is used for data acquisition, obtains historical patient data sets through data acquisition, and sends the historical patient data sets to the data preprocessing module;

[0085] The data preprocessing module is used for data preprocessing, and obtains a feature training set and a feature test set through data preprocessing, and sends the feature training set and the feature test set to the mental state assessment model construction module;

[0086] The mental state assessment model construction module is used to construct a mental state assessment model, obtain the mental state assessment model by constructing a transformer model combined with a radial basis function network, and send the mental state assessment model to the hyperparameter optimization module;

[0087] The hyperparameter optimization module is used for hyperparameter optimization, and performs hyperparameter optimization by adopting manta ray foraging optimization to obtain an optimized mental state assessment model, and sends the optimized mental state assessment model to the auxiliary mental health state assessment module;

[0088] The auxiliary mental health status assessment module is used to assist in the assessment of mental health status. By performing a mental status assessment, mental health reference data is obtained to assist in the assessment of mental health status.

[0089] Example 2, see Figure 1 In the data collection module, the historical patient data set specifically includes historical patient behavior data, historical patient psychological test data, historical patient emotional state data, historical patient physiological data and historical patient basic information.

[0090] Example 3, see Figure 1 and Figure 2This embodiment is based on the above embodiment. In the data preprocessing module, the data cleaning is specifically to remove missing values ​​and duplicate values, the data annotation is specifically to annotate the data as normal, slightly abnormal, moderately abnormal and highly abnormal, and use the annotation as the data label, the data encoding is specifically to encode using the one-hot encoding method, the data normalization is specifically to normalize using the minimum-maximum normalization method, the feature extraction is specifically to extract features and convert them into vector form, and the data set segmentation is specifically to segment the historical patient data set after the data cleaning, the data annotation, the data encoding, the data normalization and the feature extraction to obtain a feature training set and a feature test set.

[0091] Example 4, see Figure 1 and Figure 3 This embodiment is based on the above embodiment. In the mental state assessment model construction module, the transformer model combined with the radial basis function network specifically includes a radial basis function network submodule and an emotion perception transformer submodule. The mental state assessment model construction module specifically includes radial basis function network submodule construction, emotion perception transformer submodule construction, calculation model output, loss function design, and model construction and training.

[0092] The radial basis function network submodule construction includes determining the kernel center, calculating the width parameter, designing the kernel function and calculating the submodule output;

[0093] The determining of the core center is used to determine the core center of the radial basis function, specifically determining the core center of the radial basis function of the radial basis function network submodule by using a K-means clustering method, and includes:

[0094] Initialize the cluster center, specifically randomly select N data points as the initial cluster center, where N represents the number of cluster centers;

[0095] Assign clusters, specifically, calculate the distance from the data point to the cluster center, and assign the data point to the nearest cluster center. The formula used to calculate the distance from the data point to the cluster center is as follows:

[0096] ;

[0097] In the formula, represents the distance from the mth data point to the nth cluster center, represents the mth data point, represents the nth cluster center, Indicates calculation of Euclidean distance;

[0098] Update the cluster center using the following formula:

[0099] ;

[0100] In the formula, represents the updated nth cluster center, represents the number of data points in the nth cluster, represents the lth data point in the nth cluster, Represents the set of data points in the nth cluster;

[0101] Iterative update, specifically, continuously iteratively updating the K-means clustering until the change in the cluster center is less than a threshold or the maximum number of iterations is reached;

[0102] The calculated width parameter is used to determine the width parameter of the radial basis function neuron, specifically, the average distance from the data points in the cluster to the cluster center is used as the width parameter, and the formula used is as follows:

[0103] ;

[0104] In the formula, Represents the width parameter of the nth radial basis function neuron;

[0105] The designed kernel function is used to determine the radial basis function kernel function, specifically using the Gaussian kernel function as the radial basis function kernel function, and the formula used is as follows:

[0106] ;

[0107] In the formula, represents the output function of the nth radial basis function neuron, and I represents the input of the radial basis function network submodule;

[0108] The calculation submodule output is as follows:

[0109] ;

[0110] Where O represents the output of the radial basis function network submodule, represents the output weight of the nth radial basis function neuron, and Rb represents the output bias term of the radial basis function network submodule;

[0111] The emotion perception transformer submodule is constructed, including calculating emotion perception head self-attention, designing emotion perception multi-head self-attention and designing emotion perception feedforward neural network;

[0112] The calculation of emotion perception head self-attention uses the following formula:

[0113] ;

[0114] In the formula, represents the self-attention of the a-th head, represents the softmax function, Q represents the query matrix, K represents the key matrix, V represents the value matrix, and E represents the emotional state embedding. represents the dimension of the key, represents the linear transformation matrix of the a-th head for query, represents the linear transformation matrix of the a-th head for the key, represents the linear transformation matrix of the a-th head for the value, Represents the weight of the emotional state embedded in the self-attention mechanism;

[0115] The emotion-aware multi-head self-attention is designed, and the formula used is as follows:

[0116] ;

[0117] In the formula, represents the emotion-aware multi-head self-attention function, represents the concatenation function, represents the self-attention of the first head, represents the self-attention of the second head, represents the self-attention of the Ath head, A represents the total number of heads, Represents the linear transformation matrix of emotion-aware multi-head self-attention output;

[0118] The emotion perception feedforward neural network is designed, and the formula used is as follows:

[0119] ;

[0120] In the formula, represents the emotion perception feedforward neural network function, represents the ReLU activation function, s represents the input of the emotion-aware feedforward neural network, represents the weight matrix of the first linear transformation of the emotion-aware feedforward neural network, represents the weight matrix of the second linear transformation of the emotion-aware feedforward neural network, represents the weights of the emotional state embedding in the emotion-aware feedforward neural network, represents the bias term of the first linear transformation of the emotion-aware feedforward neural network, The bias term representing the second linear transformation of the emotion-aware feedforward neural network;

[0121] The calculation model output is as follows:

[0122] ;

[0123] In the formula, y represents the output of the model, represents the fully connected layer function, and h represents the input of the model output layer;

[0124] The design loss function uses the following formula:

[0125] ;

[0126] In the formula, Loss represents the loss function value, B represents the total number of samples, and G represents the total number of categories. Indicates that sample b belongs to the true label of category g, Represents the model's predicted probability that sample b belongs to category g;

[0127] The constructing and training the model specifically involves constructing the transformer model combined with the radial basis function network through the radial basis function network submodule construction, the emotion perception transformer submodule construction, the calculation model output and the design loss function, and training the model based on the feature training set, verifying the performance based on the feature test set, and obtaining the mental state assessment model.

[0128] By performing the above operations, this solution creatively adopts the transformer model combined with the radial basis function network for mental state assessment, aiming at the technical problems that the traditional mental health status assessment method is easily restricted by subjective factors and cannot capture the dynamic changes of mental state and complex emotional characteristics, and it is difficult to analyze and predict long-term mental health trends. By introducing the radial basis function network, the ability to capture complex emotional characteristics is enhanced. At the same time, the transformer structure can pay attention to the long-distance dependencies between different parts, thereby improving the real-time performance of the model.

[0129] Example 5, see Figure 1 and Figure 4 This embodiment is based on the above embodiment. In the hyperparameter optimization module, manta ray foraging optimization is used to optimize the hyperparameters of the mental state assessment model to obtain an optimized mental state assessment model. The hyperparameter optimization module specifically includes: initialization, position update and iterative update;

[0130] The initialization includes initializing the search space, initializing the speed matrix and initializing the optimal position;

[0131] The initialization search space is specifically to construct a manta unit set and initialize the manta unit position matrix. The manta unit is used to represent a candidate solution. The manta unit position matrix is ​​expressed as follows:

[0132] ;

[0133] In the formula, represents the initial manta ray unit position matrix, represents the position of the i-th manta ray unit in the j-th dimension, u represents the total number of manta ray units, and v represents the total number of dimensions;

[0134] The initialization velocity matrix, the manta ray unit velocity matrix, is expressed as follows:

[0135] ;

[0136] In the formula, represents the initial manta ray unit velocity matrix, represents the velocity of the i-th manta ray unit in the j-th dimension;

[0137] The initialization of the optimal position is specifically to calculate the fitness of the manta ray unit and select the position of the manta ray unit with the lowest fitness as the optimal position, wherein the fitness is specifically the loss function of the mental state assessment model;

[0138] The updating position includes speed update, position update, spiral update, fitness update and best position update;

[0139] The speed is updated using the following formula:

[0140] ;

[0141] In the formula, represents the manta ray unit velocity matrix at the t+1th iteration, represents the manta ray unit velocity matrix at the tth iteration, represents the manta ray unit position matrix at the tth iteration, represents the best position of the current iteration number, Indicates the best historical position, represents the inertia weight, represents the acceleration constant used to adjust the manta unit to the best position of the current iteration number, represents the acceleration constant used to adjust the manta unit to the best historical position, represents a random number in the range [0,1], Represents a random number in the range [0,1];

[0142] The position update uses the following formula:

[0143] ;

[0144] In the formula, represents the manta ray unit position matrix at the t+1th iteration;

[0145] The spiral update uses the following formula:

[0146] ;

[0147] In the formula, represents the updated position of the i-th manta ray unit in the j-th dimension, represents the position of the current iteration number of the i-th manta ray unit in the j-th dimension, represents a random number in the range [-1,1], Sf represents the spiral factor;

[0148] The fitness updating specifically calculates the fitness of the updated manta ray unit and compares it with the fitness of the manta ray unit before the update. If the fitness of the updated manta ray unit is low, the new position of the manta ray unit is retained and the fitness is updated. If the fitness of the updated manta ray unit is high, the original position of the manta ray unit is retained.

[0149] The optimal position updating is specifically updating the optimal position based on the fitness of the updated manta ray unit;

[0150] The iterative update is specifically to continuously iterate and update until the fitness of the manta ray unit is less than a threshold or reaches a maximum number of iterations, thereby obtaining an optimized mental state assessment model.

[0151] By performing the above operations, this solution creatively uses manta ray foraging optimization to optimize model hyperparameters, which can reduce time consumption and computing costs while quickly finding the optimal solution in the hyperparameter space. It has good global search capabilities and improves the stability and efficiency of the model.

[0152] Example 6, see Figure 1 This embodiment is based on the above embodiment. In the auxiliary mental health status assessment module, the optimized mental state assessment model is used to perform mental state assessment, obtain mental health reference data, and assist in mental health status assessment based on the mental health reference data.

[0153] 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.

[0154] 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.

[0155] 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 health status auxiliary assessment system based on big data, characterized by: The system includes a data acquisition module, a data preprocessing module, a mental state assessment model building module, a hyperparameter optimization module, and an auxiliary mental health state assessment module; The data collection module obtains historical patient data sets through data collection; The data preprocessing module performs preprocessing by data cleaning, data labeling, data encoding, data normalization, feature extraction and data set segmentation to obtain a feature training set and a feature test set; The mental state assessment model construction module obtains the mental state assessment model by constructing a transformer model combined with a radial basis function network; The hyperparameter optimization module uses manta ray foraging optimization to perform hyperparameter optimization on the mental state assessment model to obtain an optimized mental state assessment model; The auxiliary mental health status assessment module uses the optimized mental state assessment model to perform mental state assessment, obtain mental health reference data, and assist in mental health status assessment; The transformer model combined with the radial basis function network specifically includes a radial basis function network submodule and an emotion perception transformer submodule, and the mental state assessment model construction module specifically includes radial basis function network submodule construction, emotion perception transformer submodule construction, calculation model output, loss function design, and model construction and training; The radial basis function network submodule construction includes determining the kernel center, calculating the width parameter, designing the kernel function and calculating the submodule output; The determining of the core center is used to determine the core center of the radial basis function, specifically determining the core center of the radial basis function of the radial basis function network submodule by using the K-means clustering method, and the content includes: Initialize the cluster center, specifically randomly select N data points as the initial cluster center, where N represents the number of cluster centers; Assign clusters, specifically, calculate the distance from the data point to the cluster center, and assign the data point to the nearest cluster center. The formula used to calculate the distance from the data point to the cluster center is as follows: ; In the formula, represents the distance from the mth data point to the nth cluster center, represents the mth data point, represents the nth cluster center, Indicates calculation of Euclidean distance; Update the cluster center using the following formula: ; In the formula, represents the updated nth cluster center, represents the number of data points in the nth cluster, represents the lth data point in the nth cluster, Represents the set of data points in the nth cluster; Iterative update, specifically, continuously iteratively updating the K-means clustering until the change in the cluster center is less than a threshold or reaches a maximum number of iterations; The calculated width parameter is used to determine the width parameter of the radial basis function neuron, specifically, the average distance from the data points in the cluster to the cluster center is used as the width parameter, and the formula used is as follows: ; In the formula, Represents the width parameter of the nth radial basis function neuron; The designed kernel function is used to determine the radial basis function kernel function, specifically using the Gaussian kernel function as the radial basis function kernel function, and the formula used is as follows: ; In the formula, represents the output function of the nth radial basis function neuron, and I represents the input of the radial basis function network submodule; The calculation submodule output is as follows: ; Where O represents the output of the radial basis function network submodule, represents the output weight of the nth radial basis function neuron, and Rb represents the output bias term of the radial basis function network submodule; The emotion perception transformer submodule is constructed, including calculating emotion perception head self-attention, designing emotion perception multi-head self-attention and designing emotion perception feedforward neural network; The calculation of emotion perception head self-attention uses the following formula: ; In the formula, represents the self-attention of the a-th head, represents the softmax function, Q represents the query matrix, K represents the key matrix, V represents the value matrix, and E represents the emotional state embedding. represents the dimension of the key, represents the linear transformation matrix of the a-th head for query, represents the linear transformation matrix of the a-th head for the key, represents the linear transformation matrix of the a-th head for the value, Represents the weight of the emotional state embedded in the self-attention mechanism; The emotion-aware multi-head self-attention is designed, and the formula used is as follows: ; In the formula, represents the emotion-aware multi-head self-attention function, represents the concatenation function, represents the self-attention of the first head, represents the self-attention of the second head, represents the self-attention of the Ath head, A represents the total number of heads, Represents the linear transformation matrix of emotion-aware multi-head self-attention output; The emotion perception feedforward neural network is designed, and the formula used is as follows: ; In the formula, represents the emotion perception feedforward neural network function, represents the ReLU activation function, s represents the input of the emotion-aware feedforward neural network, represents the weight matrix of the first linear transformation of the emotion-aware feedforward neural network, represents the weight matrix of the second linear transformation of the emotion-aware feedforward neural network, represents the weight of the emotional state embedded in the emotion-aware feedforward neural network, represents the bias term of the first linear transformation of the emotion-aware feedforward neural network, The bias term representing the second linear transformation of the emotion-aware feedforward neural network; The calculation model output is as follows: ; In the formula, y represents the output of the model, represents the fully connected layer function, and h represents the input of the model output layer; The design loss function uses the following formula: ; In the formula, Loss represents the loss function value, B represents the total number of samples, and G represents the total number of categories. Indicates that sample b belongs to the true label of category g, Represents the model's predicted probability that sample b belongs to category g; The constructing and training the model specifically involves constructing the transformer model combined with the radial basis function network through the radial basis function network submodule construction, the emotion perception transformer submodule construction, the calculation model output and the design loss function, and training the model based on the feature training set, verifying the performance based on the feature test set, and obtaining the mental state assessment model.

2. The mental health status auxiliary assessment system based on big data according to claim 1 is characterized by: In the hyperparameter optimization module, the manta ray foraging optimization is used to optimize the hyperparameters of the mental state assessment model to obtain an optimized mental state assessment model. The hyperparameter optimization module specifically includes: initialization, position update and iterative update; The initialization includes initializing the search space, initializing the speed matrix and initializing the optimal position; The initialization search space is specifically to construct a manta unit set and initialize the manta unit position matrix. The manta unit is used to represent a candidate solution. The manta unit position matrix is ​​expressed as follows: ; In the formula, represents the initial manta ray unit position matrix, represents the position of the i-th manta ray unit in the j-th dimension, u represents the total number of manta ray units, and v represents the total number of dimensions; The initialization velocity matrix, the manta ray unit velocity matrix, is expressed as follows: ; In the formula, represents the initial manta ray unit velocity matrix, represents the velocity of the i-th manta ray unit in the j-th dimension; The initialization of the optimal position is specifically to calculate the fitness of the manta ray unit and select the position of the manta ray unit with the lowest fitness as the optimal position, wherein the fitness is specifically the loss function of the mental state assessment model; The updating position includes speed update, position update, spiral update, fitness update and best position update; The speed is updated using the following formula: ; In the formula, represents the manta ray unit velocity matrix at the t+1th iteration, represents the manta ray unit velocity matrix at the tth iteration, represents the manta ray unit position matrix at the tth iteration, represents the best position of the current iteration number, Indicates the best historical position, represents the inertia weight, represents the acceleration constant used to adjust the manta unit to the best position of the current iteration number, represents the acceleration constant used to adjust the manta unit to the best historical position, represents a random number in the range [0,1], Represents a random number in the range [0,1]; The position update uses the following formula: ; In the formula, represents the manta ray unit position matrix at the t+1th iteration; The spiral update uses the following formula: ; In the formula, represents the updated position of the ith manta ray unit in the jth dimension, represents the position of the current iteration number of the i-th manta ray unit in the j-th dimension, represents a random number in the range [-1,1], Sf represents the spiral factor; The fitness updating specifically calculates the fitness of the updated manta ray unit and compares it with the fitness of the manta ray unit before the update. If the fitness of the updated manta ray unit is low, the new position of the manta ray unit is retained and the fitness is updated. If the fitness of the updated manta ray unit is high, the original position of the manta ray unit is retained. The optimal position updating is specifically updating the optimal position based on the fitness of the updated manta ray unit; The iterative update is specifically to continuously iterate and update until the fitness of the manta ray unit is less than a threshold or reaches a maximum number of iterations, thereby obtaining an optimized mental state assessment model.

3. The mental health status auxiliary assessment system based on big data according to claim 2 is characterized by: In the data collection module, the historical patient data set specifically includes historical patient behavior data, historical patient psychological test data, historical patient emotional state data, historical patient physiological data and historical patient basic information.

4. The mental health status auxiliary assessment system based on big data according to claim 1 is characterized by: In the data preprocessing module, the data cleaning is specifically to remove missing values ​​and duplicate values, the data annotation is specifically to annotate the data as normal, slightly abnormal, moderately abnormal and highly abnormal, and use the annotations as data labels, the data encoding is specifically to encode using the one-hot encoding method, the data normalization is specifically to normalize using the minimum-maximum normalization method, the feature extraction is specifically to extract features and convert them into vector form, and the data set segmentation is specifically to segment the historical patient data set after the data cleaning, data annotation, data encoding, data normalization and feature extraction to obtain a feature training set and a feature test set.

5. The mental health status auxiliary assessment system based on big data according to claim 1 is characterized by: In the auxiliary mental health status assessment module, the optimized mental state assessment model is specifically used to perform mental state assessment, obtain mental health reference data, and assist in mental health status assessment based on the mental health reference data.

Citation Information

Patent Citations

  • Rainfall runoff prediction method based on multi-modal fusion

    CN117035148A

  • Electrochemical energy storage power station battery fault early warning method and device based on multivariate multi-scale sample entropy

    CN117665590A