Health status prediction network, model training, prediction method, apparatus, and system
By combining long short-term memory networks and attention mechanism modules, the problem of insufficient accuracy in predicting happiness in traditional methods is solved, and efficient and accurate prediction of adolescent health status is achieved.
Patent Information
- Application Number
- CN202510078181.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-17
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2045-01-17
AI Technical Summary
Existing methods for predicting happiness mainly rely on traditional statistical models or basic machine learning algorithms such as linear regression, logistic regression, and support vector machines. These methods struggle to fully capture the potential nonlinear relationships and long-term dependencies in the data, resulting in low prediction accuracy and stability, and failing to meet the needs of early intervention and precise management.
By employing a Long Short-Term Memory (LSTM) network combined with an attention mechanism module, a sequence of hidden state vectors is generated from the time-series data of the behavior evaluation of the tested subjects. The attention mechanism module is then used to weight the hidden state vectors to generate a time-step weight sequence, which is then combined with the output layer to predict the health status sequence, thereby improving the accuracy of health status prediction.
It significantly improves the accuracy and reliability of health status sequence prediction, enabling better monitoring and diagnosis of the historical and current health status of subjects, especially the psychological and physiological status of adolescents.
Smart Images

Figure CN120012856B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure belongs to the technical field of computers, relates to the technical field of artificial intelligence, the technical field of education, in particular to the technical field of deep learning, and specifically relates to a health state prediction network, a health state prediction model training method and device, a health state prediction method and device, a health state prediction system, an electronic device, and a computer readable storage medium. BACKGROUND
[0002] A study assessing the impact of stress on health found that stress can have a serious impact on diseases such as asthma, rheumatoid arthritis, anxiety, depression, cardiovascular disease, chronic pain, HIV / AIDS, stroke, cancer, and can also accelerate the aging process and shorten life expectancy. In the face of the increasing stress, there are ways to cope with it, such as taking activities such as meditation, exercise, ensuring adequate sleep, reducing the frequency of checking emails, practicing yoga, listening to music, receiving massage, and chewing gum, which are effective ways to relieve stress. These measures can help reduce the damage caused by stress.
[0003] Therefore, how to provide appropriate support and help for the health status of adolescents is a problem to be solved at present. SUMMARY
[0004] The present disclosure provides a health state prediction network, a health state prediction model training method and device, an electronic device, and a computer readable storage medium.
[0005] According to a first aspect, a health state prediction network is provided, which comprises: a long short-term memory network configured to obtain a hidden state vector sequence according to behavior evaluation time series data of a measured object; an attention mechanism module configured to obtain a time step weight sequence of the hidden state vector sequence, and obtain context information based on the hidden state vector sequence and the time step weight sequence; and an output layer configured to obtain a health state sequence of the measured object at different time points according to the context information.
[0006] According to a second aspect, a health state prediction model training method is provided, which comprises: obtaining a training data set; obtaining an initial health state prediction network, wherein the health state prediction network adopts the health state prediction network described in any implementation manner of the first aspect; calculating a network loss value of the health state prediction network based on the health state sequence; and training the health state prediction network based on the network loss value to obtain a trained health state prediction model.
[0007] According to a third aspect, a health state prediction method is provided, the method comprising: obtaining test data based on acquired behavior evaluation time series data of a subject; inputting the test data into a health state prediction model to obtain a health state sequence output by the health state prediction model, wherein the health state prediction model is trained by the method of any implementation manner of the second aspect.
[0008] According to a fourth aspect, a health state prediction model training apparatus is provided, the apparatus comprising: a sample obtaining unit configured to obtain a training data set; a network obtaining unit configured to obtain an initial health state prediction network, the health state prediction network being the health state prediction network described in any implementation manner of the first aspect; a calculation unit configured to calculate a network loss value of the health state prediction network based on a health state sequence; and a training unit configured to train the health state prediction network based on the network loss value to obtain a trained health state prediction model.
[0009] According to a fifth aspect, a health state prediction apparatus is provided, the apparatus comprising: a data obtaining unit configured to obtain test data based on acquired behavior evaluation time series data of a subject; and an input unit configured to input the test data into a health state prediction model to obtain a health state sequence output by the health state prediction model, wherein the health state prediction model is trained by the apparatus of the fourth aspect.
[0010] According to a sixth aspect, a health state prediction system is provided, the health state prediction system comprising: a data collection terminal configured to obtain subject information of a subject and obtain behavior evaluation time series data of the subject based on the subject information; and a prediction server configured to implement the health state prediction method described in any implementation manner of the third aspect.
[0011] According to a seventh aspect, an electronic device is provided, the electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in any implementation manner of the second aspect or the third aspect.
[0012] According to an eighth aspect, a non-transitory computer-readable storage medium storing computer instructions is provided, the computer instructions being used to cause a computer to perform the method described in any implementation manner of the second aspect or the third aspect.
[0013] The health state prediction network provided by the embodiment of the present disclosure comprises a long short-term memory network, an attention mechanism module and an output layer, the long short-term memory network obtains a hidden state vector sequence according to behavior evaluation time series data of a measured object, the attention mechanism module obtains a time step weight sequence of the hidden state vector sequence, and obtains context information based on the hidden state vector sequence and the time step weight sequence, and the output layer obtains a health state sequence of the measured object at different time points according to the context information. Thus, through the attention mechanism module in the health state prediction network, the most critical context information is effectively filtered and deeply analyzed from the data, and the health state sequence is obtained based on the context information and the hidden state vector, thereby significantly improving the accuracy of the health state sequence prediction.
[0014] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present disclosure, nor to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0015] The accompanying drawings are used to better understand the present scheme and do not constitute a limitation on the present disclosure. Among them:
[0016] Figure 1 is a structural schematic diagram of an embodiment of the health state prediction network according to the present disclosure;
[0017] Figure 2 is a structural schematic diagram of the specific operation of the attention mechanism module in the present disclosure;
[0018] Figure 3 is a flowchart of an embodiment of the health state prediction model training method according to the present disclosure;
[0019] Figure 4 is a flowchart of an embodiment of the health state prediction method according to the present disclosure;
[0020] Figure 5 is a structural schematic diagram of the health state sequence obtained by the health state prediction method of the present disclosure;
[0021] Figure 6 is a structural schematic diagram of an embodiment of the health state prediction model training device according to the present disclosure;
[0022] Figure 7 is a structural schematic diagram of an embodiment of the health state prediction device according to the present disclosure;
[0023] Figure 8 is a structural schematic diagram of an embodiment of the health state prediction system according to the present disclosure;
[0024] Figure 9is a block diagram of an electronic device for implementing the health state prediction model training method or the health state prediction method according to the embodiments of the present disclosure. DETAILED DESCRIPTION
[0025] Unless otherwise clearly indicated, throughout the specification and claims, the terms "comprise", "comprising", "include", "including", "contain", "containing", "have", "having" or the like are understood to be open-ended terms that do not exclude additional elements or steps.
[0026] The technical solutions of the present disclosure are described below through specific embodiments. It should be understood that one or more steps mentioned in the present disclosure do not exclude other methods and steps before and after the combination steps, or other methods and steps can be inserted between these explicitly mentioned steps. It should also be understood that these examples are only used to illustrate the present disclosure and do not limit the scope of the present disclosure. Unless otherwise stated, the numbering of each method step is only for the purpose of identifying each method step, and is not intended to limit the arrangement order of each method or to limit the scope of the implementation of the present disclosure. Changes or adjustments of the relative relationship, without substantial changes in technical content, can also be considered as the scope of implementation of the present disclosure.
[0027] The raw materials and instruments used in the embodiments are not specifically limited in source, and can be purchased on the market or prepared according to conventional methods well known to those skilled in the art.
[0028] Limitations of traditional statistical models and basic machine learning algorithms: Existing happiness prediction methods mainly rely on traditional statistical models such as linear regression, logistic regression, support vector machine (SVM), or basic machine learning algorithms. These methods are difficult to fully capture the potential nonlinear relationships and long-term dependencies in the data when dealing with complex time series data, resulting in low accuracy and stability of the prediction results.
[0029] Low prediction accuracy: Traditional methods often have difficulty achieving ideal accuracy in happiness prediction tasks, limiting their effectiveness and reliability in practical applications. For example, the prediction accuracy of existing models is usually much lower than 90%, which cannot meet the needs of early intervention and precise management.
[0030] In view of the defects in the prior art, the present disclosure proposes a health state prediction network, Figure 1 Fig. 1 shows a structural schematic diagram 100 of one embodiment of the health state prediction network according to the present disclosure, which comprises a long short-term memory network 101, an attention mechanism module 102, and an output layer 103.
[0031] The long short-term memory network 101 is configured to obtain a hidden state vector sequence according to the behavior evaluation time series data of the measured object. The attention mechanism module 102 is configured to obtain a time step weight sequence of the hidden state vector sequence, and obtain context information based on the hidden state vector sequence and the time step weight sequence. The output layer 103 is configured to obtain a health state sequence of the measured object at different time points according to the context information.
[0032] In this embodiment, the long short-term memory network (LSTM) is a time recurrent neural network, which is specially designed to solve the long-term dependence problem of general RNN (recurrent neural network). All RNNs have a chain form of repeated neural network modules. The hidden state vector is the natural output of the internal state of the model, and is the implicit memory unit state of the LSTM when processing sequence data at each time step. These hidden state vectors contain rich sequence information and are the key to capturing long-term dependencies by the LSTM. Therefore, the hidden state vector is not difficult to obtain, but is the natural output generated by the LSTM model during training and inference.
[0033] In this embodiment, the attention mechanism module 102 is introduced as an additional component into the traditional LSTM network, and does not change the model structure of the LSTM itself. The core structure of the LSTM network, including the update mechanism of the forget gate, the input gate, the output gate and the cell state in the unit, remains unchanged. The role of the attention mechanism module 102 is to weight the hidden state vectors after the LSTM processes the sequence data and generates the hidden state vectors, so as to highlight the influence of key time steps in the sequence. The time step weight sequence generated by the attention mechanism module 102 allows the health state prediction network to pay more attention to those time steps that are more important for predicting the health state sequence when making the final prediction.
[0034] Specifically, the LSTM network generates a series of hidden state vectors h1, h2, …, hN, i.e., a hidden state vector sequence, and the hidden state vectors in the hidden state vector sequence capture the time dependence in the behavior evaluation time series data. The attention mechanism module 102 generates a weighted context information by weighting the hidden state vectors in the hidden state vector sequence, and the context information is used for the final health state sequence prediction.
[0035] In this embodiment, the measured object is the object detected by the health state prediction network. The health state prediction network is used to predict the behavior evaluation time series data of the measured object, and obtain the health state sequence of the measured object. The health state of the measured object can be effectively judged, and the accuracy and comprehensiveness of monitoring or diagnosing the measured object are improved.
[0036] In this embodiment, the behavior evaluation time series data is the behavior data of the measured object in the behavior activity and the performance data of the measured object due to the dependent activity, such as the activity being a classroom activity, the behavior data being the motion data of the measured object in different time periods in the classroom activity, and the performance data being the emotional feedback of the measured object to the classroom activity, academic performance, etc. When the measured object is a teenager, the health state time series is a happiness sequence of the teenager, the behavior evaluation time series data not only includes learning performance, social media dynamics, etc., but also includes terminal device sensor data such as exercise amount, sleep quality, etc. These behavior evaluation time series data can reflect the psychological and physiological state of the teenager from multiple dimensions, and provide comprehensive data support for happiness prediction.
[0037] In this embodiment, the time step refers to the time interval between each data point and its previous data point in the time series data. In time series analysis and prediction, the time step is an important concept that can be used to understand the time characteristics of the data, establish models, and make predictions. The time step weight sequence includes at least one time step weight, each time step weight corresponds to a hidden state vector, and the long short-term memory network assigns a time step to each hidden state vector. The size of the time step of each hidden state vector can be the same or different, and the time step weight of the hidden state vector can effectively reflect the key time steps and features of the hidden state vector in the behavior evaluation time series data.
[0038] In this embodiment, the hidden state vector sequence and the time step weight sequence correspond to each other, and the context information is obtained based on the hidden state vector sequence and the time step weight sequence, which includes multiplying each hidden state vector and the corresponding time step weight and adding them to obtain the context information.
[0039] In this embodiment, the attention mechanism module 102 includes a fully connected layer, an activation function, and a softmax function. Among them, the time step weight of each time step is calculated in the attention mechanism module 102 through the fully connected layer (also known as the attention layer). Specifically, we first pass the hidden state vector of each time step through a fully connected layer, then apply an activation function (such as tanh) for nonlinear transformation, and finally pass through a softmax function to generate the time step weight sequence α. The formula is shown in equations (1) and (2):
[0040] e_t = \text{tanh}(W_a h_t + b_a)(1)
[0041] α= \frac{\exp(e_t)}{\sum_{t'} \exp(e_{t'})}(2)
[0042] In equation (1), W_a and b_a are trainable parameters.
[0043] In this embodiment, the output layer 103 can be a fully connected layer, which inputs the hidden state vector into the fully connected layer (or softmax layer) for final classification or regression prediction.
[0044] In this embodiment, the context information refers to the weighted representation of the key time steps and features after attention mechanism processing, which contains sufficient semantic and temporal dependencies and can reflect the mental health status of the measured object at different time points. Therefore, the output layer can predict the health status sequence of the measured object at different time points according to the context information through a fully connected layer or other appropriate transformation.
[0045] The health status prediction network provided by the embodiments of the present disclosure comprises: a long short-term memory network, an attention mechanism module, and an output layer. The long short-term memory network obtains a hidden state vector sequence according to the behavior evaluation time series data of the measured object. The attention mechanism module obtains a time step weight sequence of the hidden state vector sequence, and obtains context information based on the hidden state vector sequence and the time step weight sequence. The output layer obtains a health status sequence of the measured object at different time points according to the context information. Thus, through the attention mechanism module in the health status prediction network, the most critical context information is effectively filtered and deeply analyzed from the data, and the health status sequence is obtained based on the context information and the hidden state vector, thereby significantly improving the accuracy of the health status sequence prediction.
[0046] In some embodiments of the present disclosure, the health status prediction network described above further comprises: an attention subnetwork for calculating the weight of the hidden state vector sequence at the time step to obtain the time step weight sequence of the hidden state vector sequence.
[0047] In this embodiment, the attention subnetwork is a module independent of the long short-term memory network, the attention mechanism module, and the output layer. The attention subnetwork analyzes the hidden state vector generated by the long short-term memory network to generate the weight of each hidden state vector in the hidden state vector sequence at the time step, and obtains the time step weight sequence including the time step weight of at least one hidden state vector.
[0048] In this embodiment, the attention subnetwork can dynamically adjust the weight of the time step according to the semantic information of the hidden state vector. This dynamic adjustment not only considers the relative importance of the time step, but also considers the semantic correlation between the hidden state vectors, thereby more accurately capturing the key information in the sequence data.
[0049] In this embodiment, when the behavioral evaluation time series data is multimodal and multi-source data, the attention subnetwork can perform cross-modal weight allocation on the hidden state vectors of different modalities, enabling the model to better integrate information from different data sources and improve the accuracy of prediction.
[0050] The health status prediction network provided in this embodiment also includes an attention subnetwork. The attention subnetwork is used to calculate the weights of the hidden state vector sequence at each time step, thereby obtaining the time step weight sequence of the hidden state vector sequence. This provides a reliable way to obtain the time step weight sequence, improving the reliability and accuracy of the health status prediction network.
[0051] In some optional implementations of this disclosure, the attention mechanism module is further used to calculate the similarity between each hidden state vector in the hidden state vector sequence and a specific feature to obtain the similarity value of each hidden state vector; and to normalize the similarity value of each hidden state vector to obtain the time step weight of each hidden state vector.
[0052] In this optional implementation, specific aspect features refer to features that are important to the health status of the tested subject. For example, when the tested subject is an adolescent and it is necessary to monitor the adolescent's well-being, these specific aspect features may include emotional tendencies, language patterns, fluctuations in academic performance, social behavior patterns, etc. These specific aspect features can reflect the adolescent's psychological state and level of well-being.
[0053] In this optional implementation, specific features can be obtained through the following approaches: using external knowledge bases (such as sentiment dictionaries, psychological lexicons, etc.) to extract richer semantic features; using pre-trained language models (such as BERT, GPT, etc.) to extract deeper semantic features, which can better capture the emotional and psychological state information in the text when analyzing adolescents' happiness; and combining data from multiple modalities (such as text, images, speech, etc.) to extract multimodal features, which can more comprehensively reflect the psychological state of adolescents when analyzing their happiness.
[0054] In this optional implementation, the attention mechanism module has a dedicated submodule for generating time step weights. This submodule calculates the similarity between each hidden state vector in the hidden state vector sequence and specific features to obtain the similarity value of each hidden state vector. The similarity value of each hidden state vector is then normalized to obtain the time step weight of each hidden state vector.
[0055] like Figure 2 As shown, the specific operations of the attention mechanism module include steps Step_1 to Step_4:
[0056] Step 1: The attention mechanism module obtains the sequence of hidden state vectors generated by the Long Short-Term Memory network.
[0057] First, the LSTM network processes the input action evaluation time-series data and generates a hidden state vector sequence h. t (t is a value from 1 to N), where t represents the time step.
[0058] Step 2: Calculate the time step weight sequence α
[0059] To determine the importance of each time step, a time step weight sequence α needs to be calculated. The attention mechanism module can directly generate the time step weight sequence α, or it can be done through an additional neural network (called the attention subnetwork), which will hide the state vector h. t As input, it outputs the time step weight α. The time step weight α can be calculated using the softmax function, ensuring that the sum of all weights is 1. Figure 2 In the middle, the submodule will store the hidden state vectors h t With specific aspect characteristics V α Similarity is calculated to obtain similarity values. These similarity values are then normalized to obtain the time step weight sequence α.
[0060] Step 3: Weighted summation
[0061] The time step weight α and the hidden state vector h are used together. t Multiply the results and sum the hidden state vectors over all time steps to obtain a weighted sequence of hidden state vectors, i.e., the context information c. This weighted sequence of hidden state vectors represents the health state prediction network's assessment of behavioral evaluation time-series data (such as...). Figure 2 In the attention representation of w1…wN, the most important information is contained.
[0062] Step 4: Integrate Attention Representations
[0063] The health state sequence y can be obtained directly from the context information, or the context information can be combined with the hidden state vector h of the LSTM network. t The sequences are then fused to obtain the final health status sequence y. This fusion can be performed in various ways, such as splicing, summing, or weighted summing. Figure 2 In the diagram, the dashed box represents the hidden state vector sequence h output by the LSTM network. t .
[0064] The health state prediction network provided by the present disclosure, the attention mechanism module is further used for similarity calculation of each hidden state vector in the hidden state vector sequence and the specific aspect feature, to obtain a similarity value of each hidden state vector; the similarity value of each hidden state vector is normalized to obtain a time step weight of each hidden state vector, which can make the health state prediction network pay more attention to the specific aspect feature, and generate the time step weight of each hidden state vector based on the attention information, thereby improving the reliability of the time step weight.
[0065] In some optional implementations of the present disclosure, the attention mechanism module is further used for collecting semantic information of each hidden state vector in the hidden state vector sequence, and adjusting the time step weight of each hidden state vector based on the semantic information of each hidden state vector.
[0066] In the optional implementation, the adjusting of the time step weight of each hidden state vector based on the semantic information of each hidden state vector includes: detecting whether the semantic information of each hidden state vector matches a pre-set health state, if the semantic information matches the pre-set health state, detecting whether the time step weight of the hidden state vector is greater than a pre-set upper threshold, and in response to being less than the pre-set upper threshold, adjusting the time step weight of the hidden state vector to the pre-set upper threshold.
[0067] The state prediction network provided by the present optional implementation, the attention mechanism module is further used for collecting semantic information of each hidden state vector in the hidden state vector sequence, and adjusting the time step weight of each hidden state vector based on the semantic information of each hidden state vector, thereby improving the flexibility and reliability of the time step weight.
[0068] In some optional implementations of the present disclosure, the health state prediction network further includes: a graph neural network module, the graph neural network module is used for collecting social network data of the measured object, and extracting key information in the social network data; and sending the key information to the long short-term memory network, so that the long short-term memory network generates the hidden state vector sequence based on the key information and the behavior evaluation time series data.
[0069] In the optional implementation, the graph neural network module is used for collecting social network data of the measured object, and extracting key information therefrom, and then sending the key information to the long short-term memory network. In this case, the long short-term memory network generates the hidden state vector sequence in combination with the key information and the behavior evaluation time series data. The social network data is a social group of surrounding objects involved in the same activity as the behavior evaluation time series data.
[0070] In this optional implementation, after receiving the key information extracted by the graph neural network module, the long short-term memory network takes the key information and the behavior evaluation time series data as inputs to generate a new sequence of hidden state vectors. These hidden state vectors comprehensively reflect the characteristics of the behavior data and the social network data, thereby more comprehensively capturing the health status information of the measured object.
[0071] In this optional implementation, the long short-term memory network generates the sequence of hidden state vectors based on both the key information and the behavior evaluation time series data, rather than only based on the behavior evaluation time series data. This combination enables the model to more accurately predict the health status sequence of the measured object.
[0072] The health status prediction network provided in this embodiment further includes a graph neural network module that collects social network data of the measured object and extracts key information from the social network data, and sends the key information to the long short-term memory network to enable the long short-term memory network to generate a sequence of hidden state vectors based on both the key information and the behavior evaluation time series data. To this end, the social network data and the behavior evaluation time series data are combined to jointly generate the sequence of hidden state vectors, thereby improving the comprehensiveness of the information in the sequence of hidden state vectors and improving the accuracy of data prediction by the health status prediction network.
[0073] The present disclosure proposes a health status prediction model training method, Figure 3 Fig. 300 shows a flow 300 of one embodiment of the health status prediction model training method according to the present disclosure, which includes the following steps:
[0074] In step 301, a training data set is obtained.
[0075] In this embodiment, the execution subject on which the health status prediction model training method runs can obtain the training data set in various ways. For example, the execution subject can obtain the training data set stored in a database server through wired or wireless connection. For another example, a user can obtain the training data set collected by a terminal by communicating with the terminal.
[0076] Here, the training data set can include at least one training data, the behavior evaluation time series data of various objects and the labeled label of the behavior evaluation time series data, and the labeled label is used to represent the health state of the object. When the measured object is a teenager, in order to realize the prediction of the happiness state of the teenager through the health state prediction network, the training data includes specific features and labels, which are selected and labeled according to the specific needs of the teenager happiness prediction. For example, the data set can contain a large amount of behavior data, emotional feedback, academic performance fluctuations and other information of teenagers in the learning process, which are collected specially for the needs of this research.
[0077] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of the training data set are performed after authorization and in accordance with relevant laws and regulations.
[0078] Step 302, obtaining an initial health state prediction network.
[0079] In this embodiment, the health state prediction network can use the health state prediction network disclosed in the above embodiment. Therefore, the network structure of the health state prediction network can use any one of the network structures of the health state prediction network in the embodiments of the present disclosure. For example, the health state prediction network includes: a long short-term memory network, which is used to obtain a hidden state vector sequence according to the behavior evaluation time series data of the measured object; an attention mechanism module, which is used to obtain a time step weight sequence of the hidden state vector sequence, and obtain context information based on the hidden state vector sequence and the time step weight sequence; and an output layer, which is used to obtain a health state sequence of the measured object at different time points according to the context information of the hidden state vector sequence.
[0080] In this embodiment, step 302 includes: defining the structure of the health state prediction network, including the number of layers of the health state prediction network, the number of hidden units of each layer, the implementation of the attention mechanism module and the output layer. Initialize the weight and bias parameters of the initial health state prediction network. Generally, the weight parameter is initialized randomly (such as Xavier initialization), and the bias parameter is initialized to zero.
[0081] Step 303, inputting the training data selected from the training data set into the health state prediction network to obtain the health state sequence output by the health state prediction network.
[0082] In this embodiment, the execution subject can select training data from the training data set obtained in step 301, and perform the training steps of steps 303 to 305 to complete one iteration of training of the health state prediction model. The selection method and selection quantity of the training data selected from the training data set are not limited in the present application, and the number of iterations of training of the health state prediction model is also not limited. For example, in one iteration of training, a plurality of continuous training data can be randomly selected, the network loss value of the health state prediction model is calculated through the selected training data, and the parameters of the health state prediction model are adjusted.
[0083] In step 304, the network loss value of the health state prediction network is calculated based on the health state sequence.
[0084] In this embodiment, in each iteration of training of the health state prediction model, training data is selected from the training data set, and the selected training data is input into the health state prediction model. The network loss value of the health state prediction model is calculated based on the health state sequence output by the health state prediction model.
[0085] In this embodiment, when calculating the network loss value, a cross-entropy loss function can be used. The cross-entropy loss function can measure the difference between two different probability distributions of the same random variable, which in machine learning represents the difference between the true probability distribution and the predicted probability distribution. The smaller the value of the cross-entropy loss function, the better the prediction effect of the health state prediction network.
[0086] In this embodiment, during the iteration training of the health state prediction network, a gradient descent algorithm can be used to minimize the loss function of the health state prediction network, so as to iteratively optimize the network parameters of the health state prediction network.
[0087] The original intention of the gradient is a vector, which represents the directional derivative of a certain loss function at that point along the direction, that is, the loss function changes fastest along the direction at that point. In deep learning, the main task of the neural network is to find the optimal network parameters (weights and biases) during learning, and the optimal network parameters are the parameters at which the loss function is minimized.
[0088] Optionally, an appropriate optimizer can also be selected to update the network parameters of the health state prediction network. In the present disclosure, since the Adam optimizer performs well in many deep learning tasks, the Adam optimizer can be used to optimize the network parameters of the health state prediction network.
[0089] In step 305, the health state prediction network is trained based on the network loss value to obtain a trained health state prediction model.
[0090] In the embodiment, the training of the health state prediction network includes: inputting the training data into the health state prediction network, calculating the health state sequence by the health state prediction network, i.e., forward propagation; calculating the network loss value according to the prediction result and the true label, i.e., calculating the loss; calculating the gradient of the network loss value with respect to the model parameters by the back propagation algorithm, i.e., back propagation; updating the model parameters by the optimizer according to the calculated gradient, i.e., parameter update. The above processes of forward propagation, loss calculation, back propagation and parameter update are repeated until the stopping condition is met (such as reaching the predetermined number of training rounds, the loss on the validation set no longer decreases, etc.).
[0091] In the embodiment, the trained health state prediction model is obtained by inputting the selected training data into the health state prediction network for iterative training, and adjusting the parameters of the health state prediction network.
[0092] In the embodiment, the network loss value of the health state prediction network can be used to detect whether the health state prediction network meets the training completion condition. After the health state prediction network meets the training completion condition, the trained health state prediction model is obtained.
[0093] In the embodiment, the training completion condition includes that the network loss value of the health state prediction network is less than a first loss value threshold. The first loss threshold can be determined based on specific training requirements, for example, the first loss threshold is 0.01.
[0094] Optionally, in the embodiment, in response to the health state prediction network not meeting the training completion condition, the related parameters in the health state prediction network are adjusted to make the network loss value of the health state prediction network converge, and the training steps 303-305 are continued to be performed based on the adjusted health state prediction network.
[0095] The health state prediction model training method provided by the embodiments of the present disclosure first acquires a training data set, then acquires an initial health state prediction network, inputs the training data selected from the training data set into the health state prediction network to obtain the health state sequence output by the health state prediction network, then calculates the network loss value of the health state prediction network based on the health state sequence, and finally trains the health state prediction network based on the network loss value to obtain the trained health state prediction model, thereby providing a reliable implementation for the training of the health state prediction model.
[0096] Before training the health state prediction model, training data and validation data need to be prepared. Optionally, before calculating the network loss value of the health state prediction network based on the health state sequence, the above health state prediction model training method further includes the following specific steps: the training data set can be subjected to data enhancement, such as data resampling, data balancing, etc., to improve the generalization ability of the model; the training data set is divided into a training set and a validation set (and possibly a test set), wherein the training set is used to update the parameters of the health state prediction model, and the validation set is used to adjust the hyperparameters of the health state prediction model and prevent overfitting.
[0097] In some optional implementations of the present disclosure, the above method further includes: using at least one of recall, F1 score, precision, and accuracy as an evaluation index to evaluate the performance of the health state prediction model, to obtain an evaluation result.
[0098] In this embodiment, the accuracy is calculated by the formula shown in formula (3), and the accuracy is used to represent the proportion of the number of samples correctly predicted by the health state prediction model to the total number of samples. As the most commonly used index for evaluating classification performance, the accuracy reflects the wide applicability and practicality of the health state prediction model.
[0099] (3)
[0100] In formula (3), Tp (true positive) represents the number of samples that are actually positive (for example, the measured object is in a stress state) and are correctly predicted as positive by the model; Tn (true negative) represents the number of samples that are actually negative (for example, the measured object is not in a stress state) and are correctly predicted as negative by the model; Fp (false positive) represents the number of samples that are actually negative but are incorrectly predicted as positive by the model; and Fn (false negative) represents the number of samples that are actually positive but are incorrectly predicted as negative by the model.
[0101] In this embodiment, the accuracy is calculated by the formula shown in formula (4), and the precision is generally used to measure the consistency between a series of effects. The precision is usually determined by comparing the difference between a group of actual results and the mathematical expectation of the group. The precision of the present disclosure refers to the time precision, which measures the consistency of the prediction results between different time steps. For example, if the model predicts that a certain object is in a stress state at consecutive time steps, we can say that the model has high time precision. This concept is embodied in formula (4).
[0102] (4)
[0103] Generally, in a classification task, Tp (True Positive) represents true positives, that is, the number of samples that are correctly predicted as positive classes by the model, and Fp (False Positive) represents false positives, that is, the number of samples that are actually negative classes but are incorrectly predicted as positive classes by the model. However, since Tp' and Fp' are used in formula (4), this represents the number of true positives and false negatives after some adjustment or modification.
[0104] In this embodiment, the recall rate is calculated by the formula shown in formula (5), and the recall rate refers to the proportion of samples that are actually positive classes and are correctly predicted as positive classes by the model.
[0105] (5)
[0106] Generally, in a classification task, Tp (True Positive) represents true positives, that is, the number of samples that are correctly predicted as positive classes by the model, and Fn (False Negative) represents false negatives, that is, the number of samples that are actually positive classes but are incorrectly predicted as negative classes by the health status prediction model. However, since Tp' and Fn' are used in formula (5), this represents the number of true positives and false negatives after some adjustment or modification.
[0107] In this embodiment, the F1 score is used to measure the fit between the expected data and the prediction results of the health status prediction model. This scoring standard is specified in formula (6).
[0108] (6)
[0109] In formula (6), Tpr (True Positive Rate) represents the proportion of samples that are actually positive classes and are predicted as positive classes by the health status prediction model; Fpr (False Positive Rate) represents the proportion of samples that are actually negative classes and are incorrectly predicted as positive classes by the health status prediction model; and Fnr (False Negative Rate) represents the proportion of samples that are actually positive classes and are incorrectly predicted as negative classes by the health status prediction model.
[0110] The above indicators are commonly used to evaluate the performance of the health status prediction model, and in particular in unbalanced classification problems, the F1 score can provide more comprehensive information than the accuracy rate alone.
[0111] The method for evaluating the performance of the health status prediction model provided by the optional implementation manner uses multiple indicators including the recall rate, the F1 score, the precision rate, and the accuracy rate to evaluate the performance of the health status prediction model, which can effectively test the performance of the health status prediction model and improve the testing efficiency of the health status prediction model.
[0112] Further, based on the health state prediction model training method provided in the above embodiment, the present disclosure further provides an embodiment of a health state prediction method, which combines computer vision, deep learning and other artificial intelligence fields. Figure 4 The flow 400 according to an embodiment of the health state prediction method of the present disclosure is shown, and the health state prediction method comprises the following steps:
[0113] Step 401: Obtain the test data based on the obtained behavior evaluation time series data of the measured object.
[0114] In this embodiment, the measured object is the object to be detected, and the measured object can be an adult, an employee, a student, etc. The behavior evaluation time series data of the measured object refers to the continuous behavior data of the measured object in a historical time period, and the behavior data can reflect the time series data of the current health state of the measured object.
[0115] In this embodiment, the test data is the data obtained after the behavior evaluation time series data is preprocessed and feature engineered, and the test data can be directly input into the health state prediction model to obtain the health state sequence output by the health state prediction model.
[0116] In this embodiment, the execution subject of the health state prediction method can obtain the behavior evaluation time series data in various ways. For example, the execution subject can obtain the behavior evaluation time series data stored in the database server through wired connection or wireless connection. For another example, the execution subject can also receive the behavior evaluation time series data collected by the terminal or other devices in real time.
[0117] Step 402: Input the test data into the health state prediction model to obtain the health state sequence output by the health state prediction model.
[0118] In this embodiment, the health state prediction model is trained by the health state prediction model training method described above, and the health state prediction model adopts the attention mechanism and the long short-term memory network to output the health state sequence of the measured object, thereby improving the accuracy of the health state sequence prediction.
[0119] In this embodiment, the health state sequence is a sequence reflecting the health state of the measured object, which can be the mental health state of the measured object or the physical health state. The health state sequence output by the health state prediction model can provide a reference for doctors. The health state sequence comprises at least one health state, and each health state can reflect the probability of the measured object belonging to normal or abnormal.
[0120] In this embodiment, the execution subject can input the to-be-tested data obtained from step 401 into the health state prediction model, so as to obtain a health state sequence output by the health state prediction model. The health state sequence is used to indicate the current health state result of the measured object.
[0121] In this embodiment, the health state prediction model can be obtained by training the method described in the above Figure 3 embodiment. The specific training process can be referred to the related description of the Figure 3 embodiment, which is not described here in detail.
[0122] The health state prediction method provided in this embodiment obtains to-be-tested data based on the obtained behavior evaluation time series data of the measured object, inputs the to-be-tested data into the health state prediction model, and obtains a health state sequence output by the health state prediction model, thereby improving the reliability of the health state sequence of the measured object.
[0123] In some optional implementations of the present disclosure, the above obtaining to-be-tested data based on the obtained behavior evaluation time series data of the measured object comprises: obtaining behavior content data and course learning data of the measured object, taking the behavior content data and the course learning data as the behavior evaluation time series data; and inputting the behavior evaluation time series data into a maximum-minimum normalization formula to obtain the to-be-tested data.
[0124] In this optional implementation, the measured object can be a teenager, and the health state sequence output by the health state prediction model can be a happiness level value of the teenager. Through the health state prediction method of the present disclosure, the prediction ability of the mental health status of the teenager can be effectively improved. In order to ensure the standardization of the input data and lay a good foundation for its analysis, the research first preprocesses the data, adopts the maximum-minimum normalization formula to realize the minimum-maximum normalization processing of the data, and obtains a training data set. Through the minimum-maximum normalization processing of the behavior evaluation time series data by the maximum-minimum normalization formula, the accuracy of the health state sequence of the measured object can be significantly improved.
[0125] In this optional implementation, the behavior content data comprises relevant content information input by the measured object in a platform forum. The relevant content information can be content input by the user when searching, posting or commenting, which reflects the interest, demand, emotional state and the like of the user. For example, if a teenager frequently searches for keywords such as "stress management" and "emotion regulation", it can imply that he or she is experiencing psychological stress or emotional distress.
[0126] In this optional implementation, the course learning data is the data of the measured object learning the relevant labeled courses, wherein the label can represent the theme, content or difficulty of the course and the like. For example, the label can include "mental health", "academic pressure", "emotional management" and the like. By analyzing the course label selected by the teenager for learning, the key field of attention can be understood, so as to infer the psychological state.
[0127] In this optional implementation, the to-be-tested data is input into the health state prediction model based on the attention mechanism, and the happiness level of the teenager can be predicted.
[0128] In this optional implementation, the converted record has undergone standardization processing, which aims to reduce the pressure of network computing. The coordinate roles x, y and z are processed by the min-max normalization, so that the value range is limited between [0, 1]. The min-max normalization is adopted in combination with the learning bounded target, which can effectively improve the convergence performance of the health state prediction model. As a basic data preprocessing technology, the min-max normalization ensures that the numerical features or parameters can be adjusted to a specific range, usually 0 to 1. In order to improve the adaptability of data to analysis and target detection algorithm, the evaluation time series data needs to be standardized by this system. By adjusting the data to the input range expected by the algorithm, the min-max normalization significantly improves the efficiency and accuracy of the processing technology. In addition, by pushing the outliers to the upper or lower limit of the normalized range, this method helps to highlight the outliers, making them more easily distinguished from the regular visitor patterns. The original data set is linearly converted by the min-max normalization technology. When the minimum and maximum values of the feature are normalized according to the min-max formula, the initial value of the feature will be replaced by a value within the interval [0, 1]. The specific min-max normalization formula is shown in equation (7):
[0129] (7)
[0130] In equation (7), Min and Max represent the minimum and maximum values of the to-be-tested data X'', respectively. Through min-max normalization, the initial value of the behavior evaluation time series data X is mapped to the to-be-tested data X'' belonging to the interval [0, 1].
[0131] As shown in Figure 5 , after the behavior evaluation time series data is processed by the min-max normalization V, the to-be-tested data is obtained, and the to-be-tested data is input into the health state prediction model.
[0132] The method for obtaining test data provided in this embodiment acquires behavioral content data and course learning data of the tested object, and uses the behavioral content data and course learning data as behavioral evaluation time-series data; the behavioral evaluation time-series data is then input into an extremum normalization formula to obtain the test data. Thus, by normalizing the behavioral evaluation time-series data using a normalization formula, the accuracy of the obtained test data is improved.
[0133] Optionally, after obtaining the health status sequence predicted by the health status prediction model from the time series data of behavioral evaluation, such as Figure 5 As shown, the performance of the health status prediction model output can also be evaluated using at least one of the following evaluation metrics: recall, F1 score, precision, and accuracy, to obtain the evaluation results.
[0134] Further reference Figure 6 As an implementation of the methods shown in the above figures, this disclosure provides an embodiment of a health status prediction model training device, which is similar to... Figure 3 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.
[0135] like Figure 6 As shown, the health status prediction model training device 600 provided in this embodiment includes: a sample acquisition unit 601, a network acquisition unit 602, a selection unit 603, a calculation unit 604, and a training unit 605. The sample acquisition unit 601 can be configured to acquire a training dataset. The network acquisition unit 602 can be configured to acquire an initial health status prediction network, which adopts the health status prediction network of the above embodiment. The selection unit 603 can be configured to input training data selected from the training dataset into the health status prediction network to obtain a health status sequence output by the health status prediction network. The calculation unit 604 can be configured to calculate the network loss value of the health status prediction network based on the health status sequence. The training unit 605 can be configured to train the health status prediction network based on the network loss value to obtain a trained health status prediction model.
[0136] In this embodiment, the specific processing and technical effects of the sample acquisition unit 601, network acquisition unit 602, selection unit 603, calculation unit 604, and training unit 605 in the health status prediction model training device 600 can be found in the following references. Figure 3 The relevant descriptions of steps 301, 302, 303, 304, and 305 in the corresponding embodiments will not be repeated here.
[0137] In some embodiments of the present disclosure, the device further comprises an evaluation unit (not shown in the figure), which is configured to evaluate the performance of the health state prediction model using at least one of the evaluation indexes of recall rate, F1 score, precision rate and accuracy rate to obtain an evaluation result.
[0138] Further referring to Figure 7 , as an implementation of the method shown in the above figures, the present disclosure provides an embodiment of a health state prediction device, which corresponds to the method embodiment shown in Figure 4 , and the device can be applied to various electronic devices.
[0139] As shown in Figure 7 , the health state prediction device 700 provided in the embodiment comprises a data obtaining unit 701 and an input unit 702. The data obtaining unit 701 can be configured to obtain test data based on the acquired behavior evaluation time series data of the measured object. The input unit 702 can be configured to input the test data into a health state prediction model to obtain a health state sequence output by the health state prediction model, wherein the health state prediction model is trained by the health state prediction model training device in the above embodiment. In the embodiment, the specific processing of the data obtaining unit 701 and the input unit 702 in the health state prediction device 700 and the technical effects brought by the specific processing can be respectively referred to the related descriptions of steps 401 and 402 in the corresponding embodiment, which will not be repeated here. Figure 4 The corresponding embodiment in the corresponding embodiment, which will not be repeated here.
[0140] In some embodiments of the present disclosure, the data obtaining unit 701 is configured to acquire behavior content data and course learning data of the measured object, and take the behavior content data and the course learning data as the behavior evaluation time series data; and input the behavior evaluation time series data into a maximum and minimum normalization formula to obtain the test data.
[0141] Further referring to Figure 8 , as an implementation of the method shown in the above figures, the present disclosure provides an embodiment of a health state prediction system, which corresponds to the method embodiment shown in Figure 4 .
[0142] As shown in Figure 8 , the health state prediction system 800 provided in the embodiment comprises a data collection terminal 801 and a prediction server 802. The data collection terminal 801 is configured to acquire object information of a measured object, and obtain behavior evaluation time series data of the measured object based on the object information. The prediction server 802 is configured to implement the health state prediction method described in the above embodiment.
[0143] In this embodiment, the object information of the measured object is the name and number of the measured object; the data acquisition terminal 801 is provided with an operation interface, and a user selects a measured object, such as a teenager or an old person, by operating the operation interface to obtain the object information of the measured object, and the data acquisition terminal matches the behavior evaluation time series data related to the measured object from the database based on the selected measured object, and sends the behavior evaluation time series data to the prediction server 802.
[0144] In this embodiment, the specific processing of the prediction server 802 in the health state prediction system 800 and the technical effects brought by the specific processing can be referred to Figure 4 The related description of steps 401 and 402 in the corresponding embodiment will not be repeated here.
[0145] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision, and disclosure of the user personal information (such as the object information of the measured object described above) involved in the technical solution comply with the relevant legal regulations and do not violate public order and good customs.
[0146] In the technical solution of the present disclosure, the user personal information involved is also obtained after authorization by the user, and the user can be effectively analyzed through the user personal information.
[0147] According to the embodiments of the present disclosure, the present disclosure further provides an electronic device, a readable storage medium, and a computer program product.
[0148] Figure 9 A schematic block diagram of an example electronic device 900 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown here, their connections and relationships, and their modes of operation, are meant to be examples only, and are not intended to limit the implementations of the present disclosure described and / or claimed in this document.
[0149] As Figure 9As shown, the device 900 includes a computing unit 901 that can perform various appropriate actions and processes in accordance with a computer program stored in a read-only memory (ROM) 902 or a computer program loaded from a storage unit 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the device 900 can also be stored. The computing unit 901, the ROM 902, and the RAM 903 are connected to each other through a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0150] A plurality of components in the device 900 are connected to the I / O interface 905, including an input unit 906 such as a keyboard, a mouse, and the like; an output unit 907 such as various types of displays, speakers, and the like; a storage unit 908 such as a magnetic disk, an optical disk, and the like; and a communication unit 909 such as a network card, a modem, a wireless communication transceiver, and the like. The communication unit 909 allows the device 900 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0151] The computing unit 901 can be various general and / or special purpose processing components having processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, and the like. The computing unit 901 performs various methods and processes described above, such as the health state prediction model training method or the health state prediction method. For example, in some embodiments, the health state prediction model training method or the health state prediction method can be implemented as a computer software program that is tangibly embodied in a machine-readable medium, such as the storage unit 908. In some embodiments, part or all of the computer program can be loaded and / or installed on the device 900 via the ROM 902 and / or the communication unit 909. When the computer program is loaded into the RAM 903 and executed by the computing unit 901, one or more steps of the health state prediction model training method or the health state prediction method described above can be performed. Alternatively, in other embodiments, the computing unit 901 can be configured to perform the health state prediction model training method or the health state prediction method by any other appropriate means, for example, by means of firmware.
[0152] The various embodiments of the systems and techniques described above can be implemented in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a load programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0153] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable health state prediction model training device or health state prediction device, such that the program code, when executed by the processor or controller, causes the modes / operations specified in the flow charts and / or block diagrams to be implemented. The program code can execute entirely on a machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
[0154] In the context of the present disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0155] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0156] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0157] It should be understood that various forms of flow can be used instead of the ones shown above, reordering, adding or deleting steps. For example, the steps recited in the present disclosure can be performed in parallel, in series, in different orders, without limitation herein, as long as the desired results of the technology disclosed in the present disclosure can be achieved.
[0158] The foregoing description of specific exemplary embodiments of the disclosure has been presented for the purposes of illustration and description. It is not intended to be a limitation on the broad concepts disclosed herein. Obviously, many modifications and variations of the present disclosure are possible in light of the above teachings. It is intended that the scope of the disclosure be limited only by the claims appended hereto and their equivalents. Examples of changes which can be made include the use of one or more of the following: any form of flow, reordering, adding or deleting steps. For example, the steps recited in the present disclosure can be performed in parallel, in series, in different orders, without limitation herein, as long as the desired results of the technology disclosed in the present disclosure can be achieved.
Claims
1. A health status prediction network, the health status prediction network comprising: Long Short-Term Memory (LSTM) networks are used to obtain a sequence of hidden state vectors based on time-series data of the behavior evaluation of the tested object. The behavioral evaluation time-series data includes: terminal device sensor data, which includes exercise volume and sleep quality; The attention mechanism module is used to obtain the time step weight sequence of the hidden state vector sequence, and to obtain context information based on the hidden state vector sequence and the time step weight sequence; The output layer is used to obtain the health status sequence of the tested object at different time points based on the context information. The health status sequence includes the physical health status of the tested object. The health status sequence is used to provide a reference for doctors. The health status sequence includes at least one health status, and each health status reflects the probability that the tested object is normal or abnormal. The attention mechanism module is also used to calculate the similarity between each hidden state vector in the hidden state vector sequence and a specific aspect feature to obtain the similarity value of each hidden state vector; and to normalize the similarity value of each hidden state vector to obtain the time step weight of each hidden state vector. The specific aspect feature refers to the feature related to the health status of the tested object. The attention mechanism module is also used to collect semantic information of each hidden state vector in the hidden state vector sequence. Based on the semantic information of each hidden state vector, the time step weight of each hidden state vector is adjusted by: detecting whether the semantic information of each hidden state vector matches a preset health state; if they match, detecting whether the time step weight of the hidden state vector is greater than a preset upper limit threshold; and if it is less than the preset upper limit threshold, adjusting the time step weight of the hidden state vector to the preset upper limit threshold.
2. The health status prediction network according to claim 1, wherein, The health status prediction network also includes: An attention subnetwork is used to calculate the weights of the hidden state vector sequence at each time step, thereby obtaining the time step weight sequence of the hidden state vector sequence.
3. The health status prediction network according to claim 1 or 2, wherein, The health status prediction network further includes a graph neural network module, which is used to collect social network data of the tested object, extract key information from the social network data, and send the key information to a long short-term memory network so that the long short-term memory network generates a hidden state vector sequence based on the key information and the behavioral evaluation time series data.
4. A method for training a health status prediction model, the method comprising: Obtain the training dataset; An initial health status prediction network is obtained, wherein the health status prediction network adopts the health status prediction network according to any one of claims 1-3; The training data selected from the training dataset is input into the health status prediction network to obtain the health status sequence output by the health status prediction network. Based on the health state sequence, the network loss value of the health state prediction network is calculated; Based on the network loss value, the health status prediction network is trained to obtain the trained health status prediction model.
5. The method according to claim 4, further comprising: The health status prediction model is evaluated using at least one of the following metrics: recall, F1 score, precision, and accuracy, and the evaluation results are obtained.
6. A method for predicting health status, the method comprising: Based on the acquired time-series data of the behavior evaluation of the tested object, the test data is obtained; The test data is input into the health status prediction model to obtain the health status sequence output by the health status prediction model, wherein the health status prediction model is trained using the method described in claim 4 or 5.
7. A training device for a health status prediction model, the device comprising: The sample acquisition unit is configured to acquire the training dataset; The network acquisition unit is configured to acquire an initial health status prediction network, wherein the health status prediction network adopts the health status prediction network according to any one of claims 1-3. The selection unit is configured to input training data selected from the training dataset into the health status prediction network to obtain a health status sequence output by the health status prediction network. The computing unit is configured to calculate the network loss value of the health state prediction network based on the health state sequence; The training unit is configured to train the health status prediction network based on the network loss value to obtain the trained health status prediction model.
8. A health status prediction device, the device comprising: The data acquisition unit is configured to obtain the test data based on the acquired behavioral evaluation time-series data of the tested object; The input unit is configured to input the test data into the health status prediction model to obtain the health status sequence output by the health status prediction model, wherein the health status prediction model is trained using the health status prediction model training device of claim 7.
9. A health status prediction system, the health status prediction system comprising: A data acquisition terminal is used to acquire object information of the tested object and, based on the object information, obtain time-series data of the behavior evaluation of the tested object. A prediction server is used to implement the health status prediction method described in claim 6.
10. An electronic device, characterized in that, include: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method of any one of claims 4-6.
11. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 4-6.
Citation Information
Patent Citations
Hemodialysis treatment scheme assistant decision-making method
CN111028913A
Network traffic prediction method based on combination of GNN-LSTM
CN112906982A