Data processing method, device, storage medium and program product

CN122964124APending Publication Date: 2026-10-23ALIBABA DAMO (HANGZHOU) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510511089.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-22
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

然而,敏感标签的覆盖范围有限,对于超出敏感标签覆盖范围的场景,将无法基于敏感标签进行数据脱敏处理,导致数据存在安全问题

Benefits of technology

[0008]在本实施例中,通过对数据访问语句进行解析处理,若解析到数据访问语句为查询类型且属于无敏感标签场景,针对要查询的字段片段可溯源到该字段片段所属的目标字段,若该目标字段的查询结果需要进行脱敏,则对该字段片段的查询结果进行脱敏处理,从而在超出敏感标签覆盖范围的场景中较为有效地保证数据安全。进一步,在解析处理中融合语法解析和血缘解析,能够实现敏感标签在等值关系和数据流动过程中的动态传播和维护,克服了传统方案对静态敏感标签的依赖,增强了在复杂场景下的敏感信息识别能力,提高复杂场景下的数据安全防护。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122964124A_ABST
    Figure CN122964124A_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a data processing method, device, storage medium and program product. In the embodiments of the present application, by analyzing and processing a data access statement, if it is analyzed that the data access statement is of a query type and belongs to a non-sensitive label scenario, the field segment to be queried can be traced to a target field to which the field segment belongs, and if the query result of the target field needs to be desensitized, the query result of the field segment is desensitized, thereby effectively ensuring data security in a scenario beyond the coverage range of a sensitive label. Further, by combining syntax analysis and blood analysis in the analysis and processing, dynamic propagation and maintenance of the sensitive label in an equal relationship and a data flow process can be achieved, the dependence on a static sensitive label in a traditional scheme is overcome, the sensitive information recognition capability in a complex scenario is enhanced, and data security protection in the complex scenario is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of big data and data management technology, and in particular to a data processing method, device, storage medium and program product. Background Technology

[0002] With the rapid development of big data technology, the data scale of data management systems is growing exponentially, while facing increasingly diverse application demands, such as multi-table join queries, dynamic query requirements that allow users to construct query statements on demand, and the need for dynamic flow of data records between different data tables. As the data scale grows and application demands become increasingly diverse, data security has become a key technical challenge that data management systems need to address.

[0003] In some data management systems, sensitive tags are pre-added to sensitive data in data tables. This allows the system to determine whether data contains sensitive tags during queries and to perform de-identification on tagged data, ensuring data security. However, the coverage of sensitive tags is limited. For scenarios outside the coverage of sensitive tags, data de-identification based on sensitive tags cannot be performed, leading to data security issues. Summary of the Invention

[0004] This application provides a data processing method, device, storage medium, and program product to effectively ensure data security in scenarios beyond the coverage of sensitive labels.

[0005] This application provides a data processing method, comprising: obtaining a first data access statement submitted by a first user, the first data access statement being used to access data from a data management system, the data management system including at least one data table, the data table including at least one field; parsing the first data access statement to obtain the access type and access object of the first data access statement, the access object including a target field in a target data table or a field fragment of the target field; if the access type is a query type, the access object includes a field fragment of the target field, and the target field does not have a sensitive label, then tracing back to the target field to which the field fragment belongs, querying the target field and the field fragment of the target field according to the first data access statement respectively, obtaining query results for the target field and the field fragment of the target field respectively; if it is identified that the query result of the target field needs to be de-identified, then de-identifying the query result of the field fragment to obtain the de-identified query result corresponding to the field fragment.

[0006] This application embodiment also provides a data processing method, including: receiving a first data access statement submitted by a first user, the first data access statement being used to access data from a data management system, the data management system including at least one data table, the data table including at least one field; parsing the first data access statement to obtain the access type and access object of the first data access statement, the access object including a target field in the target data table; if the access type is an equality query type, the target field includes a first field and a second field that need to satisfy equality conditions, performing an equality query on the first field and the second field according to the first data access statement to obtain an equality query result; if either the first field or the second field has a sensitive label, performing desensitization processing on the first field and the second field in the equality query result according to the sensitive label to obtain a desensitized equality query result.

[0007] This application embodiment also provides a data processing method, including: receiving a first data access statement submitted by a first user, the first data access statement being used to access data from a data management system, the data management system including at least one data table, the data table including at least one field; parsing the first data access statement to obtain the access type and access object of the first data access statement, the access object including a target field in a target data table; if the access type is a data flow type, the target data table including a first data table and a second data table, performing lineage analysis on the first data table, the second data table, and the target field to obtain the flow path of the target field from the first data table to the second data table; if the target field has a sensitive tag in the first data table, adding a sensitive tag to the target field after the target field flows to the second data table, so as to perform desensitization processing on the target field when querying the target field from the second data table.

[0008] In this embodiment, by parsing the data access statement, if the parsed statement is a query type and belongs to a scenario without sensitive tags, the queried field fragment can be traced back to the target field to which it belongs. If the query result for the target field needs to be desensitized, then the query result for that field fragment is desensitized, thereby effectively ensuring data security in scenarios beyond the coverage of sensitive tags. Furthermore, by integrating syntax parsing and lineage parsing in the parsing process, dynamic propagation and maintenance of sensitive tags can be achieved in equivalence relationships and data flow processes. This overcomes the reliance on static sensitive tags in traditional solutions, enhances the ability to identify sensitive information in complex scenarios, and improves data security protection in complex scenarios. Attached Figure Description

[0009] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0010] Figure 1 A flowchart illustrating a data processing method provided in an exemplary embodiment of this application;

[0011] Figure 2 A flowchart illustrating another data processing method provided as an exemplary embodiment of this application;

[0012] Figure 3 A flowchart illustrating yet another data processing method provided as an exemplary embodiment of this application;

[0013] Figure 4 A flowchart illustrating a data processing method in a real-world scenario provided as an exemplary embodiment of this application;

[0014] Figure 5 A schematic diagram of the structure of a data processing apparatus provided in an exemplary embodiment of this application;

[0015] Figure 6 A schematic diagram of the structure of another data processing apparatus provided as an exemplary embodiment of this application;

[0016] Figure 7 A schematic diagram of the structure of yet another data processing apparatus provided as an exemplary embodiment of this application;

[0017] Figure 8 This is a schematic diagram of the structure of an electronic device provided as an exemplary embodiment of this application. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0019] It should be noted that, in the cases involving user information in the embodiments of this application, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the embodiments of this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse. In addition, the various models involved in this application (including but not limited to language models or large models) comply with relevant laws and standards.

[0020] Additionally, it should be noted that when user interaction operations or triggering operations are involved in the embodiments of this application, these operations include, but are not limited to, various interaction methods such as touch operations, gesture operations, voice operations, head movement operations, and eye movement operations. Touch operations include, but are not limited to, click operations, double-click operations, long-press operations, swipe operations, pinch operations, or mouse hover operations. Swipe operations include, but are not limited to, straight-line swipes and curved-line swipes.

[0021] With the increasing scale of data and the growing diversity of application needs, data security has become a key technical challenge that data management systems need to address. Some data management systems pre-add sensitive tags to sensitive data in tables. This allows them to determine whether data contains sensitive tags during queries and to perform de-identification on tagged data, ensuring data security. However, the coverage of sensitive tags is limited. For scenarios outside the coverage of sensitive tags, de-identification based on these tags is impossible, leading to data security issues.

[0022] To address the aforementioned technical issues, in this application embodiment, for query scenarios without sensitive tags, if it is necessary to query a field segment without sensitive tags, the query can be traced back to the target field to which the field segment belongs. If the query result of the target field needs to be desensitized, the query result of the field segment is desensitized, thereby effectively ensuring data security in scenarios beyond the coverage of sensitive tags.

[0023] Furthermore, by integrating syntax parsing and lineage parsing into the parsing process, it is possible to dynamically propagate and maintain sensitive labels in the process of equivalence relations and data flow. This overcomes the dependence of traditional solutions on static sensitive labels, enhances the ability to identify sensitive information in complex scenarios, and improves data security protection in complex scenarios.

[0024] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.

[0025] Figure 1 A flowchart illustrating a data processing method provided in an exemplary embodiment of this application is shown below. Figure 1 As shown, the method may include the following steps:

[0026] Step 11: Obtain the first data access statement submitted by the first user. The first data access statement is used to access data in the data management system. The data management system includes at least one data table, and the data table includes at least one field.

[0027] Step 12: Parse the first data access statement to obtain the access type and access object of the first data access statement. The access object includes the target field in the target data table or a field fragment in the target field.

