A data governance method, device and electronic equipment

By collaboratively parsing financial data processing instructions using a syntax parser and a large language model, constructing a field mapping relationship table and adding it to a knowledge graph, the problems of broken lineage and failed rights confirmation in financial data governance are solved, achieving efficient and accurate data governance and security classification.

CN123179443APending Publication Date: 2026-11-27DUXIAOMAN TECH (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611134216.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-29
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing technologies cannot effectively handle complex logic such as encrypted functions, de-identified UDFs, and embedded scripts in financial data governance, resulting in broken lineage relationships, failure to confirm rights, and low accuracy in classification, thus failing to meet regulatory compliance requirements.

Method used

By employing a syntax parser and a large language model working together, data processing instructions are parsed, a field mapping relationship table is constructed, and added to the knowledge graph for hierarchical classification, thereby achieving accurate construction of column-level lineage relationships and confirmation of rights.

Benefits of technology

It improves data governance efficiency, increases the success rate of lineage establishment, achieves refined rights confirmation results and security level classification, has context awareness capabilities, and meets regulatory compliance requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123179443A_ABST
    Figure CN123179443A_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a data management method and device and electronic equipment, relates to the technical field of big data, and is used for accurately constructing the column-level blood relationship, right confirmation and grading of financial data, and improving the efficiency and security of data management. A data processing instruction is received, a syntax parser and a first large language model are used to parse the data processing instruction, and a parsing result is obtained; according to the field transformation relationship, a first field mapping relationship table and a second field mapping relationship table are constructed, and based on the first field mapping relationship table and the second field mapping relationship table, blood information and right confirmation results of each target field contained in the target field group are determined; the blood information and the right confirmation results of each target field are added to a knowledge graph, and based on the knowledge graph, each target field is classified by security level respectively, and a security level label of each target field is obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of big data technology, and in particular to a data governance method, apparatus and electronic device. Background Technology

[0002] Currently, the financial industry (such as banks, internet finance, and consumer credit) processes massive amounts of sensitive data daily. This data undergoes hundreds of extraction-transform-load (ETL) tasks in data warehouses for processing, anonymization, and aggregation, forming complex data lineages. Simultaneously, the financial industry's need for big data governance is increasingly urgent, particularly the precise construction of data lineages, the clear definition of data ownership, and the intelligent classification of data security levels, which have become crucial for meeting regulatory compliance and preventing data breaches.

[0003] In existing technologies, data governance typically relies solely on Abstract Syntax Trees (ASTs) to parse standard Structured Query Language (SQL). Based on the parsing results, a mapping table is established between "source table fields" and "target table fields." Then, based on this mapping table, data ownership is confirmed between the source and target tables. Pre-defined regular expressions, dictionaries, and manual labeling are used to identify and classify the fields.

[0004] However, when encountering encrypted functions, anonymized user-defined functions (UDFs), dynamically concatenated SQL, and embedded scripts prevalent in financial scenarios, the lineage breaks down, leading to failed ownership confirmation and missing hierarchical classification. This fails to meet compliance audit requirements. Furthermore, relying on regular expressions and dictionary hits is ineffective against field name obfuscation, cross-table semantic propagation, and sensitive combination issues, resulting in low hierarchical classification accuracy. In summary, the above methods, with their incomplete lineage resolution, failed ownership confirmation, and coarse hierarchical granularity, may lead to missing data lineage links and inadequate protection of sensitive data, impacting the overall effectiveness of data governance. Summary of the Invention

[0005] This application provides a method, apparatus, and electronic device for constructing and classifying data lineage and rights, which can accurately construct the column-level lineage, rights, and classification of financial data, thereby improving the efficiency and security of data governance.

[0006] In a first aspect, embodiments of this application provide a data governance method, the method comprising: The system receives data processing instructions and uses a syntax parser and the first language model to parse the instructions, obtaining parsing results. These results include: target field group, source field group, and field transformation relationship. The field transformation relationship describes how each target field in the target field group is obtained by processing at least one corresponding source field through a corresponding transformation type. Based on the field transformation relationship, a first field mapping relationship table and a second field mapping relationship table are constructed. Based on the first field mapping relationship table and the second field mapping relationship table, the lineage information and rights confirmation result of each target field contained in the target field group are determined. The first field mapping relationship table is used to describe the contribution weight of each source field to each intermediate field, and the second field mapping relationship table is used to describe the contribution weight of each intermediate field to each target field. The lineage information is used to indicate at least one source field corresponding to the corresponding target field, as well as the corresponding transformation type and contribution weight. The rights confirmation result is used to indicate the merged rights holder information of the corresponding target field. The lineage information and rights confirmation results of each target field are added to the knowledge graph. Based on the knowledge graph, the security level of each target field is classified to obtain the security level label of each target field. The knowledge graph is used to describe the semantic relationship between fields, business concepts, topics, indicators and compliance requirements.

[0007] Secondly, embodiments of this application also provide a data governance apparatus, the apparatus comprising: The parsing module is used to receive data processing instructions and parse the data processing instructions using a syntax parser and the first language model to obtain parsing results. The parsing results include: target field group, source field group, and field transformation relationship. The field transformation relationship is used to describe that each target field contained in the target field group is obtained by processing at least one corresponding source field through the corresponding transformation type. The lineage construction and rights confirmation module is used to construct a first field mapping relationship table and a second field mapping relationship table according to the field transformation relationship, and to determine the lineage information and rights confirmation result of each target field contained in the target field group based on the first field mapping relationship table and the second field mapping relationship table. The first field mapping relationship table is used to describe the contribution weight of each source field to each intermediate field, the second field mapping relationship table is used to describe the contribution weight of each intermediate field to each target field, the lineage information is used to indicate at least one source field corresponding to the corresponding target field, as well as the corresponding transformation type and contribution weight, and the rights confirmation result is used to indicate the merged rights holder information of the corresponding target field. The security level classification module adds the lineage information and rights confirmation results of each target field to the knowledge graph, and classifies the security level of each target field based on the knowledge graph to obtain the security level label of each target field. The knowledge graph is used to describe the semantic relationship between fields, business concepts, topics, indicators and compliance requirements.

[0008] Thirdly, embodiments of this application also provide an electronic device, including: Processor; and Stored program memory, The program includes instructions that, when executed by the processor, cause the processor to perform the data governance method as described in the first aspect.

[0009] Fourthly, embodiments of this application also provide a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to perform the data governance method as described in the first aspect.

[0010] Fifthly, this application provides a computer program product that, when invoked by a computer, causes the computer to perform the data governance method steps as described in the first aspect.

[0011] The beneficial effects of this application are as follows: In the data governance method provided in this application embodiment, a data processing instruction is received, and a syntax parser and a first large language model are used to parse the data processing instruction to obtain the parsing result. Then, according to the field transformation relationship, a first field mapping relationship table and a second field mapping relationship table are constructed. Based on the first field mapping relationship table and the second field mapping relationship table, the lineage information and rights confirmation result of each target field contained in the target field group are determined. Finally, the lineage information and rights confirmation result of each target field are added to the knowledge graph, and based on the knowledge graph, the security level of each target field is classified to obtain the security level label of each target field. In this way, from receiving the data processing instruction to outputting the security level label, the entire process does not require manual intervention, which greatly improves the efficiency of data governance and reduces the operation and maintenance cost of manually sorting out the lineage, confirming rights and classifying each field table by table. Moreover, the syntax parser and the large language model work together to handle complex processing logic such as UDFs, dynamically concatenated SQL, and embedded scripts in addition to standard SQL, which significantly expands the applicable scope of the lineage construction success rate, breaks through the coverage bottleneck of traditional syntax trees, and solves the problem of lineage breakage caused by a large number of custom functions and complex scripts in financial scenarios. Meanwhile, by introducing contribution weights through the mapping relationship table of the first and second fields, the traditional binary correspondence of "present / absent" is upgraded to a quantifiable contribution measure, making the rights confirmation results more refined and traceable. It can accurately reflect the different contribution levels of multiple source fields to the same target field. The lineage information and rights confirmation results are integrated into the knowledge graph, and the knowledge graph is used for hierarchical classification, so that the classification results have context awareness capabilities, overcoming the shortcomings of traditional regular expression schemes that cannot understand field semantics and business context.

[0012] Furthermore, other features and advantages of this application will be set forth in the following description and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description

[0013] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described herein are used to provide a further understanding of this application, constitute a part of this application, and do not constitute an improper limitation of this application. In the accompanying drawings: Figure 1 This is a schematic diagram of an optional system architecture applicable to the embodiments of this application.

[0014] Figure 2 This is a schematic diagram illustrating the implementation process of a data governance method provided in an embodiment of this application.

[0015] Figure 3This is a schematic diagram of the structure of a data governance device provided in an embodiment of this application.

[0016] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0017] Embodiments of this application will now be described in more detail with reference to the accompanying drawings. While some embodiments of this application are shown in the drawings, it should be understood that this application can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this application. It should be understood that the drawings and embodiments of this application are for illustrative purposes only and are not intended to limit the scope of protection of this application.

