A detection task management method and system based on LIMS
By generating historical branch records and constructing a reverse branch suppression map through the LIMS system, the path of derived detection tasks is optimized, which solves the problem of inaccuracy in the flow of detection tasks in complex branch environments and achieves accuracy and consistency in the relationship between detection tasks and sample flow.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANJING ANCIENT NETWORK TECH CO LTD
- Filing Date
- 2026-06-02
- Publication Date
- 2026-07-03
AI Technical Summary
In existing technologies, the flow of derivative detection tasks is inaccurate in complex branching environments, leading to a shift in the relationship between tasks and sample branches, making it difficult to guarantee the consistency and accuracy of the detection path.
By using a detection task management method based on the LIMS system, historical branch records are generated, predecessor branches are screened and restricted, a reverse branch suppression graph is constructed, and path selection is optimized by ant colony search edge set, thereby realizing the flow management of derived detection tasks.
It improves the accuracy and consistency of matching detection tasks with sample flow, reduces the risk of result interpretation bias, and ensures the standardization and reliability of the detection process.
Smart Images

Figure CN122334889A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of task management technology, and in particular to a detection task management method and system based on a LIMS system. Background Technology
[0002] In laboratory settings such as medical testing, environmental monitoring, and food testing, samples often undergo multiple processing steps after entering the testing process, including sample receiving, aliquoting, transfer, storage, and multiple rounds of testing. These different testing stages form a continuous data chain through container relationships and operational records. During this process, laboratories typically use information technology to record and manage the entire sample operation process and use audit trails to track the creation, modification, and execution of samples and testing tasks. Furthermore, testing operations often involve triggering subsequent testing tasks based on test results. For example, a new testing task may be automatically generated when the initial test result meets predetermined conditions, thus forming a derivative testing task. The generation and execution of these derivative testing tasks rely on the historical flow path and branch relationships of the sample for binding and traceability. Therefore, accurately determining the path relationships that tasks can reference within a complex sample branch structure becomes a key issue in testing task management.
[0003] In existing technologies, because audit trail data only records operational behavior and does not constrain the attribution relationship between task generation and historical branches, it is easy for a later-generated derivative detection task to reverse-occupy a sample branch that existed before its generation during the data association process. This causes a branch that originally belonged to the historical flow to be mistakenly associated as a branch path prepared for this task, resulting in a shift in the attribution relationship between the task and the sample branch. This leads to inconsistent detection paths, incorrect task binding, and risks in result interpretation. Existing methods usually rely on simple time sequence or rule judgment when dealing with this problem, lacking the ability to constrain the overall branch path structure. It is difficult to effectively prevent unreasonable paths from being referenced, and thus it is difficult to guarantee the accuracy and consistency of the flow of derivative detection tasks in complex branch environments. Summary of the Invention
[0004] The purpose of this invention is to address the shortcomings of existing technologies that make it difficult to guarantee the accuracy and consistency of the flow of derived detection tasks in complex branching environments, and to propose a detection task management method and system based on a LIMS system.
[0005] To address the problems existing in the prior art, the present invention adopts the following technical solution: A detection task management method based on a LIMS system includes: Historical branch records are generated from the audit trail record set of the target sample, and the historical branch records are sorted to obtain the record sequence of historical branch records; Based on the rule configuration data of the LIMS system, the record sequence is filtered for previous branches to obtain a set of previous branch records, and the previous branch record set is marked with restrictions to obtain a set of previous branch restriction marks. The branch graph skeleton is obtained based on the record sequence, and the branch graph skeleton is pruned to obtain the reverse branch suppression graph. The ant colony search edge set is constructed based on the previous branch restriction label set and the reverse occupation suppression graph. The target edge is determined based on the edge pheromone set and edge heuristic value set determined by the ant colony search edge set. The candidate path set is generated based on the target edge, and the optimal path selection process is performed on the candidate path set to obtain the occupation avoidance path. Obtain the path edge verification results corresponding to the branch avoidance path, obtain the closed branch hit results based on the previous branch restriction mark set, and manage the detection task flow of the derived detection task according to the path edge verification results and the closed branch hit results.
[0006] Preferably, the recorded sequence includes: Obtain the audit trail record set of the target sample; wherein, the audit trail record set is the audit trail data of the LIMS system; The audit trail record set is filtered to obtain branch event records; Obtain the collection of container field data related to the target sample; Historical branch records are generated based on the branch event records and container field data sets; The historical branch records are sorted according to the audit trail record identifiers corresponding to the historical branch records to obtain the record sequence of historical branch records.
[0007] Preferably, the set of previous branch records is obtained, including: Obtain reflection detection rules from the rule configuration data of the LIMS system; The triggering results of the reflection detection rules are used to generate a task, resulting in a derived detection task; Obtain audit trail records for the creation of derived detection tasks; Based on the audit trail record identifiers created by the task and the audit trail record identifiers in the record sequence, the record sequence is filtered for predecessor branches to obtain a set of predecessor branch records.
[0008] Preferably, the set of predecessor branch restriction tags is obtained, including: Retrieve the branch purpose registration data corresponding to the previous branch record set; Based on the branch usage registration data, the set of previous branch records is marked with restrictions to obtain the set of previous branch restriction marks; the set of previous branch restriction marks includes open previous branch records and closed previous branch records.
[0009] Preferably, obtaining the reverse support suppression map based on the recording sequence includes: A branch graph is constructed from the record sequence to obtain the branch graph skeleton; the branch graph skeleton includes a set of nodes and a set of edges. Obtain the task root location information corresponding to the derived detection task; Based on the task root location information, the branch graph skeleton is trimmed to a task-specific branch subgraph. Determine the reverse branch suppression graph based on the task-specific branch subgraph.
[0010] Preferably, constructing the ant colony search edge set includes: Based on the set of previous branch restriction labels, the edge set is processed by edge state labeling to obtain the edge state labeling result; the edge state labeling result includes permitted edges and forbidden edges; Based on the edge state labeling results, determine the set of permissible edges; Obtain the task endpoint definition data corresponding to the derived detection task; Based on the reverse support inhibition diagram and the task endpoint definition data, determine the set of task search starting point nodes and the set of task search endpoint nodes; An ant colony search edge set is constructed based on the set of permitted edges, the set of task search start nodes, and the set of task search end nodes.
[0011] Preferably, determining the target edge includes: Assign initial pheromone values to each edge in the ant colony search edge set to obtain the edge pheromone set; Based on the audit backlink status and parent container identifier availability status of each edge in the ant colony search edge set, a heuristic value is determined for each edge in the ant colony search edge set, resulting in a set of edge heuristic values. Select a starting node from the set of starting nodes for the task search; Based on the set of edge pheromones and the set of edge heuristic values, the permissible edges connected to the starting node are selected to obtain the target edge.
[0012] Preferably, the path to avoid occupation includes: Candidate paths are determined based on the target edge and the endpoint nodes in the task search endpoint node set; Based on the candidate paths, generate a set of candidate paths; The optimal path selection process is performed on the candidate path set to obtain the occupancy avoidance path.
[0013] Preferably, the derivative detection tasks are managed through a workflow system, including: Based on the record sequence, record matching is performed on the set of path edges of the evasion path to obtain the path edge verification result. The set of previous branch restriction markers is processed by closing branch extraction to obtain a set of closed previous branch records; Based on the set of closed predecessor branch records, the closed branch hit determination is performed on the set of path edges to obtain the closed branch hit result; Based on the edge state labeling results, the forbidden edge hit determination is performed on the path edge set to obtain the forbidden edge hit result; Based on the path edge verification results, closed branch hit results, and forbidden edge hit results, the task processing results are generated. Based on the results of task handling, manage the flow of derived testing tasks.
[0014] To address the above problems, the present invention also provides a detection task management system based on a LIMS system, the system comprising: The branch sequence module generates historical branch records based on the audit trail record set of the target sample, sorts the historical branch records, and obtains the record sequence of historical branch records. The restriction marking module, based on the rule configuration data of the LIMS system, filters the record sequence for previous branches to obtain a set of previous branch records, and marks the previous branch record set with restrictions to obtain a set of previous branch restriction marks; The suppression graph construction module obtains the branch graph skeleton based on the record sequence and then trims the branch graph skeleton to obtain the reverse branch suppression graph. The path search module constructs an ant colony search edge set based on the previous branch constraint mark set and the reverse occupation suppression graph. It determines the target edge based on the edge pheromone set and edge heuristic value set determined by the ant colony search edge set, generates a candidate path set based on the target edge, and performs optimal path selection processing on the candidate path set to obtain the occupation avoidance path. The flow control module obtains the path edge verification results corresponding to the branch avoidance path, obtains the closed branch hit results based on the previous branch restriction mark set, and manages the flow of detection tasks for the derived detection tasks according to the path edge verification results and the closed branch hit results.
[0015] Compared with the prior art, the beneficial effects of the present invention are: 1. In this invention, by screening, structurally reconstructing and sorting the audit trail record set of the target sample, a record sequence that reflects the actual flow process of the sample is formed. Based on this, a historical branch relationship is constructed, thereby realizing the complete restoration of the sample's packaging and transfer behavior at each stage. This effectively avoids the problem of isolated existence of single operation records, and enables subsequent derivative detection tasks to have a traceable data foundation when selecting paths, thereby improving the accuracy and consistency of matching the detection task with the sample flow relationship.
[0016] 2. In this invention, by screening the preceding branches of the recorded sequence and combining the branch usage registration data for restriction marking, the sample branches are divided into two categories: referable and non-referable. Furthermore, a reverse branch suppression graph is constructed to constrain historical branches that do not meet the task generation logic. This allows for the early filtering of unreasonable branches during the path construction stage, effectively preventing the situation where derived detection tasks reversely occupy historical branches. This ensures that the task path originates only from branch relationships that conform to business logic, thereby improving the standardization and reliability of the detection process.
[0017] 3. In this invention, an ant colony search edge set is constructed by combining the constraint labeling results with the reverse occupation inhibition graph, and path selection optimization is performed using pheromones and heuristic values to obtain occupation avoidance paths. At the same time, task handling results are generated through path edge verification and closed branch hit determination, and the flow control of derivative detection tasks is performed to realize dynamic verification and closed-loop management of path legality, avoid erroneous paths from participating in task execution, improve the accuracy and stability of detection task flow, and reduce the risk of result interpretation bias. Attached Figure Description
[0018] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings: Figure 1 This is a flowchart illustrating a detection task management method based on a LIMS system, as provided in an embodiment of the present invention. Detailed Implementation
[0019] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0020] This embodiment provides a detection task management method based on a LIMS system. (See also...) Figure 1 Specifically, this includes: S1, generating historical branch records based on the audit trail record set of the target sample, and sorting the historical branch records to obtain a record sequence of historical branch records; In an embodiment of the present invention, a recording sequence is obtained, including: Obtain the audit trail record set of the target sample; wherein, the audit trail record set is the audit trail data of the LIMS system; A target sample refers to the actual sample corresponding to the data object selected for performing testing tasks in the laboratory testing process. This sample is a specific entity managed by the laboratory during the receipt, processing, or analysis process. Its source can be collection, delivery for testing, or retention. It is associated with a unique identifier in the system and is used to carry subsequent testing operations and record results. The LIMS system refers to an information management system used to manage laboratory testing business processes. This system is used to perform unified data processing and control on processes such as sample receipt, container management, testing task allocation, data recording, and audit trail. By recording and organizing various types of operational data, it achieves standardized management and full-process traceability of laboratory business processes.
[0021] An audit trail record set refers to a set of continuous record data generated during the operation of the laboratory information management system for the target sample. This record data comes from the system record behavior corresponding to the actual business operation and reflects the specific operation process that the sample undergoes at different processing stages.
[0022] Read the sample identifier corresponding to the target sample, perform a retrieval in the audit trail data storage area based on the sample identifier, and extract all audit trail records with the same operation object identifier as the sample identifier. For each extracted audit trail record, read the record identifier, record generation time, operation object type, operation object identifier, operation type, execution entity identifier, and associated container identifier. Audit trail records lacking record identifiers are removed, as are audit trail records with empty operation object identifiers. Establish a correspondence between the remaining audit trail records according to the record identifier and the sample identifier, and write all corresponding audit trail records into the same data set in the order of record generation time to form the audit trail record set of the target sample. Each record in this audit trail record set is used to represent an actual operation record of the target sample in the process of circulation, packaging, transfer, warehousing, warehousing, occupation, and recycling.
[0023] The audit trail record set is filtered to obtain branch event records; Branch event logs refer to the records selected from the audit trail log collection that characterize the repackaging, transfer, or status change of samples during the physical flow of the sample. They are used to describe the actual process of the sample flowing from one container to another.
[0024] Each audit trail record in the audit trail record set is read sequentially. The operation object type, operation type, associated container identifier, and record identifier of the audit trail record are extracted. Audit trail records with the operation object type being sample container and the associated container identifier being non-empty are retained as candidate records. The operation type of each candidate record is compared one by one. Candidate records with operation types belonging to repackaging, transfer, warehousing, outbound, occupation, return to warehousing, or destruction are identified as branch event records. Candidate records with operation types not belonging to the aforementioned categories are removed from the candidate records. For records identified as branch event records, their corresponding original container identifier and target container identifier are read. Records that have both original container identifier and target container identifier are retained in the branch event record set. Records that lack original container identifier or target container identifier are removed from the branch event record set. All retained branch event records are written into a unified record sequence according to the record identifier to obtain branch event records that can reflect the flow relationship of the target sample container.
[0025] Obtain the collection of container field data related to the target sample; Read the sample identifier corresponding to the target sample. Based on the sample identifier, retrieve all container records associated with the sample identifier in the container data storage area. For each container record, extract the container identifier, parent container identifier, container type identifier, container status identifier, container generation record identifier, and container-associated sample identifier. Compare the container-associated sample identifier with the sample identifier of the target sample. Keep the container records that match the comparison and remove the container records with empty container identifiers. Establish an index relationship for the retained container records according to the container identifiers. Supplement the information of the parent container record corresponding to the parent container identifier for each container record. Summarize all container records with container identifiers and container-associated sample identifiers and write them into the same data set to obtain the container field data set related to the target sample.
[0026] Historical branch records are generated based on the branch event records and container field data sets; The container field data set refers to the container information data set corresponding to the target sample. This data comes from the sample container management module and includes the physical container that actually carries the sample and its hierarchical relationship information. The historical branch record refers to the structured record formed based on the correspondence between the branch event record and the container field data, which is used to describe the flow relationship of the sample between different containers.
[0027] Read the record identifier, operation type, original container identifier, and target container identifier from each branch event record. Based on the original container identifier and target container identifier, retrieve the corresponding container record from the container field data set. Extract the container identifier from the original container record as the parent container identifier and extract the container identifier from the target container record as the container identifier. Write the operation type from the branch event record into the operation type field of the historical branch record. Write the record identifier from the branch event record into the audit trace record identifier field of the historical branch record. Remove branch event records for which no original container record or no target container record is found. Generate a historical branch record for each branch event record that successfully establishes a correspondence between the original container record and the target container record. Write all generated historical branch records into a unified record set in the order of generation to obtain historical branch records used to characterize the flow relationship of the target sample between different containers.
[0028] The historical branch records are sorted according to the audit trail record identifiers corresponding to the historical branch records to obtain the record sequence of historical branch records.
[0029] Audit trail record identifiers refer to data tags used to uniquely identify each audit trail record. These tags correspond to specific operation records and are used to distinguish different operation sources. The historical branch record sequence refers to an ordered set of data formed by arranging historical branch records in the order of their corresponding audit trail record identifiers. This ordered set of data reflects the branch flow process that occurred in the sample in chronological order during actual processing.
[0030] Read all historical branch records, extract the audit trail identifier, parent container identifier, container identifier, and operation type from each historical branch record, remove historical branch records with empty audit trail identifiers, establish corresponding sort keys for the remaining historical branch records according to the audit trail identifiers, compare all sort keys sequentially, arrange historical branch records with smaller audit trail identifier values or earlier generation order first, arrange historical branch records with larger audit trail identifier values or later generation order last, if there are the same audit trail identifiers, continue to extract the parent container identifier and container identifier from the corresponding historical branch records, sort them in parallel according to the lexicographical order of the parent container identifier and container identifier, and write the sorted historical branch records into the same ordered data structure in sequence to obtain the record sequence of historical branch records arranged according to the audit trail identifiers.
[0031] S2. Based on the rule configuration data of the LIMS system, the record sequence is filtered for previous branches to obtain a set of previous branch records, and the set of previous branch records is marked with restrictions to obtain a set of previous branch restriction marks. In an embodiment of the present invention, a set of previous branch records is obtained, including: Obtain reflection detection rules from the rule configuration data of the LIMS system; Read the detection item identifier, detection result data, and rule configuration data corresponding to the target sample. Search the rule configuration data for each rule record corresponding to the detection item identifier. For each rule record, extract the rule identifier, applicable detection item, trigger condition, condition comparison relationship, and subsequent task type. Remove rule records where the applicable detection item does not match the detection item identifier. For rule records where the applicable detection item matches the detection item identifier, read the detection result field corresponding to its trigger condition. Compare the corresponding field value in the detection result data with the condition comparison relationship in the rule record item by item. Retain rule records whose comparison results meet the trigger condition requirements. Write the retained rule records into the reflection detection rule set to obtain the reflection detection rule corresponding to the current detection result of the target sample.
[0032] The triggering results of the reflection detection rules are used to generate a task, resulting in a derived detection task; Reflection detection rules refer to a set of rule data used to describe the triggering of subsequent detection operations when a certain detection result meets predetermined conditions. This rule data comes from rule configuration data and is used to constrain the automatic task generation behavior in the detection process. Triggering result refers to the triggering state or triggering signal obtained after judging the actual detection result according to the reflection detection rules, which is used to characterize whether the conditions for generating subsequent detection tasks are met. Derived detection task refers to a new detection task generated based on the triggering result on the basis of the original detection task. This detection task corresponds to the new detection operation that actually needs to be performed.
[0033] Read the rule identifier, subsequent task type, and applicable detection items from the reflection detection rule set one by one. Use the trigger judgment result corresponding to each reflection detection rule as the basis for task generation. For reflection detection rules whose trigger judgment results are satisfied, extract the target sample identifier, parent task identifier, subsequent task type, and applicable detection items. Write the target sample identifier into the sample association field of the derived detection task, write the parent task identifier into the parent task association field of the derived detection task, write the subsequent task type into the task type field of the derived detection task, and write the applicable detection items into the detection item field of the derived detection task. Generate the corresponding task identifier and task creation record. Write all generated task data into the derived detection task data set to obtain the derived detection task generated by the trigger result of the reflection detection rule.
[0034] Obtain audit trail records for the creation of derived detection tasks; The task identifier in the derived detection task is read. Based on the task identifier, all audit trail records corresponding to the task identifier are retrieved from the audit trail data storage area. For each retrieved audit trail record, the record identifier, operation object identifier, operation object type, operation type, record generation time, and execution entity identifier are extracted. Audit trail records with operation object identifiers that match the task identifier and operation type "created" are retained as task creation candidate records. Audit trail records with inconsistent operation object identifiers are removed. Audit trail records with operation type other than "created" are also removed. The retained task creation candidate records are compared sequentially according to their record generation time. The task creation candidate record with the earliest record generation time and unique record identifier is determined as the task creation audit trail record for the derived detection task. The record identifier, operation object identifier, operation type, and record generation time of this task creation audit trail record are written into the task creation audit trail record data item to obtain the task creation audit trail record corresponding to the derived detection task.
[0035] Based on the audit trail record identifiers created by the task and the audit trail record identifiers in the record sequence, the record sequence is filtered for predecessor branches to obtain a set of predecessor branch records.
[0036] The task creation audit trail refers to the data entries used to record the operation records generated during the creation of the derived detection task. These data entries contain unique identifiers and reflect the occurrence of the task creation behavior. The audit trail identifier refers to the data tag used to uniquely identify each audit trail record. This tag is used to distinguish different operation records and supports record retrieval and sorting. The predecessor branch filtering refers to the process of filtering historical records in the record sequence based on the task creation audit trail identifier. This process is used to select branch records that occurred before the task was created. The predecessor branch record set refers to the record set obtained through the predecessor branch filtering. The records in this set are used to describe the sample branch flow relationship that existed before the derived detection task was generated.
[0037] The process involves reading the audit trail identifier from the task creation audit trail record, sequentially reading each historical branch record in the record sequence and extracting its corresponding audit trail identifier, comparing the audit trail identifier of each historical branch record with the audit trail identifier in the task creation audit trail record, identifying historical branch records whose positions precede the task creation audit trail identifier as candidate predecessor branches, and removing historical branch records whose positions follow the task creation audit trail identifier from the filtering results. If there are identical audit trail identifiers, the process continues to read the parent container identifier and container identifier from the corresponding historical branch record, retaining the historical branch records whose parent container identifier and container identifier correspond to containers that already had a flow relationship before task creation as predecessor branch records, and writing all the retained predecessor branch records into a unified data set according to their order in the record sequence to obtain the predecessor branch record set.
[0038] In an embodiment of the present invention, a set of predecessor branch restriction markers is obtained, including: Retrieve the branch purpose registration data corresponding to the previous branch record set; Branch usage registration data refers to the data content used to describe the usage information corresponding to each branch record when it is formed. This usage information comes from the registration results of the functions undertaken by the sample branches in actual operation, and is used to characterize whether the branch is reserved for subsequent testing or whether it has public use attributes.
[0039] Read each previous branch record from the previous branch record set, extract the parent container identifier, container identifier, operation type, and audit trail record identifier from each previous branch record, retrieve the corresponding use registration record in the use registration data storage area based on the parent container identifier and container identifier, verify the correspondence of the retrieved use registration records based on the audit trail record identifier, retain use registration records with consistent parent container identifier, container identifier, and audit trail record identifier as valid use registration records, and remove use registration records with inconsistent parent container identifier, inconsistent container identifier, and inconsistent audit trail record identifier. For each retained valid use registration record, extract the use identifier, registration time, and registration subject identifier, and establish an association relationship between the valid use registration record and the corresponding previous branch record. Write all associated valid use registration records into a unified data set to obtain the branch use registration data corresponding to the previous branch record set.
[0040] Based on the branch usage registration data, the set of previous branch records is marked with restrictions to obtain the set of previous branch restriction marks; the set of previous branch restriction marks includes open previous branch records and closed previous branch records.
[0041] The predecessor branch restriction tag set refers to the data set formed by tagging each record in the predecessor branch record set based on the branch purpose registration data. Each record in this set is accompanied by corresponding restriction status information, which indicates whether the branch record is allowed to be referenced in subsequent detection tasks. Open predecessor branch records refer to branch records that are marked in the branch purpose registration data as usable for reference in subsequent detection tasks. The sample branches corresponding to these records already have the attribute of being reusable when they are formed. Closed predecessor branch records refer to branch records that are not marked in the branch purpose registration data as usable for reference in subsequent detection tasks. The sample branches corresponding to these records were not registered as reusable when they were formed, so they need to be restricted in subsequent detection task processing.
[0042] Read each preceding branch record and the associated branch purpose registration data in the preceding branch record set one by one. Extract the purpose identifier from the branch purpose registration data. Preceding branch records whose purpose identifier indicates public sample retention or subsequent testing reuse are identified as open preceding branch records. Preceding branch records whose purpose identifier does not indicate public sample retention or subsequent testing reuse are identified as closed preceding branch records. Write each open preceding branch record into the open record area and each closed preceding branch record into the closed record area. Add an open mark to the records in the open record area and a closed mark to the records in the closed record area. Then, summarize the open preceding branch records with added open marks and the closed preceding branch records with added closed marks and write them into the same data set to obtain a preceding branch restriction mark set containing open preceding branch records and closed preceding branch records.
[0043] S3. Obtain the reverse occupation suppression map based on the recording sequence; In an embodiment of the present invention, obtaining a reverse occupation suppression map based on the recording sequence includes: A branch graph is constructed from the record sequence to obtain the branch graph skeleton; the branch graph skeleton includes a set of nodes and a set of edges. The branch graph skeleton refers to a structured relationship graph constructed based on the parent container and container correspondence between historical branch records in the record sequence. This structured relationship graph is used to represent the connection relationship formed between samples in different containers. The node set refers to the data set composed of all container identifiers in the branch graph skeleton. Each node corresponds to a container entity that actually carries the sample. The edge set refers to the set of connection relationships in the branch graph skeleton from parent container identifier to container identifier. Each edge is used to represent the process of a sample moving from one container to another.
[0044] Read each historical branch record in the record sequence, extract the parent container identifier, container identifier, operation type, and audit trail record identifier from each historical branch record, write the parent container identifier and container identifier into the node temporary storage area, remove duplicate container identifiers in the node temporary storage area to obtain the node set, write the correspondence between the parent container identifier and the container identifier in each historical branch record into the edge temporary storage area, write the operation type and audit trail record identifier into the auxiliary field of the correspondence, remove historical branch records with empty parent container identifiers or empty container identifiers, retain the correspondence of historical branch records with both valid parent container identifiers and container identifiers, merge and organize duplicate correspondences in the edge temporary storage area according to the audit trail record identifier to obtain the edge set, and summarize the node set and edge set into the unified graph structure data to form a branch graph skeleton containing the node set and edge set.
[0045] Obtain the task root location information corresponding to the derived detection task; Task root location information refers to the starting container or sample identification information associated with the derived detection task. This information is used to determine the starting position corresponding to the task in the branching graph.
[0046] Read the task identifier, parent task identifier, and target sample identifier from the derived detection task. Based on the target sample identifier, retrieve the corresponding root container record in the sample association data. Extract the root container identifier and sample master identifier from the root container record. Write the root container identifier and sample master identifier into the task root location data item. For derived detection tasks where no root container record is found, retrieve the sample root record corresponding to the parent task in the task association data based on the parent task identifier. Extract the root container identifier corresponding to the parent task and write it into the task root location data item. Output the root container identifier and sample master identifier that have been written as the task root location information corresponding to the derived detection task.
[0047] Based on the task root location information, the branch graph skeleton is trimmed to a task-specific branch subgraph. Task-specific pruning refers to the process of filtering out nodes and their connections related to the task in the branch graph skeleton based on the task root location information. This process is used to remove branch paths that are irrelevant to the task. Task-specific branch subgraph refers to the subgraph structure obtained after task-specific pruning that only contains nodes and edges related to the derived detection task. This subgraph is used to describe the sample branch paths corresponding to the task.
[0048] Read the root container identifier and sample master identifier from the task root location information. Based on the root container identifier, locate the starting node in the node set of the branch graph skeleton. Read the set of edges directly connected to the starting node and extract the target node corresponding to each edge. Write the target node into the node to be visited table and write the starting node into the visited node table. Repeat the edge extraction, target node writing, and visited node registration process for each node in the node to be visited table. Determine all nodes in the node set that have a connection relationship with the root container identifier as task-related nodes. Determine all edges in the edge set that connect to task-related nodes as task-related edges. Remove nodes that have no connection relationship with task-related nodes and edges that have no corresponding relationship with task-related edges. Write the remaining task-related nodes and task-related edges into a unified subgraph data structure to obtain the task-specific branch subgraph.
[0049] Determine the reverse branch suppression graph based on the task-specific branch subgraph.
[0050] The reverse branch suppression graph refers to a data structure built on the basis of a task-specific branch subgraph to constrain the range of branch path selection. This data structure is used to limit the range of branches that can be selected in the subsequent path search process.
[0051] Read all nodes and edges in the task-specific branch subgraph. For each edge, extract the parent container identifier, container identifier, operation type, and audit trail record identifier. Match each edge with the corresponding record in the set of predecessor branch restriction markers. Assign a permitted state to edges that match an open predecessor branch record, and an inaccessible state to edges that match a closed predecessor branch record. Assign a permitted state to edges that do not match a restriction marker record but are formed after the task creation record. Write the edges with permitted or inaccessible states, along with their corresponding nodes, into the unified graph structure data, and determine this unified graph structure data as a reverse branch suppression graph.
[0052] S4. Construct an ant colony search edge set based on the previous branch restriction label set and the reverse occupation suppression graph. Determine the target edge based on the edge pheromone set and edge heuristic value set determined by the ant colony search edge set. Generate a candidate path set based on the target edge and perform optimal path selection processing on the candidate path set to obtain the occupation avoidance path. In an embodiment of the present invention, constructing an ant colony search edge set includes: Based on the set of previous branch restriction labels, the edge set is processed by edge state labeling to obtain the edge state labeling result; the edge state labeling result includes permitted edges and forbidden edges; Edge state labeling refers to the process of assigning state values to edges in a branch graph based on the set of previous branch constraint labels, used to determine the availability of each edge in subsequent path search. Edge state labeling result refers to the data result formed after edge state labeling processing, where each edge corresponds to a state identifier to indicate whether it is allowed to be selected. Permitted edges are those marked as usable for path expansion in the edge state labeling result, and the branch relationships corresponding to these edges can be used for path construction in derived detection tasks. Forbidden edges are those marked as unusable for path expansion in the edge state labeling result, and the branch relationships corresponding to these edges are not allowed to be selected during the path search process.
[0053] Read each edge in the edge set, extracting the parent container identifier, container identifier, operation type, and audit trail record identifier for each edge. Read each restriction mark record in the previous branch restriction mark set, extracting the parent container identifier, container identifier, operation type, audit trail record identifier, and restriction status identifier for each restriction mark record. Match each edge in the edge set with each restriction mark record in the previous branch restriction mark set, establishing a unique correspondence between edges with the same parent container identifier, container identifier, operation type, and audit trail record identifier and the restriction mark record. After establishing the unique correspondence, read the restriction status identifier from the restriction mark record and set the restriction status... Edges whose state identifier is an open preceding branch record are identified as permitted edges, and edges whose state identifier is a closed preceding branch record are identified as forbidden edges. For edges that do not have a corresponding relationship with any restricted marker record, the audit trail record identifier corresponding to the edge is read, and the audit trail record identifier is compared sequentially with the task creation audit trail record identifier of the derived detection task. Edges whose position is after the task creation audit trail record identifier are identified as permitted edges, and edges whose position is not after the task creation audit trail record identifier are identified as forbidden edges. All edges after the completion of the state determination, along with their corresponding state identifiers, are written into the unified marking result data set to obtain the edge state marking result including permitted edges and forbidden edges.
[0054] Based on the edge state labeling results, determine the set of permissible edges; Read each edge status mark record in the edge status mark result, extract the parent container identifier, container identifier, operation type, audit trail record identifier, and edge status identifier corresponding to each edge status mark record, identify each edge status identifier one by one, retain the edge status mark records whose edge status identifiers represent a permitted state as permitted edge records, and remove the edge status mark records whose edge status identifiers represent a prohibited state from the permitted edge filtering result, build an edge index for the retained permitted edge records according to the connection relationship between the parent container identifier and the container identifier, write the operation type and audit trail record identifier into the auxiliary fields of the corresponding edge index, and summarize all permitted edge records into a unified data set to obtain the permitted edge set.
[0055] Obtain the task endpoint definition data corresponding to the derived detection task; The set of permissible edges refers to the data set consisting of all permissible edges extracted from the edge state labeling results; the task endpoint definition data refers to the data content used to describe the endpoint container or endpoint state that the derived detection task is allowed to reach, and this data is used to limit the termination conditions of path search.
[0056] Read the task identifier, task type, detection item identifier, and sample identifier from the derived detection task. Based on the task type and detection item identifier, retrieve the endpoint definition record corresponding to the derived detection task from the task configuration data. For each retrieved endpoint definition record, extract the endpoint container type identifier, endpoint container status identifier, endpoint processing requirements, and task association identifier. Verify the correspondence between the task association identifier and the task identifier in the derived detection task. Match the task type and detection item identifier with the applicable task type and applicable detection item in the endpoint definition record, respectively. Retain endpoint definition records with the same task type and the same detection item identifier. Remove endpoint definition records with inconsistent task types and inconsistent detection item identifiers. Write the retained endpoint definition records into a unified data set to obtain the task endpoint definition data corresponding to the derived detection task.
[0057] Based on the reverse support inhibition diagram and the task endpoint definition data, determine the set of task search starting point nodes and the set of task search endpoint nodes; The task search starting point node set refers to the set of nodes in the reverse support and suppression graph that are related to the starting position of the derived detection task. This set is used to determine the starting position of the path search. The task search ending point node set refers to the set of nodes in the reverse support and suppression graph that meet the data requirements of the task ending point definition. This set is used to determine the ending position of the path search.
[0058] Read all nodes and edges in the reverse support and suppression graph, extract the container identifier, container type identifier, container status identifier, and sample association identifier for each node, extract the parent container identifier, container identifier, and edge status identifier for each edge, read the task endpoint definition data corresponding to the derived detection task, extract the endpoint container type identifier, endpoint container status identifier, endpoint processing requirements, and task association identifier from the task endpoint definition data, read the task root location information corresponding to the derived detection task, extract the root container identifier and sample master identifier from the task root location information, search for nodes in the reverse support and suppression graph that match the root container identifier, and determine the searched nodes as the root nodes; Perform connectivity expansion processing on the root node. Search for nodes connected to the root node layer by layer along the edges marked as permissible in the reverse support and suppression graph. Nodes whose sample association identifier matches the sample master identifier are retained as candidate starting nodes. Write the candidate starting nodes into the task search starting node set according to their connectivity with the root node. Search for nodes in the reverse support and suppression graph one by one. Nodes whose container type identifier matches the endpoint container type identifier and whose container state identifier matches the endpoint container state identifier are retained as candidate ending nodes. Further verify whether the candidate ending nodes meet the endpoint processing requirements in the task endpoint definition data. Write the candidate ending nodes that meet the endpoint processing requirements into the task search endpoint node set. Output the completed task search starting node set and task search endpoint node set as path search input data.
[0059] An ant colony search edge set is constructed based on the set of permitted edges, the set of task search start nodes, and the set of task search end nodes.
[0060] Ant colony search edge set refers to the set of edges used for path search, formed under the constraints of the set of permissible edges and the set of starting and ending nodes. This set is used to limit the range of edges that can be selected during the ant colony path search process.
[0061] Read each permitted edge in the permitted edge set, extract the parent container identifier, container identifier, operation type, and audit trail record identifier corresponding to each permitted edge. Read each starting node in the task search starting node set and extract the corresponding node container identifier. Read each ending node in the task search ending node set and extract the corresponding node container identifier. Establish a connection relationship mapping from the parent container identifier to the container identifier for each permitted edge in the permitted edge set. Compare the parent container identifier with the node container identifiers in the task search starting node set one by one. Retain the permitted edges whose parent container identifier matches any starting node container identifier as the initial reachable edge. Next, connectivity expansion retrieval is performed on the container identifier corresponding to the initial reachable edge. In the set of permissible edges, subsequent permissible edges with the container identifier as the parent container identifier are searched. The found subsequent permissible edges are added to the connectivity edge record. For each permissible edge added to the connectivity edge record, the container identifier expansion and subsequent permissible edge retrieval processes are repeated until a permissible edge whose container identifier is consistent with the container identifier of any endpoint node in the task search endpoint node set is found. All connected permissible edges from the initial reachable edge to the corresponding permissible edge of the endpoint node are retained as endpoint reachable edges. Permissible edges that cannot connect to any endpoint node in the task search endpoint node set are removed. All retained endpoint reachable edges are written into a unified edge data set according to the parent container identifier, container identifier, and audit trail record identifier to obtain the ant colony search edge set used for ant colony path search.
[0062] In an embodiment of the present invention, determining the target edge includes: Assign initial pheromone values to each edge in the ant colony search edge set to obtain the edge pheromone set; Edge pheromone refers to the numerical information attached to each edge, used to indicate the historical cumulative degree of the edge being selected during the path selection process; the edge pheromone set refers to the data set consisting of the pheromone values corresponding to all edges.
[0063] Read each edge in the ant colony search edge set, extract the parent container identifier, container identifier, operation type, and audit trail record identifier corresponding to each edge, establish a unique edge index for each edge in the ant colony search edge set, write all unique edge indexes into the edge index table, generate pheromone record entries for each edge index in the edge index table, write the edge index into the edge identifier field of the pheromone record entry when generating the pheromone record entry, and write the initial pheromone value into the pheromone field of the pheromone record entry. The initial pheromone value is written to each edge in the ant colony search edge set using the same assignment method to ensure that each edge is at the same pheromone starting point at the beginning of the path search. For each pheromone record entry that has completed the writing of the pheromone field, attach the corresponding parent container identifier, container identifier, operation type, and audit trail record identifier, and summarize all pheromone record entries according to the edge index and write them into a unified data set to obtain the edge pheromone set corresponding to each edge in the ant colony search edge set.
[0064] Based on the audit backlink status and parent container identifier availability status of each edge in the ant colony search edge set, a heuristic value is determined for each edge in the ant colony search edge set, resulting in a set of edge heuristic values. The audit backlink status refers to the existence of records retrieved from the audit trail record set based on the audit trail record identifier corresponding to the edge, used to characterize whether the operation record corresponding to the edge can be traced; the parent container identifier availability status refers to the data result of whether the parent container corresponding to the edge exists in the container data and is in an available state; the edge heuristic value refers to the numerical information calculated based on the audit backlink status and the parent container identifier availability status, used to indicate the priority of the edge in the path expansion process; the edge heuristic value set refers to the data set composed of the heuristic values corresponding to all edges.
[0065] Read each edge in the ant colony search edge set, extract the parent container identifier, container identifier, operation type, and audit trail record identifier corresponding to each edge. Based on the audit trail record identifier, search the audit trail record set one by one. Edges that can be retrieved with corresponding audit trail records and whose operation object identifier and operation type in the corresponding audit trail record are consistent with the data corresponding to the edge are determined as edges with valid audit backlink status. Edges that cannot be retrieved with corresponding audit trail records or whose retrieved audit trail records are inconsistent with the data corresponding to the edge are determined as edges with invalid audit backlink status. Based on the parent container identifier, search the container field data set one by one. Edges that can be retrieved with corresponding parent container records and whose container identifier in the parent container record is consistent with the parent container identifier are determined as edges with valid parent container identifier status. Edges that cannot be retrieved with corresponding parent container records or whose retrieved parent container records are inconsistent with the parent container identifier are determined as edges with invalid parent container identifier status. For each edge, a heuristic value record is created. When the audited backlink status is valid and the parent container identifier is available, the heuristic value of the edge is determined as the first heuristic value. When the audited backlink status is valid and the parent container identifier is invalid, the heuristic value of the edge is determined as the second heuristic value. When the audited backlink status is invalid and the parent container identifier is available, the heuristic value of the edge is determined as the third heuristic value. When the audited backlink status is invalid and the parent container identifier is available, the heuristic value of the edge is determined as the fourth heuristic value. A heuristic value hierarchy is established in the order that the first heuristic value is greater than the second heuristic value, the second heuristic value is greater than the third heuristic value, and the third heuristic value is greater than the fourth heuristic value. The edge identifier, audited backlink status, parent container identifier available status, and heuristic value corresponding to each edge are written into the corresponding heuristic value record. All heuristic value records are summarized and written into a unified data set to obtain the edge heuristic value set.
[0066] Select a starting node from the set of starting nodes for the task search; Read all node records in the task search starting node set, extract the node container identifier, node type identifier, node associated sample identifier, and number of connected edges for each node record, deduplicate all node records according to the node container identifier, match each deduplicated node record with the task root location information corresponding to the derived detection task, retain node records whose node associated sample identifier matches the sample master identifier in the task root location information, and remove node records whose node associated sample identifier does not match, read the number of connected edges for the retained node records, remove node records with zero connected edges, and retain node records with non-zero connected edges as valid starting point candidate nodes, sort the valid starting point candidate nodes according to the correspondence between the node container identifier and the root container identifier in the task root location information, select the node corresponding to the root container identifier as the starting node, if there is no node corresponding to the root container identifier, select the node directly connected to the root container identifier as the starting node, and write the selected starting node into the current path starting data item.
[0067] Based on the set of edge pheromones and the set of edge heuristic values, the permissible edges connected to the starting node are selected to obtain the target edge.
[0068] The starting node refers to the specific node selected from the set of starting nodes for the task search to begin the path search; the permissible edge refers to the edge that is determined to be able to participate in the path expansion in the edge state labeling results, and this type of edge is allowed to be selected during the path search process; the target edge refers to an edge selected from the permissible edges in the current path expansion step based on the edge pheromone set and the edge heuristic value set, and this edge is used to determine the next expansion direction of the path.
[0069] Read the node container identifier corresponding to the starting node. Retrieve all permitted edges in the permitted edge set whose parent container identifier matches the node container identifier. Extract the edge identifier, parent container identifier, container identifier, operation type, and audit trail record identifier for each permitted edge. Based on the edge identifier, retrieve the corresponding pheromone record in the edge pheromone set and extract the edge pheromone value from the pheromone record. Based on the edge identifier, retrieve the corresponding heuristic value record in the edge heuristic value set and extract the edge heuristic value from the heuristic value record. Create an edge selection record item for each retrieved permitted edge. Combine the edge pheromone value of the permitted edge with the edge heuristic value to calculate the edge selection value. Compare the edge selection values in all edge selection record items and determine the permitted edge with the largest edge selection value as the target edge. If multiple permitted edges correspond to the same edge selection value, continue to compare the audit trail record identifiers of the corresponding permitted edges. Select the permitted edge with the highest audit trail record identifier as the target edge and write the selected target edge into the current path extension data item.
[0070] In an embodiment of the present invention, the obtained occupation avoidance path includes: Candidate paths are determined based on the target edge and the endpoint nodes in the task search endpoint node set; The endpoint node in the task search endpoint node set refers to the node that meets the data requirements of the task endpoint definition. This node corresponds to the termination position in the sample flow path. The candidate path refers to the node connection sequence formed by continuously extending from the starting node along one or more target edges. This sequence is used to represent a complete flow path of the sample between multiple containers.
[0071] Read the parent container identifier, container identifier, operation type, and audit trail record identifier corresponding to the target edge. Determine the node corresponding to the parent container identifier of the target edge as the starting node of the current path and the node corresponding to the container identifier of the target edge as the next node of the current path. Read the node container identifier corresponding to each endpoint node one by one according to the task search endpoint node set. Compare the container identifier of the target edge with the node container identifier of each endpoint node one by one. When the container identifier of the target edge matches the node container identifier of any endpoint node, the connection relationship from the starting node to the next node is determined as the complete candidate path. When the container identifier of the target edge is inconsistent with the container identifiers of all endpoint nodes, the node corresponding to the container identifier of the target edge is taken as the current extension node. The subsequent permitted edges whose parent container identifier is consistent with the container identifier of the current extension node are retrieved from the permitted edge set. The subsequent permitted edges are selected according to the edge pheromone set and the edge heuristic value set to obtain the next target edge. The connection relationship corresponding to the next target edge is sequentially appended to the current path. The node comparison, subsequent permitted edge retrieval, edge selection and path appending processes are repeated until the container identifier of the current extension node is consistent with the container identifier of a certain endpoint node in the task search endpoint node set. All edges and all nodes sequentially connected from the starting node to the endpoint node are written into the unified path data structure to obtain the candidate path.
[0072] Based on the candidate paths, generate a set of candidate paths; The candidate path set refers to a data set consisting of multiple candidate paths, which is used to summarize the results of different path expansions.
[0073] Select a starting node from the set of starting nodes for the task search. Select the permissible edges connected to the current node based on the edge pheromone set and the edge heuristic value set to obtain the target edge. Add the target edge to the current path and update the current node to the node pointed to by the target edge. Continue to perform permissible edge retrieval, edge selection, target edge addition and current node update processing until the current node reaches the endpoint node in the set of endpoint nodes for the task search. Obtain a candidate path. Extract the path node sequence, path edge sequence and endpoint node identifier from the candidate path and write them into the candidate path record item. Then, a new starting node is selected from the set of starting nodes for the task search. The starting node selection, edge selection, path expansion, and endpoint arrival determination processes are repeated to obtain another candidate path. For each newly obtained candidate path, its path node sequence, path edge sequence, and endpoint node identifier are extracted. The newly obtained candidate path record is compared with the generated candidate path record one by one. If the path node sequence and path edge sequence are the same, only one candidate path record is retained. If the path node sequence or path edge sequence is different, all corresponding candidate path record items are retained. All retained candidate path record items are written into a unified set data structure according to the endpoint node identifier and the audit trail record identifier corresponding to the path edge sequence, to obtain the candidate path set.
[0074] The optimal path selection process is performed on the candidate path set to obtain the occupancy avoidance path.
[0075] The optimal path selection process refers to the process of comparing and filtering each path in the candidate path set to determine the path that best meets the path selection rules. The branch avoidance path refers to a path determined after the optimal path selection process. This path avoids selecting restricted branch relationships during the path construction process, thereby forming a final path result that meets the constraint requirements.
[0076] Read each candidate path in the candidate path set, extract the path edge sequence, path node sequence, endpoint node identifier, and edge pheromone value and edge heuristic value corresponding to each edge in the path edge sequence for each candidate path, establish a path evaluation record for each candidate path, accumulate the edge pheromone values corresponding to all edges contained in the candidate path to obtain the cumulative path pheromone value, accumulate the edge heuristic values corresponding to all edges contained in the candidate path to obtain the cumulative path heuristic value, write the cumulative path pheromone value and the cumulative path heuristic value into the corresponding path evaluation record, compare the cumulative path pheromone values in all path evaluation record items, and retain the candidate path with the larger cumulative path pheromone value; When multiple candidate paths have the same cumulative path pheromone value, the cumulative path heuristic value of the corresponding candidate paths is compared, and the candidate path with the larger cumulative path heuristic value is retained. When the cumulative path pheromone value and the cumulative path heuristic value are the same, the audit trail record identifier sequence in the path edge sequence of the corresponding candidate path is extracted. The audit trail record identifier sequences are compared sequentially, and the candidate path with the audit trail record identifier ranked first is retained. The finally retained candidate path is determined as the optimal path, and the path node sequence, path edge sequence, endpoint node identifier and path evaluation record corresponding to the optimal path are written into the unified path result data to obtain the occupation avoidance path.
[0077] It should be noted that during the generation and binding of derivative detection tasks, there is a phenomenon where a later-created task reverses the occupation of an existing branch. That is, at the data semantic level, the later-created derivative detection task is incorrectly associated with a sample branch that existed before its creation. This causes the branch that originally belonged to the sample history flow to be reinterpreted as a branch prepared in advance by the task, resulting in a shift in the direction of belonging between the task and the sample branch. If no constraint is applied in this case, the derivative detection task will reference historical branches without legitimate sources during the path selection process, which will lead to errors in the interpretation of detection results and risks of task binding. Therefore, it is necessary to obtain a branch-occupancy avoidance path by filtering and optimizing the path, so that the selected path only contains branch connections with reasonable source relationships under the task generation logic, thereby ensuring that the derivative detection task is bound and executed only along the sample flow path consistent with its generation logic.
[0078] S5. Based on the avoidance path, manage the flow of detection tasks corresponding to the rule configuration data.
[0079] In embodiments of the present invention, the derivative detection task is managed through a task flow system, including: Based on the record sequence, record matching is performed on the set of path edges of the evasion path to obtain the path edge verification result. The path edge set of the occupancy avoidance path refers to the data set consisting of all the edges that constitute the occupancy avoidance path. Each edge represents the connection relationship of the sample flowing from one container to another. The path edge verification result refers to the result obtained by matching the path edge set with the record sequence. It is used to characterize whether each edge in the path can find the corresponding actual operation record in the historical record.
[0080] Read all path edges in the evasion path, extract the parent container identifier, container identifier, operation type, and audit trail record identifier corresponding to each path edge. Read each historical branch record in the record sequence, extract the parent container identifier, container identifier, operation type, and audit trail record identifier corresponding to each historical branch record. Match each path edge with each historical branch record in the record sequence. Establish a matching relationship between path edges with the same parent container identifier, container identifier, operation type, and audit trail record identifier and historical branch records. Path edges with established matching relationships are identified as reviewed path edges, and path edges without established matching relationships are identified as unreviewed path edges. Generate a review passed record for each reviewed path edge and a review failed record for each unreviewed path edge. Write the path edge identifier, the matched historical branch record identifier, and the review status into the corresponding review record item. Summarize and organize the review record items corresponding to all path edges to obtain the path edge review result, which is used to characterize whether each path edge in the evasion path can find a corresponding historical branch record in the record sequence.
[0081] The set of previous branch restriction markers is processed by closing branch extraction to obtain a set of closed previous branch records; Read each restriction mark record in the set of previous branch restriction marks, extract the parent container identifier, container identifier, operation type, audit trail record identifier, and restriction status identifier corresponding to each restriction mark record, identify the restriction status identifier of each restriction mark record, retain the restriction mark records whose restriction status identifier represents a closed state as closed branch candidate records, and remove the restriction mark records whose restriction status identifier represents an open state from the closed branch candidate records, create a corresponding closed branch record item for each of the retained closed branch candidate records, write the parent container identifier, container identifier, operation type, and audit trail record identifier into the corresponding closed branch record item, and write all closed branch record items into a unified data set in the order of audit trail record identifiers to obtain the set of closed previous branch records.
[0082] Based on the set of closed predecessor branch records, the closed branch hit determination is performed on the set of path edges to obtain the closed branch hit result; The closed predecessor branch record set refers to the data set consisting of branch records marked as unreferenceable extracted from the predecessor branch restriction mark set. This set is used to identify historical branch relationships that are not allowed to be used in the path. The closed branch hit result refers to the result obtained by matching the path edge set with the closed predecessor branch record set, which is used to characterize whether the path contains unreferenceable branch relationships.
[0083] Read each path edge in the path edge set, extract the parent container identifier, container identifier, operation type, and audit trail record identifier corresponding to each path edge. Read each pre-closed branch record in the pre-closed branch record set, extract the parent container identifier, container identifier, operation type, and audit trail record identifier corresponding to each pre-closed branch record. Match each path edge in the path edge set with each pre-closed branch record in the pre-closed branch record set. Establish a hit relationship between path edges with the same parent container identifier, container identifier, operation type, and audit trail record identifier and the pre-closed branch record. Path edges with established hit relationships are identified as pre-closed branch hit edges, and path edges without established hit relationships are identified as pre-closed branch miss edges. Generate a corresponding hit judgment record item for each path edge, and write the path edge identifier, the corresponding pre-closed branch record identifier, and the hit status into the hit judgment record item. Summarize all hit judgment record items and write them into a unified result data set to obtain the pre-closed branch hit result, which is used to characterize whether the path edge set contains the edge corresponding to the pre-closed branch record.
[0084] Based on the edge state labeling results, the forbidden edge hit determination is performed on the path edge set to obtain the forbidden edge hit result; The forbidden edge hit result refers to the result obtained by matching the set of path edges with the edges marked as unavailable, which is used to characterize whether the path contains edges that are not allowed to be selected.
[0085] Read each path edge in the path edge set, extracting the parent container identifier, container identifier, operation type, and audit trail record identifier for each path edge. Read each edge status mark record in the edge status mark result, extracting the parent container identifier, container identifier, operation type, audit trail record identifier, and edge status identifier for each edge status mark record. Perform a correspondence matching between each path edge in the path edge set and each edge status mark record in the edge status mark result, establishing a unique pair between path edges with the same parent container identifier, container identifier, operation type, and audit trail record identifier and their corresponding edge status mark records. According to the relationship, after establishing a unique correspondence, the edge status identifier in the edge status mark record is read. The path edge whose edge status identifier represents a forbidden state is determined as a forbidden edge hit edge, and the path edge in the edge status mark result that is not represented as a forbidden edge is determined as a forbidden edge miss edge. A corresponding forbidden determination record item is established for each path edge, and the path edge identifier, the corresponding edge status mark record identifier, and the forbidden hit state are written into the forbidden determination record item. All forbidden determination record items are written into a unified result data set according to the arrangement order of the path edges in the path edge set to obtain the forbidden edge hit result used to represent whether the path edge set contains a forbidden edge.
[0086] Based on the path edge verification results, closed branch hit results, and forbidden edge hit results, the task processing results are generated. The task handling result refers to the data result formed after comprehensive judgment based on the path edge verification result, closed branch hit result, and forbidden edge hit result. This result is used to indicate whether the derived detection task is allowed to continue to be executed or needs to be restricted.
[0087] Read all review records from the path edge review results, extract the path edge identifier and review status corresponding to each review record, read all hit judgment records from the closed branch hit results, extract the path edge identifier and closed branch hit status corresponding to each hit judgment record, read all forbidden edge hit records from the forbidden edge hit results, extract the path edge identifier and forbidden hit status corresponding to each forbidden edge hit record, merge the records with the same path edge identifier in the path edge review results, closed branch hit results, and forbidden edge hit results to form path edge handling judgment records, identify path edges with a review status of "failed" as abnormal path edges, and identify path edges with a closed branch hit status of "failed" as abnormal path edges. The hit path edge is identified as an abnormal path edge. The path edge represented by the forbidden hit state is identified as an abnormal path edge. The judgment records of all path edge handling are summarized and judged. If any abnormal path edge exists, the corresponding derived detection task is identified as a restricted flow task, and the restricted flow identifier and abnormal source record are written into the task handling result. If no abnormal path edge exists, the corresponding derived detection task is identified as a allowed flow task, and the allowed flow identifier and path pass record are written into the task handling result. The results of the restricted flow task and the allowed flow task that have been written are summarized and written into a unified task handling result data set to obtain the task handling result for subsequent detection task flow management.
[0088] Based on the results of task handling, manage the flow of derived testing tasks.
[0089] Detection task flow management refers to the process of controlling the execution path, status changes, and subsequent processing flow of derived detection tasks based on the task handling results.
[0090] Read each task processing record in the task processing results, extract the task identifier, processing status identifier, anomaly source record and path passage record corresponding to each task processing record, retrieve the corresponding task record in the derived detection task data based on the task identifier, extract the current task status, task-related sample identifier, parent task identifier, detection item identifier and execution queue identifier from the corresponding task record, and identify the task record that is allowed to be transferred as a transferable task by the processing status identifier. For tasks that can be transferred, the current task status is updated to either "pending execution" or "pending review." The path is recorded in the "transfer basis" field of the task record, and the task record is written to the execution queue corresponding to the detection project identifier. For task records whose status identifier indicates "restricted transfer," they are identified as restricted tasks. For restricted tasks, the current task status is updated to either "restricted" or "manual review." The source of the anomaly is recorded in the "anomaly basis" field of the task record. The task record is removed from the original execution queue and written to the manual review queue or restricted task queue. A transfer log is generated synchronously for all task records that have completed status updates and queue writing. The transfer log records contain the task identifier, original task status, updated task status, queue change result, and disposal basis. All processed task records and transfer log records are summarized and written to the detection task transfer data set to obtain the detection task transfer management result corresponding to the derived detection task.
[0091] An embodiment of the present invention also provides a detection task management system based on a LIMS system.
[0092] In this embodiment, the functions of each module / unit are as follows: The branch sequence module generates historical branch records based on the audit trail record set of the target sample, sorts the historical branch records, and obtains the record sequence of historical branch records. The restriction marking module, based on the rule configuration data of the LIMS system, filters the record sequence for previous branches to obtain a set of previous branch records, and marks the previous branch record set with restrictions to obtain a set of previous branch restriction marks; The suppression graph construction module obtains the branch graph skeleton based on the record sequence and then trims the branch graph skeleton to obtain the reverse branch suppression graph. The path search module constructs an ant colony search edge set based on the previous branch constraint mark set and the reverse occupation suppression graph. It determines the target edge based on the edge pheromone set and edge heuristic value set determined by the ant colony search edge set, generates a candidate path set based on the target edge, and performs optimal path selection processing on the candidate path set to obtain the occupation avoidance path. The flow control module obtains the path edge verification results corresponding to the branch avoidance path, obtains the closed branch hit results based on the previous branch restriction mark set, and manages the flow of detection tasks for the derived detection tasks according to the path edge verification results and the closed branch hit results.
[0093] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method for managing a detection task based on a LIMS system, characterized by, The process includes the following steps: generating historical branch records based on the audit trail record set of the target sample, and sorting the historical branch records to obtain a record sequence of historical branch records; Based on the rule configuration data of the LIMS system, the record sequence is filtered for previous branches to obtain a set of previous branch records, and the previous branch record set is marked with restrictions to obtain a set of previous branch restriction marks. The branch graph skeleton is obtained based on the record sequence, and the branch graph skeleton is pruned to obtain the reverse branch suppression graph. The ant colony search edge set is constructed based on the previous branch restriction label set and the reverse occupation suppression graph. The target edge is determined based on the edge pheromone set and edge heuristic value set determined by the ant colony search edge set. The candidate path set is generated based on the target edge, and the optimal path selection process is performed on the candidate path set to obtain the occupation avoidance path. Obtain the path edge verification results corresponding to the branch avoidance path, obtain the closed branch hit results based on the previous branch restriction mark set, and manage the detection task flow of the derived detection task according to the path edge verification results and the closed branch hit results.
2. The detection task management method based on a LIMS system according to claim 1, characterized in that, The recorded sequence is obtained, including: Obtain the audit trail record set of the target sample; wherein, the audit trail record set is the audit trail data of the LIMS system; The audit trail record set is filtered to obtain branch event records; Obtain the collection of container field data related to the target sample; Historical branch records are generated based on the branch event records and container field data sets; The historical branch records are sorted according to the audit trail record identifiers corresponding to the historical branch records to obtain the record sequence of historical branch records.
3. The detection task management method based on a LIMS system according to claim 1, characterized in that, The set of previous branch records is obtained, including: Obtain reflection detection rules from the rule configuration data of the LIMS system; The triggering results of the reflection detection rules are used to generate a task, resulting in a derived detection task; Obtain audit trail records for the creation of derived detection tasks; Based on the audit trail record identifiers created by the task and the audit trail record identifiers in the record sequence, the record sequence is filtered for predecessor branches to obtain a set of predecessor branch records.
4. The detection task management method based on a LIMS system according to claim 1, characterized in that, Obtain the set of previous branch constraint tags, including: Retrieve the branch purpose registration data corresponding to the previous branch record set; Based on the branch usage registration data, the set of previous branch records is marked with restrictions to obtain the set of previous branch restriction marks; the set of previous branch restriction marks includes open previous branch records and closed previous branch records.
5. The detection task management method based on a LIMS system according to claim 3, characterized in that, The reverse support suppression map is obtained based on the recorded sequence, including: A branch graph is constructed from the record sequence to obtain the branch graph skeleton; the branch graph skeleton includes a set of nodes and a set of edges. Obtain the task root location information corresponding to the derived detection task; Based on the task root location information, the branch graph skeleton is trimmed to a task-specific branch subgraph. Determine the reverse branch suppression graph based on the task-specific branch subgraph.
6. The detection task management method based on a LIMS system according to claim 5, characterized in that, Constructing the ant colony search edge set includes: Based on the set of previous branch restriction labels, the edge set is processed by edge state labeling to obtain the edge state labeling result; the edge state labeling result includes permitted edges and forbidden edges; Based on the edge state labeling results, determine the set of permissible edges; Obtain the task endpoint definition data corresponding to the derived detection task; Based on the reverse support inhibition diagram and the task endpoint definition data, determine the set of task search starting point nodes and the set of task search endpoint nodes; An ant colony search edge set is constructed based on the set of permitted edges, the set of task search start nodes, and the set of task search end nodes.
7. The detection task management method based on a LIMS system according to claim 1, characterized in that, Determine the target edge, including: Assign initial pheromone values to each edge in the ant colony search edge set to obtain the edge pheromone set; Based on the audit backlink status and parent container identifier availability status of each edge in the ant colony search edge set, a heuristic value is determined for each edge in the ant colony search edge set, resulting in a set of edge heuristic values. Select a starting node from the set of starting nodes for the task search; Based on the set of edge pheromones and the set of edge heuristic values, the permissible edges connected to the starting node are selected to obtain the target edge.
8. The detection task management method based on a LIMS system according to claim 6, characterized in that, The obtained avoidance paths include: Candidate paths are determined based on the target edge and the endpoint nodes in the task search endpoint node set; Based on the candidate paths, generate a set of candidate paths; The optimal path selection process is performed on the candidate path set to obtain the occupancy avoidance path.
9. The detection task management method based on a LIMS system according to claim 1, characterized in that, Manage the workflow of derived detection tasks, including: Based on the record sequence, record matching is performed on the set of path edges of the evasion path to obtain the path edge verification result. The set of previous branch restriction markers is processed by closing branch extraction to obtain a set of closed previous branch records; Based on the set of closed predecessor branch records, the closed branch hit determination is performed on the set of path edges to obtain the closed branch hit result; Based on the edge state labeling results, the forbidden edge hit determination is performed on the path edge set to obtain the forbidden edge hit result; Based on the path edge verification results, closed branch hit results, and forbidden edge hit results, the task processing results are generated. Based on the results of task handling, manage the flow of derived testing tasks.
10. A system for managing detection tasks based on a LIMS system as described in any one of claims 1-9, characterized in that, The system includes: The branch sequence module generates historical branch records based on the audit trail record set of the target sample, sorts the historical branch records, and obtains the record sequence of historical branch records. The restriction marking module, based on the rule configuration data of the LIMS system, filters the record sequence for previous branches to obtain a set of previous branch records, and marks the previous branch record set with restrictions to obtain a set of previous branch restriction marks; The suppression graph construction module obtains the branch graph skeleton based on the record sequence and then trims the branch graph skeleton to obtain the reverse branch suppression graph. The path search module constructs an ant colony search edge set based on the previous branch constraint mark set and the reverse occupation suppression graph. It determines the target edge based on the edge pheromone set and edge heuristic value set determined by the ant colony search edge set, generates a candidate path set based on the target edge, and performs optimal path selection processing on the candidate path set to obtain the occupation avoidance path. The flow control module obtains the path edge verification results corresponding to the branch avoidance path, obtains the closed branch hit results based on the previous branch restriction mark set, and manages the flow of detection tasks for the derived detection tasks according to the path edge verification results and the closed branch hit results.