[0028] Step 13: If the access type is a query type, the access object includes a field fragment in the target field, and the target field does not have a sensitive label, then trace back to the target field to which the field fragment belongs, and query the target field and field fragment respectively according to the first data access statement to obtain the query results of the target field and field fragment respectively;

[0029] Step 14: If the query results of the target field are identified as needing to be de-identified, then the query results of the field fragment are de-identified to obtain the de-identified query results corresponding to the field fragment.

[0030] In this embodiment, the first user refers to the data user, that is, the user who needs to access and use the data. The first user can submit a first data access statement, which can be used to access data from the data management system. It can be a data query language (DQL), a data manipulation language (DML), or a data control language (DCL), etc., and this embodiment does not impose any restrictions.

[0031] The data management system can be any type of system, such as various types of databases, data warehouses, or distributed file systems. It can also be a cloud-based data management system or a local data management system; this embodiment is not limited to any particular type. A data warehouse is a large-scale database system designed specifically for analytical purposes, supporting complex queries and large-scale data processing. A distributed file system can distribute data across multiple servers to provide high reliability and scalability.

[0032] The data management system can be implemented using any type of programming language. It can be based on SQL (Structured Query Language) or Non-SQL (Unstructured Query Language).

[0033] This embodiment does not limit the submission method of the first user submitting the first data access statement. In an exemplary embodiment, the first user may submit a data access statement created on demand or a target statement selected by the user from multiple preset access statements through an SQL query tool, a preset statement submission script, or an API (Application Programming Interface) interface with statement submission function, etc., as the first data access statement. This embodiment does not limit this.

[0034] In this embodiment, the data management system may include at least one data table. The data table is the basic building block of the data management system, and each data table represents a collection of information about a specific topic or entity. Each data table may consist of at least one field, which can be used to define the specific type of information stored in the data table, such as integers, floating-point numbers, strings, dates, etc.

[0035] After obtaining the first data access statement submitted by the first user, the first data access statement can be parsed to obtain the access type and access object. Taking a data management system based on SQL (Structured Query Language) as an example, the first data access statement can be an SQL statement, which may include at least one of the following: database commands, description information of the access object, function expressions, and conditions. The description information of the access object is used to describe the attributes of the access object; the function expression is used to perform calculations, convert data types, or format output; the conditions are used to filter data to determine which records should be selected, updated, or deleted; the database command may include any type of command, such as the select command, insert command, or delete command.

[0036] This application does not limit the parsing processing method in the embodiments. Optionally, a preset SQL parsing library can be used to parse the first data access statement. The SQL parsing library refers to a software library or tool used to parse SQL statements, which can convert the first data access statement into a structured representation, such as an abstract syntax tree (AST), so as to further analyze the access type and access object of the first data access statement based on the abstract syntax tree (AST); Optionally, keyword and pattern matching can be performed on the first data access statement based on regular expressions for parsing processing; Optionally, the first data access statement can also be parsed based on a pre-trained statement parsing model with parsing processing capabilities.

[0037] In this context, the access object refers to an object within the data management system that needs to be accessed. This refers to one or more fields in one or more data tables within the data management system. For ease of distinction and description, the data table to be accessed is referred to as the target data table. The target data table can be any one or more data tables, and this embodiment does not impose any restrictions. The target data table may include only fields without sensitive labels, or it may include fields with and without sensitive labels. For ease of explanation, the field to be accessed in the target data table is referred to as the target field. The target field can be an atomic field, i.e., an indivisible field, allowing only a complete query on the entire target field; or it can be a field containing at least one field fragment, allowing queries on a portion of the target field fragment. Therefore, the access object may include the target field in the target data table or a field fragment within the target field, and this embodiment does not impose any restrictions. When the access object is a target field in the target data table, it means that the data to be accessed belongs to a complete field; when the access object is a field fragment within the target field, it means that the data to be accessed belongs to a specific field fragment. Taking the serial number ABCDE as an example, you can query the entire serial number, in which case the access object is ABCDE; or you can query the first three digits of the serial number, in which case the access object is ABC.

[0038] Various functions can be used to process fields to determine the field segments to be queried; for example, string manipulation functions, truncation functions, or rounding functions. Truncation functions are used to extract partial characters from a string and can handle data with fixed formats, such as phone numbers and ID numbers. Truncation functions include, but are not limited to, the SUBSTR or SUBSTRING functions. Rounding functions can be used to process numeric data, such as rounding, rounding up, or rounding down. For example, the ROUND function can be used to round numbers; the CEIL / CEILING function can be used to round numbers up; and the FLOOR function can be used to round numbers down. String manipulation functions can be used to manipulate text data, such as concatenation, replacement, and case conversion, such as the CONCAT, UPPER, or LOWER functions. The CONCAT function concatenates multiple strings into one string, UPPER converts a string to uppercase, and LOWER converts a string to lowercase.

[0039] Access type refers to the type of database access performed by a data access statement. It can be categorized based on the function of the data access statement, such as insert, query, delete, or data transfer types.

[0040] In data access statements, the database commands included are query commands, and the access type that aims at the query results is also a query type. The query command can be a select statement. An example of a data access statement is as follows:

[0041] Suppose we have a table named `employees` that stores employee information, including `id` (employee ID), `name` (name), `salary` (salary), and `department_id` (department ID). If we need to query the information of all employees whose salary is greater than 50,000, the data access statement could be:

[0042] SELECT id,name,salary,department_id

[0043] FROM employees

[0044] WHERE salary > 50,000;

[0045] In a data access statement, the database command included is an insert command, and the access type that targets the query result is also an insert type. The insert command can be `INSERT`. An example of a data access statement is as follows:

[0046] Suppose there are two tables: `source_table`, which stores the source data, and `target_table`, which stores the data filtered from `source_table`. If we need to insert employee information from `source_table` whose salary is greater than 50,000 into `target_table`, the data access statement could be:

[0047] INSERT INTO target_table(id, name, salary)

[0048] SELECT id, name, salary

[0049] FROM source_table

[0050] WHERE salary > 50,000;

[0051] In a data access statement, the database command included is a delete command, and the access type targeting the query result is a delete type. The delete command can be `delete`. An example of a data access statement is as follows:

[0052] Suppose there is a table named `employees` that stores employee information, including `id` (employee ID), `name` (name), `salary` (salary), and `department_id` (department ID). If you need to delete all employee records with a salary less than 40,000, the data access statement could be:

[0053] DELETE FROM employees

[0054] WHERE salary < 40,000;

[0055] Furthermore, in this embodiment, the query type may include a non-equivalence query type or an equivalence query type. An equivalence query type can use equivalence operators as comparison operators to query data and find data that matches a specific value. These equivalence operators include, but are not limited to, the equals sign "=", IN, EXISTS, JOIN, and CASE. A query type without equivalence operators is a non-equivalence query type.

[0056] It should be noted that the following three judgment processes need to be performed in step 13: Judgment process 1: whether the access type is a query type; Judgment process 2: whether the access object includes field fragments in the target field; Judgment process 3: whether the target field has sensitive tags.

[0057] In judgment process 1, by parsing the first data access statement, the operation operators contained in the first data access statement and various database logical operators such as SELECT (select) and CREATE (create) can be parsed. Based on the logical operators, the access type can be determined. The SELECT logical operator corresponds to the query type access type, belonging to the query scenario. The combination of the CREATE logical operator and the equality operator (operation operator) corresponds to the equality query type access type, belonging to the equality query scenario. Other cases correspond to the non-equality query type access type, belonging to the non-equality query scenario. Among them, the access object in the non-equality query scenario can be the target field or a field fragment of the target field. Therefore, the non-equality query scenario can include two scenarios: query field fragment and query field.

[0058] In the judgment process 2, the accessed object can be determined as either the entire target field or a fragment of a field within the target field based on its object characteristics. Object characteristics can include length, position, or size, etc., and this embodiment does not impose any limitations.

[0059] In the judgment process 3, it is possible to query whether the metadata of the target field contains sensitive tags; if the metadata of the target field does not contain sensitive tags, it is determined that the target field does not have sensitive tags; if the metadata of the target field contains sensitive tags, it is determined that the target field has sensitive tags.

[0060] The above three judgment processes can be executed in parallel or sequentially. This embodiment does not limit the execution order of the three judgment processes.

[0061] Based on the above, if the access type is a query type, the access object includes a field fragment in the target field, and the target field does not have a sensitive label, this is a scenario without sensitive labels. In this case, the source can be traced back to the target field to which the field fragment belongs. According to the first data access statement, queries are performed on the target field and the field fragment respectively to obtain the query results for the target field and the field fragment.

