Drug informatization whole-process management system based on big data analysis
The pharmaceutical information management system, which utilizes big data analytics, addresses the shortcomings of traditional pharmaceutical management systems in data collection, processing, and quality modeling. It enables multi-dimensional data analysis and adaptive optimization, thereby improving the accuracy and efficiency of pharmaceutical quality management.
Patent Information
- Application Number
- CN202511675653.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-16
- Publication Date
- 2026-02-06
AI Technical Summary
Existing drug information management systems have shortcomings in data collection, real-time processing, multi-scale risk identification, accurate quality modeling, and adaptive control, and cannot achieve full-process data coverage, real-time data processing, multi-dimensional data collaborative analysis, and adaptive adjustment.
A drug information management system based on big data analytics is adopted. It captures multi-dimensional data streams through a distributed sensor node network, performs data purification and structured organization, conducts multi-scale pattern scanning, constructs a drug quality hypersurface model, establishes a mapping relationship between the state tensor and the quality model, and uses a spatiotemporal graph attention network to calculate the global consistency metric for intelligent decision-making and closed-loop control.
It enables multi-dimensional analysis of drug status, identifies abnormal data clusters, constructs accurate drug quality models, optimizes management strategies, improves the accuracy and efficiency of drug quality management, and achieves adaptive optimization of the system.
Smart Images

