CN-115295109-B - Medical data tracing method and device, storage medium and terminal equipment
Abstract
The disclosure relates to the technical field of computers, in particular to a medical data tracing method and device, a storage medium and terminal equipment. The medical data tracing method comprises the steps of obtaining a plurality of data table information, constructing a basic directed graph according to table names and characteristic fields in the data table information, wherein the data table information is data table information corresponding to a plurality of data tables to be processed in a target database, performing data manipulation language logic analysis on the target database to determine logic relations among different characteristic fields, connecting different basic directed graphs based on the logic relations, and constructing a target directed graph corresponding to the target database to trace data according to the target directed graph. According to the scheme, the data source can be conveniently and rapidly checked, automatic tracing of the problem data is realized, and the data tracing efficiency is improved.
Inventors
- GUO FENG
- CHU ZHAOWEI
Assignees
- 医渡云(北京)技术有限公司
- 医渡云(北京)技术有限公司
Dates
- Publication Date
- 20260421
- Application Date
- 20220825
- Priority Date
- 20220825
Claims (6)
- 1. A medical data tracing method, comprising: Analyzing the data table information of the data table to be processed to obtain corresponding table names and characteristic fields, establishing a first direction from the table names to the characteristic fields based on the association relation between the table names and the characteristic fields, and establishing a basic directed graph corresponding to the data table to be processed based on the table names, the characteristic fields and the first direction, wherein the table names correspond to at least one characteristic field; Analyzing the data manipulation language to determine the logic relationship among different characteristic fields, and determining a source characteristic field, an association characteristic field and a second direction of the source characteristic field to the association characteristic field according to the logic relationship; connecting different basic directed graphs based on the logic relationship and constructing a target directed graph corresponding to the target database so as to trace data according to the target directed graph; The constructing a target directed graph corresponding to the target database comprises the steps of connecting different characteristic fields to a second direction of an associated characteristic field based on table names and characteristic fields corresponding to each basic directed graph to construct the target directed graph; The step of tracing the data according to the target directed graph comprises the following steps: Acquiring a data tracing task, wherein the data tracing task comprises a target field; Matching the target field with a characteristic field in the target directed graph, and configuring a matching result as a starting node of the target field in the target directed graph; Querying the target directed graph along the reverse direction based on the initial node to determine a source node corresponding to the target field; and determining a tracing path based on the starting node, the source node and an intermediate path between the starting node and the source node.
- 2. The medical data tracing method of claim 1, wherein said method further comprises: acquiring a data analysis task, wherein the data analysis task comprises a table name to be analyzed and/or a field to be analyzed; matching the table names to be analyzed and/or the fields to be analyzed with the target directed graph to determine the positions of the table names to be analyzed and/or the fields to be analyzed in the target directed graph; identifying source nodes corresponding to the fields to be analyzed by utilizing the directed relations among the characteristic fields; And screening the node to be processed based on the source node, and executing preset operation on the node to be processed.
- 3. The medical data tracing method according to claim 2, wherein when determining the location of the table name to be analyzed and/or the field to be analyzed in the target directed graph, the method further comprises: And marking the matching result and the source node in the target directed graph, wherein the node to be processed comprises an unlabeled table name.
- 4. A medical data traceability device, comprising: The basic directed graph construction module is used for acquiring a plurality of data table information, wherein the data table information is data table information corresponding to a plurality of data tables to be processed in the target database; the method comprises the steps of analyzing data table information of a data table to be processed to obtain corresponding table names and characteristic fields, establishing a first direction of the table names to the characteristic fields based on association relations between the table names and the characteristic fields, and constructing a basic directed graph corresponding to the data table to be processed based on the table names, the characteristic fields and the first direction, wherein the table names correspond to at least one characteristic field; The field logic relationship analysis module is used for carrying out data manipulation language logic analysis on the target database to determine logic relationships among different characteristic fields, and comprises the steps of analyzing the data manipulation language to determine the logic relationships among different characteristic fields, determining source characteristic fields, associated characteristic fields and a second direction from the source characteristic fields to the associated characteristic fields according to the logic relationships; the directed graph construction module is used for connecting different basic directed graphs based on the logical relationship and constructing a target directed graph corresponding to the target database so as to trace data according to the target directed graph; The constructing a target directed graph corresponding to the target database comprises the steps of connecting different characteristic fields to a second direction of an associated characteristic field based on table names and characteristic fields corresponding to each basic directed graph to construct the target directed graph; the step of tracing the data according to the target directed graph comprises the following steps: Acquiring a data tracing task, wherein the data tracing task comprises a target field; Matching the target field with a characteristic field in the target directed graph, and configuring a matching result as a starting node of the target field in the target directed graph; Querying the target directed graph along the reverse direction based on the initial node to determine a source node corresponding to the target field; and determining a tracing path based on the starting node, the source node and an intermediate path between the starting node and the source node.
- 5. A storage medium having stored thereon a computer program which when executed by a processor implements the medical data tracing method according to any one of claims 1 to 3.
- 6. A terminal device, comprising: Processor, and A memory for storing executable instructions of the processor; wherein the processor is configured to perform the medical data tracing method of any one of claims 1 to 3 via execution of the executable instructions.
Description
Medical data tracing method and device, storage medium and terminal equipment Technical Field The disclosure relates to the technical field of computers, in particular to a medical data tracing method and device, a storage medium and terminal equipment. Background A Data Lake (Data Lake) generally refers to a repository or system that stores Data in a raw format, which stores the Data as it is, without requiring prior structuring of the Data. One data lake may store structured data, semi-structured data, unstructured data, and binary data. Data warehouse (Data Warehouse) generally refers to a collection of data stores that have a volume, typically stores data from different sources, integrates source data to provide a unified view, and may include transactional systems, application log files, relational databases, and so forth. Because the data is more in sources and managed by different people, the complete upstream and downstream relation corresponding to the data is difficult to find. In practice, when an anomaly or a problem occurs in the produced data, it is often necessary to manually analyze the SQL (Structured Query Language ) to trace the source, which results in a great deal of time, high time cost and high labor cost. It should be noted that the information disclosed in the above background section is only for enhancing understanding of the background of the present disclosure and thus may include information that does not constitute prior art known to those of ordinary skill in the art. Disclosure of Invention The invention aims to provide a medical data tracing method and device, a storage medium and terminal equipment, so that the limitation and the defect of the related technology are overcome at least to a certain extent, the rapid investigation of a data source can be realized, the automatic tracing of problem data is realized, and the data tracing efficiency is improved. Other features and advantages of the present disclosure will be apparent from the following detailed description, or may be learned in part by the practice of the disclosure. According to a first aspect of the present disclosure, there is provided a medical data tracing method, including: acquiring a plurality of data table information, and constructing a basic directed graph according to table names and characteristic fields in the data table information, wherein the data table information is data table information corresponding to a plurality of data tables to be processed in a target database; Performing data manipulation language logic analysis on the target database to determine logic relations among different characteristic fields; And connecting different basic directed graphs based on the logic relationship, and constructing a target directed graph corresponding to the target database so as to trace data according to the target directed graph. In an exemplary embodiment of the disclosure, the constructing a base directed graph according to table names and feature fields in data table information includes: analyzing the data table information of the data table to be processed to obtain a corresponding table name and a characteristic field; establishing a first direction of the table name to the characteristic field based on the association relation between the table name and the characteristic field; And constructing a basic directed graph corresponding to the data table to be processed based on the table name, the characteristic field and the first direction, wherein the table name corresponds to at least one characteristic field. In an exemplary embodiment of the disclosure, the performing a data manipulation language logical parsing of the target database to determine logical relationships between different feature fields includes: and analyzing the data manipulation language to determine the logic relation among different characteristic fields, and determining a source characteristic field, an association characteristic field and a second direction of the source characteristic field to the association characteristic field according to the logic relation. In an exemplary embodiment of the disclosure, the connecting different base directed graphs based on the logical relationship to construct a target directed graph corresponding to the target database includes: And connecting different characteristic fields to a second direction of the associated characteristic field based on the table name and the characteristic field corresponding to each basic directed graph so as to construct the target directed graph. In an exemplary embodiment of the disclosure, the tracing data according to the target directed graph includes: Acquiring a data tracing task, wherein the data tracing task comprises a target field; Matching the target field with a characteristic field in the target directed graph, and configuring a matching result as a starting node of the target field in the target directed graph; Querying the target directed