Data query method, related device, equipment and storage medium

By obtaining and evaluating the risk attributes of the query fields in the data query statement, generating the privacy leakage risk value, deciding whether to execute the query statement, solving the problem of privacy data leakage risk during the data query process, and improving the security of data query.

CN119848935AInactive Publication Date: 2025-04-18安徽省大数据中心

Patent Information

Application Number
CN202510314217.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-17
Publication Date
2025-04-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing technology cannot effectively prevent users from actively querying data that may expose privacy during data query, resulting in low security of data query. How to reduce the risk of private data leakage has become an urgent problem.

Method used

By obtaining at least one query field in the target query statement, the risk attributes of each query field, including distinction and sensitivity, generate the first privacy leakage risk value of the target query statement based on these risk attributes, and decide whether to execute the target query statement.

Benefits of technology

A method of automatically generating privacy leakage risk values ​​based on the risk attributes of the query field is realized, which is used to determine whether to execute target query statements, thereby reducing the risk of privacy data leakage and improving the security of data queries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119848935A_ABST
    Figure CN119848935A_ABST
Patent Text Reader

Abstract

The invention discloses a data query method, a related device, equipment and a storage medium, and the data query method comprises the steps: obtaining at least one query field in a target query statement; determining a risk attribute of each query field, wherein the risk attribute of the query field comprises at least one of the distinction degree and the sensitivity of the query field; based on the risk attribute of each query field, obtaining a first privacy disclosure risk value of the target query statement; and determining whether to execute the target query statement based on the first privacy disclosure risk value. According to the scheme, the leakage risk of private data can be reduced, and the security of data query is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information security technology, and in particular to a data query method and related devices, equipment and storage media. Background Art

[0002] With the development of Internet technology, the application of database technology is becoming more and more extensive. With the rapid development of database technology, data security issues are also receiving more and more attention.

[0003] In the prior art, in order to protect data privacy, in the data query task, after obtaining the user's application permissions, the user is allowed to query the data. However, in actual application scenarios, data query may involve multiple different tasks, and it is impossible to prevent users from actively querying data that may expose privacy, resulting in low security of data query. In view of this, how to reduce the risk of privacy data leakage and improve the security of data query has become an urgent problem to be solved. Summary of the invention

[0004] The main technical problem solved by the present application is to provide a data query method and related devices, equipment and storage media, which can reduce the risk of leakage of privacy data and improve the security of data query.

[0005] In order to solve the above technical problems, the first aspect of the present application provides a data query method, including: obtaining at least one query field in a target query statement; determining the risk attributes of each query field, the risk attributes of the query field including at least one of the discrimination and sensitivity of the query field; based on the risk attributes of each query field, obtaining a first privacy leakage risk value of the target query statement; based on the first privacy leakage risk value, determining whether to execute the target query statement.

[0006] In order to solve the above technical problems, the second aspect of the present application provides a data query device, including: an acquisition module, a determination module, a generation module and an execution module, the acquisition module is used to acquire at least one query field in the target query statement; the determination module is used to determine the risk attributes of each query field, and the risk attributes of the query field include at least one of the discrimination and sensitivity of the query field; the generation module is used to obtain a first privacy leakage risk value of the target query statement based on the risk attributes of each query field; the execution module is used to determine whether to execute the target query statement based on the first privacy leakage risk value.

[0007] In order to solve the above technical problems, the third aspect of the present application provides an electronic device, including a memory and a processor coupled to each other, the memory storing program instructions, and the processor being used to execute the program instructions to implement the data query method in the above first aspect.

[0008] In order to solve the above technical problem, the fourth aspect of the present application provides a computer-readable storage medium, which stores program instructions that can be executed by a processor, and the program instructions are used to implement the data query method described in the first aspect above.

[0009] The above scheme determines the risk data of each query field based on at least one query field in the target query statement, and the risk attribute of the query field includes at least one of the discrimination and sensitivity of the query field, and then obtains the first privacy leakage risk value of the target query statement based on the risk attribute of each query field to determine whether to execute the target query statement. Therefore, based on the risk attribute of the query field in the target query statement, the automatic generation of the first privacy leakage risk value used to characterize the possibility of privacy leakage risk of the target query statement is realized, and the first privacy leakage risk value is related to the discrimination of the query field and the sensitivity of the query field. The first privacy leakage risk value is used as a judgment condition for whether to execute the target query statement, so it can reduce the risk of privacy data leakage and improve the security of data query. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Figure 1 It is a flowchart of an embodiment of the data query method of the present application; Figure 2 It is a schematic diagram of the framework of an embodiment of a data query device of the present application; Figure 3 It is a schematic diagram of the framework of an embodiment of the electronic device of the present application; Figure 4 It is a schematic diagram of a framework of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION

[0011] The scheme of the embodiment of the present application is described in detail below in conjunction with the drawings of the specification.

[0012] In the following description, for the purpose of explanation rather than limitation, specific details such as specific system structures, interfaces, and technologies are provided to facilitate a thorough understanding of the present application.

[0013] The terms "system" and "network" are often used interchangeably in this article. The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the fragment " / " in this article generally indicates that the associated objects before and after are in an "or" relationship. In addition, "many" in this article means two or more than two.

[0014] See also Figure 1 , Figure 1This is a flow chart of an embodiment of the data query method of the present application. Specifically, it may include the following steps: Step S10: Obtain at least one query field in the target query statement.

[0015] In the disclosed embodiment, the target query statement uses Structured Query Language (SQL), which is a database query and programming language used to access data and query, update and manage relational database systems. Structured Query Language is a high-level non-procedural programming language that allows users to work on high-level data structures. It does not require users to specify the storage method for data, nor does it require users to understand the specific data storage method, so different database systems with completely different underlying structures can use the same structured query language as an interface for data input and management.

[0016] It should be noted that the data operation language used by the target query statement is not limited in this application, such as DML, DQL, etc.

[0017] In one implementation scenario, the target query statement is obtained based on the conversion of the natural language question. Specifically, the natural language question can be converted through a preset SQL statement generation model to obtain the target query statement. The preset SQL statement generation model can refer to technical details such as the network model of the Encoder-Decoder architecture, and for the sake of brevity, it will not be repeated here.

[0018] In one implementation scenario, the query fields of the target query statement represent the target information that the user expects to retrieve from the database table. For example, the database stores a table named employees, which stores the fields id, name, and salary. The target query statement is "SELECT name, salary FROM employees WHERE id = 1 (query the name and salary of a specific employee, assuming that the employee ID is 1)". The SELECT clause is followed by the query fields of the target query statement, that is, the data columns that the user expects to obtain. It can be understood that the number of query fields involved in the target query statement may be unique or may not be unique, and is not limited in this application.

[0019] In a specific implementation scenario, the target query statement can be analyzed based on the SQL parser to obtain an abstract syntax tree representing the processing logic of the target query statement, and the query fields in the target query statement can be extracted. The above method can improve the convenience of obtaining at least one query field in the target query statement.

[0020] It should be noted that the above-mentioned method of obtaining the query field is only a possible implementation example, and the method of obtaining at least one query field in the target query statement is not limited in this application.

[0021] Step S20: determining the risk attribute of each query field, where the risk attribute of the query field includes at least one of the discrimination and sensitivity of the query field.

[0022] In one implementation scenario, the risk information is the discrimination of the query field. The discrimination can represent the ease of leaking specific information when filtering data through the corresponding field. Data with high discrimination has high identification. That is to say, the higher the discrimination of data in the query results, the higher the possibility of leaking private data, such as user ID.

[0023] In a specific implementation scenario, for each query field, the number of values ​​of the query field in the data set and the total number of records contained in the data set are counted, the ratio between the number of values ​​of each query field and the total number of records is obtained, the target numerical range of the ratio corresponding to the query field is determined, and the discrimination mapped by the target numerical range is used as the discrimination of the query field. For example, a query field has 100 different values ​​in the data set, and the total number of records is 1000. The ratio between the number of values ​​of the query field and the total number of records is calculated to be 10%. The pre-set score ranges include A (100% to 90%), B (89.9% to 60%), and C (59.9% to 0%), that is, the ratio between the number of values ​​of the query field and the total number of records is 10%, which belongs to the target score range A. The discrimination mapped by the target numerical range A is 0.1, that is, the discrimination of the query field is 0.1. Correspondingly, the discrimination mapped by the target numerical range B can be set to 0.5, that is, the larger the ratio between the number of values ​​of the query field and the total number of records, the higher the discrimination corresponding to the query field. It should be noted that the discrimination mapped by the target numerical range in the above embodiment is only a possible implementation method. The mapping relationship between the numerical range and the discrimination is not limited in this application, and can be either a linear relationship or a nonlinear relationship.

[0024] In one implementation scenario, the risk information is the sensitivity of the query field. The sensitivity can represent the confidentiality level of the corresponding field itself. The more confidential information is involved in the highly sensitive data, the higher the protection level is. In other words, the more sensitive the data in the query results, the higher the possibility of leaking private data, such as a history of major diseases.

[0025] In a specific implementation scenario, for each query field, a query is made in a preset sensitive field set to determine whether the query field exists, a query result of the query field is obtained, and the sensitivity of the query field is determined based on the query result of the query field.

