A method for de-identifying and protecting data assets

By parsing SQL query statements and constructing a correlation graph, desensitization parameter constraints are generated, solving the problem of lost correlation in desensitization results in financial audit queries, and achieving efficient desensitization while maintaining mathematical dependencies.

CN123116345APending Publication Date: 2026-11-17HUAJUN TECHNOLOGY (CHONGQING) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202611636362.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-22
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

In financial audit query scenarios, existing technologies struggle to identify database query risks, determine desensitization parameters by utilizing the mathematical dependencies between fields involved in the query, and maintain the consistency of the desensitization results.

Method used

By parsing the SQL query statement, the set of fields involved in the query, the number of nesting levels, and the number of related tables are determined. Combined with field sensitivity scores, business weights, and result set information entropy, the query risk value is calculated. Mathematical dependencies are extracted from database metadata and a reconciliation rule base to construct a reconciliation graph, generate desensitization parameter constraints, perform isomorphic desensitization, and verify the relationships.

Benefits of technology

This effectively reduces the risk of losing the coherence of the anonymized results, ensures that the anonymized results can be used for subsequent audit verification, and maintains the mathematical dependency structure of the query results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123116345A_ABST
    Figure CN123116345A_ABST
Patent Text Reader

Abstract

This invention discloses a data asset de-identification security protection method, belonging to the field of data security protection technology. The system parses database access requests, determines query risks by combining field sensitivity, business weight, query structure, result set information entropy, and execution frequency; for high-risk queries, it extracts the mathematical dependencies between fields, constructs a cross-reference graph and cross-reference chain, and generates de-identification parameter constraints accordingly. The system performs isomorphic de-identification within the parameter range that satisfies the constraints, and returns the results after relationship verification. This invention helps reduce the damage to data cross-reference relationships caused by de-identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of data security protection technology, specifically relating to a data asset de-identification security protection method. Background Technology

[0002] During data asset auditing, auditors typically need to retrieve financial data from multiple tables and fields through database queries, and then analyze and verify the consistency of the query results. This data may contain undisclosed operating data, transaction details, and other sensitive information. Therefore, the system needs to provide auditors with data that meets the requirements of audit analysis while controlling the risk of data leakage.

[0003] Existing technologies have evolved from static access control to dynamic data processing methods that combine SQL parsing, field identification, and desensitization strategies. Chinese patent CN116305240A discloses a scalable dynamic data desensitization system and method. This system extracts SQL query statements or results through a protocol module, performs lexical and syntactic analysis on the SQL to obtain database, table, and field information, and then rewrites the SQL or result set according to sensitivity identification rules. Furthermore, Chinese patent CN112182250A discloses a method for constructing a knowledge graph of interrelationships and a method for verifying financial statements. This method extracts account data from financial statements, trains regression models between accounts, and stores models that meet error conditions as interrelationship formulas to construct a knowledge graph of interrelationships for financial statement verification. US patent US20120023586A1 discloses a method for determining privacy risks in database queries. This method determines and reports privacy risks related to database queries based on information such as the attributes involved in the query, data sensitivity, the data range involved in the query results, and the visitor or query scenario.

[0004] However, in financial audit query scenarios, if only a single sensitive field is selected for masking, the masked field values ​​may no longer satisfy the original cross-field or cross-table mathematical relationships, rendering the query results unusable for subsequent cross-verification. Furthermore, if query risk assessment does not comprehensively consider the sensitivity of the fields involved in the query, the query structure, result set characteristics, and historical execution data, it may be difficult to accurately identify queries requiring special protection. If the masked parameters and verification results generated after query execution are not correlated with the audit task and the multiple SQL queries within that task, it will be difficult to determine the relationship between the feedback and the specific query strategy when the system receives task-level audit feedback.

[0005] Therefore, existing technologies still have problems: how to determine the de-identification parameters by utilizing the mathematical dependencies between fields involved in the query after identifying database query risks, and how to verify whether the de-identification results maintain the corresponding relationships. Summary of the Invention

[0006] This invention provides a data asset desensitization security protection method, which realizes the desensitization processing of high-risk query data and the preservation of the correlation relationship in the desensitization result, so as to solve the problem that field-level desensitization in the prior art may destroy the correlation relationship of financial data.

[0007] The technical solution adopted in this invention is as follows: A data asset de-identification security protection method, executed by a data security protection system, includes: Receive a database access request, which includes an SQL query statement, visitor permission information, and audit task identifier; Parse the SQL query statement to obtain the set of fields involved in the SQL query statement, the number of nesting levels, and the number of related tables; obtain the sensitivity score and corresponding business weight of each field from the database metadata based on the set of fields; estimate the information entropy of the result set of the SQL query statement based on database statistics or sample query results; and determine the query execution frequency within a preset time window based on historical query records. The query risk value is determined based on the sensitivity score, the business weight, the number of nesting levels, the number of related tables, the result set information entropy, and the query execution frequency. The risk threshold is determined based on the visitor permission information. High-risk queries are determined based on the comparison between the query risk value and the risk threshold. Extract the mathematical dependencies between fields involved in the high-risk query from the database metadata and the cross-reference rule base, construct the cross-reference graph, and determine at least one cross-reference chain and the dependency type of the cross-reference chain based on the cross-reference graph; For the aforementioned chain of connections, desensitization parameter constraints are generated based on the dependency relationship type, and desensitization parameters are determined within the parameter range that satisfies the desensitization parameter constraints. The query results of the high-risk query are subjected to isomorphic desensitization according to the desensitization parameters to obtain the desensitized result; the relationship between the desensitized result and the cross-link is verified, and the desensitized result is returned to the client when the verification passes.

[0008] The determination of the query risk value includes: Based on the sensitivity score of each field and its corresponding business weight, calculate the field sensitivity weighted value of the field set; The query depth is determined based on the nesting level and the number of associated tables, according to the preset weighting of the associated tables. The degree of information dispersion of the result set is determined based on the information entropy of the result set. The basic risk value is determined based on the field sensitivity weighting value, the query depth, and the information dispersion degree, and the basic risk value is adjusted according to the query execution frequency to obtain the query risk value; Specifically, when the field sensitivity weighting value, the query depth, and the information dispersion degree are the same, the lower the query execution frequency, the greater the improvement of the risk base value by the frequency adjustment.

[0009] The information entropy of the estimated result set includes: The database query optimizer maintains field distribution statistics, and estimates the value distribution of the result set based on the query conditions in the SQL query statement. When at least one field involved in the query conditions of the SQL query statement lacks corresponding field distribution statistics, a sampling query is performed on the SQL query statement, and the value distribution of the result set corresponding to the SQL query statement is estimated based on the result set obtained from the sampling query. Calculate the information entropy of the result set based on the value distribution of the result set; The information entropy of the result set is obtained before returning the de-identified results to the client.

[0010] The field sensitivity score is determined based on the matching result between the field's business meaning and the sensitive data classification rules; The business weight is determined based on the role of the field in the reconciliation relationship or the number of reconciliation chains in which the field participates; The field sensitivity score and the business weight are configured and stored in the database metadata during the system deployment phase.

[0011] For linear equations or proportional relationships, the constraints for generating desensitized parameters include: Apply affine transformations with the same functional form to fields in the same collation chain, and set the same scaling parameters for the fields in the collation chain; Based on the equation relationships between the original fields and the target equation relationships after desensitization, the compensation relationship between the translation parameters of each field in the cross-reference chain is determined. For proportional relationships, the compensation relationship is determined after converting the proportional relationship into a linear equation.

[0012] For the product relationship, the constraints for generating the desensitization parameters include: When the field value involved in the product relation is positive, the product relation is converted to the logarithmic domain; In the logarithmic domain, fields in the same logarithmic chain are transformed using the same functional form and the same scaling parameter, and the compensation relationship between the translation parameters is determined based on the equations in the logarithmic domain. The transformation result is restored to its original dimensions, and the relationship is verified on the restored desensitized result.

