Data-driven research ward quality control and subject data traceability method and system
By using data-driven causal graph reasoning and virtual intervention simulation, the problem of cross-system data traceability in traditional quality control methods has been solved, enabling causal path identification and risk quantification, and improving the data quality and management efficiency of clinical trials.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING ZHONGXING ZHENGYUAN TECH CO LTD
- Filing Date
- 2026-05-09
- Publication Date
- 2026-07-31
AI Technical Summary
Traditional quality control methods are insufficient to meet the needs of modern clinical trials for real-time monitoring, precise traceability, and causal analysis. Cross-system data traceability is difficult, causal dependencies cannot be effectively identified, and risk quantification mechanisms are lacking, making it difficult to identify the root causes of quality problems and resulting in unreasonable resource allocation.
Using a data-driven approach, a multimodal time-series dataset is constructed through a causal graph reasoning mechanism. This identifies causal paths and confounding factor nodes, generates a quality control causal topology, performs semantic alignment and entity disambiguation, establishes a data association graph, conducts virtual intervention simulations, quantifies risk propagation coefficients and source tracing priorities, constructs a multi-level source tracing index structure, locates the root causes of deviations, and generates an interpretable report.
It achieves semantic alignment and entity disambiguation across system data sources, improves the accuracy of quality control and the efficiency of data utilization, provides objective risk assessment basis, accurately locates the root cause of deviation, forms a closed-loop management mechanism, and improves the data quality and reliability of clinical trials.
Smart Images