[0062] In other words, when the access type is query type, if the target field does not have sensitive labels and the current access needs to be to a field fragment within the target field, the target field to which the field fragment belongs can be traced, and queries can be performed on both the field dimension and the field fragment dimension. This allows identification of whether the query results at the field dimension need to be desensitized. If the query results at the field dimension need to be desensitized, it means to some extent that the query results at the field fragment dimension also contain sensitive data. Therefore, the query results at the field fragment dimension are desensitized to improve data security.

[0063] In this embodiment, it is possible to identify whether the query results for the target field require de-identification processing based on at least one of predefined de-identification rules and a pre-trained de-identification information recognition model. The de-identification rules specify the conditions for de-identifying the query results, and the pre-trained de-identification information recognition model has the ability to identify whether the query results require de-identification processing.

[0064] If the query result for the target field is identified as requiring desensitization, then the query result for the field fragment is desensitized to obtain the desensitized query result corresponding to the field fragment. This application does not limit the specific implementation method of the desensitization process; it can be data masking, data encryption, data truncation, or null value replacement, etc. Taking null value replacement as an example, if the query result for the target field is 123456, the desensitized query result obtained by desensitizing the query result for the field fragment can be a null value, such as NULL, an empty string, or other placeholders. Taking partial data masking as an example, if the query result for the target field is 123456, the desensitized query result obtained by desensitizing the first three digits of the query result for the field fragment can be 456.

[0065] In this way, in scenarios where the field fragment to be accessed and its associated field do not have sensitive labels (referred to as a scenario without sensitive labels), the data access statement is parsed. If the parsed data access statement is a query type and belongs to a scenario without sensitive labels, the target field to which the queried field fragment belongs can be traced. If the query result for the target field needs to be desensitized, then the query result for the field fragment is desensitized. Therefore, this embodiment can still identify and desensitize sensitive data in scenarios beyond the coverage of sensitive labels, effectively ensuring data security. Furthermore, the entire process does not rely on predefined sensitive labels, enabling real-time and accurate identification of sensitive information in unlabeled scenarios, and preventing the extraction of sensitive information or adversarial queries through interference functions, thus enhancing data security protection capabilities. Adversarial queries refer to partially querying a field, which can circumvent field-level sensitive rules, and finally combining the various queried fragments to obtain complete field information.

[0066] This application does not limit the specific implementation of step 12, "parse the first data access statement to obtain the access type and access object of the first data access statement." In an exemplary embodiment, the first data access statement can be parsed, and the access type and access object of the first data access statement can be determined based on the parsing result. Specifically, this can be implemented based on the following steps 121-123:

[0067] Step 121: Perform syntax parsing on the first data access statement to obtain at least one database command involved in the first data access statement, the name of the target data table, and the target field or field fragments referenced in the target data table. Taking an SQL statement as an example, the first data access statement can be parsed according to the syntax rules of the SQL language, which define how to construct a valid SQL statement to interact with the database. The database command can be of any type, such as delete, update, insert, select, or combination types.

[0068] Step 122: Determine the access type of the first data access statement based on the type of at least one database command and the combination of at least one database command.

[0069] Step 123: Use the target field or field fragment of the target field referenced in the target data table as the access object of the first data access statement.

[0070] Based on steps 121-123 above, the first data access statement can be parsed and processed to obtain the access type and access object of the first data access statement more accurately.

[0071] Following the above embodiments, the following will explain step 122 in different cases:

[0072] Case 1: If at least one database command is a selection command (i.e., a SELECT / selection type command), it means that there is no equality command in this case, and therefore the equality command is not used as the selection condition. In this case, the access type of the first data access statement is determined to be a non-equality query type.

[0073] Scenario 2: If at least one database command is used in combination, and the combination of these commands indicates that the selection command is the target, and the equality command is not used as the selection condition, then the access type of the first data access statement is determined to be a non-equality query type. For example, in combinations such as a SELECT command + a SUBSTR command, or a SELECT command + a non-equality command, the selection command is the target, and the equality command is not used as the selection condition. Therefore, the access type of the first data access statement can be determined to be a non-equality query type. The SUBSTR command is used to extract substrings, and the non-equality command can filter data based on non-equality conditions (such as ">", "<", "!=", etc.).

[0074] Case 3: If there are multiple database commands, and the combination of multiple database commands indicates that the target is a non-selection command and involves data flow between multiple data tables, then the access type of the first data access statement is determined to be the data flow type.

[0075] In databases, when data needs to flow between multiple tables (i.e., between a source table and a target table), various combined commands can be executed, including but not limited to copying data from one table to another, updating data in the target table, and inserting or updating records based on conditions. In other words, data flow types describe the process of data moving between different data objects (such as tables, views, and files). Data access statements of data flow types typically involve extracting, transforming, and loading data, transferring data from one data source to another target location. When multiple database commands include any of the following combined commands, the combined use of these commands can be considered to involve data flow between multiple tables.

[0076] The following are examples of combined commands: ① The NSERT SELECT command is used to insert data from the source table into the target table. ② The UPDATE FROM command is used to update existing records in the target table based on data from the source table. ③ The MERGE command is used to determine whether to insert a new row or update an existing row based on matching conditions.

[0077] Case 4: If there are multiple database commands, and the combination of multiple database commands indicates that the selection command is the target and the equality command is the selection condition, then the access type of the first data access statement is determined to be the equality query type.

[0078] For example, multiple database commands can be SELECT commands and equality commands. Equality commands can be any one of the following commands, or a combination of at least one: JOIN, IN, EXISTS, CASE, etc. For instance, multiple database commands can be a combination of SELECT and JOIN commands, used to perform join queries on data from multiple tables; multiple database commands can be a combination of SELECT and EXISTS commands, used to query for the existence of records that meet certain conditions using the EXISTS clause; multiple database commands can be a combination of SELECT, JOIN, IN, EXISTS, and CASE commands, allowing for the combination of the characteristics of each command to achieve more complex logic.

[0079] In this way, the access type of the first data access statement can be determined more accurately based on the type of database command and the combination of database commands.

[0080] This application does not limit the specific implementation of step 13, "querying the target field and field fragment according to the first data access statement to obtain the query results for each of the target field and field fragment." In an exemplary embodiment, it can be implemented based on any of the following methods:

[0081] Implementation Method 1: Add a target field as the access object to the first data access statement to obtain a second data access statement; execute the second data access statement to query the target field and the field fragment respectively, obtaining the query results for each. When adding the target field as the access object to the first data access statement, an association relationship can be established between the target field and the field fragment.

[0082] Implementation Method 2: Generate a third data access statement for the target field. The third data access statement is used to query the target field. Execute the third data access statement and the first data access statement respectively to query the target field and the field fragment, and obtain the query results for the target field and the field fragment respectively.

[0083] In other words, Implementation Method 1 modifies the first data access statement to query the target field and field fragments. Implementation Method 2 does not modify the first data access statement, but generates a new data access statement (i.e., the third data access statement) for the target field. The query of the target field and field fragments is achieved by executing the third data access statement and the first data access statement respectively.

[0084] By using either Implementation Method 1 or Implementation Method 2 above, queries can be performed more efficiently on the target field and field fragments, yielding query results for each.

[0085] In some optional embodiments, after querying the target field and field fragments separately, the following two methods can be used to identify whether the query results for the target field need to be anonymized:

[0086] Implementation method A1: Match the query results of the target field with at least one predefined desensitization rule; if the query results of the target field match any of the desensitization rules, it is determined that the query results of the target field need to be desensitized.

[0087] This implementation allows for the pre-setting of one or more desensitization rules for different sensitive information. These rules can include desensitization conditions for the query results, such as regular expressions or sensitive keywords. When the query results for the target field meet any of the desensitization conditions defined in a desensitization rule, it can be determined that the query results for the target field require desensitization. The desensitization rules can be pre-defined as arbitrary rules according to actual needs; this embodiment does not impose any restrictions.

[0088] Implementation method A2: Input the query results of the target field into the pre-trained sensitive information identification model to identify sensitive information. If the query results of the target field are found to contain sensitive information, it is determined that the query results of the target field need to be desensitized.

[0089] This process involves pre-acquiring sample query results and corresponding sensitive information. These results are then input into a sensitive information recognition network. Under the supervision of this sensitive information, the network is trained using the sample query results, with the goal of its loss function converging to a target range. The loss function calculates the error between the sensitive information identified by the network from the sample query results and the actual sensitive information found in the sample query results. This training method enables the sensitive information recognition model to identify whether the query results for a target field contain sensitive information.

[0090] The above implementation methods A1 and A2 can be executed individually or in combination, and this embodiment does not impose any restrictions.