[0018] It should be understood that the steps described in the method embodiments of this application may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this application is not limited in this respect.

[0019] The term "comprising" and its variations as used herein are open-ended, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the following description. It should be noted that the concepts of "first", "second", etc., mentioned in this application are used only to distinguish different devices, modules, or units, and are not intended to limit the order of functions performed by these devices, modules, or units or their interdependencies.

[0020] It should be noted that the terms "a" and "a plurality of" used in this application are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0021] The names of the messages or information exchanged between multiple devices in the embodiments of this application are for illustrative purposes only and are not intended to limit the scope of these messages or information.

[0022] The following explanations of some terms used in the embodiments of this application are provided to facilitate understanding by those skilled in the art.

[0023] (1) Data governance: The general term for management activities that plan, control, provide and protect data assets within an organization.

[0024] (2) Data ownership confirmation: Determine the ownership of data assets, including the rights holders, users, sharers and other rights holders.

[0025] (3) Column-level lineage: describes the generation, processing and flow relationship between fields, with granularity accurate to the column.

[0026] (5) Column Mapping Table: Each row represents an input field, and each column represents an output field. The values ​​in the table represent the degree of contribution of the input field to the output field (0 means no relation, 1 means complete correspondence, and 0 to 1 means partial contribution).

[0027] (6) Large Language Model (LLM): A generative language model based on the Transformer architecture and pre-trained on a large-scale corpus, used for SQL / UDF semantic understanding, sensitive field identification, and governance suggestion generation.

[0028] (7) Retrieval-Augmented Generation (RAG): A technique that combines vector retrieval with generative models for governing knowledge-based question answering and evaluating agents.

[0029] (8) Knowledge Graph (KG): A structured semantic network of knowledge organized by “entity-relationship-entity” triples, used to store semantic associations between fields, business concepts, topics and compliance requirements.

[0030] Based on the above explanations of terms and related terminology, the design concept of the embodiments of this application will be briefly introduced below: Currently, the financial industry (such as banks, internet finance, and consumer credit) processes massive amounts of sensitive data daily. This data undergoes hundreds of extraction-transform-load (ETL) tasks in data warehouses for processing, desensitization, and aggregation, forming complex data lineages. Meanwhile, at the regulatory level, the *Data Security Law*, the *Personal Information Protection Law*, and financial industry standards such as JR / T 0197-2020 require a clear understanding of "where each field comes from, what transformation it has undergone, who owns it, and what level of sensitivity it belongs to." The need for big data governance in the financial industry is increasingly urgent, especially the precise construction of data lineages, the clear definition of data ownership, and the intelligent classification of data security levels, which have become crucial for meeting regulatory compliance and preventing data leakage risks.

[0031] In existing technologies, data governance typically relies solely on AST parsing of standard SQL. Then, based on the parsing results, a mapping table is established between "source table fields" and "target table fields." Based on this mapping table, data ownership is confirmed between the source and target tables. Pre-defined regular expressions, dictionaries, and manual labeling are used to identify and classify the fields.

[0032] However, when encountering encrypted functions, de-identified UDFs, dynamically concatenated SQL, and embedded scripts prevalent in financial scenarios, the lineage breaks down, leading to failed ownership confirmation and missing hierarchical classification. This fails to meet compliance audit requirements. Furthermore, relying on regular expressions and dictionary hits is ineffective against obfuscated field names (e.g., cust_no, user_x_id, encrypted enc_idno_v2), cross-table semantic propagation, and sensitive combinations (e.g., birth date + address + gender, which can re-identify individuals), resulting in low hierarchical accuracy. In summary, the above methods, with incomplete lineage resolution, failed ownership confirmation, and coarse hierarchical granularity, may lead to missing data lineage links and inadequate protection of sensitive data, impacting the overall effectiveness of data governance.

[0033] In view of this, this application provides a data governance method, which may specifically include: receiving a data processing instruction, and parsing the data processing instruction using a syntax parser and a first language model to obtain a parsing result, wherein the parsing result includes: a target field group, a source field group, and a field transformation relationship, wherein the field transformation relationship describes that each target field contained in the target field group is obtained by processing at least one corresponding source field through a corresponding transformation type; then, based on the field transformation relationship, constructing a first field mapping relationship table and a second field mapping relationship table, and based on the first field mapping relationship table and the second field mapping relationship table, determining the lineage information and ownership result of each target field contained in the target field group, wherein the first... The first field mapping table describes the contribution weight of each source field to each intermediate field, the second field mapping table describes the contribution weight of each intermediate field to each target field, the lineage information indicates at least one source field corresponding to the target field, as well as the corresponding transformation type and contribution weight, and the rights confirmation result indicates the merged rights holder information of the target field. Finally, the lineage information and rights confirmation result of each target field are added to the knowledge graph, and based on the knowledge graph, the security level of each target field is classified to obtain the security level label of each target field. The knowledge graph is used to describe the semantic association between fields, business concepts, topics, indicators, and compliance requirements.

[0034] By adopting the above approach, the entire process, from receiving data processing instructions to outputting security level labels, requires no manual intervention, significantly improving data governance efficiency and reducing the operational costs of manually sorting out lineage, confirming rights and classifications table by table, and classifying data field by field. Furthermore, the syntax parser works in collaboration with the large language model, enabling the handling of complex processing logic beyond standard SQL, such as UDFs, dynamically concatenated SQL, and embedded scripts. This significantly expands the applicability of lineage construction success rates, breaking through the coverage bottleneck of traditional syntax trees and resolving the lineage breakage problem caused by numerous custom functions and complex scripts in financial scenarios. Simultaneously, by introducing contribution weights through the mapping relationship table of the first and second fields, the traditional binary correspondence of "present / absent" is upgraded to a quantifiable contribution metric, making the rights confirmation results more refined and traceable. This accurately reflects the different contribution levels of multiple source fields to the same target field. Integrating lineage information and rights confirmation results into a knowledge graph and using the knowledge graph for classification gives the classification results context-aware capabilities, overcoming the shortcomings of traditional regular expression solutions that cannot understand field semantics and business context. In summary, the system accurately constructs the hierarchical lineage, ownership confirmation, and classification of financial data, thereby improving the efficiency and security of data governance.

