Biochemical laboratory internal quality control data out-of-control identification and early warning method and system
By employing a streaming incremental computation and a two-level cascaded statistical algorithm framework, combined with adaptive sliding window and linear fitting algorithms, the problems of low efficiency, insufficient robustness, and insufficient early warning in the biochemical laboratory quality control data processing system are solved. This enables efficient and accurate quality control data identification and early warning, adapting to different testing items and scenarios.
Patent Information
- Application Number
- CN202611246820.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-17
- Publication Date
- 2026-11-06
AI Technical Summary
Existing biochemical laboratory quality control data processing systems suffer from low data processing efficiency, insufficient robustness in anomaly detection, lack of early warning capabilities, crude alarm push mechanisms, and inability to autonomously iterate and optimize algorithms. These issues lead to delayed detection of out-of-control situations, frequent false positives, high false negative rates, low response efficiency, and an inability to adapt to the data fluctuation characteristics of different projects and scenarios.
A streaming incremental computing architecture is adopted to construct a two-layer cascaded statistical algorithm framework. Through multi-rule parallel statistical computing and distribution feature cross-validation, combined with adaptive sliding window and linear fitting algorithms, real-time analysis and early warning of quality control data are performed, generating structured multi-dimensional alarm tags to achieve hierarchical alarm delivery, and constructing a judgment-handling-feedback closed-loop optimization algorithm parameter.
It achieves low-latency dynamic updates of the quality control baseline, improves the accuracy and recall of anomaly identification, reduces the false positive rate, has early warning capabilities, improves the response efficiency of high-risk events, and the algorithm's identification accuracy continues to improve with operation, adapting to different detection items and scenarios.
Smart Images