[0091] In this way, based on desensitization rules or pre-trained sensitive information identification models, it is possible to more accurately identify whether the query results of the target field need to be desensitized.

[0092] This application does not limit the specific implementation of step 14, "de-sensitizing the query results of the field fragments to obtain the de-sensitized query results corresponding to the field fragments." In an exemplary embodiment, it can be implemented based on the following steps 141-142:

[0093] Step 141: Obtain the target de-identification algorithm corresponding to the target field from the target field's metadata. The target de-identification algorithm can be the default de-identification algorithm or the de-identification algorithm specified by the second user. Here, unlike the first user, the second user can be either the data management user or the user who generated the data; this embodiment does not impose any restrictions.

[0094] Step 142: Use the target desensitization algorithm to desensitize the query results of the field fragments to obtain the desensitized query results corresponding to the field fragments.

[0095] The metadata of a data table can be divided based on the granularity of its fields. For example, the metadata of a data table may include metadata J1 for field P1, metadata J2 for field P2, and metadata J3 for field P3. Different metadata may have pre-configured corresponding de-identification algorithms. These algorithms can be a default algorithm or a second user-specified algorithm. For example, metadata J1 may have pre-configured de-identification algorithm K1, and metadata J2 may have pre-configured de-identification algorithm K2, and so on. Based on this, the metadata corresponding to the target field can be determined first from the data table's metadata, and then the target de-identification algorithm corresponding to the target field can be determined from the metadata corresponding to the target field.

[0096] The desensitization algorithm can be full masking or partial masking at a specified location. It can also be desensitized through encryption methods, such as AES or DES, or through hashing. This embodiment does not impose any limitations. Full masking refers to replacing the query result of a field fragment with a fixed character or string. Partial masking at a specified location refers to replacing part of the information in the query result of a field fragment, such as masking part of the numbers or characters in sensitive information like phone numbers. Hash masking achieves the desensitization effect by applying a hash function to the query result of the field fragment to generate a fixed-length message digest. Encryption masking refers to generating an encrypted result by applying an encryption function to the query result of the field fragment, preventing unauthorized users from reading the original data, i.e., the query result of the field fragment.

[0097] In this way, the desensitization requirements of different fields are taken into account, and corresponding desensitization algorithms are preset for different fields, thereby achieving more accurate desensitization processing for different fields.

[0098] In some optional embodiments, if the access type is a query type, the access object includes a field fragment in the target field, and the target field has a sensitive label, then the field fragment is queried according to the first data access statement to obtain the query result of the field fragment; the query result of the field fragment is desensitized according to the sensitive label to obtain the desensitized query result corresponding to the field fragment.

[0099] In other words, if the field to which the field fragment belongs has a sensitive label, then after querying the field fragment and obtaining the query results, the effect of the sensitive label of the field can be passed to the field fragment. That is, the field fragment can be equivalent to having the same effect of having a sensitive label. Therefore, the query results of the field fragment can be desensitized according to the sensitive label of the field to obtain the desensitized query results corresponding to the field fragment. Alternatively, the query of the field fragment can be rejected according to the sensitive label of the field. This embodiment does not impose any restrictions.

[0100] In this way, in scenarios with sensitive tags, the sensitivity tag effect can be passed between field fragments based on the relationship between them, thereby efficiently desensitizing the query results of field fragments.

[0101] The above provides a detailed explanation of the case where "the access type is query type" and "the accessed object includes field fragments from the target field". The following section explains the case where "the access type is query type" and "the accessed object includes the target field":

[0102] If the access type is query, the access object includes the target field, and the target field does not have a sensitive label, then the query is performed on the target field according to the first data access statement to obtain the query result for the target field. Based on at least one of the predefined de-identification rules and the pre-trained de-identification information recognition model, it is determined whether the query result for the target field needs de-identification processing. If it is determined that the query result for the target field needs de-identification processing, then the query result for the target field is de-identified to obtain the de-identified query result corresponding to the target field.

[0103] In other words, when the sensitive label of the target field is missing, it can be determined whether the target field needs to be de-identified based on at least one of the de-identification rules and the de-identification information recognition model. The "predefined de-identification rules" and "de-identification information recognition model" have been explained in detail above and can be used here as well.

[0104] In this way, even when the sensitive labels of the target field are missing, it is still possible to accurately identify whether the target field needs to be desensitized, thereby achieving the desensitization of the query results for the target field.

[0105] The above embodiments have described various cases of "access type is query type". Further, the following will describe the two cases of "access type is equal query type" and "access type is data flow type".

[0106] I. Access type is equality query type:

[0107] If the accessed object includes target fields, and the target fields include a first field and a second field that need to meet the equality condition, then perform an equality query on the first field and the second field according to the first data access statement to obtain the equality query result.

[0108] If either the first or second field has a sensitive label, the first and second fields in the equivalence query results are desensitized based on the sensitive label to obtain the desensitized equivalence query results.

[0109] Optionally, in addition to the first and second fields that need to meet the equivalence conditions, the target fields may also include other fields that meet the equivalence conditions. If any of the first, second, and other fields has a sensitive label, the first and second fields in the equivalence query results can be desensitized according to the sensitive label to obtain the desensitized equivalence query results.

[0110] In this way, when the access type is an equality query, the sensitivity label effect can be passed between different fields that meet the equality condition based on the equality condition, thereby efficiently desensitizing the equality query results corresponding to the fields.

[0111] II. The access type is data flow type:

[0112] If the target data table includes a first data table and a second data table, a lineage analysis is performed on the first data table, the second data table, and the target field to obtain the flow path of the target field from the first data table to the second data table. The use of "first" and "second" to limit the "data table" is only used to limit any two different data tables included in the target data table, and does not limit the structural information or other information of these two different data tables.

[0113] In this context, the first data table can be understood as the starting data table, containing the original target fields, and the second data table can be understood as the target data table. Data lineage analysis refers to the process of tracing the flow path and dependencies of data across different tables, fields, or systems. It can be used to understand the source and flow logic of data. The flow path can be used to describe the specific process of how the target field flows from the first data table to the second data table.

[0114] When performing lineage analysis on the first data table, the second data table, and the target field, the source field of the target field in the first data table can be determined. If the field value of the source field has been transformed (such as calculation, concatenation, desensitization, etc.), the transformation logic information of the source field can be recorded, and the flow path of the target field from the first data table to the second data table can be determined based on the transformation logic information, which may include intermediate tables, views, or other processing steps.

[0115] After performing lineage analysis on the first data table, the second data table, and the target field, if the target field has a sensitive label in the first data table, a sensitive label can be added to the target field after it flows to the second data table, so that the target field can be desensitized when querying the target field from the second data table.

[0116] In this embodiment, syntax parsing and lineage parsing are combined in the data flow scenario and applied to the data flow of sensitive data (i.e., target fields with sensitive tags). During the data flow process, through parsing and lineage parsing of data access statements, dynamic propagation / flow of sensitive tags can be achieved in complex access scenarios such as cross-table queries or nested queries. Furthermore, based on the synchronous flow / propagation of sensitive tags, the query results of sensitive data can be de-identified relatively quickly, effectively solving the problem of sensitive tag loss in complex access operations, and providing timely and accurate de-identification of sensitive data throughout the entire flow path.

[0117] Following the above embodiments, this application also provides a data processing method, such as... Figure 2 As shown, the method may include:

[0118] Step 21: Receive the first data access statement submitted by the first user. The first data access statement is used to access data in the data management system. The data management system includes at least one data table, and the data table includes at least one field.

[0119] Step 22: Parse the first data access statement to obtain the access type and access object of the first data access statement. The access object includes the target field in the target data table.

[0120] Step 23: If the access type is an equality query type, the target fields include the first field and the second field that need to meet the equality conditions. Perform an equality query on the first field and the second field according to the first data access statement to obtain the equality query results.

[0121] Step 24: If either the first field or the second field has a sensitive label, perform desensitization processing on the first field and the second field in the equivalence query result according to the sensitive label to obtain the desensitized equivalence query result.

[0122] In this way, when the access type is an equality query, the sensitivity label effect can be passed between different fields that meet the equality condition based on the equality condition, thereby efficiently desensitizing the equality query results corresponding to the fields.

[0123] Optionally, parsing the first data access statement to obtain its access type and access object includes: parsing the first data access statement to obtain at least one database command involved in the first data access statement, the name of the target data table, and the target field or field fragment of the target field referenced in the target data table; determining the access type of the first data access statement based on the type of the at least one database command and the combination of the at least one database command; and using the target field or field fragment of the target field referenced in the target data table as the access object of the first data access statement.