[0013] For statistical constraints that allow for preset errors, the constraints for generating desensitization parameters include: The statistical constraint relationship is set as a relaxed constraint with a preset tolerance range, and the anonymization result is determined in the relationship verification to see if it meets the preset tolerance range.

[0014] The parameters for determining desensitization include: The value boundaries of the de-identification parameters are determined based on the field type, numerical range, security requirements, and availability requirements. Within the value boundaries, candidate desensitization parameters that satisfy the desensitization parameter constraints are determined, and candidate desensitization parameters that do not satisfy the field type, the numerical range, the security requirements, or the usability requirements are eliminated. The desensitization parameters for the isomorphic desensitization are determined from the remaining candidate desensitization parameters.

[0015] After the desensitization verification passes, the following also applies: The system stores the audit task identifier, the de-identification parameters, the relationship verification result, and the query execution time; it receives audit feedback corresponding to the audit task identifier; it associates multiple SQL queries in the same audit task with the audit task identifier and the de-identification parameters corresponding to each SQL query; and, with the de-identification strategies of other SQL queries as covariates, it evaluates the causal impact of the current de-identification strategy of the target SQL query relative to the baseline de-identification strategy on the audit feedback result. The current de-identification strategy of the target SQL query is taken as the first strategy, and the de-identification strategies corresponding to the preset conservative tendency parameter and the maximum de-identification intensity parameter are taken as the baseline de-identification strategies. Under the condition that the desensitization strategies for other SQL queries remain unchanged, estimate the probability that the audit task will fail when the first strategy and the baseline desensitization strategy are adopted respectively, and determine the causal effect based on the difference between the two probabilities; The feedback delay is determined based on the query execution time and the feedback time; when the feedback delay exceeds a preset delay threshold, the weight of the corresponding historical audit feedback sample in the causal impact assessment is reduced according to a preset time decay rule, wherein the time decay rule makes the longer the feedback delay, the lower the weight of the corresponding historical audit feedback sample. Based on the causal impact, the reasons for audit failure, and the delay between the query execution time and the feedback time, update the de-identification strategy corresponding to the target SQL query.

[0016] A second aspect of the present invention provides a computer device, including a processor and a memory, wherein the memory stores a computer program. When the computer program is executed by the processor, it causes the computer device to perform the method.

[0017] Due to the adoption of the above technical solution, the beneficial effects achieved by this invention are as follows: This invention parses SQL query statements to obtain the set of fields involved in the query, the number of nesting levels, and the number of related tables. It then determines the query risk value by combining field sensitivity scores, business weights, result set information entropy, and query execution frequency within a preset time window. Finally, it determines the risk threshold based on visitor permission information. Thus, the system can identify high-risk queries by combining query content, query structure, result set characteristics, visitor permissions, and historical execution data, providing a query-level triggering basis for subsequent de-identification processing.

[0018] Furthermore, mathematical dependencies between fields involved in high-risk queries are extracted from database metadata and a reconciliation rule base to construct a reconciliation graph, thereby determining the reconciliation chains and their dependency types. Subsequently, desensitization parameter constraints are generated based on the dependency types, and desensitization parameters are determined within the range that satisfy the constraints. By incorporating the mathematical relationships between fields into the process of determining desensitization parameters and performing corresponding relationship verification on the desensitization results, the possibility of relationship distortion caused by independent field desensitization can be reduced, ensuring that the desensitized query results retain the relational structure for subsequent audit verification.

[0019] In summary, this invention can reduce the risk of losing the coherence of the desensitization results while implementing data security protection. Attached Figure Description

[0020] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention. In the drawings: Figure 1 This is a flowchart of the data asset desensitization and security protection method according to one embodiment of the present invention. Detailed Implementation

[0021] To more clearly illustrate the overall concept of the present invention, a detailed description will be provided below with reference to the accompanying drawings and examples.

[0022] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and therefore the scope of protection of the invention is not limited to the specific embodiments disclosed below.

[0023] like Figure 1 As shown, a data asset desensitization security protection method is executed by a data security protection system.

[0024] It should be noted that this implementation method is executed by a data security protection system. The system can be deployed as a database front-end agent, a database access gateway, or an application service connected to the database access service; each functional module can be executed by the same computing device or distributed across multiple interconnected computing devices.

[0025] The system includes a request receiving module, a query parsing module, a risk assessment module, a cross-reference handling module, a de-identification parameter processing module, a de-identification and validation module, an audit feedback processing module, and a strategy management module. Database metadata stores table structures, field business meanings, and field attributes; the cross-reference rule base stores mathematical dependencies between fields; and the strategy base stores de-identification strategies and their update records.

[0026] The method includes: S1: Receive a database access request, which includes an SQL query statement, visitor permission information, and audit task identifier.

[0027] The request receiving module receives database access requests submitted by clients. The request includes at least an SQL query statement, visitor permission information, and an audit task identifier. Visitor permission information may include visitor identity, role, permission level, or data access scope; the audit task identifier is used to associate multiple SQL queries within the same audit task and subsequent audit feedback.

[0028] The system assigns a query identifier to this request and stores it in association with the audit task identifier. The query identifier is used to record the parsing information, risk assessment results, anonymization parameters, relationship verification results, and query execution time of this query; the audit task identifier is used to retrieve the query records in the task after the task is completed.

[0029] Through the aforementioned identifier association, the system can track the processing of a single query and multiple queries within the same audit task, providing a foundation for subsequently associating task-level feedback with query-level desensitization strategies.

[0030] S2: Parse the SQL query statement to obtain the set of fields involved in the SQL query statement, the number of nesting levels, and the number of related tables; obtain the sensitivity score and corresponding business weight of each field from the database metadata based on the set of fields; estimate the information entropy of the result set of the SQL query statement based on database statistics or sampling query results; and determine the query execution frequency within a preset time window based on historical query records.

[0031] The query parsing module performs lexical and syntactic analysis on the SQL query statement, extracting the set of fields involved in the SQL query statement, the nesting level, and the number of related tables. The set of fields may include the query output fields, as well as fields used for filtering, joining, grouping, sorting, or aggregation.

[0032] The system queries database metadata based on the set of fields to obtain the sensitivity score and corresponding business weight for each field. The sensitivity score can be determined based on the matching result between the field's business meaning and the sensitive data classification rules; the business weight can be pre-configured by the administrator or determined based on the field's business function or field attributes. The score and weight are associated with the field identifier and used for risk assessment in this query.

[0033] The system also obtains the result set entropy corresponding to the SQL query statement and the query execution frequency within a preset time window. The result set entropy is used to characterize the dispersion of query result values; the query execution frequency is determined by historical query records. The system can match historical query records based on SQL text, normalized syntax structure, or query characteristics, and count the number of executions within the preset time window.

[0034] The result set information entropy can be estimated based on data distribution information provided by the database statistics component, estimation information in the query execution plan, historical results of similar queries, or sampled query results. When at least one field involved in the SQL query condition lacks corresponding field distribution statistics, the system can perform a sample query on the SQL query and estimate the result set distribution based on the sampling results. The sampling results are used internally by the system to estimate information entropy and are not directly returned to the client as un-anonymized query results.

[0035] One method for calculating information entropy is as follows: ; in, Indicates the values ​​of the result set The probability or estimated frequency of occurrence. When the values ​​in the result set are relatively dispersed, the information entropy is relatively high.

[0036] This step outputs the field set, field sensitivity score, business weight, nesting level, number of related tables, result set information entropy, and query execution frequency, which S3 uses to determine the query risk value.