[0035] In particular, the preferred embodiments of this application will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit this application. Furthermore, the embodiments of this application and the features in the embodiments can be combined with each other without conflict.

[0036] See Figure 1 As shown, it is a schematic diagram of an optional system architecture applicable to the embodiments of this application. The system architecture may include: intelligent resource hierarchical management subsystem 101, AI-enhanced metadata management subsystem 102, large model-driven data governance unit 103, intelligent data security hierarchical subsystem 104, intelligent governance evaluation agent 105, and data quality and message push subsystem 106.

[0037] The intelligent resource hierarchical management subsystem 101 includes: Single Sign On (SSO) / OAuth 2.0, Multi-Factor Authentication (MFA), Attribute-Based Access Control (ABAC) dynamic authorization, and field-level masking.

[0038] The AI-enhanced metadata management subsystem 102 includes: metadata collector, LLM semantic completion, knowledge graph construction, and graph algorithm analysis.

[0039] The large model-driven data governance unit 103 includes: LLM plus AST dual-engine parsing, field mapping relationship calculation, column-level lineage construction, and governance execution.

[0040] The intelligent data security classification subsystem 104 includes: multi-model integrated recognition, knowledge graph reasoning and propagation, combined sensitivity detection, and human-machine collaborative verification.

[0041] The intelligent governance assessment agent 105 includes: a governance knowledge base, root cause analysis, proactive early warning, and continuous evolution through reinforcement learning from human feedback (RLHF).

[0042] The data quality and message push subsystem 106 includes: LLM quality rule suggestions, concurrent quality checks, and four-level upgrade push.

[0043] The data governance method provided by the exemplary embodiments of this application will be described below in conjunction with the above system architecture and with reference to the accompanying drawings. It should be noted that the above system architecture is only shown to facilitate understanding of the spirit and principles of this application, and the embodiments of this application are not limited in any way in this respect.

[0044] See Figure 2 The diagram shown illustrates the implementation flow of a data governance method provided in this application. The specific implementation flow of this method is as follows: S20: Receive data processing instructions and use a syntax parser and the first language model to parse the data processing instructions and obtain the parsing results.

[0045] The parsing results include: target field group, source field group, and field transformation relationship. The field transformation relationship describes that each target field in the target field group is obtained by processing at least one corresponding source field through a corresponding transformation type. The source field group consists of fields from all source tables in the data processing instruction. Each source field carries attribute information obtained from its metadata management subsystem (attribute information includes, but is not limited to, ownership information, security level label, Personal Financial Information (PFI) label, and basic information). The target field group consists of fields from all target tables in the data processing instruction. The parsing results also include: intermediate field group, which is a temporary field generated from the source field group to the target field group.

[0046] In this embodiment of the application, the data processing instructions are SQL or non-SQL ETL scripts.

[0047] Optionally, in this embodiment of the application, when using a syntax parser and a first large language model to parse data processing instructions, the parsing methods for two instruction types are described below, depending on the instruction type: Scenario 1: When the data processing instruction is SQL, the syntax parser is used to parse the data processing instruction. If the syntax parser parses the data processing instruction successfully and the data processing instruction does not contain user-defined functions, dynamically concatenated SQL, or embedded scripts, the parsing result corresponding to the syntax parser is output. If the syntax parser fails to parse the instruction or the data processing instruction contains at least one of user-defined functions, dynamically concatenated SQL, or embedded scripts, the SQL text, the schema information of upstream and downstream tables, and the available user-defined function source code are input into the first language model, and the parsing result corresponding to the first language model is output.

[0048] The schema information for upstream and downstream tables includes the upstream table schema and the downstream table schema. The upstream table schema refers to the schema of the source table read in the data processing instruction, and the downstream table schema refers to the schema of the target table that the data processing instruction will write to or generate. The parser is either an ANTLR-based parser or a Calcite-based parser; this embodiment does not impose any restrictions on this. User-defined functions and embedded scripts are components within the data processing instruction, used to implement transformation logic that cannot be expressed by the standard structured query language.

[0049] In this embodiment, when the data processing instruction is SQL, a syntax parser is first used to parse the data processing instruction. If the syntax parser parses successfully and the data processing instruction does not contain user-defined functions, dynamically concatenated SQL, or embedded scripts, the parsing result corresponding to the syntax parser is output, and this parsing result is used as the parsing result of the data processing instruction. If the syntax parser fails to parse or the data processing instruction contains at least one of user-defined functions, dynamically concatenated SQL, or embedded scripts, the SQL text, the schema information of upstream and downstream tables, and the available user-defined function source code are input into the first large language model to obtain the parsing result output by the first large language model, and this parsing result is used as the parsing result of the data processing instruction.

[0050] For example, the prompt word input into the first language model is: "You are an SQL column lineage parser. Please output JSON:" The array is defined as follows: `{"output_columns":[{"name":..., "expression":..., "source_columns":[{table,column,role}], "transformation_type":"identity|hash|encrypt|mask|aggregate|case|udf|json_extract"}]}`. Here, `name` represents the name of the target field, `expression` represents the original expression used to generate the target field (e.g., `CONCAT(first_name, last_name)`), `source_columns` is an array listing all source fields used by the target field, with each source field containing its table name and column name, and `transformation_type` indicates the transformation type, specifying the processing performed on the target field (e.g., direct pass, hash, encryption, masking, aggregation, conditional judgment, user-defined function, JSON extraction).

[0051] Scenario 2: When the data processing instruction is a non-SQL ETL script, input the ETL script text, the schema information of the upstream and downstream tables, and the available custom function source code into the first language model to obtain the parsing result output by the first language model.

[0052] In this embodiment of the application, when the data processing instruction is a non-SQL ETL script, the ETL script text, the schema information of the upstream and downstream tables, and the available custom function source code are directly input into the first large language model to obtain the parsing result output by the first large language model, without using a syntax parser.

[0053] In this way, by judging the instruction type and processing branches, it can parse standard SQL, complex SQL, and non-SQL ETL scripts, ensuring that all types of data processing instructions can be correctly parsed. For standard SQL (excluding UDFs, dynamic concatenation, and embedded scripts), the results are directly output by an efficient syntax parser, avoiding unnecessary LLM calls. While ensuring parsing capabilities, it controls computing resources and costs. When the syntax parser cannot handle the problem (parsing failure or containing complex elements), the large language model can complete the parsing with its semantic understanding capabilities, ensuring that the lineage link is not broken due to the limitation of parsing capabilities.

[0054] Furthermore, in this embodiment of the application, after obtaining the parsing result of the first large language model, the parsing result is verified to ensure that the output of the large language model conforms to the predefined field structure requirements, and to avoid downstream processing failure due to incorrect output format. Specifically, the following operations are performed: SA1: Perform JSON Schema validation on the parsed results of the first major language model.

[0055] Among them, JSON Schema validation is used to check whether the parsing result conforms to the predefined field structure requirements.

[0056] SA2: If the verification fails, the data processing instructions will be re-verified using the first language model based on the verification error information until the verification passes or the preset maximum number of retries is reached.

[0057] For example, the maximum number of retries can be 3, but this application embodiment does not impose such a limit.

[0058] In this embodiment of the application, when the data processing instruction is re-verified using the first language model based on the verification error information, the verification error information, the data processing instruction text, the pattern information of the upstream and downstream tables, and the available custom function source code are input into the first language model to obtain the parsing result newly output by the first language model.