[0124] Optionally, determining the access type of the first data access statement based on the type of the at least one database command and the combination of the at least one database command includes: if the at least one database command is a single selection command, or if the at least one database command is multiple and the combination of multiple database commands indicates that the selection command is the target and the equality command is not the selection condition, then the access type of the first data access statement is determined to be a non-equality query type; if the at least one database command is multiple and the combination of multiple database commands indicates that the non-selection command is the target and involves data flow between multiple data tables, then the access type of the first data access statement is determined to be a data flow type; if the at least one database command is multiple and the combination of multiple database commands indicates that the selection command is the target and the equality command is the selection condition, then the access type of the first data access statement is determined to be an equality query type.

[0125] The detailed implementation methods and beneficial effects of each step in this embodiment have been described in detail in the foregoing embodiments, and will not be elaborated here.

[0126] Following the above embodiments, this application also provides a data processing method, such as... Figure 3 As shown, the method may include:

[0127] Step 31: Receive the first data access statement submitted by the first user. The first data access statement is used to access data in the data management system. The data management system includes at least one data table, and the data table includes at least one field.

[0128] Step 32: Parse the first data access statement to obtain the access type and access object of the first data access statement. The access object includes the target field in the target data table.

[0129] Step 33: If the access type is data flow type, the target data table includes the first data table and the second data table. Perform lineage analysis on the first data table, the second data table, and the target field to obtain the flow path of the target field from the first data table to the second data table.

[0130] Step 34: If the target field has a sensitive label in the first data table, add a sensitive label to the target field after the target field is transferred to the second data table, so as to de-sensitize the target field when querying the target field from the second data table.

[0131] In this way, the sensitive labels can be transferred simultaneously during the data flow of sensitive data (i.e., target fields with sensitive labels), thus enabling timely and accurate desensitization of sensitive data throughout the entire flow path.

[0132] Optionally, parsing the first data access statement to obtain its access type and access object includes: parsing the first data access statement to obtain at least one database command involved in the first data access statement, the name of the target data table, and the target field or field fragment of the target field referenced in the target data table; determining the access type of the first data access statement based on the type of the at least one database command and the combination of the at least one database command; and using the target field or field fragment of the target field referenced in the target data table as the access object of the first data access statement.

[0133] The detailed implementation methods and beneficial effects of each step in this embodiment have been described in detail in the foregoing embodiments, and will not be elaborated here.

[0134] The following section will provide a detailed explanation of the above data processing methods in conjunction with practical application scenarios:

[0135] like Figure 4 As shown, the first data access statement submitted by the first user can be obtained first, i.e. Figure 4 The user's SQL statement is shown below. Subsequently, depending on the scenario, at least one of the following three operations can be performed on the first data access statement: SQL parsing, multidimensional lineage parsing (column operator parsing), and dynamic generation of source fields. SQL parsing refers to analyzing the SQL statement to understand its syntax and semantic information; multidimensional lineage parsing refers to constructing a dependency network between data tables and fields by parsing the SQL statement, identifying the source, destination, and transformation process of the data; dynamic generation of source fields refers to automatically generating an extended SQL statement containing source fields based on the original SQL statement, i.e., adding source fields to the original SQL statement.

[0136] In this embodiment, the first data access statement can be parsed to obtain its access type and access object. Based on the access type of the first data access statement, the scenario can be divided into scenarios with sensitive tags and scenarios without sensitive tags, depending on whether there are sensitive tags. Scenarios with sensitive tags can be further subdivided into data flow scenarios and equivalent query scenarios, while scenarios without sensitive tags can include source tracing query scenarios.

[0137] The following will provide a detailed explanation based on different scenarios.

[0138] (1) In the data flow scenario, the structure and data can be propagated based on the access type and the access object: Specifically, if the access type is the data flow type, the target data table includes the first data table and the second data table. The lineage of the first data table, the second data table and the target field is analyzed to obtain the flow path of the target field from the first data table to the second data table.

[0139] If the target field has a sensitive label in the first data table, add a sensitive label to the target field after it is transferred to the second data table, so as to de-sensitize the target field when querying it from the second data table.

[0140] For example, the first data access statement submitted by the first user could be:

[0141] INSERT INTO employee_info_test(id, gmt_create, gmt_modified, name, uid, mobile, email, sex, addr)

[0142] SELECT id, gmt_create, gmt_modified, name, uid, mobile, email, sex, addr

[0143] FROM employee_info limit 1;

[0144] The `employee_info_test` and `employee_info` tables are used to insert data into the target table `employee_info_test`. The `INSERT INTO` field specifies the field names to be inserted into, such as `id`, `gmt_create`, `gmt_modified`, `name`, `uid`, `mobile`, `email`, `sex`, and `addr`. The `SELECT` field retrieves data from the source table `employee_info`. The `LIMIT1` field limits the number of results to one. The combined `FROM` statement selects data records from the source table `employee_info` and inserts them into the target table `employee_info_test`. If the `employee_info.mobile` field is marked as sensitive (i.e., the target field has a sensitive label in the first table), then when the target field is transferred to the second table, a sensitive label can be added to the target field, thus desensitizing the `employee_info_test.mobile` field.

[0145] (2) In the equivalence query scenario, after parsing the first data access statement, an equivalence query can be performed. Specifically, if the access type is an equivalence query type, the target fields include the first field and the second field that need to meet the equivalence conditions. An equivalence query is performed on the first field and the second field according to the first data access statement to obtain the equivalence query result. If either the first field or the second field has a sensitive label, the first field and the second field in the equivalence query result are desensitized according to the sensitive label to obtain the desensitized equivalence query result.

[0146] For example, one data table records customer IDs (identity documents) and basic attribute information, such as address and phone number. Another data table records customer IDs and order information, such as which items were purchased. If the requirement is that these two data tables use customer IDs as an equality condition, then records with the same customer ID can be retrieved from both tables and concatenated. The first data access statement submitted by the first user could be:

[0147] SELECTc.customer_id,a.customer_id

[0148] FROM customer c

[0149] LEFT JOIN account a on c.customer_id=a.customer_id

[0150] LIMIT 20;

[0151] The target field can be: LEFT JOIN account a on c.customer_id=a.customer_id.

[0152] Here, `c.customer_id` represents the `customer_id` field from the `customer` table; `a.customer_id` represents the `customer_id` field from the `account` table; `customer` represents the customer information table; and `account` represents the account information table. `LEFT JOIN` performs a left join operation, retaining all records from the `customer` table (left table) and attempting to match them with records from the `account` table (right table). `ON c.customer_id = a.customer_id` specifies the join condition, linking the `customer` and `account` tables through the `customer_id` field. `LIMIT 20` limits the number of results to a maximum of 20 records.

[0153] In the target field, the equal sign "=" is used to indicate the equality condition. The two fields that satisfy the equality condition are customer.customer_id on the right side of the equal sign and a.ccount.customer_id on the left side of the equal sign. If either of the two fields has a sensitive label, the other field can be considered to also need to be desensitized. Therefore, the sensitive labels can be used to desensitize "customer.customer_id" and "account.customer_id" in the equality query results to obtain the desensitized equality query results.

[0154] (3) In source tracing scenarios, the target field of the query can be traced back to the original sensitive field through SQL parsing, source field generation, and field source tracing and desensitization identification, and then desensitization processing can be performed. This will be explained in detail below:

[0155] It can parse the first data access statement submitted by the first user and dynamically generate source fields based on the first data access statement. That is, it rewrites the first data access statement to include source fields and records the relationship between the source fields and the origin fields. Based on the source fields, sensitive tags can be added to the target fields after the data flows to the second data table.

[0156] For query results targeting a specific field, a pre-trained desensitization information recognition model can be used to sample and extract data features. Content pattern recognition can then be employed to identify potential sensitive data within the query results for that field, thus determining whether desensitization is necessary. Specifically, the source field can be referenced for desensitization. If the source field is identified as sensitive data, the query results for the target field are considered to require desensitization. In this case, the corresponding source field can be desensitized, meaning the query results for the target field can also be desensitized to obtain the desensitized query results for that target field. Optionally, the content of the source field can be dynamically removed from the query results returned to the user.

[0157] For example, the first data access statement submitted by the first user could be:

[0158]

[0159]

[0160] The `substr(mobile, start, length)` function is used for string substring extraction, extracting a substring from a string based on a specified starting position and length. For example: `substr(mobile, 1, 1) AS a` extracts a substring of length 1 starting from the first character of the `mobile` field and names it `a`. `substr(mobile, 2, 1) AS b` extracts a substring of length 1 starting from the second character of the `mobile` field and names it `b`. `substr(mobile, 11, 1) AS k` extracts a substring of length 1 starting from the 11th character of the `mobile` field and names it `k`. The ellipsis "..." in the first data access statement indicates that the functions `substr(mobile, 1, 1) AS a` and `substr(mobile, 2, 1) AS b` are used in parallel.