[0026] In a specific implementation scenario, a preset sensitive field set has several candidate fields preset, each candidate field is annotated with identification information representing the sensitivity of the corresponding candidate field, and the identification type of the identification information is not limited, for example, the candidate field is identified by "high level", "medium level" and "low level", or the candidate field is identified based on a score system, etc. Specifically, the value range of the identification information of each candidate field is 0 to 10, and the higher the score system corresponding to the identification information, the higher the sensitivity of the candidate field. In some possible implementation scenarios, there may be more than one way to annotate the identification information of the candidate field in the preset sensitive field set. After the candidate field corresponding to the query field is found in the preset sensitive field set, the identification information of the candidate field is converted into the sensitivity of the same format, for example, the same format is a scoring system of 0 to 1, the identification information with the identification information of "medium level" is converted into a sensitivity with a score value of "0.5", and the identification information with the identification information of 0 to 10 scoring system and a score value of "7" is converted into a sensitivity with a score value of "0.7", so as to achieve the unification of the sensitivity measurement unit, improve the accuracy of the sensitivity of the target query statement, and enhance the security of data query.

[0027] In a specific implementation scenario, when a query field exists in the preset sensitive field set, the query result of the query field includes the corresponding sensitivity. When the query field does not exist in the preset sensitive field set, the query result of the query field is an identifier indicating that the query field is insensitive.

[0028] In one implementation scenario, before determining the risk attributes of each query field, each query field is preliminarily screened, for example, based on a preset sensitive field set and a preset distinguishing field set, the preset distinguishing field set only includes candidate fields whose distinguishing degree is greater than a preset distinguishing threshold, and the preset sensitive field set only includes candidate fields whose sensitivity is greater than a preset sensitive threshold. Query fields that neither belong to the preset sensitive field set nor to the preset distinguishing field set are filtered or their risk attributes are marked as 0 to reduce the complexity of calculating the first privacy leakage risk value of the target query statement.

[0029] Step S30: Based on the risk attribute of each query field, a first privacy leakage risk value of the target query statement is obtained.

[0030] In an implementation scenario, based on the risk attributes of the query field in the target query statement, the first privacy leakage risk value used to characterize the possibility of privacy leakage risk of the target query statement is automatically generated, and the first privacy leakage risk value is related to the discrimination of the query field and the sensitivity of the query field. The first privacy leakage risk value is used as a judgment condition for whether to execute the target query statement, thereby reducing the risk of privacy data leakage and improving the security of data query.

[0031] In an implementation scenario, for each risk attribute, based on the risk attributes of each query field in the target query statement, a statement risk score characterizing the risk attribute of the target query statement is obtained, and the statement risk scores of the target query statement regarding each risk attribute are combined to obtain a first privacy leakage risk value.

[0032] In a specific implementation scenario, the discrimination of each query field is obtained to obtain a first sentence risk score representing the discrimination of the target query statement, the sensitivity of each query field is obtained to obtain a second sentence risk score representing the sensitivity of the target query statement, and based on the sum of the first sentence risk score and the second sentence risk score, a first privacy leakage risk value of the target query statement is obtained.

[0033] In another specific implementation scenario, the discrimination and sensitivity of each query field are obtained. It can be understood that the risk attribute characterization query fields of some query fields have both discrimination and sensitivity, the risk attribute characterization query fields of some query fields have neither discrimination nor sensitivity, the risk attribute characterization query fields of some query fields only have discrimination, and the risk attribute characterization query fields of some query fields only have sensitivity. The discrimination and sensitivity of the query fields are combined to obtain the value characterizing the risk attribute of the query field, and based on the values ​​characterizing the risk attributes of each query field, the first privacy leakage risk value of the target query statement is comprehensively obtained.

[0034] In another implementation scenario, before obtaining the first privacy leakage risk value of the target query statement based on the risk attributes of each query field, the risk impact information in the target query statement is obtained, and the risk impact information includes at least one of the query operation type and the query condition. For example, in the aforementioned embodiment, the target query statement is "SELECT name, salaryFROM employees WHERE id = 1 (query the name and salary of a specific employee, assuming that the employee ID is 1)", the WHERE clause is followed by the query condition, that is, the condition that the user expects to filter, and the query operation type includes a joint query, a transfer query, etc. Based on the risk attributes of each query field and the risk impact information, the first privacy leakage risk value of the target query statement is determined. The above method uses the query operation type and the query condition in the target query statement as the risk impact information, and uses the risk impact information as the reference information for calculating the first privacy leakage risk value, which can further improve the accuracy of the calculation of the first privacy risk leakage value, so as to improve the security of data query.