[0059] SA3: If the preset retry limit is reached and the validation fails, then each field contained in the upstream table will be used as the source field for each target field in the target field group.

[0060] In this embodiment of the application, if the preset maximum number of retries is reached and the verification fails, then each field contained in the upstream table is used as the source field of each target field in the target field group, and the resolution confidence is marked as low confidence.

[0061] For example, assuming the upstream table contains fields A, B, and C, then fields A, B, and C are used as the source fields for the target field. While not entirely precise, this at least ensures that lineage information is not lost.

[0062] In this way, when the verification fails, it does not give up directly, but feeds back the verification error information to the first language model for self-correction. It can try up to a preset number of times, which significantly improves the success rate of parsing. At the same time, even if it still fails the verification after multiple self-repairs, it will not break the lineage link. Instead, it adopts a conservative strategy to list all possible upstream fields as source fields. Although the accuracy is reduced, the integrity of the lineage information is guaranteed.

[0063] Furthermore, in this embodiment of the application, after obtaining the parsing result that has passed the verification, the parsing result is cached, and the hash (the normalized text of the data processing instruction + UDF version) is used as the key, and the parsing result is used as the value and written into the parsing vector library to avoid repeatedly calling the first major language model and reduce costs.

[0064] The standardized text of data processing instructions involves formatting spaces, capitalization, comments, and other non-logical elements into a single standardized string. This ensures that two logically identical but slightly different data processing instructions can be recognized as the same instruction, thus improving cache hit rate. UDF versions are also important: the same UDF may have different versions with different logic. Recording the UDF version ensures that when a UDF is upgraded, previously cached parsing results become invalid and require re-parsing.

[0065] In this way, when the same data processing instruction appears again, the previously cached parsing result can be retrieved directly from the parsing vector library, avoiding repeated calls to LLM, thereby reducing costs and latency.

[0066] S21: Based on the field transformation relationship, construct the first field mapping relationship table and the second field mapping relationship table, and based on the first field mapping relationship table and the second field mapping relationship table, determine the lineage information and rights confirmation result of each target field contained in the target field group.

[0067] The first field mapping table describes the contribution weight of each source field to each intermediate field, the second field mapping table describes the contribution weight of each intermediate field to each target field, the lineage information indicates at least one source field corresponding to the target field, as well as the corresponding transformation type and contribution weight, and the confirmation result indicates the merged rights holder information of the target field. The merged rights holder information refers to the result of merging the rights holders of all source fields of the target field according to their weights.

[0068] Optionally, in this embodiment of the application, a possible implementation is provided for constructing a first field mapping relationship table and a second field mapping relationship table based on field transformation relationships, specifically by performing the following operations: S210: Based on the change type between each source field in the source field group and each intermediate field in the intermediate field group, determine the contribution weight of each source field to each intermediate field, and obtain the first field mapping relationship table.

[0069] The types of changes include: direct transmission, conditional judgment, hashing, encryption, masking, aggregation, and window functions.

[0070] In this embodiment of the application, the contribution weight of each source field to each intermediate field is determined according to the relationship between the transformation type and the contribution weight, and a first field mapping relationship table is obtained.

[0071] For example, the contribution weight corresponding to direct pass and conditional judgment is the first weight value; the contribution weight corresponding to hashing, encryption, and masking is the second weight value; and the contribution weight corresponding to aggregation and window functions is the third weight value. The first weight value is greater than the second weight value, and the second weight value is greater than the third weight value. Specifically, if the transformation type from a source field to an intermediate field is direct pass or conditional judgment, then the contribution weight of a source field to an intermediate field is the first weight value; if the transformation type from a source field to an intermediate field is hashing, encryption, or masking, then the contribution weight of a source field to an intermediate field is the second weight value; if the transformation type from a source field to an intermediate field is aggregation or window function, then the contribution weight of a source field to an intermediate field is the third weight value; if the transformation type from a source field to an intermediate field is empty (i.e., a source field and an intermediate field are unrelated), then the contribution weight of a source field to an intermediate field is the fourth weight value, and the fourth weight value is less than the third weight value.

[0072] For example: the first weight is 1, the second weight is 0.7, the third weight is 0.5, and the fourth weight is 0.

[0073] In addition, it is worth noting that the first weight value, the second weight value, the third weight value and the fourth weight value in the embodiments of this application can be configured and adjusted according to business needs, so as to flexibly adapt to the risk preferences and compliance requirements of different application scenarios.

[0074] S211: Based on the change type between each intermediate field and each target field contained in the target field group, determine the contribution weight of each intermediate field to each target field, and obtain the second field mapping relationship table.

[0075] In this embodiment of the application, the contribution weight of each intermediate field to each target field is determined according to the relationship between the transformation type and the contribution weight, thus obtaining the second field mapping relationship table.

[0076] In this way, different transformation types correspond to different contribution weights, enabling the field mapping table to accurately reflect the degree to which different processing operations retain field content, thus providing a quantitative basis for subsequent ownership propagation and level decay.

[0077] Optionally, in this embodiment of the application, a possible implementation is provided for determining the lineage information and rights confirmation results of each target field included in the target field group based on the first field mapping relationship table and the second field mapping relationship table, specifically by performing the following operations: S212: Through the mapping relationship table of the first field, the ownership information of each source field is propagated to each intermediate field according to the contribution weight, so as to obtain the ownership information of each intermediate field.

[0078] In this embodiment of the application, the relationship matrix corresponding to the first field mapping relationship table is multiplied by the ownership matrix corresponding to the source field group to obtain the ownership information of each intermediate field.

[0079] In this context, the ownership information of an intermediate field is the result of combining the ownership information of its source fields according to their contribution weights. For example, if an intermediate field has related source fields A1 and A2, with A1's ownership information being Business Department A and A2's ownership information being Risk Department B, and A1's contribution weight to the intermediate field being 0.7 and A2's contribution weight being 0.5, then the ownership information of this intermediate field is: {Business Department A: 0.7, Risk Department B: 0.5}.

[0080] Optionally, in this embodiment, the intermediate field group and its carried ownership information can be represented by an ownership matrix C, where C=B X. Here, B is the ownership matrix corresponding to the source field group, B=[A1,A2,...,An], with a length of K1. Each source field in B carries its ownership information; X is the relation matrix (K1 rows × K2 columns) corresponding to the mapping relation table of the first field. An element X[i][j]=w1 in X, where w1... [0,1], w1 represents the contribution weight of source field i to intermediate field j.

[0081] S213: Through the second field mapping relationship table, the ownership information of each intermediate field is propagated to each target field according to the contribution weight, so as to obtain the lineage information and ownership confirmation results of each target field.

[0082] In this embodiment of the application, the relation matrix corresponding to the second field mapping relation table is multiplied with the ownership matrix corresponding to the intermediate field group to obtain the ownership information of each target field, and based on the ownership information of each target field, the lineage information and ownership confirmation result of each target field are obtained.

[0083] In this context, the ownership information of a target field is the result of merging the ownership information of its source fields according to their contribution weights. For example, if a target field has related intermediate fields B1 and B2, related source fields A1 and A2, and related source fields A3 and A4, and the ownership information of field B1 is {Business Department A: 0.7, Risk Department B: 0.5}, and the ownership information of field B2 is {Business Department A: 0.7, Business Department C: 0.5}, and the contribution weight of field B1 to the target field is 0.5, and the contribution weight of field B2 to the target field is 0.5, then the ownership information of the target field is: {Business Department A: 0.7, Risk Department B: 0.25, Business Department C: 0.25}.