[0161] The dynamically generated SQL statement may include traceability fields related to the "mobile" field. If the traceability fields are identified as sensitive fields, the fields a to k may be desensitized.

[0162] It should be noted that the execution subject of each step of the method provided in the above embodiments can be the same device, or the method can be executed by different devices. For example, the execution subject of steps 11 to 14 can be device A; or the execution subject of steps 11 and 12 can be device A, and the execution subject of steps 13 to 14 can be device B; and so on.

[0163] Furthermore, in some of the processes described in the above embodiments and accompanying drawings, multiple operations appear in a specific order. However, it should be clearly understood that these operations may not be executed in the order they appear herein, or they may be executed in parallel. The operation numbers, such as 11, 12, etc., are merely used to distinguish different operations and do not represent any execution order. Additionally, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel. It should be noted that the descriptions such as "first" and "second" in this document are used to distinguish different messages, devices, modules, etc., and do not represent a sequential order, nor do they limit "first" and "second" to different types.

[0164] Figure 5 This is a schematic diagram of the structure of a data processing apparatus provided as another exemplary embodiment of this application. For example... Figure 5 As shown, the device includes: an acquisition module 501, configured to: acquire a first data access statement submitted by a first user, the first data access statement being used to access data from a data management system, the data management system including at least one data table, the data table including at least one field; a parsing module 502, configured to: parse the first data access statement to obtain the access type and access object of the first data access statement, the access object including a target field in a target data table or a field fragment in the target field; a query module 503, configured to: if the access type is a query type, the access object includes a field fragment in the target field, and the target field does not have a sensitive label, then trace back to the target field to which the field fragment belongs, and query the target field and the field fragment respectively according to the first data access statement to obtain the query results for the target field and the field fragment respectively; and a first desensitization module 504, configured to: if it is identified that the query result of the target field needs desensitization processing, then desensitize the query result of the field fragment to obtain the desensitized query result corresponding to the field fragment.

[0165] Optionally, when parsing the first data access statement to obtain its access type and access object, the parsing module 502 specifically performs the following: syntax parsing of the first data access statement to obtain at least one database command involved in the first data access statement, the name of the target data table, and the target field or field fragment of the target field referenced in the target data table; determining the access type of the first data access statement based on the type of the at least one database command and the combination of the at least one database command; and using the target field or field fragment of the target field referenced in the target data table as the access object of the first data access statement.

[0166] Optionally, when the parsing module 502 determines the access type of the first data access statement based on the type of the at least one database command and the combination of the at least one database command, it is specifically configured to: if the at least one database command is a single selection command, or if the at least one database command is multiple and the combination of multiple database commands indicates that the selection command is the target and the equality command is not the selection condition, then the access type of the first data access statement is determined to be a non-equality query type; if the at least one database command is multiple and the combination of multiple database commands indicates that the non-selection command is the target and involves data flow between multiple data tables, then the access type of the first data access statement is determined to be a data flow type; if the at least one database command is multiple and the combination of multiple database commands indicates that the selection command is the target and the equality command is the selection condition, then the access type of the first data access statement is determined to be an equality query type.

[0167] Optionally, when the query module 503 performs queries on the target field and the field fragment according to the first data access statement to obtain query results for the target field and the field fragment respectively, it is specifically used to: add the target field as an access object to the first data access statement to obtain a second data access statement; execute the second data access statement to query the target field and the field fragment respectively to obtain query results for the target field and the field fragment respectively; or, generate a third data access statement for the target field, the third data access statement being used to query the target field; execute the third data access statement and the first data access statement respectively to query the target field and the field fragment respectively to obtain query results for the target field and the field fragment respectively.

[0168] Optionally, the data processing device may further include a determination module 505, a second desensitization module 506, a third desensitization module 507, a fourth desensitization module 508, and a fifth desensitization module 509.

[0169] Optionally, the determining module 505 is further configured to: match the query result of the target field with at least one predefined desensitization rule; if the query result of the target field matches any of the desensitization rules, determine that the query result of the target field needs desensitization processing; and / or input the query result of the target field into a pre-trained sensitive information identification model to identify sensitive information, and if sensitive information is identified in the query result of the target field, determine that the query result of the target field needs desensitization processing.

[0170] Optionally, when the first desensitization module 504 performs desensitization processing on the query results of the field fragment to obtain the desensitized query results corresponding to the field fragment, it is specifically used to: obtain the target desensitization algorithm corresponding to the target field from the metadata of the target field, wherein the target desensitization algorithm is a default desensitization algorithm or a desensitization algorithm specified by a second user; and use the target desensitization algorithm to perform desensitization processing on the query results of the field fragment to obtain the desensitized query results corresponding to the field fragment.

[0171] Optionally, the second desensitization module 506 is further configured to: if the access type is a query type, the access object includes a field fragment in the target field, and the target field has a sensitive label, then query the field fragment according to the first data access statement to obtain the query result of the field fragment; and perform desensitization processing on the query result of the field fragment according to the sensitive label to obtain the desensitized query result corresponding to the field fragment.

[0172] Optionally, the third desensitization module 507 is further configured to: if the access type is a query type, the access object includes the target field, and the target field does not have a sensitive label, then query the target field according to the first data access statement to obtain the query result of the target field; based on predefined desensitization rules and / or a pre-trained desensitization information recognition model, identify whether the query result of the target field needs desensitization processing; if it is identified that the query result of the target field needs desensitization processing, then perform desensitization processing on the query result of the target field to obtain the desensitized query result corresponding to the target field.

[0173] Optionally, the fourth desensitization module 508 is further configured to: if the access type is an equivalence query type, the access object includes the target field, the target field includes a first field and a second field that need to meet the equivalence condition, perform an equivalence query on the first field and the second field according to the first data access statement to obtain an equivalence query result; if either the first field or the second field has a sensitive label, perform desensitization processing on the first field and the second field in the equivalence query result according to the sensitive label to obtain a desensitized equivalence query result.

[0174] Optionally, the fifth desensitization module 509 is further configured to: if the access type is a data flow type, and the target data table includes a first data table and a second data table, perform lineage analysis on the first data table, the second data table, and the target field to obtain the flow path of the target field from the first data table to the second data table; if the target field has a sensitive tag in the first data table, add a sensitive tag to the target field after the target field flows to the second data table, so as to perform desensitization processing on the target field when querying the target field from the second data table.

[0175] In this embodiment, a user-submitted data access statement can be obtained. This data access statement is used to access data from the data management system, which includes at least one data table and at least one field. The first data access statement is parsed to obtain its access type and access object. The access object includes a target field in the target data table or a field fragment within the target field. For scenarios where the access type is a query without sensitive tags, if it is necessary to query a field fragment without sensitive tags, the target field to which the field fragment belongs can be traced. If the query result of the target field needs to be desensitized, the query result of the field fragment is desensitized, thereby effectively ensuring data security in scenarios beyond the coverage of sensitive tags.

[0176] Figure 6 This is a schematic diagram of the structure of a data processing apparatus provided as another exemplary embodiment of this application. For example... Figure 6 As shown, the device includes:

[0177] The receiving module 601 is configured to: receive a first data access statement submitted by a first user, the first data access statement being used to access data from a data management system, the data management system including at least one data table, the data table including at least one field; the parsing module 602 is configured to: parse the first data access statement to obtain the access type and access object of the first data access statement, the access object including a target field in the target data table; the query module 603 is configured to: if the access type is an equality query type, the target field including a first field and a second field that need to satisfy equality conditions, perform an equality query on the first field and the second field according to the first data access statement to obtain an equality query result; and the desensitization module 604 is configured to: if it is identified that the query result of the target field needs to be desensitized, perform desensitization processing on the query result of the field fragment to obtain the desensitized query result corresponding to the field fragment.

[0178] In this way, when the access type is an equality query, the sensitivity label effect can be passed between different fields that meet the equality condition based on the equality condition, thereby efficiently desensitizing the equality query results corresponding to the fields.

