A method, device and apparatus for predicting traumatic brain injury based on labeled data
By building a multi-feature extraction model and conducting joint training, the problem of poor data recognition in big data analysis is solved, accurate classification of labeled data and more efficient data feature extraction are achieved, and the accuracy of data analysis in the medical field is improved. .
Patent Information
- Application Number
- CN202311321247.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-12
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2043-10-12
AI Technical Summary
In existing big data analysis technology, the data recognition effect is not good, especially in the classification of labeled data in the medical field, it is difficult to achieve high accuracy.
A traumatic brain injury prediction method based on labeled data is adopted, by constructing the first data feature extraction model, the second data feature extraction model and the third feature extraction model, combined with preprocessing and training data, and using joint hyperparameter sequences for model training. Realize in-depth analysis and feature extraction of blood marker sequences.
It improves the accuracy of data analysis and feature extraction effect, achieves more accurate data identification and classification, and enhances the breadth of applications of big data processing.
Smart Images

Figure CN117976226B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of big data processing, and specifically relates to a method, device and equipment for predicting traumatic brain injury based on labeled data. Background Art
[0002] Big data analysis is a method of quickly processing large data sets in order to extract useful information from the data. This data can come from social media, sensors, purchase history, etc. Big data analysis can help people better understand the trends and patterns behind the data so that they can make better decisions.
[0003] In the field of big data analysis technology, clustering algorithms or single neural networks are often used to identify data, resulting in poor final data classification or identification results. With the development of technology, it is necessary to apply big data processing and analysis to various technical fields (for example, labeled data classification in the medical field). Therefore, there is an urgent need for a method with better data analysis results to improve the accuracy of data analysis and thus achieve application in more technical fields. Summary of the invention
[0004] The present invention provides a method, device and equipment for predicting traumatic brain injury based on labeled data, which are used to solve the problem of poor data recognition effect in the existing big data technology analysis process.
[0005] In a first aspect, the present invention provides a method for predicting traumatic brain injury based on labeled data, comprising:
[0006] Acquire historical marking data and corresponding traumatic brain injury categories, wherein the historical marking data and the corresponding traumatic brain injury categories are data stored in a database, and the marking data represents a blood marker sequence within a fixed time window;
[0007] Preprocessing the historical marked data to obtain the preprocessed historical marked data, and constructing training data with the preprocessed historical marked data and the corresponding traumatic brain injury category;
[0008] Constructing a first data feature extraction model, a second data feature extraction model, and a third feature extraction model, and jointly training the first data feature extraction model, the second data feature extraction model, and the third feature extraction model using training data to obtain the trained first data feature extraction model, the second data feature extraction model, and the third feature extraction model;
[0009] Acquire current labeled data, and use a first data feature extraction model to extract a first data feature in the current labeled data, use a second data feature extraction model to extract a second data feature in the current labeled data, and use a third feature extraction model to fuse the first data feature with the second data feature to obtain a fused data feature;
[0010] The third feature extraction model is used to identify the features of the fused data to obtain the prediction results of traumatic brain injury based on the labeled data.
[0011] Further, the historical marked data is preprocessed to obtain the preprocessed historical marked data, and training data is constructed with the preprocessed historical marked data and the corresponding traumatic brain injury category, including:
[0012] Obtaining the preset upper and lower limits of the blood markers, and determining abnormal data that is not between the upper and lower limits;
[0013] For historical marked data, determine data with a value of zero or missing to obtain missing data;
[0014] For missing data and abnormal data, the average value of the valid data adjacent to the previous and next data is used for correction to obtain the historical marked data after preprocessing; the valid data refers to other data except the abnormal data and the missing data;
[0015] The preprocessed historical labeled data is used as the data source, and the traumatic brain injury category corresponding to the preprocessed historical labeled data is used as the data label to construct the training data.
[0016] Furthermore, a first data feature extraction model, a second data feature extraction model and a third feature extraction model are constructed, including:
[0017] Constructing a first convolutional layer, a first pooling layer, a second convolutional layer, a second pooling layer, a first fully connected layer, and a second fully connected layer that are connected in sequence to obtain a first data feature extraction model;
[0018] Construct a recurrent neural network and use the recurrent neural network as a second data feature extraction model;
[0019] A data fusion layer, an input layer, a hidden layer, and an output layer connected in sequence are constructed to obtain a third feature extraction model.
[0020] Further, the first data feature extraction model, the second data feature extraction model and the third feature extraction model are jointly trained using the training data to obtain the trained first data feature extraction model, the second data feature extraction model and the third feature extraction model, including:
[0021] Initializing hyperparameters of the first data feature extraction model, hyperparameters of the second data feature extraction model, and hyperparameters of the third feature extraction model to obtain a joint hyperparameter sequence, and repeatedly obtaining a plurality of different joint hyperparameter sequences, in which the hyperparameters of the first data feature extraction model, the hyperparameters of the second data feature extraction model, and the hyperparameters of the third feature extraction model are arranged in sequence;
[0022] The preprocessed historical marking data in the training data is used as the input data of the first data feature extraction model and the input data of the second data feature extraction model, respectively, to obtain the first data feature and the second data feature; and the first data feature and the second data feature are input into the third feature extraction model to obtain the actual output corresponding to the historical marking data output by the third feature extraction model;
[0023] According to the actual output corresponding to the historical marked data and the corresponding data label, the loss function value of the joint hyperparameter sequence in the joint training is obtained; in each training process, after obtaining the loss function value, the historical optimal value corresponding to each joint hyperparameter sequence and the global optimal value of all joint hyperparameter sequences are determined;
[0024] According to the historical optimal value corresponding to each joint hyperparameter sequence and the global optimal value of all joint hyperparameter sequences, the joint hyperparameter sequence is updated by adopting the variable speed search and comprehensive influence update method to obtain the updated joint hyperparameter sequence;
[0025] Based on the updated joint hyperparameter sequence, the historical optimal value corresponding to each joint hyperparameter sequence and the global optimal value among all joint hyperparameter sequences are re-determined, and a global search sequence is randomly determined from the joint hyperparameter sequence of non-global optimal values;
[0026] The global optimal value is used as a reference to guide the global search sequence to perform a global search in the solution space, and a global search sequence after the global search is obtained; for the re-obtained global optimal value, the distance between the global search sequence after the global search and the global optimal value is used as a key parameter, and the global optimal value is updated twice with the key parameter to obtain the global optimal value after the second update;
[0027] Re-obtain the updated joint hyperparameter sequence, the global search sequence after the global search, and the error function value of the global optimal value after the second update, take out multiple sequences with the largest error function values according to a preset number, obtain multiple target hyperparameter sequences, and mutate the target hyperparameter sequences to obtain the mutated target hyperparameter sequences, thereby completing the update of the joint hyperparameter sequence in the current training process;
[0028] Obtain the error function values corresponding to all joint hyperparameter sequences, determine the minimum error function value, and determine whether the minimum error function value is less than a preset threshold. If so, output the joint hyperparameter sequence corresponding to the minimum error function value, obtain the hyperparameters of the first data feature extraction model, the second data feature extraction model, and the third feature extraction model, and complete the training. Otherwise, enter the step of determining the number of training times.
[0029] Determine whether the current number of training times is greater than the maximum number of training times. If so, output the joint hyperparameter sequence corresponding to the minimum error function value, obtain the hyperparameters of the first data feature extraction model, the second data feature extraction model, and the third feature extraction model, and complete the training. Otherwise, enter the next training process.
[0030] Furthermore, according to the historical optimal value corresponding to each joint hyperparameter sequence and the global optimal value of all joint hyperparameter sequences, the joint hyperparameter sequence is updated by adopting a variable speed search and a comprehensive impact update method to obtain an updated joint hyperparameter sequence, including:
[0031] According to the historical optimal value corresponding to each joint hyperparameter sequence and the global optimal value of all joint hyperparameter sequences, the increment of searching the joint hyperparameter sequence is:
[0032]
[0033]
[0034] in, represents the j-th dimension hyperparameter in the ith joint hyperparameter sequence during the t-th training process, i=1,2,...,I, I represents the total number of joint hyperparameter sequences, j=1,2,...,J, J represents the total number of hyperparameters in the joint hyperparameter sequence, Indicates the corresponding update amount, express The increment, ω t represents the inertia weight during the t-th training process, represents the first learning factor in the t-th training process, represents the second learning factor in the t-th training process, R1 represents the first random number between (0,1), and R2 represents the second random number between (0,1). represents the j-th dimension hyperparameter in the historical optimal value corresponding to the i-th joint hyperparameter sequence, represents the j-th dimension hyperparameter in the global optimal value of all joint hyperparameter sequences;
[0035] The error function value corresponding to the original joint hyperparameter sequence and the error function value corresponding to its increment are obtained, and it is determined whether the error function value corresponding to the original joint hyperparameter sequence is greater than the error function value corresponding to its increment. If so, the update is accepted with a preset probability to obtain an updated joint hyperparameter sequence. Otherwise, the update is directly accepted to obtain an updated joint hyperparameter sequence.
[0036] Furthermore, the inertia weight ω in the t+1th training process t for:
[0037]
[0038]
[0039] Among them, ω max represents the final value of the inertia weight, ω min represents the starting value of the inertia weight, T represents the maximum number of training times, z t represents the intermediate parameter; z t-1 represents the intermediate parameters in the last training process, and z 0 is a constant between (0,1); μ represents the first influencing factor, and μ is a constant between (0,4);
[0040] The first learning factor in the tth training process for:
[0041]
[0042] in, represents the starting value of the first learning factor, represents the final value of the first learning factor;
[0043] The second learning factor in the tth training process for:
[0044]
[0045] in, represents the starting value of the first learning factor, Represents the final value of the first learning factor.
[0046] Furthermore, the global optimal value is used as a reference to guide the global search sequence to perform a global search in the solution space, and the global search sequence after the global search is obtained is:
[0047]
[0048]
[0049] ξ=(step-step*t / T)
[0050] in, represents the j-th dimension hyperparameter in the global search sequence during the t-th training process, represents the j-th dimension hyperparameter in the current global optimal value, ξ represents the intermediate parameter, represents the update amount of the global search sequence, Indicates the global search after step indicates the search step size.
[0051] Furthermore, for the re-obtained global optimal value, the distance between the global search sequence after the global search and the global optimal value is used as a key parameter, and the global optimal value is updated twice with the key parameter to obtain the global optimal value after the second update, including:
[0052] The distance between the global search sequence and the global optimal value after obtaining the global search is:
[0053]
[0054] Among them, d represents the distance, and sqrt represents a function that returns the positive square root of a number;
[0055] According to the distance between the global search sequence after the global search and the global optimal value, the second influencing factor is determined as:
[0056] σ=ae -λd
[0057] Wherein, σ represents the second influencing factor, a represents a coefficient that decreases linearly with a preset initial value, e represents a natural constant, and λ represents a constant term;
[0058] For the re-obtained global optimal value, the distance between the global search sequence after the global search and the global optimal value is used as the key parameter, and the global optimal value is updated twice with the key parameter:
[0059]
[0060]
[0061] in, represents the re-obtained global optimal value, represents the increment corresponding to the reacquired global optimal value, Indicates updated ω' represents the weight factor, represents the increment of the re-acquired global optimal value in the last training process, c1 represents the first update coefficient, c2 represents the second update coefficient, R3 represents the third random number between (0,1), and R4 represents the fourth random number between (0,1). express The corresponding historical optimal value.
[0062] In a second aspect, the present invention provides a device for predicting traumatic brain injury based on labeled data, comprising a first data acquisition module, a training data construction module, a training module, a second data acquisition module, and a prediction module;
[0063] The first data acquisition module is used to acquire historical marking data and corresponding traumatic brain injury categories, wherein the historical marking data and the corresponding traumatic brain injury categories are data stored in a database, and the marking data represents a blood marker sequence within a fixed time window;
[0064] The training data construction module is used to preprocess the historical marking data, obtain the preprocessed historical marking data, and construct training data with the preprocessed historical marking data and the corresponding traumatic brain injury category;
[0065] The training module is used to construct a first data feature extraction model, a second data feature extraction model and a third feature extraction model, and jointly train the first data feature extraction model, the second data feature extraction model and the third feature extraction model using training data to obtain the trained first data feature extraction model, the second data feature extraction model and the third feature extraction model;
[0066] The second data acquisition module is used to acquire the current marked data, and use the first data feature extraction model to extract the first data feature in the current marked data, use the second data feature extraction model to extract the second data feature in the current marked data, and use the third feature extraction model to fuse the first data feature with the second data feature to obtain a fused data feature;
[0067] The prediction module is used to identify the fused data features using a third feature extraction model to obtain a traumatic brain injury prediction result based on the labeled data.
[0068] In a third aspect, the present invention provides a traumatic brain injury prediction device based on labeled data, characterized in that it includes a memory and a processor, and the memory and the processor are interconnected via a bus.
[0069] The memory stores computer-executable instructions.
[0070] The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method for predicting traumatic brain injury based on marker data as described in the first aspect.
[0071] The present invention provides a method, device and equipment for predicting traumatic brain injury based on labeled data. By constructing a first data feature extraction model, a second data feature extraction model and a third feature extraction model, the time features and spatial features in big data are deeply analyzed to achieve accurate classification of big data, thereby achieving accurate classification of labeled data and achieving better data processing effects, so that staff can better mine data features in big data; secondly, a model training method is proposed, which has better training effects and faster training speeds than the existing gradient descent method, thereby achieving better big data feature extraction effects and ultimately achieving accurate analysis of data features. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0073] Figure 1 A flowchart of a method for predicting traumatic brain injury based on labeled data provided in an embodiment of the present invention.
[0074] Figure 2 A schematic diagram of the structure of a device for predicting traumatic brain injury based on labeled data provided by an embodiment of the present invention.
[0075] Figure 3 A schematic diagram of the structure of a traumatic brain injury prediction device based on labeled data provided by an embodiment of the present invention.
[0076] Among them, 201-first data acquisition module, 202-training data construction module, 203-training module, 204-second data acquisition module, 205-prediction module, 301-memory, 302-processor, 303-bus.
[0077] The above drawings have shown clear embodiments of the present invention, which will be described in more detail below. These drawings and text descriptions are not intended to limit the scope of the present invention in any way, but to illustrate the concept of the present invention for those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0078] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0079] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0080] like Figure 1 As shown, the present invention provides a method for predicting traumatic brain injury based on labeled data, comprising:
[0081] S101. Obtain historical marking data and corresponding traumatic brain injury categories, wherein the historical marking data and the corresponding traumatic brain injury categories are data stored in a database, and the marking data represents a blood marker sequence within a fixed time window.
[0082] The blood marker sequence within a fixed time window can represent blood marker data collected at a preset frequency within a certain time period. It is worth noting that the historical marker data and the corresponding traumatic brain injury categories are not only data stored in the database, but also data crawled from the web, or data input by human-computer interaction.
[0083] S102: preprocess the historical marking data to obtain the preprocessed historical marking data, and construct training data with the preprocessed historical marking data and corresponding traumatic brain injury categories.
[0084] During the data collection or entry process, there may be data gaps or data outliers, so these data need to be preprocessed to make the data more complete. By constructing training data through preprocessed historical labeled data and corresponding traumatic brain injury categories, the relationship between the data can be effectively extracted, and ultimately the effect of big data analysis can be improved.
[0085] S103, constructing a first data feature extraction model, a second data feature extraction model and a third feature extraction model, and jointly training the first data feature extraction model, the second data feature extraction model and the third feature extraction model using training data to obtain the trained first data feature extraction model, the second data feature extraction model and the third feature extraction model.
[0086] Optionally, the first data feature extraction model, the second data feature extraction model and the third feature extraction model can all be neural network models. The first data feature extraction model is used to obtain spatial features in the data, and the second data feature extraction model is used to obtain temporal features in the data, thereby achieving more accurate data feature extraction, and the third feature extraction model is used to comprehensively identify the features extracted by the first data feature extraction model and the second data feature extraction model, thereby achieving data recognition and classification.
[0087] S104, obtaining current marked data, and using a first data feature extraction model to extract a first data feature in the current marked data, using a second data feature extraction model to extract a second data feature in the current marked data, and using a third feature extraction model to fuse the first data feature with the second data feature to obtain a fused data feature.
[0088] Optionally, this embodiment provides a method for acquiring fused data features, including: sequentially connecting the first data feature and the second data feature to form a new sequence, and the input dimension of the third feature extraction model is the same as the dimension of the fused data feature, thereby achieving accurate classification of data.
[0089] S105. Use a third feature extraction model to identify the features of the fused data to obtain a traumatic brain injury prediction result based on the labeled data.
[0090] Compared with the prior art, the data analysis method provided by the present invention can further mine the data features in big data, thereby realizing accurate identification and classification of data, high-precision data identification, and broader application prospects.
[0091] In this embodiment, the historical marking data is preprocessed to obtain the preprocessed historical marking data, and training data is constructed with the preprocessed historical marking data and the corresponding traumatic brain injury category, including:
[0092] The preset upper and lower limits of the blood markers are obtained, and abnormal data not between the upper and lower limits are determined.
[0093] For the historical marked data, the data with a value of zero or missing is determined to obtain the missing data.
[0094] For missing data and abnormal data, the average value of the valid data before and after is used for correction to obtain the historical marked data after preprocessing. The valid data refers to other data except the abnormal data and missing data.
[0095] The preprocessed historical labeled data is used as the data source, and the traumatic brain injury category corresponding to the preprocessed historical labeled data is used as the data label to construct the training data.
[0096] It is worth noting that, in addition to the above-mentioned data preprocessing methods, other data processing methods can also be used to eliminate abnormal data, so as to further mine the data.
[0097] In this embodiment, a first data feature extraction model, a second data feature extraction model, and a third feature extraction model are constructed, including:
[0098] A first convolutional layer, a first pooling layer, a second convolutional layer, a second pooling layer, a first fully connected layer, and a second fully connected layer are constructed to obtain a first data feature extraction model. A recurrent neural network is constructed and used as a second data feature extraction model.
[0099] The first data feature extraction model can effectively extract spatial features in the data, and the recurrent neural network has memory, parameter sharing and Turing completeness, so it has certain advantages in learning the nonlinear features of the sequence. Therefore, the memory of the recurrent neural network can be used to learn the temporal features in the data, thereby achieving more comprehensive feature extraction.
[0100] A data fusion layer, an input layer, a hidden layer, and an output layer connected in sequence are constructed to obtain a third feature extraction model.
[0101] The third feature extraction model can fuse and identify data based on the first data feature and the second data feature output by the first data feature extraction model, thereby realizing data classification. The data fusion layer is used to sequentially connect the first data feature and the second data feature to form a fused data feature with both spatial and temporal features. It can be found that the third feature extraction model mainly extracts features from the input data and performs classification output based on the extracted features. Therefore, the third feature extraction model can be set as a classification neural network. For example: BP (Back Propagation) neural network.
[0102] In this embodiment, the first data feature extraction model, the second data feature extraction model, and the third feature extraction model are jointly trained using training data to obtain the trained first data feature extraction model, the second data feature extraction model, and the third feature extraction model, including:
[0103] Initialize the hyperparameters of the first data feature extraction model, the hyperparameters of the second data feature extraction model, and the hyperparameters of the third feature extraction model to obtain a joint hyperparameter sequence, and repeatedly obtain multiple different joint hyperparameter sequences, in which the hyperparameters of the first data feature extraction model, the hyperparameters of the second data feature extraction model, and the hyperparameters of the third feature extraction model are arranged in sequence. It is worth noting that the main training parameters in this embodiment are weights and bias parameters, thereby improving the data recognition effect.
[0104] The preprocessed historical marked data in the training data is used as the input data of the first data feature extraction model and the input data of the second data feature extraction model, respectively, to obtain the first data feature and the second data feature. The first data feature and the second data feature are input into the third feature extraction model to obtain the actual output corresponding to the historical marked data output by the third feature extraction model. According to the actual output corresponding to the historical marked data and the corresponding data label, the loss function value of the joint hyperparameter sequence in the joint training is obtained.
[0105] In this embodiment, the loss function may be set as a root mean square error function, so as to realize the recognition of the training effect. It is worth noting that in addition to using the root mean square error function to obtain the loss function value, other error functions may also be used as the loss function.
[0106] In order to ensure the trained first data feature extraction model, the second data feature extraction model and the third feature extraction model, neural network indicators (such as accuracy, recall rate, etc.) can also be obtained. If an indicator does not meet the preset conditions, it can be retrained.
[0107] In each training process, after obtaining the loss function value, the historical optimal value corresponding to each joint hyperparameter sequence and the global optimal value of all joint hyperparameter sequences are determined.
[0108] According to the historical optimal value corresponding to each joint hyperparameter sequence and the global optimal value of all joint hyperparameter sequences, the joint hyperparameter sequence is updated by adopting the method of variable speed search and comprehensive influence update to obtain the updated joint hyperparameter sequence.
[0109] By updating the combined influence of historical optimal values and global optimal values, the joint hyperparameter sequence can always move in a better direction, thereby achieving the search for a better position.
[0110] Based on the updated joint hyperparameter sequence, the historical optimal value corresponding to each joint hyperparameter sequence and the global optimal value in all joint hyperparameter sequences are re-determined, and a global search sequence is randomly determined from the joint hyperparameter sequence of non-global optimal values.
[0111] Although the variable speed search and comprehensive influence update method can achieve the optimization of the joint hyperparameter sequence to a certain extent, it still has the same defect as the gradient descent method, that is, it is easy to fall into the local optimum. Therefore, this embodiment determines a global search sequence. By searching the global search sequence, it is possible to jump out of the local optimum and achieve global optimization.
[0112] The global optimal value is used as a reference to guide the global search sequence to perform a global search in the solution space, and the global search sequence after the global search is obtained. For the re-obtained global optimal value, the distance between the global search sequence after the global search and the global optimal value is used as a key parameter, and the global optimal value is updated twice with the key parameter to obtain the global optimal value after the second update.
[0113] Re-obtain the updated joint hyperparameter sequence, the global search sequence after the global search, and the error function value of the global optimal value after the second update, take out multiple sequences with the largest error function values according to a preset number, obtain multiple target hyperparameter sequences, and mutate the target hyperparameter sequence to obtain the mutated target hyperparameter sequence, thereby completing the update of the joint hyperparameter sequence in the current training process.
[0114] When the sequence with the largest error function value in the joint hyperparameter sequence is a useless sequence, it may affect the training process. Therefore, mutation processing is used to improve the diversity of all sequences and change the search range, so that the global optimal joint hyperparameter sequence can be searched faster.
[0115] Optionally, this embodiment provides another method for obtaining a target hyperparameter sequence, including: when the error function value of a certain joint hyperparameter sequence does not decrease in a preset number of training times, it can be determined that the joint hyperparameter sequence is a target hyperparameter sequence.
[0116] Obtain the error function values corresponding to all joint hyperparameter sequences, and determine the minimum error function value, and judge whether the minimum error function value is less than the preset threshold. If so, output the joint hyperparameter sequence corresponding to the minimum error function value, obtain the hyperparameters of the first data feature extraction model, the second data feature extraction model, and the third feature extraction model, and complete the training. Otherwise, enter the step of judging the number of training times.
[0117] Determine whether the current number of training times is greater than the maximum number of training times. If so, output the joint hyperparameter sequence corresponding to the minimum error function value, obtain the hyperparameters of the first data feature extraction model, the second data feature extraction model, and the third feature extraction model, and complete the training. Otherwise, enter the next training process.
[0118] In this embodiment, according to the historical optimal value corresponding to each joint hyperparameter sequence and the global optimal value of all joint hyperparameter sequences, the joint hyperparameter sequence is updated by adopting the variable speed search and comprehensive influence update method to obtain the updated joint hyperparameter sequence, including:
[0119] According to the historical optimal value corresponding to each joint hyperparameter sequence and the global optimal value of all joint hyperparameter sequences, the increment of searching the joint hyperparameter sequence is:
[0120]
[0121]
[0122] in, represents the j-th dimension hyperparameter in the ith joint hyperparameter sequence during the t-th training process, i=1,2,...,I, I represents the total number of joint hyperparameter sequences, j=1,2,...,J, J represents the total number of hyperparameters in the joint hyperparameter sequence, Indicates the corresponding update amount, express The increment, ω t represents the inertia weight during the t-th training process, represents the first learning factor in the t-th training process, represents the second learning factor in the t-th training process, R1 represents the first random number between (0,1), and R2 represents the second random number between (0,1). represents the j-th dimension hyperparameter in the historical optimal value corresponding to the i-th joint hyperparameter sequence, represents the j-th dimension hyperparameter in the global optimal value of all joint hyperparameter sequences.
[0123] The error function value corresponding to the original joint hyperparameter sequence and the error function value corresponding to its increment are obtained, and it is determined whether the error function value corresponding to the original joint hyperparameter sequence is greater than the error function value corresponding to its increment. If so, the update is accepted with a preset probability to obtain an updated joint hyperparameter sequence. Otherwise, the update is directly accepted to obtain an updated joint hyperparameter sequence.
[0124] In this embodiment, the inertia weight ω in the t+1th training process t for:
[0125]
[0126]
[0127] Among them, ω max represents the final value of the inertia weight, ωmin represents the starting value of the inertia weight, T represents the maximum number of training times, z t Indicates the intermediate parameter. t-1 represents the intermediate parameters in the last training process, and z 0 is a constant between (0,1). μ represents the first impact factor, and μ is a constant between (0,4).
[0128] The inertia weight provided in this embodiment has strong randomness and volatility. Introducing the oscillating cascade chaotic inertia weight into the incremental term of the algorithm can increase diversity, help escape from local extreme values, and accelerate the convergence speed of the algorithm.
[0129] The first learning factor in the tth training process for:
[0130]
[0131] in, represents the starting value of the first learning factor (which can be set to 2.5 in this embodiment), Indicates the final value of the first learning factor (in this embodiment, it can be set to 0.5).
[0132] The second learning factor in the tth training process for:
[0133]
[0134] in, represents the starting value of the first learning factor (which can be set to 0.5 in this embodiment), Indicates the final value of the first learning factor (in this embodiment, it can be set to 2.5).
[0135] In this embodiment, the first learning factor gradually decreases, while the second learning factor Gradually increasing it can enable the algorithm to search in a wider range in the early stage of training, and in the later stage of the algorithm, it tends to be more refined and improves the search accuracy.
[0136] In this embodiment, the global optimal value is used as a reference to guide the global search sequence to perform a global search in the solution space, and the global search sequence after the global search is obtained is:
[0137]
[0138]
[0139] ξ=(step-step*t / T)
[0140] in, represents the j-th dimension hyperparameter in the global search sequence during the t-th training process, represents the j-th dimension hyperparameter in the current global optimal value, ξ represents the intermediate parameter, represents the update amount of the global search sequence, Indicates the global search after step indicates the search step size.
[0141] This global search can force the global search sequence away from the global optimum in the early stage of the algorithm, so that the global search can be realized, while reducing the influence of the global optimum in the later stage of the algorithm, thus facilitating the search for a better solution.
[0142] In this embodiment, for the re-obtained global optimal value, the distance between the global search sequence after the global search and the global optimal value is used as a key parameter, and the global optimal value is updated twice with the key parameter to obtain the global optimal value after the second update, including:
[0143] The distance between the global search sequence and the global optimal value after obtaining the global search is:
[0144]
[0145] Among them, d represents the distance, and sqrt represents a function that returns the positive square root of a number.
[0146] According to the distance between the global search sequence after the global search and the global optimal value, the second influencing factor is determined as:
[0147] σ=ae -λd
[0148] Among them, σ represents the second influencing factor, a represents a coefficient that decreases linearly with a preset initial value (such as there is a starting value and an end value, and it decreases linearly between the two), e represents a natural constant, and λ represents a constant term.
[0149] For the re-obtained global optimal value, the distance between the global search sequence after the global search and the global optimal value is used as the key parameter, and the global optimal value is updated twice with the key parameter:
[0150]
[0151]
[0152] in, represents the re-obtained global optimal value, represents the increment corresponding to the reacquired global optimal value, Indicates updated ω' represents the weight factor. Represents the increment of the re-acquired global optimal value in the last training process. If If only one update was performed during the last training, then this is the increment for that update. If a second update was performed during the last training, then this is the increment during the second update. c1 represents the first update coefficient, c2 represents the second update coefficient, R3 represents the third random number between (0,1), and R4 represents the fourth random number between (0,1). express The corresponding historical optimal value.
[0153] The use of a linearly decreasing second impact factor can reduce the influence of the later global search sequence on the global optimal value, thereby improving the search accuracy of the algorithm in the later stage and ultimately achieving the acquisition of the global optimal solution.
[0154] Optionally, a probability may be set, and based on the probability, a roulette wheel method is used to determine whether the global optimal value needs to be updated. If so, the above method is used to update it, otherwise the global optimal value is not updated.
[0155] Example 2
[0156] like Figure 2 As shown, the present invention provides a traumatic brain injury prediction device based on labeled data, including a first data acquisition module 201, a training data construction module 202, a training module 203, a second data acquisition module 204 and a prediction module 205.
[0157] The first data acquisition module 201 is used to acquire historical marking data and corresponding traumatic brain injury categories, wherein the historical marking data and the corresponding traumatic brain injury categories are data stored in a database, and the marking data represents a blood marker sequence within a fixed time window.
[0158] The training data construction module 202 is used to preprocess the historical marking data, obtain the preprocessed historical marking data, and construct training data with the preprocessed historical marking data and the corresponding traumatic brain injury category.
[0159] The training module 203 is used to construct a first data feature extraction model, a second data feature extraction model and a third feature extraction model, and use training data to jointly train the first data feature extraction model, the second data feature extraction model and the third feature extraction model to obtain the trained first data feature extraction model, the second data feature extraction model and the third feature extraction model.
[0160] The second data acquisition module 204 is used to acquire the current marked data, and use the first data feature extraction model to extract the first data feature in the current marked data, use the second data feature extraction model to extract the second data feature in the current marked data, and use the third feature extraction model to fuse the first data feature with the second data feature to obtain a fused data feature.
[0161] The prediction module 205 is used to identify the fused data features using the third feature extraction model to obtain a traumatic brain injury prediction result based on the labeled data.
[0162] The traumatic brain injury prediction device based on labeled data provided in this embodiment can execute the method and technical solution described in claim 1, and its beneficial effects and principles are similar and will not be repeated here.
[0163] Example 3
[0164] like Figure 3 As shown, this embodiment provides a device for predicting traumatic brain injury based on labeled data, including a memory 301 and a processor 302 , and the memory 301 and the processor 302 are interconnected via a bus 303 .
[0165] Memory 301 stores computer-executable instructions.
[0166] The processor 302 executes the computer-executable instructions stored in the memory, so that the processor performs a method for predicting traumatic brain injury based on labeled data as described in Example 1.
[0167] For example, the memory may include, but is not limited to, random access memory (RAM), read only memory (ROM), flash memory, first input first output (FIFO) and / or first in last out (FILO) memory, etc. Specifically, the processor may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). At the same time, the processor may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit). The coprocessor is a low-power processor for processing data in the standby state.
[0168] Example 4
[0169] This embodiment provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement a traumatic brain injury prediction method based on labeled data as described in Example 1.
[0170] Example 5
[0171] This embodiment provides a computer program product, including a computer program. When the computer program is executed by a processor, the method for predicting traumatic brain injury based on labeled data as described in Example 1 is implemented.
[0172] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
[0173] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for predicting traumatic brain injury based on labeled data, characterized in that: include: Acquire historical marking data and corresponding traumatic brain injury categories, wherein the historical marking data and the corresponding traumatic brain injury categories are data stored in a database, and the marking data represents a blood marker sequence within a fixed time window; Preprocessing the historical marked data to obtain the preprocessed historical marked data, and constructing training data with the preprocessed historical marked data and the corresponding traumatic brain injury category; Constructing a first data feature extraction model, a second data feature extraction model, and a third feature extraction model, and jointly training the first data feature extraction model, the second data feature extraction model, and the third feature extraction model using training data to obtain the trained first data feature extraction model, the second data feature extraction model, and the third feature extraction model; Acquire current labeled data, and use a first data feature extraction model to extract a first data feature in the current labeled data, use a second data feature extraction model to extract a second data feature in the current labeled data, and use a third feature extraction model to fuse the first data feature with the second data feature to obtain a fused data feature; A third feature extraction model is used to identify the features of the fused data to obtain prediction results of traumatic brain injury based on the labeled data; Preprocessing the historical marked data to obtain the preprocessed historical marked data, and constructing training data with the preprocessed historical marked data and the corresponding traumatic brain injury category, including: Obtaining the preset upper and lower limits of the blood markers, and determining abnormal data that is not between the upper and lower limits; For historical marked data, determine data with a value of zero or missing to obtain missing data; For missing data and abnormal data, the average value of the valid data adjacent to the previous and next data is used for correction to obtain the historical marked data after preprocessing; the valid data refers to other data except the abnormal data and the missing data; The preprocessed historical labeled data is used as a data source, and the traumatic brain injury category corresponding to the preprocessed historical labeled data is used as a data label to construct training data; Constructing a first data feature extraction model, a second data feature extraction model, and a third feature extraction model, including: Constructing a first convolutional layer, a first pooling layer, a second convolutional layer, a second pooling layer, a first fully connected layer, and a second fully connected layer that are connected in sequence to obtain a first data feature extraction model; Construct a recurrent neural network and use the recurrent neural network as a second data feature extraction model; Constructing a data fusion layer, an input layer, a hidden layer, and an output layer connected in sequence to obtain a third feature extraction model; The first data feature extraction model, the second data feature extraction model, and the third feature extraction model are jointly trained using the training data to obtain the trained first data feature extraction model, the second data feature extraction model, and the third feature extraction model, including: Initializing hyperparameters of the first data feature extraction model, hyperparameters of the second data feature extraction model, and hyperparameters of the third feature extraction model to obtain a joint hyperparameter sequence, and repeatedly obtaining a plurality of different joint hyperparameter sequences, in which the hyperparameters of the first data feature extraction model, the hyperparameters of the second data feature extraction model, and the hyperparameters of the third feature extraction model are arranged in sequence; The preprocessed historical marking data in the training data is used as the input data of the first data feature extraction model and the input data of the second data feature extraction model, respectively, to obtain the first data feature and the second data feature; and the first data feature and the second data feature are input into the third feature extraction model to obtain the actual output corresponding to the historical marking data output by the third feature extraction model; According to the actual output corresponding to the historical marked data and the corresponding data label, the loss function value of the joint hyperparameter sequence in the joint training is obtained; in each training process, after obtaining the loss function value, the historical optimal value corresponding to each joint hyperparameter sequence and the global optimal value of all joint hyperparameter sequences are determined; According to the historical optimal value corresponding to each joint hyperparameter sequence and the global optimal value of all joint hyperparameter sequences, the joint hyperparameter sequence is updated by adopting the variable speed search and comprehensive influence update method to obtain the updated joint hyperparameter sequence; Based on the updated joint hyperparameter sequence, the historical optimal value corresponding to each joint hyperparameter sequence and the global optimal value among all joint hyperparameter sequences are re-determined, and a global search sequence is randomly determined from the joint hyperparameter sequence of non-global optimal values; The global optimal value is used as a reference to guide the global search sequence to perform a global search in the solution space, and a global search sequence after the global search is obtained; for the re-obtained global optimal value, the distance between the global search sequence after the global search and the global optimal value is used as a key parameter, and the global optimal value is updated twice with the key parameter to obtain the global optimal value after the second update; Re-obtain the updated joint hyperparameter sequence, the global search sequence after the global search, and the error function value of the global optimal value after the second update, take out multiple sequences with the largest error function values according to a preset number, obtain multiple target hyperparameter sequences, and mutate the target hyperparameter sequences to obtain the mutated target hyperparameter sequences, thereby completing the update of the joint hyperparameter sequence in the current training process; Obtain the error function values corresponding to all joint hyperparameter sequences, determine the minimum error function value, and determine whether the minimum error function value is less than a preset threshold. If so, output the joint hyperparameter sequence corresponding to the minimum error function value, obtain the hyperparameters of the first data feature extraction model, the second data feature extraction model, and the third feature extraction model, and complete the training. Otherwise, enter the step of determining the number of training times. Determine whether the current number of training times is greater than the maximum number of training times. If so, output the joint hyperparameter sequence corresponding to the minimum error function value, obtain the hyperparameters of the first data feature extraction model, the second data feature extraction model, and the third feature extraction model, and complete the training. Otherwise, enter the next training process. According to the historical optimal value corresponding to each joint hyperparameter sequence and the global optimal value of all joint hyperparameter sequences, the joint hyperparameter sequence is updated by using a variable speed search and a comprehensive impact update method to obtain an updated joint hyperparameter sequence, including: According to the historical optimal value corresponding to each joint hyperparameter sequence and the global optimal value of all joint hyperparameter sequences, the increment of searching the joint hyperparameter sequence is: in, represents the j-th dimension hyperparameter in the ith joint hyperparameter sequence during the t-th training process, i=1,2,...,I, I represents the total number of joint hyperparameter sequences, j=1,2,...,J, J represents the total number of hyperparameters in the joint hyperparameter sequence, Indicates the corresponding update amount, express The increment, ω t represents the inertia weight during the t-th training process, represents the first learning factor in the t-th training process, represents the second learning factor in the t-th training process, R1 represents the first random number between (0,1), and R2 represents the second random number between (0,1). represents the j-th dimension hyperparameter in the historical optimal value corresponding to the i-th joint hyperparameter sequence, represents the j-th dimension hyperparameter in the global optimal value of all joint hyperparameter sequences; Obtain the error function value corresponding to the original joint hyperparameter sequence and the error function value corresponding to its increment, and determine whether the error function value corresponding to the original joint hyperparameter sequence is greater than the error function value corresponding to its increment. If so, accept the update with a preset probability to obtain an updated joint hyperparameter sequence. Otherwise, directly accept the update to obtain an updated joint hyperparameter sequence. Inertia weight ω during the t+1th training process t for: Among them, ω max represents the final value of the inertia weight, ω min represents the starting value of the inertia weight, T represents the maximum number of training times, z t represents the intermediate parameter; z t-1 represents the intermediate parameters in the last training process, and z 0 is a constant between (0,1); μ represents the first influencing factor, and μ is a constant between (0,4); The first learning factor in the tth training process for: in, represents the starting value of the first learning factor, represents the final value of the first learning factor; The second learning factor in the tth training process for: in, represents the starting value of the first learning factor, represents the final value of the first learning factor; Using the global optimal value as a reference, the global search sequence is guided to perform a global search in the solution space. The global search sequence after the global search is obtained is: ξ=(step-step*t / T) in, represents the j-th dimension hyperparameter in the global search sequence during the t-th training process, represents the j-th dimension hyperparameter in the current global optimal value, ξ represents the intermediate parameter, represents the update amount of the global search sequence, Indicates the global search after step represents the search step length; For the re-obtained global optimal value, the distance between the global search sequence after the global search and the global optimal value is used as the key parameter, and the global optimal value is updated twice with the key parameter to obtain the global optimal value after the second update, including: The distance between the global search sequence and the global optimal value after obtaining the global search is: Among them, d represents the distance, and sqrt represents a function that returns the positive square root of a number; According to the distance between the global search sequence after the global search and the global optimal value, the second influencing factor is determined as: σ=ae -λd Wherein, σ represents the second influencing factor, a represents a coefficient that decreases linearly with a preset initial value, e represents a natural constant, and λ represents a constant term; For the re-obtained global optimal value, the distance between the global search sequence after the global search and the global optimal value is used as the key parameter, and the global optimal value is updated twice with the key parameter: in, represents the re-obtained global optimal value, represents the increment corresponding to the reacquired global optimal value, Indicates updated ω' represents the weight factor, represents the increment of the re-acquired global optimal value in the last training process, c1 represents the first update coefficient, c2 represents the second update coefficient, R3 represents the third random number between (0,1), and R4 represents the fourth random number between (0,1). express The corresponding historical optimal value.
2. A traumatic brain injury prediction device based on labeled data, the traumatic brain injury prediction device is used to execute the traumatic brain injury prediction method based on labeled data according to claim 1, characterized in that: It includes a first data acquisition module, a training data construction module, a training module, a second data acquisition module and a prediction module; The first data acquisition module is used to acquire historical marking data and corresponding traumatic brain injury categories, wherein the historical marking data and the corresponding traumatic brain injury categories are data stored in a database, and the marking data represents a blood marker sequence within a fixed time window; The training data construction module is used to preprocess the historical marking data, obtain the preprocessed historical marking data, and construct training data with the preprocessed historical marking data and the corresponding traumatic brain injury category; The training module is used to construct a first data feature extraction model, a second data feature extraction model and a third feature extraction model, and jointly train the first data feature extraction model, the second data feature extraction model and the third feature extraction model using training data to obtain the trained first data feature extraction model, the second data feature extraction model and the third feature extraction model; The second data acquisition module is used to acquire the current marked data, and use the first data feature extraction model to extract the first data feature in the current marked data, use the second data feature extraction model to extract the second data feature in the current marked data, and use the third feature extraction model to fuse the first data feature with the second data feature to obtain a fused data feature; The prediction module is used to identify the fused data features using a third feature extraction model to obtain a traumatic brain injury prediction result based on the labeled data.
3. A traumatic brain injury prediction device based on labeled data, characterized in that: It includes a memory and a processor, and the memory and the processor are connected to each other through a bus. Memory stores computer-executable instructions. The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method for predicting traumatic brain injury based on marker data as claimed in claim 1.
Citation Information
Patent Citations
Training method and device of power load prediction model and power load prediction method
CN115293326A