[0037] S3: Determine the query risk value based on the sensitivity score, the business weight, the number of nested levels, the number of related tables, the result set information entropy, and the query execution frequency; determine the risk threshold based on the visitor permission information; and determine high-risk queries based on the comparison result between the query risk value and the risk threshold.

[0038] The risk assessment module determines the query risk value based on the data output by S2. The risk value can be obtained through a weighted scoring model, rule model, classification model, ranking model, or other methods that assess the query risk based on the input data.

[0039] One specific implementation method is to first calculate the field sensitivity weighted value based on the field sensitivity score and business weight: ; in, Score the sensitivity of the i-th field. is the business weight of the i-th field, and n is the number of fields involved in the query.

[0040] The system determines the query depth based on the nesting level and the number of related tables. For example: ; in, The nesting level, λ represents the number of associated tables, and λ represents the weight of the associated tables.

[0041] In addition, one method for calculating the query risk value is as follows: ; in, For the information entropy of the result set, ε represents the query execution frequency within a preset time window, and ε is a smoothing factor. This calculation method incorporates query execution frequency into risk assessment; with other risk parameters being equal, a lower query execution frequency corresponds to a higher query risk value.

[0042] The system may also use other risk models, as long as the model uses risk assessment data to determine the query risk value.

[0043] The risk assessment module determines risk thresholds based on visitor permission information. Risk thresholds can be configured according to visitor roles, permission levels, access scope, or business scenarios. The system compares the query risk value with the risk threshold and determines high-risk queries based on the comparison results.

[0044] In one specific implementation, the system uses visitor roles, permission levels, access data ranges, and business scenarios as threshold matching conditions, and pre-establishes a risk threshold configuration table. In the configuration table, each set of matching conditions corresponds to a risk threshold, and the risk threshold uses the same numerical scale as the query risk value. During system deployment, the risk threshold corresponding to each set of matching conditions is determined based on labeled historical query samples; whereby query samples confirmed to have security risks are designated as high-risk samples, and query samples confirmed to be accessible normally are designated as low-risk samples. The risk thresholds are then adjusted so that the risk value of high-risk samples reaches or exceeds the corresponding threshold.

[0045] For visitors with different permission levels, the lower the permission level, the lower the configured risk threshold; the broader the access scope or the more sensitive the business scenario, the lower the configured risk threshold. When an access request matches multiple threshold conditions, the system uses the minimum value among the matched risk thresholds as the risk threshold for that access request. If no specific configuration is matched, the default risk threshold corresponding to the visitor role is used.

[0046] After obtaining the risk threshold, the system compares the query risk value with the risk threshold. When the query risk value is greater than or equal to the risk threshold, the corresponding SQL query is identified as a high-risk query and passed to the subsequent reconciliation relationship extraction and desensitization process.

[0047] SQL statements and their field sets identified as high-risk queries are sent to S4; queries not identified as high-risk are processed according to the system's configured normal access policy. The output of this step determines the objects to be processed in subsequent reconciliation operations.

[0048] S4: Extract the mathematical dependencies between the fields involved in the high-risk query from the database metadata and the cross-reference rule base, construct a cross-reference graph, and determine at least one cross-reference chain and the dependency type of the cross-reference chain based on the cross-reference graph.

[0049] For high-risk queries identified by S3, the cross-reference processing module extracts the mathematical dependencies between fields from the database metadata and the cross-reference rule base based on the set of fields involved in the query.

[0050] Database metadata can record field identifiers, field business meanings, field types, the tables to which fields belong, and information about relationships between tables. The reconciliation rule base can record equation relationships, proportional relationships, product relationships, or other mathematical dependencies between financial statement items or other business fields.

[0051] The system can match query fields with relevance rules based on field identifiers, business names, field aliases, reports they belong to, table mappings, or rule tags. For fields that cannot be directly matched, the system can search for related fields based on field mappings or table association information in the metadata.

[0052] The system constructs a relational graph using fields as nodes and mathematical dependencies between fields as edges. Nodes can record field identifiers, their respective data tables, field types, and business attributes; edges can record relation rule identifiers, relation types, relation directions, and relation parameters. Based on the connections in the graph, the system determines at least one relational chain and the dependency type of each relational chain.

[0053] For example, when a high-risk query involves the fields of assets, liabilities, and owner's equity, and the rule base stores the reconciliation relationships between these fields, the system will use the relevant fields as nodes and establish the relationships between the nodes according to the rules, thereby determining the corresponding reconciliation chain.

[0054] This step outputs a cross-reference diagram, cross-reference chains, and their dependency types, which S5 uses to generate desensitization parameter constraints.

[0055] S5: For the chain of connections, generate desensitization parameter constraints according to the dependency relationship type, and determine the desensitization parameters within the parameter range that satisfies the desensitization parameter constraints.

[0056] The desensitization parameter processing module generates desensitization parameter constraints based on the dependency relationship type of the cross-link determined by S4, and determines the desensitization parameters within the parameter range that meets the constraints.

[0057] One approach is to convert the reciprocal relationship rules into a computable constraint expression, and then call the constraint solving module to determine the parameters; Another approach is to call a pre-configured constraint template based on the dependency type, and then solve the problem by filling in the fields and relation parameters from the cross-reference chain into the template. The constraint solving module can be implemented through symbolic solving, numerical optimization, constraint programming, or candidate parameter search.

[0058] The system can determine the range of candidate parameters based on field type, numerical range, security requirements, availability requirements, or preset strategies, and then select the anonymized parameters to be used in this query from the parameters that meet the constraints. The determined parameters are associated with the query identifier and the corresponding cross-reference chain, serving as input for S6 to perform anonymization and relationship validation.

[0059] Taking a linear equation as an example, the original relation can be expressed as: ; in, For the field values ​​in the reconciliation chain, Let C be the relation weight and C be the relation constant. One form of affine desensitization is: .

[0060] The system determines the constraints between the desensitized parameters based on the correlation relationships and obtains candidate parameters that satisfy the constraints. Different dependency relationship types can use different constraint expressions. For example, linear equality relationships can be constrained by scaling and offset parameters; proportional relationships can be converted into linear relationships; product relationships can be converted to logarithmic domain processing under applicable conditions; and statistical relationships with permissible errors can use preset tolerance constraints. The above methods are all used to form constraints based on the relationship type and do not limit the use of a particular solution algorithm.

[0061] S6: Perform isomorphic desensitization on the query results of the high-risk query according to the desensitization parameters to obtain the desensitization result; perform relationship verification on the desensitization result corresponding to the cross-linking chain, and return the desensitization result to the client when the verification passes.

[0062] The desensitization module executes high-risk queries and obtains the results. Based on the desensitization parameters determined in S5, it performs isomorphic desensitization on the relevant fields in the query results. Isomorphic desensitization refers to using a transformation form with a common structure for fields in the same logical chain and processing each field according to the determined parameters.

[0063] For fields that are not part of the reconciliation chain, the system can perform corresponding processing based on field attributes or access policies. The processed field values, together with other data in the query results, constitute the de-identified results.

[0064] The relationship verification module performs corresponding relationship verification on the de-identified results based on the cross-reference diagram and cross-reference chain obtained in S4, and the de-identification parameter constraints generated in S5. Verification can be performed on a single record, grouped results, summary results, or other ranges specified by rules.

[0065] When the relationship verification passes, the system returns the anonymization result to the client and saves the audit task identifier, query identifier, anonymization parameters, relationship verification result, and query execution time. These records are used by S7 to associate subsequent audit feedback with the corresponding query and anonymization decisions.

[0066] In one alternative implementation, if the relationship verification fails, the system can reselect parameters from other candidate parameters that meet the constraints and perform desensitization and verification again; if no parameters are available, the return of results is temporarily suspended and a review record is generated.

[0067] The risk identification results are used to filter objects for processing data with interrelationships. These interrelationships are then used to generate data masking parameter constraints, which are used for data masking and relationship verification. This process involves interrelationships in determining data masking parameters, which helps reduce the risk of data relationship distortion after masking.