[0179] Figure 7 This is a schematic diagram of the structure of a data processing apparatus provided as another exemplary embodiment of this application. For example... Figure 7 As shown, the device includes: a receiving module 701, configured to: receive a first data access statement submitted by a first user, the first data access statement being used to access data from a data management system, the data management system including at least one data table, the data table including at least one field; a parsing processing module 702, configured to: parse the first data access statement to obtain the access type and access object of the first data access statement, the access object including a target field in a target data table; a lineage analysis module 703, configured to: if the access type is a data flow type, the target data table including a first data table and a second data table, perform lineage analysis on the first data table, the second data table, and the target field to obtain the flow path of the target field from the first data table to the second data table; and an adding module 704, configured to: if the target field has a sensitive tag in the first data table, add a sensitive tag to the target field after the target field flows to the second data table, so as to perform desensitization processing on the target field when querying the target field from the second data table.

[0180] In this approach, by parsing data access statements, if the parsed statement is a query and falls under a scenario without sensitive tags, the queried field fragment can be traced back to its target field. If the query results for that target field require desensitization, then the query results for that field fragment are desensitized. This effectively ensures data security in scenarios beyond the coverage of sensitive tags. Furthermore, by integrating syntax parsing and lineage parsing into the parsing process, dynamic propagation and maintenance of sensitive tags are achieved during equivalence relationships and data flow. This overcomes the reliance on static sensitive tags in traditional solutions, enhances the ability to identify sensitive information in complex scenarios, and improves data security protection in complex environments.

[0181] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 8 As shown, in practice, this electronic device includes a memory 801 and a processor 802.

[0182] Memory 801 is used to store computer programs and can be configured to store various other data to support operation on the computing platform. Examples of this data include instructions for any application or method operating on the computing platform, data structures, contact data, phone book data, messages, pictures, videos, etc.

[0183] In some optional embodiments, processor 802, coupled to memory 801, is configured to execute a computer program in memory 801 for: obtaining a first data access statement submitted by a first user, the first data access statement being used to access data from a data management system, the data management system including at least one data table, the data table including at least one field; parsing the first data access statement to obtain the access type and access object of the first data access statement, the access object including a target field in a target data table or a field fragment of the target field; if the access type is a query type, the access object includes a field fragment of the target field, and the target field does not have a sensitive label, then querying the target field and the field fragment respectively according to the first data access statement to obtain query results for the target field and the field fragment respectively; if it is identified that the query result of the target field needs to be de-identified, then de-identifying the query result of the field fragment is performed to obtain the de-identified query result corresponding to the field fragment.

[0184] Optionally, when the processor 802 parses the first data access statement to obtain the access type and access object of the first data access statement, it specifically performs the following: performs syntax parsing on the first data access statement to obtain at least one database command involved in the first data access statement, the name of the target data table, and the target field or field fragment in the target field referenced in the target data table; determines the access type of the first data access statement based on the type of the at least one database command and the combination usage between the at least one database command; and takes the target field or field fragment in the target field referenced in the target data table as the access object of the first data access statement.

[0185] Optionally, when determining the access type of the first data access statement based on the type of the at least one database command and the combination of the at least one database command, the processor 802 specifically performs the following: if the at least one database command is a single selection command, or if the at least one database command is multiple and the combination of multiple database commands indicates that the selection command is the target and the equivalence command is not the selection condition, then the access type of the first data access statement is determined to be a non-equivalence query type; if the at least one database command is multiple and the combination of multiple database commands indicates that the non-selection command is the target and involves data transfer between multiple data tables, then the access type of the first data access statement is determined to be a data transfer type; if the at least one database command is multiple and the combination of multiple database commands indicates that the selection command is the target and the equivalence command is the selection condition, then the access type of the first data access statement is determined to be an equivalence query type.

[0186] Optionally, when the processor 802 queries the target field and the field fragment respectively according to the first data access statement to obtain the query results of the target field and the field fragment respectively, it is specifically used to: add the target field as an access object to the first data access statement to obtain a second data access statement; execute the second data access statement to query the target field and the field fragment respectively to obtain the query results of the target field and the field fragment respectively; or, generate a third data access statement for the target field, the third data access statement being used to query the target field; execute the third data access statement and the first data access statement respectively to query the target field and the field fragment respectively to obtain the query results of the target field and the field fragment respectively.

[0187] Optionally, the processor 802 is further configured to: match the query result of the target field with at least one predefined desensitization rule; if the query result of the target field matches any of the desensitization rules, determine that the query result of the target field needs desensitization processing; and / or input the query result of the target field into a pre-trained sensitive information identification model to identify sensitive information, and if sensitive information is identified in the query result of the target field, determine that the query result of the target field needs desensitization processing.

[0188] Optionally, when the processor 802 performs desensitization processing on the query results of the field fragment to obtain the desensitized query results corresponding to the field fragment, it specifically performs the following: obtaining the target desensitization algorithm corresponding to the target field from the metadata of the target field, wherein the target desensitization algorithm is a default desensitization algorithm or a desensitization algorithm specified by a second user; and using the target desensitization algorithm to perform desensitization processing on the query results of the field fragment to obtain the desensitized query results corresponding to the field fragment.

[0189] Optionally, the processor 802 is further configured to: if the access type is a query type, the access object includes a field fragment in the target field, and the target field has a sensitive label, then query the field fragment according to the first data access statement to obtain the query result of the field fragment; and perform desensitization processing on the query result of the field fragment according to the sensitive label to obtain the desensitized query result corresponding to the field fragment.

[0190] Optionally, the processor 802 is further configured to: if the access type is a query type, the access object includes the target field, and the target field does not have a sensitive label, then query the target field according to the first data access statement to obtain the query result of the target field; identify whether the query result of the target field needs to be desensitized based on predefined desensitization rules and / or a pre-trained desensitization information recognition model; if the query result of the target field is identified as needing desensitization, then desensitize the query result of the target field to obtain the desensitized query result corresponding to the target field.

[0191] Optionally, the processor 802 is further configured to: if the access type is an equivalence query type, the access object includes the target field, the target field includes a first field and a second field that need to meet the equivalence condition, perform an equivalence query on the first field and the second field according to the first data access statement to obtain an equivalence query result; if either the first field or the second field has a sensitive label, perform desensitization processing on the first field and the second field in the equivalence query result according to the sensitive label to obtain a desensitized equivalence query result.

[0192] Optionally, the processor 802 is further configured to: if the access type is a data flow type, and the target data table includes a first data table and a second data table, perform lineage analysis on the first data table, the second data table, and the target field to obtain the flow path of the target field from the first data table to the second data table; if the target field has a sensitive tag in the first data table, add a sensitive tag to the target field after the target field flows to the second data table, so as to perform desensitization processing on the target field when querying the target field from the second data table.

[0193] In some alternative embodiments, processor 802, coupled to memory 801, is configured to execute a computer program in memory 801 for: receiving a first data access statement submitted by a first user, the first data access statement being used to access data from a data management system, the data management system including at least one data table, the data table including at least one field; parsing the first data access statement to obtain the access type and access object of the first data access statement, the access object including a target field in the target data table; if the access type is an equality query type, the target field includes a first field and a second field that need to satisfy equality conditions, performing an equality query on the first field and the second field according to the first data access statement to obtain an equality query result; if either the first field or the second field has a sensitive label, performing desensitization processing on the first field and the second field in the equality query result according to the sensitive label to obtain a desensitized equality query result.

[0194] In some alternative embodiments, processor 802, coupled to memory 801, is configured to execute a computer program in memory 801 for: receiving a first data access statement submitted by a first user, the first data access statement being used to access data from a data management system, the data management system including at least one data table, the data table including at least one field; parsing the first data access statement to obtain the access type and access object of the first data access statement, the access object including a target field in a target data table; if the access type is a data flow type, the target data table including a first data table and a second data table, performing lineage analysis on the first data table, the second data table, and the target field to obtain the flow path of the target field from the first data table to the second data table; if the target field has a sensitive tag in the first data table, adding a sensitive tag to the target field after the target field flows to the second data table, so as to de-identify the target field when querying the target field from the second data table.

[0195] Furthermore, such as Figure 8 As shown, the electronic device also includes other components such as a communication component 803, a display 804, and a power supply component 805. Figure 8 The diagram only shows some components and does not mean that the electronic device includes only these components. Figure 8 The components shown. Additionally... Figure 8 The components within the dashed box are optional, not mandatory, and their specific requirements depend on the product form of the work node. In this embodiment, the work node can be a terminal device such as a desktop computer, laptop computer, smartphone, or IoT device, or a server-side device such as a conventional server, cloud server, or server array. If the work node in this embodiment is implemented as a terminal device such as a desktop computer, laptop computer, or smartphone, it may include... Figure 8 The components within the dashed box; if the working node in this embodiment is implemented as a server-side device such as a conventional server, cloud server, or server array, it may be omitted. Figure 8 The component within the dashed box.