Figure CN121481469A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of medicine management, in particular to a medicine informationization whole-process management system based on big data analysis. BACKGROUND
[0002] The current medicine informationization management system mainly adopts a monitoring mode based on fixed rules and threshold alarm. The existing technology is limited to sampling detection at key nodes for the collection of medicine whole life cycle data, and cannot realize continuous and comprehensive data coverage. The data processing method usually adopts a batch processing mode, which is difficult to meet the processing needs of real-time data flow. Abnormal detection relies on single-point data over-standard judgment, and lacks the ability to analyze the coordinated changes of multi-dimensional data. The quality evaluation model is simple, and the complex mapping relationship between the state of the medicine and the quality risk cannot be established. The decision-making process is often based on experience rules, and the optimal management strategy cannot be solved under multiple constraint conditions. The system lacks self-adaptive adjustment ability, and the data collection parameters need to be set manually and fixed.
[0003] The traditional medicine management system has obvious deficiencies in data utilization depth and system intelligence. The deployment of distributed sensing network lacks systematization, and there are blind spots and redundancies in data collection. The real-time flow processing capacity is insufficient, and it is difficult to effectively process high-concurrency, multi-source and heterogeneous data flow. The abnormal detection method is single, and it is difficult to find potential risks hidden in complex data patterns. The quality model construction is too simplified, and cannot accurately reflect the real distribution of medicine quality in multi-dimensional parameter space. The decision optimization process has high computational complexity, and it is difficult to meet the requirements of real-time management. The closed-loop control mechanism is imperfect, and the system parameter adjustment lags behind the actual demand changes. The existing technology needs to solve the key technical problems of whole-process data collection, real-time data processing, multi-scale risk identification, accurate quality modeling, intelligent decision-making and adaptive control. SUMMARY
[0004] The purpose of the present application is to provide a medicine informationization whole-process management system based on big data analysis to solve the problems raised in the background art.
[0005] To achieve the above purpose, the present application provides a medicine informationization whole-process management system based on big data analysis, which comprises: A data injection module captures multi-dimensional data flow of medicine whole life cycle through a distributed sensing node network, and structurally organizes the data flow; A data purification module uses a real-time flow processing engine to perform noise filtering and missing value compensation on the multi-dimensional data flow, and outputs a medicine state tensor with space-time labels; A risk identification module performs multi-scale pattern scanning on the medicine state tensor, locates abnormal data clusters and activates directional analysis processes, and constructs a medicine quality hypersurface model; A data aggregation module establishes a mapping relationship between the drug state tensor and the drug quality hyper-surface model, and calculates a global consistency measurement value using a spatio-temporal graph attention network; An intelligent decision-making module inputs the global consistency measurement value into a strategy optimizer to solve a drug management action sequence under multiple constraint conditions; A closed-loop control module executes the drug management action sequence and monitors system state deviation, and adaptively calibrates the collection frequency and range of the data injection module according to the deviation.
[0006] Preferably, the data injection module comprises: A vibration sensor array is deployed on a drug production line, an optical detection probe is integrated at a drug packaging link, and a temperature and humidity recorder is installed at a drug circulation link; the vibration sensor array collects device vibration frequency spectrum data during drug production, the optical detection probe captures a sequence of drug appearance images, and the temperature and humidity recorder records drug storage and transportation environment parameters; Key event points of a drug life cycle are defined, including raw material feeding time points, drug forming time points, quality sampling time points, and warehouse delivery time points; a data collection window is dynamically expanded around the key event points; A data importance function based on time decay is constructed, which assigns a high collection weight to data segments near key event points and a low collection weight to data segments far from key event points; The output results of the data importance function are used to dynamically configure the working mode of the distributed sensor node network, with high-weight data segments corresponding to continuous collection mode and low-weight data segments corresponding to intermittent collection mode; The sampling rate of each sensor node is dynamically adjusted through the data importance function, and vibration frequency spectrum data, appearance image sequences, and environment parameters are fused to form a multi-dimensional data stream of the entire drug life cycle.
[0007] Preferably, the data purification module comprises: A stream processing pipeline is constructed, which includes a data reception buffer, a sliding window processor, and a data enhancer; The data reception buffer receives the multi-dimensional data stream in chronological order and temporarily stores data packets in a first-in, first-out manner; The sliding window processor defines a variable-length time window, extracts windowed data packets from the data reception buffer, performs integrity checks on each data packet, and identifies missing timestamps and abnormal fluctuation points; The data enhancer interpolates missing values for data packets with missing timestamps using a time series prediction algorithm, and smooths data for data packets with abnormal fluctuation points using a wavelet threshold denoising algorithm; The windowed data packets after processing are rearranged according to spatio-temporal attributes, time stamps and spatial location labels are added, and a drug state tensor is generated.
[0008] Preferably, the risk identification module performs multi-scale pattern scanning on the drug status tensor by the method comprising: extracting deep features of the drug status tensor by using a multi-layer perception model, the first layer of perception learning local temporal patterns, and the second layer of perception learning global spatial dependencies; calculating Mahalanobis distance of the deep features to identify data points deviating from the normal distribution range and form a preliminary set of abnormal data points; performing density clustering on the preliminary set of abnormal data points to merge data points with similar features and adjacent spatial positions into abnormal data clusters; calculating a risk score for each abnormal data cluster, the risk score being based on the size, density of the data cluster, and the distance to the key event point; presetting a risk score threshold, marking abnormal data clusters with risk scores exceeding the threshold as high-risk areas, and triggering a directional analysis process.
[0009] Preferably, the risk identification module activates the directional analysis process to construct a drug quality hypersurface model by the method comprising: deploying a mobile data collection agent for fine scanning in each marked high-risk area; the mobile data collection agent moves along a preset path to collect enhanced data inside and on the boundary of the high-risk area; performing principal component analysis on the enhanced data to extract a key quality feature vector after dimension reduction; inputting the key quality feature vector into a generative adversarial network, the generator of the generative adversarial network being responsible for synthesizing data conforming to the normal quality distribution, and the discriminator being responsible for distinguishing real data from synthetic data; learning the underlying distribution of the drug quality data through adversarial training of the generator and the discriminator; performing surface fitting in three-dimensional space on the learned distribution, adding a risk level as a fourth-dimensional attribute, and constructing a drug quality hypersurface model.
[0010] Preferably, the data aggregation module establishes a mapping relationship between the drug status tensor and the drug quality hypersurface model by the method comprising: projecting the drug status tensor into the same feature space as the drug quality hypersurface model to obtain a set of projected drug status feature points; calculating the shortest Euclidean distance from each point in the set of drug status feature points to the drug quality hypersurface as a local consistency measure for the point; constructing a topological graph of the drug circulation network, the nodes in the graph representing drug batches or locations, and the edges representing circulation paths or influence relationships; The spatio-temporal graph attention network aggregates the local consistency measure of each node and its neighbor nodes, and the weight of the neighbor nodes is determined by the spatio-temporal distance and the flow volume; Through the multi-layer propagation of the spatio-temporal graph attention network, the global consistency measure value of each node is calculated.
[0011] Preferably, the method for the intelligent decision module to input the global consistency measure value into the strategy optimizer includes: The strategy optimizer maintains an action space, which contains all executable drug management operations, and each operation is associated with a cost parameter and an expected effect vector; Define a state space composed of the global consistency measure value, the current drug inventory level, and the market demand index; The strategy optimizer is trained using a deep Q learning algorithm, and the Q network of the deep Q learning algorithm takes the state space as input and outputs the Q value of each action in the state space; During the training process, the goal is to maximize the long-term cumulative reward, and the reward function is based on the improvement of the consistency measure value and the reduction of the management operation cost; When the system enters a new state space, the strategy optimizer selects the drug management operation with the highest Q value to form a drug management action sequence.
[0012] Preferably, the method for the closed-loop control module to execute the drug management action sequence and monitor the system state deviation includes: The drug management action sequence is issued to the execution terminal through the control interface, including the automatic production line regulator, the intelligent warehouse scheduler, and the logistics path planner; After executing the action sequence, a monitoring period is started, and the drug key quality indicator data is continuously collected during the monitoring period; The change amount of the key quality indicator data relative to the baseline value is calculated to obtain a system state deviation vector; The system state deviation vector is normalized to calculate its module length as the system state deviation; A preset deviation tolerance threshold is set, and if the system state deviation exceeds the tolerance threshold, a strategy adjustment signal is generated.
[0013] Preferably, the method for the closed-loop control module to adaptively calibrate the collection frequency and range of the data injection module according to the deviation includes: A double mapping relationship table of deviation and collection parameters is established, and the larger the deviation, the higher the corresponding collection frequency and the wider the collection range; When the strategy adjustment signal is received, the double mapping relationship table is queried to determine the new collection frequency and collection range parameters; A reconfiguration instruction containing the new collection frequency and collection range is sent to the distributed sensor node network. The distributed sensor node network adjusts its working parameters according to the reconfiguration instructions, narrows or expands the spatio-temporal coverage of data collection, and increases or reduces the data sampling rate.
[0014] Preferably, the closed-loop control module further comprises a calibration verification step: After the distributed sensor node network adjusts the working parameters, a complete data processing period is waited for; After the end of the new data processing period, the system state offset is calculated again; If the new system state offset falls below the tolerance threshold, the current collection parameters are maintained; If the new system state offset is still higher than the tolerance threshold, the double mapping relationship table is queried again, and the collection frequency and collection range are further adjusted until the system state offset is stable within the tolerance threshold.
[0015] Compared with the prior art, the beneficial effects of the present application are: The drug state tensor is subjected to multi-scale mode scanning, and the data change law is analyzed from the time dimension, the space dimension and the feature dimension. The time scale analysis includes instantaneous fluctuation, short-term trend and long-term evolution characteristics, the space scale analysis considers the data correlation of different monitoring points, and the feature scale analysis investigates the cooperative change mode of each quality parameter. Abnormal data clusters are located through multi-scale scanning, and data sets with similar abnormal characteristics are identified. A directional analysis process is activated to perform in-depth feature extraction and pattern analysis on the abnormal data clusters. A drug quality hypersurface model is constructed, which represents the feature distribution and change law of drug quality in a multi-dimensional parameter space. The hypersurface model can depict the transition relationship and critical characteristics between different quality states, and provide an accurate mathematical model for quality risk assessment.
[0016] A mapping relationship between the drug state tensor and the drug quality hypersurface model is established, and a global consistency measure value is calculated through a spatio-temporal graph attention network. The spatio-temporal graph attention network takes the monitoring nodes as the vertices in the graph structure and the time series of the data flow as the edge attributes to construct a dynamic evolution graph model. The network learns the importance of different nodes and different time points data to the overall quality through the attention mechanism, and adaptively allocates weight coefficients. The global consistency measure value comprehensively reflects the matching degree of the current drug state and the quality model, and quantifies the overall running state of the system. The global consistency measure value is input into a strategy optimizer to solve the drug management action sequence under multiple constraint conditions. The strategy optimizer considers multiple constraints such as quality requirements, cost control, and operation feasibility, and finds the optimal management strategy through an optimization algorithm. The management action sequence includes specific operation instructions such as adjusting environmental parameters, changing storage conditions, and implementing quality intervention.
[0017] The sequence of drug management actions is executed and the system state deviation is monitored, the execution effect of the management measures is evaluated in real time. According to the system state deviation, the acquisition frequency and range of the data injection module are adaptively calibrated, and the data acquisition strategy is dynamically optimized. When the system state is stable, the acquisition frequency is appropriately reduced, and when the abnormal trend is detected, the monitoring intensity is increased. This adaptive adjustment mechanism not only guarantees the effectiveness of data acquisition, but also optimizes the system resource utilization efficiency. The closed-loop control forms a complete optimization cycle from data acquisition to decision execution to parameter adjustment, and realizes the continuous self-improvement of the system. Through multi-scale risk identification and intelligent decision optimization, the precision and efficiency of drug quality management are significantly improved. BRIEF DESCRIPTION OF DRAWINGS
[0018] Figure 1 The working principle diagram of the drug information whole-process management system based on big data analysis described in the application; Figure 2 The working principle flow chart of the data injection module; Figure 3 The working principle flow chart of the multi-scale mode scanning method of the risk identification module; Figure 4 The global consistency measurement analysis diagram of the drug circulation network; Figure 5 The system state deviation monitoring and acquisition parameter adaptive adjustment analysis diagram. DETAILED DESCRIPTION
[0019] The technical solutions in the embodiments of the application will be described clearly and completely below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are only part of the embodiments of the application, not all the embodiments. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the application.
[0020] Please refer to Figure 1The application provides a drug informationization whole-process management system based on big data analysis, which comprises a data injection module, a data purification module, a risk identification module, a data aggregation module, an intelligent decision module and a closed-loop control module. The data injection module captures multi-dimensional data flow of drugs in real time through a distributed sensor node network deployed in each link of the whole life cycle of drugs, and organizes the data in a structured manner. The data purification module uses a real-time stream processing engine to filter noise and compensate for missing values of the received data flow, and outputs a drug state tensor with accurate space-time labels. The risk identification module performs multi-scale pattern scanning on the drug state tensor, locates abnormal data clusters and activates directional analysis processes, and then constructs a hyper-surface model capable of representing the quality status of drugs. The data aggregation module is responsible for establishing a mapping relationship between the drug state tensor and the drug quality hyper-surface model, and calculating a global consistency measurement value reflecting the overall status by using a space-time graph attention network. The intelligent decision module inputs the global consistency measurement value into a strategy optimizer, and solves the optimal drug management action sequence under the consideration of various actual constraint conditions. The closed-loop control module is responsible for executing the action sequence and monitoring the system state deviation in real time, dynamically feeding back and adjusting the collection frequency and range of the data injection module according to the deviation, so as to form a self-adaptive and optimized closed-loop management system.
[0021] Example 1: see Figure 2In a specific implementation, the data injection module deploys a high-precision vibration sensor array on the pharmaceutical production line. The vibration sensor array is fixedly installed on the bearing and housing parts of key pharmaceutical equipment such as mixers and tablet presses in a grid-like spatial layout. The vibration sensor array has a collection frequency range set to 0 Hz to 10 kHz, covering all vibration frequencies that may be generated during equipment operation. The vibration sensor array transmits real-time vibration waveform data to a central processor through wired or wireless means. In the pharmaceutical packaging link, the data injection module integrates a high-resolution optical detection probe. The optical detection probe is equipped with a complementary metal oxide semiconductor image sensor and a light-emitting diode ring light source. The optical detection probe is installed above the pharmaceutical conveying belt to capture a sequence of pharmaceutical appearance images at a rate of 30 frames per second. The image sequence contains information about the color, shape, size, and packaging integrity of the pharmaceuticals. In the pharmaceutical circulation link, the data injection module installs a temperature and humidity recorder. The temperature and humidity recorder uses a digital temperature and humidity sensor. The temperature and humidity recorder has a built-in flash memory and a general packet radio service communication module. The temperature and humidity recorder records temperature and humidity parameters in the pharmaceutical warehouse and transportation vehicles at an interval of once per minute. The temperature and humidity recorder uploads data to the cloud platform in real time through an Internet of Things gateway. The data injection module defines key event points in the pharmaceutical life cycle, including raw material feeding time points, pharmaceutical forming time points, quality sampling time points, and warehouse delivery time points. The key event points are marked by a production execution system or a warehouse management system through an application programming interface trigger signal. Centered on the key event points, the data injection module dynamically expands the data collection window. The expansion strategy of the collection window is to extend a configurable time buffer zone before and after the key event points. The buffer zone duration is set according to the type of pharmaceuticals and empirical values, for example, extending the collection window by one hour before and after the feeding time point. The data injection module constructs a data importance function based on time decay. The data importance function uses an exponential decay model. The function input is the time difference between the current time and the key event point. The function output is a weight coefficient that decreases exponentially with the time difference. High collection weights are assigned to data segments near the key event points, with values close to 1. Low collection weights are assigned to data segments far from the key event points, with values close to 0. The data injection module dynamically configures the working mode of the distributed sensor node network according to the output results of the data importance function. The working modes include continuous collection mode and intermittent collection mode. High-weight data segments correspond to continuous collection mode, in which the sensor works at the maximum rated sampling rate. Low-weight data segments correspond to intermittent collection mode, in which the sensor reduces the sampling rate and enters a low-power state.The data injection module dynamically adjusts the sampling rate of each sensor node through a data importance function. The sampling rate adjustment algorithm calculates the actual sampling frequency through linear interpolation of the weight coefficient. When the weight coefficient is high, the sampling rate is high; when the weight coefficient is low, the sampling rate is low. The data injection module finally timestamps and standardizes the data format of the vibration spectrum data of the vibration sensor array, the appearance image sequence of the optical detection probe, and the environmental parameters of the temperature and humidity recorder, and fuses them to form a complete multi-dimensional data stream of the whole life cycle of the medicine.
[0022] In some embodiments, the data purification module constructs a stream processing pipeline composed of three components in series: a data receiving buffer, a sliding window processor, and a data enhancer. The data receiving buffer uses a ring buffer data structure, and its size can be configured to store data packets for several hours. The data receiving buffer receives multi-dimensional data streams from the data injection module in chronological order and temporarily stores the data packets in a first-in, first-out manner to ensure that the processing order of the data packets is consistent with their arrival order. The sliding window processor defines a variable-length time window, the length of which can be dynamically adjusted according to data processing requirements. The sliding window processor periodically extracts all data packets within the current time window from the data receiving buffer. The sliding window processor performs integrity checks on each extracted data packet, including field integrity, numerical validity, and format compliance. It specifically identifies cases where timestamps are missing and abnormal fluctuation points where numerical values exceed the normal fluctuation range. The data enhancer uses a time series prediction algorithm to interpolate missing values for data packets with missing timestamps. The time series prediction algorithm uses an autoregressive integrated moving average model to predict the most likely timestamp value based on the time series trend of the previous and subsequent data packets. For data packets with abnormal fluctuation points, the data enhancer applies a wavelet threshold denoising algorithm to smooth the data. The wavelet threshold denoising algorithm selects an appropriate wavelet basis function and threshold rule to decompose, denoise, and reconstruct the signal. The data enhancer rearranges the processed window data packets according to their spatiotemporal attributes, including absolute timestamps and physical location coordinates of the sensor nodes. The data enhancer adds precise timestamps and spatial location labels to each data packet, and finally organizes all these calibrated data packets into a multi-dimensional array structure to generate a medicine state tensor.
[0023] It can be understood that the distributed sensor node network of the data injection module adopts a star topology structure, and the central node is responsible for coordinating the work rhythm of each sensor. The central node sends control instructions to each vibration sensor array, optical detection probe and temperature and humidity recorder by receiving the weight output of the data importance function, and the instructions contain the sampling rate parameter and the work mode switching command. The communication protocol of the distributed sensor node network adopts a hybrid mode of low power Bluetooth and wireless fidelity. The low power Bluetooth is used for short distance transmission, and the wireless fidelity is used for long distance or high speed data transmission. The network layer realizes reliable transmission and collision avoidance of data packets. The exponential decay model parameters of the data importance function can be trained offline by machine learning method, and the training data comes from historical drug quality event records, so that the weight distribution is more in line with the actual quality monitoring demand. In the specific implementation, the size of the ring buffer of the data receiving buffer is set to store the data of the last 24 hours to prevent data overflow and balance memory usage. The time window length of the sliding window processor is 5 minutes by default, but the system administrator can manually adjust the window length according to the rhythm of drug production. The time series prediction algorithm used by the data enhancer is the autoregressive integrated moving average model, and the parameters of the model are obtained by training historical data. The model is updated regularly to adapt to changes in data patterns. In the wavelet threshold denoising algorithm, the Stein unbiased risk estimation method is used to adaptively determine the optimal threshold level. It can be understood that the dimensions of the drug state tensor include time dimension, space dimension and data feature dimension. The time dimension corresponds to the time sequence of data collection, the space dimension corresponds to the geographical position of sensor deployment, and the data feature dimension corresponds to multiple types of data such as vibration spectrum, image features and environmental parameters. In the specific implementation, the flow processing pipeline of the data purification module is deployed on a distributed computing framework, and the output interface of the data purification module transmits the drug state tensor to the downstream risk identification module in tensor flow format, ensuring the consistency of the data format.
[0024] Optionally, the data injection module supports plug-and-play functionality for sensor nodes, newly added vibration sensor arrays or optical detection probes can automatically register with the central node and receive configuration parameters, realizing rapid expansion and maintenance of the network. The data injection module also includes a data encryption unit, which performs Advanced Encryption Standard algorithm encryption on the multi-dimensional data stream in transit to prevent data from being stolen or tampered with during transmission. The data receiving buffer of the data purification module implements a back pressure mechanism, which sends a flow control signal to the data injection module when the data inflow rate exceeds the processing capacity, temporarily reducing the data transmission rate to prevent data loss. The sliding window processor of the data purification module supports overlapping window technology, with some data overlap between adjacent time windows, improving the continuity of data processing and the accuracy of pattern recognition. The data enhancement unit of the data purification module can configure multiple denoising algorithms, in addition to wavelet threshold denoising, Kalman filtering or moving average smoothing can also be selected, and the algorithm selection is specified through a configuration file. In some embodiments, the generation process of the drug status tensor includes a data normalization step, which scales the original data values of different sensors to a unified numerical range, eliminating the influence of dimensions and facilitating subsequent module processing. The final output of the data purification module is a drug status tensor stored in HDF5 or similar scientific data format, and the tensor contains metadata describing the meaning and units of each dimension. Optionally, the data importance function of the data injection module can introduce drug batch priority as an additional input, and high-priority batches of drugs are assigned higher acquisition weights even at non-critical event points, realizing differentiated monitoring. The integrity verification algorithm of the data purification module can also detect sensor faults, such as constant readings at a certain value, and report fault information to the maintenance system.
[0025] Example 2: see Figure 3In a specific implementation, the risk identification module performs multi-scale pattern scanning on the drug status tensor, the multi-scale pattern scanning adopts a double-layer multi-layer perception model, the first layer of the multi-layer perception model learns local temporal patterns, the first layer includes multiple hidden layer neurons, the neuron activation function uses a rectified linear unit, the input dimension of the first layer matches the time step of the drug status tensor multiplied by the feature dimension, and the first layer extracts local features within a short time window through convolution operation. The second layer of the multi-layer perception model learns global spatial dependencies, the second layer receives the output of the first layer as input, the second layer adopts a fully connected structure, and the weight matrix of the second layer learns the long-range association between data of different sensor nodes. After the multi-layer perception model is trained, the drug status tensor is forward propagated, and a deep feature representation of the drug status tensor is output, which is a highly abstracted representation of the original tensor. The Mahalanobis distance of each feature vector in the deep feature representation is calculated, which requires calculating the covariance matrix based on historical normal data. The Mahalanobis distance measures the degree of deviation of the feature vector from the normal distribution center. A Mahalanobis distance threshold is set, and data points with a Mahalanobis distance exceeding the threshold are identified as abnormal points deviating from the normal distribution range, and all abnormal points form a preliminary abnormal data point set. The preliminary abnormal data point set is subjected to density clustering, and the density clustering algorithm adopts a density-based clustering method with noise. The density clustering algorithm clusters data points based on their spatial density and proximity. The density clustering algorithm merges data points that are spatially adjacent and similar in feature space into the same abnormal data cluster, and each abnormal data cluster represents a potential local abnormal region. A risk score is calculated for each abnormal data cluster, and the risk score calculation function considers the size, density, and distance of the abnormal data cluster from the key event point. The risk score calculation function is a weighted summation model, and the size weight, density weight, and distance weight are set by expert experience. A preset risk score threshold is set, which is a configurable numerical value. The risk score of each abnormal data cluster is compared with the risk score threshold, and the abnormal data cluster with a risk score exceeding the risk score threshold is marked as a high-risk region, and the marking action triggers the subsequent directional analysis process.
[0026] In some embodiments, the risk identification module activates the targeted analysis process to build a drug quality hypersurface model, and deploys a mobile data acquisition agent for fine scanning in each marked high-risk area. The mobile data acquisition agent is an autonomous mobile platform equipped with multiple sensors. The mobile data acquisition agent moves along a preset path covering the interior and boundary areas of the high-risk area, and collects enhanced data in the interior and boundary areas of the high-risk area, including high-resolution images, local temperature and humidity distribution, and chemical composition concentration information. Principal component analysis is performed on the enhanced data, which reduces the dimensionality of the high-dimensional enhanced data. The principal component analysis extracts several principal components with the highest variance contribution rate, and obtains a key quality feature vector after principal component analysis, which retains most of the information of the original enhanced data. The key quality feature vector is input into a generative adversarial network, which includes a generator and a discriminator. The generator is responsible for receiving random noise vectors and synthesizing data conforming to the normal quality distribution, and the discriminator is responsible for distinguishing whether the input data is real enhanced data or synthesized data by the generator. The generative adversarial network learns through the adversarial training of the generator and the discriminator. During the training process, the generator continuously optimizes the authenticity of the synthesized data, and the discriminator continuously improves the discrimination ability. The adversarial training reaches a dynamic balance between the generator and the discriminator. Through the adversarial training of the generator and the discriminator, the generative adversarial network learns the potential distribution law of the drug quality data, which reflects the multi-dimensional statistical characteristics of the normal drug quality data. The learned potential distribution law is fitted in a three-dimensional space, and the surface fitting algorithm uses a non-uniform rational B-spline surface fitting method. The surface fitting result is a smooth continuous surface. Add the risk level as the fourth dimensional attribute, which comes from the previous risk score calculation, and map the risk level to the surface color or height to build a drug quality hypersurface model containing three-dimensional space coordinates and risk attributes. The drug quality hypersurface model directly displays the quality status and risk level of different spatial positions.
[0027] It can be understood that the training process of the multi-layer perception model uses the back propagation algorithm, the training data is derived from historical normal drug production data, the loss function uses the mean square error loss, and the optimizer uses the adaptive moment estimation algorithm. The covariance matrix in the Mahalanobis distance calculation needs to be updated regularly, and the covariance matrix update period is one month. The covariance matrix is updated using the latest normal data in the sliding window. The neighborhood radius parameter and the minimum point number parameter in the density clustering algorithm are determined by the grid search method, and the parameter selection aims to maximize the silhouette coefficient of the clustering result. The weight coefficient in the risk score calculation function can be optimized by machine learning method, and the weight coefficient optimization takes the recall rate and precision rate of historical abnormal events as the objective function. The preset path planning of the mobile data collection agent uses the grid method, and the path planning covers each grid unit of the high-risk area. The moving speed of the mobile data collection agent is dynamically adjusted according to the data collection demand. The number of principal components extracted by principal component analysis is determined by the cumulative variance contribution rate, and the cumulative variance contribution rate threshold is set to ninety-five percent. The generator network structure of the generative adversarial network includes multiple deconvolution layers, the generator network input random noise vector, and the generator network output synthetic data vector. The discriminator network structure of the generative adversarial network includes multiple convolution layers, the discriminator network input data vector, and the discriminator network output a probability value between zero and one. The training of the generative adversarial network uses an alternating optimization strategy, first fixing the generator to train the discriminator, and then fixing the discriminator to train the generator. The number of control points of the non-uniform rational B-spline surface fitting is automatically determined according to the data point density, and the smoothing factor of the surface fitting is selected by cross-validation. The data structure of the drug quality hyper surface model uses a four-dimensional grid representation, and the three coordinate values of the grid point represent the spatial position, and the fourth value of the grid point represents the risk level. In specific implementation, the multi-scale mode scanning process of the risk identification module is deployed on a graphics processor cluster, and the parallel computing capability of the graphics processor is used to accelerate deep feature extraction. The mobile data collection agent of the directed analysis process and the fixed sensor network communicate through the fifth generation mobile communication technology to ensure real-time transmission of enhanced data. The drug quality hyper surface model is finally displayed in a visual form on the monitoring interface, and the operator can rotate and scale the surface model through interactive operation.
[0028] Optionally, the multi-layer perceptron model can be extended to a deeper neural network structure with residual connections to prevent gradient vanishing and improve feature extraction capability. The Mahalanobis distance calculation can introduce a robust covariance estimation method, using the minimum covariance determinant estimator to replace the sample covariance, to improve the robustness to outliers. The density clustering algorithm can be combined with other clustering methods such as Gaussian mixture model to more accurately divide complex-shaped outlier data clusters. The risk score calculation function can introduce a time decay factor, with the risk score weight of outlier data clusters farther from the current time being lower. The mobile data collection agent can be equipped with a robotic arm for collecting physical samples for offline analysis, enriching and enhancing data types. Principal component analysis can be kernelized, using kernel tricks to handle nonlinear data structures and extract more effective key quality feature vectors. The generative adversarial network can use a conditional generative adversarial network structure, which takes the risk score as a conditional input to control the risk characteristics of the generated data. Surface fitting can use Gaussian process regression, which provides uncertainty estimates for the fitting results. The drug quality hypersurface model can support multi-detail level representation, dynamically adjusting the surface resolution according to display requirements. In some embodiments, the risk identification module can save a sequence of historical drug quality hypersurface models to predict the direction of quality evolution by comparing the sequence trends. It can be understood that the entire implementation of embodiment 2 realizes a closed loop from macroscopic anomaly screening to microscopic fine analysis, and the drug quality hypersurface model provides a quantitative basis for quality risk assessment. Optionally, the drug quality hypersurface model can be exported in the standard triangle patch file format for further analysis by third-party software. The risk identification module records the identification process and risk score calculation details of each outlier data cluster in the operation log, which is used for system audit and algorithm optimization. The number of hidden layer neurons in the multi-layer perceptron model can be optimized through automated machine learning techniques to find the optimal network structure. The charging and maintenance of the mobile data collection agent are included in the system management plan to ensure the continuous availability of the mobile data collection agent. The training process of the generative adversarial network adds a gradient penalty term to prevent mode collapse problems and improve training stability.
[0029] In a specific implementation, the data aggregation module establishes a mapping relationship between the drug state tensor and the drug quality hypersurface model, and the mapping relationship is realized through feature space projection. The drug state tensor is projected into the same feature space as the drug quality hypersurface model, and the feature space projection adopts a linear transformation matrix, which is learned by a canonical correlation analysis method. After projection, a drug state feature point set is obtained, and each point in the drug state feature point set corresponds to the drug state of a spatio-temporal position. The shortest Euclidean distance from each point in the drug state feature point set to the drug quality hypersurface is calculated, and the shortest Euclidean distance calculation adopts a space search algorithm, which traverses all grid points on the hypersurface to find the grid point with the smallest Euclidean distance from the feature point. The minimum distance value is taken as the local consistency measure of the feature point, and the smaller the local consistency measure value, the closer the drug state is to the normal quality model. A topological graph of the drug circulation network is constructed, the nodes in the topological graph represent drug batches or geographical location nodes, and the node attributes include drug batch number, geographical location coordinates and current state information. The edges in the topological graph represent circulation paths or influence relationships, and the edge attributes include circulation direction, circulation time and circulation weight. The global consistency measure value is calculated using a spatio-temporal graph attention network, the input of the spatio-temporal graph attention network is the topological graph structure and the local consistency measure of each node, and the spatio-temporal graph attention network aggregates node information through a multi-head self-attention mechanism. Each attention head learns different spatial dependency patterns. The message passing process of the spatio-temporal graph attention network includes multiple graph attention layers, and each graph attention layer updates the node representation. The node representation update formula is as follows:
[0030] In some embodiments, the intelligent decision module inputs the global consistency metric value into a policy optimizer, which is trained using a deep Q-learning algorithm. The policy optimizer maintains an action space, which contains all executable drug management operations, including adjusting production line parameters, speeding up inspection processes, transferring storage areas, modifying transportation routes, etc. Each drug management operation is associated with a cost parameter and an expected effect vector. The cost parameter represents the human, time, and resource consumption required to execute the operation, and the expected effect vector predicts the direction and degree of the operation's impact on the global consistency metric value. A state space is defined, which consists of the global consistency metric value, the current drug inventory level, and the market demand index. The state space is a multi-dimensional vector with fixed dimensions, and each dimension is normalized. The Q-network of the deep Q-learning algorithm adopts a deep neural network structure. The input layer of the Q-network has the same dimension as the state space, and the output layer of the Q-network has the same size as the action space. The Q-network outputs the Q-value of each action in the state space, which represents the expected value of the long-term cumulative reward obtained by executing the corresponding action in the given state. During training, the deep Q-learning algorithm aims to maximize the long-term cumulative reward. The reward function is based on the degree of improvement in the consistency metric value and the degree of reduction in the cost of management operations. The reward function is designed as the weighted difference between the change in the consistency metric value and the cost of management operations. The deep Q-learning algorithm uses an experience replay mechanism. The experience replay buffer stores state transition experiences, which include four tuples: the current state, the executed action, the obtained reward, and the next state. During training, the network parameters are updated by randomly sampling batches of data from the experience replay buffer. The deep Q-learning algorithm uses target Q-network technology. The target Q-network periodically copies parameters from the main Q-network. The target Q-network is used to calculate the target Q-value, improving the stability of training. When the system enters a new state space, the policy optimizer uses an ε-greedy strategy to select actions. With an ε probability, it randomly explores new actions, and with a 1-ε probability, it selects the drug management operation with the highest current Q-value. The final drug management action sequence is a series of optimal operation instructions arranged in chronological order.
[0031] It can be understood that the linear transformation matrix of feature space projection needs to be retrained regularly, and the linear transformation matrix training uses the drug state tensor and drug quality hypersurface model data of the last month to maintain the timeliness of the projection relationship. The shortest Euclidean distance calculation can be accelerated using a spatial index structure, which organizes the grid points of the drug quality hypersurface model using a k-d tree, reducing the time complexity of distance queries from linear to logarithmic level. The construction of the drug circulation network topology graph can be dynamically updated, and the topology graph update frequency is synchronized with the warehouse operation of the drug batch, ensuring the real-time of the network structure. The number of layers of the spatio-temporal graph attention network is usually set to two to three layers, and too many layers may cause overfitting, and too few layers may not be able to capture long-range dependencies. The calculation of the attention coefficient can introduce a gating mechanism to control the fusion ratio of information of different neighbor nodes and improve the expression ability of the model. The output range of the global consistency measure value is constrained between zero and one by the Sigmoid function, which is convenient for numerical comparison between different nodes. The action space design of the strategy optimizer needs to cover all possible management interventions, and the size of the action space affects the learning difficulty and decision accuracy. The normalization processing of the state space uses the min-max normalization method to map the numerical values of each dimension to the interval of zero to one. The hidden layer of the Q network usually uses two to three fully connected layers, and the number of hidden layer neurons is determined by cross-validation. The weight coefficient in the reward function needs to be carefully adjusted, and the weight coefficient balances the two optimization objectives of quality improvement and cost control. The size of the experience replay buffer is set to store tens of thousands of state transition experiences, ensuring the diversity of training samples. The update frequency of the target Q network is set to synchronize the parameters once every few hundred training iterations to avoid excessive fluctuations in target values. The ε value in the ε-greedy strategy gradually decays with the training process, encouraging exploration in the early training stage and leaning towards utilization in the later training stage. The execution of the drug management action sequence needs to consider the dependency relationship between operations, and complex dependencies are modeled and managed through directed acyclic graphs.
[0032] Optionally, the feature space projection can employ a nonlinear projection method that uses kernel functions or neural networks to learn complex mapping relationships. The shortest Euclidean distance calculation can be extended to Mahalanobis distance, which takes into account the correlation between each dimension of the feature, and needs to estimate the covariance matrix of the feature space. The edge weight of the topological graph can be dynamically adjusted, and the edge weight is recalculated according to the real-time flow data, reflecting the change of the influence strength between nodes. The spatio-temporal graph attention network can be combined with the graph convolution network, which performs convolution operation in the spatial dimension to extract local topological patterns. The global consistency measure value can be decomposed into spatial consistency and temporal consistency two components, which is convenient for positioning the specific dimension of the problem. The strategy optimizer can use the policy gradient algorithm instead of deep Q learning, which directly learns the strategy function and is suitable for continuous action space. The state space can introduce seasonal factors and trend indicators to improve the comprehensiveness of state representation. The Q network structure can introduce recurrent neural network units to handle the temporal dynamic characteristics of state sequences. The reward function can contain a risk penalty term that imposes additional cost constraints on high-risk operations. Experience replay can use a priority replay mechanism that assigns sampling probabilities based on the size of the time difference error to improve sample utilization efficiency. Target Q network updates can use a soft update strategy that only updates part of the parameters each time, making the target value change smoother. The generation of drug management action sequences can consider resource constraints, which are integrated into the decision-making process through linear programming methods. In some embodiments, the data aggregation module can cache historical projection results, which are used to analyze the trend of the feature space over time. The intelligent decision-making module can integrate a multi-agent reinforcement learning framework that coordinates decision-making behavior across different warehouses or production lines.
[0033] Referring to Figure 4 , a global consistency measure analysis of the drug circulation network based on the spatio-temporal graph attention network is shown. This chart presents the quality state distribution of drugs in the whole process of circulation in the form of complex network visualization. Each node in the chart represents a batch of drugs, and the position of the node reflects its spatial distribution in the circulation network. The size and color of the node intuitively show the global consistency measure value of the batch of drugs. Larger nodes indicate that the batch of drugs has better quality in the overall network, and the color closer to green indicates a higher consistency measure value and lower quality risk. The connection between nodes represents the circulation path and influence relationship between batches of drugs, and the thickness of the connection reflects the weight of the circulation. Through this network visualization, it is possible to clearly identify clusters of batches with high quality risk in certain areas, providing data support for subsequent intelligent decision-making. This analysis chart integrates advanced technologies such as feature space projection, local consistency measure, and spatio-temporal graph attention network, achieving precise monitoring and risk assessment of drug quality throughout the whole process.
[0034] In a specific implementation, the closed-loop control module executes a sequence of drug management actions and monitors system state deviation, the sequence of drug management actions is issued to different execution terminals through a standardized control interface. The control interface adopts an asynchronous communication protocol based on a representational state transfer application programming interface, and the control interface encodes the sequence of actions into a data packet in JavaScript Object Notation format for transmission. The automated production line regulator receives instructions related to production process adjustment, the automated production line regulator parses the instruction content and converts it into control signals for programmable logic controllers, the control signals adjust process parameters such as mixing speed, tabletting pressure, or filling accuracy. The intelligent warehouse scheduler receives instructions related to inventory management, the intelligent warehouse scheduler re-plans the storage location of drug batches according to the instruction requirements, and the intelligent warehouse scheduler schedules automated guided vehicles to complete shelf movement and batch transfer operations. The logistics path planner receives instructions related to drug transportation, the logistics path planner calculates the optimal path based on real-time traffic information and delivery point priorities, and the logistics path planner issues the new transportation path to the vehicle navigation terminal. After executing the sequence of drug management actions, the closed-loop control module starts a preset monitoring period, the length of the monitoring period is dynamically set according to the type of management action and the expected effect time. During the monitoring period, the closed-loop control module continuously collects drug key quality indicator data through the sensor network of the data injection module, the key quality indicator data includes drug content uniformity, dissolution rate, impurity content, and other core parameters. Calculate the change of the key quality indicator data collected during the monitoring period relative to its preset baseline value, the change calculation uses the point-by-point difference method, subtract the corresponding baseline value from the key quality indicator data at each sampling time to obtain a set of instantaneous deviations. The instantaneous deviations of all key quality indicators collectively form a system state deviation vector, the dimension of the system state deviation vector is the same as the number of key quality indicators. Normalize the system state deviation vector, the normalization uses the min-max scaling method to scale the deviation of each dimension to between zero and one, eliminating the influence of the dimension difference of different key quality indicators. Calculate the length of the normalized system state deviation vector, the length calculation uses the Euclidean norm formula to aggregate multi-dimensional deviation information into a scalar value, this scalar value is defined as the system state deviation. A deviation tolerance threshold is preset inside the system, the deviation tolerance threshold is a constant between zero and one. Compare the calculated system state deviation with the deviation tolerance threshold to determine whether the system state is within an acceptable range. If the system state deviation does not exceed the deviation tolerance threshold, the closed-loop control module enters a standby state waiting for the next decision cycle. If the system state deviation exceeds the deviation tolerance threshold, the closed-loop control module generates a strategy adjustment signal, the strategy adjustment signal is a digital flag bit, and the strategy adjustment signal triggers the adaptive calibration process of data acquisition parameters.
[0035] The closed-loop control module adjusts the acquisition frequency and range of the data injection module according to the system state offset, and the calibration process relies on a preset double-mapping relationship table of offset and acquisition parameters. The double-mapping relationship table takes the system state offset as the input index, and outputs the recommended acquisition frequency parameter and acquisition range parameter. The specific mapping relationship of the double-mapping relationship table is determined through offline simulation and historical data analysis, and the design principle of the double-mapping relationship table is that the larger the system state offset, the higher the acquisition frequency parameter value and the wider the acquisition range parameter value. Referring to Table 1, the double-mapping relationship table.
[0036] Table 1: Offset and acquisition parameter mapping relationship
[0037] When the closed-loop control module receives the strategy adjustment signal, the closed-loop control module immediately queries the double-mapping relationship table. The query operation locates the interval row where the offset is located according to the currently calculated system state offset, and reads the acquisition frequency parameter and acquisition range parameter corresponding to the interval. The closed-loop control module sends a reconfiguration instruction to the distributed sensor node network, and the reconfiguration instruction adopts a lightweight machine-to-machine communication protocol. The reconfiguration instruction contains the newly determined acquisition frequency parameter and acquisition range parameter, the acquisition frequency parameter indicates the new data sampling time interval of the sensor node, and the acquisition range parameter indicates the list of sensor node numbers or the geographical area range that need to be activated. After receiving the reconfiguration instruction, each node in the distributed sensor node network parses the instruction content and updates the local configuration register. The distributed sensor node network adjusts its internal clock and sampling timer according to the new acquisition frequency parameter, and enables or disables the sensor unit or adjusts the monitoring direction of the sensor unit according to the new acquisition range parameter. The distributed sensor node network adjusts the working parameters to narrow or expand the time and space coverage range of data acquisition as a whole, and at the same time, to increase or decrease the data sampling rate, so that the data acquisition behavior is accurately matched with the current system abnormality and monitoring demand.
[0038] It can be understood that the asynchronous communication mechanism of the control interface ensures the reliability of the instruction issuance, and the failed message is automatically retransmitted until the execution terminal returns the confirmation response. The control signal output of the automated production line regulator adopts a digital-to-analog converter to convert digital instructions into continuous voltage or current signals to drive the execution mechanism. The path planning algorithm of the intelligent warehouse scheduler considers physical constraints such as shelf load-bearing and passage width to avoid collisions and congestion. The logistics path planner integrates data from multiple map service providers to improve the robustness of path planning through weighted averaging. The dynamic setting rule of the monitoring period can be configured, and a shorter period is set for fast-responding actions and a longer period is set for slow-acting actions. The reference value of the key quality indicator data is derived from the average value of the historical stable production stage data, and the reference value is updated regularly. The normalization processing of the system state offset vector can use the Z-score standardization method, and the Z-score standardization is based on the mean and standard deviation of the data. The setting of the offset tolerance threshold needs to balance the sensitivity and stability of the system, and a too low threshold may cause false alarms, and a too high threshold may delay adjustment. The construction of the double mapping relationship table can introduce fuzzy logic to handle the parameter smooth transition when the offset is at the interval boundary. The transmission of the reconfiguration instruction adopts encryption measures to prevent the parameters from being maliciously tampered with during transmission. The configuration update of the distributed sensing node network adopts atomic operation to ensure that all nodes switch parameters almost simultaneously, avoiding time gaps in data collection. The adjustment of the collection frequency and the collection range is linked, and higher collection frequency usually needs to be matched with more focused collection range to control the total amount of data.
[0039] Optionally, the control interface can support a transaction mechanism that ensures a set of management actions are either all executed successfully or all rolled back, maintaining consistency of the system state. The automated production line regulator can have built-in safety boundary checks that prevent the regulation commands from setting process parameters to dangerous ranges. The intelligent warehouse scheduler can be linked with an environmental monitoring system that provides temperature and humidity anomaly alarms to trigger emergency scheduling. The logistics path planner can take into account weather warning information as a dynamic constraint condition for path planning. The list of key quality indicator data for monitoring cycles can be dynamically configured to select the most relevant set of indicators according to different drug types and management action targets. The calculation of system state deviation can introduce a weighted Euclidean norm that assigns different importance weights to different key quality indicators. The double mapping relationship table can be designed to be online-learnable and adjustable, with the system recording the effects of each parameter adjustment and optimizing the mapping relationship. The reconfiguration command can contain version number information for the sensor nodes to determine the order of new and old commands to avoid configuration rollback. The distributed sensor node network can support group configuration, with different sensor node groups being independently set to different collection frequency and collection range parameters. In some embodiments, the closed-loop control module can record all issued reconfiguration commands and their corresponding system state deviations to form an operation log for subsequent analysis and auditing.
[0040] Referring to Figure 5 , a complete flow of system state deviation monitoring and adaptive adjustment of data collection parameters in the closed-loop control module is shown. This chart clearly presents the dynamic response relationship between system state deviation and collection parameters through the form of double Y-axes. The line chart on the left side of the chart shows the trend of system state deviation over time, with the red dotted line representing the preset deviation tolerance threshold of the system. When the deviation exceeds this threshold, the system automatically triggers a strategy adjustment signal to start the adaptive calibration process of data collection parameters. The bar chart on the right side shows the real-time adjustment of collection frequency and collection range. It can be observed that during periods of high system state deviation, the system automatically increases the data collection frequency and expands the collection range to obtain more comprehensive and timely quality monitoring data; while during periods of normal deviation, the system appropriately reduces the collection parameters to optimize resource utilization. This intelligent adaptive adjustment mechanism ensures that the data collection behavior accurately matches the current level of system abnormalities and monitoring needs, achieving a balance between resource optimization and risk control.
[0041] In a specific implementation, the closed-loop control module performs a calibration verification step to ensure the effectiveness of the parameter adjustment of the data injection module after adjusting the acquisition parameters according to the system state deviation. The calibration verification step starts after the closed-loop control module sends a reconfiguration instruction to the distributed sensor node network, which contains the new acquisition frequency and acquisition range parameters. The distributed sensor node network receives the instruction and completes the adjustment of the working parameters, for example, increasing the sampling rate of the vibration sensor array from 2 times per minute to 4 times per minute, while narrowing the monitoring focus of the optical detection probe from the overall appearance inspection to the specific packaging seal area. After the distributed sensor node network adjusts the working parameters, the system enters a complete data processing cycle for verification. The complete data processing cycle covers data collection under the new parameters, data flow into the data purification module for noise filtering and missing value compensation, and the generation of a new drug state tensor. The risk identification module performs multi-scale pattern scanning on the new drug state tensor, locates possible abnormal data clusters, and constructs an updated drug quality hypersurface model. The data aggregation module establishes the mapping relationship between the new drug state tensor and the updated drug quality hypersurface model, and recalculates the global consistency measure value using the spatiotemporal graph attention network. The intelligent decision-making module inputs the new global consistency measure value into the strategy optimizer, and the strategy optimizer solves to generate a new sequence of drug management actions. The closed-loop control module executes the new sequence of drug management actions, and the action sequence is issued to the execution terminal such as the automatic production line regulator, intelligent warehouse scheduler, and logistics path planner through the control interface. After executing the new sequence of drug management actions, the closed-loop control module starts a complete monitoring period, and continuously collects drug key quality indicator data through the adjusted distributed sensor node network during the monitoring period. After the monitoring period ends, the closed-loop control module calculates the change amount of the key quality indicator data collected during the monitoring period relative to the baseline value, and obtains a new system state deviation vector. The new system state deviation vector is normalized and its module length is calculated, and finally a new system state deviation is obtained. Compare the new system state deviation with the preset deviation tolerance threshold, which is usually set to 0.3. The comparison result is used to judge whether the previous acquisition parameter adjustment is successful to make the system state return to the stable range.
[0042] If the new system state deviation falls below the tolerance threshold, for example, the new system state deviation is 0.25, which is lower than the tolerance threshold of 0.3, the calibration verification step determines that the previous acquisition parameter adjustment is valid. The closed-loop control module generates a verification pass signal, which indicates that the system state has returned to stability. The closed-loop control module decides to keep the current data injection module acquisition frequency and acquisition range parameters unchanged, and the system enters a steady-state operation mode. The distributed sensor node network continues to collect data with the adjusted parameters, for example, maintaining a sampling rate of 4 times per minute and monitoring the focal area. The closed-loop control module continues to monitor the system state deviation, but as long as the deviation remains below the tolerance threshold, it will not trigger a new parameter adjustment instruction.
[0043] If the new system state deviation is still higher than the tolerance threshold, for example, the new system state deviation is 0.45, which is significantly higher than the tolerance threshold of 0.3, the calibration verification step determines that the previous parameter adjustment is insufficient. The closed-loop control module generates a verification fail signal, which triggers a new round of parameter adjustment process. The closed-loop control module queries the internal stored offset-acquisition parameter double mapping table again. The double mapping table defines the acquisition frequency and acquisition range corresponding to different offset intervals. According to the current system state deviation of 0.45, the double mapping table is queried to determine the interval it falls into, for example, the corresponding interval may recommend an acquisition frequency of 8 times per minute and an acquisition range sensor node activation ratio of 90%. The closed-loop control module sends a new reconfiguration instruction to the distributed sensor node network, which contains a higher acquisition frequency parameter and a wider acquisition range parameter. The distributed sensor node network adjusts its working parameters again according to the new reconfiguration instruction, for example, further increases the sampling rate from 4 times per minute to 8 times per minute, and activates more standby sensor nodes to expand the coverage. The system enters a new complete data processing cycle again, including data collection, purification, risk identification, aggregation, decision-making, execution, and monitoring. After the end of the new monitoring cycle, the closed-loop control module calculates the system state deviation for the third time. The calibration verification step is repeated, and the result is used to decide whether to keep the parameters or make further adjustments. This cycle continues until the calculated system state deviation finally falls and stabilizes within the preset tolerance threshold. For example, after the second adjustment, the system state deviation may drop to 0.28, which is lower than the threshold of 0.3, and the cycle terminates, and the system maintains the parameters adjusted in the second time.
[0044] In some embodiments, the calibration verification step has a fixed data processing cycle length, for example set to the time length of a standard production batch, to ensure consistency in the evaluation basis. The system state offset calculation of the calibration verification step uses the same algorithm and reference values as in Embodiment 4 to ensure comparability of the offset data. The calibration verification step sets an upper limit on the number of loop iterations to prevent infinite loops, and triggers a high-level alarm when the number of adjustments reaches the upper limit while the offset is still not up to standard. Each parameter adjustment of the calibration verification step is recorded in an audit log, which contains information such as adjustment time, adjustment parameters, system state offset before and after adjustment, etc. After the system state offset stabilizes, the calibration verification step can enter a longer monitoring interval, reducing the frequency of calibration verification during the monitoring interval to save computing resources.
[0045] Optionally, the calibration verification step can introduce a gradual adjustment strategy, which does not directly use the recommended values of the double mapping relationship table at each adjustment, but instead adds a fixed increment to the current parameters. The calibration verification step can set different tolerance thresholds for different types of drug management action sequences, with stricter thresholds for critical operations. The system state offset evaluation of the calibration verification step can introduce a time dimension, not only looking at the results of a single monitoring period, but also considering the trend of the offset in the last few times. The distributed sensor node network reconfiguration of the calibration verification step can support rolling updates, which avoid data disruption caused by restarting all nodes at the same time. The audit log of the calibration verification step can be used for machine learning analysis to find the most effective parameter adjustment mode. The calibration verification step can send a verification result notification to the system administrator, which contains an adjustment summary and a current system state evaluation. It can be understood that the calibration verification step is the core link of the closed-loop control module to achieve adaptive optimization. Through continuous data feedback and parameter fine-tuning, the calibration verification step ensures that the system can self-correct when facing internal and external disturbances, maintaining the best monitoring state. The introduction of the calibration verification step makes the system no longer rely on one-time parameter settings, but has the ability to continuously learn and improve.
[0046] It should be noted that, in this document, the terms such as first and second are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or inherent to such a process, method, article or device.
[0047] While embodiments of the application have been shown and described, it is to be understood that the embodiments described are merely exemplary of the principles and application of the present application. Numerous modifications and adaptions can be effected without departing from the spirit and scope of the present application, which is not limited to the exact construction and arrangement described. It is intended, therefore, to cover all modifications and adaptions that fall within the scope of the claims and their equivalents.
Claims
1. A pharmaceutical information management system based on big data analytics, characterized in that, The system includes: The data injection module captures multi-dimensional data streams throughout the entire lifecycle of a drug through a distributed sensor node network and organizes the data streams in a structured manner. The data purification module uses a real-time stream processing engine to perform noise filtering and missing value compensation on the multidimensional data stream, and outputs a drug state tensor with spatiotemporal tags. The risk identification module performs multi-scale pattern scanning on the drug state tensor, locates abnormal data clusters and activates the directional analysis process, and constructs a drug quality hypersurface model. The data aggregation module establishes a mapping relationship between the drug state tensor and the drug quality hypersurface model, and uses a spatiotemporal graph attention network to calculate the global consistency metric. The intelligent decision-making module inputs the global consistency metric into the strategy optimizer to solve for the sequence of drug management actions under multiple constraints. The closed-loop control module executes the drug management action sequence and monitors the system state deviation. Based on the deviation, it adaptively calibrates the acquisition frequency and range of the data injection module.
2. The pharmaceutical information management system based on big data analysis according to claim 1, characterized in that, The data injection module includes: Vibration sensor arrays are deployed on the pharmaceutical production line, optical detection probes are integrated in the pharmaceutical packaging process, and temperature and humidity recorders are installed in the pharmaceutical distribution process. The vibration sensor arrays collect equipment vibration spectrum data during the pharmaceutical production process, the optical detection probes capture sequences of pharmaceutical appearance images, and the temperature and humidity recorders record parameters of the pharmaceutical storage and transportation environment. Define key event points in the drug lifecycle, including raw material input time, drug formation time, quality sampling time, and delivery time; dynamically expand the data collection window centered on key event points; Construct a data importance function based on time decay, assigning high collection weights to data segments close to critical event points and low collection weights to data segments far from critical event points; The working mode of the distributed sensor node network is dynamically configured based on the output of the data importance function. High-weight data segments correspond to continuous acquisition mode, while low-weight data segments correspond to intermittent acquisition mode. By dynamically adjusting the sampling rate of each sensor node through a data importance function, vibration spectrum data, appearance image sequences, and environmental parameters are integrated to form a multi-dimensional data stream covering the entire life cycle of a drug.
3. The pharmaceutical information management system based on big data analysis according to claim 2, characterized in that, The data cleansing module includes: Construct a stream processing pipeline, which includes a data receive buffer, a sliding window processor, and a data enhancer; The data receiving buffer receives multidimensional data streams in chronological order and temporarily stores data packets in a first-in-first-out manner. The sliding window processor defines a variable-length time window, extracts data packets within the window from the data receiving buffer, performs integrity checks on each data packet, and identifies missing data timestamps and abnormal fluctuation points. The data augmenter uses a time series prediction algorithm to impute missing values in data packets that have been identified as having missing timestamps; and applies a wavelet thresholding algorithm to smooth the data in data packets that have been identified as having abnormal fluctuation points. The processed data packets within the window are rearranged according to spatiotemporal attributes, and timestamps and spatial location labels are added to generate a drug status tensor.
4. The pharmaceutical information management system based on big data analysis according to claim 3, characterized in that, The method for the risk identification module to perform multi-scale pattern scanning of the drug state tensor includes: A multilayer perceptron model is used to extract deep features of the drug state tensor. The first layer perceptron learns the local temporal pattern, and the second layer perceptron learns the global spatial dependency. Calculate the Mahalanobis distance of deep features, identify data points that deviate from the normal distribution range, and form a preliminary set of abnormal data points; Density clustering is performed on the initial set of abnormal data points to group data points that are spatially adjacent and have similar characteristics into abnormal data clusters. A risk score is calculated for each anomalous data cluster, based on the cluster's size, density, and distance from key event points. A preset risk scoring threshold is set, and abnormal data clusters with risk scores exceeding the threshold are marked as high-risk areas, triggering a targeted analysis process.
5. The pharmaceutical information management system based on big data analysis according to claim 4, characterized in that, The method for constructing a drug quality hypersurface model by activating the targeted analysis process in the risk identification module includes: For each marked high-risk area, a mobile data collection agent is deployed to perform detailed scanning; the mobile data collection agent moves along a preset path to collect enhanced data inside and at the boundaries of the high-risk area; Principal component analysis was performed on the augmented data, and key quality feature vectors were extracted after dimensionality reduction. The key quality feature vectors are input into the generative adversarial network. The generator of the generative adversarial network is responsible for synthesizing data that conforms to the normal quality distribution, and the discriminator is responsible for distinguishing real data from synthetic data. Through adversarial training between the generator and the discriminator, the potential distribution patterns of drug quality data are learned; The learned distribution patterns are fitted to a surface in three-dimensional space, and the risk level is added as a fourth dimension attribute to construct a hypersurface model of drug quality.
6. The pharmaceutical information management system based on big data analysis according to claim 5, characterized in that, The data aggregation module establishes the mapping relationship between the drug state tensor and the drug quality hypersurface model, including the following methods: Project the drug state tensor onto the same feature space as the drug quality hypersurface model to obtain the projected drug state feature point set. Calculate the shortest Euclidean distance from each point in the drug state feature point set to the drug quality hypersurface, and use it as a measure of local consistency for that point; Construct a topology diagram of the drug distribution network, where nodes represent drug batches or locations, and edges represent distribution paths or influencing relationships; The spatiotemporal graph attention network aggregates the local consistency measure of each node and its neighboring nodes, and the weight of the neighboring nodes is determined by both spatiotemporal distance and flow rate. The global consistency metric of each node is calculated through multi-layer propagation of the spatiotemporal graph attention network.
7. A pharmaceutical information management system based on big data analysis according to claim 6, characterized in that, The method by which the intelligent decision-making module inputs the global consistency metric value into the policy optimizer includes: The strategy optimizer maintains an action space containing all executable drug management operations, each associated with a cost parameter and an expected effect vector. Define a state space, which consists of a global consistency metric, the current drug inventory level, and a market demand index. The policy optimizer is trained using the deep Q-learning algorithm. The Q-network of the deep Q-learning algorithm takes the state space as input and outputs the Q value of each action in the state space. During training, the goal is to maximize long-term cumulative rewards, and the reward function is based on the degree of improvement in consistency metrics and the degree of reduction in management operation costs. When the system enters a new state space, the policy optimizer selects the drug management operation with the highest Q value to form a drug management action sequence.
8. The pharmaceutical information management system based on big data analysis according to claim 7, characterized in that, The method by which the closed-loop control module executes a sequence of drug management actions and monitors system state deviations includes: The sequence of drug management actions is sent to the execution terminal through the control interface, including automated production line regulators, intelligent warehouse schedulers, and logistics route planners; After executing the action sequence, a monitoring cycle is initiated, during which data on key drug quality indicators are continuously collected. Calculate the changes in key quality indicator data relative to the baseline value within the monitoring period to obtain the system state offset vector; The system state offset vector is normalized, and its magnitude is calculated as the system state offset. A preset offset tolerance threshold is set. If the system state offset exceeds the tolerance threshold, a strategy adjustment signal is generated.
9. A pharmaceutical information management system based on big data analysis according to claim 8, characterized in that, The method by which the closed-loop control module adaptively calibrates the acquisition frequency and range of the data injection module based on the offset includes: Establish a dual mapping table between offset and acquisition parameters. The larger the offset, the higher the acquisition frequency and the wider the acquisition range. When a strategy adjustment signal is received, the dual mapping table is queried to determine the new sampling frequency and sampling range parameters. Send a reconfiguration command to the distributed sensor node network, which includes the new sampling frequency and sampling range; The distributed sensor node network adjusts its operating parameters according to the reconfiguration command, narrowing or expanding the spatiotemporal coverage of data acquisition, and increasing or decreasing the data sampling rate.
10. A pharmaceutical information management system based on big data analysis according to claim 9, characterized in that, The closed-loop control module also includes a calibration and verification step: After adjusting the operating parameters of the distributed sensor node network, wait for a complete data processing cycle; After the new data processing cycle ends, the system state offset is recalculated. If the new system state offset drops below the tolerance threshold, the current acquisition parameters are maintained. If the new system state offset is still higher than the tolerance threshold, the dual mapping table is queried again to further adjust the sampling frequency and sampling range until the system state offset stabilizes within the tolerance threshold.
Citation Information
Cited By
Dynamic management system based on intelligent scenic spot resources
CN121836295A
Intelligent production monitoring method and system for injection
CN122087489A
