Drug supply and demand balance intelligent regulation and allocation system based on data analysis
By constructing causal decontamination inputs and spatiotemporal dynamic graph mapping, combined with mean-field game modeling and physics-driven solutions, a global equilibrium strategy is generated, solving the problem of resource oscillation and allocation polarization in urban-level medical logistics networks, and realizing intelligent regulation of drug supply and demand balance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XUZHOU GUANGSHENG REAL ESTATE NETWORK INFORMATION CO LTD
- Filing Date
- 2025-12-19
- Publication Date
- 2026-04-24
AI Technical Summary
Existing technologies lack macro-level game constraints in city-level medical logistics networks, leading to resource fluctuations and allocation polarization under emergencies. Traditional prediction systems cannot eliminate panic-driven false reporting noise, have excessively long computation times that cannot meet real-time response requirements, and struggle to adapt execution control to nonlinear strategy fluctuations.
A data-driven intelligent regulation and allocation system for drug supply and demand balance is adopted, including a causal decontamination input module, a spatiotemporal dynamic graph mapping module, a mean-field game modeling module, a physics-driven solution module, and a strategy simulation verification module. It generates a global equilibrium strategy that takes into account both individual and overall factors, and performs resource scheduling by constructing a structural causal topology graph, a weighted directed graph, a coupled set of partial differential equations, and a deep neural network.
It improves the problems of resource oscillation and allocation polarization in traditional scheduling, enhances the accuracy of demand assessment and computational efficiency, realizes real-time response and precise material distribution, and avoids resource mismatch and distribution lag.
Smart Images

