Blood drug concentration monitoring system based on machine learning
Through data preprocessing and model design, the accuracy and adaptability of the blood drug concentration monitoring system are improved, the problems of data quality, dynamics and tuning efficiency of the traditional model are solved, and higher prediction accuracy and parameter optimization are achieved.
Patent Information
- Application Number
- CN202410980723.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-22
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-07-22
AI Technical Summary
Traditional blood drug concentration prediction models have poor data quality, difficulty in coping with the dynamics and complexity of blood drug concentration data, and low efficiency of parameter tuning algorithms, resulting in low model accuracy and generalization ability, as well as poor expression ability and adaptability.
Through data correction, data encoding, data normalization and balancing, we design auxiliary prediction module, enhanced activation function, bidirectional memory unit layer, attention layer, prediction layer, loss function, gradient clipping, steady trial search function, distance control factor and Integrate evolutionary search functions to improve data quality and model prediction accuracy and adaptability, and improve parameter tuning efficiency and global search capabilities.
It improves the model accuracy and generalization ability of the blood drug concentration monitoring system, improves the ability to process the dynamics and complexity of blood drug concentration data, enhances parameter tuning efficiency, avoids local optimal solutions, and improves prediction accuracy and adaptability.
Smart Images

Figure CN118522468B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of medical monitoring technology, and in particular to a blood drug concentration monitoring system based on machine learning. Background Art
[0002] The blood drug concentration monitoring system based on machine learning is based on machine learning technology, combined with data processing technology to process and analyze a large amount of blood drug concentration and its related data, build a blood drug concentration prediction model, identify the relationship between drug concentration and various factors, and thus achieve real-time monitoring of blood drug concentration. However, the traditional blood drug concentration prediction model has problems with low model accuracy and generalization ability due to poor data quality; the traditional blood drug concentration prediction model has problems with difficulty in dealing with the dynamics and complexity of blood drug concentration data, low model accuracy, poor expression ability and adaptability; the traditional blood drug concentration prediction model has problems with low tuning efficiency of parameter tuning algorithms, weak global search capabilities and improper selection of model parameters, resulting in low model generalization ability and low prediction accuracy. Summary of the invention
[0003] In view of the above situation, in order to overcome the defects of the prior art, the present invention provides a blood drug concentration monitoring system based on machine learning. In view of the problems of low model accuracy and generalization ability caused by poor data quality in traditional blood drug concentration prediction models, this solution improves the quality and accuracy of data through data correction, data encoding, data normalization and data balance, reduces the impact of data errors on subsequent model learning, and improves the accuracy and generalization ability of the model; in view of the problems that traditional blood drug concentration prediction models are difficult to cope with the dynamics and complexity of blood drug concentration data, and have low model accuracy, poor expression ability and adaptability, this solution designs auxiliary prediction modules, designs enhanced activation functions, designs bidirectional memory unit layers, designs attention layers, and designs auxiliary prediction fusion layers. , design prediction layer, design loss function, gradient clipping and model training, to better cope with the dynamics and complexity of blood drug concentration data, improve the prediction accuracy of the model, and improve the expressiveness and adaptability; In view of the problems of low tuning efficiency of parameter tuning algorithm, weak global search ability and improper selection of model parameters in traditional blood drug concentration prediction model, which lead to low generalization ability and prediction accuracy of the model, this scheme designs steady trial search function, distance control factor, distance control search function and fusion evolution search function to search for optimal parameters more specifically, improve tuning efficiency, improve the global search ability of the algorithm, and be able to explore the parameter space more comprehensively, increase the possibility of finding the optimal parameters, and avoid falling into local optimal solutions; improve the generalization ability and prediction accuracy of the model.
[0004] The technical solution adopted by the present invention is as follows: the blood drug concentration monitoring system based on machine learning provided by the present invention includes a data acquisition module, a data preprocessing module, a blood drug concentration prediction model establishment module, a blood drug concentration prediction model tuning module, and a blood drug concentration monitoring module;
[0005] The data acquisition module collects patient information, medication information, time information, clinical indicators, treatment plans, historical medication data, behavioral habit data, and blood drug concentration data; the patient information includes age, gender, height, and weight; the medication information includes drug name, dosage, and medication time; the clinical indicators include the patient's heart rate, blood pressure, body temperature, respiratory rate, and biochemical indicators; the treatment plan is other treatment methods that the patient is currently receiving, which is used to determine whether it will affect drug metabolism; the historical medication data is used to analyze the cumulative effects of drugs; the behavioral habit data includes eating habits, smoking and drinking habits, exercise habits, and sleeping habits.
[0006] The data preprocessing module performs data correction, data encoding, data normalization and data balancing, specifically including the following contents:
[0007] Data correction: Correct the collected numerical data and identify abnormal data, including incomplete data, duplicate data, and erroneous data; delete duplicate data, fill missing data with the mean, and replace abnormal data;
[0008] Data coding: Data coding is performed for feature data with a limited number of mutually exclusive categories. The orderliness of the feature data is analyzed to evaluate the coding cardinality and perform data coding.
[0009] Data normalization, for feature data with dimensional differences, data normalization is performed, as follows:
[0010] ;
[0011] in, Represents the original value of the feature data, represents the normalized value of the feature, represents the standard deviation of the feature data, H represents the mean of the feature data, represents the maximum value in the feature data, Indicates the minimum value in the feature data;
[0012] Data balancing, generating new samples in the minority feature data group to balance the majority feature data group, expressed as follows:
[0013] ;
[0014] in, Represents the new data generated, represents the original data in a small number of feature data groups, r1 represents a random number between 0 and 1, Represents the average value of the original data in a small number of feature data groups;
[0015] Set label data and set the blood drug concentration data as label data.
[0016] Furthermore, the blood drug concentration prediction model module is constructed by constructing a model infrastructure, designing an auxiliary prediction module, designing an enhanced activation function, designing a bidirectional memory unit layer, designing an attention layer, designing an auxiliary prediction fusion layer, designing a prediction layer, designing a loss function, gradient clipping and model training to establish a blood drug concentration prediction model, which specifically includes the following contents:
[0017] Build the model infrastructure, which includes input layer, auxiliary prediction module, bidirectional memory unit layer, temporal attention layer, auxiliary prediction fusion layer and prediction layer;
[0018] An auxiliary prediction module is designed to obtain the blood drug concentration at different times by analyzing the elimination rate of blood drug concentration, which is used to assist the prediction of the final model, as shown below:
[0019] ;
[0020] Where j represents the time step, represents the auxiliary predicted blood drug concentration at time step j, represents the initial blood drug concentration, e represents the natural constant, is the attenuation factor;
[0021] Design an enhanced activation function, expressed as follows:
[0022] ;
[0023] in, represents the enhanced activation function, represents the input of the enhanced activation function, and represents the adjustment factor, tanh(·) represents the hyperbolic tangent function;
[0024] Design memory units, including input gates, forget gates, output gates and memory cells; the three gate structures use enhanced activation functions to perform mapping activation processing, and take absolute values of the processed results; the input gate controls the amount of data added to the cell state, the forget gate controls the degree of information forgetting, and the output gate controls the intensity and range of output information;
[0025] Design a bidirectional memory layer, which includes a forward memory layer and a backward memory layer. A forward memory layer processes data from the beginning to the end of the sequence, and another backward memory layer processes data from the end to the beginning of the sequence, capturing both past and future information. The final output is the concatenation of the forward and backward memory layers.
[0026] Design the attention layer and introduce the temporal attention mechanism to capture the dependencies between different time points by assigning different weights to each time step. Specifically, it includes the following:
[0027] Calculate the temporal attention score, expressed as follows:
[0028] ;
[0029] in, represents the temporal attention score function, p represents the temporal information vector, represents the weight of the hidden state, represents the hidden state, q represents the query vector, represents the query weight, represents the time fraction bias, T represents the transposed sign;
[0030] Calculate the temporal attention weight, expressed as follows:
[0031] ;
[0032] in, represents the temporal attention weight function, which is used to measure the importance of each time step;
[0033] Aggregate the output, add attention weights to the hidden state, and then aggregate the output, which is expressed as follows:
[0034] ;
[0035] in, represents the output of the attention layer with temporal attention weights;
[0036] An auxiliary prediction fusion layer is designed to fuse the output results of the memory unit with the added temporal attention mechanism and the output results of the auxiliary prediction module to jointly predict the final blood drug concentration, as shown below:
[0037] ;
[0038] in, represents the output of the auxiliary prediction fusion layer, and Represent the weight and bias of the auxiliary prediction fusion layer, represents the prediction fusion operation;
[0039] Design the prediction layer, expressed as follows:
[0040] ;
[0041] in, represents the predicted value of blood concentration at time step j, represents the input of the prediction layer, represents the weight of the prediction layer, Represents the bias of the prediction layer;
[0042] The loss function is designed to consider the contribution of the model prediction results and the auxiliary prediction module, which is expressed as follows:
[0043] ;
[0044] Among them, Loss represents the loss function, N represents the maximum number of samples, and n represents the index of the sample. represents the model prediction value for the nth sample, represents the actual value of the nth sample, Represents the auxiliary prediction value for the nth sample;
[0045] Gradient clipping is expressed as follows:
[0046] ;
[0047] in, represents the gradient of the clipped loss function with respect to the weight and bias parameters of the model, represents the gradient of the original loss function with respect to the weight and bias parameters of the model, max(·) represents the maximum value, represents the L2 norm of the original loss function, and Clin represents the clipping factor;
[0048] Model training is represented as follows:
[0049] ;
[0050] Where f represents the number of model training times, represents the weight and bias parameters of the model during the f+1th model training. represents the weight and bias parameters of the model during the f-th model training. Represents the learning rate.
[0051] Furthermore, the blood drug concentration prediction model tuning module tunes the blood drug concentration prediction model by designing a steady trial search function, designing a distance control factor, designing a distance control search function, and designing a fusion evolution search function, specifically including the following contents:
[0052] Tuning preparation: create a tuning search space, set the tuning effect evaluation index, set the accuracy of the blood drug concentration prediction model as the tuning effect evaluation index, set the threshold of the tuning effect, create the initial cluster for parameter search, and set the maximum number of search iterations;
[0053] Design a steady heuristic search function to perform steady exploration based on the previous search, as shown below:
[0054] ;
[0055] Among them, t represents the current search iteration number, represents the parameter position searched by the steady heuristic search function during the t+1th parameter search, r2 and r3 represent random numbers between 0 and 1, It indicates the parameter position searched by the steady heuristic search function during the tth parameter search. represents the maximum number of search iterations, ld represents the lower limit of the search space, and lu represents the upper limit of the search space;
[0056] Design distance control factor, expressed as follows:
[0057] ;
[0058] in, represents the distance control factor, It means square root. means taking the logarithm, and |·| means taking the absolute value;
[0059] Design the distance control search function, which is expressed as follows:
[0060] ;
[0061] in, It represents the parameter position searched by the distance control search function in the t+1th parameter search. It represents the parameter position searched by the distance control search function in the tth parameter search. r4 and r5 represent random numbers between 0 and 1. represents the current optimal parameter position, Represents the parameter position searched by the distance control search function during the t-1th parameter search;
[0062] Design the fusion evolution search function, which is expressed as follows:
[0063] ;
[0064] in, It indicates the parameter position searched by the fusion evolution search function in the t+1th parameter search. represents the error correction factor, which is a number between -3 and 2.6;
[0065] Tuning search, evaluate the initial tuning effect value of the position of the initial search cluster, and select the position with the largest tuning effect value as the current optimal parameter position; then, for the initial search cluster, perform parameter optimization search of steady trial search function, distance control search function and fusion evolution search function in turn, evaluate the optimization effect of the parameter positions searched three times, update the current optimal parameter position, and increase the number of iterations by one; if there are parameter points with tuning effect values greater than the tuning effect threshold in the point clusters obtained by the three parameter searches, then output the parameters of the current optimal parameter position as the optimal parameters to complete the tuning search; if the search number has reached the maximum search iteration number, search again; otherwise, perform the next round of iterative search.
[0066] Furthermore, the blood drug concentration monitoring module generates an electronic simulation individual of the patient, sets basic information for the electronic simulation individual, and synchronously updates the medication information, time information, clinical indicators, treatment plan, historical medication data and behavioral habit data of the electronic simulation individual, and inputs the latest electronic simulation individual information into the established blood drug concentration prediction model. The model predicts the blood drug concentration level that the electronic simulation individual will reach, and displays the patient's blood drug concentration value to the user, so that the user can clearly understand the patient's real-time blood drug concentration status and medication risks, and at the same time, performs real-time monitoring and alarm for abnormal blood drug concentrations; and generates corresponding monitoring logs; and continuously optimizes and updates the model in combination with prediction results and feedback data.
[0067] The beneficial effects achieved by the present invention using the above scheme are as follows:
[0068] (1) In order to address the problems of low model accuracy and generalization ability in traditional blood drug concentration prediction models due to poor data quality, this solution improves data quality and accuracy through data correction, data encoding, data normalization and data balancing, reduces the impact of data errors on subsequent model learning, and improves model accuracy and generalization ability.
[0069] (2) In view of the fact that traditional blood drug concentration prediction models are difficult to cope with the dynamics and complexity of blood drug concentration data, and have low model accuracy, poor expression ability and adaptability, this solution designs auxiliary prediction modules, enhanced activation functions, bidirectional memory unit layers, attention layers, auxiliary prediction fusion layers, prediction layers, loss functions, gradient clipping and model training to better cope with the dynamics and complexity of blood drug concentration data, improve the prediction accuracy of the model, and improve its expression ability and adaptability.
[0070] (3) In view of the problems of low tuning efficiency of parameter tuning algorithm, weak global search ability and improper selection of model parameters in traditional blood drug concentration prediction models, which lead to low generalization ability and prediction accuracy of the model, this scheme searches for optimal parameters in a more targeted manner by designing steady trial search functions, distance control factors, distance control search functions and fusion evolution search functions, improves the tuning efficiency, improves the global search ability of the algorithm, and can explore the parameter space more comprehensively, thereby increasing the possibility of finding the optimal parameters and avoiding falling into the local optimal solution; thus improving the generalization ability and prediction accuracy of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] Figure 1 A schematic diagram of a blood drug concentration monitoring system based on machine learning provided by the present invention;
[0072] Figure 2 It is a schematic diagram of the data preprocessing module;
[0073] Figure 3 A schematic diagram of a module for establishing a blood drug concentration prediction model;
[0074] Figure 4 Schematic diagram of the blood drug concentration prediction model tuning module.
[0075] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention. DETAILED DESCRIPTION
[0076] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0077] In the description of the present invention, it should be understood that terms such as “upper”, “lower”, “front”, “back”, “left”, “right”, “top”, “bottom”, “inside” and “outside” indicating directions or positional relationships are based on the directions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore should not be understood as limiting the present invention.
[0078] Example 1, see Figure 1 The blood drug concentration monitoring system based on machine learning provided by the present invention includes a data acquisition module, a data preprocessing module, a blood drug concentration prediction model establishment module, a blood drug concentration prediction model tuning module, and a blood drug concentration monitoring module;
[0079] The data collection module collects patient information, medication information, time information, clinical indicators, treatment plans, historical medication data, behavioral habit data, and blood drug concentration data;
[0080] The data preprocessing module performs data correction, data encoding, data normalization and data balancing;
[0081] The blood drug concentration prediction model module is established by constructing a model infrastructure, designing an auxiliary prediction module, designing an enhanced activation function, designing a bidirectional memory unit layer, designing an attention layer, designing an auxiliary prediction fusion layer, designing a prediction layer, designing a loss function, gradient clipping and model training to establish a blood drug concentration prediction model;
[0082] The blood drug concentration prediction model tuning module tunes the blood drug concentration prediction model by designing a steady trial search function, designing a distance control factor, designing a distance control search function, and designing a fusion evolution search function;
[0083] The blood drug concentration monitoring module generates an electronic simulation individual of the patient, sets basic information for the electronic simulation individual, and synchronously updates the drug usage information of the electronic simulation individual, and inputs the latest electronic simulation individual information into the established blood drug concentration prediction model, and the model predicts the blood drug concentration level that the electronic simulation individual will reach.
[0084] Example 2, see Figure 1This embodiment is based on the above embodiment, and the data acquisition module collects patient information, medication information, time information, clinical indicators, treatment plans, historical medication data, behavioral habit data, and blood drug concentration data; the patient information includes age, gender, height, and weight; the medication information includes drug name, dosage, and medication time; the clinical indicators include the patient's heart rate, blood pressure, body temperature, respiratory rate, and biochemical indicators; the treatment plan is other treatment methods that the patient is receiving, which is used to determine whether it will affect drug metabolism; the historical medication data is used to analyze the cumulative effect of drugs; the behavioral habit data includes eating habits, smoking and drinking habits, exercise habits, and sleeping habits.
[0085] Example 3, see Figure 1 and Figure 2 This embodiment is based on the above embodiment, and the data preprocessing module performs data correction, data encoding, data normalization and data balancing, which specifically includes the following contents:
[0086] Data correction: Correct the collected numerical data and identify abnormal data, including incomplete data, duplicate data, and erroneous data; delete duplicate data, fill missing data with the mean, and replace abnormal data;
[0087] Data coding: Data coding is performed for feature data with a limited number of mutually exclusive categories. The orderliness of the feature data is analyzed to evaluate the coding cardinality and perform data coding.
[0088] Data normalization, for feature data with dimensional differences, data normalization is performed, as follows:
[0089] ;
[0090] in, Represents the original value of the feature data, represents the normalized value of the feature, represents the standard deviation of the feature data, H represents the mean of the feature data, represents the maximum value in the feature data, Indicates the minimum value in the feature data;
[0091] Data balancing, generating new samples in the minority feature data group to balance the majority feature data group, expressed as follows:
[0092] ;
[0093] in, Represents the new data generated, represents the original data in a small number of feature data groups, r1 represents a random number between 0 and 1, Represents the average value of the original data in a small number of feature data groups;
[0094] Set label data and set blood drug concentration data as label data.
[0095] By performing the above operations, in order to address the problems of low model accuracy and generalization ability caused by poor data quality in the traditional blood drug concentration prediction model, this solution improves the data quality and accuracy through data correction, data encoding, data normalization and data balancing, reduces the impact of data errors on subsequent model learning, and improves the accuracy and generalization ability of the model.
[0096] Example 4, see Figure 1 and Figure 3 This embodiment is based on the above embodiment. The blood drug concentration prediction model module is established by constructing a model infrastructure, designing an auxiliary prediction module, designing an enhanced activation function, designing a bidirectional memory unit layer, designing an attention layer, designing an auxiliary prediction fusion layer, designing a prediction layer, designing a loss function, gradient clipping and model training to establish a blood drug concentration prediction model, which specifically includes the following contents:
[0097] Build the model infrastructure, which includes input layer, auxiliary prediction module, bidirectional memory unit layer, temporal attention layer, auxiliary prediction fusion layer and prediction layer;
[0098] An auxiliary prediction module is designed to obtain the blood drug concentration at different times by analyzing the elimination rate of blood drug concentration, which is used to assist the prediction of the final model, as shown below:
[0099] ;
[0100] Where j represents the time step, represents the auxiliary predicted blood drug concentration at time step j, represents the initial blood drug concentration, e represents the natural constant, is the attenuation factor;
[0101] Design an enhanced activation function, expressed as follows:
[0102] ;
[0103] in, represents the enhanced activation function, represents the input of the enhanced activation function, and represents the adjustment factor, tanh(·) represents the hyperbolic tangent function;
[0104] Design memory units, including input gates, forget gates, output gates and memory cells; the three gate structures use enhanced activation functions to perform mapping activation processing, and take absolute values of the processed results; the input gate controls the amount of data added to the cell state, the forget gate controls the degree of information forgetting, and the output gate controls the intensity and range of output information;
[0105] Design a bidirectional memory layer, which includes a forward memory layer and a backward memory layer. A forward memory layer processes data from the beginning to the end of the sequence, and another backward memory layer processes data from the end to the beginning of the sequence, capturing both past and future information. The final output is the concatenation of the forward and backward memory layers.
[0106] Design the attention layer and introduce the temporal attention mechanism to capture the dependencies between different time points by assigning different weights to each time step. Specifically, it includes the following:
[0107] Calculate the temporal attention score, expressed as follows:
[0108] ;
[0109] in, represents the temporal attention score function, p represents the temporal information vector, represents the weight of the hidden state, represents the hidden state, q represents the query vector, represents the query weight, represents the time fraction bias, T represents the transposed sign;
[0110] Calculate the temporal attention weight, expressed as follows:
[0111] ;
[0112] in, represents the temporal attention weight function, which is used to measure the importance of each time step;
[0113] Aggregate the output, add attention weights to the hidden state, and then aggregate the output, which is expressed as follows:
[0114] ;
[0115] in, represents the output of the attention layer with temporal attention weights;
[0116] An auxiliary prediction fusion layer is designed to fuse the output results of the memory unit with the added temporal attention mechanism and the output results of the auxiliary prediction module to jointly predict the final blood drug concentration, as shown below:
[0117] ;
[0118] in, represents the output of the auxiliary prediction fusion layer, and Represent the weight and bias of the auxiliary prediction fusion layer, represents the prediction fusion operation;
[0119] Design the prediction layer, expressed as follows:
[0120] ;
[0121] in, represents the predicted value of blood concentration at time step j, represents the input of the prediction layer, represents the weight of the prediction layer, Represents the bias of the prediction layer;
[0122] The loss function is designed to consider the contribution of the model prediction results and the auxiliary prediction module, which is expressed as follows:
[0123] ;
[0124] Among them, Loss represents the loss function, N represents the maximum number of samples, and n represents the index of the sample. represents the model prediction value for the nth sample, represents the actual value of the nth sample, Represents the auxiliary prediction value for the nth sample;
[0125] Gradient clipping is expressed as follows:
[0126] ;
[0127] in, represents the gradient of the clipped loss function with respect to the weight and bias parameters of the model, represents the gradient of the original loss function with respect to the weight and bias parameters of the model, max(·) represents the maximum value, represents the L2 norm of the original loss function, and Clin represents the clipping factor;
[0128] Model training is represented as follows:
[0129] ;
[0130] Where f represents the number of model training times, represents the weight and bias parameters of the model during the f+1th model training. represents the weight and bias parameters of the model during the f-th model training. Represents the learning rate.
[0131] By performing the above operations, the traditional blood drug concentration prediction model has difficulty in coping with the dynamics and complexity of blood drug concentration data, and the model has low accuracy, poor expression ability and adaptability. This solution designs auxiliary prediction modules, enhanced activation functions, bidirectional memory unit layers, attention layers, auxiliary prediction fusion layers and prediction layers to better cope with the dynamics and complexity of blood drug concentration data, improve the prediction accuracy of the model, and improve the expression ability and adaptability.
[0132] Example 5, see Figure 1 and Figure 4 This embodiment is based on the above embodiment. The blood drug concentration prediction model tuning module optimizes the blood drug concentration prediction model by designing a steady trial search function, designing a distance control factor, designing a distance control search function, and designing a fusion evolution search function. Specifically, it includes the following contents:
[0133] Tuning preparation: create a tuning search space, set the tuning effect evaluation index, set the accuracy of the blood drug concentration prediction model as the tuning effect evaluation index, set the threshold of the tuning effect, create the initial cluster for parameter search, and set the maximum number of search iterations;
[0134] Design a steady heuristic search function to perform steady exploration based on the previous search, as shown below:
[0135] ;
[0136] Among them, t represents the current search iteration number, represents the parameter position searched by the steady heuristic search function during the t+1th parameter search, r2 and r3 represent random numbers between 0 and 1, It indicates the parameter position searched by the steady heuristic search function during the tth parameter search. represents the maximum number of search iterations, ld represents the lower limit of the search space, and lu represents the upper limit of the search space;
[0137] Design distance control factor, expressed as follows:
[0138] ;
[0139] in, represents the distance control factor, It means square root. means taking the logarithm, and |·| means taking the absolute value;
[0140] Design the distance control search function, which is expressed as follows:
[0141] ;
[0142] in, It represents the parameter position searched by the distance control search function in the t+1th parameter search. It represents the parameter position searched by the distance control search function in the tth parameter search. r4 and r5 represent random numbers between 0 and 1. represents the current optimal parameter position, Represents the parameter position searched by the distance control search function during the t-1th parameter search;
[0143] Design the fusion evolution search function, which is expressed as follows:
[0144] ;
[0145] in, It indicates the parameter position searched by the fusion evolution search function in the t+1th parameter search. represents the error correction factor, which is a number between -3 and 2.6;
[0146] Tuning search, evaluate the initial tuning effect value of the position of the initial search cluster, and select the position with the largest tuning effect value as the current optimal parameter position; then, for the initial search cluster, perform parameter optimization search of steady trial search function, distance control search function and fusion evolution search function in turn, evaluate the optimization effect of the parameter positions searched three times, update the current optimal parameter position, and increase the number of iterations by one; if there are parameter points with tuning effect values greater than the tuning effect threshold in the point clusters obtained by the three parameter searches, then output the parameters of the current optimal parameter position as the optimal parameters to complete the tuning search; if the search number has reached the maximum search iteration number, search again; otherwise, perform the next round of iterative search.
[0147] By performing the above operations, in order to address the problems of low generalization ability and low prediction accuracy of the model caused by low tuning efficiency of the parameter tuning algorithm, weak global search ability and improper selection of model parameters in the traditional blood drug concentration prediction model, this solution searches for the optimal parameters in a more targeted manner by designing a steady trial search function, a distance control factor, a distance control search function and a fusion evolution search function, improves the tuning efficiency, improves the global search ability of the algorithm, and can more comprehensively explore the parameter space, increase the possibility of finding the optimal parameters, and avoid falling into a local optimal solution; improves the generalization ability and prediction accuracy of the model.
[0148] Example 6, see Figure 1This embodiment is based on the above embodiment. The blood drug concentration monitoring module generates an electronic simulation individual of the patient, sets basic information for the electronic simulation individual, and synchronously updates the medication information, time information, clinical indicators, treatment plan, historical medication data and behavioral habit data of the electronic simulation individual. The latest electronic simulation individual information is input into the established blood drug concentration prediction model. The model predicts the blood drug concentration level that the electronic simulation individual will reach, and displays the patient's blood drug concentration value to the user, so that the user can clearly understand the patient's real-time blood drug concentration status and medication risks, and at the same time, real-time monitoring and alarm are performed on abnormal blood drug concentrations; and a corresponding monitoring log is generated; the model is continuously optimized and updated in combination with the prediction effect and feedback data.
[0149] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0150] While the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that many changes, modifications, substitutions and variations can be made to the embodiments without departing from the principles and spirit of the invention.
[0151] The present invention and its embodiments are described above, and such description is not restrictive. The drawings show only one embodiment of the present invention, and the actual structure is not limited thereto. In short, if ordinary technicians in the field are inspired by it, without departing from the purpose of the invention, they can design a structure and embodiment similar to the technical solution without creativity, which should belong to the protection scope of the present invention.
Claims
1. A blood drug concentration monitoring system based on machine learning, characterized by: It includes data acquisition module, data preprocessing module, blood drug concentration prediction model establishment module, blood drug concentration prediction model tuning module, and blood drug concentration monitoring module; The data collection module collects patient information, medication information, time information, clinical indicators, treatment plans, historical medication data, behavioral habit data, and blood drug concentration data; The data preprocessing module performs data correction, data encoding, data normalization and data balancing; The blood drug concentration prediction model module is constructed by constructing a model infrastructure, designing an auxiliary prediction module, designing an enhanced activation function, designing a bidirectional memory unit layer, designing an attention layer, designing an auxiliary prediction fusion layer and designing a prediction layer to establish a blood drug concentration prediction model; The blood drug concentration prediction model tuning module tunes the blood drug concentration prediction model by designing a steady trial search function, designing a distance control factor, designing a distance control search function, and designing a fusion evolution search function, specifically including the following contents: Tuning preparation: create a tuning search space, set the tuning effect evaluation index, set the accuracy of the blood drug concentration prediction model as the tuning effect evaluation index, set the threshold of the tuning effect, create the initial cluster for parameter search, and set the maximum number of search iterations; Design a steady heuristic search function to perform steady exploration based on the previous search, as shown below: ; Where t represents the current search iteration number, represents the parameter position searched by the steady heuristic search function during the t+1th parameter search, r2 and r3 represent random numbers between 0 and 1, It indicates the parameter position searched by the steady heuristic search function during the tth parameter search. represents the maximum number of search iterations, ld represents the lower limit of the search space, and lu represents the upper limit of the search space; Design distance control factor, expressed as follows: ; in, represents the distance control factor, It means square root. means taking the logarithm, and |·| means taking the absolute value; Design the distance control search function, which is expressed as follows: ; in, It represents the parameter position searched by the distance control search function in the t+1th parameter search. It represents the parameter position searched by the distance control search function in the tth parameter search. r4 and r5 represent random numbers between 0 and 1. represents the current optimal parameter position, Represents the parameter position searched by the distance control search function during the t-1th parameter search; Design the fusion evolution search function, which is expressed as follows: ; in, It indicates the parameter position searched by the fusion evolution search function in the t+1th parameter search. represents the error correction factor, which is a number between -3 and 2.6; Tuning search, evaluate the initial tuning effect value of the position of the initial search cluster, select the position with the largest tuning effect value as the current optimal parameter position; then perform parameter optimization search of the steady trial search function, distance control search function and fusion evolution search function in turn for the initial search cluster, evaluate the optimization effect of the parameter positions searched three times, update the current optimal parameter position, and increase the number of iterations by one; if there are parameter points with tuning effect values greater than the tuning effect threshold in the point clusters obtained by the three parameter searches at the same time, then output the parameters of the current optimal parameter position as the optimal parameters to complete the tuning search; if the search number has reached the maximum search iteration number, search again; otherwise, perform the next round of iterative search; The blood drug concentration monitoring module generates an electronic simulation individual of the patient, sets basic information for the electronic simulation individual, and synchronously updates the drug usage information of the electronic simulation individual, and inputs the latest electronic simulation individual information into the established blood drug concentration prediction model, and the model predicts the blood drug concentration level that the electronic simulation individual will reach.
2. The blood drug concentration monitoring system based on machine learning according to claim 1, characterized in that: The blood drug concentration prediction model module is established by constructing a model infrastructure, designing an auxiliary prediction module, designing an enhanced activation function, designing a bidirectional memory unit layer, designing an attention layer, designing an auxiliary prediction fusion layer and designing a prediction layer to establish a blood drug concentration prediction model, which specifically includes the following contents: Build the model infrastructure, which includes input layer, auxiliary prediction module, bidirectional memory unit layer, temporal attention layer, auxiliary prediction fusion layer and prediction layer; An auxiliary prediction module is designed to obtain the blood drug concentration at different times by analyzing the elimination rate of blood drug concentration, which is used to assist the prediction of the final model, as shown below: ; Where j represents the time step, represents the auxiliary predicted blood drug concentration at time step j, represents the initial blood drug concentration, e represents the natural constant, is the attenuation factor; Design an enhanced activation function, expressed as follows: ; in, represents the enhanced activation function, represents the input of the enhanced activation function, and represents the adjustment factor, tanh(·) represents the hyperbolic tangent function; Design memory units, including input gates, forget gates, output gates and memory cells; the three gate structures use enhanced activation functions to perform mapping activation processing, and take absolute values of the processed results; the input gate controls the amount of data added to the cell state, the forget gate controls the degree of information forgetting, and the output gate controls the intensity and range of output information; Design a bidirectional memory layer, which includes a forward memory layer and a backward memory layer. A forward memory layer processes data from the beginning to the end of the sequence, and another backward memory layer processes data from the end to the beginning of the sequence, capturing both past and future information. The final output is the concatenation of the forward and backward memory layers. Design the attention layer and introduce the temporal attention mechanism to capture the dependencies between different time points by assigning different weights to each time step. Specifically, it includes the following: Calculate the temporal attention score, expressed as follows: ; in, represents the temporal attention score function, p represents the temporal information vector, represents the weight of the hidden state, represents the hidden state, q represents the query vector, represents the query weight, represents the time fraction bias, T represents the transposed sign; Calculate the temporal attention weight, expressed as follows: ; in, represents the temporal attention weight function, which is used to measure the importance of each time step; Aggregate the output, add attention weights to the hidden state, and then aggregate the output, which is expressed as follows: ; in, represents the output of the attention layer with temporal attention weights; An auxiliary prediction fusion layer is designed to fuse the output results of the memory unit with the added temporal attention mechanism and the output results of the auxiliary prediction module to jointly predict the final blood drug concentration, as shown below: ; in, represents the output of the auxiliary prediction fusion layer, and Respectively represent the weight and bias of the auxiliary prediction fusion layer, represents the prediction fusion operation; Design the prediction layer, expressed as follows: ; in, represents the predicted value of blood concentration at time step j, represents the input of the prediction layer, represents the weight of the prediction layer, Represents the bias of the prediction layer; The loss function is designed to consider the contribution of the model prediction results and the auxiliary prediction module, which is expressed as follows: ; Among them, Loss represents the loss function, N represents the maximum number of samples, and n represents the index of the sample. represents the model prediction value for the nth sample, represents the actual value of the nth sample, Represents the auxiliary prediction value for the nth sample; Gradient clipping is expressed as follows: ; in, represents the gradient of the clipped loss function with respect to the weight and bias parameters of the model, represents the gradient of the original loss function with respect to the weight and bias parameters of the model, max(·) represents the maximum value, represents the L2 norm of the original loss function, and Clin represents the clipping factor; Model training is represented as follows: ; Where f represents the number of model training times, represents the weight and bias parameters of the model during the f+1th model training. represents the weight and bias parameters of the model during the f-th model training. Represents the learning rate.
3. The blood drug concentration monitoring system based on machine learning according to claim 1, characterized in that: The data preprocessing module performs data correction, data encoding, data normalization and data balancing, specifically including the following contents: Data correction: Correct the collected numerical data and identify abnormal data, including incomplete data, duplicate data, and erroneous data; delete duplicate data, fill missing data with the mean, and replace abnormal data; Data coding: Data coding is performed for feature data with a limited number of mutually exclusive categories. The orderliness of the feature data is analyzed to evaluate the coding cardinality and perform data coding. Data normalization, for feature data with dimensional differences, data normalization is performed, as follows: ; in, Represents the original value of the feature data, represents the normalized value of the feature, represents the standard deviation of the feature data, H represents the mean of the feature data, represents the maximum value in the feature data, Indicates the minimum value in the feature data; Data balancing, generating new samples in the minority feature data group to balance the majority feature data group, expressed as follows: ; in, Represents the new data generated, represents the original data in a small number of feature data groups, r1 represents a random number between 0 and 1, Represents the average value of the original data in a small number of feature data groups; Set label data and set blood drug concentration data as label data.
4. The blood drug concentration monitoring system based on machine learning according to claim 1, characterized in that: The blood drug concentration monitoring module generates an electronic simulation individual of the patient, sets basic information for the electronic simulation individual, and synchronously updates the medication information, time information, clinical indicators, treatment plan, historical medication data and behavioral habit data of the electronic simulation individual, and inputs the latest electronic simulation individual information into the established blood drug concentration prediction model. The model predicts the blood drug concentration level that the electronic simulation individual will reach, and displays the patient's blood drug concentration value to the user, so that the user can clearly understand the patient's real-time blood drug concentration status and medication risks, and at the same time, real-time monitoring and alarm are performed on abnormal blood drug concentrations; and corresponding monitoring logs are generated; the model is continuously optimized and updated in combination with prediction results and feedback data.
5. The blood drug concentration monitoring system based on machine learning according to claim 1, characterized in that: The data acquisition module collects patient information, medication information, time information, clinical indicators, treatment plans, historical medication data, behavioral habit data, and blood drug concentration data; the patient information includes age, gender, height, and weight; the medication information includes drug name, dosage, and medication time; the clinical indicators include the patient's heart rate, blood pressure, body temperature, respiratory rate, and biochemical indicators; the treatment plan is other treatment methods that the patient is currently receiving, which is used to determine whether it will affect drug metabolism; the historical medication data is used to analyze the cumulative effects of drugs; the behavioral habit data includes eating habits, smoking and drinking habits, exercise habits, and sleeping habits.