[0035] In a specific implementation scenario, the target query statement is parsed to obtain a top-down abstract syntax tree. Based on each node in the abstract syntax tree, the query conditions and query operation types in the target query statement are obtained, and then the risk impact information in the target query statement is obtained. For example, the target query statement is parsed to extract key components, such as the selection list (SELECT field), query conditions (WHERE clause), grouping basis (GROUP BY clause) and connection conditions (JOIN clause), and then a top-down abstract syntax tree is generated. The above method can further improve the accuracy of risk impact information acquisition to improve the security of data query.

[0036] In a specific implementation scenario, the second privacy leakage risk value of the target query statement is determined based on the risk attributes of each query field. Specifically, the discrimination value of the target query statement is obtained based on the discrimination of each query field, and the sensitivity value of the target query statement is obtained based on the sensitivity of each query field. The second privacy leakage risk value of the target query statement is obtained based on the discrimination value and the sensitivity value, or the second privacy leakage risk value of the target query statement is obtained comprehensively based on the risk attribute values ​​that characterize the sensitivity and discrimination of each query field.

[0037] In a specific implementation scenario, the risk weight corresponding to each risk impact information is determined, and the risk weight corresponding to the risk impact information represents the importance of the risk impact information to the privacy leakage caused by the target query statement. For example, the greater the impact of the risk impact information on the privacy leakage caused by the target query statement, the greater the corresponding risk weight. On the contrary, the smaller the impact of the risk impact information on the privacy leakage caused by the target query statement, the smaller the corresponding risk weight.

[0038] In a specific implementation scenario, the second privacy leakage risk value is weighted using the risk weights corresponding to each risk impact information to obtain the third privacy leakage risk value corresponding to each risk impact information, and the first privacy leakage risk value is obtained by combining the third privacy leakage risk values ​​corresponding to each risk impact information.

[0039] In another specific implementation scenario, for each risk attribute, based on the risk attributes of each query field in the target query statement, a statement risk score representing the risk attribute of the target query statement is obtained, and the statement risk scores of the target query statement regarding each risk attribute are integrated to obtain a second privacy leakage risk value, and the weighting operation based on the risk weight is to weight the risk attributes of each field to obtain a third privacy leakage risk value. Specifically, the discrimination and sensitivity of each query field can be weighted separately, or the risk attribute values ​​representing the sensitivity and discrimination of each query field can be weighted.

[0040] In a specific implementation scenario, it can be understood that in the scenario with the same discrimination value and the same sensitivity value, when the target query statement contains both a high-discrimination query field and a high-sensitivity query field, the first privacy leakage risk value of the target query statement is higher than the target query statement containing only the high-discrimination query field, and is also higher than the target query statement containing only the high-sensitivity query field. It should be noted that the above embodiment is only one possible implementation method, and other scenarios are not limited in this application.

[0041] Step S40: Determine whether to execute the target query statement based on the first privacy leakage risk value.

[0042] In one implementation scenario, based on at least one query field in the target query statement, the risk data of each query field is determined, and the risk attribute of the query field includes at least one of the discrimination and sensitivity of the query field, and then based on the risk attribute of each query field, the first privacy leakage risk value of the target query statement is obtained to determine whether to execute the target query statement. Therefore, based on the risk attribute of the query field in the target query statement, the automatic generation of the first privacy leakage risk value for characterizing the possibility of privacy leakage risk of the target query statement is realized, and the first privacy leakage risk value is related to the discrimination of the query field and the sensitivity of the query field. The first privacy leakage risk value is used as a judgment condition for whether to execute the target query statement, so that the risk of privacy data leakage can be reduced and the security of data query can be improved.

[0043] In a specific implementation scenario, when the first privacy leakage risk value is lower than a preset threshold, it is determined to execute the target query statement.

[0044] In another specific implementation scenario, when the first privacy leakage risk value is not lower than the preset threshold, any of the following processing is performed: not executing the target query statement, not executing the target query statement and notifying the query-related party, sending a prompt message to the query-related party and executing the target query statement after receiving the target feedback information from the query-related party. The above scheme reduces the reliance on manual review through an automated query audit mechanism, and improves the efficiency and security of data processing.

[0045] It should be noted that the method for setting the preset threshold is not limited in this application, for example, a fixed value is set, or a dynamic setting based on reference information, etc.

[0046] In a specific implementation scenario, the query associated parties include at least one of a query management party and a query initiator, the query management party audits the data to be queried, and the query initiator inputs a target query statement.