[0196] The aforementioned memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random-Access Memory (SRAM), Electrically Erasable Programmable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0197] The aforementioned communication component is configured to facilitate wired or wireless communication between the device containing the communication component and other devices. The device containing the communication component can access wireless networks based on communication standards, such as 2G, 3G, 4G / LTE, 5G, or combinations thereof. In one exemplary embodiment, the communication component receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel.

[0198] The aforementioned display includes a screen, which may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a Touch Panel, the screen can be implemented as a touchscreen to receive input signals from the user. The Touch Panel includes one or more touch sensors to sense touches, swipes, and gestures on the Touch Panel. The touch sensors can sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation.

[0199] The aforementioned power supply components provide power to various components within the device in which they reside. These power supply components may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to the device in which they reside.

[0200] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, enables the processor to implement the steps in the image generation method. The computer-readable storage medium includes volatile or non-volatile components, or a combination thereof, and can be removable or non-removable. Examples of computer-readable storage media include, but are not limited to, phase-change random access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random-access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), flash memory or other memory technologies, CD-ROM, Digital Video Disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium.

[0201] Accordingly, this application also provides a computer program product, including a computer program / instructions, which, when executed by a processor, cause the processor to implement the steps in the image generation method. It should be understood that each or a combination of steps in the above method flow can be implemented by a computer program or instructions. Furthermore, these computer programs or instructions can be applied to the processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device, enabling the processor of the general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to function as an apparatus for implementing the corresponding functions in the above method embodiments.

[0202] In this embodiment, a user-submitted data access statement can be obtained. This data access statement is used to access data from the data management system, which includes at least one data table and at least one field. The first data access statement is parsed to obtain its access type and access object. The access object includes a target field in the target data table or a field fragment within the target field. For scenarios where the access type is a query without sensitive tags, if it is necessary to query a field fragment without sensitive tags, the target field to which the field fragment belongs can be traced. If the query result of the target field needs to be desensitized, the query result of the field fragment is desensitized, thereby effectively ensuring data security in scenarios beyond the coverage of sensitive tags.

[0203] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0204] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A data processing method, characterized in that, include: Obtain a first data access statement submitted by a first user. The first data access statement is used to access data in the data management system. The data management system includes at least one data table, and the data table includes at least one field. The first data access statement is parsed to obtain the access type and access object of the first data access statement. The access object includes the target field in the target data table or a field fragment in the target field. If the access type is a query type, the access object includes a field fragment in the target field, and the target field does not have a sensitive label, then the source is traced back to the target field to which the field fragment belongs, and queries are performed on the target field and the field fragment respectively according to the first data access statement to obtain the query results of the target field and the field fragment respectively; If the query results for the target field are identified as requiring desensitization, then the query results for the field fragment are desensitized to obtain the desensitized query results corresponding to the field fragment.

2. The method according to claim 1, characterized in that, The first data access statement is parsed to obtain its access type and access object, including: The first data access statement is parsed to obtain at least one database command involved in the first data access statement, the name of the target data table, and the target field or field fragment in the target field referenced in the target data table. The access type of the first data access statement is determined based on the type of the at least one database command and the combination of the at least one database command. The target field or field fragment of the target field referenced in the target data table is used as the access object of the first data access statement.

3. The method according to claim 2, characterized in that, The access type of the first data access statement is determined based on the type of the at least one database command and the combination of the at least one database command, including: If the at least one database command is a single selection command, or if the at least one database command is multiple database commands, and the combined use of multiple database commands indicates that the selection command is the target and the equivalence command is not the selection condition, then the access type of the first data access statement is determined to be a non-equivalence query type. If there are multiple database commands, and the combined use of multiple database commands indicates that a non-selection command is the target and involves data flow between multiple data tables, then the access type of the first data access statement is determined to be a data flow type. If there are multiple database commands, and the combination of multiple database commands indicates that the selection command is the target and the equality command is the selection condition, then the access type of the first data access statement is determined to be an equality query type.

4. The method according to claim 1, characterized in that, Based on the first data access statement, queries are performed on the target field and the field fragment respectively to obtain the query results for the target field and the field fragment, including: Add the target field as the access object to the first data access statement to obtain a second data access statement; execute the second data access statement to query the target field and the field fragment respectively, and obtain the query results of the target field and the field fragment respectively; or A third data access statement is generated for the target field, and the third data access statement is used to query the target field; the third data access statement and the first data access statement are executed respectively to query the target field and the field fragment respectively, and the query results of the target field and the field fragment are obtained respectively.

5. The method according to any one of claims 1-4, characterized in that, Also includes: The query results for the target field are matched with at least one predefined de-identification rule; If the query results for the target field match any of the de-identification rules, it is determined that the query results for the target field need to be de-identified. and / or The query results of the target field are input into a pre-trained sensitive information identification model to identify sensitive information. If the query results of the target field are found to contain sensitive information, it is determined that the query results of the target field need to be desensitized.

6. The method according to any one of claims 1-4, characterized in that, The query results for the aforementioned field fragment are anonymized to obtain an anonymized query result corresponding to the aforementioned field fragment, including: Obtain the target de-identification algorithm corresponding to the target field from the metadata of the target field. The target de-identification algorithm is either the default de-identification algorithm or the de-identification algorithm specified by the second user. The target desensitization algorithm is used to desensitize the query results of the field fragment to obtain the desensitized query results corresponding to the field fragment.

7. The method according to any one of claims 1-4, characterized in that, Also includes: If the access type is a query type, the access object includes a field fragment in the target field, and the target field has a sensitive label, then the query is performed on the field fragment according to the first data access statement to obtain the query result of the field fragment; The query results of the field fragment are anonymized based on the sensitive tags to obtain the anonymized query results corresponding to the field fragment.

8. The method according to any one of claims 1-4, characterized in that, Also includes: If the access type is a query type, the access object includes the target field, and the target field does not have a sensitive label, then the first data access statement is used to query the target field to obtain the query result of the target field; Based on predefined desensitization rules and / or a pre-trained desensitization information recognition model, identify whether the query results of the target field need to be desensitized; If it is determined that the query results for the target field need to be anonymized, then the query results for the target field are anonymized to obtain the anonymized query results corresponding to the target field.

9. The method according to any one of claims 1-4, characterized in that, Also includes: If the access type is an equality query type, the access object includes the target field, and the target field includes a first field and a second field that need to meet the equality condition. According to the first data access statement, an equality query is performed on the first field and the second field to obtain the equality query result. If either the first field or the second field has a sensitive label, the first field and the second field in the equivalence query result are desensitized according to the sensitive label to obtain the desensitized equivalence query result.

10. The method according to any one of claims 1-4, characterized in that, Also includes: If the access type is a data flow type, the target data table includes a first data table and a second data table. Lineage analysis is performed on the first data table, the second data table, and the target field to obtain the flow path of the target field from the first data table to the second data table. If the target field has a sensitive label in the first data table, a sensitive label is added to the target field after it is transferred to the second data table, so as to perform desensitization processing on the target field when querying the target field from the second data table.

11. A data processing method, characterized in that, include: The system receives a first data access statement submitted by a first user. The first data access statement is used to access data in the data management system, which includes at least one data table and at least one field. The first data access statement is parsed to obtain the access type and access object of the first data access statement, wherein the access object includes the target field in the target data table; If the access type is an equality query type, the target fields include a first field and a second field that need to meet the equality conditions. An equality query is performed on the first field and the second field according to the first data access statement to obtain the equality query result. If either the first field or the second field has a sensitive label, the first field and the second field in the equivalence query result are desensitized according to the sensitive label to obtain the desensitized equivalence query result.

12. A data processing method, characterized in that, include: The system receives a first data access statement submitted by a first user. The first data access statement is used to access data in the data management system, which includes at least one data table and at least one field. The first data access statement is parsed to obtain the access type and access object of the first data access statement, wherein the access object includes the target field in the target data table; If the access type is a data flow type, the target data table includes a first data table and a second data table. Lineage analysis is performed on the first data table, the second data table, and the target field to obtain the flow path of the target field from the first data table to the second data table. If the target field has a sensitive label in the first data table, a sensitive label is added to the target field after it is transferred to the second data table, so as to perform desensitization processing on the target field when querying the target field from the second data table.

13. An electronic device, characterized in that, include: Memory and processor; The memory is used to store a computer program; the processor is coupled to the memory and is used to execute the computer program in the memory to implement the steps of the method according to any one of claims 1-12.

14. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it causes the processor to perform the steps of any one of the methods of claims 1-10, 11, 12 or 13.

15. A computer program product, characterized in that, Includes a computer program / instruction that, when executed by a processor, causes the processor to perform the steps of the method according to any one of claims 1-10, 11, 12, or 13.