Figure CN123049413A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of electronic digital data processing technology, specifically involving statistical analysis, anomaly identification and early warning methods for time-series detection data, which can be applied to intelligent management scenarios of quality control data in biochemical laboratories. Background Technology
[0002] Internal quality control is a core component in ensuring the accuracy and stability of biochemical test results. Its technical essence lies in identifying abnormal fluctuations and drifts in the testing system through statistical analysis of time-series testing data from fixed-value quality control samples. Currently, most mainstream quality control data processing systems are built upon the classic Westgard multi-rule algorithm and generally employ an offline batch processing architecture to determine out-of-control states.
[0003] Existing technologies have the following drawbacks: First, data processing efficiency is low. Updating the quality control baseline requires recalculating all data, resulting in high computational complexity and processing latency. This makes them unsuitable for the real-time streaming access requirements of multi-source heterogeneous data, and the delayed detection of out-of-control situations can easily affect a large number of sample data. Second, the robustness of anomaly detection is insufficient. The rule matching mode based on a single level and a single data source inherently presents a contradiction between precision and recall, leading to frequent false positives and hidden drift / missed detection issues, and lacking a multi-dimensional cross-validation mechanism. Third, they lack early warning capabilities, only able to detect out-of-control situations that have already occurred. The system fails to make post-event judgments, lacks quantitative fitting and time prediction of the changing trends of time-series data, and the handling of out-of-control situations remains in a passive remedial state; fourth, the alarm push mechanism is crude, using a unified broadcast mode to distribute alarms without implementing graded and targeted delivery based on risk levels, resulting in low response efficiency for high-risk events and easy information interference for low-risk messages, and lacks end-to-end traceability capabilities; fifth, the algorithm cannot iterate and optimize autonomously, the judgment parameters are fixed, and a feedback loop for the results of out-of-control handling is not constructed, making it difficult to adapt to the data fluctuation characteristics of different projects and scenarios, and the identification accuracy cannot be continuously improved. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention discloses a method and system for identifying and warning of out-of-control quality control data in biochemical testing laboratories, in order to solve the problems mentioned in the background art.
[0005] To achieve the above objectives, the present invention provides the following technical solution: a method for identifying and issuing early warnings of out-of-control quality control data in a biochemical laboratory, comprising the following steps:
[0006] S1. Access multi-source heterogeneous time-series quality control data and perform streaming standardization preprocessing. Maintain sliding time windows by grouping according to detection items and quality control levels. Update the dynamic baseline statistical parameters of each group of data in real time based on incremental statistical algorithms.
[0007] S2. Construct a two-layer cascaded statistical algorithm framework. Through the basic rule calculation unit, perform multi-rule parallel statistical calculations on the time series data of the fixed-value quality control products, and output the initial anomaly judgment result and the basic confidence score. Simultaneously, through the verification rule calculation unit, extract the distribution features of the batch sample detection data within the same time window and output the offset feature value. The basic confidence score and the offset feature value are weighted and fused to output the final anomaly status and the corresponding risk level.
[0008] S3. Adaptively adjust the sliding window length according to the fluctuation level of the current data window, perform linear fitting on the time series quality control data within the window to obtain the drift slope and the unit time offset rate, and calculate the remaining time of loss of control by combining the current offset and the preset loss of control threshold. When the remaining time is less than the warning threshold, trigger the trend warning.
[0009] S4. Generate structured multi-dimensional alarm tags based on abnormal status, risk level and warning results. Match the corresponding push channel and receiving role through the tag routing engine, perform hierarchical alarm delivery and record the status of the entire link.
[0010] S5. Collect feedback data after handling out-of-control situations and associate it with the original abnormal data to form labeled samples. Iterate and optimize the weight parameters of the cascade fusion calculation based on the labeled samples according to a preset period to achieve autonomous improvement of the algorithm's recognition accuracy.
[0011] Preferably, the incremental statistical algorithm described in step S1 is an incremental dynamic baseline calculation process as follows:
[0012] For each set of quality control data, maintain a time-series data sliding window of fixed length N. When new test data flows in, remove the earliest data point from the window. At the same time, the latest data points Move the window in; based on the statistical parameters before the window update, directly calculate the updated mean using an incremental formula. with standard deviation There is no need to recalculate all the data in the window. The calculation formula is as follows:
[0013] ,
[0014] ,
[0015] in, This represents the average quality control data before the window update. Let N be the standard deviation of the quality control data before the window is updated, and let N be the fixed length of the sliding window, which takes the value of a positive integer.
[0016] The dynamic baseline parameters calculated by this formula and As a unified benchmark for quality control rule determination in subsequent step S2 and offset calculation in step S3, it adapts to the low-latency processing requirements of streaming data.
[0017] Preferably, the multi-rule parallel statistical determination of the basic rule calculation unit in step S2 specifically includes:
[0018] The system incorporates a built-in vectorized quality control rule algorithm library, which performs four types of statistical calculations in parallel on the time-series data of fixed-value quality control products: single-point deviation rules, continuous point offset rules, extreme difference rules, and trend offset rules. Each rule corresponds to a different standard deviation multiple judgment threshold. When the data meets the triggering condition of the corresponding rule, the confidence weight of the corresponding rule is accumulated, and the final output is a basic confidence score ranging from 0 to 1. Corresponding to the initial judgment status label;
[0019] The initial status labels include three categories: controlled, warning, and out of control, with a basic confidence score. As the first dimension input parameter in the cascade fusion calculation in step S2, it is used to quantify the degree of abnormality of the quality control data itself.
[0020] Preferably, the distribution feature extraction of the verification rule calculation unit in step S2 is specifically achieved by using an exponentially weighted moving average algorithm to extract slow drift features, and the calculation formula is as follows:
[0021] ,
[0022] in, It is the exponentially weighted moving average at the current moment. It is the exponentially weighted moving average of the previous time step. This is the average detection value of all batch samples within the current time window. This is a smoothing coefficient, with a value ranging from 0.05 to 0.4.
[0023] This formula eliminates the interference of random detection fluctuations by exponentially smoothing the mean of batch samples, amplifying the persistent unidirectional offset trend; based on multiple consecutive time points... The direction of change and the magnitude of the offset are used to calculate the offset characteristic value, which ranges from 0 to 1. As the second-dimensional input parameter for the cascaded fusion calculation in step S2, it is used to cross-validate the offset state of the quality control system from the batch sample dimension.
[0024] Preferably, the weighted fusion and cascade determination in step S2 are specifically as follows:
[0025] The weighted summation formula is used to fuse the judgment results from the two dimensions to obtain the comprehensive risk score R. The calculation formula is as follows:
[0026] ,
[0027] in, These are the weighting coefficients for the basic rule dimension. To verify the weight coefficients of the rule dimension, satisfying ,and , All are constants greater than 0;
[0028] The system presets at least three risk score threshold ranges, compares the calculated comprehensive risk score R with the corresponding threshold range, and outputs the matched abnormal state and risk level. This formula balances the bias of single-dimensional judgment through dual-dimensional weight allocation, reduces the false positive rate caused by misjudgment by a single rule, and improves the sensitivity to the identification of small and slow drifts. The output risk level is directly used for the graded alarm matching in step S4.
[0029] Preferably, step S3 specifically includes the following:
[0030] S31 calculates the coefficient of variation (CV) of the data within the current sliding window, where the CV is the ratio of the standard deviation to the mean of the window data; the window length is adaptively adjusted based on the value of CV: when CV is greater than the first fluctuation threshold, the window length is shortened to improve drift detection sensitivity; when CV is less than the second fluctuation threshold, the window length is extended to improve trend prediction stability.
[0031] S32 uses the least squares method to perform linear fitting on the time-series quality control data within the adjusted window to obtain the drift slope k of the quality control values as the time sequence number changes. The calculation formula is as follows:
[0032] ,
[0033] Where n is the total number of data points in the adjusted window, and i is the time sequence number of the data point. Let be the quality control test value of the i-th data point;
[0034] The unit change amplitude of the quality control data is quantified by the drift slope k, and the unit time offset rate v is calculated by combining the detection frequency per unit time.
[0035] S33 is based on the offset of the current quality control data relative to the baseline. Preset out-of-control threshold offset Using the unit time offset rate v, the remaining time T for predicting the loss of control is calculated using the following formula:
[0036] ,
[0037] When the predicted remaining time T is less than the preset warning time threshold, a trend warning signal is triggered. This formula transforms the linear trend of the data into a quantifiable time warning indicator, enabling advance prediction of the out-of-control state. The output warning signal is synchronously input into step S4 for alarm level escalation.
[0038] Preferably, step S4 specifically includes the following:
[0039] Based on the risk level output in step S2 and the trend warning results output in step S3, a structured alarm message body containing risk level labels, data grouping labels, impact range labels and handling guidance labels is generated.
[0040] The tag routing engine uses the combination of tags in alarm messages as the matching condition, searches the preset distribution rule library, and automatically matches the corresponding receiving role and push channel: high-risk alarms are pushed to the system pop-up, instant messaging interface and SMS interface, and report interception instructions are sent to downstream business systems; medium-risk alarms are pushed to the business workbench and desktop notification interface; low-risk alarms are only stored in the system message center.
[0041] The entire alarm message lifecycle is recorded, including its generation time, delivery status, reading time, and response time, enabling full lifecycle traceability of alarm events.
[0042] Preferably, step S5 specifically includes the following:
[0043] The system collects feedback information from the out-of-control handling process, including the classification of abnormal causes, handling results, and retest verification data. It then uniquely associates and binds the feedback information with the corresponding original abnormal data and initial judgment results to form algorithm training samples with real labels.
[0044] Based on a preset time period and with the accuracy of anomaly identification as the optimization objective, the gradient descent algorithm is used to adjust the weight coefficients of the cascade fusion formula in step S2. and Iterative updates are performed to minimize the deviation between the overall risk score and the actual label.
[0045] The optimized weight coefficients are synchronously updated to the algorithm engine's rule base and applied to the subsequent cascaded judgment process, forming a self-optimizing closed loop of judgment-processing-feedback-optimization.
[0046] This invention also provides a system for identifying and warning of out-of-control quality control data in a biochemical laboratory, comprising the following modules connected in sequence:
[0047] The data access layer module has a built-in multi-protocol adapter plugin pool, which is used to realize the decoupled access, streaming cleaning and format standardization processing of multi-source heterogeneous quality control data, and output a standardized time-series data queue arranged by group;
[0048] The streaming computing layer module is used to maintain the sliding time window of each group of data, perform incremental dynamic baseline calculation, update statistical characteristic parameters such as mean and standard deviation in real time, and synchronously output the baseline parameters to the algorithm engine layer.
[0049] The algorithm engine layer module has a built-in basic rule calculation unit, verification rule calculation unit, cascaded judgment unit and trend prediction unit. It is used to perform two-layer cascaded statistical anomaly identification, adaptive drift trend prediction and comprehensive risk level determination, and output anomaly status, risk level and trend warning results.
[0050] The message distribution layer module is used to generate structured alarm tags based on the algorithm output, match push rules through the tag routing engine, perform multi-channel distribution of hierarchical alarms, and record the alarm status throughout the entire chain.
[0051] The data storage layer module adopts a hybrid architecture of time-series database and relational database, which is used to store raw time-series quality control data, algorithm parameters, alarm records and handling feedback sample data respectively;
[0052] The visualization and interaction layer module is used to realize real-time monitoring of quality control status, interaction of the anomaly handling workbench, and output of statistical analysis reports;
[0053] The system is used for the aforementioned method of identifying and warning of uncontrolled quality control data in biochemical testing laboratories.
[0054] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0055] 1. This invention adopts a streaming incremental computing architecture to achieve low-latency dynamic updates of the quality control baseline, which significantly reduces the latency of the entire data processing chain. At the same time, it constructs a two-layer cascaded statistical algorithm framework, which effectively balances the precision and recall of anomaly identification through two-dimensional cross-validation of quality control rules and batch sample distribution characteristics. This reduces the false positive rate while improving the sensitivity of identifying small system drifts, and significantly enhances the robustness of the algorithm.
[0056] 2. This invention uses an adaptive sliding window least squares linear fitting algorithm to quantify the drift rate of quality control data and predict the remaining time of loss of control, upgrading the traditional post-out-of-control judgment to pre-out-of-control trend early warning, reserving a window period for the laboratory to handle the situation, effectively reducing the scope of the impact of loss of control, and reversing the passive remedial quality control management mode.
[0057] 3. This invention achieves risk-oriented delivery based on a structured tag-based hierarchical alarm routing mechanism, improving the response efficiency of high-risk events; at the same time, it constructs a data closed loop of judgment-handling-feedback-optimization, and iteratively optimizes the judgment weight parameters based on historical handling cases, enabling the algorithm to autonomously adapt to different testing items and laboratory scenarios, and the recognition accuracy continues to improve with operation. Attached Figure Description
[0058] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof.
[0059] In the attached diagram:
[0060] Figure 1 This is a flowchart of the steps for identifying and issuing early warnings of out-of-control quality control data in the biochemical testing laboratory according to the present invention;
[0061] Figure 2 This is a schematic diagram of the structure of the biochemical laboratory quality control data out-of-control identification and early warning system of the present invention. Detailed Implementation
[0062] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0063] Example: Figure 1 As shown, this embodiment provides a method and system for identifying and warning of out-of-control data in biochemical laboratory testing. This embodiment is applied to the quality control scenario of a hospital laboratory biochemical testing unit, connecting to a fully automated biochemical analyzer and a hospital laboratory information system (LIS). Taking the medium-level fixed-value quality control material for serum alanine aminotransferase (ALT) testing as the specific implementation object, the out-of-control identification and warning method of the present invention is described in detail. The specific implementation steps are as follows:
[0064] Step S1: Streaming preprocessing and incremental dynamic baseline calculation of multi-source heterogeneous quality control data
[0065] This step enables decoupled access to multi-source data and low-latency baseline updates, providing a unified statistical benchmark for subsequent full-process calculations.
[0066] 1.1 Multi-source data access and flow cytometry cleaning: Through the protocol adapter plugin pool of the data access layer, it connects to the fixed-value quality control data interface of the biochemical analyzer via the HL7 protocol and to the patient sample testing database of the LIS system via the DBC protocol, while also accessing instrument metadata (reagent batch number, calibration time, sample loading parameters). After the three types of heterogeneous data enter the flow cytometry cleaning module, three levels of preprocessing are performed:
[0067] 1) Outlier filtering: Based on the 3σ criterion, extreme jump data that deviate from the current baseline mean by more than 3 times the standard deviation are removed to eliminate random pulse interference from the instrument;
[0068] 2) Missing value completion: For missing data points with an interval of no more than 2 detection cycles, linear interpolation of adjacent data is used to complete the missing data to ensure the continuity of time series data;
[0069] 3) Format standardization: The unified timestamp is a millisecond-level Unix timestamp, the unified unit of detection value, and an independent time-series data queue is built according to the dimension of "detection item - quality control level".
[0070] 1.2 Incremental Dynamic Baseline Calculation: This is a sliding window of time-series data with a maintenance length of N=30 for horizontal quality control products in ALT, storing the 30 most recent valid quality control test results. Initially, the initial baseline is calculated based on the historical 30 in-control data points: mean. Standard deviation .
[0071] When the 31st new quality control test data is generated At that time, remove the earliest historical data from the window. The baseline parameters are updated directly using an incremental statistical algorithm, without the need to recalculate all 30 data points in the window.
[0072] Formula for calculating the mean increment: ,
[0073] Substitute the numerical values into the calculation: ,
[0074] Formula for calculating the increment of standard deviation:
[0075] ,
[0076] Substitute the values and calculate step by step:
[0077] ,
[0078] ,
[0079] 0.56,
[0080] ,
[0081] ,
[0082] This incremental computation reduces the computational complexity of a single baseline update from (N) to (1), and the update time for a single data point is less than 1ms, meeting the requirements of real-time streaming processing. The calculated... and As the current quality control baseline, it provides a unified statistical benchmark for the rule determination in Section 2.2 and the offset calculation in Section 2.3. It is continuously and dynamically updated as new data flows in, adapting to the slow and natural fluctuations of the detection system.
[0083] Step S2: Identification of runaway state using a two-layer cascaded statistical algorithm
[0084] This step constructs a two-layer cascaded computation framework of "basic rules - verification rules", which performs statistical analysis from two dimensions: quality control data and patient sample data. The final risk level is output through weighted fusion, which solves the technical contradiction of high false positive rate and missed detection by small drift when using a single rule.
[0085] 2.1 Basic Rule Calculation Unit: The basic rule calculation unit has a built-in vectorized multi-rule algorithm library. It performs four types of rule judgments in parallel on the quality control product time series data. After each type of rule is triggered, the corresponding confidence weight is accumulated, and finally the basic confidence score is output. The value range is 0 to 1.
[0086] In this embodiment, the four types of rules and their corresponding confidence weights are set as follows:
[0087] 1) Single-point deviation rule: If a single quality control value exceeds the ±3σ range, the confidence level is increased by 0.8 after triggering the change.
[0088] 2) Consecutive point offset rule: If two consecutive quality control values exceed ±2σ and are in the same direction, the confidence level is increased by 0.7 after triggering.
[0089] 3) Extreme difference rule: If the range of high and low quality control values in the same batch exceeds 4σ, the confidence level is increased by 0.6 after triggering.
[0090] 4) Trend deviation rule: If the quality control value is on the same side of the mean for 10 consecutive times, the confidence level is increased by 0.5 after triggering.
[0091] This embodiment uses exemplary simulated data that conforms to the routine parameter range of clinical biochemical testing to demonstrate the algorithm. The data values are referenced to the ALT level range (40~50 U / L) and routine precision level of mainstream commercial quality control products. It is only used to intuitively demonstrate the calculation process and does not constitute a limitation on the scope of protection.
[0092] Corresponding baseline mean Standard deviation ,in The limit is 49.35 U / L. The limit is 51.47 U / L.
[0093] In this embodiment, the level control values in three consecutive ALT tests were 47.2 U / L, 49.6 U / L, and 49.8 U / L, respectively.
[0094] (1) The maximum value in a single instance was 49.8U / L, with an offset of approximately 2.21σ, which did not trigger the single-point deviation rule;
[0095] (2) 49.6 U / L and 49.8 U / L exceeded the +2σ limit (49.35 U / L) twice in the same direction, triggering the continuous point offset rule;
[0096] (3) No cross-level extreme difference anomaly, and no extreme difference rule was triggered;
[0097] (4) The trend deviation rule was not triggered because the value was on the same side of the mean for 7 consecutive times and did not reach the threshold of 10 times.
[0098] Final base confidence score The initial assessment is that the status label is "warning".
[0099] 2.2 Validation Rule Calculation Unit: Based on patient sample data within the same time window, the validation rule calculation unit uses the Exponentially Weighted Moving Average (EWMA) algorithm to extract the slow drift characteristics of the data distribution, eliminate random fluctuation interference, and output the offset feature value. The value range is 0 to 1.
[0100] EWMA calculation formula: ,
[0101] in: The smoothing coefficient is set to 0.2, which balances trend sensitivity and anti-interference ability, and is suitable for the fluctuation characteristics of biochemical test data. This represents the average test result of 200 valid patient samples within the current time window. The initial value is the EWMA value from the previous cycle, with the historical mean of patient data being 32 U / L.
[0102] In this embodiment, the mean of the patient samples in the current window Previous cycle Substitute into the calculation: ,
[0103] Based on 8 consecutive cycles For a sustained upward trend, the ratio of the offset amplitude to the historical normal fluctuation range is calculated to obtain the offset characteristic value. This value, from the perspective of the overall distribution of patient samples, shows a persistent positive drift in the cross-validation detection system.
[0104] 2.3 Cascaded fusion judgment: The basic confidence level is... With offset eigenvalues The weighted fusion is performed to obtain the comprehensive risk score R.
[0105] Weighted fusion calculation formula: ,
[0106] in: This is the weighting coefficient for the basic rules, with a value of 0.6. To verify the rule weight coefficient, a value of 0.4 was chosen; the constraint condition is satisfied. The weighting is based on quality control rules and supplemented by patient data for cross-validation.
[0107] Substitute the numerical values into the calculation: ,
[0108] Preset three-level risk threshold range:
[0109] R<0.4: Under control, no risk;
[0110] 0.4≤R<0.7: Level 2 risk (implicit drift risk);
[0111] R≥0.7: Level 1 risk (confirmed out of control).
[0112] In this embodiment The risk level was determined to be Level 1, confirming the existence of system drift and loss of control.
[0113] This weighted fusion formula solves the problem that single quality control rules are easily affected by random errors through cross-validation of two-dimensional data. The output comprehensive risk score directly corresponds to the subsequent alarm level, realizing the quantitative classification and judgment of out-of-control state.
[0114] Step S3: Adaptive sliding window drift trend prediction
[0115] This step uses a linear fitting algorithm that adaptively adjusts the window length to quantify the drift rate of quality control data, predict the remaining time to reach the runaway threshold, and achieve early warning.
[0116] 3.1 Adaptive Window Length Adjustment: First, calculate the coefficient of variation (CV) of the current quality control data window to measure the degree of data fluctuation. ,
[0117] Substitute the current baseline parameters: ,
[0118] Preset fluctuation thresholds: The first fluctuation threshold is 10%, and the second fluctuation threshold is 5%. Due to the current... If the data fluctuations are small, the trend prediction window length is extended from the default value of 10 to 20 to improve the stability of trend fitting; if the data fluctuations are drastic and CV>10%, the window is shortened to 5 to improve the drift detection sensitivity.
[0119] 3.2 Least squares linear fitting to calculate drift slope: For the adjusted 20 time series quality control data points, the least squares method is used for linear fitting to obtain the drift slope k of the quality control value as the time series number changes.
[0120] Drift slope calculation formula: ,
[0121] in: is the total number of data points in the window; i is the time sequence number of the data point (values 1, 2, ..., 20); This is the quality control test value for the i-th data point. In this embodiment, the results are obtained from 20 data points:
[0122] , , , ,
[0123] Substitute into the formula to calculate:
[0124] ,
[0125] ,
[0126] ,
[0127] That is, for each quality control test completed, the quality control value drifts positively by an average of about 0.445 U / L.
[0128] 3.3 Loss of Control Time Prediction and Early Warning Trigger: Based on the twice-daily quality control inspection frequency, the unit time deviation rate is calculated: ,
[0129] The offset of the current quality control mean relative to the baseline Preset runaway threshold offset .
[0130] Formula for calculating the remaining time of runaway: ,
[0131] Substitute the values: ,
[0132] The preset warning time threshold is 2 days. Since T=1.88 days < 2 days, a trend warning signal is triggered, indicating that the detection system will reach a state of complete loss of control in about 1.9 days.
[0133] This calculation formula transforms the abstract drift trend into a quantifiable time indicator, reserving a window of opportunity for the laboratory to take action, thus achieving a technological upgrade from "post-event judgment" to "pre-event warning". The output warning signal is simultaneously input into the alarm module to upgrade the alarm level and push action suggestions.
[0134] Step S4: Hierarchical alarm distribution based on label routing
[0135] This step generates structured alarm tags based on the out-of-control judgment results and trend warning signals, and uses a tag routing engine to achieve precise hierarchical push notifications.
[0136] 1) Alarm Tag Generation: Based on the primary risk assessment and trend warning results, a structured alarm message body containing four types of fields is generated:
[0137] Risk level label: Level 1 (Emergency loss of control);
[0138] Data grouping labels: ALT project - intermediate-level quality control;
[0139] Impact range label: positive systemic drift, involving samples from the same batch of patients;
[0140] Handling Guideline Label: It is recommended to check the status of the sample dispensing needle, clean the optical path, and retest after calibration.
[0141] 2) Tag-based route matching: The routing engine uses tag combinations as search criteria to match a preset distribution rule base.
[0142] Level 1 Risk Alert: Simultaneously pushes the alert to the system pop-up, the department head's SMS interface, and the department's work group instant messaging interface. At the same time, it sends a report review and interception instruction for the project to the LIS system to prevent the issuance of abnormal sample reports.
[0143] Level 2 risk alert: Pushed to the system workbench and desktop notification of the professional group leader;
[0144] Level 3 Risk Warning: Stored only in the system message center, accessible only to operators upon login.
[0145] In this embodiment, a Level 1 risk alarm is triggered, and multi-channel synchronous push is executed according to the rules, while simultaneously triggering report interception.
[0146] 3) End-to-end tracking: The system records the alarm generation time, delivery time, recipient, read time, and response time, forming a full lifecycle log of the alarm event, supporting post-event traceability and quality control management assessment.
[0147] Step S5: Feedback Loop and Algorithm Self-Optimization
[0148] This step establishes a closed-loop mechanism of "judgment-disposal-feedback-optimization" and iteratively optimizes algorithm parameters based on actual disposal results.
[0149] 1) Feedback Data Association: After handling the loss of control, the operator enters the cause of the anomaly, the handling measures, and the retest results into the system. The system associates and binds the above feedback information with the original anomaly data and the initial judgment result through a unique event ID, forming algorithm training samples with real labels.
[0150] 2) Iterative optimization of weight parameters: On a monthly basis, based on the accumulated labeled training samples, the gradient descent algorithm is used to optimize the weight coefficients of the cascaded fusion formula. , Iterative optimization is performed. The optimization objective is to minimize the cross-entropy loss function for anomaly identification, thereby minimizing the deviation between the overall risk score and the actual out-of-control label. Weight constraints are maintained throughout the optimization process. The iteration step size is set to 0.01, and the iteration termination condition is that the decrease in the loss function is less than 0.001. The optimized weight parameters are synchronously updated to the algorithm rule base and applied to the subsequent cascaded judgment process to continuously improve the recognition accuracy.
[0151] like Figure 2 As shown, this embodiment also provides a system for identifying and warning of out-of-control quality control data in a biochemical laboratory, the specific implementation of which includes:
[0152] This system adopts a layered and decoupled microservice architecture. Each module interacts with data through standardized interfaces, supporting horizontal scaling. The specific implementation of each module is as follows:
[0153] The data access layer module has a built-in protocol adaptation plugin pool, including four standard plugins: HL7, TCP / IP, HTTP, and DBC, supporting rapid integration with mainstream biochemical analyzers and LIS systems. Plugins are completely decoupled from the core computing logic; adding a new device type only requires developing the corresponding protocol plugin, without modifying the core algorithm. The module also includes a built-in streaming cleaning unit that performs outlier filtering, missing value completion, and format standardization, outputting a standardized time-series data queue grouped by project, with a data output latency of less than 100ms.
[0154] The streaming computing layer module is built on a streaming computing engine and is responsible for maintaining the sliding time window for each group of data and performing incremental dynamic baseline calculations. The module has a built-in window scheduling unit that independently maintains the window lifecycle according to data groups, supports parallel computing for multiple projects, and a single node can simultaneously support real-time quality control calculations for no less than 100 detection projects, with baseline parameter update latency of less than 1ms.
[0155] The algorithm engine layer module is the core computing module of the system, with four independent computing units built in:
[0156] 1) Basic rule calculation unit: It solidifies multi-rule quality control algorithms, supports custom rule thresholds and confidence weights, and uses vectorized operations to improve calculation efficiency;
[0157] 2) Validation rule calculation unit: integrates three types of patient data quality control algorithms: exponentially weighted moving average, patient mean, and Z-ratio score, and supports configuration of parameters such as window size and smoothing coefficient;
[0158] 3) Cascaded Decision Unit: Performs weighted fusion calculation and risk level matching, and supports custom thresholds for multiple levels;
[0159] 4) Trend Prediction Unit: Enables adaptive window adjustment, least squares fitting, and runaway time prediction. Each unit interacts through a standardized data interface, supporting individual upgrades and replacements.
[0160] The message distribution layer module includes a tag generation unit, a routing engine, and a multi-channel delivery adapter. The tag generation unit outputs structured tags based on an algorithm; the routing engine performs tag matching based on a rule base, with a matching time of less than 10ms; the multi-channel adapter connects to delivery channels such as system pop-ups, SMS, and instant messaging tools, and supports channel status monitoring and failure retries.
[0161] The data storage layer module adopts a hybrid architecture of time-series database and relational database: the time-series database stores raw quality control time-series data and calculation results, meeting the requirements of high-throughput writing and fast range query; the relational database stores algorithm parameters, alarm records, handling feedback samples, and user configuration information. The two types of databases maintain consistency through a data synchronization mechanism, supporting historical data backtracking and algorithm review.
[0162] The visualization and interaction layer module includes three functional units: a real-time monitoring dashboard, an outage handling workbench, and statistical analysis reports.
[0163] 1) Real-time monitoring dashboard: Displays the quality control status, quality control trend charts, and real-time early warning information for all projects;
[0164] 2) Out-of-Control Handling Workbench: Provides alarm viewing, cause registration, measure entry, and retesting / verification functions;
[0165] 3) Statistical analysis reports: Automatically generate monthly quality control reports, distribution of out-of-control causes, rule accuracy statistics, and other reports.
[0166] The various modules of this system work together to fully implement the above-mentioned methods for identifying and warning of loss of control, and have high real-time performance, high accuracy and high scalability.
[0167] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for identifying and issuing early warnings of out-of-control quality control data in a biochemical laboratory, characterized in that, Includes the following steps: S1. Access multi-source heterogeneous time-series quality control data and perform streaming standardization preprocessing. Maintain sliding time windows by grouping according to detection items and quality control levels. Update the dynamic baseline statistical parameters of each group of data in real time based on incremental statistical algorithms. S2. Construct a two-layer cascaded statistical algorithm framework, perform multi-rule parallel statistical calculations on the time series data of fixed-value quality control products through the basic rule calculation unit, and output the initial judgment result of anomalies and the basic confidence score; Simultaneously, the validation rule calculation unit extracts the distribution features of batch sample detection data within the same time window and outputs the offset feature value. The base confidence score and the offset feature value are weighted and fused to output the final abnormal state and the corresponding risk level; S3. Adaptively adjust the sliding window length according to the fluctuation level of the current data window, perform linear fitting on the time series quality control data within the window to obtain the drift slope and the unit time offset rate, and calculate the remaining time of loss of control by combining the current offset and the preset loss of control threshold. When the remaining time is less than the warning threshold, trigger the trend warning. S4. Generate structured multi-dimensional alarm tags based on abnormal status, risk level and warning results. Match the corresponding push channel and receiving role through the tag routing engine, perform hierarchical alarm delivery and record the status of the entire link. S5. Collect feedback data after handling the out-of-control situation and associate it with the original abnormal data to form labeled samples. Iterate and optimize the weight parameters of the cascade fusion calculation based on the labeled samples according to the preset period.
2. The method for identifying and issuing early warnings of out-of-control quality control data in a biochemical laboratory according to claim 1, characterized in that, The specific process of incremental dynamic baseline calculation using the incremental statistical algorithm described in step S1 is as follows: For each set of quality control data, a time-series data sliding window of fixed length N is maintained. When new test data flows in, the earliest data point in the window is removed. At the same time, the latest data points Move the window in; based on the statistical parameters before the window update, directly calculate the updated mean using an incremental formula. with standard deviation The calculation formula is as follows: , , in, This represents the average quality control data before the window update. Let N be the standard deviation of the quality control data before the window is updated, and N be the fixed length of the sliding window, which takes the value of a positive integer. The dynamic baseline parameters calculated by this formula and As a unified benchmark for quality control rule determination in subsequent step S2 and offset calculation in step S3, it adapts to the low-latency processing requirements of streaming data.
3. The method for identifying and issuing early warnings of out-of-control quality control data in a biochemical laboratory according to claim 1, characterized in that, The multi-rule parallel statistical determination of the basic rule calculation unit in step S2 specifically includes: The system incorporates a built-in vectorized quality control rule algorithm library, which performs four types of statistical calculations in parallel on the time-series data of fixed-value quality control products: single-point deviation rules, continuous point offset rules, extreme difference rules, and trend offset rules. Each rule corresponds to a different standard deviation multiple judgment threshold. When the data meets the triggering condition of the corresponding rule, the confidence weight of the corresponding rule is accumulated, and the basic confidence score is finally output. Corresponding to the initial judgment status label; The initial status labels include three categories: controlled, warning, and out of control, with a basic confidence score. This serves as the first dimension input parameter for the cascaded fusion calculation in step S2.
4. The method for identifying and issuing early warnings of out-of-control quality control data in a biochemical laboratory according to claim 1, characterized in that, The distribution feature extraction of the verification rule calculation unit in step S2 is specifically achieved through the slowly drifting feature extraction using the exponentially weighted moving average algorithm, and the calculation formula is as follows: , in, It is the exponentially weighted moving average at the current moment. It is the exponentially weighted moving average of the previous time step. This is the average detection value of all batch samples within the current time window. For smoothing coefficients; Based on multiple consecutive time points The direction and magnitude of the change are used to calculate the offset characteristic value. , which serves as the second-dimensional input parameter for the cascaded fusion calculation in step S2.
5. The method for identifying and issuing early warnings of out-of-control quality control data in a biochemical laboratory according to claim 1, characterized in that, The weighted fusion and cascading determination in step S2 are as follows: The weighted summation formula is used to fuse the judgment results from the two dimensions to obtain the comprehensive risk score R. The calculation formula is as follows: , in, These are the weighting coefficients for the basic rule dimension. To verify the weight coefficients of the rule dimension; At least three risk score threshold ranges are preset. The calculated comprehensive risk score R is compared with the corresponding threshold range, and the matched abnormal state and risk level are output. The formula balances the deviation of single-dimensional judgment through two-dimensional weight allocation, and the output risk level is directly used for the graded alarm matching in step S4.
6. The method for identifying and issuing early warnings of out-of-control quality control data in a biochemical laboratory according to claim 1, characterized in that, Step S3 details Includes the following: S31 calculates the coefficient of variation (CV) of the data within the current sliding window, where the coefficient of variation (CV) is the ratio of the standard deviation to the mean of the window data; The window length is adaptively adjusted based on the value of CV: when CV is greater than the first fluctuation threshold, the window length is shortened to improve drift detection sensitivity; when CV is less than the second fluctuation threshold, the window length is extended to improve trend prediction stability. S32 uses the least squares method to perform linear fitting on the time-series quality control data within the adjusted window to obtain the drift slope k of the quality control values as the time sequence number changes. The calculation formula is as follows: , Where n is the total number of data points in the adjusted window, and i is the time sequence number of the data point. Let be the quality control test value of the i-th data point; The unit change amplitude of the quality control data is quantified by the drift slope k, and the unit time offset rate v is calculated by combining the detection frequency per unit time. S33 is based on the offset of the current quality control data relative to the baseline. Preset out-of-control threshold offset Using the unit time offset rate v, the remaining time T for predicting the loss of control is calculated using the following formula: , When the predicted remaining time T is less than the preset warning time threshold, a trend warning signal is triggered. The output warning signal is synchronously input into step S4 for alarm level escalation.
7. The method for identifying and issuing early warnings of out-of-control quality control data in a biochemical laboratory according to claim 1, characterized in that, Step S4 specifically includes the following: Based on the risk level output in step S2 and the trend warning results output in step S3, a structured alarm message body containing risk level labels, data grouping labels, impact range labels and handling guidance labels is generated. The tag routing engine uses the combination of tags in alarm messages as the matching condition, searches the preset distribution rule library, and automatically matches the corresponding receiving role and push channel: high-risk alarms are pushed to the system pop-up, instant messaging interface and SMS interface, and report interception instructions are sent to downstream business systems; medium-risk alarms are pushed to the business workbench and desktop notification interface; low-risk alarms are only stored in the system message center. The entire alarm message lifecycle is recorded, including its generation time, delivery status, reading time, and response time, enabling full lifecycle traceability of alarm events.
8. The method for identifying and issuing early warnings of out-of-control quality control data in a biochemical laboratory according to claim 1, characterized in that, Step S5 specifically includes the following: The system collects feedback information from the out-of-control handling process, including the classification of abnormal causes, handling results, and retest verification data. It then uniquely associates and binds the feedback information with the corresponding original abnormal data and initial judgment results to form algorithm training samples with real labels. Based on a preset time period and with the accuracy of anomaly identification as the optimization objective, the gradient descent algorithm is used to adjust the weight coefficients of the cascade fusion formula in step S2. and Iterative updates are performed to minimize the deviation between the overall risk score and the actual label. The optimized weight coefficients are synchronously updated to the algorithm engine's rule base and applied to subsequent cascaded decision-making processes.
9. A system for identifying and warning of out-of-control quality control data in a biochemical laboratory, characterized in that, This includes the following modules that are connected in sequence: The data access layer module is used to decouple and access multi-source heterogeneous quality control data, perform streaming cleaning and format standardization processing, and output a standardized time-series data queue arranged in groups. The streaming computing layer module is used to maintain the sliding time window of each group of data, perform incremental dynamic baseline calculation, update statistical feature parameters in real time, and synchronously output the baseline parameters to the algorithm engine layer. The algorithm engine layer module is used to perform two-layer cascaded statistical anomaly identification, adaptive drift trend prediction and comprehensive risk level determination, and output the abnormal status, risk level and trend warning results. The message distribution layer module is used to generate structured alarm tags based on the algorithm output, match push rules through the tag routing engine, perform multi-channel distribution of hierarchical alarms, and record the alarm status throughout the entire chain. The data storage layer module adopts a hybrid architecture of time-series database and relational database, which is used to store raw time-series quality control data, algorithm parameters, alarm records and handling feedback sample data respectively; The visualization and interaction layer module is used to realize real-time monitoring of quality control status, interaction of the anomaly handling workbench, and output of statistical analysis reports; The system is used to perform the method for identifying and warning of uncontrolled quality control data in biochemical testing laboratories as described in any one of claims 1 to 8.