[0047] In a specific implementation scenario, a prompt message for modifying the query statement is sent to the query-related party, and after receiving the modification information about the target query statement fed back by the query-related party, a new target query statement is determined based on the modification information, and the new target query statement is executed when the first privacy leakage risk value of the new target query statement is lower than the preset threshold. The above scheme intercepts the target query statement that may involve privacy leakage issues or performs further verification without affecting the normal query of the query initiator, thereby reducing the risk of privacy data leakage and improving the security of data query.

[0048] In a specific implementation scenario, a prompt message for entering identity information is sent to the query related party, and after receiving the identity information fed back by the query related party and the identity information is verified, the target query statement is executed. In the above scheme, when the query initiator queries the query data closely related to itself, the data security of the query data is guaranteed through further identity verification, so the security of data query can be improved.

[0049] In one implementation scenario, the first privacy leakage risk value of the target query statement is predicted by the risk assessment model for the target query statement. The risk assessment model includes at least a field extraction network, an attribute query network, and a risk prediction network connected in sequence. The field extraction network is used to obtain at least one query field of the target query statement, the attribute query network is used to determine the risk attribute of each query field, and the risk prediction network is used to obtain the first privacy leakage risk value based on at least the risk attribute of each query field. The above scheme predicts the first privacy leakage risk value of the target query statement based on the risk assessment model, which can improve the accuracy of data analysis and realize the automatic prediction of the first privacy leakage risk value, thereby improving the security of data query.

[0050] In a specific implementation scenario, as a possible implementation method, a risk assessment model can be pre-trained. The risk assessment model can include but is not limited to a network model of an Encoder-Decoder architecture, etc. The target query statement is input into the risk assessment model, and the output result of the risk assessment model is used as the first privacy leakage risk value of the target query statement. In order to ensure the prediction accuracy of the risk assessment model as much as possible, sample query statements can be collected, and the sample true risk value can be annotated in the sample query statement. On this basis, the sample query statement can be processed based on the risk assessment model to obtain the sample predicted risk value of the sample query statement, so that the network parameters of the risk assessment model can be adjusted based on the difference between the sample true risk value and the sample predicted risk value until the risk assessment model training converges, and the target query statement to be predicted can be processed based on the risk assessment model of the training convergence to obtain the first privacy leakage risk value. It should be noted that the specific processing process of the risk assessment model can refer to the technical details such as the network model of the Encoder-Decoder architecture, which will not be repeated here. The above method uses the trained risk assessment model to predict the target query statement and generate the first privacy leakage risk value, so it can improve the security of data query.

[0051] The above scheme determines the risk data of each query field based on at least one query field in the target query statement, and the risk attribute of the query field includes at least one of the discrimination and sensitivity of the query field, and then obtains the first privacy leakage risk value of the target query statement based on the risk attribute of each query field to determine whether to execute the target query statement. Therefore, based on the risk attribute of the query field in the target query statement, the automatic generation of the first privacy leakage risk value used to characterize the possibility of privacy leakage risk of the target query statement is realized, and the first privacy leakage risk value is related to the discrimination of the query field and the sensitivity of the query field. The first privacy leakage risk value is used as a judgment condition for whether to execute the target query statement, so it can reduce the risk of privacy data leakage and improve the security of data query.

[0052] See also Figure 2 , Figure 2 2 is a schematic diagram of a framework of an embodiment of a data query device 20 of the present application. Figure 2As shown, the data query device 20 includes: an acquisition module 21, a determination module 22, a generation module 23 and an execution module 24, the acquisition module 21 is used to acquire at least one query field in the target query statement; the determination module 22 is used to determine the risk attributes of each query field, and the risk attributes of the query field include at least one of the discrimination and sensitivity of the query field; the generation module 23 is used to obtain a first privacy leakage risk value of the target query statement based on the risk attributes of each query field; the execution module 24 is used to determine whether to execute the target query statement based on the first privacy leakage risk value.

[0053] In the above scheme, the data query device 20 determines the risk data of each query field based on at least one query field in the target query statement, and the risk attribute of the query field includes at least one of the discrimination and sensitivity of the query field, and then obtains the first privacy leakage risk value of the target query statement based on the risk attribute of each query field to determine whether to execute the target query statement. Therefore, based on the risk attribute of the query field in the target query statement, the automatic generation of the first privacy leakage risk value for characterizing the possibility of privacy leakage risk of the target query statement is realized, and the first privacy leakage risk value is related to the discrimination of the query field and the sensitivity of the query field. The first privacy leakage risk value is used as a judgment condition for whether to execute the target query statement, so the risk of privacy data leakage can be reduced and the security of data query can be improved.