[0068] In a preferred embodiment of the present invention, the field sensitivity score is determined based on the matching result between the field's business meaning and the sensitive data classification rules; The business weight is determined based on the role of the field in the reconciliation relationship or the number of reconciliation chains in which the field participates; The field sensitivity score and the business weight are configured and stored in the database metadata during the system deployment phase.

[0069] During system deployment, administrators match database fields with preset sensitive data classification rules based on their business meaning and assign sensitivity scores to each field. Sensitivity scores can be normalized to between 0 and 1. For example, fields that directly identify individuals or involve undisclosed core financial information can be configured with higher scores; general descriptive fields such as year and currency codes can be configured with lower scores. The scores are stored in the database metadata and retrieved based on the field identifiers obtained from SQL parsing during queries.

[0070] Field business weights are used to characterize the importance of a field to audit verification or business relationships. The system can determine the weight based on the field's role in the cross-validation relationship: fields that serve as the baseline item for equality verification, participate in multiple cross-validation relationships, or are located in critical calculation paths can be configured with higher weights; fields that participate in only a single relationship and have a small impact on the verification result can be configured with lower weights. Another approach is to determine the weight based on the number of cross-validation chains a field participates in; the more cross-validation chains a field participates in, the higher its weight can be. Administrators can also combine these factors with audit business rules to configure a comprehensive set of weights.

[0071] In one specific implementation, the system first determines the role coefficient based on the field's role in the reconciliation relationship, then counts the number of reconciliation chains the field participates in, and determines the business weight based on the role coefficient and the number of reconciliation chains. The role coefficient can be set as follows: 3 for fields serving as the baseline or main accounting item in the reconciliation equation; 2 for fields serving as intermediate calculation items in the reconciliation chain; and 1 for fields serving only as terminal subordinate items. Let the role coefficient of the i-th field be rᵢ, the number of reconciliation chains the field participates in be cᵢ, and the preset upper limit for the number of chains be C. Then, the business weight wᵢ of this field is determined by the following formula: wᵢ=rᵢ×(1+min(cᵢ,C) / C); Where C is a preset integer greater than zero, configured during system deployment based on the range of the number of interlocking chains in the interlocking relationship rule base. The more interlocking chains a field participates in, the greater its business weight; when the number of interlocking chains is the same, the more critical the role in the interlocking relationship, the greater its business weight.

[0072] For example, in the reconciliation relationship of "Assets = Liabilities + Owner's Equity", the asset field is determined as the base item, and the liability and owner's equity fields are determined as subordinate items. The system counts the number of reconciliation chains involved in each field, calculates the business weight according to the role coefficient and the chain number conversion value, and stores the calculated business weight in the database metadata in association with the field identifier, so that it can be read when querying risk assessment.

[0073] Field sensitivity scores and business weights are configured and stored in the database metadata during system deployment. After receiving a query, the system reads the corresponding configuration based on the set of query fields, enabling the field business attributes to participate in the risk assessment of the query without requiring manual specification of scores for each query.

[0074] In one embodiment, the field sensitivity weighting value is calculated using the following formula: ; in, To retrieve the sensitivity score of the i-th field involved in the query, S(Q) represents the business weight of this field, and n is the number of fields involved in the query. The calculated S(Q) serves as the field sensitivity input for query risk assessment.

[0075] This configuration method allows risk assessment to consider both the sensitivity of the field data itself and the business role of the field in audit reconciliation, making it easier to distinguish fields with similar sensitivity but different audit importance.

[0076] In one embodiment, determining the query risk value includes: Based on the sensitivity score of each field and its corresponding business weight, calculate the field sensitivity weighted value of the field set; The query depth is determined based on the nesting level and the number of associated tables, according to the preset weighting of the associated tables. The degree of information dispersion of the result set is determined based on the information entropy of the result set. The basic risk value is determined based on the field sensitivity weighting value, the query depth, and the information dispersion degree, and the basic risk value is adjusted according to the query execution frequency to obtain the query risk value; Specifically, when the field sensitivity weighting value, the query depth, and the information dispersion degree are the same, the lower the query execution frequency, the greater the improvement of the risk base value by the frequency adjustment.

[0077] The system obtains the nesting level and the number of related tables based on the query parsing results, and obtains the field sensitivity score and business weight based on the database metadata. Then, it determines the query risk value by combining the result set information entropy and query execution frequency.

[0078] One approach is to first calculate the query depth: ; in, This refers to the nesting level of the SQL query statement. This represents the number of related tables. Weights are calculated for the related tables. The nesting level reflects the hierarchical structure of the query statement, and the number of related tables reflects the cross-table relationships involved in the query. This metric, used to calculate the number of related tables in the query depth index, can be pre-configured or calibrated by the system based on the target database and query samples. In one embodiment, λ=0.5 is used; however, it can be adjusted based on the database structure and risk assessment data during specific deployment.

[0079] One method for calculating the query risk value is as follows: ; in, Add a sensitivity weight to the field. For query depth, For the information entropy of the result set, The frequency of query execution within a preset time window. This is a smoothing factor.

[0080] The system can use the past 30 days as a query frequency statistics window and count the number of times the current SQL or queries that meet preset matching conditions are executed through historical query logs. A smoothing factor is used to avoid a denominator of zero when the query frequency is zero. In one embodiment, ε=1, which can be configured according to the statistical unit of frequency and the risk score range.

[0081] In other implementations, the system can first form a baseline risk value based on S(Q), D(Q), and I(Q). Then, by querying the adjustment factor corresponding to the execution frequency. Obtain the query risk value. This process can be achieved through formulas, lookup rules, or a calibrated risk model, but the following risk assessment relationship should be maintained: when the field sensitivity weighting, query depth, and result set information dispersion are the same, the lower the execution frequency, the greater the improvement of the base risk value due to frequency adjustment.

[0082] For example, if a financial query involves fields with high sensitivity scores and has a certain nested structure and number of related tables, the system can still identify it as a high-risk query based on the aforementioned risk factors, even if the query has only been executed once or has no execution record within the statistics window, rather than excluding it simply because of its low execution frequency. The risk assessment module compares the calculation results with the risk threshold corresponding to the visitor's permissions and passes the judgment result to subsequent processing flows.

[0083] The aforementioned risk calculation incorporates field sensitivity, query structure, result set information characteristics, and execution frequency into the same query-level evaluation, enabling query risk assessment to be used to filter objects for subsequent logical relationship extraction and constraint de-identification. Existing query risk technologies have disclosed the use of attribute sensitivity, query information, and access scope for risk assessment; this implementation further combines query structure, result set information entropy, and low-frequency query adjustments to form query risk results for subsequent de-identification processing.

[0084] In one embodiment, the information entropy of the predicted result set includes: The database query optimizer maintains field distribution statistics, and estimates the value distribution of the result set based on the query conditions in the SQL query statement. When at least one field involved in the query conditions of the SQL query statement lacks corresponding field distribution statistics, a sampling query is performed on the SQL query statement, and the value distribution of the result set corresponding to the SQL query statement is estimated based on the result set obtained from the sampling query. Calculate the information entropy of the result set based on the value distribution of the result set; The information entropy of the result set is obtained before returning the de-identified results to the client.

[0085] The result set information entropy is used to characterize the dispersion of query result values. The system estimates this information entropy before returning anonymized results to the client, so that it can be used as input for query risk assessment.

[0086] The system accesses field distribution statistics maintained by the database query optimizer and combines this information with the query conditions in the SQL query statement to estimate the distribution of values ​​in the result set. These statistics may include field histograms, the number of distinct values, field value frequency, or selectivity. The system filters relevant statistics based on the query conditions to estimate the probability of each value in the query results.