[0084] Optionally, in this embodiment of the application, the target field group and its carried ownership information can be represented by an ownership matrix D, where D=C Y. Where C is the weight matrix corresponding to the intermediate field group, with a length of K2, and each intermediate field in C carries its weight information; Y is the relation matrix (K2 rows × K3 columns) corresponding to the second field mapping table, where an element Y[i][j] = w2, and w2... [0,1], w2 represents the contribution weight of the intermediate field i to the target field j.

[0085] Optionally, in this embodiment of the application, when at least one of the following signals is detected—a change in the structured query language, a change in the version of a custom function, a change in the field mapping relationship, or a change in the rights holder—the change event is added to the breadth-first traversal queue. The field mapping relationship table, lineage information, and rights confirmation results are recalculated sequentially for the affected data processing instructions to achieve incremental recalculation and ensure consistency in rights confirmation across the entire chain.

[0086] S22: Add the lineage information and rights confirmation results of each target field to the knowledge graph, and based on the knowledge graph, classify the security level of each target field to obtain the security level label of each target field.

[0087] The knowledge graph is used to describe the semantic relationships between fields, business concepts, topics, metrics, and compliance requirements. These semantic relationships include: derivation relationships between fields, attribution relationships between fields and business concepts, membership relationships between business concepts and topics, and constraint relationships between topics and compliance requirements. Security level labels characterize the sensitivity of target fields.

[0088] In this embodiment of the application, the lineage information and ownership confirmation results of each target field are added to the knowledge graph for persistent storage. For example, an edge in the knowledge graph points from "a source field" to "a target field", and the edge is marked with "contribution weight" and "transformation type". A "field" node is connected to a "business department" node, and the edge is marked with "owner".

[0089] Optionally, the knowledge graph in this embodiment is constructed using multi-dimensional metadata (including technical metadata, business metadata, operational metadata, and management metadata). Specifically, the metadata auto-collector connects to metadata sources such as HiveMetastore, Iceberg Catalog, Spark Catalog, Kyubi, Linkis, scheduling systems, and Kafka SchemaRegistry, uniformly extracting them as Resource Description Framework (RDF) triples and writing them into the graph database; the business metadata auto-completion module generates business semantics for fields using LLM: inputting "table name + field name + comment + sample value (de-identified hash fingerprint + upstream and downstream SQL summary)," and outputting recommended business names, business definitions, subject domains, and related metrics; the knowledge graph construction module establishes semantic relationships using "fields, business concepts, topics, metrics, and compliance requirements" as five types of nodes.

[0090] In this embodiment of the application, the security level labels include levels 1-5.

[0091] Optionally, in this embodiment of the application, a possible implementation is provided for classifying the security level of each target field based on the knowledge graph to obtain the security level label of each target field. For each target field, the following operations are performed: S220: Perform candidate sampling on a target field to obtain a sample dataset, and perform desensitization processing on the sample dataset to obtain a formatted fingerprint.

[0092] Among them, format fingerprint is used to characterize the format features of the sample dataset.

[0093] In this embodiment of the application, N sample data are extracted from a target field to form a sample dataset, and the sample dataset is anonymized to avoid leaving the original field text, thus obtaining a format fingerprint.

[0094] The desensitization process includes, but is not limited to: retaining length, character class, first 2 characters / last 2 characters, and N can be 200. This application does not impose any restrictions on this.

[0095] In this way, by desensitizing the sample data to generate format fingerprints, the format features of the fields are extracted without exposing the original data, providing objective data basis for regular expression verification, small model classification and LLM discrimination, while taking into account both privacy protection and hierarchical accuracy.

[0096] S221: Using a multi-model integrated identification method, based on the multi-dimensional feature information of a target field contained in the format fingerprint and knowledge graph, the initial security level of a target field is determined.

[0097] The multidimensional feature information includes: field name, field annotation, business concept, and attribute information of the source field. The attribute information of the source field includes its security level label, PFI label, and its contribution weight to the target field. The multi-model integrated recognition method includes: initial screening using regular expressions and keyword dictionaries (used to identify fields with fixed formats), classification based on small models (small models are fast text or convolutional neural network models) based on field names, and contextual discrimination using large language models (used to make judgments by integrating multiple contextual information).

[0098] In this embodiment, a multi-model integrated recognition method is adopted. Based on the multi-dimensional feature information of a target field contained in the format fingerprint and knowledge graph, when determining the initial security level of a target field, regular expressions and keyword dictionaries are used for initial screening, and small model classification based on field name is used for parallel determination. When the results of the two are consistent and the confidence level is higher than the confidence threshold, the initial security level output by the two is used as the initial security level of a target field. When the results of the two are inconsistent or the confidence level is not higher than the confidence threshold, a third language model is used to determine the initial security level of a target field.

[0099] Optionally, when using a third language model to determine the initial security level of a target field, the multidimensional feature information and format fingerprint of the target field are output to the third language model to obtain the initial security level of the target field output by the third language model. The third language model and the first language model can be the same model or different models; this embodiment does not impose any restrictions on this.

[0100] Optionally, in this embodiment, while determining the security level label of a target field, a multi-model integrated identification method can also be used to determine the PFI of a target field and obtain the PFI label of the target field. For example: using regular expressions and keyword dictionaries for initial screening, if the format fingerprint of the target field matches the format of ID card number, bank card number, mobile phone number, etc., then the PFI label is True; using a small model based on field name, if the field name of the target field is ID card type, then the PFI label is True; using a large language model context discrimination, the multi-dimensional feature information and format fingerprint of a target field are output to a third large language model to obtain the PFI label of the target field output by the third large language model.

[0101] By inputting field names, comments, business concepts, upstream tags, and format fingerprints into the LLM, a standard-compliant five-level hierarchical structure and automatic PFI recognition are achieved.

[0102] S222: Based on the security level label and transformation type of the source field of a target field stored in the knowledge graph, adjust the initial security level to obtain an intermediate security level for the target field.

[0103] In this embodiment of the application, based on the propagation rules, the propagation adjustment level is calculated according to the security level label and transformation type of the source field of a target field stored in the knowledge graph. Then, the lower of the initial security level and the propagation adjustment level is determined as the intermediate security level of the target field.

[0104] For example, the propagation rules can be as follows: If a target field has a source field with a security level label of level four, a PFI label of True, and a transformation type from the source field to the target field that is hash or encryption, then the propagation adjustment level of the target field is level three; if a target field has a source field with a security level label of level four, a PFI label of True, and a transformation type from the source field to the target field that is aggregation, then the propagation adjustment level of the target field is level two; if a target field has a source field with a security level label of level four, a PFI label of True, and a transformation type from the source field to the target field that is masking, and the masked data satisfies the k-anonymization condition, then the propagation adjustment level of the target field is level one. Here, the k-anonymization condition means that the number of records contained in each equivalence class after masking is greater than or equal to a preset threshold (e.g., the preset threshold is 10).

[0105] In this way, the propagation adjustment is carried out based on the security level label and transformation type of the source field in the blood relationship, so that the classification result can perceive the processing history and context of the field, which reflects the refined governance concept that "the same field has different sensitivities at different processing stages".

[0106] S223: Search the knowledge graph to identify other fields that belong to the same topic as a target field. When there is a combination field among the other fields that forms a quasi-identifier that can re-identify an individual with a target field, the intermediate security level of the target field is increased to obtain a security level label for the target field.

[0107] In this embodiment of the application, the knowledge graph is retrieved to determine other fields that belong to the same topic as a target field. When there is a combination field among the other fields that forms a quasi-identifier that can re-identify an individual with a target field, the intermediate security level of the target field is increased by one level to obtain the security level label of the target field. The security level of the combination field is also increased by one level to obtain the security level label of the combination field.