Figure CN122494282A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to data processing technology, and more particularly to a data-driven method and system for quality control and subject data traceability in research wards. Background Technology
[0002] Clinical trial quality control is a crucial step in ensuring the reliability of pharmaceutical R&D data and the authenticity of trial results. With the increasing scale and complexity of clinical trials, data management within research wards faces significant challenges. Traditional quality control methods, primarily relying on manual inspection and post-trial auditing, are insufficient to meet the demands of modern clinical trials for real-time monitoring, precise traceability, and causal analysis. The vast amounts of multimodal data generated during clinical trials include subjects' physiological indicators, medical procedure records, medication records, and environmental parameters. This data is scattered across different systems, lacking a unified framework for integration and analysis.
[0003] The lack of semantic-level association mechanisms between heterogeneous data sources makes cross-system data traceability difficult, hindering the rapid identification of root causes when quality control deviations occur and delaying corrective actions. Traditional quality control methods fail to effectively identify causal dependencies between variables, focusing only on surface correlations while ignoring implicit causal paths, making it difficult to systematically identify the root causes of quality problems. Existing traceability methods lack risk quantification mechanisms and cannot prioritize different types of quality control deviations, resulting in unreasonable resource allocation, failure to address critical issues in a timely manner, and ultimately affecting the overall quality and data reliability of clinical trials.
[0004] Therefore, there is an urgent need to establish a data-driven research ward quality control and subject data traceability method that can integrate multi-source heterogeneous data, use causal reasoning techniques to uncover key quality control nodes, and provide a precise accountability mechanism, thereby improving the efficiency and accuracy of clinical trial data quality management. Summary of the Invention
[0005] The embodiments of the present invention provide a data-driven method and system for quality control and subject data traceability in research wards, which can solve the problems in the prior art.
[0006] A first aspect of this invention provides a data-driven method for quality control and subject data traceability in research wards, comprising:
[0007] Collect subject physiological index sequences, medical operation event flow, drug exposure time series data, and ward environment parameters throughout the entire clinical trial process to construct a multimodal time series dataset;
[0008] Based on the causal graph reasoning mechanism, the causal dependency relationship of the variable nodes in the multimodal time series dataset is modeled, the causal path and confounding factor nodes affecting the quality control results are identified, and the quality control causal topology is generated.
[0009] Based on the causal strength and temporal propagation characteristics of each node in the quality control causal topology, semantic alignment and entity disambiguation are performed on heterogeneous data sources across systems to establish a subject-centered data association graph.
[0010] Virtual intervention simulations were performed on the data association graph to assess the impact of removing specific operation nodes or correcting specific data deviations on the experimental endpoint indicators, thereby quantifying the risk propagation coefficient and source tracing priority weight of each quality control deviation event.
[0011] A multi-level traceability index structure is constructed based on the risk propagation coefficient and the traceability priority weight. When a quality control anomaly occurs, the responsibility chain is traced back along the reverse causal path of the data association graph to locate the root cause node of the deviation and generate an interpretable traceability report.
[0012] The root cause node characteristics and counterfactual reasoning results identified in the interpretability traceability report are fed back to the causal graph reasoning mechanism to dynamically adjust the edge weights and node monitoring thresholds in the quality control causal topology.
[0013] Based on the causal graph reasoning mechanism, causal dependency modeling is performed on the variable nodes in the multimodal time series dataset to identify causal paths and confounding factor nodes that affect the quality control results, and to generate a quality control causal topology structure including:
[0014] Feature vectors representing the physiological index sequence of subjects, medical operation event flow, drug exposure time series data and ward environment parameters are extracted from the multimodal time series dataset, and corresponding variable node identifiers are assigned to each feature vector;
[0015] The statistical dependencies between each variable node are quantitatively evaluated based on the conditional independence test. Variable node pairs that satisfy the causal Markov condition are selected, and an initial causal graph skeleton structure is constructed. The undirected edges in the initial causal graph skeleton structure are oriented, and the causal flow direction is determined by identifying the collision node structure and transitive dependency pattern, thus forming a directed causal graph.
[0016] In the directed causal graph, edges that violate temporal causality are pruned according to the order of timestamps of each variable node in the multimodal time series dataset, and variable nodes that satisfy temporal priority and have a direct impact on quality control results are marked as causal path nodes.
[0017] Based on the directed causal graph, all paths from the causal path node to the quality control result node are traversed, and variable nodes that are related to both the causal path node and the quality control result node but are not on the direct causal path are identified as confounding factor nodes.
[0018] A quality control causal topology structure is generated based on the topological relationships of the causal path nodes, the confounding factor nodes, and their connecting edges.
[0019] In the directed causal graph, edges that violate temporal causality are pruned according to the chronological order of the timestamps of the variable nodes in the multimodal time-series dataset. Variable nodes that satisfy temporal priority and have a direct impact on quality control results are marked as causal path nodes, including:
[0020] Extract the start and end variable nodes of each directed edge in the directed causal graph, and obtain the timestamp sequences corresponding to the start and end variable nodes from the multimodal time series dataset.
[0021] The timestamp sequence is compared temporally to identify directed edges where the timestamp of the starting variable node is later than the timestamp of the ending variable node as a set of temporal violation edges. All directed edges in the set of temporal violation edges are removed from the directed causal graph to generate a temporally consistent causal graph.
[0022] Locate the target variable node representing the quality control result in the time-consistent cause-effect graph, and calculate the number and length of directed paths from each variable node in the time-consistent cause-effect graph to the target variable node;
[0023] The process involves tracing back from the target variable node to the upstream variable node of the time-series consistent causal graph, quantifying the causal contribution of each variable node to the target variable node, and selecting variable nodes whose causal contribution exceeds a preset contribution threshold and have a direct directed edge connection with the target variable node as a set of candidate causal path nodes.
[0024] Verify whether the timestamps of each variable node in the candidate causal path node set are earlier than the timestamp of the target variable node, and mark the variable nodes that satisfy the time prior condition as causal path nodes.
[0025] Based on the causal strength and temporal propagation characteristics of each node in the aforementioned quality control causal topology, semantic alignment and entity disambiguation are performed on heterogeneous data sources across systems to establish a subject-centered data association graph, including:
[0026] Extract the causal strength weights and temporal propagation delay features of nodes from the quality control causal topology, and construct a node feature vector table;
[0027] Based on the causal strength weights in the node feature vector table, the data fields in the heterogeneous data source are ranked by importance. Data fields with weights higher than a preset weight threshold are marked as core alignment fields, and a cross-system semantic mapping rule base is constructed for the core alignment fields.
[0028] Based on the constraints of the semantic mapping rule base, the data records representing the same medical entity but using different naming conventions in the heterogeneous data source are subjected to semantic standardization transformation to generate a standardized dataset under a unified semantic space.
[0029] Using the temporal propagation delay feature in the node feature vector table, multi-source data records pointing to the same subject individual are identified from the normalized dataset, their temporal association confidence is calculated, and when the consistency condition is met, they are merged into a single entity representation.
[0030] Using the subject identifier as the central node, the single entity representation is used as the associated node, and directed association edges are established based on the causal dependencies between nodes in the quality control causal topology; a subject-centered data association graph is constructed based on the central node, the associated nodes, and the directed association edges.
[0031] Virtual intervention simulations were conducted on the data correlation graph to assess the impact of removing specific operational nodes or correcting specific data deviations on the experimental endpoint indicators. Based on this, the risk propagation coefficients and source tracing priority weights of each quality control deviation event were quantified, including:
[0032] Identify operation nodes representing medical operation behaviors and deviation nodes representing abnormal data states from the data association graph, and extract the endpoint nodes representing the test endpoint indicators from the data association graph.
[0033] Construct a counterfactual reasoning framework, and perform topological replication on the data association graph within the counterfactual reasoning framework. Perform a node removal operation on each operation node in the replicated graph, or perform a numerical correction operation on each deviation node, to form multiple intervention-post graph instances.
[0034] The causal effect propagation calculation is performed on the graph instance after the intervention along the directed association edge. The state change amplitude of each intermediate node on the path from the intervened node to the endpoint node is quantified, and the numerical difference of the endpoint node before and after the intervention is accumulated as the intervention impact quantity.
[0035] Based on the weighted fusion of the intervention impact and the out-degree value of the intervened node in the original data association graph, the risk diffusion capability of the intervened node to downstream nodes is calculated, and a risk propagation coefficient is assigned to the intervened node accordingly.
[0036] Based on the risk propagation coefficient and the intervention impact, the deviation nodes corresponding to all quality control deviation events in the data association graph are double-sorted, and a source tracing priority weight is assigned to each quality control deviation event.
[0037] A counterfactual reasoning framework is constructed, and the data association graph is topologically replicated within this framework. For each operational node in the replicated graph, a node removal operation is performed, or a numerical correction operation is performed for each deviation node, resulting in multiple post-intervention graph instances, including:
[0038] Initialize the counterfactual reasoning framework and allocate independent storage space in the counterfactual reasoning framework. Traverse all nodes and directed edges in the data association graph and completely map the identification information, attribute parameters and edge connection relationships of each node to the independent storage space to generate a replicated graph that is topologically isomorphic to the data association graph.
[0039] In the replicated graph, mark the operation node and the deviation node and create a queue of nodes to be intervened. For each operation node in the queue of nodes to be intervened, cut all the incoming and outgoing edges of the operation node on the replicated graph and remove it from the causal propagation link to form an operation node removal graph instance.
[0040] For each deviation node in the queue of nodes to be intervened, the current value of the deviation node is replaced with the correction target value on the copied graph, and the values of downstream nodes along the outgoing edge are cascaded and updated to form a deviation node correction graph instance.
[0041] The instances of the removed operation nodes and the instances of the corrected deviation nodes are aggregated into multiple post-intervention instances.
[0042] Based on the risk propagation coefficient and the source tracing priority weight, a multi-level source tracing index structure is constructed. When a quality control anomaly occurs, the responsibility chain is traced back along the reverse causal path of the data association graph to locate the root cause node of the deviation and generate an interpretable source tracing report, including:
[0043] Read the risk propagation coefficient corresponding to each directed association edge in the data association graph and the source tracing priority weight corresponding to each node. Create an index record for each node that includes the source node identifier of the incoming edge, the risk propagation coefficient of the incoming edge, and the source tracing priority weight of the node. Build a multi-level source tracing index structure by storing the data in layers according to the node level depth.
[0044] Receive the quality control anomaly trigger signal and extract the anomaly node identifier. Locate the index record corresponding to the anomaly node identifier in the multi-level traceability index structure. Extract the incoming edge source node identifier and the incoming edge risk propagation coefficient. Multiply the incoming edge risk propagation coefficient and the traceability priority weight corresponding to the incoming edge source node identifier to obtain the backtracking weight value.
[0045] The incoming edge source node with the highest backtracking weight value is selected as the current backtracking node in descending order of the backtracking weight value; the index record corresponding to the current backtracking node is located in the multi-level backtracking index structure, and the operations of extracting the incoming edge source node and calculating the backtracking weight value are repeated. The backtracking is performed layer by layer along the reverse causal path of the data association graph to the node without an incoming edge source node, and the node is marked as the deviation root source node.
[0046] Record the chain of responsibility path from the abnormal node identifier to the root cause node of the deviation. The chain of responsibility path includes the identifiers of each node in the path, the tracing priority weights, and the risk propagation coefficients of the edges, and generate an interpretable tracing report.
[0047] A second aspect of the present invention provides a data-driven research ward quality control and subject data traceability system, comprising:
[0048] The first unit is used to collect the physiological index sequences of subjects, medical operation event flow, drug exposure time series data and ward environment parameters throughout the entire clinical trial process to construct a multimodal time series dataset;
[0049] The second unit is used to model the causal dependencies of variable nodes in the multimodal time series dataset based on the causal graph reasoning mechanism, identify the causal paths and confounding factor nodes that affect the quality control results, and generate the quality control causal topology.
[0050] The third unit is used to perform semantic alignment and entity disambiguation on heterogeneous data sources across systems based on the causal strength and temporal propagation characteristics of each node in the quality control causal topology, and to establish a subject-centered data association graph.
[0051] The fourth unit is used to perform virtual intervention simulation on the data association map to evaluate the impact of removing specific operation nodes or correcting specific data deviations on the test endpoint indicators, thereby quantifying the risk propagation coefficient and traceability priority weight of each quality control deviation event.
[0052] The fifth unit is used to construct a multi-level traceability index structure based on the risk propagation coefficient and the traceability priority weight, and to trace back the chain of responsibility along the reverse causal path of the data association graph when a quality control anomaly occurs, locate the root cause node of the deviation and generate an interpretable traceability report.
[0053] The sixth unit is used to feed back the root node features and counterfactual reasoning results identified in the interpretability traceability report to the causal graph reasoning mechanism, and dynamically adjust the edge weights and node monitoring thresholds in the quality control causal topology.
[0054] A third aspect of the present invention provides an electronic device, comprising:
[0055] processor;
[0056] Memory used to store processor-executable instructions;
[0057] The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.
[0058] A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.
[0059] The beneficial effects of this application are as follows:
[0060] By modeling multimodal time-series datasets based on causal graph reasoning mechanisms, we can accurately identify causal paths and confounding factor nodes that affect quality control results, overcoming the limitation of traditional correlation analysis in being unable to distinguish true causal relationships and improving the accuracy of quality control.
[0061] Based on the quality control causal topology, a subject-centered data association graph was established, which realized semantic alignment and entity disambiguation of heterogeneous data sources across systems, solved the data silo problem in traditional systems, and improved data utilization efficiency.
[0062] By conducting virtual intervention simulations on data association maps, the risk propagation coefficients and source tracing priority weights of each quality control deviation event can be quantified, providing an objective quantitative basis for clinical trial risk assessment. The constructed multi-level source tracing index structure enables the backtracking of the responsibility chain along the reverse causal path when quality control anomalies occur, making the root cause of deviations more accurate and the source tracing report more interpretable.
[0063] By dynamically adjusting the causal topology of quality control using counterfactual reasoning, the quality control system achieves self-optimization and iterative learning, improving its adaptability to novel quality control problems. The holistic approach organically combines clinical trial quality control with data traceability, forming a closed-loop management mechanism that significantly improves data quality in research wards and the reliability of clinical trials. Attached Figure Description
[0064] Figure 1 This is a flowchart illustrating the data-driven research ward quality control and subject data traceability method according to an embodiment of the present invention.
[0065] Figure 2 This is a flowchart of clinical trial quality control cause analysis and risk assessment in an embodiment of the present invention. Detailed Implementation
[0066] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0067] The technical solution of the present invention will be described in detail below with reference to specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0068] Figure 1 This is a flowchart illustrating the data-driven research ward quality control and subject data traceability method according to an embodiment of the present invention. Figure 1 As shown, the method includes:
[0069] Collect subject physiological index sequences, medical operation event flow, drug exposure time series data, and ward environment parameters throughout the entire clinical trial process to construct a multimodal time series dataset;
[0070] Based on the causal graph reasoning mechanism, the causal dependency relationship of the variable nodes in the multimodal time series dataset is modeled, the causal path and confounding factor nodes affecting the quality control results are identified, and the quality control causal topology is generated.
[0071] Based on the causal strength and temporal propagation characteristics of each node in the quality control causal topology, semantic alignment and entity disambiguation are performed on heterogeneous data sources across systems to establish a subject-centered data association graph.
[0072] Virtual intervention simulations were performed on the data association graph to assess the impact of removing specific operation nodes or correcting specific data deviations on the experimental endpoint indicators, thereby quantifying the risk propagation coefficient and source tracing priority weight of each quality control deviation event.
[0073] A multi-level traceability index structure is constructed based on the risk propagation coefficient and the traceability priority weight. When a quality control anomaly occurs, the responsibility chain is traced back along the reverse causal path of the data association graph to locate the root cause node of the deviation and generate an interpretable traceability report.
[0074] The root cause node characteristics and counterfactual reasoning results identified in the interpretability traceability report are fed back to the causal graph reasoning mechanism to dynamically adjust the edge weights and node monitoring thresholds in the quality control causal topology.
[0075] In one optional implementation, causal dependency modeling is performed on the variable nodes in the multimodal time-series dataset based on a causal graph reasoning mechanism to identify causal paths and confounding factor nodes that affect the quality control results, and to generate a quality control causal topology structure, including:
[0076] Feature vectors representing the physiological index sequence of subjects, medical operation event flow, drug exposure time series data and ward environment parameters are extracted from the multimodal time series dataset, and corresponding variable node identifiers are assigned to each feature vector;
[0077] The statistical dependencies between each variable node are quantitatively evaluated based on the conditional independence test. Variable node pairs that satisfy the causal Markov condition are selected, and an initial causal graph skeleton structure is constructed. The undirected edges in the initial causal graph skeleton structure are oriented, and the causal flow direction is determined by identifying the collision node structure and transitive dependency pattern, thus forming a directed causal graph.
[0078] In the directed causal graph, edges that violate temporal causality are pruned according to the order of timestamps of each variable node in the multimodal time series dataset, and variable nodes that satisfy temporal priority and have a direct impact on quality control results are marked as causal path nodes.
[0079] Based on the directed causal graph, all paths from the causal path node to the quality control result node are traversed, and variable nodes that are related to both the causal path node and the quality control result node but are not on the direct causal path are identified as confounding factor nodes.
[0080] A quality control causal topology structure is generated based on the topological relationships of the causal path nodes, the confounding factor nodes, and their connecting edges.
[0081] Feature vectors were extracted from multimodal time-series datasets. For physiological index sequences of subjects, physiological parameters such as heart rate, blood pressure, and blood oxygen saturation were collected, and statistical features such as mean, variance, and peak value within each window were calculated using the sliding window method. For medical operation event streams, various medical operations such as blood drawing, dressing changes, and changes in body position were converted into time-coded vectors. For drug exposure time-series data, drug type, dosage, and administration time points were recorded to construct a drug exposure feature matrix. For ward environmental parameters, time-series data of environmental factors such as temperature, humidity, and noise were collected. After extraction, a unique variable node identifier was assigned to each feature vector, such as "HR_mean" representing the mean heart rate node and "MED_A_dose" representing the dosage of class A drugs.
[0082] An initial causal graph skeleton is constructed based on conditional independence tests. Fisher's Z-test is used to calculate the conditional independence between any two variable nodes. When the p-value of the conditional independence test between two nodes X and Y under a given third node set Z is greater than a preset threshold (e.g., 0.05), X and Y are determined to be conditionally independent under the given Z-condition, and the edge between X and Y is removed. For the autocorrelation unique to time series data, Time Delayed Mutual Information (TDMI) is used to evaluate the dependency between variables at different time points. After global screening, variable node pairs that satisfy the causal Markov conditions are retained to form the undirected initial causal graph skeleton.
[0083] The initial causal graph skeleton is oriented to identify collision nodes (V-shaped structures), i.e., structures like X→Z←Y, where X and Y are independent without being conditioned on Z, but become dependent after being conditioned on Z. For example, when "drug A dosage" and "room temperature," two originally independent variables, show a dependency after being conditioned on "patient body temperature," then the V-shaped structure "drug A dosage → patient body temperature ← room temperature" can be determined. Next, based on the edges with determined directions, the directions of other edges are further derived by applying orientation rules (such as avoiding the generation of new V-shaped structures and loops), forming a directed causal graph.
[0084] Based on the directed causal graph, edges that violate temporal causality are pruned according to timestamps. If an edge exists from node A to node B, but A's timestamp is later than B's, then the edge violates the principle of temporal causality and should be deleted. For example, if an edge exists pointing from "12:00 blood pressure measurement value" to "11:30 medication record", then that edge should be deleted. Simultaneously, variable nodes whose timestamps precede the quality control results and have direct edges pointing to the quality control results are marked as causal path nodes, such as "patient body temperature" → "quality control failure judgment".
[0085] Based on the pruned directed causal graph, all paths from causal path nodes to quality control result nodes are traversed. Variable nodes that meet the following condition are identified as confounding factor nodes: the node is connected to both causal path nodes and quality control result nodes, but not on a direct causal path. For example, "ward humidity" simultaneously affects "patient comfort" and "detection equipment sensitivity," thus indirectly affecting the quality control result; in this case, "ward humidity" is a confounding factor node.
[0086] A quality control causal topology is generated based on the topological relationships of causal path nodes, confounding factor nodes, and their connecting edges. Different types of nodes are marked with different colors, such as red for causal path nodes, yellow for confounding factor nodes, and gray for ordinary nodes. Simultaneously, the thickness of the edges is set according to their weights (quantified by regression coefficients or mutual information) to reflect the strength of the influence between variables. The generated quality control causal topology visually demonstrates the core factors affecting the quality control results and their interactions.
[0087] In practical applications, taking the quality control of an ICU ward in a hospital as an example, the causal topology constructed using the above method shows that the frequency of nurse operations (causal path node) indirectly affects treatment outcomes by influencing patients' rest quality, while the ward noise level (confounding factor node) affects both the accuracy of nurse operations and patients' rest quality, but is not on a direct causal path. Based on this topology, hospital administrators can specifically optimize nursing processes and improve the ward environment, effectively enhancing the level of medical quality control.
[0088] The multimodal time-series data analysis method based on the causal graph reasoning mechanism described above can effectively identify key factors affecting quality control results and their pathways of action, providing scientific basis and decision support for medical quality control.
[0089] In one optional implementation, in the directed causal graph, edges that violate temporal causality are pruned according to the chronological order of the timestamps of the variable nodes in the multimodal time-series dataset, and variable nodes that satisfy temporal priority and have a direct impact on the quality control results are marked as causal path nodes, including:
[0090] Extract the start and end variable nodes of each directed edge in the directed causal graph, and obtain the timestamp sequences corresponding to the start and end variable nodes from the multimodal time series dataset.
[0091] The timestamp sequence is compared temporally to identify directed edges where the timestamp of the starting variable node is later than the timestamp of the ending variable node as a set of temporal violation edges. All directed edges in the set of temporal violation edges are removed from the directed causal graph to generate a temporally consistent causal graph.
[0092] Locate the target variable node representing the quality control result in the time-consistent cause-effect graph, and calculate the number and length of directed paths from each variable node in the time-consistent cause-effect graph to the target variable node;
[0093] The process involves tracing back from the target variable node to the upstream variable node of the time-series consistent causal graph, quantifying the causal contribution of each variable node to the target variable node, and selecting variable nodes whose causal contribution exceeds a preset contribution threshold and have a direct directed edge connection with the target variable node as a set of candidate causal path nodes.
[0094] Verify whether the timestamps of each variable node in the candidate causal path node set are earlier than the timestamp of the target variable node, and mark the variable nodes that satisfy the time prior condition as causal path nodes.
[0095] Extract the starting and ending variable nodes of each directed edge from the constructed directed causal graph. For example, in an industrial production quality control scenario, the directed edge E(A→B) represents the causal influence of node A on node B, where A is a raw material parameter and B is an intermediate product indicator. For each directed edge in the graph, access the multimodal time series dataset to obtain the timestamp sequence of the corresponding node. For example, the timestamp sequence of node A is TA={t1, t2, ..., tn}, and the timestamp sequence of node B is TB={s1, s2, ..., sm}. These timestamps record the precise time of observation or measurement of each variable.
[0096] A time-series comparative analysis is performed on the acquired timestamp sequences. In causal relationships, the cause must precede the effect; this is the fundamental principle of temporal causality. For each directed edge E (A→B), the timestamp sequence TA of its starting node A is compared with the timestamp sequence TB of its ending node B. If it is found that the timestamps in TA are generally later than those in TB, i.e., there is a significant proportion where the observation time of node A is later than the observation time of node B, then this edge is marked as a temporal violation edge. Specifically, the proportion of timestamps in TA that are later than the corresponding timestamps in TB is calculated. If this proportion exceeds a preset threshold (e.g., 60%), then the edge is determined to violate temporal causality. All edges that violate temporal causality are collected into a set of temporal violation edges. These edges are then removed from the original directed causal graph to generate a temporally consistent causal graph.
[0097] A time-consistent cause-effect graph is a directed graph structure validated against time constraints. Nodes represent variables in the system (such as raw material parameters, process parameters, and quality indicators), and directed edges represent causal relationships that satisfy the fundamental physical law that "cause precedes effect in time." This graph is generated from an initial directed cause-effect graph through time pruning, i.e., removing all edges that violate time constraints. The core function of a time-consistent cause-effect graph is to ensure the reliability of causal inferences, eliminate false causal relationships with contradictory temporal logic, and provide a structured foundation consistent with physical mechanisms for subsequent root cause analysis, quality control optimization decisions, and predictive model construction. This ensures that the identified variables truly have a real causal impact on quality results.
[0098] In the generated time-consistent causal graph, the target variable node representing the quality control result is located. For example, in semiconductor manufacturing, the target node is the chip yield rate. Then, the number and length of directed paths from each variable node to the target variable node are calculated. The number of paths can be calculated using a depth-first search algorithm. For each node Vi, the number Ni of different directed paths from Vi to the target node is calculated. The path length refers to the number of edges Li in the shortest path from Vi to the target node. These metrics reflect the degree of influence of each node on the target node.
[0099] Starting from the target variable node, the process traces backwards to the upstream variable nodes in the time-series consistent causal graph, quantifying the causal contribution of each variable node to the target variable node. Causal contribution can be calculated by comprehensively considering the number of paths, path length, and edge weights. For example, the causal contribution CDi of a node Vi can be defined as: CDi = Ni × W / Li, where W is the edge weight factor, representing the average weight of each edge on the path. After calculating the causal contribution of all nodes, variable nodes whose causal contribution exceeds a preset contribution threshold and have a direct directed edge connection to the target variable node are selected, forming a set of candidate causal path nodes.
[0100] To verify the temporal priority of each node in the candidate causal path node set, for each node Vj in the candidate set, check whether its timestamp sequence Tj is generally earlier than the timestamp sequence Ttarget of the target node. Specifically, calculate the proportion of Tj nodes whose timestamps are earlier than Ttarget. If this proportion exceeds a preset threshold (e.g., 80%), the node is considered to meet the temporal priority condition. Nodes that meet the condition are marked as causal path nodes. These nodes have a direct impact on the quality control results and satisfy the temporal priority condition; they are key variables that need to be focused on during the quality control process.
[0101] In practical applications, causal path nodes marked using the above methods can be directly used to guide quality control optimization. For example, in pharmaceutical manufacturing quality control, if the raw material purity node is marked as a causal path node, it indicates that the raw material purity has a direct and significant impact on the final drug quality, and production managers should prioritize ensuring the stability and compliance of this parameter. Furthermore, causal path nodes can also be used to build more accurate quality control prediction models and improve the early warning capability for quality anomalies.
[0102] By employing temporal pruning and causal path node labeling, the accuracy and interpretability of multimodal time-series data quality control have been significantly improved, providing strong support for quality control in fields such as industrial production and healthcare.
[0103] In one optional implementation, based on the causal strength and temporal propagation characteristics of each node in the quality control causal topology, semantic alignment and entity disambiguation are performed on heterogeneous data sources across systems to establish a subject-centric data association graph, including:
[0104] Extract the causal strength weights and temporal propagation delay features of nodes from the quality control causal topology, and construct a node feature vector table;
[0105] Based on the causal strength weights in the node feature vector table, the data fields in the heterogeneous data source are ranked by importance. Data fields with weights higher than a preset weight threshold are marked as core alignment fields, and a cross-system semantic mapping rule base is constructed for the core alignment fields.
[0106] Based on the constraints of the semantic mapping rule base, the data records representing the same medical entity but using different naming conventions in the heterogeneous data source are subjected to semantic standardization transformation to generate a standardized dataset under a unified semantic space.
[0107] Using the temporal propagation delay feature in the node feature vector table, multi-source data records pointing to the same subject individual are identified from the normalized dataset, their temporal association confidence is calculated, and when the consistency condition is met, they are merged into a single entity representation.
[0108] Using the subject identifier as the central node, the single entity representation is used as the associated node, and directed association edges are established based on the causal dependencies between nodes in the quality control causal topology; a subject-centered data association graph is constructed based on the central node, the associated nodes, and the directed association edges.
[0109] The causal strength weights and temporal propagation delay features of nodes are extracted from the quality control causal topology to construct a node feature vector table. Specifically, the normalized causal strength value of each node in the topology is calculated, reflecting the degree of influence of the node on changes in the system state. Simultaneously, the temporal delay features of information transmission between nodes are recorded to characterize the chronological order of events and response time. For example, for the "drug dosage adjustment" node in clinical trial data, its causal strength to the "adverse reaction occurrence" node is 0.82, and its temporal delay feature is 36 hours, indicating a high correlation between the dosage adjustment and the adverse reaction, as well as the average time interval between occurrences.
[0110] Based on the constructed node feature vector table, data fields from heterogeneous data sources are ranked by importance according to causal strength weights. A preset weight threshold (e.g., 0.75) is set, and data fields exceeding this threshold are marked as core alignment fields. These fields typically include high-value data elements such as subject ID, demographic characteristics, and key clinical indicators. For core alignment fields, a cross-system semantic mapping rule base is constructed, including rules for field name mapping, encoding standard conversion, and value range normalization. For example, an equivalent mapping relationship is established between the "patient_number" field in the electronic medical record system and the "subject_identifier" field in the clinical trial management system, and conversion rules to the standard term "subject_id" are defined.
[0111] By leveraging the constraints of a semantic mapping rule base, semantic standardization is performed on data records representing the same medical entity but using different naming conventions from heterogeneous data sources. The transformation process includes steps such as terminology standardization, unit unification, format standardization, and missing value handling, generating a standardized dataset within a unified semantic space. Taking drug names as an example, different expressions such as "aspirin," "ASA," and "acetylsalicylic acid" from different systems are uniformly converted into the standard drug code "N02BA01," ensuring semantic consistency of the data.
[0112] Using the temporal propagation delay feature in the node feature vector table, multi-source data records pointing to the same subject individual are identified from the normalized dataset. The confidence level of temporal association between records is calculated based on a reasonableness assessment of timestamps and a causal consistency analysis of the event sequence. When data records meet temporal consistency criteria (e.g., the time difference of the same adverse event report in different systems is within an acceptable range), these records are merged into a single entity representation. For example, outlier reports from the laboratory information system are correlated with adverse event records from the clinical trial electronic data capture system to confirm that they describe the same clinical event in the same subject.
[0113] Using subject identifiers as central nodes and individual entity representations as associated nodes, directed association edges are established based on the causal dependencies between nodes in the quality control causal topology. The weights of the directed association edges reflect the causal strength between nodes, and the direction of the edges indicates the direction of causal influence. A subject-centric data association graph is constructed based on the central node, associated nodes, and directed association edges. In this graph, the entire clinical pathway for a specific subject can be clearly tracked, including the complete data chain from screening, enrollment, treatment intervention to outcome assessment.
[0114] In clinical trial data management applications, when a subject experiences a serious adverse reaction, data association maps can quickly trace the subject's drug exposure history, past adverse reaction records, concomitant medications, and relevant laboratory test results. This provides a comprehensive basis for causal relationship assessment, enabling data-driven safety monitoring and risk management. Furthermore, data association maps support multi-dimensional data integrity checks, identifying potential data anomalies and quality issues by analyzing the consistency between expected causal relationships between nodes and actual observational data.
[0115] This method significantly improves the accuracy and efficiency of cross-system data integration in clinical research, solves semantic ambiguity and entity recognition problems that are difficult to handle with traditional methods, and provides a reliable information foundation for data-driven clinical decision-making and research.
[0116] In one optional implementation, a virtual intervention simulation is performed on the data association graph to assess the impact on the experimental endpoint indicators if a specific operational node is removed or a specific data deviation is corrected. Based on this, the risk propagation coefficient and tracing priority weight of each quality control deviation event are quantified, including:
[0117] Identify operation nodes representing medical operation behaviors and deviation nodes representing abnormal data states from the data association graph, and extract the endpoint nodes representing the test endpoint indicators from the data association graph.
[0118] Construct a counterfactual reasoning framework, and perform topological replication on the data association graph within the counterfactual reasoning framework. Perform a node removal operation on each operation node in the replicated graph, or perform a numerical correction operation on each deviation node, to form multiple intervention-post graph instances.
[0119] The causal effect propagation calculation is performed on the graph instance after the intervention along the directed association edge. The state change amplitude of each intermediate node on the path from the intervened node to the endpoint node is quantified, and the numerical difference of the endpoint node before and after the intervention is accumulated as the intervention impact quantity.
[0120] Based on the weighted fusion of the intervention impact and the out-degree value of the intervened node in the original data association graph, the risk diffusion capability of the intervened node to downstream nodes is calculated, and a risk propagation coefficient is assigned to the intervened node accordingly.
[0121] Based on the risk propagation coefficient and the intervention impact, the deviation nodes corresponding to all quality control deviation events in the data association graph are double-sorted, and a source tracing priority weight is assigned to each quality control deviation event.
[0122] like Figure 2 As shown, the method includes:
[0123] The node type identifier field is extracted from the pre-constructed data association graph. This field uses enumerated value encoding, where operation nodes correspond to a value of 1, deviation nodes to a value of 2, and endpoint nodes to a value of 3. Operation nodes store structured records of medical operation behaviors, including attribute fields such as operation type, execution time, operator identifier, and operation object identifier. Deviation nodes store quantitative descriptions of abnormal data states, including attribute fields such as deviation type, deviation magnitude, detection time, and associated data source identifier. The deviation magnitude field is represented as a floating-point number with precision maintained to four decimal places. Endpoint nodes store the observed values of the trial endpoint indicators, including attribute fields such as indicator name, observed value, and observation time.
[0124] In the data association graph, all nodes are traversed, the node type identifier field is read and categorized, and the set of operation nodes is denoted as the operation set, the set of deviation nodes as the deviation set, and the set of endpoint nodes as the endpoint set. For each node in the operation set and the deviation set, a breadth-first traversal is performed along the directed association edges to determine if there is at least one directed path connecting it to any node in the endpoint set. If not, the node is marked as unreachable and excluded from subsequent processing. After node identification is completed, the number of nodes in the operation set is recorded as the operation node count, and the number of nodes in the deviation set is recorded as the deviation node count.
[0125] The implementation of the counterfactual reasoning framework relies on deep copying of the graph structure and differentiated intervention strategies. It reads the adjacency matrix representation of the original data association graph. This matrix is in sparse matrix format, where row indices correspond to source node identifiers, column indices correspond to target node identifiers, and matrix element values represent the weight coefficients of the associated edges. A complete copy of the adjacency matrix is performed, allocating independent memory space to ensure that modifications to the copied matrix do not affect the original matrix. Simultaneously, the node attribute dictionary is copied, with the key being the node identifier and the values being nested dictionary structures containing all attribute fields.
[0126] For each operation node in the operation set, a corresponding post-intervention graph instance is created. In this instance, the target operation node is removed from the adjacency matrix. Specifically, all element values in the row and column corresponding to the node in the adjacency matrix are set to 0, and the node's status field is marked as removed with status code 3 in the node attribute dictionary. The node removal operation severs the node's connection to all upstream and downstream nodes, simulating the graph topology before the operation occurred. After removal, the graph connectivity index needs to be recalculated, and the Boolean values of the corresponding row and column in the reachability matrix are updated to false.
[0127] For each deviation node in the deviation set, a corresponding post-intervention atlas instance is created. Within this instance, numerical correction operations are performed on the target deviation node, with the correction method determined based on the deviation type. For deviations with missing values, the median of nodes of the same type is used for padding, excluding all nodes marked as abnormal when calculating the median. For deviations exceeding limits, threshold truncation is applied, with threshold parameters read from the configuration file. The upper and lower thresholds correspond to the maximum and minimum allowed values of the deviation magnitude field, respectively. For deviations with temporal misalignment, timestamp alignment is used for adjustment, based on the median timestamps of associated nodes. For deviations with logical conflicts, rule-based matching is used for correction. The rule base contains predefined constraints and correction mapping tables. The corrected values are updated to the deviation magnitude field in the node attribute dictionary, while the values before correction are stored in the history field. The history field uses a timestamp-indexed list structure, appending one record for each correction operation. After all intervention operations are completed, the total number of post-intervention atlas instances equals the sum of the operation node count and the deviation node count. Each instance is stored independently in an instance pool, with the instance identifier generated by combining the intervened node identifier and the intervention type code.
[0128] For each post-intervention graph instance, a causal effect propagation calculation is performed. Starting from the intervened node, forward propagation occurs along directed edges, based on a mechanism of multiplying and accumulating edge weights and node state values. The state change value of the intervened node is initialized: -1 for node removal and the difference between the corrected and uncorrected values for numerical correction. For each outgoing edge of the intervened node, the edge weight and the target node's current state value are read. The state change increment of the target node is calculated as the edge weight multiplied by the source node's state change value, and this increment is added to the target node's state change value field. All reachable nodes are iteratively processed until the endpoint node. For nodes with multiple incoming edges, the state change value is the sum of the state change increments contributed by all incoming edges. Upon reaching the endpoint node, the post-intervention state value and the original graph state value are read, and the absolute difference between the two is calculated as the intervention impact.
[0129] Calculating the risk propagation coefficient requires fusing the intervention impact and out-degree values. The out-degree value of the intervened node in the original data association graph is read; the out-degree value is defined as the number of directed edges emanating from that node. The intervention impact is normalized using a max-min scaling method, mapping the intervention impact of all intervened nodes to the range of 0 to 1. The out-degree value is also normalized. A weighted fusion coefficient is defined, with the intervention impact weight coefficient set to 0.6 and the out-degree weight coefficient set to 0.4. The risk propagation coefficient is calculated as the normalized intervention impact multiplied by 0.6 plus the normalized out-degree value multiplied by 0.4, with the result rounded to three decimal places.
[0130] Assigning source tracing priority weights to quality control deviation events requires a double sorting of the deviation nodes. The first sorting is based on the risk propagation coefficient, arranging all nodes in the deviation set in descending order of risk propagation coefficient to generate a risk ranking list. The second sorting is based on the intervention impact, arranging all nodes in the deviation set in descending order of intervention impact to generate an impact ranking list. For each node in the deviation set, its risk ranking number and impact ranking number are read, and the comprehensive ranking score is calculated as risk ranking number multiplied by 0.55 plus impact ranking number multiplied by 0.45. The deviation set is then sorted in ascending order according to the comprehensive ranking score to generate the final source tracing priority sequence. The source tracing priority weights are assigned using a linearly decreasing method, with the source tracing priority weight of the first node in the sequence set to 1.0 and the source tracing priority weight of the last node in the sequence set to 0.1.
[0131] In one optional implementation, a counterfactual reasoning framework is constructed, in which the data association graph is topologically replicated. For each operational node in the replicated graph, a node removal operation is performed, or for each deviation node, a numerical correction operation is performed, forming multiple post-intervention graph instances, including:
[0132] Initialize the counterfactual reasoning framework and allocate independent storage space in the counterfactual reasoning framework. Traverse all nodes and directed edges in the data association graph and completely map the identification information, attribute parameters and edge connection relationships of each node to the independent storage space to generate a replicated graph that is topologically isomorphic to the data association graph.
[0133] In the replicated graph, mark the operation node and the deviation node and create a queue of nodes to be intervened. For each operation node in the queue of nodes to be intervened, cut all the incoming and outgoing edges of the operation node on the replicated graph and remove it from the causal propagation link to form an operation node removal graph instance.
[0134] For each deviation node in the queue of nodes to be intervened, the current value of the deviation node is replaced with the correction target value on the copied graph, and the values of downstream nodes along the outgoing edge are cascaded and updated to form a deviation node correction graph instance.
[0135] The instances of the removed operation nodes and the instances of the corrected deviation nodes are aggregated into multiple post-intervention instances.
[0136] The construction of the counterfactual reasoning framework begins with initialization, allocating independent storage space for counterfactual reasoning to ensure that intervention operations do not affect the original data association graph. During initialization, a data structure needs to be created to store node and edge information in the graph, including node identifiers, node types, node attribute parameters, and edge connection relationships. The storage space can utilize an adjacency list or adjacency matrix structure for efficient access and modification of graph elements.
[0137] Specifically, by traversing all nodes in the original data association graph, the identification information (such as node ID), type information (such as operation node, data node, deviation node, etc.), and attribute parameters (such as node current value, threshold, constraint conditions, etc.) of each node are copied to a newly allocated storage space. Simultaneously, for each directed association edge in the graph, the identification information of its starting and ending nodes, as well as the weights or condition parameters attached to the edge, are recorded. After the traversal is completed, a replicated graph with a topology completely identical to the original data association graph is formed in an independent storage space.
[0138] Based on the replicated graph, node labeling and intervention queue creation are performed. All operational nodes and deviation nodes are identified and labeled. Operational nodes typically represent various operational behaviors in the system, while deviation nodes indicate nodes where data is abnormal or deviates from expectations. After labeling, these nodes are added to the queue of nodes to be intervened in preparation for subsequent intervention operations.
[0139] For each operation node in the queue of nodes to be intervened, a node removal operation is performed. Specifically, the operation node is located on the replicated graph, and then all incoming and outgoing edges connecting the node are severed. Cutting incoming edges means the node no longer receives input from upstream nodes, while cutting outgoing edges means the node no longer affects downstream nodes. By removing operation nodes, the state of the system when a specific operation is not executed can be simulated, thereby analyzing the degree of impact and causal relationship of the operation on the entire system. Each time an operation node is removed, a new operation node removal graph instance is formed and recorded.
[0140] For each deviation node in the queue of nodes to be intervened, a numerical correction operation is performed to determine the correction target value for that deviation node. This target value is derived based on historical normal values, domain knowledge, or preset rules. Then, the current value of the deviation node is replaced with the correction target value in the replicated graph. After correction, a cascading update process is triggered along the outgoing edges of that node, that is, the values of the affected downstream nodes are updated level by level according to the causal relationship links in the graph. The cascading update uses a breadth-first or depth-first traversal method to ensure that all affected nodes are updated correctly. After each deviation node correction and its triggered cascading updates are completed, a new deviation node correction graph instance is formed and recorded.
[0141] When performing cascading updates, the specific update method needs to be determined based on the relationship type and calculation rules between nodes. For example, if node A and node B have an additive relationship, then after modifying the value of node A, the new value of node B should be the sum of the modified value of A and the values of other input nodes. If they have a multiplicative relationship, then the corresponding multiplicative update rule is used. In some complex scenarios, there are non-linear relationships or conditional triggering relationships between nodes, in which case updates need to be performed according to a preset calculation model or rules.
[0142] All generated operation node removal graph instances and deviation node correction graph instances are aggregated to form multiple post-intervention graph instance sets. These graph instances can be used for subsequent counterfactual analysis, such as comparing the impact of different intervention operations on the system state, identifying key causal paths, or assessing the system's sensitivity to anomalies.
[0143] In this embodiment, a data processing flow association graph is assumed, comprising data acquisition node A, data cleaning node B, feature extraction node C, model calculation node D, and result output node E, where B is the operation node and C is the deviation node. First, a topologically isomorphic copy of the graph is obtained. A removal operation is performed on operation node B, severing the connections A→B and B→C, forming one intervention graph instance. Numerical correction is performed on deviation node C, adjusting its feature value from the outlier 0.8 to the normal value 0.5, triggering a cascading update of D and E, forming another intervention graph instance. By comparing these two instances with the original graph, the necessity of the data cleaning operation and the degree of influence of feature deviation on the final result can be analyzed.
[0144] The counterfactual reasoning framework constructed above can systematically simulate and evaluate the impact of different intervention operations on data flow, providing a powerful tool for anomaly diagnosis, process optimization, and decision support.
[0145] In one optional implementation, a multi-level traceability index structure is constructed based on the risk propagation coefficient and the traceability priority weight. When a quality control anomaly occurs, the responsibility chain is traced back along the reverse causal path of the data association graph to locate the root cause node of the deviation and generate an interpretable traceability report, including:
[0146] Read the risk propagation coefficient corresponding to each directed association edge in the data association graph and the source tracing priority weight corresponding to each node. Create an index record for each node that includes the source node identifier of the incoming edge, the risk propagation coefficient of the incoming edge, and the source tracing priority weight of the node. Build a multi-level source tracing index structure by storing the data in layers according to the node level depth.
[0147] Receive the quality control anomaly trigger signal and extract the anomaly node identifier. Locate the index record corresponding to the anomaly node identifier in the multi-level traceability index structure. Extract the incoming edge source node identifier and the incoming edge risk propagation coefficient. Multiply the incoming edge risk propagation coefficient and the traceability priority weight corresponding to the incoming edge source node identifier to obtain the backtracking weight value.
[0148] The incoming edge source node with the highest backtracking weight value is selected as the current backtracking node in descending order of the backtracking weight value; the index record corresponding to the current backtracking node is located in the multi-level backtracking index structure, and the operations of extracting the incoming edge source node and calculating the backtracking weight value are repeated. The backtracking is performed layer by layer along the reverse causal path of the data association graph to the node without an incoming edge source node, and the node is marked as the deviation root source node.
[0149] Record the chain of responsibility path from the abnormal node identifier to the root cause node of the deviation. The chain of responsibility path includes the identifiers of each node in the path, the tracing priority weights, and the risk propagation coefficients of the edges, and generate an interpretable tracing report.
[0150] The attribute data of all directed edges is read from the storage structure of the data association graph. Each edge's attribute data includes fields such as source node identifier, target node identifier, edge weight coefficient, and risk propagation coefficient. The risk propagation coefficient field stores the quantified risk diffusion capability of the edge calculated in the virtual intervention simulation, with a value ranging from 0 to 1 and precision maintained to three decimal places. Simultaneously, the attribute data of all nodes is read. Each node's attribute data includes fields such as node identifier, node type, node level depth, and traceability priority weight. The traceability priority weight field stores the priority value obtained by the node in the dual sorting of quality control deviation events, with a value ranging from 0.1 to 1.0; a larger value indicates a higher importance of the node in the traceability process. The node level depth field is calculated using a topological sorting algorithm, starting with a value of 0 for the root node (without incoming edges) and increasing by 1 for each directed edge encountered. This field is used for hierarchical storage in the subsequent index structure.
[0151] The process iterates through all nodes in the data association graph, creating an index record data structure for each node. These index records are stored in a nested dictionary format. The outer dictionary's key is the node identifier, and the values are values from the inner dictionary containing all incoming edge information and the node's own attributes. The inner dictionary includes a node level depth field, a tracing priority weight field, and an incoming edge list field. The incoming edge list field is an array type, with each element corresponding to one incoming edge. Each element contains two subfields: the incoming edge source node identifier and the incoming edge risk propagation coefficient. For nodes with no incoming edges, the incoming edge list field is set to an empty array. For nodes with multiple incoming edges, the incoming edge list field is sorted in descending order of the incoming edge risk propagation coefficient, ensuring that subsequent backtracking processes prioritize high-risk paths.
[0152] Based on the node level depth field, the index records of all nodes are stored hierarchically, constructing a multi-level traceability index structure. This structure is implemented using a two-dimensional array. The index of the first dimension corresponds to the node level depth value, and the second dimension stores the index records of all nodes at that level depth. Nodes with a level depth of 0 are stored at the 0th position of the first dimension array, nodes with a level depth of 1 are stored at the 1st position, and so on. This hierarchical storage strategy enables rapid location of upstream nodes during reverse backtracking, avoiding the performance overhead of full graph traversal. After the index structure is constructed, it is persistently stored in an in-memory database using a key-value pair storage engine. The key is a string combining the node identifier and the level depth, and the values are a dictionary of serialized index records.
[0153] When a quality control anomaly trigger signal is received, the signal message body includes attributes such as anomaly node identifier, anomaly type, anomaly detection time, and anomaly severity. The value of the anomaly node identifier field is consistent with the node identifier in the data association graph, used to quickly retrieve the corresponding index record in the multi-level traceability index structure. The index record corresponding to the anomaly node identifier is read from the in-memory database, and the incoming edge list field is extracted from the index record. Each incoming edge element in the incoming edge list is traversed, and the incoming edge source node identifier and incoming edge risk propagation coefficient are read. At the same time, the traceability priority weight of the node is queried based on the incoming edge source node identifier.
[0154] The backtracking weight value of each incoming edge is calculated by multiplying the risk propagation coefficient of the incoming edge by the tracing priority weight of the source node of the incoming edge. The backtracking weight value quantifies the priority of tracing upstream along the incoming edge, comprehensively considering the risk propagation capability of the edge and the tracing importance of the node. All incoming edges in the incoming edge list are sorted in descending order of their backtracking weight values. The incoming edge with the highest backtracking weight value is selected as the extension direction of the current backtracking path, and the source node of this incoming edge is marked as the current backtracking node. If multiple incoming edges have the same backtracking weight value, the incoming edge with the smaller node level depth of its source node is selected, i.e., priority is given to tracing upstream to higher nodes.
[0155] Using the current backtracking node identifier as the new query key, locate the corresponding index record in the multi-level source tracing index structure. Read the incoming edge list field from the index record and determine if the incoming edge list is an empty array. If the incoming edge list is an empty array, it means that the current backtracking node has no upstream node, and the node is marked as the root cause node of the deviation, and the backtracking process terminates. If the incoming edge list is not empty, repeat the operations of extracting the source node of the incoming edge, querying the source tracing priority weight, calculating the backtracking weight value, and selecting the incoming edge sorting, and continue to trace upstream along the reverse causal path. During the backtracking process, record the identifiers of all nodes passed and the risk propagation coefficients of the connecting edges to form a complete responsibility chain path from the abnormal node to the root cause node of the deviation.
[0156] The chain of responsibility path is stored using an ordered list data structure. Each element in the list corresponds to one node on the path, and the element content includes a node identifier field, a node tracing priority weight field, and an incoming edge risk propagation coefficient field pointing to that node. The first element of the list is the anomalous node, and the last element is the root cause node of the deviation. An interpretable tracing report is generated based on the chain of responsibility path. The report is output in a structured text format and includes three parts: an anomalous node summary paragraph, a chain of responsibility path details paragraph, and a deviation root cause node analysis paragraph. The anomalous node summary paragraph describes basic information such as the anomaly type, detection time, and severity. The chain of responsibility path details paragraph outputs the node identifier, node name, node type, tracing priority weight, and risk propagation coefficient of the connecting edge for each node in the path order. For key nodes, it supplements the description of the node's role in the data association graph. The deviation root cause node analysis paragraph outputs the attribute information of the root cause node, historical deviation records, and recommended intervention measures.
[0157] A second aspect of the present invention provides a data-driven research ward quality control and subject data traceability system, comprising:
[0158] The first unit is used to collect the physiological index sequences of subjects, medical operation event flow, drug exposure time series data and ward environment parameters throughout the entire clinical trial process to construct a multimodal time series dataset;
[0159] The second unit is used to model the causal dependencies of variable nodes in the multimodal time series dataset based on the causal graph reasoning mechanism, identify the causal paths and confounding factor nodes that affect the quality control results, and generate the quality control causal topology.
[0160] The third unit is used to perform semantic alignment and entity disambiguation on heterogeneous data sources across systems based on the causal strength and temporal propagation characteristics of each node in the quality control causal topology, and to establish a subject-centered data association graph.
[0161] The fourth unit is used to perform virtual intervention simulation on the data association map to evaluate the impact of removing specific operation nodes or correcting specific data deviations on the test endpoint indicators, thereby quantifying the risk propagation coefficient and traceability priority weight of each quality control deviation event.
[0162] The fifth unit is used to construct a multi-level traceability index structure based on the risk propagation coefficient and the traceability priority weight, and to trace back the chain of responsibility along the reverse causal path of the data association graph when a quality control anomaly occurs, locate the root cause node of the deviation and generate an interpretable traceability report.
[0163] The sixth unit is used to feed back the root node features and counterfactual reasoning results identified in the interpretability traceability report to the causal graph reasoning mechanism, and dynamically adjust the edge weights and node monitoring thresholds in the quality control causal topology.
[0164] A third aspect of the present invention provides an electronic device, comprising:
[0165] processor;
[0166] Memory used to store processor-executable instructions;
[0167] The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.
[0168] A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.
[0169] This invention can be a method, apparatus, system, and / or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of the invention.
[0170] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A data-driven research ward quality control and subject data traceability method, characterized in that, include: Collect subject physiological index sequences, medical operation event flow, drug exposure time series data, and ward environment parameters throughout the entire clinical trial process to construct a multimodal time series dataset; Based on the causal graph reasoning mechanism, the causal dependency relationship of the variable nodes in the multimodal time series dataset is modeled, the causal path and confounding factor nodes affecting the quality control results are identified, and the quality control causal topology is generated. Based on the causal strength and temporal propagation characteristics of each node in the quality control causal topology, semantic alignment and entity disambiguation are performed on heterogeneous data sources across systems to establish a subject-centered data association graph. Virtual intervention simulations were performed on the data association graph to assess the impact of removing specific operation nodes or correcting specific data deviations on the experimental endpoint indicators, thereby quantifying the risk propagation coefficient and source tracing priority weight of each quality control deviation event. A multi-level traceability index structure is constructed based on the risk propagation coefficient and the traceability priority weight. When a quality control anomaly occurs, the responsibility chain is traced back along the reverse causal path of the data association graph to locate the root cause node of the deviation and generate an interpretable traceability report. The root cause node characteristics and counterfactual reasoning results identified in the interpretability traceability report are fed back to the causal graph reasoning mechanism to dynamically adjust the edge weights and node monitoring thresholds in the quality control causal topology.
2. The method of claim 1, wherein, Based on the causal graph reasoning mechanism, causal dependency modeling is performed on the variable nodes in the multimodal time series dataset to identify causal paths and confounding factor nodes that affect the quality control results, and to generate a quality control causal topology structure including: Feature vectors representing the physiological index sequence of subjects, medical operation event flow, drug exposure time series data and ward environment parameters are extracted from the multimodal time series dataset, and corresponding variable node identifiers are assigned to each feature vector; The statistical dependencies between each variable node are quantitatively evaluated based on the conditional independence test. Variable node pairs that satisfy the causal Markov condition are selected, and an initial causal graph skeleton structure is constructed. The undirected edges in the initial causal graph skeleton structure are oriented, and the causal flow direction is determined by identifying the collision node structure and transitive dependency pattern, thus forming a directed causal graph. In the directed causal graph, edges that violate temporal causality are pruned according to the order of timestamps of each variable node in the multimodal time series dataset, and variable nodes that satisfy temporal priority and have a direct impact on quality control results are marked as causal path nodes. Based on the directed causal graph, all paths from the causal path node to the quality control result node are traversed, and variable nodes that are related to both the causal path node and the quality control result node but are not on the direct causal path are identified as confounding factor nodes. A quality control causal topology structure is generated based on the topological relationships of the causal path nodes, the confounding factor nodes, and their connecting edges.
3. The method of claim 2, wherein, In the directed causal graph, edges that violate temporal causality are pruned according to the chronological order of the timestamps of the variable nodes in the multimodal time-series dataset. Variable nodes that satisfy temporal priority and have a direct impact on quality control results are marked as causal path nodes, including: Extract the start and end variable nodes of each directed edge in the directed causal graph, and obtain the timestamp sequences corresponding to the start and end variable nodes from the multimodal time series dataset. The timestamp sequence is compared temporally to identify directed edges where the timestamp of the starting variable node is later than the timestamp of the ending variable node as a set of temporal violation edges. All directed edges in the set of temporal violation edges are removed from the directed causal graph to generate a temporal consistency causal graph. Locate the target variable node representing the quality control result in the time-consistent cause-effect graph, and calculate the number and length of directed paths from each variable node in the time-consistent cause-effect graph to the target variable node; The process involves tracing back from the target variable node to the upstream variable node of the time-series consistent causal graph, quantifying the causal contribution of each variable node to the target variable node, and selecting variable nodes whose causal contribution exceeds a preset contribution threshold and have a direct directed edge connection with the target variable node as a set of candidate causal path nodes. Verify whether the timestamps of each variable node in the candidate causal path node set are earlier than the timestamp of the target variable node, and mark the variable nodes that satisfy the time prior condition as causal path nodes.
4. The method of claim 1, wherein, Based on the causal strength and temporal propagation characteristics of each node in the aforementioned quality control causal topology, semantic alignment and entity disambiguation are performed on heterogeneous data sources across systems to establish a subject-centered data association graph, including: Extract the causal strength weights and temporal propagation delay features of nodes from the quality control causal topology, and construct a node feature vector table; Based on the causal strength weights in the node feature vector table, the data fields in the heterogeneous data source are ranked by importance. Data fields with weights higher than a preset weight threshold are marked as core alignment fields, and a cross-system semantic mapping rule base is constructed for the core alignment fields. Based on the constraints of the semantic mapping rule base, the data records representing the same medical entity but using different naming conventions in the heterogeneous data source are subjected to semantic standardization transformation to generate a standardized dataset under a unified semantic space. Using the temporal propagation delay feature in the node feature vector table, multi-source data records pointing to the same subject individual are identified from the normalized dataset, their temporal association confidence is calculated, and when the consistency condition is met, they are merged into a single entity representation. Using the subject identifier as the central node, the single entity representation is used as the associated node, and directed association edges are established based on the causal dependencies between nodes in the quality control causal topology; a subject-centered data association graph is constructed based on the central node, the associated nodes, and the directed association edges.
5. The method of claim 1, wherein, Virtual intervention simulations were conducted on the data correlation graph to assess the impact of removing specific operational nodes or correcting specific data deviations on the experimental endpoint indicators. Based on this, the risk propagation coefficients and source tracing priority weights of each quality control deviation event were quantified, including: Identify operation nodes representing medical operation behaviors and deviation nodes representing abnormal data states from the data association graph, and extract the endpoint nodes representing the test endpoint indicators from the data association graph. Construct a counterfactual reasoning framework, and perform topological replication on the data association graph within the counterfactual reasoning framework. Perform a node removal operation on each operation node in the replicated graph, or perform a numerical correction operation on each deviation node, to form multiple intervention-post graph instances. The causal effect propagation calculation is performed on the graph instance after the intervention along the directed association edge. The state change amplitude of each intermediate node on the path from the intervened node to the endpoint node is quantified, and the numerical difference of the endpoint node before and after the intervention is accumulated as the intervention impact quantity. Based on the weighted fusion of the intervention impact and the out-degree value of the intervened node in the original data association graph, the risk diffusion capability of the intervened node to downstream nodes is calculated, and a risk propagation coefficient is assigned to the intervened node accordingly. Based on the risk propagation coefficient and the intervention impact, the deviation nodes corresponding to all quality control deviation events in the data association graph are double-sorted, and a source tracing priority weight is assigned to each quality control deviation event.
6. The method of claim 5, wherein, A counterfactual reasoning framework is constructed, and the data association graph is topologically replicated within this framework. For each operational node in the replicated graph, a node removal operation is performed, or a numerical correction operation is performed for each deviation node, resulting in multiple post-intervention graph instances, including: Initialize the counterfactual reasoning framework and allocate independent storage space in the counterfactual reasoning framework. Traverse all nodes and directed edges in the data association graph and completely map the identification information, attribute parameters and edge connection relationships of each node to the independent storage space to generate a replicated graph that is topologically isomorphic to the data association graph. In the replicated graph, mark the operation node and the deviation node and create a queue of nodes to be intervened. For each operation node in the queue of nodes to be intervened, cut all the incoming and outgoing edges of the operation node on the replicated graph and remove it from the causal propagation link to form an operation node removal graph instance. For each deviation node in the queue of nodes to be intervened, the current value of the deviation node is replaced with the correction target value on the copied graph, and the values of downstream nodes along the outgoing edge are cascaded and updated to form a deviation node correction graph instance. The instances of the removed operation nodes and the instances of the corrected deviation nodes are aggregated into multiple post-intervention instances.
7. The method of claim 1, wherein, Based on the risk propagation coefficient and the source tracing priority weight, a multi-level source tracing index structure is constructed. When a quality control anomaly occurs, the responsibility chain is traced back along the reverse causal path of the data association graph to locate the root cause node of the deviation and generate an interpretable source tracing report, including: Read the risk propagation coefficient corresponding to each directed association edge in the data association graph and the source tracing priority weight corresponding to each node. Create an index record for each node that includes the source node identifier of the incoming edge, the risk propagation coefficient of the incoming edge, and the source tracing priority weight of the node. Build a multi-level source tracing index structure by storing the data in layers according to the node level depth. Receive the quality control anomaly trigger signal and extract the anomaly node identifier. Locate the index record corresponding to the anomaly node identifier in the multi-level traceability index structure. Extract the incoming edge source node identifier and the incoming edge risk propagation coefficient. Multiply the incoming edge risk propagation coefficient and the traceability priority weight corresponding to the incoming edge source node identifier to obtain the backtracking weight value. The incoming edge source node with the highest backtracking weight value is selected as the current backtracking node in descending order of the backtracking weight value; the index record corresponding to the current backtracking node is located in the multi-level backtracking index structure, and the operations of extracting the incoming edge source node and calculating the backtracking weight value are repeated. The backtracking is performed layer by layer along the reverse causal path of the data association graph to the node without an incoming edge source node, and the node is marked as the deviation root source node. Record the chain of responsibility path from the abnormal node identifier to the root cause node of the deviation. The chain of responsibility path includes the identifiers of each node in the path, the tracing priority weights, and the risk propagation coefficients of the edges, and generate an interpretable tracing report.
8. A data-driven research ward quality control and subject data traceability system for implementing the method of any of the preceding claims 1-7, characterized in that, include: The first unit is used to collect the physiological index sequences of subjects, medical operation event flow, drug exposure time series data and ward environment parameters throughout the entire clinical trial process to construct a multimodal time series dataset; The second unit is used to model the causal dependencies of variable nodes in the multimodal time series dataset based on the causal graph reasoning mechanism, identify the causal paths and confounding factor nodes that affect the quality control results, and generate the quality control causal topology. The third unit is used to perform semantic alignment and entity disambiguation on heterogeneous data sources across systems based on the causal strength and temporal propagation characteristics of each node in the quality control causal topology, and to establish a subject-centered data association graph. The fourth unit is used to perform virtual intervention simulation on the data association map to evaluate the impact of removing specific operation nodes or correcting specific data deviations on the test endpoint indicators, thereby quantifying the risk propagation coefficient and traceability priority weight of each quality control deviation event. The fifth unit is used to construct a multi-level traceability index structure based on the risk propagation coefficient and the traceability priority weight, and to trace back the chain of responsibility along the reverse causal path of the data association graph when a quality control anomaly occurs, locate the root cause node of the deviation and generate an interpretable traceability report. The sixth unit is used to feed back the root node features and counterfactual reasoning results identified in the interpretability traceability report to the causal graph reasoning mechanism, and dynamically adjust the edge weights and node monitoring thresholds in the quality control causal topology.
9. An electronic device, comprising: include: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having stored thereon computer program instructions, wherein, When the computer program instructions are executed by the processor, they implement the method described in any one of claims 1 to 7.