[0087] When a query involves multiple fields, the system can estimate the value distribution of each field separately based on database statistics and query conditions, or estimate the combined value distribution based on available joint statistics. Subsequently, the system calculates the information entropy of the result set based on the estimated value probabilities. ; in, Take values ​​for the result set The estimated probability. The logarithmic base can be determined based on the information unit used by the system and kept consistent within the same deployment environment.

[0088] When at least one field involved in an SQL query condition lacks corresponding field distribution statistics, the system can perform a sampling query on the SQL query and estimate the distribution of the result set values ​​based on the sampling results.

[0089] Sampling queries can reuse tables, joins, and query conditions from the original SQL query, and add sampling restrictions or mechanisms during query execution. Sampling methods can include database-supported random sampling, primary key-based sampling, or other methods that can obtain a sample of the query results. The sampled data is only used internally by the system to estimate the distribution and information entropy of the result set values ​​and is not directly returned to the client as the original query results.

[0090] The system counts the frequency of each value based on the sampling results and estimates the probability of that value accordingly. For example, if the value x appears 10 times in the sampling results... If the total number of samples is N, the following estimation method can be used: ; Then estimate Substitute the values ​​into the information entropy calculation formula to obtain the information entropy of the result set. Both the sampling query and the information entropy calculation are completed before returning the anonymized results to the client, so that the information entropy can be used in the risk assessment of the current query.

[0091] By estimating based on field distribution statistics and employing sampling estimation when relevant statistical information is missing, the system can obtain estimated values ​​of the result set distribution under different database statistical conditions, and input the resulting information entropy into the query risk assessment. Therefore, the result set information entropy is not only obtained as an independent statistic, but also has a clear purpose in subsequent query risk value calculation.

[0092] Specifically, an audit query involves total assets, total liabilities, and total owner's equity. During the deployment phase, the system configures sensitivity scores for the three monetary fields based on their business meanings and sensitive data classification rules; it also configures business weights based on the roles of the three fields in financial reconciliation relationships, and writes the scores and weights into the database metadata.

[0093] Upon receiving the query, the system parses the SQL to obtain three fields, the nesting level, and the number of related tables. The system reads the scores and weights of the three fields and calculates the field sensitivity weighted value; then, it calculates the query depth based on the nesting level and the number of related tables. If the database statistics can cover the query conditions, the system estimates the distribution of the result set values ​​based on the statistics; if at least one field involved in the query conditions lacks corresponding statistics, a sampling query is performed on the SQL query, and the value distribution and information entropy are estimated based on the sample.

[0094] The system then counts the frequency of query executions within a preset time window, determines the query risk value based on field sensitivity weighting, query depth, result set information entropy, and query frequency, and compares it with the risk threshold corresponding to the visitor's permissions. This risk assessment result serves as input for subsequent high-risk query processing.

[0095] The scoring, weights, association table converted weights, statistical windows, smoothing factors, and sampling methods in the above embodiments can all be configured according to the database deployment environment, and are not limited to specific values ​​or implementation methods.

[0096] In a preferred embodiment of the present invention, the system generates desensitization parameter constraints based on the dependency relationship type of the cross-linking chain, and determines the parameters for desensitization from the candidate parameters that satisfy the constraints.

[0097] In one embodiment, for linear equations or proportional relationships, the constraints for generating desensitized parameters include: Apply affine transformations with the same functional form to fields in the same collation chain, and set the same scaling parameters for the fields in the collation chain; Based on the equation relationships between the original fields and the target equation relationships after desensitization, the compensation relationship between the translation parameters of each field in the cross-reference chain is determined. For proportional relationships, the compensation relationship is determined after converting the proportional relationship into a linear equation.

[0098] For a linear equation chain, the system obtains the participating fields, the coefficients of each field in the relation, and the equation constants from the relation rules. The original equation can be expressed as: ; in, For the i-th field value in the cross-reference chain, Here, C represents the coefficient of the corresponding field in the relation, and C is the original equality constant.

[0099] The system applies affine transformations with the same functional form to the fields in the cross-reference chain: ; in, For scaling parameters, This refers to the translation parameter. To ensure that the transformed data continues to maintain the original linear relationship, the system sets the scaling parameter to the same value within the same chain of recursion: ; The target equation after desensitization can be expressed as: ; in, Let be the target constant of the desensitized relation. After substituting the affine transformation into the target equation, the system determines the compensation relationship of the translation parameters based on the original relation: ; The system combines the common scaling parameter conditions and translation parameter compensation relationships into desensitization parameter constraints, and then the constraint solving module determines the parameter combinations that satisfy the conditions. Depending on the audit purpose, it can be set to maintain the original equation constant, transform to a preset equivalent constant, or adopt the target constant defined in the relation rules.

[0100] For example, the balance sheet relationship "Assets = Liabilities + Owner's Equity" can be written as: ; The system uses a common scaling parameter for the three fields and ensures that the three translation parameters satisfy: .

[0101] Therefore, the anonymized asset field still satisfies the corresponding equation with the anonymized liability and owner's equity fields. The system can select parameters from the parameter combinations that meet the above constraints, based on the parameter range and security and availability requirements.

[0102] Furthermore, regarding proportional relationships, for example: ; The system converts it into a linear equation: ; Under the condition of using common scaling parameters, the translation parameters satisfy: ; Right now: ; This ensures that the transformed fields continue to satisfy the proportional relationship. The system then uses the same constraint processing flow as for linear equations to solve the transformed equations.

[0103] The above processing determines the parameters jointly for the same cross-reference chain, avoiding the situation where the original equations or proportional relationships no longer hold true after each field selects its own parameters.

[0104] In one embodiment, for the product relationship, the constraints for generating the desensitization parameters include: When the field value involved in the product relation is positive, the product relation is converted to the logarithmic domain; In the logarithmic domain, fields in the same logarithmic chain are transformed using the same functional form and the same scaling parameter, and the compensation relationship between the translation parameters is determined based on the equations in the logarithmic domain. The transformation result is restored to its original dimensions, and the relationship is verified on the restored desensitized result.

[0105] For product relationships, when all participating field values ​​are positive, the system converts the product relationship to logarithmic domain processing. Taking "Total Cost = Unit Cost × Quantity" as an example, the original relationship is represented as: ; In the logarithmic field, this is converted to: ; The system uses a common scaling parameter and the corresponding translation parameters for each field for the same piezoelectric chain in the logarithmic domain: ; Where i takes any integer value from 1 to 3; , This is the result of a logarithmic domain transformation. To ensure that the transformed logarithmic domain data continues to satisfy the original relation, the translation parameter must satisfy: ; After restoring the logarithmic field result to its original dimensions, the desensitization function for the field is: ; Where 'a' is the common scaling parameter. Here are the translation parameters for the corresponding fields. For the above product relationship, when the translation parameter compensation condition is met, we have: .

[0106] After the system determines the parameters, it restores the transformation result to its original dimensions and then performs relationship verification based on the original product relationship.

[0107] If the field value involved in the product relationship may be zero or negative, the logarithm of that field value is not directly taken. The system can select an applicable alternative constraint expression according to the field type and relation rules, or mark the logarithmic chain as unsuitable for the current logarithmic domain scheme and process it using other parameter solving methods. This judgment is used to avoid performing invalid logarithmic transformations on data that does not meet the domain conditions.

[0108] The purpose of using logarithmic domain processing is to convert applicable product relationships into additive relationships that can be processed in the logarithmic domain. Then, the transformation results are controlled by the compensation conditions of common scaling parameters and offset parameters, so that the desensitization processing can be applied to product-type reciprocal relationships.

[0109] In one embodiment, for a statistical constraint relationship that allows for a preset error, the constraint conditions for generating the desensitization parameters include: The statistical constraint relationship is set as a relaxed constraint with a preset tolerance range, and the anonymization result is determined in the relationship verification to see if it meets the preset tolerance range.