[0054] In some disclosed embodiments, the data query device 20 also includes a risk impact information acquisition module (not shown) for acquiring risk impact information in a target query statement before obtaining a first privacy leakage risk value of the target query statement based on the risk attributes of each query field, wherein the risk impact information includes at least one of a query operation type and a query condition; the generation module 23 also includes a first generation module (not shown) for determining a first privacy leakage risk value of the target query statement based on the risk attributes of each query field and the risk impact information.

[0055] In some disclosed embodiments, the first generation module (not shown) also includes a first integration module (not shown), which is used to determine the second privacy leakage risk value of the target query statement based on the risk attributes of each query field, and to determine the risk weight corresponding to each risk impact information; wherein the risk weight corresponding to the risk impact information represents the importance of the risk impact information to the privacy leakage caused by the target query statement; the second privacy leakage risk value is weighted by using the risk weight corresponding to each risk impact information to obtain the third privacy leakage risk value corresponding to each risk impact information; and the first privacy leakage risk value is obtained by combining the third privacy leakage risk values ​​corresponding to each risk impact information.

[0056] In some disclosed embodiments, the first integration module (not shown) also includes a second integration module (not shown), which is used to obtain, for each risk attribute, a statement risk score characterizing the risk attribute of the target query statement based on the risk attribute of each query field in the target query statement; and to obtain a second privacy leakage risk value by integrating the statement risk scores of the target query statement regarding each risk attribute.

[0057] In some disclosed embodiments, the risk impact information acquisition module (not shown) also includes a parsing module (not shown) for parsing the target query statement to obtain a top-down abstract syntax tree; based on each node in the abstract syntax tree, the query condition and query operation type in the target query statement are obtained.

[0058] In some disclosed embodiments, the generation module 23 also includes a third integration module (not shown), which is used to obtain, for each risk attribute, a statement risk score characterizing the risk attribute of the target query statement based on the risk attribute of each query field in the target query statement; and to obtain a first privacy leakage risk value by integrating the statement risk scores of the target query statement regarding each risk attribute.

[0059] In some disclosed embodiments, the execution module 24 also includes a first execution module (not shown), which is used to determine to execute a target query statement in response to the first privacy leakage risk value being lower than a preset threshold; the execution module 24 also includes a second execution module (not shown), which is used to perform any of the following processing in response to the first privacy leakage risk value being not lower than the preset threshold: not executing the target query statement, not executing the target query statement and notifying the query-related party, sending a prompt message to the query-related party and executing the target query statement after receiving the target feedback information from the query-related party.

[0060] In some disclosed embodiments, the query-related parties include at least one of a query manager and a query initiator, and / or the second execution module (not shown) further includes a prompt verification module, which is used to send a prompt message for modifying the query statement to the query-related parties, and after receiving the modification information about the target query statement fed back by the query-related parties, determine a new target query statement based on the modification information, and execute the new target query statement if the first privacy leakage risk value of the new target query statement is lower than a preset threshold; send a prompt message for entering identity information to the query-related parties, and execute the target query statement after receiving the identity information fed back by the query-related parties and the identity information is verified.

[0061] In some disclosed embodiments, the determination module 22 also includes a discrimination determination module (not shown) for counting, for each query field, the number of values ​​of the query field in the data set and the total number of records contained in the data set; obtaining the ratio between the number of values ​​of each query field and the total number of records; determining a target numerical range for the ratio corresponding to the query field, and using the discrimination mapped to the target numerical range as the discrimination of the query field; and / or, the determination module 22 also includes a sensitivity determination module (not shown) for querying, for each query field, whether the query field exists in a preset sensitive field set to obtain a query result for the query field; and determining the sensitivity of the query field based on the query result of the query field.

[0062] In some disclosed embodiments, the data query device 20 also includes a risk assessment model construction module (not shown), and the first privacy leakage risk value of the target query statement is predicted by the risk assessment model for the target query statement. The risk assessment model includes at least a sequentially connected field extraction network, an attribute query network, and a risk prediction network. The field extraction network is used to obtain at least one query field of the target query statement, the attribute query network is used to determine the risk attributes of each query field, and the risk prediction network is used to obtain the first privacy leakage risk value based on at least the risk attributes of each query field.

[0063] See also Figure 3 , Figure 3 : is a schematic diagram of a framework of an embodiment of an electronic device 30 of the present application. The electronic device 30 includes a memory 31 and a processor 32. The memory 31 stores program instructions, and the processor 32 is used to execute the program instructions to implement the steps in any of the above data query method embodiments. For details, please refer to the aforementioned disclosed embodiments, which will not be repeated here. The electronic device 30 may specifically include but is not limited to: a server, a smart phone, a laptop computer, a tablet computer, a self-service machine, etc., which are not limited here.