Figure CN121922320A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of medical logistics management and intelligent decision-making technology, and in particular to a data analysis-based intelligent regulation and allocation system for drug supply and demand balance. Background Technology
[0002] With the deep integration of smart healthcare systems and regional integrated medical alliances, medical supply chain management has shifted from internal inventory control by a single institution to multi-node, high-frequency regional collaborative scheduling. Existing city-level medical logistics networks involve a vast number of nodes at different levels, including tertiary hospitals, secondary hubs, and primary healthcare stations. These nodes interact in real-time with hospital information systems and warehouse management systems to exchange inventory status and consumption data. To maintain a balance between supply and demand for medicines and emergency supplies within this complex network, the industry widely adopts IoT-based data collection technologies and statistical prediction algorithms, utilizing the temporal characteristics of historical referral records and material consumption flows to guide logistics and distribution. This data-driven, digital allocation model forms the foundation of the current regional medical supply guarantee system, aiming to solve the problems of information opacity and response delays in the material flow process through information technology, thereby maintaining the efficiency of material turnover under normal medical conditions. Summary of the Invention
[0003] To address the above shortcomings, this invention provides a data-driven intelligent regulation and allocation system for drug supply and demand balance. This system aims to improve upon the traditional approach of relying on independent scheduling of local inventory, which, due to the lack of macro-level game-theoretic constraints, leads to resource fluctuations and allocation polarization caused by blind scrambling during emergencies.
[0004] This invention provides the following technical solution: a data analysis-based intelligent regulation and allocation system for drug supply and demand balance, comprising the following modules:
[0005] The causal decontamination input module is used to construct a structural causal topology graph, use the backdoor criterion to block non-causal paths and calculate the intervention distribution, and output the real demand drift parameters.
[0006] The spatiotemporal dynamic graph mapping module is used to construct a weighted directed graph based on logistics accessibility and map the real demand drift parameters to graph nodes to generate an initial state field.
[0007] The mean-field game modeling module is used to receive the initial state field to construct a stochastic dynamics model and establish a set of coupled partial differential equations describing the Nash equilibrium of the system based on mean-field theory.
[0008] The physics-driven solution module is used to construct a deep neural network, which transforms the coupled partial differential equations into a physical constraint residual embedding loss function, and obtains the value function mapping relationship representing the global optimal strategy through iterative training.
[0009] The strategy simulation verification module is used to generate candidate strategies using the value function, perform stress tests in a digital twin environment, and output a verification pass signal when the indicators meet the target.
[0010] The equilibrium control execution module is used to respond to the verification pass signal, input the real-time inventory into the trained neural network, use automatic differentiation to calculate the negative gradient with respect to the state input, generate physical allocation instructions and send them to the warehousing and logistics equipment for execution and distribution.
[0011] By adopting the above technical solutions, mean-field game modeling and physical-driven network solution, a global equilibrium strategy that takes into account both individuals and the whole is generated. This improves the problem that traditional methods mostly use independent scheduling of local inventory, which, due to the lack of macro-game constraints, leads to resource fluctuations and allocation polarization caused by blind grabbing in sudden situations.
[0012] Preferably, the causal decongestant input includes:
[0013] We define the true incidence rate as a latent variable, the observed order flow as an outcome variable, and the social sentiment index as a confounding factor. We construct a directed acyclic graph among the three and set a non-causal path from the social sentiment index to the observed order flow in the graph.
[0014] According to the backdoor criterion, the social sentiment index was selected as the set of blocking variables;
[0015] The observed social sentiment index is processed by hierarchical discretization. For each discrete level, the conditional probability of the observed order flow under a given true incidence rate is calculated.
[0016] We take the conditional probability at each discrete level and the marginal probability of the social sentiment index at that level, and sum and integrate them to obtain the observed order flow distribution after intervention of the real incidence rate. Then, we perform regression fitting on the distribution to generate the real demand drift parameters.
[0017] Preferably, the spatiotemporal dynamic map mapping includes:
[0018] Retrieve historical referral records from medical institutions within the region, map the medical institutions as graph nodes, and map the referral paths as directed edges;
[0019] The frequency of referrals per unit time is statistically analyzed, and after normalization, it is used as the weight of the patient flow intensity of directed edges to construct a weighted adjacency matrix representing regional correlation.
[0020] Generate a time series tensor with dimensions equal to the number of nodes, and fill the diagonal positions of the tensor with the actual demand drift parameters;
[0021] Perform a Hadamard product operation between the time series tensor and the weighted adjacency matrix to output an initial state field containing spatial topological structure and temporal evolution characteristics.
[0022] Preferably, the mean-field game modeling includes:
[0023] Establish a stochastic differential equation describing the changes in the inventory status of a single medical node. Set the coefficient of the drift term of the equation to be the difference between the actual demand drift parameter and the current replenishment rate, and set the coefficient of the diffusion term to be the standard deviation of historical demand fluctuations.
[0024] Define a cost functional that includes holding costs, stockout penalties, control work, and mean field coupling terms.
[0025] The calculation logic of the mean field coupling term is constructed to calculate the square of the difference between the inventory state of a single medical node and the first moment of the global average inventory distribution, and the squared value is multiplied by a preset game intensity coefficient as a penalty constraint for deviation from the equilibrium state.
[0026] Preferably, the mean-field game modeling further includes:
[0027] A reverse evolution strategy equation is constructed, which includes a time derivative term, a Hamiltonian operator term with respect to the first spatial derivative, and the mean field coupling term, for inverse solution of the value function;
[0028] Find the extreme value of the Hamiltonian operator term in the reverse evolution strategy equation to analyze the optimal control strategy expression with respect to the gradient of the value function space;
[0029] A forward evolution distribution equation is constructed, which includes a time derivative term, a convection term containing the expression of the optimal control strategy, and a second-order diffusion term, and is used to forward deduce the global distribution density.
[0030] By combining the reverse evolution strategy equation and the forward evolution distribution equation, a closed-loop equation system is formed in which state variables and distribution variables are nested.
[0031] Preferably, the physics-driven solution includes:
[0032] A fully connected feedforward neural network is constructed as the value network and density network, with the input layer set as spatiotemporal coordinates and the output layers as value scalar and density scalar, respectively.
[0033] Locating points are selected within a predefined spatiotemporal region using the Latin hypercube sampling method.
[0034] The partial derivatives of the value network and density network with respect to the spatiotemporal coordinate inputs are calculated using an automatic differentiation algorithm.
[0035] Substitute the partial derivatives into the coupled partial differential equations, calculate the sum of squared differences between the left and right sides of the equations as the physical residual term, and add it to the total loss function;
[0036] The network parameters are updated using an adaptive moment estimator until the physical residual term converges.
[0037] Preferably, the physics-driven solution further includes:
[0038] Construct two sets of virtual input vectors. The first set of vectors has the confounding factor dimension fixed at a high panic value, and the second set of vectors has the confounding factor dimension fixed at a low panic value.
[0039] The two sets of virtual input vectors are input into the value network respectively to obtain two value function output values;
[0040] Calculate the square of the difference between the output values of these two value functions, and construct the counterfactual regret regularization term;
[0041] The counterfactual regret regularization term is added to the total loss function, thereby minimizing the sensitivity of the value network to the confounding factor dimension.
[0042] Preferably, the strategy simulation verification includes:
[0043] Construct a digital twin environment containing virtual node objects that correspond one-to-one with real nodes;
[0044] In a digital twin environment, a burst demand pulse signal following a Poisson distribution is generated and injected into a randomly selected virtual node object;
[0045] The replenishment instructions for each virtual node object are calculated using the value function mapping relationship, and the simulation clock is run.
[0046] Real-time recording of the inventory gap queue length of virtual node objects and the average waiting time of the virtual logistics network;
[0047] Determine whether the length of the inventory gap queue converges to a preset upper limit and whether the average waiting time is less than a preset threshold. If both conditions are met, the verification is considered successful.
[0048] Preferably, the equilibrium control execution includes:
[0049] Real-time inventory values from the target medical institution's warehouse management system are read via an IoT interface;
[0050] The input tensor is constructed by normalizing the real-time inventory value and the current system time.
[0051] The input tensor is input into the trained value network, and forward propagation is performed.
[0052] Based on the backpropagation chain rule, calculate the first-order partial derivative of the value network output with respect to the inventory dimension of the input tensor;
[0053] The first-order partial derivative is negative and multiplied by a preset adjustment coefficient to obtain the physical replenishment rate command.
[0054] Preferably, the equilibrium control execution further includes:
[0055] A discrete empirical distribution is generated by aggregating the real-time inventory values of all nodes within the region.
[0056] The density network is invoked to generate the theoretical equilibrium distribution at the current moment;
[0057] Calculate the first-order Wasserstein distance between the discrete empirical distribution and the theoretical equilibrium distribution;
[0058] The damping coefficient is calculated by substituting the first-order Wasserstein distance into a preset exponential decay function.
[0059] The physical replenishment rate command is multiplied and corrected using the damping coefficient, and the corrected command is packaged and sent via a communication protocol.
[0060] The present invention has the following beneficial effects:
[0061] 1. In this invention, by modeling average field games and solving physical driving networks, a global equilibrium strategy that takes into account both individuals and the whole is generated. This improves the problem that traditional methods mostly use independent scheduling of local inventory, which, due to the lack of macro game constraints, leads to resource fluctuations and allocation polarization caused by blind grabbing in sudden situations.
[0062] 2. In this invention, the causal decontamination input module uses the backdoor criterion to block non-causal paths and calculate the intervention distribution, thereby obtaining the real demand parameters that are not affected by irrational interference. This improves the problem that traditional prediction systems mostly use historical data statistical extrapolation, which cannot eliminate panic false reporting noise, resulting in distorted demand assessment and resource misallocation.
[0063] 3. In this invention, a deep neural network is constructed through a physics-driven solution module to transform the coupled equation set into physical constraint residuals for training, thereby overcoming the high-dimensional computation bottleneck and quickly obtaining the global optimal strategy. This improves the problem that traditional numerical solutions mostly use grid discretization methods, which suffer from the curse of dimensionality, resulting in excessively long computation time and inability to meet real-time response requirements.
[0064] 4. In this invention, the equalization control execution module uses the negative gradient of the value network with respect to the state input to generate instructions, thereby realizing the accurate mapping from high-dimensional strategy to physical action. This improves the problem that traditional execution control mostly uses preset rule lookup tables, which is difficult to adapt to nonlinear strategy fluctuations, resulting in the material distribution lagging behind real-time demand changes. Attached Figure Description
[0065] Figure 1 This is a module architecture diagram of the intelligent regulation and allocation system for drug supply and demand balance based on data analysis proposed in this invention.
[0066] Figure 2 This is a detailed flowchart of the data sensing and map construction process for the intelligent regulation and allocation system for drug supply and demand balance based on data analysis proposed in this invention.
[0067] Figure 3 This is a flowchart illustrating the game modeling and physics-driven solution process for the intelligent regulation and allocation system for drug supply and demand balance based on data analysis proposed in this invention.
[0068] Figure 4 This is a simulation verification and balanced execution flowchart of the intelligent regulation and allocation system for drug supply and demand based on data analysis proposed in this invention. Detailed Implementation
[0069] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0070] Example 1: In the first embodiment of the present invention, the present invention provides a data analysis-based intelligent regulation and allocation system for drug supply and demand balance, such as... Figures 1-4 As shown, it includes the following steps:
[0071] The causal decontamination input module is used to construct a structural causal topology graph, use the backdoor criterion to block non-causal paths and calculate the intervention distribution, and output the real demand drift parameters.
[0072] Furthermore, causal decontamination of inputs includes:
[0073] We define the true incidence rate as a latent variable, the observed order flow as an outcome variable, and the social sentiment index as a confounding factor. We construct a directed acyclic graph among the three and set a non-causal path from the social sentiment index to the observed order flow in the graph.
[0074] According to the backdoor criterion, the social sentiment index was selected as the set of blocking variables;
[0075] The observed social sentiment index is processed by hierarchical discretization. For each discrete level, the conditional probability of the observed order flow under a given true incidence rate is calculated.
[0076] We take the conditional probability at each discrete level and the marginal probability of the social sentiment index at that level, and sum them together to obtain the observed order flow distribution after intervention in the true incidence rate. We then perform regression fitting on this distribution to generate the true demand drift parameters.
[0077] Specifically, the causal decontamination input module, serving as the system's perception front-end, primarily addresses the issue of spurious correlations in multi-source heterogeneous data. This module extracts socio-psychological factors that could trigger panic buying from the original order data by performing backdoor criterion calculations, providing subsequent dynamic modeling with true demand drift parameters that are only relevant to pathological characteristics.
[0078] First, define the variables in the collected regional data: set the true incidence rate. For hidden variables that cannot be directly observed, define the observation order flow. As the outcome variable, a social sentiment index was defined. As a confounding factor, a directed acyclic graph is constructed to establish the dependencies among the three: the directed edge from the true incidence rate to the observed order flow represents the true pathological demand; the directed edge from the social sentiment index to the observed order flow represents the irrational panic demand; and the directed edge from the social sentiment index to the true incidence rate represents the inflated confirmed case statistics caused by the surge in testing volume due to panic.
[0079] In order to cut off the social media sentiment index For observation of order flow Non-causal interference; the system uses the backdoor criterion to affect the social sentiment index. Selected as the blocking variable. Given that social media sentiment indexes are typically continuous variables, the module performs hierarchical discretization, dividing the value space into... Discrete levels .
[0080] For each discrete level The system calculates the incidence rate given a true incidence rate. and specific levels of public opinion Under these conditions, observe the order flow conditional probability Subsequently, the dry budget was introduced. The demand distribution after intervention was calculated using the full probability weighted formula. :
[0081] ;
[0082] in This indicates the order flow distribution driven solely by the incidence rate after artificially removing interference from public opinion. This is a conditional probability table representing a specific level of public opinion, obtained from historical data statistics. This indicates the marginal probability of this level of public opinion occurring within the statistical period; This represents the total number of discretized levels.
[0083] The module calculates the distribution Expected values are extracted, and regression fitting is performed on the time series to generate parameters for the actual demand drift. : ;in This is the mathematical expectation operator. This parameter... After being encapsulated, it serves as a pure driving signal and is input into the stochastic differential equation of the mean-field game modeling module.
[0084] Through the aforementioned causal decongestion process, the system established a causal mapping between observed data and pathological variables. In the face of sudden public health emergencies, even if social media experiences intense panic and emotional fluctuations... Significant fluctuations, after weighted integration It can still maintain stable tracking of pathological development trends. This approach eliminates the multiplier effect of confounding factors on supply chain demand forecasting, ensuring that subsequent game theory models converge to the true supply and demand equilibrium point, rather than being misled by noisy data into a false shortage state.
[0085] The spatiotemporal dynamic graph mapping module is used to construct a weighted directed graph based on logistics accessibility, and to map the real demand drift parameters to the graph nodes to generate the initial state field.
[0086] Furthermore, the spatiotemporal dynamic map mapping includes:
[0087] Retrieve historical referral records from medical institutions within the region, map the medical institutions as graph nodes, and map the referral paths as directed edges;
[0088] The frequency of referrals per unit time is statistically analyzed, and after normalization, it is used as the weight of the patient flow intensity of directed edges to construct a weighted adjacency matrix representing regional correlation.
[0089] Generate a time series tensor with dimensions equal to the number of nodes, and fill the diagonal positions of this tensor with the actual demand drift parameters;
[0090] Perform a Hadamard product operation between the time series tensor and the weighted adjacency matrix to output an initial state field that includes spatial topology and temporal evolution characteristics.
[0091] Specifically, the system first retrieves historical referral records from medical institutions at all levels within the target area within a preset time window. The medical institutions within the area are then defined as a set of graph nodes. ,in Let the total number of medical institutions be denoted as . The actual referral paths between institutions are defined as a set of directed edges. .
[0092] For a set of directed edges Statistical unit time Inner slave node Pointing to node referral frequency To eliminate data bias between institutions of different scales, frequency was normalized to establish a weighting for patient turnover intensity. The specific calculation formula is as follows: ;in Representation Nodes To the node The original referral traffic, The set of flows over all directed edges, and These are the minimum and maximum values in the set, respectively. Based on the calculated... Construct a weighted adjacency matrix representing regional associations The matrix has dimensions of , where matrix elements .
[0093] Introducing real demand drift parameters This parameter reflects the rate of change in workload or demand fluctuations of healthcare institutions over time. A dimension is generated as follows: time series tensors ,in The time step is the actual demand drift parameter. Fill to Zhang Xing At the diagonal positions of each time slice, the remaining positions are initialized to a unit base value of 1 to preserve the original transitivity filling logic of the spatial topology:
[0094] ;
[0095] in For the first Each node The demand drift coefficient at any given moment These are elements in the time series tensor.
[0096] Weighted adjacency matrix Along the time dimension Broadcast to adapt its dimensions to Subsequently, with time series tensors Perform the Hadamard product operation and output the initial state field. The computational model is as follows: The expanded form is: ;in This indicates element-wise multiplication. In the initial state field Time Node For nodes The spatiotemporal coupling strength value.
[0097] Through the steps S1 to S4 described above, this technical solution uses the Hadamard product operation to represent the actual demand drift parameter that characterizes the time evolution. By forcibly coupling the data to the diagonal of the adjacency matrix representing the spatial structure and the transmission path, the limitations of traditional static graphs in simultaneously representing node load fluctuations and marginal transmission capabilities in a single model are overcome. This avoids the misallocation of medical resources caused by subsequent resource scheduling algorithms ignoring real-time demand drift of nodes. This initial state field... It includes topological connection weights in the spatial dimension and incorporates the demand features in the time series in the node dimension, providing an input tensor with complete spatiotemporal information for subsequent graph neural network prediction.
[0098] The mean-field game modeling module is used to receive the initial state field to construct a stochastic dynamics model and establish a set of coupled partial differential equations describing the Nash equilibrium of the system based on mean-field theory.
[0099] Furthermore, mean-field game modeling includes:
[0100] Establish a stochastic differential equation describing the changes in the inventory status of a single medical node. Set the coefficient of the drift term in the equation as the difference between the actual demand drift parameter and the current replenishment rate, and set the coefficient of the diffusion term as the standard deviation of historical demand fluctuations.
[0101] Define a cost functional that includes holding costs, stockout penalties, control work, and mean field coupling terms.
[0102] The calculation logic of the mean field coupling term is constructed to calculate the square of the difference between the inventory state of a single medical node and the first moment of the global average inventory distribution, and multiply the squared value by a preset game intensity coefficient as a penalty constraint for deviation from the equilibrium state.
[0103] Mean-field game modeling also includes:
[0104] A reverse evolution strategy equation is constructed, which includes a time derivative term, a Hamiltonian operator term with respect to the first spatial derivative, and a mean-field coupling term, for inverse solution of the value function.
[0105] By finding the extrema of the Hamiltonian operator term in the reverse evolution strategy equation, the optimal control strategy expression with respect to the gradient of the value function space is obtained analytically.
[0106] A forward evolution distribution equation is constructed, which includes a time derivative term, a convection term containing the expression of the optimal control strategy, and a second-order diffusion term, and is used to forward deduce the global distribution density.
[0107] By simultaneously solving the reverse evolution strategy equation and the forward evolution distribution equation, a closed-loop system of equations is formed in which state variables and distribution variables are nested.
[0108] Specifically, based on the initial state field, a stochastic differential equation is established to describe the changes in the inventory state of a single medical node. The inventory state variable is set as follows: Its evolution follows the Itō process:
[0109] ;
[0110] in express Replenishment rate at all times The difference between the actual demand drift parameters derived from the initial state field and the actual drift parameters is... The coefficients of the drift term in the equation represent the deterministic trend of inventory. The standard deviation of historical demand fluctuations is used as the coefficient for the diffusion term. It represents standard Brownian motion, characterizing random perturbations.
[0111] Constructing the objective function, i.e., the cost functional This is used to evaluate the cost of a control strategy. The functional consists of path cost and terminal cost, where the path cost comprises the following four items:
[0112] Cost of holding: This represents the capital tied up in inventory; stockout penalties: This characterizes the medical risks caused by insufficient inventory; it controls the work done. This represents the kinetic energy or cost required for logistics scheduling. Damping coefficient; Mean field coupling term: .
[0113] The calculation logic for constructing the mean-field coupling term is as follows:
[0114] ;
[0115] in The preset game intensity coefficient; for Time-domain global inventory distribution density function; integral term This refers to the first moment of the global average inventory distribution. This term quantifies the state of individual nodes. Deviations from the system's average state impose penalty constraints on behaviors that deviate from the equilibrium state.
[0116] Based on the principle of dynamic programming, a Hamilton-Jacobi-Bellman equation is constructed for backpropagation of the value function. The equation takes the following form:
[0117] ;
[0118] in For the time derivative term; and These are the first and second derivatives of the value function with respect to space, respectively; The cost terms are related to control; the part within the curly braces is the Hamiltonian operator term. This equation is from the terminal time... To the initial time Reverse evolution.
[0119] The Hamiltonian operator term in S3 with respect to the control variable To find the extreme value, based on the first-order optimality condition, the optimal control strategy expression is analytically derived. : The formula indicates that the optimal replenishment rate is negatively correlated with the spatial gradient of the value function, meaning that the direction in which the inventory value decreases the fastest is the optimal replenishment direction.
[0120] The Fock-Planck equation is introduced to describe the inventory distribution density of medical nodes across the entire domain. Evolution over time. Optimal control strategy. Substituting the convection term, the equations are constructed as follows:
[0121] ;
[0122] in For the time derivative term; For the convection term containing the optimal control strategy, it represents the migration of the probabilistic flow with control and drift; This is a second-order diffusion term, characterizing the distribution broadening caused by random fluctuations. The equation starts from the initial time... To the terminal time Forward deduction.
[0123] Combining the reverse evolution strategy equation in S3 with the forward evolution distribution equation in S5, we form a set of closed-loop equations for the mean-field game: The system outputs the closed-loop equations, where This determines the optimal strategy for a single entity. The macroscopic distribution of the population is determined, and the two are mutually constrained through coupling terms until convergence.
[0124] Through the above steps, this technical solution introduces an average field coupling term. A closed-loop solution system is established, nesting the reverse evolution strategy equation and the forward evolution distribution equation. This improves upon the shortcomings of traditional distributed scheduling models, such as blind resource grabbing and systemic oscillations caused by the lack of macro-constraints on a macro level. This avoids the resource distribution polarization problem of ineffective redundancy accumulation of medical resources in local institutions or supply gaps in certain regions. The scheme utilizes mean-field theory to reduce the dimensionality of high-dimensional multi-node games to the coupling effect of individual nodes and macro-distribution, achieving a dynamic balance between individual inventory strategies and global resource distribution while ensuring computational convergence.
[0125] The physics-driven solution module is used to construct a deep neural network, which transforms the coupled partial differential equation system into a physical constraint residual embedding loss function, and obtains the value function mapping relationship representing the global optimal strategy through iterative training;
[0126] Furthermore, physics-driven solutions include:
[0127] A fully connected feedforward neural network is constructed as the value network and density network, with the input layer set as spatiotemporal coordinates and the output layers as value scalar and density scalar, respectively.
[0128] Locating points are selected within a predefined spatiotemporal region using the Latin hypercube sampling method.
[0129] The partial derivatives of the value network and density network with respect to the spatiotemporal coordinate inputs are calculated using an automatic differentiation algorithm.
[0130] Substitute the partial derivatives into the coupled partial differential equations, calculate the sum of squared differences between the left and right sides of the equations as the physical residual term, and add it to the total loss function;
[0131] The network parameters are updated using an adaptive moment estimator until the physical residual term converges.
[0132] Physics-driven solutions also include:
[0133] Construct two sets of virtual input vectors. The first set of vectors has the confounding factor dimension fixed at a high panic value, and the second set of vectors has the confounding factor dimension fixed at a low panic value.
[0134] Inputting these two sets of virtual input vectors into the value network yields two value function output values.
[0135] Calculate the square of the difference between the output values of these two value functions, and construct the counterfactual regret regularization term;
[0136] By adding a counterfactual regret regularization term to the total loss function, the sensitivity of the value network to confounding factor dimensions is constrained by minimizing this regularization term.
[0137] Specifically, the physics-driven solution module receives the closed-loop coupled partial differential equation system constructed in the previous stage and approximates the analytical solutions of the value function and density function by constructing a physical information neural network.
[0138] Construct two independent fully connected feedforward neural networks, defined as the value networks respectively. and density network Set the spatiotemporal coordinate vector received by the network input layer. and confounding factors Configure the network output layer: Output scalar Characterizes the value function; Output scalar , representing the distribution density function. The network parameter sets are denoted as . and .
[0139] In a predefined spatiotemporal region Within, the Latin hypercube sampling method is used to select the collocation set. ,in The number of points is determined. Using the automatic differentiation algorithm of a deep learning framework, the calculations are performed respectively. and Regarding input variables and First and second partial derivatives, to obtain as well as .
[0140] Substitute the calculated partial derivatives into the reverse evolution strategy equation and the forward evolution distribution equation constructed in the aforementioned embodiments. Calculate the difference between the left and right sides of the equations to construct the physical residual loss function. :
[0141] ;
[0142] in The residual value is the value of the reverse evolution strategy equation. The residual values are the values of the forward evolution distribution equation. This represents the square of the Euclidean norm.
[0143] Two sets of virtual input vectors are constructed for causal inference constraints. The first set of virtual input vectors... Preserving spacetime coordinates Keeping the confounding factor dimension unchanged, it is fixed at the preset high panic value. The second set of virtual input vectors Preserving spacetime coordinates Keeping the confounding factor dimension unchanged, the preset low panic value is fixed. .Will and Input value network respectively To obtain the corresponding output value and Calculate the square of the difference between the two and construct the counterfactual regret regularization term. :
[0144] ;
[0145] This constraint constrains the value function for irrational confounding factors. The sensitivity to [the material] forces the model to focus on objective supply and demand relationships.
[0146] The physical residual term and the counterfactual regret regularization term are aggregated into a total loss function. :
[0147] ;
[0148] in These are the regularization weight coefficients. An adaptive moment estimation optimizer is used to optimize the network parameters. and Perform iterative updates to minimize The process continues until the physical residual term converges to a preset threshold, at which point the mapping relationship between the trained value network and density network is output.
[0149] Through the above steps, this technical solution transforms the coupled partial differential equation system into physically constrained residuals. And combined with counterfactual regret regularization By embedding a loss function, this approach improves upon the curse of dimensionality and the overfitting of models to irrational interference factors faced by traditional numerical solutions when dealing with high-dimensional nonlinear equations. This avoids irrational resource-consuming decisions or computational non-convergence problems arising from extreme emotional interference in the policy model. Leveraging the universal approximation capability and counterfactual reasoning logic of neural networks, this scheme achieves a globally optimal policy solution that is robust to mixed interference while adhering to physical constraints.
[0150] The strategy simulation and verification module is used to generate candidate strategies using the value function, perform stress tests in a digital twin environment, and output a verification pass signal when the indicators are met.
[0151] Furthermore, strategy simulation verification includes:
[0152] Construct a digital twin environment containing virtual node objects that correspond one-to-one with real nodes;
[0153] In a digital twin environment, a burst demand pulse signal following a Poisson distribution is generated and injected into a randomly selected virtual node object;
[0154] The replenishment instructions for each virtual node object are calculated using the value function mapping relationship, and the simulation clock is run.
[0155] Real-time recording of the inventory gap queue length of virtual node objects and the average waiting time of the virtual logistics network;
[0156] Determine whether the length of the inventory gap queue converges to the preset upper limit and whether the average waiting time is less than the preset threshold. If both conditions are met, the verification is considered successful.
[0157] Specifically, establish a digital twin environment that matches the topology of the real physical logistics network. Define a set of virtual nodes. Each virtual node object It corresponds one-to-one with real medical institution nodes, inheriting the storage capacity, processing bandwidth, and geographical location attributes of the real nodes.
[0158] During operation in the digital twin environment, burst demand pulse signals following a Poisson distribution are generated. A subset of virtual node objects are randomly selected as the targets of pressure, and high-frequency demand commands are injected into them. The probability distribution of this pulse signal satisfies the following formula: ;in Represents probability. Indicates the cutoff time. The cumulative demand reached, The length of the observation time interval. This refers to the number of sudden demand events that occur within this time interval. This is the average arrival rate parameter for sudden demand within a unit of time.
[0159] Load the value function output by the physics-driven solver module Each virtual node object calculates the optimal replenishment instruction for its current state based on this value function. The calculation logic is as follows:
[0160] ;
[0161] in To control the amount of replenishment, The inverse of the damping coefficient matrix is... This represents the gradient vector of the value function with respect to the spatial state. The system-driven simulation clock advances in discrete time steps, and each virtual node follows... Perform a simulated replenishment operation.
[0162] During the simulation, two key performance indicators were monitored and recorded in real time: the length of the inventory gap queue for virtual node objects. Average waiting time compared to virtual logistics networks Inventory gap queue length Defined as the backlog of unmet demand orders at the current moment. Average waiting time. The calculation formula is: ;in This represents the total number of orders processed within the simulation period. For the first The timestamp generated by each order The timestamp indicating when the order was delivered.
[0163] Set an upper limit for inventory gap convergence. With waiting time threshold At the end of the simulation cycle, the following logical judgment is executed: ;in The total simulation duration is... A value of 1 indicates that the verification has passed. A value of 0 indicates verification failure. The module outputs a verification pass signal only when both conditions are met, allowing the strategy to be deployed to the real physical system.
[0164] Through steps S1 to S5 described above, this technical solution improves upon the shortcomings of traditional static simulation verification, which only evaluates strategy effectiveness under ideal stable flow conditions while ignoring extreme random disturbances, by introducing a random pulse signal following a Poisson distribution into the digital twin environment and setting dual convergence constraints. This avoids the problem of system collapse or performance paralysis when the theoretically optimal strategy encounters a sudden public health event or a surge in demand. The solution utilizes high-pressure testing to filter out strategies lacking resilience, ensuring that the control algorithm deployed online possesses engineering robustness to cope with nonlinear sudden risks.
[0165] The equilibrium control execution module is used to respond to the verification signal, input the real-time inventory into the trained neural network, use automatic differentiation to calculate the negative gradient with respect to the state input, generate physical allocation instructions and send them to the warehousing and logistics equipment for execution and distribution;
[0166] Furthermore, the implementation of balanced regulation includes:
[0167] Real-time inventory values from the target medical institution's warehouse management system are read via an IoT interface;
[0168] The input tensor is constructed by normalizing the real-time inventory values and the current system time.
[0169] Input the input tensor into the trained value network and perform forward propagation;
[0170] Based on the backpropagation chain rule, calculate the first-order partial derivative of the value network output with respect to the inventory dimension of the input tensor;
[0171] The physical replenishment rate command is obtained by negating the first-order partial derivative and multiplying it by a preset adjustment coefficient.
[0172] The implementation of balanced regulation also includes:
[0173] A discrete empirical distribution is generated by aggregating the real-time inventory values of all nodes within the region.
[0174] The density network is invoked to generate the theoretical equilibrium distribution at the current moment;
[0175] Calculate the first-order Wasserstein distance between the discrete empirical distribution and the theoretical equilibrium distribution;
[0176] The damping coefficient is calculated by substituting the first-order Wasserstein distance into the preset exponential decay function.
[0177] The physical replenishment rate command is multiplied and corrected using the damping coefficient, and the corrected command is packaged and sent via a communication protocol.
[0178] Specifically, it establishes communication with the target medical institution's warehouse management system through an IoT interface to read the current time. Real-time inventory values The real-time inventory values are normalized, and the input tensor is constructed by combining the normalized timestamps. This tensor needs to be adapted to the dimensionality requirements of the value network input layer.
[0179] Input tensor The value network trained by the physics-driven solution module is input into the input. Perform the forward propagation process and temporarily store the value scalar at the output. Based on the backpropagation chain rule, invoke the automatic differentiation engine to calculate the value network output. Regarding the inventory state dimension in the input tensor First-order partial derivatives The partial derivative is then negative and multiplied by a preset adjustment coefficient. Generate basic physical replenishment rate instructions The calculation logic is as follows: ;in This is an adjustment coefficient set based on the mechanical characteristics of the storage equipment. The rate of change of the value function as inventory increases.
[0180] Aggregate the real-time inventory values of all medical nodes within the region at the current moment to generate a discrete empirical distribution. Simultaneously calling density network Input the current spatiotemporal coordinates to generate the theoretical equilibrium distribution. .calculate and The first-order Wasserstein distance between This is used to quantify the deviation between the current macroscopic state of the system and the ideal equilibrium state. The calculation formula is:
[0181] ;
[0182] in Indicated by and Let the set of all joint distributions of the marginal distributions be denoted as . For a joint distribution scheme, For transportation costs.
[0183] Using the first-order Wasserstein distance Calculate the dynamic damping coefficient It adopts an exponential decay function form: ;in The preset attenuation constant, The base of the natural logarithm. Using the damping coefficient. Basic physical replenishment rate instructions Perform multiplication corrections to obtain the final allocation instructions. :
[0184] ;
[0185] Among them The data is converted into control messages that can be recognized by warehousing and logistics equipment, and then packaged and sent to automated sorting lines or AGV scheduling systems for execution via TCP / IP communication protocol.
[0186] Through the above steps, this technical solution uses automatic differentiation to obtain the value gradient to guide replenishment direction, and combines it with Wasserstein distance to construct an exponentially decaying damping mechanism. This improves upon the response lag and overshoot oscillation defects of traditional PID control or fixed threshold scheduling when dealing with non-convex and nonlinear inventory fluctuations. This avoids the amplified bullwhip effect or logistics network congestion caused by overly aggressive replenishment operations when the system's macroscopic distribution deviates significantly from equilibrium. This solution utilizes gradient information from neural networks to ensure the optimality of individual adjustment directions and uses distribution distance damping to ensure the stability of group evolution.
[0187] Example 2: Automated dynamic dispatching of emergency supplies in a city-level integrated medical consortium. This scenario covers a complex logistics network within the region, comprising a tertiary-level Class A hospital as the core node, secondary hospitals as regional hubs, and numerous community health service centers as end nodes. The system connects in real-time to the HIS and WMS of medical institutions at all levels via IoT interfaces to obtain referral path data and inventory consumption rates. When a seasonal influenza peak or a new infectious disease outbreak occurs in the region, patient flow undergoes a non-linear dynamic migration between different levels of medical institutions as the disease progresses. Each medical institution, as an independent decision-making entity, faces a complex situation where real demand drifts while panic stockpiling occurs. Ultimately, a centralized dispatching system drives automated logistics equipment to perform high-frequency supply replenishment tasks.
[0188] In the above scenarios, traditional scheduling technologies mainly face the following technical shortcomings: Traditional models often use static geographical topology to represent logistics networks, making it impossible to map the spatial drift of material demand caused by patient referrals in real time within a single model, resulting in spatial misalignment between delivery routes and actual medical load centers. Simultaneously, distributed scheduling strategies based on Min-Max thresholds only pursue local inventory optimization for individual nodes, lacking macro-level game constraints for global resource competition. Under sudden shortages, this easily leads to systemic oscillations and distribution polarization where nodes blindly seize resources, resulting in ineffective stockpiling at some nodes and supply depletion at key nodes. Furthermore, existing linear programming methods struggle to effectively remove irrational panic interference from data and face the curse of dimensionality when solving high-dimensional coupled dynamic equations involving dozens of nodes, failing to meet the dual requirements of minute-level response timeliness and global strategy convergence in emergency material scheduling. To address these issues, this invention provides a data analysis-based intelligent regulation and allocation system for drug supply and demand balance, the structure of which is as follows: Figure 1 As shown. The specific implementation process of this system is as follows:
[0189] The causal decontamination input module, by constructing a structural causal topology graph and applying the backdoor criterion, can remove confounding factors such as irrational panic or artificial misrepresentation at the data input end, restore the real demand drift parameters that are not disturbed, and ensure that subsequent decisions are based on objective material consumption facts rather than noisy data.
[0190] The spatiotemporal dynamic graph mapping module projects the aforementioned real demand drift parameters onto a weighted directed graph that includes physical accessibility, generating an initial state field that includes spatial topology and temporal evolution characteristics. This solves the problem that traditional static models cannot characterize the spatial misalignment of demand caused by the dynamic migration of patient flow during public health emergencies.
[0191] The mean-field game modeling module uses mean-field theory to establish a set of coupled partial differential equations describing the Nash equilibrium of the system. It transforms the complex resource competition of large-scale medical nodes into the interaction between individual states and the global average distribution, overcoming the defects of systemic resource oscillation or polarized distribution caused by each node pursuing local optima in distributed scheduling. Theoretically, it ensures the balance of global resource allocation.
[0192] The physics-driven solution module utilizes the universal approximation capability of deep neural networks to solve high-dimensional coupled partial differential equations. By transforming the physical equations into residual constraints embedded in the loss function, it avoids the dimensionality curse faced by traditional numerical calculation methods when dealing with massive numbers of nodes. Under the premise of ensuring computational efficiency, it outputs a globally optimal strategy mapping relationship that conforms to the physical conservation law.
[0193] The strategy simulation verification module introduces random pulse signals into the digital twin environment for stress testing, filtering out strategies that are only effective under stable flow but fail under extreme conditions, thus ensuring that the control algorithm running online has engineering robustness to cope with sudden risks.
[0194] The equilibrium control execution module directly utilizes the trained value network for automatic differential calculation, transforming abstract mathematical strategies into specific physical replenishment rate instructions. This drives warehousing and logistics equipment to execute distribution, achieving closed-loop automated control from multi-dimensional data perception to physical entity execution. This ensures the precise allocation and dynamic balance of medical supplies in a multi-level network.
[0195] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A data-driven intelligent drug supply and demand balance control and allocation system, characterized in that, Includes the following modules: The causal decontamination input module is used to construct a structural causal topology graph, use the backdoor criterion to block non-causal paths and calculate the intervention distribution, and output the real demand drift parameters. The spatiotemporal dynamic graph mapping module is used to construct a weighted directed graph based on logistics accessibility and map the real demand drift parameters to graph nodes to generate an initial state field. The mean-field game modeling module is used to receive the initial state field to construct a stochastic dynamics model and establish a set of coupled partial differential equations describing the Nash equilibrium of the system based on mean-field theory. The physics-driven solution module is used to construct a deep neural network, which transforms the coupled partial differential equations into a physical constraint residual embedding loss function, and obtains the value function mapping relationship representing the global optimal strategy through iterative training. The strategy simulation verification module is used to generate candidate strategies using the value function, perform stress tests in a digital twin environment, and output a verification pass signal when the indicators meet the target. The equilibrium control execution module is used to respond to the verification pass signal, input the real-time inventory into the trained neural network, use automatic differentiation to calculate the negative gradient with respect to the state input, generate physical allocation instructions and send them to the warehousing and logistics equipment for execution and distribution.
2. The intelligent drug supply and demand balance control and allocation system based on data analysis according to claim 1, characterized in that, The causal decongestant input includes: We define the true incidence rate as a latent variable, the observed order flow as an outcome variable, and the social sentiment index as a confounding factor. We construct a directed acyclic graph among the three and set a non-causal path from the social sentiment index to the observed order flow in the graph. According to the backdoor criterion, the social sentiment index was selected as the set of blocking variables; The observed social sentiment index is processed by hierarchical discretization. For each discrete level, the conditional probability of the observed order flow under a given true incidence rate is calculated. We take the conditional probability at each discrete level and the marginal probability of the social sentiment index at that level, and sum and integrate them to obtain the observed order flow distribution after intervention of the real incidence rate. Then, we perform regression fitting on the distribution to generate the real demand drift parameters.
3. The intelligent drug supply and demand balance control and allocation system based on data analysis according to claim 1, characterized in that, The spatiotemporal dynamic map mapping includes: Retrieve historical referral records from medical institutions within the region, map the medical institutions as graph nodes, and map the referral paths as directed edges; The frequency of referrals per unit time is statistically analyzed, and after normalization, it is used as the weight of the patient flow intensity of directed edges to construct a weighted adjacency matrix representing regional correlation. Generate a time series tensor with dimensions equal to the number of nodes, and fill the diagonal positions of the tensor with the actual demand drift parameters; Perform a Hadamard product operation between the time series tensor and the weighted adjacency matrix to output an initial state field containing spatial topological structure and temporal evolution characteristics.
4. The intelligent drug supply and demand balance control and allocation system based on data analysis according to claim 1, characterized in that, The mean-field game modeling includes: Establish a stochastic differential equation describing the changes in the inventory status of a single medical node. Set the coefficient of the drift term of the equation to be the difference between the actual demand drift parameter and the current replenishment rate, and set the coefficient of the diffusion term to be the standard deviation of historical demand fluctuations. Define a cost functional that includes holding costs, stockout penalties, control work, and mean field coupling terms. The calculation logic of the mean field coupling term is constructed to calculate the square of the difference between the inventory state of a single medical node and the first moment of the global average inventory distribution, and the squared value is multiplied by a preset game intensity coefficient as a penalty constraint for deviation from the equilibrium state.
5. The intelligent drug supply and demand balance control and allocation system based on data analysis according to claim 1, characterized in that, The mean-field game modeling also includes: A reverse evolution strategy equation is constructed, which includes a time derivative term, a Hamiltonian operator term with respect to the first spatial derivative, and the mean field coupling term, for inverse solution of the value function; Find the extreme value of the Hamiltonian operator term in the reverse evolution strategy equation to analyze the optimal control strategy expression with respect to the gradient of the value function space; A forward evolution distribution equation is constructed, which includes a time derivative term, a convection term containing the expression of the optimal control strategy, and a second-order diffusion term, and is used to forward deduce the global distribution density. By combining the reverse evolution strategy equation and the forward evolution distribution equation, a closed-loop equation system is formed in which state variables and distribution variables are nested.
6. The intelligent drug supply and demand balance control and allocation system based on data analysis according to claim 1, characterized in that, The physics-driven solution includes: A fully connected feedforward neural network is constructed as the value network and density network, with the input layer set as spatiotemporal coordinates and the output layers as value scalar and density scalar, respectively. Locating points are selected within a predefined spatiotemporal region using the Latin hypercube sampling method. The partial derivatives of the value network and density network with respect to the spatiotemporal coordinate inputs are calculated using an automatic differentiation algorithm. Substitute the partial derivatives into the coupled partial differential equations, calculate the sum of squared differences between the left and right sides of the equations as the physical residual term, and add it to the total loss function; The network parameters are updated using an adaptive moment estimator until the physical residual term converges.
7. The intelligent drug supply and demand balance control and allocation system based on data analysis according to claim 1, characterized in that, The physics-driven solution also includes: Construct two sets of virtual input vectors. The first set of vectors has the confounding factor dimension fixed at a high panic value, and the second set of vectors has the confounding factor dimension fixed at a low panic value. The two sets of virtual input vectors are input into the value network respectively to obtain two value function output values; Calculate the square of the difference between the output values of these two value functions, and construct the counterfactual regret regularization term; The counterfactual regret regularization term is added to the total loss function, thereby minimizing the sensitivity of the value network to the confounding factor dimension.
8. The intelligent drug supply and demand balance control and allocation system based on data analysis according to claim 1, characterized in that, The strategy simulation verification includes: Construct a digital twin environment containing virtual node objects that correspond one-to-one with real nodes; In a digital twin environment, a burst demand pulse signal following a Poisson distribution is generated and injected into a randomly selected virtual node object; The replenishment instructions for each virtual node object are calculated using the value function mapping relationship, and the simulation clock is run. Real-time recording of the inventory gap queue length of virtual node objects and the average waiting time of the virtual logistics network; Determine whether the length of the inventory gap queue converges to a preset upper limit and whether the average waiting time is less than a preset threshold. If both conditions are met, the verification is considered successful.
9. The intelligent drug supply and demand balance control and allocation system based on data analysis according to claim 1, characterized in that, The equilibrium control execution includes: Real-time inventory values from the target medical institution's warehouse management system are read via an IoT interface; The input tensor is constructed by normalizing the real-time inventory value and the current system time. The input tensor is input into the trained value network, and forward propagation is performed. Based on the backpropagation chain rule, calculate the first-order partial derivative of the value network output with respect to the inventory dimension of the input tensor; The first-order partial derivative is negative and multiplied by a preset adjustment coefficient to obtain the physical replenishment rate command.
10. The intelligent drug supply and demand balance control and allocation system based on data analysis according to claim 1, characterized in that, The implementation of the equilibrium control also includes: A discrete empirical distribution is generated by aggregating the real-time inventory values of all nodes within the region. The density network is invoked to generate the theoretical equilibrium distribution at the current moment; Calculate the first-order Wasserstein distance between the discrete empirical distribution and the theoretical equilibrium distribution; The damping coefficient is calculated by substituting the first-order Wasserstein distance into a preset exponential decay function. The physical replenishment rate command is multiplied and corrected using the damping coefficient, and the corrected command is packaged and sent via a communication protocol.