[0110] For statistical constraints that allow for a certain degree of error, the system obtains a preset tolerance range based on the relational rules and converts the statistical relationship into a relaxed constraint with tolerance. Taking the allowable error between the weighted total of multiple fields and the target value as an example, it can be expressed as: ; Where δ is the preset tolerance, For the target value, These are the anonymized field values.

[0111] During the parameter solving phase, the system uses this tolerance condition as a constraint on the candidate parameters. During the de-identification result verification phase, it calculates the difference between the de-identified relationship and the target value, and determines whether the difference falls within the preset tolerance range. The tolerance can be determined based on business rules, financial data accuracy requirements, or system configuration.

[0112] The purpose of using relaxed constraints is to prevent the statistical relationship of allowable error from being mistakenly treated as a strict equality. In this way, parameter solving and relationship verification can meet the accuracy requirements of the relationship itself.

[0113] Based on this, the determination of desensitization parameters includes: The value boundaries of the de-identification parameters are determined based on the field type, numerical range, security requirements, and availability requirements. Within the value boundaries, candidate desensitization parameters that satisfy the desensitization parameter constraints are determined, and candidate desensitization parameters that do not satisfy the field type, the numerical range, the security requirements, or the usability requirements are eliminated. The desensitization parameters for the isomorphic desensitization are determined from the remaining candidate desensitization parameters.

[0114] The de-identification parameter processing module determines the value boundaries of candidate parameters based on field type, numerical range, security requirements, and availability requirements. These boundaries can be configured by the administrator or retrieved from database metadata, a de-identification policy library, or business rules.

[0115] In one specific implementation, the system first determines the initial range of candidate desensitization parameters based on the field type, the original value range, and the allowed output value range. For affine transformation numerical fields, with the original value range [L, U], the allowed output value range [L′, U′], and the transformation to x′=a×x+b, where a is greater than zero, the system proceeds according to: L′-a×L≤b≤U′-a×U, The range of the translation parameter b is determined, and the scaling parameter a takes values ​​within a preset interval. Based on this, the system generates candidate parameter combinations and performs the following evaluation on each candidate parameter combination.

[0116] For security requirements, the system uses preset security assessment indicators to calculate the risk value of candidate anonymized results and compares it with a risk upper limit. In one implementation, the indicators include the degree of distinguishability between the candidate anonymized result and the original value or the risk of re-identification; candidate parameters with risk values ​​exceeding the preset upper limit are eliminated. The risk indicators and their upper limits are pre-configured by the system according to the data sensitivity level and access scenario.

[0117] For availability requirements, the system pre-configures business queries or statistical tasks for evaluating data availability. The system performs the same task on both the original data and candidate anonymized data, calculating the normalization error based on the corresponding results. For numerical results, the individual normalization error is the absolute value of the difference between the anonymized result and the original result divided by the larger of the absolute value of the original result and the preset benchmark value. The system calculates the availability loss from the normalization errors of each task.

[0118] Candidate parameters that do not meet any of the requirements are removed from the candidate set. The system then selects the parameters for isomorphic desensitization from the remaining candidate parameters. Parameter selection can employ preset priorities, objective function sorting, rule matching, or other selection methods; for example, while satisfying all constraints, the system selects the parameters that meet security requirements and have the least impact on the availability of query results.

[0119] If no candidate parameter simultaneously meets the constraints, field type, numerical range, security requirements, and availability requirements, the system may not perform de-identification using an unqualified parameter. Instead, it may generate a parameter infeasibility record and reset the candidate boundaries according to a preset strategy, switch to other available de-identification strategies, or submit it for manual review. The selected parameter is associated with the corresponding cross-reference chain and query record for subsequent de-identification execution and relationship verification.

[0120] Using the above method, the system generates corresponding parameter constraints based on the type of reciprocal relationship: linear equations and proportional relationships are handled through compensation relationships using common scaling parameters and translation parameters; applicable product relationships are handled through logarithmic domain transformation and restoration; and statistical relationships with permissible errors are relaxed through preset tolerances to form relaxation constraints. Subsequently, the system filters and determines parameters based on field type, numerical range, security, and availability requirements.

[0121] Therefore, the parameter determination process considers both the mathematical dependencies between fields and the processing requirements of the fields themselves, reducing the possibility of disrupting the correlation due to each field selecting its own desensitization parameters. At the same time, the candidate parameter screening can exclude parameters that are not suitable for the field type, numerical range, or configuration requirements, providing usable parameters for subsequent desensitization execution and relationship verification.

[0122] In a preferred embodiment of the present invention, after the desensitization verification passes, the method further includes: The system stores the audit task identifier, the de-identification parameters, the relationship verification result, and the query execution time; it receives audit feedback corresponding to the audit task identifier; it associates multiple SQL queries in the same audit task with the audit task identifier and the de-identification parameters corresponding to each SQL query; and, with the de-identification strategies of other SQL queries as covariates, it evaluates the causal impact of the current de-identification strategy of the target SQL query relative to the baseline de-identification strategy on the audit feedback result. The current de-identification strategy of the target SQL query is taken as the first strategy, and the de-identification strategies corresponding to the preset conservative tendency parameter and the maximum de-identification intensity parameter are taken as the baseline de-identification strategies. Under the condition that the desensitization strategies for other SQL queries remain unchanged, estimate the probability that the audit task will fail when the first strategy and the baseline desensitization strategy are adopted respectively, and determine the causal effect based on the difference between the two probabilities; The feedback delay is determined based on the query execution time and the feedback time. When the feedback delay exceeds a preset delay threshold, the weight of the corresponding historical audit feedback sample in the causal impact assessment is reduced according to a preset time decay rule. The time decay rule makes the weight of the corresponding historical audit feedback sample lower the longer the feedback delay.

[0123] This implementation compares the current de-identification strategy and the baseline de-identification strategy of the target SQL query to evaluate the impact of the query strategy on task-level audit feedback, and updates the strategy based on the evaluation results, reasons for failure, and feedback delay.

[0124] The audit feedback processing module receives audit feedback corresponding to the audit task identifier. Audit feedback includes at least the result of whether the audit passed or failed; if the audit fails, the reason for failure may also be included. The reason for failure can be marked by the auditor as insufficient availability or insufficient security when providing feedback on the client side, and stored along with the feedback time.

[0125] The system retrieves SQL query records within the same task based on the audit task identifier, including the query identifier, de-identification strategy, de-identification parameters, query execution time, and relationship verification results for each SQL query. The system then associates the query records within the same task with task-level audit feedback to form a historical sample for strategy evaluation.

[0126] In one implementation, the task result is represented by the audit feedback variable F: ; The reasons for audit failure are recorded separately as a separate feedback label. That is, F is used to represent the audit result, and the reasons for failure are used to select the subsequent strategy update path; the reasons for failure are not generated by CATE calculation itself.

[0127] The system selects the target SQL query from the SQL queries within the same audit task, determines the current de-identification strategy used by that query as the first strategy, and denotes it as follows: .

[0128] The system determines the strategy corresponding to the preset conservative tendency parameter and the maximum desensitization intensity parameter as the baseline desensitization strategy, denoted as . In one implementation, the conservatism tendency parameter and the desensitization intensity parameter are denoted as α and β, respectively, and the baseline strategy can be configured as α=1.0 and β=1.0. These values ​​are configuration examples in this embodiment; in actual deployment, they can be configured according to the parameter definitions and the system's allowed range.

[0129] By treating the first strategy and the baseline strategy as separate strategy processing states for the same target query, the system can evaluate the impact of the current strategy on the audit results relative to the preset comparison strategy, rather than directly modifying the strategy based solely on a single audit rejection.