[0064] Specifically, the processor 32 is used to control itself and the memory 31 to implement the steps in any of the above data query method embodiments. The processor 32 can also be called a CPU (Central Processing Unit). The processor 32 may be an integrated circuit chip with signal processing capabilities. The processor 32 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In addition, the processor 32 can be implemented by an integrated circuit chip.

[0065] In the above scheme, the electronic device 30 determines the risk data of each query field based on at least one query field in the target query statement, and the risk attribute of the query field includes at least one of the discrimination and sensitivity of the query field, and then obtains the first privacy leakage risk value of the target query statement based on the risk attribute of each query field to determine whether to execute the target query statement. Therefore, based on the risk attribute of the query field in the target query statement, the automatic generation of the first privacy leakage risk value for characterizing the possibility of privacy leakage risk of the target query statement is realized, and the first privacy leakage risk value is related to the discrimination of the query field and the sensitivity of the query field. The first privacy leakage risk value is used as a judgment condition for whether to execute the target query statement, so that the risk of privacy data leakage can be reduced and the security of data query can be improved.

[0066] See also Figure 4 , Figure 4 4 is a schematic diagram of a framework of an embodiment of a computer-readable storage medium 40 of the present application. The computer-readable storage medium 40 stores program instructions 41 that can be executed by a processor, and the program instructions 41 are used to implement the steps in any of the above data query method embodiments.

[0067] In the above scheme, the computer-readable storage medium 40 determines the risk data of each query field based on at least one query field in the target query statement, and the risk attribute of the query field includes at least one of the discrimination and sensitivity of the query field, and then obtains the first privacy leakage risk value of the target query statement based on the risk attribute of each query field to determine whether to execute the target query statement. Therefore, based on the risk attribute of the query field in the target query statement, the automatic generation of the first privacy leakage risk value for characterizing the possibility of privacy leakage risk of the target query statement is realized, and the first privacy leakage risk value is related to the discrimination of the query field and the sensitivity of the query field. The first privacy leakage risk value is used as a judgment condition for whether to execute the target query statement, so the risk of privacy data leakage can be reduced and the security of data query can be improved.

[0068] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0069] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.

[0070] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0071] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0072] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0073] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.

[0074] If the technical solution of this application involves personal information, the product using the technical solution of this application has clearly informed the personal information processing rules and obtained the individual's voluntary consent before processing the personal information. If the technical solution of this application involves sensitive personal information, the product using the technical solution of this application has obtained the individual's separate consent before processing the sensitive personal information, and at the same time meets the "explicit consent" requirement. For example, on personal information collection devices such as cameras, clear and prominent signs are set to inform that the personal information collection scope has been entered and personal information will be collected. If the individual voluntarily enters the collection scope, it is deemed that he or she agrees to the collection of his or her personal information; or on the device that processes personal information, the personal information processing rules are notified by obvious signs / information, and the individual's authorization is obtained through pop-up information or by asking the individual to upload his or her personal information; among them, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the type of personal information processed.

Claims

1. A data query method, characterized in that: include: Obtain at least one query field in the target query statement; Determining a risk attribute of each of the query fields, wherein the risk attribute of the query field comprises at least one of discrimination and sensitivity of the query field; Based on the risk attribute of each of the query fields, obtaining a first privacy leakage risk value of the target query statement; Based on the first privacy leakage risk value, determine whether to execute the target query statement.

2. The method according to claim 1, characterized in that: Before obtaining the first privacy leakage risk value of the target query statement based on the risk attribute of each query field, the method further includes: Acquire risk impact information in the target query statement, where the risk impact information includes at least one of a query operation type and a query condition; The obtaining, based on the risk attribute of each of the query fields, a first privacy leakage risk value of the target query statement includes: Based on the risk attribute of each of the query fields and the risk impact information, a first privacy leakage risk value of the target query statement is determined.

3. The method according to claim 2, characterized in that The determining, based on the risk attribute of each of the query fields and the risk impact information, a first privacy leakage risk value of the target query statement includes: Based on the risk attribute of each of the query fields, determine the second privacy leakage risk value of the target query statement, and determine the risk weight corresponding to each of the risk impact information; wherein the risk weight corresponding to the risk impact information represents the importance of the risk impact information to the privacy leakage caused by the target query statement; The second privacy leakage risk value is weighted by using the risk weight corresponding to each of the risk impact information to obtain a third privacy leakage risk value corresponding to each of the risk impact information; The first privacy leakage risk value is obtained by combining the third privacy leakage risk values ​​corresponding to the risk impact information.