[0108] For example, assuming the target field is a birthday field, and other fields in the same topic include a gender field, an address field, and a zip code field, then the gender field, address field, and zip code field are used as combined fields. The intermediate security level of the target field is increased by one level to obtain a security level label for the target field, and the security level of the combined field is increased by one level to obtain a security level label for the combined field.

[0109] In this way, by searching other fields under the same topic, it detects whether there are combinations of quasi-identifiers that can re-identify individuals, and then upgrades the relevant fields. This effectively prevents the hidden risk that a single field may not be sensitive, but when combined, it can identify an individual, thus improving the comprehensiveness of financial data protection. Overall, from the initial security level determination to the propagation adjustment and then to the combination sensitivity upgrade, each level is optimized and corrected based on the previous level, forming a progressive and precise classification process that significantly improves the accuracy of security level classification.

[0110] Additionally, it is worth noting that in this embodiment, if the security level confidence of a target field (e.g., the confidence of regular expression determination, the confidence of the small model, and the confidence of the large language model) is lower than the preset security level confidence threshold (e.g., 0.85), a work order is generated based on the security level determination result and related information corresponding to the target field and pushed to the data administrator so that the data administrator can determine the security level label of the target field and use the target field and the final security level label as new training samples to perform backflow training on the small model and LLM.

[0111] Optionally, in this embodiment of the application, a multi-factor dynamic authorization strategy with "security level tags containing data" is introduced on the basis of the traditional two-dimensional static authorization of "role-directory". The multi-factor dynamic authorization strategy includes: permission management module.

[0112] In this embodiment of the application, the permission management module associates the security level labels of each field with the attribute-based access control policy. When the access policy result corresponding to the target access task is allowed and the security level label of the accessed field meets the preset high sensitivity condition, the target access task is subject to secondary review and field-level blocking.

[0113] The access decision function of the attribute-based access control policy takes user attributes, resource attributes, environment attributes, and operation type as inputs. Resource attributes include security level labels for each field, and environment attributes include, but are not limited to, IP, time, and device identifier. Secondary review refers to sending the target access task to the current user's superior or data administrator, allowing the superior or data administrator to reconfirm the access policy result corresponding to the target access task. Field-level masking is used to hide part of the content of sensitive fields (i.e., fields whose security level labels meet preset high sensitivity conditions).

[0114] In this way, attribute-based access control policies comprehensively consider user attributes, resource attributes (including security level labels), environmental attributes, and operation types. This makes authorization decisions no longer static role-directory matching, but can be dynamically adjusted according to data sensitivity and access context. This effectively prevents over-authorization. When accessing highly sensitive data, even if the basic access policy result is allowed, secondary review and field-level masking will be triggered, providing additional security for sensitive data and preventing data leakage caused by account theft or misconfiguration of permissions. At the same time, field-level masking can hide only sensitive content while maintaining the integrity of the data structure, which satisfies business query needs while protecting sensitive information, achieving a balance between security and availability.

[0115] Optionally, in this embodiment, the multi-factor dynamic authorization strategy further includes: a personnel organization management module, an identity verification module, and a resource allocation module. The personnel organization management module interfaces with the Lightweight Directory Access Protocol (LDAP) through unified identity authentication (SSO / OAuth2.0) to establish multi-dimensional attributes of users, roles, departments, and positions; the identity verification module interfaces with multi-factor authentication (SMS, time-based one-time password, facial recognition) and trusted terminal authentication, and all access behaviors are written into the audit stream; the resource allocation module generates dynamic tokens based on the above access control strategy and performs field-level masking.

[0116] Optionally, in this embodiment of the application, to avoid the need for governance personnel to manually search for problems among multiple reports, which results in low processing efficiency and difficulty in forming a true long-term closed loop, an intelligent governance assessment is provided. The specific execution steps are as follows: SB1: In response to a governance event, obtain the event feature vector of the governance event.

[0117] In this embodiment of the application, when a quality alarm event, a sensitive field unauthorized access event, a lineage break event, or a rights change event is detected, a governance event is triggered, and the event feature vector of the governance event is obtained.

[0118] Among them, quality alarm events are events triggered by quality inspection tasks. For example, suppose the quality rule is that the amount field is non-negative and has less than 3 decimal places, but the corresponding data in the amount field has more than 3 decimal places, then a quality alarm event will be triggered.

[0119] SB2: Based on event feature vectors, retrieve relevant context from the knowledge graph and governance knowledge base.

[0120] The context includes: governance requirements, historical governance events, and upstream and downstream information. Governance requirements refer to the relevant regulations or requirements related to the governance event, while upstream and downstream information refers to the information related to the governance event in the knowledge graph.

[0121] In this embodiment, data governance regulations, regulatory requirements (such as the Data Security Law, the Personal Information Protection Law, the Credit Reporting Industry Management Regulations, JR / T 0197, JR / T 0223, etc.), historical governance event sets, and standard operating procedure documents are sliced ​​and converted into vectors. The resulting vectors are then stored in the governance knowledge base. Based on the event feature vectors, RAG is used to search in the knowledge graph and the governance knowledge base to obtain the context related to the event feature vectors.

[0122] SB3: Input the context into the second language model to obtain the diagnostic report output by the second language model.

[0123] The diagnostic report includes root cause analysis and treatment recommendations, as well as the scope of impact, violated requirements, and governance priorities. The second language model can be the same as the first language model, or it can be a different model; this embodiment does not impose any restrictions on this.

[0124] For example, the diagnostic report output by the second language model is: {"root_cause":..., "impact_radius":..., "recommended_actions":[...], "compliance_refs":[...], "priority":"P0|P1|P2"}. Here, root_cause represents the root cause; impact_radius represents the scope of impact; recommended_actions represents action suggestions; compliance_refs represents the violated requirements; and priority represents the governance priority, with P0 being the highest (requiring immediate action), followed by P1, and P2 the lowest.

[0125] Furthermore, in this embodiment, the governance event will be handled with a handling suggestion and then fed back to the data administrator. The "governance event - handling suggestion - execution result - data administrator feedback" will be written back to the governance knowledge base as a historical governance event to form the RLHF dataset, and the second largest language model will be fine-tuned for preferences periodically.

[0126] The methods for providing feedback to data administrators include at least one of the following: instant messaging, email, SMS, and outbound telephone calls.

[0127] Optionally, in this embodiment of the application, in order to achieve proactive early warning, anomaly prediction of key indicators can be made based on a time series model, and the prediction results can be semantically interpreted and pushed to the data administrator through a second language model. This allows for early intervention in nighttime batch anomalies within a pre-set time period, avoiding the lag problem in dealing with sudden quality anomalies in nighttime batch tasks.

[0128] In this way, by obtaining the lineage, scope of impact, and ownership information of an event through the knowledge graph, and combining it with historical governance events and regulatory requirements in the governance knowledge base, the large language model can automatically generate accurate diagnostic reports based on the complete context. This replaces the inefficient mode of manually flipping through reports and searching for regulations. The entire process from event triggering to outputting the diagnostic report is automated, and governance personnel do not need to manually search for problems, which significantly improves the timeliness of governance. It is especially suitable for handling anomalies in batch tasks at night.

[0129] Furthermore, based on the same technical concept, embodiments of this application provide a data governance apparatus for implementing the above-described method flow of embodiments of this application. For example, see [link to relevant documentation]. Figure 3 As shown, the data governance device 300 may include: a parsing module 301, a lineage construction and rights confirmation module 302, a security level classification module 303, a rights management module 304, and a governance evaluation module 305.