[0130] A single audit task may contain multiple SQL queries, and the anonymization strategies of these queries may collectively influence the task-level audit feedback. To reduce the confounding effect of other query strategies on the evaluation of the target query, the system uses the anonymization strategies of other SQL queries within the same task as covariates when evaluating the target SQL query, and maintains the same conditions for these covariates when comparing the two strategies.

[0131] One way to represent causal influence is as follows: ; in: This indicates that the target SQL query uses the current de-identification strategy; This indicates that the target SQL query uses a baseline desensitization strategy; This indicates the desensitization strategy for other SQL queries within the same audit task; F represents the feedback variable indicating that the audit was not passed; do(·) indicates that the target query strategy is set to the corresponding strategy state during the evaluation; This indicates the impact of the target query's current strategy relative to the baseline strategy on audit failure results, given that other SQL query strategies are used as covariates.

[0132] Since F=1 indicates that the audit failed. This indicates that, in the model estimation results, the probability of the current strategy failing the audit is higher than that of the baseline strategy. This indicates that the probability of audit failure for the current strategy is not higher than that for the baseline strategy. This symbol is used in conjunction with the reasons for audit failure to determine the strategy update branch.

[0133] The system can employ dual machine learning to estimate the causal effects of the target policy. Each record in the historical samples can contain: Audit task characteristics; target SQL query characteristics; actual de-identification strategy used for the target query; de-identification strategies for other SQL queries in the same task; audit feedback results; reasons for audit failure; query execution time and feedback time.

[0134] The system uses the anonymization strategy of the target SQL query as the processing variable, the audit feedback result as the outcome variable, and task characteristics, query characteristics, visitor permission information, and the strategies of other SQL queries as covariates. The system estimates the processing model and the outcome model separately, and then estimates the processing effect based on the processing residual and the outcome residual. Random forests can be used to fit the processing model and the outcome model; in other implementations, gradient boosting trees or other suitable nonparametric models can also be used.

[0135] For example, the processing model is used to estimate the probability that a target query will employ a certain desensitization strategy given covariates; the outcome model is used to estimate the result of a task audit failing given covariates and strategy status. The system uses residual information between model predictions and actual observations to estimate the impact of the strategy. The specific model type and training parameters can be determined based on the size of historical feedback samples and query characteristics.

[0136] If the historical sample is insufficient to support a stable estimate for a single SQL query, the system can first group similar queries by query structure, field type, cross-reference type, or audit task type, and then perform estimation based on the grouped samples. The evaluation results can be saved along with the sample size, model confidence, or effective sample range for use in determining the usability of the evaluation results when updating the strategy.

[0137] The system determines the feedback delay based on the query execution time and the audit feedback time: .

[0138] When Δt exceeds a preset delay threshold, the system reduces the weight of the corresponding historical feedback sample in the causal impact assessment according to a preset time decay rule. One time decay method is as follows: ; Where w(Δt) is the sample weight, and τ_d is the time decay parameter. This rule ensures that the longer the feedback delay, the lower the corresponding sample weight. For samples that do not exceed the delay threshold, the system can participate in the evaluation according to the preset basic weight.

[0139] In one embodiment, the preset delay threshold is 7 days, and the time decay parameter τ_d is 3 days. If the relevant SQL is executed on day 1 of the task and the audit feedback is given on day 9, then the feedback delay is 8 days; the weight of this sample is: .

[0140] This sample can still be used for causal impact assessment, but its weight is lower than that of samples with shorter delays. Preset delay thresholds and time decay parameters can be set according to the audit task cycle and historical feedback characteristics, and are not limited to the examples above.

[0141] Time decay is used to reduce the impact of longer delayed feedback on the current strategy evaluation; query execution time and feedback time are used to determine the latency corresponding to each feedback sample. Thus, time weights are correlated with specific query records and audit feedback records.

[0142] Based on this, and according to the causal impact, the reasons for audit failure, and the delay between the query execution time and the feedback time, the de-identification strategy corresponding to the target SQL query is updated: When the causal effect indicates that the current de-identification strategy increases the probability of audit failure, and the reason for audit failure is insufficient availability, the conservative tendency parameter of the corresponding field of the target SQL query is reduced; When the causal effect indicates that the current desensitization strategy increases the probability of audit failure, and the reason for audit failure is insufficient security, the desensitization strength parameter of the corresponding field of the target SQL query is increased; When the current desensitization strategy does not increase the probability of audit failure compared to the baseline desensitization strategy, and the reason for audit failure is insufficient availability, the corresponding field is marked as a field for manual review and the automatic parameter update of the field is frozen; When the current desensitization strategy does not increase the probability of audit failure compared to the baseline desensitization strategy, and the reason for audit failure is insufficient security, the desensitization strength of the corresponding field is increased, and secondary desensitization is performed on the desensitization result.

[0143] The strategy management module determines the strategy update method for the target SQL query based on CATEⱼ, the reason for audit failure, and feedback delay. The updated strategy is written to the strategy database for subsequent identical or similar queries to use.

[0144] In one embodiment, when the audit fails due to insufficient availability, and At that time, the probability of audit failure corresponding to the current strategy is higher than that of the baseline strategy. Based on this, the system reduces the conservative bias parameter of the corresponding field in the target SQL query, so that subsequent strategies reduce the impact of data masking on audit calculations or verifications.

[0145] One method for updating parameters is: ; in, The parameter representing the conservative bias before the update. Here, η represents the updated parameters, and η is the learning rate. The updated parameters can be limited to the range allowed by the system.

[0146] For example, if , Then the adjustment amount for the conservative tendency parameter is: ; The system writes the adjusted parameters into the strategy library for subsequent related queries.

[0147] In one embodiment, when the audit fails due to insufficient security, and When this happens, the system increases the desensitization strength parameter of the corresponding field in the target SQL query. Parameter updates can be determined based on the magnitude of the causal impact, or can adopt preset hierarchical adjustment rules, and are subject to the parameter range allowed by the system.

[0148] One implementation method is as follows: ; in, The desensitization intensity parameters before the update. For the updated parameters, This represents the maximum desensitization intensity allowed by the system. This formula is an optional implementation for parameter updates.

[0149] In one embodiment, when the audit fails due to insufficient availability, At this time, the current policy does not increase the probability of audit failure compared to the baseline policy, but the task still fails due to insufficient availability. The system can mark the corresponding field as a field for manual review and freeze the automatic parameter update of that field, waiting for the administrator to specify a dedicated policy.

[0150] This branch is used to prevent the system from continuing to use the automatic update direction that reduces conservatism when the current strategy does not show a higher rejection probability, thereby avoiding unfounded parameter adjustments.

[0151] In one embodiment, when the audit fails due to insufficient security, At this point, the current strategy does not increase the probability of audit failure compared to the baseline strategy, but the audit task still fails due to insufficient security. The system increases the de-identification strength of the corresponding field to the upper limit allowed by the system and performs secondary de-identification on subsequent de-identification results.

[0152] One method of secondary desensitization involves superimposing differential privacy noise on the results of the first desensitization. For scenarios where queries are executed based on numerical results, the system can determine the noise parameters according to the privacy budget and query sensitivity, and add noise before returning the results. Subsequently, the applicable cross-validation checks are re-executed on the secondary desensitization results. If the secondary desensitization disrupts the required cross-validation, the system can adjust the noise or parameters according to a preset strategy, re-validate, or submit the result for manual review.

[0153] It should be noted that if the desensitization strength parameter in the baseline strategy has already reached the system limit, increasing it to the limit means maintaining it at that limit; secondary desensitization is used to add protective measures in addition to regular parameter adjustments. Whether secondary desensitization uses a noise mechanism and its parameters should be determined by the system's privacy protection configuration.

[0154] The system will associate the updated de-identification strategy with the target SQL query, related fields, or logical chains, write this information into the strategy database, and record it. Audit task identifier and target query identifier; current strategy and baseline strategy; causal impact assessment results; reasons for audit failure; query execution time, feedback time and feedback delay; sample weight or time decay results; parameters before and after strategy update; whether manual review or secondary desensitization was triggered.

