Full-process medical procedure parameter optimization method and device, equipment and medium
By optimizing medical procedure parameters through time-series prediction models and counterfactual reasoning, the problems of low efficiency and poor accuracy in medical procedure parameter optimization are solved, achieving safer and more efficient medical procedure parameter optimization, avoiding causal bias, and exploring the optimal parameter set.
Patent Information
- Application Number
- CN202511043930.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-28
- Publication Date
- 2025-11-28
AI Technical Summary
In highly complex scenarios such as rare diseases, the multi-stage, strong causal dependence, and temporal feedback characteristics of medical procedures lead to low efficiency and poor accuracy in optimizing medical procedure parameters using traditional methods. Ethical and resource constraints make it difficult to achieve effective optimization.
By employing a time-series prediction model based on the latent state of continuous potential factors, and through counterfactual modification and inference sampling, the set of medical procedure parameters is optimized to form a nested optimization framework, thereby avoiding causal bias and improving accuracy.
It enables the simulation of the potential impact of different sets of medical procedure parameters without affecting the actual procedure, supporting safer and more efficient decision optimization, avoiding causal bias, and exploring the optimal set of medical procedure parameters.
Smart Images

Figure CN121034644A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of rule optimization, and in particular to a method, apparatus, computer device, computer-readable storage medium, and computer program product for optimizing parameters of a full-process medical procedure. Background Technology
[0002] In highly complex scenarios such as rare diseases, medical procedures often exhibit multi-stage, strong causal dependencies, and temporal feedback characteristics, encompassing a continuous process from initial diagnosis and treatment intervention to efficacy evaluation and strategy adjustment. Therefore, with the continuous development of computer technology, to achieve closed-loop optimization of intelligent medical systems, it is necessary to formulate a dynamic set of medical procedure parameters based on complex event evolution, and to estimate the computer program's effectiveness based on this dynamic set of parameters in order to continuously optimize the medical procedure parameter set.
[0003] However, directly testing new sets of medical procedure parameters is clearly inefficient and subject to ethical and resource constraints. Therefore, traditional techniques simulate the potential impact of different sets of medical procedure parameters; however, the accuracy of prognostic estimates based directly on historical data and reinforcement learning models is poor, making the optimization of the final set of medical procedure parameters quite challenging. Summary of the Invention
[0004] Therefore, it is necessary to provide a method, apparatus, computer equipment, computer-readable storage medium, and computer program product for optimizing parameters throughout the entire medical procedure, which can improve accuracy, in response to the above-mentioned technical problems.
[0005] Firstly, this application provides a method for optimizing parameters throughout a medical procedure, the method comprising:
[0006] A time-series prediction model is determined; the time-series prediction model is determined based on multiple historical program processing events and historical detection results under the latent state of continuous potential factors;
[0007] The program event parameters of the initial medical procedure parameter set are modified using counterfactual methods to obtain a counterfactual medical procedure parameter set; based on the time series prediction model, the program event parameters of the counterfactual medical procedure parameter set are sampled using counterfactual inference to obtain counterfactual benefits; the counterfactual benefits are used to represent the program effect.
[0008] Based on the counterfactual benefit, the program event parameters of the initial medical procedure parameter set are optimized to obtain the optimized medical procedure parameter set.
[0009] In one embodiment, the time series prediction model includes a hidden state inference model and event occurrence intensity; the determination of the time series prediction model includes:
[0010] The parameters of the Markov chain model are determined based on the historical latent factors corresponding to T consecutive time periods, and the hidden state inference model is obtained; the hidden state inference model is used to determine the hidden state of each time period.
[0011] Obtain the baseline intensity during the i-th time period;
[0012] Based on the historical program processing events and historical detection results within the i-th time period, the historical impact items within the i-th time period are determined;
[0013] The intensity of the event in the i-th time period is determined based on the baseline intensity in the i-th time period and the historical influence term in the i-th time period.
[0014] Where i and T are both positive integers, and i is less than or equal to T; the intensity of the event occurrence in the i-th time period is used to perform counterfactual sampling on each of the program event parameters.
[0015] In one embodiment, determining the historical impact item within the i-th time period based on historical process processing events and historical detection results within the i-th time period includes:
[0016] The program event triggering intensity coefficient for the i-th time period is determined based on the historical program processing event type for the i-th time period, and the detection event triggering intensity coefficient for the i-th time period is determined based on the detection result event type for the i-th time period.
[0017] Based on the program event trigger intensity coefficient of the i-th time period and the exponential decay function of the latent state of potential factors in the i-th time period, the program event history items of the i-th time period are determined.
[0018] Based on the trigger intensity coefficient of the detection event in the i-th time period and the exponential decay function of the latent state of the potential factors in the i-th time period, the historical items of the detection event in the i-th time period are determined;
[0019] The step of determining the event intensity in the i-th time period based on the baseline intensity and the historical influence term in the i-th time period includes:
[0020] The event occurrence intensity of the i-th time period is obtained by combining the event baseline intensity, the program event history item of the i-th time period, and the detection event history item of the i-th time period.
[0021] In one embodiment, the counterfactual modification of the program event parameters of the initial medical procedure parameter set to obtain a counterfactual medical procedure parameter set includes:
[0022] The program event parameters of the initial medical procedure parameter set in the i-th time period are sampled to obtain the program event parameters to be modified in the i-th time period; where i is a positive integer;
[0023] The parameters of the program events to be modified in the i-th time period are modified to obtain a set of counterfactual medical program parameters containing different modified program event parameters.
[0024] In one embodiment, the step of performing counterfactual inference sampling on the program event parameters of the counterfactual medical procedure parameter set based on the time-series prediction model to obtain counterfactual benefits includes:
[0025] The hidden state path for each time period is determined based on the time series prediction model, and the intensity of the event is determined by the hidden state of the i-th time period.
[0026] Determine the counterfactual strength of the detection result event corresponding to each set of counterfactual medical procedure parameters in the i-th time period;
[0027] By comparing the counterfactual intensity of each event within the same time period with the intensity of the observed event corresponding to the historical detection results, the counterfactual trajectory of the detection results is obtained.
[0028] Based on the intensity of the event, the counterfactual trajectory is sampled to obtain counterfactual benefits corresponding to various sets of counterfactual medical procedure parameters; where i is a positive integer;
[0029] Based on the average counterfactual benefits corresponding to the same set of counterfactual medical procedure parameters in each time period, the average value of the counterfactual benefits within the observation interval is determined; the average value of the observation interval is used to optimize the program event parameters of the initial set of medical procedure parameters; the observation interval includes the sum of each of the time periods.
[0030] In one embodiment, the program event parameters include program processing category parameters and program processing time parameters, wherein the program processing category parameters are probability vectors and the program processing time parameters are Gaussian distribution parameter values;
[0031] The feedback process optimizes the program event parameters of the initial medical procedure parameter set based on the counterfactual benefit, resulting in an optimized medical procedure parameter set, including:
[0032] The gradient value is obtained by estimating the gradient function based on the mean of the observation interval of the counterfactual gain.
[0033] Based on the gradient value, at least one of the program processing category parameter and the program processing time parameter is optimized to obtain an optimized set of medical program parameters.
[0034] Secondly, this application also provides a device for optimizing parameters of a complete medical procedure, comprising:
[0035] The modeling process module is used to determine the time series prediction model; the time series prediction model is determined based on multiple historical program processing events and historical detection results under the latent state of continuous potential factors.
[0036] The counterfactual module includes an intervention process module and an inference process module. The intervention process module is used to modify the program event parameters of the initial medical procedure parameter set counterfactually to obtain a counterfactual medical procedure parameter set. The inference process module is used to perform counterfactual inference sampling on the program event parameters of the counterfactual medical procedure parameter set based on the time series prediction model to obtain counterfactual benefits. The counterfactual benefits are used to represent the program effect.
[0037] The feedback module is used to optimize the program event parameters of the initial medical procedure parameter set based on the counterfactual benefit, so as to obtain the optimized medical procedure parameter set.
[0038] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of optimizing medical program parameters in any of the above embodiments.
[0039] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps of optimizing medical program parameters in any of the above embodiments.
[0040] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps of optimizing medical program parameters in any of the above embodiments.
[0041] The aforementioned medical procedure parameter optimization method, apparatus, computer equipment, computer-readable storage medium, and computer program product, because the time-series prediction model in the modeling process is determined based on multiple historical procedure processing events and historical detection results under continuous latent factor hidden states, consider the latent factor hidden states. This allows the time-series prediction model to accurately capture the complex time-varying relationship between historical procedure processing events and historical detection results, ensuring the accuracy of effect prediction. Furthermore, in the intervention process, the procedure event parameters of the initial medical procedure parameter set are modified to obtain a counterfactual medical procedure parameter set. In the inference process, based on the time-series prediction model, the procedure effect is estimated on the procedure event parameters of the counterfactual medical procedure parameter set through counterfactual inference sampling, obtaining counterfactual benefits. These counterfactual benefits represent the procedure effect. Counterfactual inference allows simulating the potential impact of different medical procedure parameter sets without affecting the actual procedure, thereby supporting safer and more efficient decision optimization. Finally, the feedback process optimizes the procedure event parameters of the initial medical procedure parameter set based on the counterfactual benefits, obtaining an optimized medical procedure parameter set. This allows counterfactual inference to serve as an inner optimization method for the initial set of medical procedure parameters, forming a nested optimization framework. This framework can consider the influence of potential factors during the optimization process, thereby avoiding the causal bias that may be caused by existing methods and effectively exploring the optimal set of medical procedure parameters. Attached Figure Description
[0042] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0043] Figure 1 This is an application environment diagram of a medical procedure parameter optimization method in one embodiment;
[0044] Figure 2 This is a flowchart illustrating a medical procedure parameter optimization method in one embodiment;
[0045] Figure 3 This is a flowchart illustrating the steps for determining the time series prediction model in one embodiment;
[0046] Figure 4 This is a flowchart illustrating a medical procedure parameter optimization method in another embodiment;
[0047] Figure 5 This is a schematic diagram of a medical procedure parameter set and its contained procedure event parameters in one embodiment;
[0048] Figure 6 This is a structural block diagram of a medical procedure parameter optimization device in one embodiment;
[0049] Figure 7 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0050] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0051] The "data-intervention-reasoning-feedback" closed-loop, end-to-end intelligent medical procedure parameter optimization method provided in this application can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104, or it can be located in the cloud or on another network server.
[0052] The terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle systems, and projection devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted displays. Head-mounted displays can be virtual reality (VR) devices, augmented reality (AR) devices, and smart glasses. The server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0053] In one exemplary embodiment, such as Figure 2 As shown, a method for optimizing parameters throughout the entire medical procedure is provided, which can be applied to... Figure 1 Taking terminal 102 as an example, the explanation includes the following steps 202 to 206. Wherein:
[0054] Step 202: Determine the time series prediction model; the time series prediction model is determined based on multiple historical program processing events and historical detection results under the latent state of continuous potential factors.
[0055] Step 202 is the modeling process. A time-series forecasting model is a model that arranges the parameters used for processing in chronological order. When using a time-series forecasting model, counterfactual sampling can be performed according to the data corresponding to the respective time periods. The time-series forecasting model is at least used to determine the event intensity in the latent states of potential factors in each sequentially arranged time period, so as to perform counterfactual sampling according to the event intensity; the latent states of potential factors in each sequentially arranged time period can be called the latent state path.
[0056] Latent factor latent states are latent states identified based on latent factors. Latent factors are unobserved factors that may simultaneously affect the set of medical procedure parameters and test results, leading to potential causal bias. Modeling latent factor latent states arranged chronologically allows latent factors to be mixed into explicit latent factor latent states, enabling accurate assessment of procedure effectiveness.
[0057] Both historical program processing events and historical test results are observational data under latent factor latent state modeling. Historical program processing events are implemented program rules, which may include program processing time parameters and program processing category parameters for each instance. The program processing category can be a functional function; the functional function can be different types of program invocation methods or medication regimens. Historical test results consist of the occurrence time and test indicators for each test, which can be calculation accuracy results or laboratory test results, etc.
[0058] In the continuous latent state of potential factors, each historical program processing event and each historical detection result are distributed in different time periods, and each historical program processing event and each historical detection result in the same time period exist sequentially, so as to facilitate the construction of a time series prediction model.
[0059] In some embodiments, determining the time series prediction model includes: establishing a Markov chain model based on the existing continuous latent factor hidden states; and constructing an intensity function based on multiple historical program processing events and historical detection results under the existing continuous latent factor hidden states to obtain the time series prediction model.
[0060] Step 204: Modify the program event parameters of the initial medical procedure parameter set using counterfactual methods to obtain a counterfactual medical procedure parameter set; based on the time series prediction model, perform counterfactual inference sampling on the program event parameters of the counterfactual medical procedure parameter set to obtain counterfactual benefits; counterfactual benefits are used to represent the program effect.
[0061] The intervention process includes: modifying the program event parameters of the initial medical procedure parameter set counterfactually to obtain a counterfactual medical procedure parameter set. The inference process includes: sampling the program event parameters of the counterfactual medical procedure parameter set based on a time-series prediction model to obtain counterfactual benefits; the counterfactual benefits are used to represent the program effect.
[0062] The initial medical procedure parameter set is a set of medical procedure parameters to be validated and evaluated. Each medical procedure parameter set is a collection of multiple procedure event parameters, each representing a different rule. Each medical procedure parameter set includes multiple procedure event parameters, and each procedure event parameter includes a procedure processing time parameter and a corresponding procedure processing category parameter. The procedure processing time parameter indicates the time period during which the procedure processing category parameter is implemented.
[0063] Counterfactual inference sampling refers to the process of inferring event parameters from a counterfactual medical procedure parameter set based on the procedure event parameters and a time-series prediction model of an initial medical procedure parameter set, in order to determine the counterfactual benefit through these event parameters. The counterfactual medical procedure parameter set refers to a pre-obtained set of counterfactual medical procedure parameters that can be modified from the initial medical procedure parameter set, either by modifying the procedure processing time parameters or the corresponding procedure processing category parameters.
[0064] The counterfactual medical procedure parameter set is a set of simulated medical procedure parameters. At least one procedure event parameter in the counterfactual medical procedure parameter set differs from the initial medical procedure parameter set, thus meeting different needs. The counterfactual benefits obtained from counterfactual sampling can be specifically adjusted for the parameters contained in the procedure event parameters.
[0065] The estimation of program effects can be based on causal models; for example, program effects can be estimated for program event parameters in a counterfactual medical procedure parameter set through structural equation modeling (SEM), dynamic Bayesian networks (DBN), or regression analysis models.
[0066] Counterfactual gains are used to represent the effects of a procedure. Counterfactual gains can be probability values or variance values. The effects of a procedure can refer to the efficiency or accuracy of its execution. For example, when a procedure is related to healthcare, the effect could be the efficiency of patient recovery; when a procedure is related to computational resources, the effect could be the reduction in the amount of computational resources required.
[0067] In some embodiments, counterfactual modification of the program event parameters of the initial medical procedure parameter set to obtain a counterfactual medical procedure parameter set includes: determining the latent states of continuous latent factors based on the program event parameters of the initial medical procedure parameter set and the detection result event parameters; and counterfactual modification of the program event parameters of the initial medical procedure parameter set for the time period corresponding to the latent states of continuous latent factors to obtain the counterfactual medical procedure parameter set. For example, counterfactual modification of the program event parameters of the initial medical procedure parameter set for the i-th time period of the latent states of continuous latent factors to obtain the counterfactual medical procedure parameter set.
[0068] Step 206: Based on the counterfactual benefits, optimize the program event parameters of the initial medical procedure parameter set to obtain the optimized medical procedure parameter set.
[0069] Step 206 is the feedback process. The optimized medical procedure parameter set is the result of program adjustments with counterfactual benefits as the optimization direction. Counterfactual benefits act as the inner function to obtain counterfactual benefits; while counterfactual benefits are used to provide the parameter optimization direction for the initial medical procedure parameter set to realize the optimization process of the outer function.
[0070] In some embodiments, the program event parameters of the initial medical procedure parameter set are optimized based on the counterfactual benefit to obtain an optimized medical procedure parameter set, including: determining a gradient based on the counterfactual benefit; optimizing the program event parameters of the initial medical procedure parameter set until the gradient meets a preset condition, and then using the optimized initial medical procedure parameter set as the optimized medical procedure parameter set.
[0071] In the aforementioned medical procedure parameter optimization method, the time-series prediction model is determined in the modeling process. This model is based on multiple historical procedure processing events and historical detection results under continuous latent factor hidden states. Since real procedure operation data often exists in continuous time, the latent states of corresponding hardware, environment, users, and other latent factors, along with procedure events, have complex temporal dynamic relationships. Therefore, considering the latent states of latent factors, the time-series prediction model can accurately capture the complex time-varying relationship between historical procedure processing events and historical detection results, overcoming the limitations of discrete time-segment rules and ensuring accuracy. Next are the intervention and inference processes. In the intervention process, the procedure event parameters of the initial medical procedure parameter set are modified counterfactually to obtain a counterfactual medical procedure parameter set. In the inference process, based on the time-series prediction model, the procedure event parameters of the counterfactual medical procedure parameter set are estimated through counterfactual inference sampling to obtain counterfactual benefits. These counterfactual benefits represent the procedure effect. Counterfactual inference allows for simulating the potential impact of different medical procedure parameter sets without affecting the actual procedure, thereby supporting safer and more efficient decision optimization. Finally, in the feedback process, the program event parameters of the initial medical procedure parameter set are optimized based on the counterfactual gains, resulting in an optimized medical procedure parameter set. This allows counterfactual inference to serve as an inner-layer optimization method for the initial medical procedure parameter set, forming a nested optimization framework. This framework can consider the influence of potential factors during the optimization process, thereby avoiding the causal bias that may be caused by existing methods. It can effectively explore the optimal medical procedure parameter set in a high-dimensional discrete-continuous hybrid decision space.
[0072] In some embodiments, such as Figure 3 As shown, this involves the modeling process; correspondingly, determining the time series prediction model includes:
[0073] Step 302: Determine the parameters of the Markov chain model based on the historical latent factors corresponding to T consecutive time periods to obtain the hidden state inference model; the hidden state inference model is used to determine the hidden state of each time period.
[0074] Historical latent factors are the specific discrete values of the state within each time period. Unobserved factors (latent factors) may simultaneously affect both the program's processing events and the detection results, leading to potential causal bias. Therefore, these latent factors can be explicitly modeled to accurately assess treatment efficacy. The latent factors are modeled as discrete-time Markov chains, whose states change over time and influence treatment and detection outcomes. The time axis is divided into T time periods, and within the i-th time period, the latent factor is in a hidden state.
[0075] When using a Markov chain model, the value of the hidden state in the current time period is determined by the transition probability based on the hidden state at the previous time step. Correspondingly, since historical latent factors are known, the parameters of the Markov chain model are determined based on the hidden states at multiple time steps, and the parameters of the Markov chain model include this transition probability.
[0076] Step 304: Obtain the baseline intensity for the i-th time period.
[0077] Baseline strength indirectly represents the basic incidence rate of the event under the influence of latent factors in time period i. Baseline strength can be a parameter of the latent state inference model. Markov chain models include discrete models or continuous models corresponding to discrete models. The discrete model describes state transitions based on the transition matrix; the continuous model describes state transitions based on baseline strength. The transition matrix describes the transformation process between state and baseline strength based on matrix exponentiation and matrix logarithm.
[0078] Step 306: Based on the historical process events and historical detection results of the i-th time period, determine the historical impact items of the i-th time period.
[0079] Step 308: Determine the event occurrence intensity of the i-th time period based on the baseline intensity of the i-th time period and the historical influence term of the i-th time period; where i and T are both positive integers, and i is less than or equal to T; the event occurrence intensity in the i-th time period is used to infer the event parameters of the program event parameters in the i-th time period.
[0080] Specifically, the counterfactual strength of the detection result is determined based on the program event parameters, and the event parameters of the detection result are inferred accordingly.
[0081] In some embodiments, determining the historical impact item for the i-th time period based on the historical program processing events and historical detection results of the i-th time period includes: determining the program event trigger intensity coefficient for the i-th time period based on the types of each historical program processing event in the i-th time period, and determining the detection event trigger intensity coefficient for the i-th time period based on the types of each detection result event in the i-th time period; determining the program event historical item for the i-th time period based on the program event trigger intensity coefficient for the i-th time period and the exponential decay function of the latent state of the potential factors in the i-th time period; and determining the detection event historical item for the i-th time period based on the detection event trigger intensity coefficient for the i-th time period and the exponential decay function of the latent state of the potential factors in the i-th time period.
[0082] Correspondingly, the event occurrence intensity within the i-th time period is determined based on the baseline intensity and historical impact term of the i-th time period. This includes combining the event baseline intensity, the program event history term, and the detection event history term of the i-th time period to obtain the event occurrence intensity of the i-th time period. The event baseline intensity indirectly represents the basic probability of the event occurring.
[0083] In some embodiments, determining the trigger intensity coefficients of each program event in the i-th time period based on the types of each historical program processing event in the i-th time period, and determining the trigger intensity coefficients of each detection event in the i-th time period based on the types of each detection result event in the i-th time period, includes: performing maximum likelihood estimation on the time-series prediction model based on the historical program processing event records of the i-th time period to obtain the baseline intensity and trigger intensity coefficients of the program events in the i-th time period; and performing maximum likelihood estimation on the time-series prediction model based on the historical detection result event records of the i-th time period to obtain the baseline intensity and trigger intensity coefficients of the detection events in the i-th time period. Thus, model construction is performed based on the event occurrence records and time-series patterns to obtain the baseline intensity and event trigger intensity coefficients under the corresponding patterns, thereby quantifying the relationship between the two historical terms.
[0084] In some embodiments, combining the event baseline intensity of the i-th time period, the program event history item of the i-th time period, and the detection event history item of the i-th time period to obtain the event occurrence intensity of the i-th time period includes: summing the event baseline intensity of the i-th time period, the program event history item of the i-th time period, and the detection event history item of the i-th time period to obtain the event occurrence intensity of the i-th time period.
[0085] Among them, the trigger strength coefficient is used to quantify the magnitude of the impact of the corresponding event, while the exponential decay function is used to ensure that the events in each time period are constructed based on continuous time, so that the impact of historical events decays over time, forming a long-term dependency relationship, thereby making the event occurrence intensity more accurate when the program processing events and the detection result events act on the same set of medical program parameters respectively.
[0086] In this embodiment, on the one hand, since the continuous historical latent factors affecting historical process events and historical detection results exist continuously, determining the parameters of the Markov chain model based on these continuous historical latent factors can simulate the state existing in continuous time, express the complex temporal dynamic relationship between historical process events and historical detection results, and improve the accuracy of model prediction. On the other hand, since latent factors are dynamically changing, ignoring these dynamic latent factors may lead to biased treatment effect estimation in counterfactual evaluation, affecting the reliability of the optimization strategy. Furthermore, since latent factors affect the intensity of event occurrence, and the interaction between historical process events and historical detection results can also affect the intensity of event occurrence, thus forming corresponding historical terms, can ensure the processing effect and make the intensity of event occurrence more accurate.
[0087] In some embodiments, the intervention process needs to be further defined. The procedural event parameters of the initial medical procedure parameter set are modified counterfactually to obtain a counterfactual medical procedure parameter set. This includes: sampling the procedural event parameters of the initial medical procedure parameter set in time period i to obtain the procedural event parameters to be modified in time period i; where i is a positive integer; and modifying the procedural event parameters to be modified in time period i to obtain various counterfactual medical procedure parameter sets containing different modified procedural event parameters.
[0088] Since a patient's underlying disease state influences both treatment decisions and test results, it is first necessary to infer the hidden state trajectory for each patient. The hidden state path considers the generation probability of observed data (i.e., event sequences) in each time interval under the current hidden state. The Viterbi algorithm can be used to obtain a stable hidden state path. Based on the baseline strength and trigger strength coefficients that change with the hidden state, the probability of each hidden state at the initial time is calculated. Then, the Viterbi algorithm is used for backtracking to obtain the event occurrence intensity for each time period.
[0089] In this embodiment, the time series prediction model samples separately according to time periods, establishing the continuity of time period rule data so that the counterfactual benefits estimated by the program are closer to the actual situation, thus ensuring accuracy.
[0090] In some embodiments, a reasoning process is involved; correspondingly, counterfactual inference sampling is performed on the program event parameters of the counterfactual medical procedure parameter set to obtain counterfactual gains, including: determining the hidden state path of each time period according to the time series prediction model, and determining the event occurrence intensity through the hidden state of the i-th time period; determining the counterfactual intensity of the detection result event corresponding to each counterfactual medical procedure parameter set in the i-th time period; comparing each counterfactual intensity in the same time period with the observed event intensity corresponding to the historical detection result to obtain the counterfactual trajectory of the detection result event; mapping according to the counterfactual trajectory to obtain the counterfactual gains corresponding to multiple counterfactual medical procedure parameter sets; where i is a positive integer; determining the observation interval mean of the counterfactual gains within the observation interval based on the mean of the counterfactual gains corresponding to the same counterfactual medical procedure parameter set in each time period; the observation interval mean is used to optimize the program event parameters of the initial medical procedure parameter set; the observation interval includes the sum of each of the time periods.
[0091] Event intensity is the basis for counterfactual inference sampling. A time-series prediction model has T time periods with varying event intensity, where the i-th time period is one or more of these T time periods. Event intensity characterizes the degree to which the procedural event parameters in the corresponding i-th time period influence the procedural effect, thus obtaining the set of counterfactual medical procedural parameters for the initial protocol in each time period. The procedural effect can be represented by the event parameters of the detection results. For example, if a process processes 10 procedural events in the first second, then the event intensity of that procedural event in the first second is 10 procedural events per second.
[0092] In one embodiment, the intensity of event occurrence serves as the basis for counterfactual inference sampling. Counterfactual sampling is performed using the event occurrence intensity and a set of medical procedure parameters, enabling the counterfactual model to calculate the counterfactual intensity corresponding to each dimension of the detection result. This intensity may differ from the original observed intensity, thus supporting counterfactual sampling of procedure event parameters under different sets of medical procedure parameters and inferring the set of detection result events. The counterfactual model is used to determine the counterfactual intensity; it can be a model determined based on maximum likelihood estimation or a model determined based on Bayesian estimation.
[0093] The temporal prediction model corresponds to the intensity of event occurrence, ensuring that the counterfactual inference sampling process for each time period is adaptively adjusted based on the event intensity of the corresponding temporal prediction model. This allows the counterfactual inference sampling process to consider complex time-varying relationships caused by latent factors, establishing data continuity for each time period. This makes the estimated counterfactual gains more closely resemble the actual situation, ensuring accuracy. Optionally, the counterfactual gains can be sampled using a Monte Carlo algorithm.
[0094] Counterfactual strength represents the frequency or intensity of an intervention event parameter, used to measure the frequency of the event's occurrence when a particular intervention event parameter is modified. Counterfactual benefit represents the procedural effect brought about by the intervention event parameter; it reflects the overall benefit based on changes in counterfactual strength.
[0095] One or more counterfactual medical procedure parameter sets all use the i-th time period, and each counterfactual medical procedure parameter set has its own counterfactual intensity in the i-th time period. Each counterfactual intensity in the i-th time period is compared with the observed event intensity corresponding to the historical detection results in the i-th time period to obtain the difference value between each counterfactual detection result event in the i-th time period and the historical detection results; the T difference values are statistically analyzed to obtain the corresponding counterfactual benefit. This difference value can be a difference or a ratio.
[0096] In one embodiment, the event intensity parameter can be determined by Bayesian estimation, maximum likelihood estimation, or the event type of the procedure processing and the event type of the detection result in the i-th time period, thereby obtaining the counterfactual intensity corresponding to each set of counterfactual medical procedure parameters in the i-th time period.
[0097] In one embodiment, an observation event sequence is formed by combining multiple historical program processing events and historical detection results under the latent state of continuous potential factors. The likelihood function estimation parameters of the observation event sequence are maximized to obtain the maximum likelihood estimation model. Then, the counterfactual intensity of the counterfactual detection result event parameter set corresponding to the i-th time period is estimated by using the parameters obtained from the maximum likelihood estimation model.
[0098] In one embodiment, the counterfactual trajectory is mapped according to the intensity of the event to obtain counterfactual benefits corresponding to various sets of counterfactual medical procedure parameters. This includes: determining multiple moments in the i-th time period based on the intensity of the event; at each moment, determining the difference or ratio between the counterfactual intensity of each event in the i-th time period and the observed event intensity corresponding to the historical detection results of the i-th time period, thus obtaining the difference value between the counterfactual detection result event and the historical detection results in the i-th time period; comparing the difference values of T time periods to obtain the counterfactual benefits corresponding to each set of counterfactual medical procedure parameters in the T time periods. Therefore, by comparing the counterfactual benefits of each time period separately, a trajectory of counterfactual benefits can be formed, allowing for a more detailed analysis of the processing.
[0099] In this embodiment, historical detection results for each time period are used as a control group. The intensity of each counterfactual event in each time period is compared with the intensity of the observed event corresponding to the historical detection results of the corresponding time period to form a trajectory of the program effect in different time periods, so as to analyze the corresponding counterfactual benefits in more detail. Since the mapping process is obviously based on two kinds of observation data, historical program processing events and historical detection results, the randomness in the inference process is reduced by using the mean, so that the estimation of counterfactual benefits is more representative as a whole and less likely to produce overly optimistic or pessimistic estimates. This makes the correction direction of the program event parameters in the initial medical program parameter set more accurate.
[0100] In some embodiments, the program event parameters include program processing category parameters and program processing time parameters. The program processing category parameters are probability vectors, and the program processing time parameters are Gaussian distribution parameter values.
[0101] The feedback process is explained; correspondingly, based on the counterfactual benefit, the program event parameters of the initial medical procedure parameter set are optimized to obtain the optimized medical procedure parameter set, including: estimating the gradient value by performing a fractional function based on the mean of the observation interval of the counterfactual benefit; and optimizing at least one of the program processing category parameter and the program processing time parameter based on the gradient value to obtain the optimized medical procedure parameter set.
[0102] Since the actual program processing categories are discrete variables, and the selection probabilities of each category are different, the program processing category parameter is in the form of a probability vector, which can represent the selection probabilities of different categories. Since the program processing time is continuous data, and the parameter values of a Gaussian distribution can reflect the rules governing the changes in program processing time to a certain extent, the program processing time parameter is a Gaussian distribution parameter value; the Gaussian distribution parameter value can be at least one of variance and mean.
[0103] The mean of the counterfactual gain over the observation interval is used as a feedback value for gradient optimization. Because it represents the randomness from the set of program events, the program event parameters are adjusted to account for this randomness.
[0104] Score function estimation is a method for estimating the gradient of an expected function with random variables, transforming a non-differentiable sampling operation into a differentiable form. This step involves converting the program event parameters into log probabilities to obtain a differentiable result. The differentiable result is then weighted with the mean of the observation interval of the counterfactual gain to obtain the gradient value.
[0105] In one embodiment, optimizing at least one of the program processing category parameter and the program processing time parameter based on the gradient value to obtain an optimized set of medical program parameters includes: adjusting at least one of the program processing category parameter and the program processing time parameter according to a gradient value increase or decrease method to obtain an optimized set of medical program parameters.
[0106] In this embodiment, the parameter distribution of the corresponding parameter form is adaptively determined according to the existence form of the program processing category and the program processing time itself, and targeted sampling is performed to adjust the program event parameters according to the randomness of the program event set, thereby establishing the correlation between the inner function and the outer function, thereby improving the accuracy of optimization.
[0107] In one embodiment, the aforementioned historical procedural processing events and historical detection results are observational data, and the historical procedural processing events can be historical treatment events within the program, while the aforementioned historical detection results can be detection results of historical treatment events. Therefore, this technology proposes innovative methods in counterfactual reasoning, personalized treatment optimization, and dynamic latent factor modeling to improve the accuracy and feasibility of medical decision optimization. First, counterfactual reasoning is performed within the Multivariate Time-Point Process (MTPP) framework, enabling treatment strategy evaluation to be conducted on a continuous time scale, thereby more accurately capturing the dynamic evolution of medical procedures. Second, a clinician-guided treatment rule optimization mechanism is introduced, forming corresponding medical procedural processing events. Expert knowledge is incorporated during the optimization process to ensure that the optimized strategy conforms to medical procedural practice while flexibly adapting to the individual patient's disease trajectory. Finally, dynamic latent factors are incorporated into the causal inference framework. By modeling their evolution over time, bias in causal effect estimation is reduced, thereby improving the reliability and personalization of treatment optimization. In summary, this embodiment optimizes personalized treatment rules in a high-dimensional, continuous-time medical environment, providing a more interpretable and practical decision optimization method for complex medical scenarios.
[0108] This embodiment proposes a treatment event optimization framework based on a time-series prediction model and counterfactual reasoning. It aims to model the disease progression process using patients' continuous-time physiological data, laboratory test results, and medication records, and optimize existing clinical decision-making rules through retrospective analysis, making treatment plans more individualized and refined. The framework mainly includes: constructing a time-series prediction model using historical data and retrospective analysis based on counterfactual inference, as follows... Figure 4 As shown.
[0109] In an exemplary embodiment, a continuous-time dynamic prediction model considering potential factors is constructed based on patient test data and medication records. This includes: constructing a time-series prediction model using the patient's continuous-time test data and medication records. This model can predict future disease progression and treatment effects based on the current patient status and treatment plan, where the treatment effects are historical test results.
[0110] In one embodiment, step 202 above includes:
[0111] (1) Observational data: Patient test results and medication records
[0112] In medical procedures, treatment decisions and patient test results are often irregular sequences of events, and time-point processes can effectively model the dynamic characteristics of these events over continuous time.
[0113] For each patient, two types of observation events are defined:
[0114] Patient test results o j =(t o,j m o,j Each detection consists of the occurrence time and the detection index, such as laboratory test results. The history of detection results up to a specific time t in a continuous sequence is represented as follows:
[0115] Medication record a j =(t a,j ,m a,j Each treatment session consists of the time of occurrence and the type of treatment, such as different types of medication regimens. The medication history up to a specific time t in a continuous sequence is represented as...
[0116] The observation interval [0, T] max All observed events within ] are denoted as The above events are modeled as a multivariate time-series point process, where different types of events (treatment and test results) occur irregularly and alternately in continuous time. This irregular alternation is a manifestation of randomness; for example, there may be one event at time 0.2 and another event at time 0.5.
[0117] (2) Potential factors
[0118] Latent factors are unobserved factors that may simultaneously influence treatment decisions and patient test results, leading to potential causal bias. Therefore, these latent factors must be explicitly modeled to accurately assess treatment outcomes.
[0119] The latent factor z is modeled as a discrete-time Markov chain, whose state changes over time and affects treatment and detection outcomes. The time axis is divided into T time intervals, and in the i-th interval, the latent factor is in a certain hidden state z. i ∈{1,...,K}, and the evolution between states is described by the transition matrix A:
[0120] A(j,k):=P(z i =k|z i-1 =j)
[0121] (3) Intensity of the event
[0122] To characterize the dynamic process of treatment and patient test results, an event intensity function is used, and it is assumed that the intensity is influenced by underlying factors.
[0123] Specifically, the occurrence rate of a certain type of event at time t is determined by both the baseline strength and the influence of historical events:
[0124]
[0125] Among them, z i This represents the potential factors within the i-th time period; This represents the integration of each kernel function over every historical moment s from the untreated moment 0 to the current moment t; m represents a certain type of event. It is the kernel function for handling events in the historical process. It is the kernel function of historical detection results; dN o (s) and dN a (s) indicates whether a detection event has occurred at time point s; it is an increment of a "counting process"; baseline strength Indirectly representing the basic occurrence rate of the event in the current potentially promiscuous state; the parameters of the kernel function in the i-th time period and the baseline strength are hidden state z. i The corresponding set of parameters; the historical influence term is determined by past treatment and testing outcomes, and is modeled using an exponentially decaying kernel function to make more recent events have a greater impact on the current event, φ q←p (t)=β q←p exp(-αt), where β q←p This represents the trigger strength coefficient from event type p to event type q, used to quantify the influence relationship between the two, that is, the relationship from a detection event or treatment event to a certain type of event. The parameter set is... and That is, each potential state z corresponds to a set of parameters of a kernel function to form the intensity of event occurrence in the corresponding hidden state.
[0126] Thus, on the one hand, potential confounding factors affect the intensity of events, meaning that different latent states may lead to different patterns of treatment or testing outcomes; on the other hand, the influence of historical events decays over time, enabling the capture of long-term dependencies; based on this, the multivariate time-series process framework used to obtain the intensity of events allows different types of events to interact, improving the ability to model treatment decisions and the evolution of patient conditions.
[0127] The event occurrence intensity in the above embodiments is used for the counterfactual sampling process in the inner loop of the meta-rule optimization algorithm.
[0128] The meta-rule optimization framework comprises two main parts: The inner loop evaluates the counterfactual treatment effects under different treatment options, providing optimization direction for the outer loop. The outer loop iteratively optimizes the treatment decision rules, continuously improving them; these treatment decision rules are program event parameters within a set of medical procedure parameters.
[0129] This part, used to estimate the actual effects of different initial schemes, is completed by the inner loop. Corresponding to the embodiment scheme of step 204 above, it mainly includes the following three steps:
[0130] A. Hidden State Inference: Since a patient's underlying disease state affects both treatment decisions and test results, it is first necessary to infer the hidden state trajectory of each patient. The Viterbi algorithm is used instead of simple EM posterior estimation to obtain a more stable hidden state path.
[0131] B. Counterfactual Inference Sampling and Simulation: Based on the inferred hidden state path, counterfactual inference sampling simulates the counterfactual patient prognostic trajectory under different treatment rules, i.e., the counterfactual trajectory of the test results. This simulation allows for comparison of the long-term effects of different treatment options, rather than being limited to observed historical data. By modifying different treatment options through rule and parameter sampling, and then simulating the patient's counterfactual benefits through further counterfactual sampling of the test results, the expected value of the inner loop is estimated. The intensity of the aforementioned events forms the basis for counterfactual inference sampling. By modifying the patient's treatment plan, the model can calculate the counterfactual intensity corresponding to each dimension of the test results. This may be related to the original observation intensity This difference allows for counterfactual sampling under different treatment plans. Specifically, modified treatment plans can be obtained using existing rule parameters, resulting in counterfactual strengths that differ from the observed strengths. Counterfactual inference sampling will generate a counterfactual detection result trajectory by comparing these two, thereby obtaining the counterfactual benefit Y.
[0132] The known treatment plan and test result observations are denoted as follows: It is believed that latent states can represent some unrecorded patient states, such as the patient's health status, and the inferred latent state paths represent this unrecorded potential information in various time periods.
[0133] C. Calculate the treatment effect and feed it back to the outer loop: Estimate the final expected counterfactual benefit under the current treatment rule using the Monte Carlo method. The calculated expected counterfactual benefit will be used for gradient estimation of the outer loop (through the Scorefunction estimator) to further optimize the treatment decision rule.
[0134] The general steps of the outer loop are as follows: A. Initialize the meta-rule parameters. B. Call the inner loop to evaluate the counterfactual expected benefit Y of these treatment options. C. Update the treatment rule parameters. The outer loop is an embodiment of step 206 above.
[0135] The goal of the outer loop is to optimize the meta-rules, that is, to determine the optimal treatment category and timing of administration under different patient conditions. The optimization process is based on counterfactual inference, using model parameters learned from historical data to infer the potential long-term effects of different treatment regimens.
[0136] Here, the meta-rule is defined; a meta-rule is a parameterized decision rule that incorporates known medical knowledge, and the set of meta-rules is defined as {f}. d} d∈[D] This rule is used to guide treatment choices in different patient conditions. An example of this rule is shown below. Figure 5 As shown.
[0137] For the d-th treatment decision f in the k-th potential state d,k Define two key parameters: treatment type m d,k This refers to selecting which treatment event to address (e.g., different types of infusion events or vasopressor events). Timing of administration (τ) d,k This refers to when to apply the treatment after the condition is triggered to achieve the best long-term effect.
[0138] Here, d is the index of the meta-rule, representing the d-th meta-rule in the predefined set of meta-rules. k represents the value of the k-th latent state in the aforementioned Markov chain. That is, each latent state k corresponds to a set of d-th rules with a set of parameters, denoted as m. d,k With τ d,k The goal of the outer loop is to find the optimal meta-rule parameters that maximize the expected final counterfactual benefit Y.
[0139] Based on the definition of the meta-rule, it needs to be reparameterized to adapt to the outer loop. For example, since the objective function cannot be directly differentiated, a policy optimization method is used for optimization, specifically the REINFORCE algorithm. This algorithm samples multiple potential treatment options and estimates gradients based on these samples, progressively optimizing the decision rule. The treatment category and dosing timing are reparameterized separately:
[0140] Treatment type m d,k Since the treatment category is a discrete choice, a probability vector is used to represent the probability of choosing different categories.
[0141] P d,k =Softmax(s d,k )
[0142] Among them, s d,k These are unnormalized parameters; optimizing these unnormalized parameters indirectly adjusts the probability of selecting a treatment category. d,k It is a discrete choice, representing the choice under rule f. d,k The recommended treatment category. Therefore, a probability vector p is used. d,k Let p represent the probability vector for selecting each treatment category, and p d,k The value of is determined by the unnormalized parameter s passed to the softmax function. d,k Control will ultimately be achieved through optimization of s d,k To obtain p d,k 。 Here s d,k This represents the parameter corresponding to the d-th rule in the k-th potential state.
[0143] Timing of drug administration τ d,k Since the timing of drug administration is a continuous variable, a Gaussian distribution is used for modeling. By fixing a small variance, the mean is optimized to v d,k Adjust the timing of drug administration.
[0144]
[0145] Timing of drug administration τ d,k It follows a Gaussian distribution, where v d,k Let v be the mean of this Gaussian distribution. This can be understood as representing the recommended medication duration under the current rules, which lies near the mean v. d,k Nearby. As before, by optimizing the mean v d,k This can indirectly provide information on recommended medication timing.
[0146] Based on the definition of the meta-rule and the first two parts of its reparameterization, the optimization problem can be expressed as:
[0147]
[0148] Among them, the inner layer expectation is to modify the original treatment plan into a new treatment plan. (This modification process is denoted as) ), and based on the original observation data, inferring the past [0,T max During the observation period, if an alternative treatment plan was adopted at that time (i.e.) What is the expected counterfactual gain Y? Because this inference process involves randomness, the expected sign represents the mean of the expected counterfactual gain.
[0149] Outer expectation: Inner expectation requires a set of modified treatment options. How to modify the original treatment plan (i.e., observe the data) ) is the set of rules and its parameters s mentioned above. d,k ,v d,k The decision will be made by sampling the modified treatment type and administration timing from the rules based on the aforementioned distribution, thereby forming a set of... Therefore, the outer expectation represents randomness from the set of rules. v refers to all v... d,k The set s refers to all s d,k The goal is to optimize these parameters so that the treatment plan generated by these parameters maximizes the expected counterfactual benefit Y.
[0150] Based on the inner and outer expectations, and combined with the corresponding parameter distribution, gradient calculation can be performed to update the parameters. The expression is as follows:
[0151]
[0152] Where, it means to directly update s d,k and v d,k Through the aforementioned reparameterization process, the gradient can be estimated using the scorefunction estimator, i.e., the gradient value; the rule parameters will then be adjusted using the REINFORCE algorithm. The core of the REINFORCE algorithm is to estimate the gradient using the scorefunction estimator. After obtaining this gradient estimate, it will be updated using common gradient descent / ascent methods.
[0153] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0154] Based on the same inventive concept, this application also provides a device for optimizing the parameters of a complete medical procedure, which implements the aforementioned method for optimizing the parameters of a complete medical procedure. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the medical procedure parameter optimization device provided below can be found in the limitations of the medical procedure parameter optimization method described above, and will not be repeated here.
[0155] In one exemplary embodiment, such as Figure 6 As shown, a medical procedure parameter optimization device is provided, comprising:
[0156] Modeling process module 602 is used to determine the time series prediction model; the time series prediction model is determined based on multiple historical program processing events and historical detection results under the latent state of continuous potential factors;
[0157] The counterfactual module 604 includes an intervention process module and an inference process module. The intervention process module is used to modify the program event parameters of the initial medical procedure parameter set counterfactually to obtain a counterfactual medical procedure parameter set. The inference process module is used to perform counterfactual inference sampling on the program event parameters of the counterfactual medical procedure parameter set based on the time series prediction model to obtain counterfactual benefits. The counterfactual benefits are used to represent the program effect.
[0158] Feedback module 606 is used to optimize the program event parameters of the initial medical program parameter set based on the counterfactual benefit, so as to obtain an optimized medical program parameter set.
[0159] In one embodiment, the time-series prediction model includes a hidden state inference model and event occurrence intensity; the modeling process module 602 is used for:
[0160] The parameters of the Markov chain model are determined based on the historical latent factors corresponding to T consecutive time periods, and the hidden state inference model is obtained; the hidden state inference model is used to determine the hidden state of each time period.
[0161] Obtain the baseline intensity during the i-th time period;
[0162] Based on the historical program processing events and historical detection results within the i-th time period, the historical impact items within the i-th time period are determined;
[0163] The intensity of the event in the i-th time period is determined based on the baseline intensity in the i-th time period and the historical influence term in the i-th time period.
[0164] Where i and T are both positive integers, and i is less than or equal to T; the intensity of the event occurrence in the i-th time period is used for counterfactual inference sampling based on the program event parameters in the i-th time period.
[0165] In one embodiment, the modeling process module 602 is used for:
[0166] The program event triggering intensity coefficient for the i-th time period is determined based on the historical program processing event type for the i-th time period, and the detection event triggering intensity coefficient for the i-th time period is determined based on the detection result event type for the i-th time period.
[0167] Based on the program event trigger intensity coefficient of the i-th time period and the exponential decay function of the latent state of potential factors in the i-th time period, the program event history items of the i-th time period are determined.
[0168] Based on the trigger intensity coefficient of the detection event in the i-th time period and the exponential decay function of the latent state of the potential factors in the i-th time period, the historical items of the detection event in the i-th time period are determined;
[0169] The event occurrence intensity of the i-th time period is obtained by combining the event baseline intensity, the program event history item of the i-th time period, and the detection event history item of the i-th time period.
[0170] In one embodiment, the intervention process module is used to:
[0171] The program event parameters of the initial medical procedure parameter set in the i-th time period are sampled to obtain the program event parameters to be modified in the i-th time period; where i is a positive integer;
[0172] The parameters of the program events to be modified in the i-th time period are modified to obtain a set of counterfactual medical program parameters containing different modified program event parameters.
[0173] In one embodiment, the inference process module is configured to:
[0174] The hidden state path for each time period is determined based on the time series prediction model, and the intensity of the event is determined by the hidden state of the i-th time period.
[0175] Determine the counterfactual strength of the detection result event corresponding to each set of counterfactual medical procedure parameters in the i-th time period;
[0176] By comparing the counterfactual intensity of each event within the same time period with the intensity of the observed event corresponding to the historical detection results, the counterfactual trajectory of the detection results is obtained.
[0177] Based on the intensity of the event, the counterfactual trajectory is sampled to obtain counterfactual benefits corresponding to various sets of counterfactual medical procedure parameters; where i is a positive integer;
[0178] Based on the average counterfactual benefits corresponding to the same set of counterfactual medical procedure parameters in each time period, the average value of the counterfactual benefits within the observation interval is determined; the average value of the observation interval is used to optimize the program event parameters of the initial set of medical procedure parameters; the observation interval includes the sum of each of the time periods.
[0179] In one embodiment, the program event parameters include program processing category parameters and program processing time parameters, wherein the program processing category parameters are probability vectors and the program processing time parameters are Gaussian distribution parameter values;
[0180] The feedback module 606 is used for:
[0181] The gradient value is obtained by estimating the gradient function based on the mean of the observation interval of the counterfactual gain.
[0182] Based on the gradient value, at least one of the program processing category parameter and the program processing time parameter is optimized to obtain an optimized set of medical program parameters.
[0183] Each module in the aforementioned end-to-end medical procedure parameter optimization device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the computer device's memory as software, so that the processor can call and execute the corresponding operations of each module.
[0184] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 7As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When executed by the processor, the computer program implements a method for optimizing parameters throughout a medical procedure. The display unit is used to create a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0185] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0186] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0187] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0188] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0189] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0190] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0191] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0192] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for optimizing parameters throughout a medical procedure, characterized in that, The method includes: A time-series prediction model is determined; the time-series prediction model is determined based on multiple historical program processing events and historical detection results under the latent state of continuous potential factors; The program event parameters of the initial medical procedure parameter set are modified using counterfactual methods to obtain a counterfactual medical procedure parameter set; based on the time series prediction model, the program event parameters of the counterfactual medical procedure parameter set are sampled using counterfactual inference to obtain counterfactual benefits; the counterfactual benefits are used to represent the program effect. Based on the counterfactual benefit, the program event parameters of the initial medical procedure parameter set are optimized to obtain the optimized medical procedure parameter set.
2. The method according to claim 1, characterized in that, The time series prediction model includes a hidden state inference model and event occurrence intensity; the determination of the time series prediction model includes: The parameters of the Markov chain model are determined based on the historical latent factors corresponding to T consecutive time periods, and the hidden state inference model is obtained; the hidden state inference model is used to determine the hidden state of each time period. Obtain the baseline intensity during the i-th time period; Based on the historical program processing events and historical detection results within the i-th time period, the historical impact items within the i-th time period are determined; The intensity of the event in the i-th time period is determined based on the baseline intensity in the i-th time period and the historical influence term in the i-th time period. Where i and T are both positive integers, and i is less than or equal to T; the intensity of the event occurrence in the i-th time period is used for counterfactual inference sampling based on the program event parameters in the i-th time period.
3. The method according to claim 2, characterized in that, The determination of the historical impact items for the i-th time period based on the historical procedural processing events and historical detection results includes: The program event triggering intensity coefficient for the i-th time period is determined based on the historical program processing event type for the i-th time period, and the detection event triggering intensity coefficient for the i-th time period is determined based on the detection result event type for the i-th time period. Based on the program event trigger intensity coefficient of the i-th time period and the exponential decay function of the latent state of potential factors in the i-th time period, the program event history items of the i-th time period are determined. Based on the trigger intensity coefficient of the detection event in the i-th time period and the exponential decay function of the latent state of the potential factors in the i-th time period, the historical items of the detection event in the i-th time period are determined; The step of determining the event intensity of the i-th time period based on the baseline intensity of the i-th time period and the historical influence term of the i-th time period includes: The event occurrence intensity of the i-th time period is obtained by combining the event baseline intensity, the program event history item of the i-th time period, and the detection event history item of the i-th time period.
4. The method according to claim 1, characterized in that, The counterfactual modification of the program event parameters of the initial medical procedure parameter set yields a counterfactual medical procedure parameter set, including: The program event parameters of the initial medical procedure parameter set in the i-th time period are sampled to obtain the program event parameters to be modified in the i-th time period; where i is a positive integer; The parameters of the program events to be modified in the i-th time period are modified to obtain a set of counterfactual medical program parameters containing different modified program event parameters.
5. The method according to claim 1, characterized in that, The step of sampling counterfactual inferences for program event parameters in the counterfactual medical procedure parameter set to obtain counterfactual benefits includes: The hidden state path for each time period is determined based on the time series prediction model, and the intensity of the event is determined by the hidden state of the i-th time period. Determine the counterfactual strength of the detection result event corresponding to each set of counterfactual medical procedure parameters in the i-th time period; By comparing the counterfactual intensity of each event within the same time period with the intensity of the observed event corresponding to the historical detection results, the counterfactual trajectory of the detection results is obtained. Based on the intensity of the event, the counterfactual trajectory is sampled to obtain counterfactual benefits corresponding to various sets of counterfactual medical procedure parameters; where i is a positive integer; Based on the average counterfactual benefits corresponding to the same set of counterfactual medical procedure parameters in each time period, the average value of the counterfactual benefits within the observation interval is determined; the average value of the observation interval is used to optimize the program event parameters of the initial set of medical procedure parameters; the observation interval includes the sum of each of the time periods.
6. The method according to claim 5, characterized in that, The program event parameters include program processing category parameters and program processing time parameters. The program processing category parameters are probability vectors, and the program processing time parameters are Gaussian distribution parameter values. The step of optimizing the program event parameters of the initial medical procedure parameter set based on the counterfactual benefit to obtain an optimized medical procedure parameter set includes: The gradient value is obtained by estimating the gradient function based on the mean of the observation interval of the counterfactual gain. Based on the gradient value, at least one of the program processing category parameter and the program processing time parameter is optimized to obtain an optimized set of medical program parameters.
7. A device for optimizing parameters throughout a medical procedure, characterized in that, The device includes: The modeling process module is used to determine the time series prediction model; the time series prediction model is determined based on multiple historical program processing events and historical detection results under the latent state of continuous potential factors. The counterfactual module includes an intervention process module and an inference process module. The intervention process module is used to modify the program event parameters of the initial medical procedure parameter set counterfactually to obtain a counterfactual medical procedure parameter set. The inference process module is used to perform counterfactual inference sampling on the program event parameters of the counterfactual medical procedure parameter set based on the time series prediction model to obtain counterfactual benefits. The counterfactual benefits are used to represent the program effect. The feedback process module is used to optimize the program event parameters of the initial medical procedure parameter set based on the counterfactual benefit, so as to obtain the optimized medical procedure parameter set.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.