[0130] The parsing module 301 is used to receive data processing instructions and use a syntax parser and the first language model to parse the data processing instructions to obtain parsing results. The parsing results include: target field group, source field group and field transformation relationship. The field transformation relationship is used to describe that each target field contained in the target field group is obtained by processing at least one corresponding source field through the corresponding transformation type. The lineage construction and rights confirmation module 302 is used to construct a first field mapping relationship table and a second field mapping relationship table according to the field transformation relationship, and to determine the lineage information and rights confirmation result of each target field contained in the target field group based on the first field mapping relationship table and the second field mapping relationship table. The first field mapping relationship table is used to describe the contribution weight of each source field to each intermediate field, the second field mapping relationship table is used to describe the contribution weight of each intermediate field to each target field, the lineage information is used to indicate at least one source field corresponding to the corresponding target field, as well as the corresponding transformation type and contribution weight, and the rights confirmation result is used to indicate the merged rights holder information of the corresponding target field. The security level classification module 303 adds the lineage information and rights confirmation results of each target field to the knowledge graph, and classifies the security level of each target field based on the knowledge graph to obtain the security level label of each target field. The knowledge graph is used to describe the semantic relationship between fields, business concepts, topics, indicators and compliance requirements.

[0131] In an optional embodiment, when the data processing instructions are parsed using a syntax parser and a first large language model, and the parsing module 301 obtains the parsing result, it is further configured to: When the data processing instruction is SQL, a syntax parser is used to parse the data processing instruction; If the parser parses successfully and the data processing instructions do not contain user-defined functions, dynamically concatenated SQL, or embedded scripts, then output the parsing result corresponding to the parser. If the parser fails to resolve the data or the data processing instructions contain at least one of user-defined functions, dynamically concatenated SQL, or embedded scripts, then the SQL text, the schema information of the upstream and downstream tables, and the available source code of the user-defined functions are input into the first language model, and the parsing result output by the first language model is output. When the data processing instruction is a non-SQL ETL script, the ETL script text, the schema information of the upstream and downstream tables, and the available custom function source code are input into the first language model to obtain the parsing result output by the first language model.

[0132] In an optional embodiment, after obtaining the parsing result output by the first large language model, the parsing module 301 is further configured to: Perform JSON Schema validation on the parsing results output by the first major language model; If the verification fails, the data processing instructions will be re-verified using the first language model based on the verification error information until the verification passes or the preset maximum number of retries is reached. If the preset retry limit is reached and the validation fails, then each field contained in the upstream table will be used as the source field for each target field in the target field group.

[0133] In an optional embodiment, when constructing the first field mapping relationship table and the second field mapping relationship table according to the field transformation relationship, the lineage construction and rights confirmation module 302 is further used for: Based on the type of change between each source field in the source field group and each intermediate field in the intermediate field group, determine the contribution weight of each source field to each intermediate field, and obtain the first field mapping relationship table; Based on the type of change between each intermediate field and each target field contained in the target field group, the contribution weight of each intermediate field to each target field is determined, resulting in the second field mapping table.

[0134] In an optional embodiment, when determining the lineage information and rights confirmation results of each target field included in the target field group based on the first field mapping table and the second field mapping table, the lineage construction and rights confirmation module 302 is further configured to: By mapping the first field to the relationship table, the ownership information of each source field is propagated to each intermediate field according to the contribution weight, so as to obtain the ownership information of each intermediate field. By using the second field mapping relationship table, the ownership information of each intermediate field is propagated to each target field according to the contribution weight, so as to obtain the lineage information and ownership confirmation results of each target field.

[0135] In an optional embodiment, when performing security level classification on each target field based on the knowledge graph to obtain the security level label for each target field, the security level classification module 303 is further used to: For each target field, perform the following operations: Candidate sampling is performed on a target field to obtain a sample dataset, and the sample dataset is de-identified to obtain a format fingerprint, which is used to characterize the format features of the sample dataset. A multi-model integrated identification approach is adopted, which determines the initial security level of a target field based on the multi-dimensional feature information of a target field contained in the format fingerprint and knowledge graph. The multi-dimensional feature information includes: field name, field annotation, business concept, and attribute information of the source field. Based on the security level label and transformation type of the source field of a target field stored in the knowledge graph, the initial security level is adjusted to obtain an intermediate security level of the target field. Search the knowledge graph to identify other fields that belong to the same topic as a target field. When there is a combination field among the other fields that forms a quasi-identifier that can re-identify an individual with the target field, the intermediate security level of the target field is increased to obtain the security level label of the target field.

[0136] In an optional embodiment, the permission management module 304 is used to: The security level labels of each field are associated with the attribute-based access control policy. The access decision function of the attribute-based access control policy takes user attributes, resource attributes, environment attributes and operation type as inputs, where resource attributes include the security level labels of each field. When the access policy result corresponding to the target access task is "access allowed" and the security level label of the accessed field meets the preset high sensitivity conditions, the target access task is subject to secondary review and field-level blocking.

[0137] In an optional embodiment, the governance assessment module 305 is used to: In response to a governance event, obtain the event feature vector of the governance event; Based on event feature vectors, searches are performed in knowledge graphs and governance knowledge bases to obtain context related to event feature vectors. The context includes: governance requirements, historical governance events, and upstream and downstream information. The context is input into the second language model to obtain a diagnostic report output by the second language model. The diagnostic report includes: root cause analysis and treatment recommendations.

[0138] Based on the description of the method and apparatus embodiments above, an exemplary embodiment of the present invention also provides an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor. The memory stores a computer program executable by the at least one processor, which, when executed by the at least one processor, causes the electronic device to perform the method according to an embodiment of the present invention.

[0139] This application also provides a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a computer's processor, is used to cause the computer to perform a method according to an embodiment of this application.

[0140] This application also provides a computer program product, including a computer program, wherein the computer program, when executed by a computer's processor, is used to cause the computer to perform a method according to an embodiment of this application.

[0141] See Figure 4 The diagram shown below illustrates the structure of an electronic device 400 that can serve as a server or client in this application, and is an example of a hardware device that can be applied to various aspects of this application. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the application described and / or claimed herein.

[0142] like Figure 4As shown, the electronic device 400 includes a computing unit 401, which can perform various appropriate actions and processes based on a computer program stored in a read-only memory (ROM) 402 or a computer program loaded from a storage unit 408 into a random access memory (RAM) 403. The RAM 403 may also store various programs and data required for the operation of the device 400. The computing unit 401, ROM 402, and RAM 403 are interconnected via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0143] Multiple components in electronic device 400 are connected to I / O interface 405, including: input unit 406, output unit 407, storage unit 408, and communication unit 409. Input unit 406 can be any type of device capable of inputting information to electronic device 400. Input unit 406 can receive input digital or character information and generate key signal inputs related to user settings and / or function control of electronic device. Output unit 407 can be any type of device capable of presenting information and may include, but is not limited to, a display, speaker, video / audio output terminal, vibrator, and / or printer. Storage unit 408 may include, but is not limited to, disks and optical discs. Communication unit 409 allows electronic device 400 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers and / or chipsets, such as Bluetooth devices, WiFi devices, worldwide interoperability for microwave access (WiMax) devices, cellular communication devices, and / or the like.

[0144] The computing unit 401 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 401 performs the various methods and processes described above. For example, in some embodiments, the above-described data governance methods can be implemented as computer software programs tangibly contained in a machine-readable medium, such as storage unit 408. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 400 via ROM 402 and / or communication unit 409. In some embodiments, the computing unit 401 can be configured to perform the above-described data governance methods by any other suitable means (e.g., by means of firmware).