[0155] When the same or similar database access requests are received subsequently, the system can read the updated policy from the policy library based on the fields involved in the query, query characteristics, visitor permission information, or linkage chain, and use it to determine the subsequent de-identification parameters.

[0156] This implementation compares the current de-identification strategy of the target SQL query with the baseline strategy and incorporates the de-identification strategies of other SQL queries as covariates, enabling task-level audit feedback to be used to assess the impact of specific query strategies. The system then selects an availability or security update path based on the reasons for audit failures and determines the feedback latency based on the query execution time and feedback time, reducing the impact of longer latency samples on the assessment.

[0157] Therefore, audit feedback can be traced back to the query and de-identification strategies in the same task, and the evaluation results can be used to update the strategy library and invoked in subsequent queries.

[0158] A second aspect of the present invention provides a computer device, including a processor and a memory, wherein the memory stores a computer program. When the computer program is executed by the processor, it causes the computer device to perform the method.

[0159] Therefore, it can achieve any effect in a data asset desensitization and security protection method, which will not be elaborated here.

[0160] For any parts not mentioned in this invention, existing technologies can be used or referenced.

[0161] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.

[0162] The above description is merely an embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of the present invention should be included within the scope of the claims of the present invention.

Claims

1. A data asset de-identification security protection method, executed by a data security protection system, characterized in that, include: Receive a database access request, which includes an SQL query statement, visitor permission information, and audit task identifier; Parse the SQL query statement to obtain the set of fields involved in the SQL query statement, the number of nesting levels, and the number of related tables; based on the set of fields, obtain the sensitivity score and corresponding business weight of each field from the database metadata; Estimate the entropy of the result set of the SQL query statement based on database statistics or sampling query results; And determine the frequency of query execution within a preset time window based on historical query records; The query risk value is determined based on the sensitivity score, the business weight, the number of nesting levels, the number of related tables, the result set information entropy, and the query execution frequency. The risk threshold is determined based on the visitor permission information. High-risk queries are determined based on the comparison between the query risk value and the risk threshold. Extract the mathematical dependencies between fields involved in the high-risk query from the database metadata and the cross-reference rule base, construct the cross-reference graph, and determine at least one cross-reference chain and the dependency type of the cross-reference chain based on the cross-reference graph; For the aforementioned chain of connections, desensitization parameter constraints are generated based on the dependency relationship type, and desensitization parameters are determined within the parameter range that satisfies the desensitization parameter constraints. Based on the desensitization parameters, isomorphic desensitization is performed on the query results of the high-risk query to obtain the desensitization result; The anonymized results are validated against the cross-reference chain, and the anonymized results are returned to the client when the validation passes.

2. The method of claim 1, wherein, The determination of query risk value includes: Based on the sensitivity score of each field and its corresponding business weight, calculate the field sensitivity weighted value of the field set; The query depth is determined based on the nesting level and the number of associated tables, according to the preset weighting of the associated tables. The degree of information dispersion of the result set is determined based on the information entropy of the result set. The basic risk value is determined based on the field sensitivity weighting value, the query depth, and the information dispersion degree, and the basic risk value is adjusted according to the query execution frequency to obtain the query risk value; Specifically, when the field sensitivity weighting value, the query depth, and the information dispersion degree are the same, the lower the query execution frequency, the greater the improvement of the risk base value by the frequency adjustment.

3. The method of claim 2, wherein, The information entropy of the estimated result set includes: The database query optimizer maintains field distribution statistics, and estimates the value distribution of the result set based on the query conditions in the SQL query statement. When at least one field involved in the query conditions of the SQL query statement lacks corresponding field distribution statistics, a sampling query is performed on the SQL query statement, and the value distribution of the result set corresponding to the SQL query statement is estimated based on the result set obtained from the sampling query. Calculate the information entropy of the result set based on the value distribution of the result set; The information entropy of the result set is obtained before returning the de-identified results to the client.

4. The method according to claim 1, characterized in that, The field sensitivity score is determined based on the matching result between the field's business meaning and the sensitive data classification rules; The business weight is determined based on the role of the field in the reconciliation relationship or the number of reconciliation chains in which the field participates; The field sensitivity score and the business weight are configured and stored in the database metadata during the system deployment phase.

5. The method of claim 1, wherein, For linear equations or proportional relationships, the constraints for generating desensitized parameters include: Apply affine transformations with the same functional form to fields in the same collation chain, and set the same scaling parameters for the fields in the collation chain; Based on the equation relationships between the original fields and the target equation relationships after desensitization, the compensation relationship between the translation parameters of each field in the reconciliation chain is determined. For proportional relationships, the compensation relationship is determined after converting the proportional relationship into a linear equation.

6. The method of claim 1, wherein, For the product relationship, the constraints for generating the desensitization parameters include: When the field value involved in the product relation is positive, the product relation is converted to the logarithmic domain; In the logarithmic domain, fields in the same logarithmic chain are transformed using the same functional form and the same scaling parameter, and the compensation relationship between the translation parameters is determined based on the equations in the logarithmic domain. The transformation result is restored to its original dimensions, and the relationship is verified on the restored desensitized result.

7. The method of claim 1, wherein, For statistical constraints that allow for preset errors, the constraints for generating desensitization parameters include: The statistical constraint relationship is set as a relaxed constraint with a preset tolerance range, and the anonymization result is determined in the relationship verification to see if it meets the preset tolerance range.

8. The method of claim 1, wherein, The parameters for determining the desensitization include: The value boundaries of the de-identification parameters are determined based on the field type, numerical range, security requirements, and availability requirements. Within the value boundaries, candidate desensitization parameters that satisfy the desensitization parameter constraints are determined, and candidate desensitization parameters that do not satisfy the field type, the numerical range, the security requirements, or the usability requirements are eliminated. The desensitization parameters for the isomorphic desensitization are determined from the remaining candidate desensitization parameters.

9. The method of claim 1, wherein, After the desensitization verification passes, the following also applies: The system stores the audit task identifier, the de-identification parameters, the relationship verification result, and the query execution time; it receives audit feedback corresponding to the audit task identifier; it associates multiple SQL queries in the same audit task with the audit task identifier and the de-identification parameters corresponding to each SQL query; and, with the de-identification strategies of other SQL queries as covariates, it evaluates the causal impact of the current de-identification strategy of the target SQL query relative to the baseline de-identification strategy on the audit feedback result. The current de-identification strategy of the target SQL query is taken as the first strategy, and the de-identification strategies corresponding to the preset conservative tendency parameter and the maximum de-identification intensity parameter are taken as the baseline de-identification strategies. Under the condition that the desensitization strategies for other SQL queries remain unchanged, estimate the probability that the audit task will fail when the first strategy and the baseline desensitization strategy are adopted respectively, and determine the causal effect based on the difference between the two probabilities; The feedback delay is determined based on the query execution time and the feedback time; when the feedback delay exceeds a preset delay threshold, the weight of the corresponding historical audit feedback sample in the causal impact assessment is reduced according to a preset time decay rule, wherein the time decay rule makes the longer the feedback delay, the lower the weight of the corresponding historical audit feedback sample. Based on the causal impact, the reasons for audit failure, and the delay between the query execution time and the feedback time, update the de-identification strategy corresponding to the target SQL query.

10. A computer device comprising a processor and a memory, wherein the memory stores a computer program, characterized in that, When the computer program is executed by the processor, it causes the computer device to perform the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Method for constructing articulation relationship knowledge graph and financial statement checking method and device

    CN112182250A

  • Extensible dynamic data desensitization system and method

    CN116305240A

  • Determining privacy risk for database queries

    US20120023586A1