4. The method according to claim 3, characterized in that: The determining, based on the risk attribute of each of the query fields, a second privacy leakage risk value of the target query statement includes: For each of the risk attributes, based on the risk attributes of each of the query fields in the target query statement, a statement risk score representing the risk attribute of the target query statement is obtained; The second privacy leakage risk value is obtained by synthesizing the statement risk scores of the target query statement with respect to each of the risk attributes.

5. The method according to claim 2, characterized in that: The obtaining risk impact information in the target query statement includes: Parsing the target query statement to obtain a top-down abstract syntax tree; Based on each node in the abstract syntax tree, the query condition and the query operation type in the target query statement are obtained.

6. The method according to claim 1, characterized in that The obtaining, based on the risk attribute of each of the query fields, a first privacy leakage risk value of the target query statement includes: For each of the risk attributes, based on the risk attributes of each of the query fields in the target query statement, a statement risk score representing the risk attribute of the target query statement is obtained; The first privacy leakage risk value is obtained by synthesizing the statement risk scores of the target query statement with respect to each of the risk attributes.

7. The method according to claim 1, characterized in that The determining whether to execute the target query statement based on the first privacy leakage risk value includes: In response to the first privacy leakage risk value being lower than a preset threshold, determining to execute the target query statement; In response to the first privacy leakage risk value being not lower than a preset threshold, any of the following processing is performed: not executing the target query statement, not executing the target query statement and notifying the query-related party, sending a prompt message to the query-related party and executing the target query statement after receiving the target feedback information from the query-related party.

8. The method according to claim 7, characterized in that The query associated party includes at least one of a query management party and a query initiator; And / or, the sending of prompt information to the query related party and executing the target query statement after receiving the target feedback information from the query related party may include any of the following steps: Sending a prompt message for modifying the query statement to the query-related party, and after receiving the modification information about the target query statement fed back by the query-related party, determining a new target query statement based on the modification information, and executing the new target query statement if the first privacy leakage risk value of the new target query statement is lower than a preset threshold; A prompt message for inputting identity information is sent to the query associated party, and after receiving the identity information fed back by the query associated party and the identity information passes verification, the target query statement is executed.

9. The method according to claim 1, characterized in that: The risk attribute includes the discrimination degree, and the determining the risk attribute of each query field includes: For each of the query fields, counting the number of values ​​of the query field in the data set and the total number of records contained in the data set; Obtaining the ratio between the number of values ​​of each query field and the total number of records; Determine a target numerical range in which the ratio corresponding to the query field is located, and use the discrimination mapped by the target numerical range as the discrimination of the query field; And / or, the risk attribute includes sensitivity, and the determining the risk attribute of each query field includes: For each of the query fields, query whether the query field exists in the preset sensitive field set, and obtain the query result of the query field; Based on the query result of the query field, the sensitivity of the query field is determined.

10. The method according to any one of claims 1 to 9, characterized in that: The first privacy leakage risk value of the target query statement is predicted by a risk assessment model for the target query statement. The risk assessment model includes at least a field extraction network, an attribute query network and a risk prediction network connected in sequence. The field extraction network is used to obtain at least one query field of the target query statement, the attribute query network is used to determine the risk attributes of each of the query fields, and the risk prediction network is used to obtain the first privacy leakage risk value based on at least the risk attributes of each of the query fields.

11. A data query device, characterized in that: include: An acquisition module, used to acquire at least one query field in a target query statement; a determination module, configured to determine a risk attribute of each of the query fields, wherein the risk attribute of the query field comprises at least one of a discrimination degree and a sensitivity of the query field; A generating module, configured to obtain a first privacy leakage risk value of the target query statement based on the risk attribute of each query field; An execution module is used to determine whether to execute the target query statement based on the first privacy leakage risk value.

12. An electronic device, characterized in that: It comprises a memory and a processor coupled to each other, wherein the processor is used to execute program instructions stored in the memory to implement the data query method according to any one of claims 1 to 10.

13. A computer-readable storage medium having program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the data query method according to any one of claims 1 to 10 is implemented.

Citation Information

Patent Citations

  • Data processing method and device

    CN109558432A

  • Dynamic data desensitization method, device and equipment based on data consanguinity

    CN116502273A

  • Evaluation report generation method and device, electronic equipment and storage medium

    CN118537114A

  • Query auditing method and device, equipment, storage medium and program product

    CN118643087A

  • Multi-source heterogeneous database SQL statement sensitivity calculation method

    CN119166671A

Cited By

  • AI security monitoring method and system based on database access analysis

    CN120832684A

  • AI security monitoring method and system based on database access analysis

    CN120832684B