[0145] The program code used to implement the methods of this application may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0146] In the context of this application, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, RAM, ROM, erasable programmable read-only memory (EPROM) or flash memory, optical fibers, compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0147] As used in this application, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or apparatus (e.g., disk, optical disk, memory, programmable logic device, PLD) used to provide machine instructions and / or data to a programmable processor, including machine-readable media that receive machine instructions as machine-readable signals. The term "machine-readable signal" refers to any signal used to provide machine instructions and / or data to a programmable processor.

[0148] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a cathode ray tube (CRT) or liquid crystal display (LCD) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0149] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0150] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other.

[0151] Furthermore, it should be understood that the above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of the invention. Therefore, any equivalent variations made in accordance with the claims of this invention are still within the scope of this application.

Claims

1. A data governance method, characterized in that, include: The system receives data processing instructions and uses a syntax parser and a first language model to parse the data processing instructions to obtain parsing results. The parsing results include: target field group, source field group, and field transformation relationship. The field transformation relationship is used to describe that each target field contained in the target field group is obtained by processing at least one corresponding source field through a corresponding transformation type. Based on the field transformation relationship, a first field mapping relationship table and a second field mapping relationship table are constructed. Based on the first field mapping relationship table and the second field mapping relationship table, the lineage information and rights confirmation result of each target field contained in the target field group are determined. The first field mapping relationship table is used to describe the contribution weight of each source field to each intermediate field, and the second field mapping relationship table is used to describe the contribution weight of each intermediate field to each target field. The lineage information is used to indicate at least one source field corresponding to the corresponding target field, as well as the corresponding transformation type and contribution weight. The rights confirmation result is used to indicate the merged rights holder information of the corresponding target field. The lineage information and rights confirmation results of each target field are added to the knowledge graph, and based on the knowledge graph, the security level of each target field is classified to obtain the security level label of each target field. The knowledge graph is used to describe the semantic relationship between fields, business concepts, topics, indicators and compliance requirements.

2. The method as described in claim 1, characterized in that, The process of parsing the data processing instructions using a syntax parser and a first-largest language model to obtain the parsing results includes: When the data processing instruction is SQL, the syntax parser is used to parse the data processing instruction; If the syntax parser parses successfully and the data processing instruction does not contain user-defined functions, dynamically concatenated SQL, or embedded scripts, then the parsing result corresponding to the syntax parser is output. If the parser fails to resolve the data or the data processing instruction contains at least one of user-defined functions, dynamically concatenated SQL, or embedded scripts, then the SQL text, the pattern information of upstream and downstream tables, and the available source code of user-defined functions are input into the first large language model, and the parsing result output by the first large language model is output. When the data processing instruction is a non-SQL ETL script, the ETL script text, the schema information of the upstream and downstream tables, and the available custom function source code are input into the first large language model to obtain the parsing result output by the first large language model.

3. The method as described in claim 2, characterized in that, After obtaining the parsing result output by the first large language model, the process also includes: Perform JSON Schema validation on the parsing results output by the first large language model; If the verification fails, the data processing instructions will be re-verified using the first language model based on the verification error information until the verification passes or the preset maximum number of retries is reached. If the preset maximum number of retries is reached and the verification fails, then each field contained in the upstream table will be used as the source field for each target field in the target field group.

4. The method as described in claim 1, characterized in that, The step of constructing a first field mapping table and a second field mapping table based on the field transformation relationship includes: Based on the change type between each source field in the source field group and each intermediate field in the intermediate field group, the contribution weight of each source field to each intermediate field is determined, and the first field mapping relationship table is obtained. Based on the type of change between each intermediate field and each target field contained in the target field group, the contribution weight of each intermediate field to each target field is determined, and the second field mapping relationship table is obtained.

5. The method as described in claim 1, characterized in that, The process of determining the lineage information and ownership confirmation result for each target field in the target field group based on the first field mapping table and the second field mapping table includes: By using the first field mapping relationship table, the ownership information of each source field is propagated to each intermediate field according to the contribution weight, so as to obtain the ownership information of each intermediate field; By using the second field mapping table, the ownership information of each intermediate field is propagated to each target field according to the contribution weight, so as to obtain the lineage information and ownership confirmation result of each target field.

6. The method as described in claim 1, characterized in that, Based on the knowledge graph, each target field is classified into security levels to obtain a security level label for each target field, including: For each target field, perform the following operations: Candidate sampling is performed on a target field to obtain a sample dataset, and the sample dataset is de-identified to obtain a format fingerprint, which is used to characterize the format features of the sample dataset; A multi-model integrated identification approach is adopted. Based on the format fingerprint and the multi-dimensional feature information of the target field contained in the knowledge graph, the initial security level of the target field is determined. The multi-dimensional feature information includes: field name, field annotation, business concept, and attribute information of the source field. Based on the security level label and transformation type of the source field of the target field stored in the knowledge graph, the initial security level is adjusted to obtain the intermediate security level of the target field; The knowledge graph is searched to identify other fields that belong to the same topic as the target field. When there is a combination field among the other fields that forms a quasi-identifier that can re-identify an individual with the target field, the intermediate security level of the target field is increased to obtain the security level label of the target field.

7. The method as described in claim 1, characterized in that, After classifying each target field based on the knowledge graph to obtain a security level label for each target field, the process further includes: The security level labels of each field are associated with an attribute-based access control policy. The access decision function of the attribute-based access control policy takes user attributes, resource attributes, environment attributes, and operation type as inputs, wherein the resource attributes include the security level labels of each field. When the access policy result corresponding to the target access task is "access allowed" and the security level label of the accessed field meets the preset high sensitivity condition, the target access task is subject to secondary review and field-level blocking.

8. The method as described in claim 1, characterized in that, The method further includes: In response to a governance event being triggered, the event feature vector of the governance event is obtained; Based on the event feature vector, a search is performed in the knowledge graph and governance knowledge base to obtain the context related to the event feature vector. The context includes: governance requirements, historical governance events, and upstream and downstream information. The context is input into the second language model to obtain a diagnostic report output by the second language model. The diagnostic report includes: root cause analysis and treatment recommendations.

9. A data governance device, characterized in that, include: The parsing module is used to receive data processing instructions and parse the data processing instructions using a syntax parser and the first language model to obtain parsing results. The parsing results include: target field group, source field group, and field transformation relationship. The field transformation relationship is used to describe that each target field contained in the target field group is obtained by processing at least one corresponding source field through a corresponding transformation type. The lineage construction and rights confirmation module is used to construct a first field mapping relationship table and a second field mapping relationship table according to the field transformation relationship, and to determine the lineage information and rights confirmation result of each target field contained in the target field group based on the first field mapping relationship table and the second field mapping relationship table. The first field mapping relationship table is used to describe the contribution weight of each source field to each intermediate field, the second field mapping relationship table is used to describe the contribution weight of each intermediate field to each target field, the lineage information is used to indicate at least one source field corresponding to the corresponding target field, as well as the corresponding transformation type and contribution weight, and the rights confirmation result is used to indicate the merged rights holder information of the corresponding target field. The security level classification module adds the lineage information and rights confirmation results of each target field to the knowledge graph, and classifies the security level of each target field based on the knowledge graph to obtain the security level label of each target field. The knowledge graph is used to describe the semantic relationship between fields, business concepts, topics, indicators, and compliance requirements.

10. An electronic device, characterized in that, include: processor; as well as Stored program memory, The program includes instructions that, when executed by the processor, cause the processor to perform the method as described in any one of claims 1-8.