WO2025257622A1 - 敏感数据的数据查询方法、电子设备、存储介质及计算机程序产品 - Google Patents
敏感数据的数据查询方法、电子设备、存储介质及计算机程序产品Info
- Publication number
- WO2025257622A1 WO2025257622A1 PCT/IB2025/052757 IB2025052757W WO2025257622A1 WO 2025257622 A1 WO2025257622 A1 WO 2025257622A1 IB 2025052757 W IB2025052757 W IB 2025052757W WO 2025257622 A1 WO2025257622 A1 WO 2025257622A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- data
- sensitive field
- user
- algorithm
- target sensitive
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/33—Querying
- G06F16/335—Filtering based on additional data, e.g. user or group profiles
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/903—Querying
- G06F16/9035—Filtering based on additional data, e.g. user or group profiles
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/62—Protecting access to data via a platform, e.g. using keys or access control rules
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
Definitions
- This disclosure provides a data query method, electronic device, storage medium, and computer program product for sensitive data, effectively reducing the risk of sensitive data leakage.
- One embodiment of this disclosure provides a data query method for sensitive data, applied to a database system.
- the method includes: responding to a query request from an access terminal, querying field data of a target sensitive field in the database system; performing desensitization processing on the field data of the target sensitive field to obtain a desensitized result; encrypting the desensitized result to obtain a ciphertext desensitized result; and sending the ciphertext desensitized result to the access terminal for decryption to obtain the desensitized result.
- Another embodiment of this disclosure provides an electronic device, including: a memory and a processor; the memory is configured to store a computer program; the processor is coupled to the memory and configured to execute the computer program for performing the steps in the data query method for sensitive data.
- a third embodiment of this disclosure provides a computer-readable storage medium storing a computer program, which, when processed... When executed by a processor, the processor is able to implement the steps in the data query method for sensitive data.
- This disclosure provides a computer program product, including a computer program/instructions, which, when executed by a processor, enable the processor to implement the steps in the data query method for sensitive data.
- This disclosure provides a data query method for sensitive data, an electronic device, a storage medium, and a computer program product.
- the database system sequentially performs desensitization and encryption processing on the sensitive data.
- a data protection scheme combining encryption and desensitization is provided.
- the data flowing from the database system is encrypted and desensitized, and the access terminal decrypts the desensitized data, not the sensitive data.
- sensitive data is protected through encryption during data transmission; on the other hand, the access terminal obtains desensitized data, not sensitive data, effectively reducing the risk of sensitive data leakage.
- Figure 1 is a schematic diagram of an application scenario provided by an embodiment of this disclosure
- Figure 2 is a signaling interaction diagram of a data query method for sensitive data provided by an embodiment of this disclosure
- Figure 3 is a flowchart of a data query method for sensitive data provided by an embodiment of this disclosure
- Figure 4 is a system architecture diagram applicable to an exemplary data query method for sensitive data provided by an embodiment of this disclosure
- Figure 5 is a signaling interaction diagram of another data query method for sensitive data provided by an embodiment of this disclosure
- Figure 6 is a structural schematic diagram of a data processing device provided by an embodiment of this disclosure
- Figure 7 is a structural schematic diagram of an electronic device provided by an embodiment of this disclosure.
- the character "/" generally indicates that the preceding and following related objects have an “or” relationship. Furthermore, in the embodiments of this disclosure, “first,””second,””third,” etc., are only used to distinguish the content of different objects. That's all; it has no other special meaning.
- database systems often store sensitive data. To effectively protect this sensitive data, after receiving an access request from a terminal, the database system encrypts the requested data to obtain ciphertext data, which is then transmitted to the terminal, thereby reducing the probability of sensitive data being leaked during data transmission. However, the ciphertext data is presented in plaintext form after being decrypted by the terminal.
- this disclosure provides a data query method, electronic device, storage medium, and computer program product for sensitive data.
- the database system sequentially performs desensitization and encryption processing on the sensitive data. Therefore, a data protection scheme combining encryption and desensitization is provided. What flows out of the database system is encrypted and desensitized data, and what the terminal decrypts is desensitized data, not sensitive data.
- FIG. 1 is a schematic diagram of an application scenario provided by an embodiment of this disclosure.
- a database table includes multiple fields, and a field is a data unit or component that stores a specific type of data in the database table.
- fields provided by the database table there are often some sensitive fields. For example, in an employee information table, "name,”"age,””gender,””date of employment,” and “salary" are all sensitive fields.
- relevant rule configuration personnel such as database administrators, can configure sensitive rules for sensitive fields.
- Sensitive rules can be rules that can be flexibly configured on demand to protect sensitive data. Sensitive rules include, but are not limited to, optional custom de-identification algorithms for sensitive fields, system default de-identification algorithms, custom encryption algorithms, system default encryption algorithms, and authorized user lists.
- Custom desensitization algorithms refer to desensitization algorithms whose parameters can be customized by the accessing user. The system default desensitization algorithm has fixed parameters.
- Custom encryption algorithms refer to encryption algorithms whose parameters can be customized by the accessing user. The system default encryption algorithm has fixed parameters. The visibility of sensitive fields can vary for different accessing users. Specifically, some accessing users only have permission to view a portion of the sensitive field data, meaning the sensitive field is partially visible to them.
- Some accessing users do not have permission to view any sensitive field data, meaning the sensitive field is completely invisible to them. Some accessing users have permission to view all the sensitive field data, meaning the sensitive field is fully visible to them.
- Rule configuration personnel can configure corresponding authorized user lists for sensitive fields as needed.
- Authorized users in the authorized user list have permission to view all or part of the sensitive field data. It is understandable that if an accessing user is not among the authorized users in the authorized user list, they do not have permission to view the sensitive field data.
- default permissions can be set. These default permissions can be flexibly configured as needed. For example, default permissions may include, but are not limited to: not having permission to view sensitive field data, and being granted...
- the rule configuration personnel execute the configuration operation for sensitive fields on the configuration terminal, triggering the configuration terminal to send the sensitive rules to the database system for local storage. This completes the sensitive rule configuration process.
- the database system responds to the query request sent by the access user's terminal, querying sensitive data (i.e., the field data of the requested sensitive fields). Based on the sensitive rules, the database system determines whether the sensitive data needs to be de-identified. If de-identification is required, the sensitive data is de-identified and encrypted sequentially to obtain ciphertext sensitive data.
- the database system sends the ciphertext sensitive data to the access terminal, which decrypts the ciphertext data to obtain de-identified data.
- the data presented on the access terminal is de-identified, not sensitive, greatly reducing the probability of sensitive data leakage.
- the database system determines based on the sensitive rules that it is not necessary to de-identify the sensitive data. It can simply encrypt the sensitive data to obtain the encrypted result. The access terminal then decrypts the encrypted result to obtain the sensitive data.
- Figure 2 is a signaling interaction diagram of a sensitive data query method provided by an embodiment of this disclosure. Referring to Figure 2, the method may include the following steps:
- the access terminal sends a query request to the database system.
- the database system queries the field data of the target sensitive field within the database system.
- the database system performs data anonymization on the target sensitive fields to obtain the anonymized results.
- the database system encrypts the de-identified results to obtain ciphertext de-identified results.
- the database system sends the encrypted and de-identified results to the access terminal.
- the access terminal decrypts the encrypted and anonymized result to obtain the anonymized result.
- the access terminal can be understood as a client of the database system.
- a client can be any device or application capable of initiating requests and interacting with the database system to access and manipulate data.
- Access terminals include, but are not limited to, desktop computers, personal computers, smartphones, tablets, in-vehicle devices, or IoT devices. Of course, the access terminal can also be an application installed on the terminal device; there are no restrictions.
- database systems include, but are not limited to, relational databases, non-relational databases, cloud-native databases, or data warehouses. Which fields in the database tables provided by the database system are sensitive words?
- the access user's terminal sends a query request to the database system.
- the query request can include the field name of the requested field, such as requesting to query "Name", “Age”, “Gender”, “Date of Employment”, “Salary”, etc.
- SQL Structured Query Language
- SELECT Name FROM Employee Information Table which means searching for the "Name” field data from the employee information table.
- the database system can determine whether the requested field is a sensitive field. If the requested field is not a sensitive field, the database system can provide the access terminal with the field data of the queried field. If the requested field is a sensitive field, the database system performs data protection processing on the data of the queried sensitive field and provides the data of the sensitive field with the protected processing to the access terminal.
- the query request sent by the access terminal is encrypted, the database system needs to decrypt the encrypted query request before executing it to improve data access security.
- the sensitive field requested by the access terminal is referred to as the target sensitive field. In practical applications, the method of data protection processing for the target sensitive field is not limited.
- data protection processing for the target sensitive field may simply involve performing de-identification processing on the data of the target sensitive field.
- data protection processing for the target sensitive field may simply involve performing encryption processing on the data of the target sensitive field.
- TLS Transport Layer Security
- the embodiments of this disclosure only allow plaintext data to be visible to the access terminal.
- TLS transmission encryption keys are randomly and automatically generated during the communication session and are beyond the user's control.
- the encryption keys used in this disclosure are user-manageable, and only the key holder can decrypt the data.
- data protection processing for target sensitive fields can involve sequentially performing de-identification and encryption processing on the target sensitive field data.
- the database system can use any de-identification algorithm to de-identify the target sensitive field data without restriction. Further optionally, to improve the flexibility and reliability of de-identification processing and more effectively reduce the risk of sensitive data leakage, it also supports flexible configuration of custom de-identification algorithms and the system default de-identification algorithm for different sensitive fields as needed.
- Custom-defined data masking algorithms refer to algorithms whose parameters can be customized by the user. Therefore, custom-defined algorithms can meet the diverse data masking needs of different users, ranging from minimal to deep privacy protection.
- the system default data masking algorithm has fixed parameters.
- the de-identification algorithms include, but are not limited to, replacement de-identification algorithms, mask de-identification algorithms, hash algorithms, encryption algorithms, etc.
- the replacement de-identification algorithm can replace part or all of the content in sensitive data with non-sensitive content. For example, replacing a real name with "anonymous user" or replacing the last four digits of a phone number with "****".
- the replacement de-identification algorithm can be defined by user-defined algorithm parameters, including but not limited to, replacement mode, replacement length, and reserved position.
- the replacement mode defines which non-sensitive content to use for replacement, including but not limited to, asterisks (*), random characters, and fixed characters.
- the replacement length determines how many digits to replace; for example, a phone number may only display the first three and last four digits, with the middle digits replaced by asterisks.
- the reserved position determines which characters are not retained and which are replaced.
- the mask de-identification algorithm can replace part or all of the content in sensitive data with specific characters (such as asterisks *, X) or other placeholders to hide some sensitive information in the data.
- Masking algorithms are suitable for data with fixed formats, such as phone numbers, credit card numbers, or identity verification numbers. Masking algorithms can be user-defined, with parameters including but not limited to: mask pattern, mask length, and reserved bit positions.
- the mask pattern defines which non-sensitive content is used for masking, such as, but not limited to, asterisks (*), random characters, and fixed characters.
- the mask length determines the number of digits in the mask; for example, a phone number might only display the first three and last four digits, with the middle portion masked.
- the reserved bit positions determine which characters are not retained and which are masked.
- Hash algorithms can use hash functions to convert sensitive data into a fixed-length, irreversible hash value, thereby protecting data privacy. Hash algorithms can be user-defined, with parameters including but not limited to: hash algorithm type, salt value, and number of iterations.
- Hash algorithm types include, but are not limited to, Secure Hash Algorithm 1 (SHAT) and Secure Hash Algorithm 256 (SHA-256). Salt values can be added to random strings to improve hash uniqueness and to increase the number of iterations to enhance security.
- Encryption algorithms can be defined by user-defined parameters, including but not limited to: keys, key derivation functions, and encryption algorithm types.
- Encryption algorithm types include, but are not limited to, symmetric encryption algorithms and asymmetric encryption algorithms.
- different desensitization algorithms can be configured according to the data type and/or sensitivity level of the sensitive field. For example, for numeric sensitive fields, a replacement desensitization algorithm can be used; for text sensitive fields, a mask desensitization algorithm can be used. The higher the sensitivity level of the sensitive field, the higher the security strength of the corresponding desensitization algorithm. For example, arranged in ascending order of sensitivity level, the fields are: Name, Salary, and Account Password. The Name field is partially masked, the Salary field is fully masked, and the Account Password field is de-identified using a hash algorithm.
- the target sensitive fields can be de-identified.
- the de-identification result is obtained by: if the accessing user has configured a custom de-identification algorithm for the target sensitive field, then the custom de-identification algorithm is used.
- the database system performs data masking on the target sensitive fields to obtain the masked result. If the accessing user has not configured a corresponding custom masking algorithm for the target sensitive field, the system's default masking algorithm, which is pre-configured for the target sensitive field, is used to mask the data, yielding the masked result. In practical applications, there are no restrictions on how the database system determines whether an accessing user has configured a corresponding custom masking algorithm for the target sensitive field.
- the database system pre-stores the correspondence between accessing users, sensitive fields, and custom masking algorithms. If the database system finds that the accessing user who initiated the query request has configured a custom masking algorithm for the target sensitive field in the correspondence, the database system confirms that the accessing user has configured the corresponding custom masking algorithm for the target sensitive field; otherwise, the database system confirms that the accessing user has not configured the corresponding custom masking algorithm for the target sensitive field. As another example, if the query request initiated by the accessing user carries a custom masking algorithm, the database system confirms that the accessing user has configured the corresponding custom masking algorithm for the target sensitive field.
- the database system confirms that the user has configured the corresponding custom de-identification algorithm for the target sensitive field. Further, optionally, to improve the flexibility of de-identification processing and meet diverse de-identification needs, the database system can determine whether the user has configured the corresponding custom de-identification algorithm for the target sensitive field by checking whether the query request parses out the de-identification algorithm configuration information.
- the database system in response to parsing out the de-identification algorithm configuration information from the query request, which includes the identifier and algorithm parameters of the custom de-identification algorithm, the database system writes the corresponding algorithm parameters into the custom de-identification algorithm template based on the identifier, thus obtaining the custom de-identification algorithm; in response to not parsing out the de-identification algorithm configuration information from the query request, it is determined that the user has not configured the corresponding custom de-identification algorithm for the target sensitive field.
- the database system can store the system's default de-identification algorithm pre-configured by relevant personnel for each sensitive field, as well as multiple optional custom de-identification algorithm templates.
- a custom desensitization algorithm template can be understood as a custom desensitization algorithm without configured algorithm parameters.
- the template includes one or more fields; filling in one or more algorithm parameters into the corresponding fields yields the custom desensitization algorithm.
- the database system can send identifiers of optional custom desensitization algorithms configured for the target sensitive field to the access terminal. The access terminal can then select an identifier from these identifiers and configure the desensitization algorithm for the target sensitive field based on the selected identifier.
- the access terminal can respond to the user's configuration operation, configuring the corresponding algorithm parameters for the selected algorithm and generating desensitization algorithm configuration information based on the selected identifier and its corresponding algorithm parameters.
- the access terminal initiates a query request, it can include the desensitization algorithm configuration information to indicate to the database system the identifier and algorithm parameters of the custom desensitization algorithm selected by the user for the target sensitive field.
- the database system selects the corresponding custom desensitization algorithm template based on the identifier of the custom desensitization algorithm in the desensitization algorithm configuration information, and fills the algorithm parameters from the desensitization algorithm configuration information into the corresponding custom desensitization algorithm template to obtain... Custom de-identification algorithm.
- the database system can obtain the system default de-identification algorithm pre-configured for the target sensitive field and perform de-identification processing on the field data of the target sensitive field to obtain the de-identification result.
- the database system can configure the same or different encryption algorithms for different fields without restriction.
- the database system can encrypt the field data of any field, including sensitive fields, without restriction.
- the de-identification result obtained by de-identifying the field data of the target sensitive field is encrypted using an encryption algorithm to obtain a ciphertext de-identification result.
- the database system can use any encryption algorithm to encrypt the de-identification result without restriction.
- Custom encryption algorithms refer to encryption algorithms whose algorithm parameters can be customized by the accessing user.
- custom encryption algorithms can meet the diverse encryption needs of different accessing users, ranging from mild to deep privacy protection.
- System default encryption algorithms are encryption algorithms with fixed algorithm parameters. Therefore, the system default encryption algorithm provides a fallback for encryption processing, ensuring the reliability of the encryption process.
- the encryption processing of the de-identification result to obtain the ciphertext de-identification result is implemented as follows: If the accessing user configures a corresponding custom encryption algorithm for the target sensitive field, then the custom encryption algorithm is used to encrypt the de-identification result to obtain the ciphertext de-identification result; if the accessing user does not configure a corresponding custom encryption algorithm for the target sensitive field, then the system default encryption algorithm pre-configured for the target sensitive field is used to encrypt the de-identification result to obtain the ciphertext de-identification result.
- the database system determines whether an accessing user has configured a custom encryption algorithm for the target sensitive field. For example, the database system pre-stores the correspondence between accessing users, sensitive fields, and custom encryption algorithms. If the database system finds that the accessing user initiating the query request has configured a custom encryption algorithm for the target sensitive field, the database system confirms that the accessing user has configured the corresponding custom encryption algorithm for the target sensitive field; otherwise, the database system confirms that the accessing user has not configured the corresponding custom encryption algorithm for the target sensitive field. As another example, if the query request initiated by the accessing user carries a custom encryption algorithm, the database system confirms that the accessing user has configured the corresponding custom encryption algorithm for the target sensitive field.
- the database system confirms that the accessing user has configured the corresponding custom encryption algorithm for the target sensitive field. Further, optionally, to improve the flexibility of encryption processing and meet diverse encryption needs, the database system can determine whether the accessing user has configured the corresponding encryption algorithm for the target sensitive field by querying whether the encryption algorithm configuration information is parsed from the query request.
- Custom encryption algorithms Specifically, in response to a query request, the database system parses the encryption algorithm configuration information, which includes the identifier and parameters of the custom encryption algorithm. Based on the identifier, the corresponding algorithm parameters are written into the custom encryption algorithm template to obtain the custom encryption algorithm.
- the database system fails to parse the encryption algorithm configuration information from the query request, it determines that the accessing user has not configured a corresponding custom encryption algorithm for the target sensitive field.
- the database system can store the system's default encryption algorithm pre-configured for each sensitive field by relevant personnel, as well as multiple optional custom encryption algorithm templates.
- a custom encryption algorithm template can be understood as a custom encryption algorithm without configured algorithm parameters.
- a custom encryption algorithm template includes one or more fields; one or more algorithm parameters are filled into the corresponding fields in the custom encryption algorithm template to obtain the custom encryption algorithm.
- the database system can send the identifiers of optional custom encryption algorithms configured for the target sensitive field to the accessing terminal, allowing the accessing terminal to select the identifier of the custom encryption algorithm from the optional identifiers and configure the encryption algorithm configuration information for the target encryption field based on the selected identifier.
- the access terminal can respond to the access user's configuration operation, configuring the corresponding algorithm parameters for the selected custom encryption algorithm, and generating encryption algorithm configuration information based on the identifier of the selected custom encryption algorithm and its corresponding algorithm parameters.
- the access terminal When the access terminal initiates a query request, it can carry the encryption algorithm configuration information in the query request to indicate to the database system the identifier and algorithm parameters of the custom encryption algorithm selected by the access user for the target sensitive field.
- the database system selects the corresponding custom encryption algorithm template according to the identifier of the custom encryption algorithm in the encryption algorithm configuration information, and fills the algorithm parameters in the encryption algorithm configuration information into the corresponding custom encryption algorithm template to obtain the custom encryption algorithm.
- the query request sent by the access terminal does not carry encryption algorithm configuration information, it is determined that the access user has not configured the corresponding custom encryption algorithm for the target sensitive field.
- the database system can obtain the system default encryption algorithm pre-configured for the target sensitive field to encrypt the de-identification result, obtaining the ciphertext de-identification result.
- the sensitive data query method provided in this disclosure involves the database system sequentially de-identifying and encrypting sensitive data when an access terminal queries it. This provides a data protection scheme combining encryption and de-identification.
- the data flowing from the database system is encrypted and de-identified, and the access terminal decrypts the de-identified data, not the sensitive data.
- sensitive data is protected through encryption during data transmission; on the other hand, the access terminal obtains de-identified data, not sensitive data, effectively reducing the risk of sensitive data leakage.
- FIG. 3 is a flowchart of a sensitive data query method provided in this disclosure. This method is applied to data...
- the library system as shown in Figure 3, may include the following steps:
- the visibility of the same sensitive field may differ for different accessing users, that is, different accessing users have different viewing permissions for the same sensitive field.
- the visibility of a sensitive field to an accessing user can be divided into the following types: the sensitive field is fully visible to the accessing user, the sensitive field is partially visible to the accessing user, and the sensitive field is not visible to the accessing user at all.
- the sensitive field is fully visible to the accessing user, the accessing user is authorized to obtain or view all the field data of the sensitive field, and all the field data of the sensitive field is completely transparent and visible to the accessing user.
- the accessing user When the sensitive field is partially visible to the accessing user, the accessing user is authorized to obtain or view some of the field data of the sensitive field, and a portion of the field data of the sensitive field is transparent and visible to the accessing user; the other portion of the field data of the sensitive field is opaque and invisible to the accessing user.
- Sensitive fields are completely invisible to accessing users. This means that users are not authorized to access or view the data of sensitive fields; all data within sensitive fields is non-transparent and invisible to them.
- the implementation method for identifying the visibility of the target sensitive field to the accessing user corresponding to the access terminal is as follows: Obtain the authorized user list configured for the target sensitive field, where the authorized user list includes the user identifiers of the first authorized user and the second authorized user. The target sensitive field is fully visible to the first authorized user and partially visible to the second authorized user. Match the accessing user's user identifier with the user identifiers in the authorized user list. Based on the matching result, identify the visibility of the target sensitive field to the accessing user. In practical applications, the visibility of the target sensitive field to the accessing user corresponding to the access terminal is identified based on the matching result.
- the target sensitive field is completely invisible or partially visible to the accessing user, then the data of the target sensitive field is anonymized to obtain the anonymized result.
- the target sensitive field is completely invisible to the accessing user, then all the field data of the target sensitive field is anonymized to obtain the anonymized result; if the target sensitive field is partially visible to the accessing user, then the data of that portion of the target sensitive field is anonymized to obtain the anonymized result.
- the target sensitive field is visible to all accessing users, then the field data of the target sensitive field is encrypted to obtain the encrypted result.
- the methods for encrypting the target sensitive field data and encrypting the de-identified result obtained from de-identifying the target sensitive field data are similar or identical, and will not be elaborated further here.
- the encryption result is sent to the access terminal for decryption to obtain the field data of the target sensitive field.
- the database system does not need to perform desensitization processing on the field data of the target sensitive field; it only needs to perform encryption processing.
- the accessing terminal decrypts the encryption result, it can obtain the field data of the target sensitive field in plaintext form. It is understood that even if the accessing terminal can obtain the field data of the target sensitive field in plaintext form, the security of this data protection scheme is still very high because the accessing user is an authorized user.
- the data protection processing for the field data of the target sensitive field only performs desensitization processing on the field data of the target sensitive field, then if the target sensitive field is not visible to the accessing user at all or only partially visible, the field data of the target sensitive field is desensitized to obtain the desensitization result, and the desensitization result is sent to the accessing terminal; if the target sensitive field is fully visible to the accessing user, then the field data of the target sensitive field is sent to the accessing terminal. If the data protection process for a target sensitive field only involves encryption, then if the target sensitive field is completely invisible or only partially visible to the accessing user, then the protection of the target sensitive field...
- the field data is encrypted to obtain the encryption result, and the encryption result is sent to the access terminal. If the target sensitive field is fully visible to the accessing user, the field data of the target sensitive field is directly sent to the access terminal.
- the sensitive data query method provided in this disclosure improves the flexibility of sensitive data protection while ensuring the security of sensitive data. In the above embodiments, there are no restrictions on the authorized user list, system default de-identification algorithm, system default encryption algorithm, optional custom de-identification algorithm template, or optional custom encryption algorithm template configured for sensitive fields in the database system.
- relevant configuration personnel such as database administrators can configure sensitive rules, which may include, but are not limited to: authorized user list, system default de-identification algorithm, system default encryption algorithm, optional custom de-identification algorithm template, or optional custom encryption algorithm template configured for sensitive fields.
- configuration personnel can configure corresponding sensitive rules for data objects at different granularities, such as databases, database tables, and columns, as needed. For example, they can configure uniform sensitive rules for each database, or uniform sensitive rules for each database table, or specific sensitive rules for specific column fields. Sensitive rules can instruct that sensitive field data should not be protected, or that sensitive field data should only be anonymized, or that sensitive field data should only be encrypted, or that sensitive field data should be both encrypted and anonymized.
- the configuration personnel's terminal sends sensitive rules to the database system for local storage.
- the validity of the sensitive rules sent by the configuration terminal can be verified. Only after successful verification will the database system store the sensitive rules locally. Based on this, the database system responds to the sensitive rules and their signature information sent by the configuration terminal; verifies the signature information, and if the signature information verification is successful, saves the sensitive rules locally.
- the sensitive rules can be digitally signed to obtain the signature information of the sensitive rules.
- the configuration terminal can be any device or application capable of initiating a request and interacting with the database system to access and manipulate data.
- Configuration terminals include, but are not limited to, desktop computers, personal computers, smartphones, tablets, in-vehicle devices, or IoT devices.
- the configuration terminal can also be an application installed on the terminal device; there are no limitations on this.
- a scenario embodiment is described below with reference to Figures 4 and 5.
- the decryption component provided by the client provides decryption functionality
- the secure gateway (SecureGW) in the database system provides data protection functionality
- the SQL query engine executes SQL query operations.
- the secure gateway is not limited to... This method can be applied to database systems as well as other application systems.
- Figure 5 is a signaling interaction diagram of another sensitive data query method provided in this embodiment of the present disclosure. Referring to Figure 5, the sensitive data query method may include the following steps:
- 501 User-Configured Sensitive Rules. Users can specify sensitive rules for sensitive fields. These rules can be limited to encryption only, de-identification only, or a combination of both; there are no restrictions.
- the user's client sends the sensitive rules to the security gateway in the database system, and the database system stores these rules locally.
- Initiated SQL Query During the data access phase, the user's client sends an SQL query to the SQL query engine in the database system.
- the SQL query engine executes SQL query operations and obtains plaintext query results.
- the security gateway performs data protection processing on the plaintext query results based on sensitive rules. For example, if the sensitive rule includes an anonymization algorithm, the plaintext query results are anonymized to obtain the plaintext anonymized result. If the sensitive rule includes an encryption algorithm, the plaintext anonymized result is encrypted to obtain the ciphertext anonymized result.
- FIG. 507 Obtain the plaintext de-identification result.
- the ciphertext de-identification result is decrypted by the client's decryption component to obtain the plaintext de-identification result and provide it to the user.
- sensitive rules may not include de-identification or encryption algorithms, that is, no de-identification or encryption processing is required.
- Figure 6 is a schematic diagram of the structure of a data processing device provided in an embodiment of this disclosure.
- the device can be composed of hardware and/or software and can be applied to a database system.
- the device may include: a query component 61, configured to query the field data of the target sensitive field in the database system in response to a query request from an access terminal; a de-identification component 62, configured to perform de-identification processing on the field data of the target sensitive field to obtain a de-identification result; an encryption component 63, configured to encrypt the de-identification result to obtain an ciphertext de-identification result; and a sending component 64, configured to send the ciphertext de-identification result to the access terminal for the access terminal to decrypt the ciphertext de-identification result to obtain the de-identification result.
- a query component 61 configured to query the field data of the target sensitive field in the database system in response to a query request from an access terminal
- a de-identification component 62 configured to perform de-identification processing on the field data of the target sensitive field to obtain a de-identification result
- an encryption component 63 configured to encrypt the de-identification result to obtain an ciphertext de-
- the above-mentioned device further includes an identification trigger desensitization component 62, which performs desensitization processing on the field data of the target sensitive field in response to the target sensitive field being completely or partially invisible to the access user corresponding to the access terminal, and obtains the desensitization result.
- an identification trigger desensitization component 62 which performs desensitization processing on the field data of the target sensitive field in response to the target sensitive field being completely or partially invisible to the access user corresponding to the access terminal, and obtains the desensitization result.
- the desensitization component 62 performs desensitization processing on all field data of the target sensitive field to obtain a desensitization result; in response to the target sensitive field being partially visible to the accessing user, the desensitization component 62 performs desensitization processing on a portion of the field data of the target sensitive field to obtain a desensitization result.
- the encryption component 63 is triggered to encrypt the field data of the target sensitive field to obtain an encryption result; the sending component 64 is further configured to send the encryption result to the accessing terminal so that the accessing terminal can decrypt the encryption result to obtain the field data of the target sensitive field.
- the identification component is configured to: obtain a list of authorized users configured for the target sensitive field, wherein the list of authorized users includes the user identifiers of a first authorized user and a second authorized user, the target sensitive field is fully visible to the first authorized user, and partially visible to the second authorized user; match the user identifier of the accessing user with the user identifiers in the list of authorized users; and, based on the matching result, identify the visibility of the target sensitive field to the accessing user.
- the identification component when the identification component identifies the visibility of the target sensitive field to the accessing user corresponding to the access terminal based on the matching result, it is configured to: in response to the matching result indicating that the user identifier of the accessing user matches the user identifier of the first authorized user, determine that the target sensitive field is fully visible to the accessing user; in response to the matching result indicating that the user identifier of the accessing user matches the user identifier of the second authorized user, determine that the target sensitive field is partially visible to the accessing user; and in response to the matching result indicating that the user identifier of the accessing user fails to match the user identifiers in the list of authorized users, determine that the target sensitive field is not visible to the accessing user at all.
- the desensitization component 62 is configured to: respond to the accessing user configuring a corresponding custom desensitization algorithm for the target sensitive field, then use the custom desensitization algorithm to desensitize the field data of the target sensitive field to obtain a desensitization result; respond to the accessing user not configuring a corresponding custom desensitization algorithm for the target sensitive field, then use the system default desensitization algorithm pre-configured for the target sensitive field to desensitize the field data of the target sensitive field to obtain a desensitization result.
- the desensitization component 62 is further configured to: respond to parsing the desensitization algorithm configuration information from the query request, the desensitization algorithm configuration information including the identifier and algorithm parameters of the custom desensitization algorithm, write the corresponding algorithm parameters into the custom desensitization algorithm template according to the identifier of the custom desensitization algorithm to obtain the custom desensitization algorithm; respond to the failure to parse the desensitization algorithm configuration information from the query request, determine that the accessing user has not configured a corresponding custom desensitization algorithm for the target sensitive field.
- encryption component 63 is configured to: In response to the accessing user configuring a corresponding custom encryption algorithm for the target sensitive field, encrypt the de-identification result using the custom encryption algorithm to obtain the ciphertext de-identification result; In response to the accessing user not configuring a corresponding custom encryption algorithm for the target sensitive field, use the algorithm pre-configured for the target sensitive field.
- the system's default encryption algorithm encrypts the de-identification result to obtain a ciphertext de-identification result.
- the encryption component 63 is further configured to: respond to parsing encryption algorithm configuration information from a query request, the encryption algorithm configuration information including the identifier and algorithm parameters of a custom encryption algorithm, write the corresponding algorithm parameters into a custom encryption algorithm template according to the identifier of the custom encryption algorithm, and obtain a custom encryption algorithm; respond to failure to parse encryption algorithm configuration information from a query request, determine that the accessing user has not configured a corresponding custom encryption algorithm for the target sensitive field.
- the above device further includes: a configuration component, configured to respond to sensitive rules sent by a configuration terminal and signature information of the configuration terminal, the sensitive rules including one or more of the following: a list of authorized users configured for the target sensitive field, the system default de-identification algorithm, the system default encryption algorithm, a custom de-identification algorithm template, and a custom encryption algorithm template; verify the signature information; and, in response to successful signature verification, save the sensitive rules locally.
- a configuration component configured to respond to sensitive rules sent by a configuration terminal and signature information of the configuration terminal, the sensitive rules including one or more of the following: a list of authorized users configured for the target sensitive field, the system default de-identification algorithm, the system default encryption algorithm, a custom de-identification algorithm template, and a custom encryption algorithm template; verify the signature information; and, in response to successful signature verification, save the sensitive rules locally.
- 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.
- the execution subject of steps 301 to 307 can be device A; or the execution subject of steps 301 and 302 can be device A, and the execution subject of steps 303 to 307 can be device B; and so on.
- 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 in this document or may be executed in parallel.
- the operation numbers, such as 301, 302, etc. are merely used to distinguish different operations, and the numbers themselves do not represent any execution order.
- these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel.
- first and “second” used in this document are used to distinguish different messages, devices, components, etc., and do not represent a chronological order, nor do they limit “first” and “second” to different types.
- user information including but not limited to user device information, user personal information, etc.
- data including but not limited to data used for analysis, stored data, displayed data, etc.
- Figure 7 is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure.
- the electronic device includes: a memory 71 and a processor 72; the memory 71 is configured to store computer programs and can be configured to store various other data to support operation on a computing platform. Examples of such data include instructions for any application or method operating on a computing platform, contact data, phone book data, messages, pictures, videos, etc.
- Memory 71 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.
- SRAM Static Random-Access Memory
- EEPROM Electrically Erasable Programmable Read-Only Memory
- EPROM Erasable Programmable Read-Only Memory
- PROM Programmable Read-Only Memory
- ROM Read-Only Memory
- magnetic storage flash memory
- flash memory magnetic disk
- Processor 72 coupled to memory 71, is configured to execute a computer program in memory 71, specifically configured to perform steps in a data query method for sensitive data.
- the electronic device may also include other components such as a communication component 73, a display 74, a power supply component 75, and an audio component 76.
- Figure 7 only schematically shows some components and does not imply that the electronic device only includes the components shown in Figure 7. Furthermore, the components within the dashed boxes in Figure 7 are optional, not mandatory, and their specific inclusion depends on the product form of the electronic device.
- the electronic device in this embodiment can be a desktop computer, laptop computer, smartphone, or IoT (Internet of Things) device, or a server-side device such as a conventional server, cloud server, or server array. If the electronic device in this embodiment is a desktop computer, laptop computer, smartphone, or other terminal device, it may include the components within the dashed boxes in Figure 7; if the electronic device in this embodiment is a conventional server, cloud server, or server array, it may not include the components within the dashed boxes in Figure 7.
- IoT Internet of Things
- this disclosure also provides a computer-readable storage medium storing a computer program, which, when executed, can implement the steps that can be executed by the electronic device in the above method embodiments. Accordingly, this disclosure also provides a computer program product, including a computer program/instructions, which, when executed by a processor, cause the processor to perform the steps executable by an electronic device in the above-described method embodiments.
- the 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 WiFi (Wireless Fidelity), 2G (2 Generation), 3G (3 Generation), 4G (4 Generation)/long Term Evolution (LTE), 5G (5 Generation), or combinations thereof.
- the communication component receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel.
- the communication component further includes a Near Field Communication (NFC) component to facilitate short-range communication.
- NFC Near Field Communication
- NFC components can be based on Radio Frequency Identification (RFID) technology, and the Infrared Data Association (The Infrared Data Association)
- the display is implemented using Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BT) technology, and other technologies.
- 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.
- the aforementioned power supply component provides power to various components of the device in which the power supply component resides.
- the power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device in which the power supply component resides.
- the aforementioned audio component can be configured to output and/or input audio signals.
- the audio component includes a microphone (MIC) configured to receive external audio signals when the device containing the audio component is in an operating mode, such as a call mode, recording mode, or voice recognition mode.
- the received audio signals may be further stored in memory or transmitted via a communication component.
- the audio component also includes a speaker configured to output audio signals.
- embodiments of this disclosure can be provided as methods, systems, or computer program products. Therefore, this disclosure can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this disclosure can take the form of a computer program product embodied on one or more computer-readable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
- This disclosure is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart and/or block diagram, and combinations of blocks in the flowchart and/or block diagram, can be implemented by computer program instructions.
- These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, produce means configured to implement the functions specified in one or more blocks of the flowchart and/or one or more blocks of the block diagram.
- These computer program instructions can also be stored in a computer-readable storage medium capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more blocks of the flowchart and/or one or more blocks of the block diagram.
- a computing device includes one or more processors (Central Processing Unit, CPU), input/output interfaces, network interfaces, and memory.
- Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and/or non-volatile memory, such as read-only memory (ROM) or flash RAM . Memory is an example of computer-readable media.
- Computer-readable media includes both permanent and non-persistent, removable and non-removable media.
- Information storage can be implemented by any method or technology.
- Information can be computer-readable instructions, data structures, components of a program, or other data.
- Examples of computer storage media include, but are not limited to, phase-change RAM (PRAM), static random access memory, dynamic random access memory (DRAM), other types of random access memory, read-only memory, electrically erasable programmable read-only memory, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information that can be accessed by a computing device.
- PRAM phase-change RAM
- DRAM dynamic random access memory
- CD-ROM compact disc
- DVD digital versatile disc
- computer-readable media does not include transient media, such as modulated data signals and carrier waves.
- transient media such as modulated data signals and carrier waves.
- 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 a process, method, article, or apparatus.
- an element defined by the phrase “comprising a" does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
- the solution provided in this disclosure can be applied to the data query process.
- it queries the field data of a target sensitive field in the database system; it performs desensitization processing on the field data of the target sensitive field to obtain a desensitization result; it encrypts the desensitization result to obtain a ciphertext desensitization result; and it sends the ciphertext desensitization result to the access terminal for decryption to obtain the desensitized result, thereby solving the technical problem of high risk of sensitive data leakage.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Software Systems (AREA)
- Computer Security & Cryptography (AREA)
- Computer Hardware Design (AREA)
- General Health & Medical Sciences (AREA)
- Bioethics (AREA)
- Computational Linguistics (AREA)
- Health & Medical Sciences (AREA)
- Data Mining & Analysis (AREA)
- Storage Device Security (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本公开实施例提供一种敏感数据的数据查询方法、电子设备、存储介质及计算机程序产品,在本公开实施例中,当访问终端查询数据库系统中的敏感数据时,数据库系统对敏感数据依次进行脱敏和加密处理。由此,提供一种加密和脱敏叠加的数据保护方案,从数据库系统流出的是加密后的脱敏数据,访问终端解密得到的是脱敏数据,而不是敏感数据。一方面,敏感数据在数据传输过程中通过加密得到保护,另一方面,访问终端获得的是脱敏数据,而不是敏感数据,有效降低了敏感数据泄露的风险。
Description
敏感数据 的数据查询方法、 电子设备、 存储介质及计算机程序产品 交叉援引 本公开要求于 2024年 06月 11 日提交中国专利局、 申请号为 202410748697. 4、 发明名 称为“ 敏感数据的数据查询方法、 电子设备、 存储介质及计算机程序产品” 的中国专利申请 的优先权, 其全部内容通过引用结合在本公开中。 技术领域 本公开涉及数据安全技术领域 , 尤其涉及一种敏感数据的数据查询方法、 电子设备、 存 储介质及计算机程序产品。 背景技术 目前, 数据库系统存储的数据中往往有敏感数据, 为了有效保护敏感数据, 数据库系统 接收到访问终端的访问请求后, 数据库系统对访问终端请求访问的数据进行加密得到密文数 据, 并将密文数据传输至访问终端, 进而降低数据库系统中敏感数据在数据传输过程中被泄 露的概率。 然而, 密文数据在访问终端解密后, 以明文形式呈现。 这样, 即便数据在数据传 输过程中通过加密处理得到了保护, 但在访问终端解密后的数据处理阶段, 依然存在敏感数 据泄露的风险。 发明内容 本公开 的多个方面提供一种敏感数据的数据查询方法、 电子设备、 存储介质及计算机程 序产品, 用以有效降低了敏感数据泄露的风险。 本公开实施例提供一种敏感数据 的数据查询方法, 应用于数据库系统, 该方法包括: 响 应于访问终端的查询请求, 在数据库系统中查询目标敏感字段的字段数据; 对目标敏感字段 的字段数据进行脱敏处理, 得到脱敏结果; 对脱敏结果进行加密处理, 得到密文脱敏结果; 将密文脱敏结果发送给访问终端, 以供访问终端对密文脱敏结果进行解密, 得到脱敏结果。 本 公开实施例提供一种电子设备, 包括: 存储器和处理器; 存储器, 设置为存储计算 机程序; 处理器耦合至存储器, 设置为执行计算机程序以用于执行敏感数据的数据查询方 法中的步骤。 本 公开实施例提供一种存储有计算机程序 的计算机可读存储介质, 当计算机程序被处
理器执行时, 致使处理器能够实现敏感数据的数据查询方法中的步骤。 本 公开实施例提供一种计算机程序产品, 包括计算机程序/指令, 当计算机程序 /指令 被处理器执行时, 致使处理器能够实现敏感数据的数据查询方法中的步骤 。 本 公开实施例提供一种敏感数据的数据查询方法 、 电子设备、 存储介质及计算机程序 产品, 在本公开实施例中, 当访问终端查询数据库系统中的敏感数据时, 数据库系统对敏 感数据依次进行脱敏和 加密处理。 由此, 提供一种加密和脱敏叠加的数据保护方案, 从数 据库系统流 出的是加密后的脱敏数据 , 访问终端解密得到的是脱敏数据, 而不是敏感数 据。 一方面, 敏感数据在数据传输过程中通过加密得到保护, 另一方面, 访问终端获得的 是脱敏数据, 而不是敏感数据, 有效降低了敏感数据泄露的风险。 附图说明 此处所说 明的附图用来提供对本公开的进一步理解, 构成本公开的一部分, 本公开的示 意性实施例及其说明用于解释本公开, 并不构成对本公开的不当限定。 在附图中: 图 1为本公开实施例提供的一种应用场景的示意图; 图 2为本公开实施例提供的一种敏感数据的数据查询方法的信令交互图; 图 3为本公开实施例提供的一种敏感数据的数据查询方法的流程图; 图 4为本公开实施例提供的示例性的敏感数据的数据查询方法适用的系统架构图; 图 5为本公开实施例提供的另一种敏感数据的数据查询方法的信令交互图; 图 6为本公开实施例提供的一种数据处理装置的结构示意图; 图 7为本公开实施例提供的一种电子设备的结构示意图。 具体实施方式 为使本公开 的目的、 技术方案和优点更加清楚, 下面将结合本公开具体实施例及相应的 附图对本公开技术方案进行清楚、 完整地描述。 显然, 所描述的实施例仅是本公开一部分实 施例, 而不是全部的实施例。 基于本公开中的实施例, 本领域普通技术人员在没有做出创造 性劳动前提下所获得的所有其他实施例, 都属于本公开保护的范围。 在本 公开的实施例中, “至少一个”是指一个或者多个, “多个 ”是指两个或两个以 上。 “和 /或”, 描述关联对象的访问关系, 表示可以存在三种关系, 例如, A和/或 B, 可 以表示: 单独存在 A, 同时存在 A和 B, 单独存在 B这三种情况, 其中 A, B可以是单数或者 复数。 在本公开的文字描述中, 字符 “/”一般表示前后关联对象是一种 “或” 的关系。 此 外, 在本公开实施例中, “第一”、 “第二”、 “第三”、 等只是为了区分不同对象的内容
而已, 并无其它特殊含义。 目前, 数据库系统存储的数据中往往有敏感数据, 为了有效保护 敏感数据, 数据库系统接收到访问终端的访问请求后, 数据库系统对访问终端请求访问的数 据进行加密得到密文数据, 并将密文数据传输至访问终端, 进而降低数据库系统中敏感数据 在数据传输过程中被泄露的概率。 然而, 密文数据在访问终端解密后, 以明文形式呈现。 这 样, 即便数据在数据传输过程中通过加密处理得到了保护, 但在访问终端解密后的数据处理 阶段, 依然存在敏感数据泄露的风险。 有 鉴于此, 本公开实施例提供一种敏感数据的数据查询方法、 电子设备、 存储介质及 计算机程序产品 , 在本公开实施例中, 当访问终端查询数据库系统中的敏感数据时, 数据 库系统对敏感数据依 次进行脱敏和加密处理。 由此, 提供一种加密和脱敏叠加的数据保护 方案, 从数据库系统流出的是加密后的脱敏数据, 访问终端解密得到的是脱敏数据, 而不 是敏感数据。 一方面, 敏感数据在数据传输过程中通过加密得到保护, 另一方面, 访问终 端获得的是脱敏数据 , 而不是敏感数据, 有效降低了敏感数据泄露的风险。 图 1 为本公开实施例提供的一种应用场景的示意图。 实际应用中, 数据库表 (Table) 包括多个字段 (Field), 字段 (Field) 是数据库表 (Table) 中存储特定类型的数据单元或 组件。 数据库表提供的字段中, 往往存在一些敏感字段 。 例如, 在员工信息表中, “姓 名” 、 “年龄”、 “性别”、 “入职日期”、 “薪资收入”等都是敏感字段。 为了降低敏感 数据泄露的风险, 诸如数据库管理人员等相关规则配置人员可以为敏感字段配置敏感规则。 敏感规则可以是按需灵活配置的保护敏感数据的规则, 敏感规则例如包括但不限于: 针对敏 感字段可选的自定义脱敏算法、 系统默认脱敏算法、 自定义加密算法和系统默认加密算法和 授权用户列表。 自定义脱敏算法是指算法参数可由访问用户自定义的脱敏算法, 系统默认脱 敏算法是算法参数固定的脱敏算法。 自定义加密算法是指算法参数可由访问用户自定义的加 密算法, 系统默认加密算法是算法参数固定的加密算法。 针对不同的访问用户, 敏感字段的 可见性可以有所不同。 具体来说 , 有些访问用户仅仅有权限查看敏感字段的部分的字段数据, 也即敏感字段对 访问用户部分可见。 有些访问用户无权限查看敏感字段的字段数据, 也即敏感字段对访问用 户全部不可见。 有些访问用户有权限查看敏感字段的全部的字段数据, 也即敏感字段对访问 用户全部可见。 规则配置人员可以按需为敏感字段配置对应的授权用户列表, 授权用户列表 中的授权用户有权限查看敏感字段的全部或部分的字段数据。 可以理解的是, 若访问用户不 属于授权用户列表中的授权用户, 访问用户无权限查看敏感字段的字段数据。 可选的, 针对 不属于授权用户列表中授权用户的访问用户, 还可以为这样的访问用户设置默认权限, 默认 权限按需灵活设置, 例如, 默认权限包括但不限于: 无权限查看敏感字段的字段数据、 被授
予查看敏感字段的部分字段数据的权限或被授权查看敏感字段的全部字段数据等等。 实际应用 中, 如图 1中 ①和②所示, 规则配置人员在配置终端上执行为敏感字段配置敏 感规则的配置操作, 并触发配置终端向数据库系统发送敏感规则, 以供数据库系统在本地保 存敏感规则, 至此, 完成敏感规则的配置流程。 在数据访 问阶段, 参见图 1中的③和④, 数据库系统响应访问用户的访问终端发送的查 询请求, 查询敏感数据 (也即请求查询的敏感字段的字段数据)。 数据库系统基于敏感规则 确定是否需要对敏感数据进行脱敏, 并在需要脱敏的情况下, 依次对敏感数据进行脱敏和加 密, 得到密文敏感数据。 参见图 1中的 ⑤和⑥所示, 数据库系统向访问终端发送密文敏感数 据, 访问终端解密密文数据, 得到脱敏数据。 这样, 在访问终端呈现的是脱敏数据, 而不是 敏感数据, 极大地降低了敏感数据的泄露的概率。 当然, 若访问用户被授权有权限查看全部 的敏感数据, 也即敏感数据对访问用户全部可见, 这时, 数据库系统基于敏感规则确定不需 要对敏感数据进行脱敏, 可以仅仅对敏感数据进行加密, 得到加密结果, 访问终端解密加密 结果得到敏感数据。 下面 以具体地实施例对本公开的技术方案以及本公开的技术方案如何解决上述技术问题 进行详细说明。 下面这几个具体的实施例可以相互结合, 对于相同或相似的概念或过程可能 在某些实施例中不再赘述。 以下结合附图, 详细说明本公开各实施例提供的技术方案。 图 2为本公开实施例提供的一种敏感数据的数据查询方法的信令交互图。 参见图 2, 该 方法可以包括以下步骤:
201、 访问终端向数据库系统发送查询请求。
202、 数据库系统响应于访问终端的查询请求, 在数据库系统中查询目标敏感字段的字 段数据。
203、 数据库系统对目标敏感字段的字段数据进行脱敏处理, 得到脱敏结果。
204、 数据库系统对脱敏结果进行加密处理, 得到密文脱敏结果。
205、 数据库系统将密文脱敏结果发送给访问终端。
206、 访问终端对密文脱敏结果进行解密, 得到脱敏结果。 实际应用 中, 访问终端可以理解为数据库系统的客户端, 客户端可以是任何能够发起请 求并与数据库系统交互以访问、 操作数据的设备或应用程序。 访问终端例如包括但不限于: 台式电脑、 个人电脑、 智能手机、 平板、 车载设备或物联网设备等终端设备, 当然, 访问终 端也可以是安装在终端设备上的应用程序, 对此不做限制。 实际应用 中, 数据库系统例如包括但不限于: 关系型数据库、 非关系型数据库、 云原生 数据库或数据 仓库, 但并不限于此。 数据库系统提供的数据库表中的哪些字段是敏感 字
段, 哪些字段不是敏感字段, 可以按需灵活指定, 对此不做限制。 实际应用 中, 当数据访问者 (也可称作为访问用户) 对数据库系统中的数据有查询需求 时, 访问用户的访问终端向数据库系统发送查询请求。 通常, 查询请求可以包括请求查询的 字段的字段名称, 例如, 请求查询 “姓名”、 “年龄”、 “性别”、 “入职日期” 、 “薪资 收入” 等。 举例来说, 结构化查询语言 (Structured Query Language, 简称为 SQL) 查 询请求为 SELECT姓名 FROM员工信息表, 也即从员工信息表中查找 “姓名”这一字段的字段 数据。 数据库系统响应于接收到的访问终端的查询请求, 可以判断请求查询的字段是否为 敏感字段。 若请求查询的不是敏感字段, 数据库系统可以向访问终端提供查询到的字段的 字段数据。 若请求查询的字段是敏感字段, 数据库系统对所查询的敏感字段的字段数据进 行数据保护处理, 并将经过数据保护处理的敏感字段的字段数据提供给访 问终端。 进 一步可选的, 访问终端发送的查询请求是经过加密处理的, 数据库系统在执行查询 请求时, 需要先解密经过加密处理的查询请求, 以提高数据访问的安全性。 为 了便于理解和区分, 将访问终端请求查询的敏感字段称作为目标敏感字段。 实际应用 中, 对目标敏感字段的字段数据进行数据保护处理的方式不做限制。 例如, 针对目标敏感字 段的字段数据的数据保护处理, 可以是对目标敏感字段的字段数据仅仅执行脱敏处理。 又例 如, 针对目标敏感字段的字段数据的数据保护处理, 可以是对目标敏感字段的字段数据仅仅 执行加密 处理。 不同于传统的传输层安全性协 议 (Transport Layer Security , 简称为 TLS) 传输加密, TLS传输加密在链路的中间节点, 均可见数据明文。 而本公开实施例仅仅 访问终端可见数据明文。 TLS传输加密密钥由通信会话随机自动生成, 用户不可控, 而本公 开实施例加密使用密钥为用户可管理的密钥, 且仅密钥持有者才可解密数据。 又例如, 针对 目标敏感字段的字段数据的数据保护处理可以是对目标敏感字段的字段数据依次执行脱敏处 理和加密处理。 可以理解的是, 相对于对敏感数据仅仅执行脱敏处理或加密处理等单一的数 据保护处理, 对敏感数据叠加脱敏处理和加密处理等双重的数据保护处理, 能够更加有效地 降低敏感数据泄露的风险。 实际应用 中, 数据库系统可以采用任意的脱敏算法对目标敏感字段的字段数据进行脱敏 处理, 对此不做限制。 进一步可选的, 为了提高脱敏处理的灵活性和可靠性, 更加有效地降 低敏感数据泄露的风险, 还支持针对不同的敏感字段, 按需灵活配置各个敏感字段对应的自 定义脱敏算法和系统默认脱敏算法。 自定义脱敏算法是指算法参数可由访问用户自定义的脱 敏算法, 因此, 自定义脱敏算法可以满足不同的访问用户的多样化的脱敏需求, 从轻微的隐 私保护到深度的隐私保护。 系统默认脱敏算法是算法参数固定的脱敏算法, 因此, 系统默认 脱敏算法为脱敏处理进行兜底, 保证脱敏处理的可靠性。
在本 公开实施例中, 脱敏算法例如包括但不限于: 替换脱敏算法、 掩码脱敏算法、 哈希 算法、 加密算法等等。 其 中, 替换脱敏算法可以将敏感数据中部分或全部内容替换成非敏感内容, 例如, 将真 实姓名替换为 “匿名用户”或电话号码的后四位用 “**** ”代替。 替换脱敏算法可由访问用 户自定义的算法参数例如包括但不限于: 替换模式、 替换位数、 保留位位置。 替换模式定义 采用哪种非敏感内容进行替换, 非敏感内容例如包括但不限于: 星号 (*)、 随机字符、 固定 字符等。 替换位数用于决定替换多少位数, 例如, 手机号只显示前三位和后四位, 中间用星 号代替。 保留位位置用于决定哪些位置的字符不被保留, 哪些被替换。 掩码脱敏算法可 以将敏感数据中部分或全部内容替换为特定字符 (如星号*、 X) 或其他 占位符, 以隐藏数据中的部分敏感信息。 掩码脱敏算法适用于有固定格式的数据, 比如电话 号码、 信用卡号或身份认证号。 掩码脱敏算法可由访问用户自定义的算法参数例如包括但不 限于: 掩码模式、 掩码位数、 保留位位置。 掩码模式定义采用哪种非敏感内容进行掩码, 非 敏感内容例如包括但不限于: 星号 (*)、 随机字符、 固定字符等。 掩码位数用于决定掩码多 少位数, 例如, 手机号只显示前三位和后四位, 中间部分进行掩码。 保留位位置用于决定哪 些位置的字符不被保留, 哪些被掩码。 哈希算法可以利用哈希函数将敏感数据转换为固定长度的、 不可逆向的哈值, 以此达到 保护数据隐私的目的。 哈希算法可由访问用户自定义的算法参数例如包括但不限于: 哈希算 法类型、 盐值、 迭代次数等等。 哈希算法类型例如包括但不限于: 安全哈希算法 1(Secure Hash Algorithm 1 , 简称为 SHAT), 安全哈希算法 256 (Secure Hash Algorithm 256, 简 称为 SHA-256)。 盐值可以增加随机字符串, 提高哈希唯一性; 增加迭代次数增强安全性。 加密算法用作脱敏算法 时, 通过对敏感数据进行加密来保护敏感数据。 加密算法可由访 问用户自定义的算法参数例如包括但不限于: 密钥、 密钥派生函数、 加密算法类型等等。 加 密算法类型例如包括但不限于: 对称加密算法、 非对称加密算法等。 实 际应用中, 在为敏感字段配置自定义脱敏算法和 /或系统默认脱敏算法等脱敏算法 时, 可以根据敏感字段的数据类型和/或敏感等级配置不同的脱敏算法。 例如, 针对数值类 的敏感字段, 可以采用替换脱敏算法; 针对文本类的敏感字段可以采用掩码脱敏算法。 敏感 等级越高的敏感字段, 对应的脱敏算法的安全强度越高。 例如, 按照敏感等级从低到高的顺 序排列, 依次为: 姓名字段、 薪资收入字段、 账号口令字段。 对姓名字段进行部分遮掩, 对 薪资收入字段进行全遮掩, 对账号口令字段利用哈希算法进行脱敏处理等等。 基于上述 , 进一步可选的, 对目标敏感字段的字段数据进行脱敏处理, 得到脱敏结果的 实现方式为: 若访问用户为目标敏感字段配置对应的自定义脱敏算法, 则利用自定义脱敏算
法对目标敏感字段的字段数据进行脱敏处理, 得到脱敏结果; 若访问用户没有为目标敏感字 段配置对应的自定义脱敏算法, 则利用预先为目标敏感字段配置的系统默认脱敏算法对目标 敏感字段的字段数据进行脱敏处理, 得到脱敏结果。 实际应用 中, 对数据库系统判断访问用户是否为目标敏感字段配置对应的自定义脱敏算 法的方式不做限制。 例如, 数据库系统预先保存了访问用户、 敏感字段、 自定义脱敏算法之 间的对应关系; 数据库系统若在对应关系中查询到当前发起查询请求的访问用户为目标敏感 字段配置的自定义脱敏算法, 则数据库系统确认访问用户为目标敏感字段配置对应的自定义 脱敏算法; 反之, 数据库系统确认访问用户没有为目标敏感字段配置对应的自定义脱敏算 法。 又例如, 访问用户发起的查询请求中携带了自定义脱敏算法, 数据库系统确认访问用户 为目标敏感字段配置对应的自定义脱敏算法。 反之, 访问用户发起的查询请求中没有携带自 定义脱敏算法, 数据库系统确认访问用户为目标敏感字段配置对应的自定义脱敏算法。 进一步可选 的, 为了提高脱敏处理的灵活性, 满足多样化的脱敏需求, 数据库系统可以 通过查询请求是否解析出脱敏算法配置信息来判断访问用户是否为 目标敏感字段配置对应的 自定义脱敏算法。 具体而言, 数据库系统响应于从查询请求解析出脱敏算法配置信息, 脱敏 算法配置信息包括自定义脱敏算法的标识和算法参数, 根据自定义脱敏算法的标识将对应的 算法参数写入自定义脱敏算法模板中, 得到自定义脱敏算法; 响应于未从查询请求解析出脱 敏算法配置信息, 确定访问用户没有为目标敏感字段配置对应的自定义脱敏算法。 实际应用 中, 数据库系统可以保存由相关人员预先为各个敏感字段配置系统默认脱敏算 法以及多个可选的自定义脱敏算法模板。 自定义脱敏算法模板可以理解为尚未配置算法参数 的自定义脱敏算法, 自定义脱敏算法模板包括一个或多个填写项, 将一个或多个算法参数填 写到自定义脱敏算法模板中对应的填写项, 得到自定义脱敏算法。 实际应用中, 数据库系统可以向访问终端发送为目标敏感字段配置的可选的自定义脱 敏算法的标识, 以供访问终端从可选的自定义脱敏算法的标识中选择自定义脱敏算法的标 识, 以及基于选中的自定义脱敏算法的标识为目标脱敏字段配置脱敏 算法配置信息。 基于 选中的自定义脱敏算法 的标识为目标脱敏字段配置脱敏算法配置信 息时, 访问终端可以响 应访问用户的配置操作 , 为所选择的自定义脱敏算法配置对应的算法参数, 以及基于选择 的自定义脱敏算法 的标识及其对应的算法参数生成脱敏算法配置信息。 当访问终端发起查询请求时, 可以在查询请求中携带脱敏算法配置信息, 以通过脱敏算 法配置信息向数据库系统指示访问用户为目标敏感字段选择的自定义脱敏算法的标识和算法 参数。 数据库系统根据脱敏算法配置信息中的自定义脱敏算法的标识选择对应的自定义脱敏 算法模板, 并将脱敏算法配置信息中的算法参数填写到对应的自定义脱敏算法模板中, 得到
自定义脱敏算法。 在本实施例 中, 若访问终端发送的查询请求没有携带脱敏算法配置信息, 确定访问用户 没有为目标敏感字段配置对应的自定义脱敏算法, 这时, 数据库系统可以获取预先为目标敏 感字段配置的系统默认脱敏算法对目标敏感字段的字段数据进行脱敏处理, 得到脱敏结果。 实际应用 中, 数据库系统可以为不同的字段可以配置相同或不同的加密算法, 对此不做 限制。 数据库系统可以对任意的字段的字段数据进行加密处理, 也可以对敏感字段的字段数 据进行加密处理, 对此不做限制。 在 本实施例中, 针对对目标敏感字段的字段数据进行脱敏处理所得到的脱敏结果, 采 用加密算法对脱敏结 果进行加密处理, 得到密文脱敏结果。 数据库系统可以采用任意的加 密算法对脱敏结果进 行加密处理, 对此不做限制。 进一步可选的, 为了提高加密处理的灵 活性和可靠性, 更加有效地降低敏感数据泄露的风险, 还支持针对不同的敏感字段, 按需 灵活配置各个敏感字段对 应的自定义加密算法和系统默认加密算法 。 自定义加密算法是指 算法参数可 由访问用户自定义的加密算法, 因此, 自定义加密算法可以满足不同的访问用 户的多样化的加密 需求, 从轻微的隐私保护到深度的隐私保护。 系统默认加密算法是算法 参数固定的加密算法 , 因此, 系统默认加密算法为加密处理进行兜底, 保证加密处理的可 靠性。 基 于上述, 进一步可选的, 对脱敏结果进行加密处理, 得到密文脱敏结果的实现方式 为: 若访问用户为目标敏感字段配置对应的自定义加密算法, 则利用自定义加密算法对脱 敏结果进行加密处理 , 得到密文脱敏结果; 若访问用户没有为目标敏感字段配置对应的自 定义加密算法, 则利用预先为目标敏感字段配置的系统默认加密算法对脱 敏结果进行加密 处理, 得到密文脱敏结果。 实际应用 中, 对数据库系统判断访问用户是否为目标敏感字段配置对应的自定义加密算 法的方式不做限制。 例如, 数据库系统预先保存了访问用户、 敏感字段、 自定义加密算法之 间的对应关系; 数据库系统若在对应关系中查询到当前发起查询请求的访问用户为目标敏感 字段配置的自定义加密算法, 则数据库系统确认访问用户为目标敏感字段配置对应的自定义 加密算法; 反之, 数据库系统确认访问用户没有为目标敏感字段配置对应的自定义加密算 法。 又例如, 访问用户发起的查询请求中携带了自定义加密算法, 数据库系统确认访问用户 为目标敏感字段配置对应的自定义加密算法。 反之, 访问用户发起的查询请求中没有携带自 定义加密算法, 数据库系统确认访问用户为目标敏感字段配置对应的自定义加密算法。 进一步可选 的, 为了提高加密处理的灵活性, 满足多样化的加密需求, 数据库系统可以 通过查询请求是否解析出加密算法配置信息来判断访问用户是否为 目标敏感字段配置对应的
自定义加密算法。 具体而言, 数据库系统响应于从查询请求解析出加密算法配置信息, 加密 算法配置信息包括自定义加密算法的标识和算法参数, 根据自定义加密算法的标识将对应的 算法参数写入自定义加密算法模板中, 得到自定义加密算法; 响应于未从查询请求解析出加 密算法配置信息, 确定访问用户没有为目标敏感字段配置对应的自定义加密算法。 实际应用 中, 数据库系统可以保存由相关人员预先为各个敏感字段配置系统默认加密算 法以及多个可选的自定义加密算法模板。 自定义加密算法模板可以理解为尚未配置算法参数 的自定义加密算法, 自定义加密算法模板包括一个或多个填写项, 将一个或多个算法参数填 写到自定义加密算法模板中对应的填写项, 得到自定义加密算法。 实际应用中, 数据库系统可以向访问终端发送为目标敏感字段配置的可选的自定义加 密算法的标识, 以供访问终端从可选的自定义加密算法的标识中选择自定义加密算法的标 识, 以及基于选中的自定义加密算法的标识为目标加密字段配置加密 算法配置信息。 基于 选中的自定义加密算法 的标识为目标加密字段配置加密算法配置信 息时, 访问终端可以响 应访问用户的配置操作 , 为所选择的自定义加密算法配置对应的算法参数, 以及基于选择 的自定义加密算法 的标识及其对应的算法参数生成加密算法配置信息。 当访问终端发起查询请求时, 可以在查询请求中携带加密算法配置信息, 以通过加密算 法配置信息向数据库系统指示访问用户为目标敏感字段选择的自定义加密算法的标识和算法 参数。 数据库系统根据加密算法配置信息中的自定义加密算法的标识选择对应的自定义加密 算法模板, 并将加密算法配置信息中的算法参数填写到对应的自定义加密算法模板中, 得到 自定义加密算法。 在本实施例 中, 若访问终端发送的查询请求没有携带加密算法配置信息, 确定访问用户 没有为目标敏感字段配置对应的自定义加密算法, 这时, 数据库系统可以获取预先为目标敏 感字段配置的系统默认加密算法对脱敏结果进行加密处理, 得到密文脱敏结果。 本 公开实施例提供的敏感数据的数据查询方法, 当访问终端查询数据库系统中的敏感 数据时, 数据库系统对敏感数据依次进行脱敏和加密处理。 由此, 提供一种加密和脱敏叠 加的数据保护方案 , 从数据库系统流出的是加密后的脱敏数据, 访问终端解密得到的是脱 敏数据, 而不是敏感数据。 一方面, 敏感数据在数据传输过程中通过加密得到保护, 另一 方面, 访问终端获得的是脱敏数据, 而不是敏感数据, 有效降低了敏感数据泄露的风险。 在 一些可选的实施例中, 还可以结合敏感字段对访问终端对应的访问用户的可见性对 敏感字段进行数据保 护, 在保障敏感数据的安全性的情况下, 提高了敏感数据的数据保护 的灵活性。 下面结合图 3介绍另一种敏感数据的数据查询方法。 图 3为本公开实施例提供的一种敏感数据的数据查询方法的流程图。 该方法应用于数据
库系统, 参见图 3, 该方法可以包括以下步骤:
301、 响应于访问终端的查询请求, 在数据库系统中查询目标敏感字段的字段数据。
302、 识别目标敏感字段对访问终端对应的访问用户的可见性, 执行步骤 303 或步骤 306o 实际应用中, 同一个敏感字段针对不同访问用户的可见性可以有所不同, 也即不同访 问用户针对同一个敏感 字段的查看权限有所不同。 具体来说, 敏感字段针对访问用户的可 见性可 以划分为以下几种: 敏感字段对访问用户全部可见 、 敏感字段对访问用户部分可 见、 敏感字段对访问用户全部不可见。 敏感字段对访问用户全部可见, 也即访问用户被授 权可获取或查看敏感 字段的全部字段数据, 敏感字段的全部字段数据对访问用户是完全透 明的、 可见的。 敏感字段对访问用户部分可见, 也即访问用户被授权获取或查看敏感字段 的部分字段数据 , 敏感字段的一部分的字段数据对访问用户是透明的、 可见的; 敏感字段 的另一部分的字段数据对 访问用户是非透明的、 不可见的。 敏感字段对访问用户全部不可 见, 也即访问用户未被授权可获取或查看敏感字段的字段数据, 敏感字段的全部字段数据 对访问用户是非透 明、 不可见的。 实际应用中, 对数据库系统识别目标敏感字段对访问终端对应的访问用户的可见性的 方式不做限制 。 例如, 数据库系统对访问用户的历史访问数据进行分析, 识别访问用户的 安全风险。 若访问用户的安全风险为高风险, 则目标敏感字段对访问用户全部不可见; 若 访问用户的安全风 险为中风险, 则目标敏感字段对访问用户部分可见; 若访问用户的安全 风险为低风险, 则目标敏感字段对访问用户可见。 又例如, 数据库系统可以设置不同访问 时间段对应不 同的可见性。 经过大数据挖掘分析, 数据库系统在第一访问时间段的安全风 险高, 则目标敏感字段对第一访问时间段发起查询请求的访问用户全 部不可见; 数据库系 统在第二访 问时间段的安全风险一般, 则目标敏感字段对第二访问时间段发起查询请求的 访问用户部分可见 ; 数据库系统在第二访问时间段的安全风险低, 则目标敏感字段对第三 访问时间段发起查询请求 的访问用户全部不可见。 进 一步可选的, 为了更好地区分目标敏感字段对访问用户的可见性, 高效准确地针对 敏感数据进行权限控 制, 识别目标敏感字段对访问终端对应的访问用户的可见性的实现方 式为: 获取为目标敏感字段配置的授权用户列表, 其中, 授权用户列表包括第一授权用户 的用户标识和第二授权 用户的用户标识, 目标敏感字段对第一授权用户全部可见, 目标敏 感字段对第二授权用户 部分可见; 将访问用户的用户标识与授权用户列表中的用户标识进 行匹配; 根据匹配结果, 识别目标敏感字段对访问用户的可见性。 实际应用中, 根据匹配结果, 识别目标敏感字段对访问终端对应的访问用户的可见性
时, 若访问用户的用户标识与第一授权用户的用户标识匹配成功 , 则确定目标敏感字段对 访问用户全部可见 ; 若访问用户的用户标识与第二授权用户的用户标识匹配成功, 则确定 目标敏感字段对访 问用户部分可见; 若访问用户的用户标识与授权用户列表中的用户标识 匹配失败, 则确定目标敏感字段对访问用户全部不可见。
303、 若目标敏感字段对访问用户全部不可见或部分可见, 则对目标敏感字段的字段 数据进行脱敏处理 , 得到脱敏结果。 实际应用中, 若目标敏感字段对访问用户全部不可见, 则对目标敏感字段的全部的字 段数据进行脱敏处理 , 得到脱敏结果; 若目标敏感字段对访问用户部分可见, 则对目标敏 感字段的部分的字段数据 进行脱敏处理, 得到脱敏结果。
304、 对脱敏结果进行加密处理, 得到密文脱敏结果。
305、 将密文脱敏结果发送给访问终端, 以供访问终端对密文脱敏结果进行解密, 得 到脱敏结果。 关于对目标敏感字段的字段数据进行脱敏处理 、 加密处理和解密处理的更多介绍可以 参见前述实施例的相关 内容, 在此不再赘述。
306、 若目标敏感字段对访问用户全部可见, 则对目标敏感字段的字段数据进行加密 处理, 得到加密结果。 关于对目标敏感字段的字段数据进行加密处理方 式和对目标敏感字段的字段数据进行 脱敏得到的脱敏结果进 行加密处理方式的相似或相同, 在此不再赘述。
307、 将加密结果发送给访问终端, 以供访问终端对加密结果进行解密, 得到目标敏 感字段的字段数据 。 在 本实施例中, 若目标敏感字段对访问用户全部可见, 数据库系统可以无需对目标敏 感字段的字段数据进 行脱敏处理, 仅仅进行加密处理即可, 这样, 访问终端对加密结果解 密后, 可以获取明文形式的目标敏感字段的字段数据。 可以理解的是, 即便访问终端可以 获取明文形式的 目标敏感字段的字段数据, 但是由于访问用户是被授权的用户, 这样的数 据保护方案的安全性仍然 很高。 当然, 假如针对目标敏感字段的字段数据的数据保护处理是对目标敏感字段的字段数 据仅仅执行脱敏处理, 则若目标敏感字段对访问用户全部不可见或部分可见, 则对目标敏感 字段的字段数据进行脱敏处理, 得到脱敏结果, 并将脱敏结果发送给访问终端; 若目标敏感 字段对访问用户全部可 见, 则将目标敏感字段的字段数据发送给访问终端。 假 如针对目标敏感字段的字段数据的数据保 护处理是对目标敏感字段的字段数据仅仅 执行加密处理, 则若目标敏感字段对访问用户全部不可见或部分可见, 则对目标敏感字段的
字段数据进行加密处理 , 得到加密结果, 并将加密结果发送给访问终端; 若目标敏感字段 对访问用户全部可见 , 则将目标敏感字段的字段数据直接发送给访问终端。 本 公开实施例提供的敏感数据的数据查询方法 , 当访问终端查询数据库系统中的敏感 数据时, 数据库系统识别敏感数据对访问用户的可见性, 基于可见性识别结果对敏感数据 进行差异化数据保护 处理, 在保障敏感数据的安全性的情况下, 提高了敏感数据的数据保 护的灵活性。 在 上述各个实施例中, 对数据库系统中为敏感字段配置的授权用户列表、 系统默认脱 敏算法、 系统默认加密算法、 可选的自定义脱敏算法模板或可选的自定义加密算法模板的 方式不做限制 。 实际应用中, 诸如数据库管理人员等相关配置人员可以配置敏感规则, 敏 感规则可以包括但不 限于: 为敏感字段配置的授权用户列表、 系统默认脱敏算法、 系统默 认加密算法、 可选的自定义脱敏算法模板或可选的自定义加密算法模板。 实际应用中, 配置人员可以按需对数据库、 数据库表、 列等不同粒度的数据对象配置 相应的敏感规则 。 例如, 针对每个数据库配置统一的敏感规则, 或者, 针对每个数据库表 配置统一的敏感规则 , 或者, 针对具体的列字段配置对应的敏感规则。 敏感规则可以指示 对敏感字段的字段数据 不进行数据保护处理, 或者敏感规则指示对敏感字段的字段数据仅 仅进行脱敏处理 , 或者, 敏感规则指示对敏感字段的字段数据仅仅进行加密处理, 或者, 敏感规则指示对敏感字 段的字段数据进行加密和脱敏处理。 实际应用中, 配置人员的配置终端向数据库系统下发敏感规则, 以供数据库系统在本 地保存敏感规则 。 进一步可选的, 为了避免未经过授权的用户恶意下发敏感规则, 可以对 配置终端下发的敏感 规则进行合法性校验, 校验通过后, 数据库系统才会在本地保存敏感 规则。 基于此, 数据库系统响应于配置终端发送的敏感规则及其签名信息; 对签名信息进 行验证, 若签名信息验证通过, 在本地保存敏感规则。 实际应用中, 可以对敏感规则进行 数字签名处理, 得到敏感规则的签名信息。 在 本实施例中, 配置终端可以是任何能够发起请求并与数据库系统交互以访问、 操作 数据的设备或应用程序 。 配置终端例如包括但不限于: 台式电脑、 个人电脑、 智能手机、 平板、 车载设备或物联网设备等终端设备, 当然, 配置终端也可以是安装在终端设备上的 应用程序, 对此不做限制。 为了更好地理解本公开实施例提供的技术方案, 下面结合图 4和图 5介绍一场景实施 例。 图 4所示的系统架构中, 客户端提供的解密组件提供解密功能, 数据库系统中的安全 网关 ( SecureGW) 提供数据保护功能, SQL查询引擎执行 SQL查询操作。 安全网关不限于
应用于数据库系统 中, 也可以应用于其他应用系统中。 图 5 为本公开实施例提供的另一种敏感数据 的数据查询方法的信令交互图, 参见图 5, 敏感数据的数据查询方法可以包括以下步骤:
501 , 用户配置敏感规则。 用户可以为敏感字段指定敏感规则, 敏感规则可以是仅仅进行加密处理、 仅仅进行脱 敏处理或依次进行脱 敏和加密处理, 对此不做限制。 用户的客户端向数据库系统中的安全 网关下发敏感规则, 数据库系统在本地保存敏感规则。
502, 发起 SQL查询。 在 数据访问阶段, 用户的客户端向数据库系统中的 SQL查询引擎发送 SQL查询。
503, 执行 SQL查询操作。
SQL查询引擎执行 SQL查询操作, 得到明文查询结果。
504, 得到明文查询结果。
505, 得到密文脱敏结果。 安全网关基于敏感规则对明文查询结果进行数据保 护处理。 例如, 若敏感规则包括脱 敏算法, 对明文查询结果进行脱敏处理, 得到明文脱敏结果。 若敏感规则包括加密算法, 对明文脱敏结果进行加密 处理, 得到密文脱敏结果。
506, 执行解密。
507, 得到明文脱敏结果。 密 文脱敏结果由客户端 的解密组件进行解密, 得到明文脱敏结果并提供 给用户。 当 然, 敏感规则也可能不包括脱敏算法或加密算法, 也即无需进行脱敏处理或加密处理。 图 6 为本公开实施例提供的一种数据处理装置的结构示意图。 该装置可以由硬件和/ 或软件方式组成, 该装置可以应用于数据库系统。 参见图 6, 该装置可以包括: 查询组件 61 , 设置为响应于访问终端的查询请求, 在数据库系统中查询目标敏感字 段的字段数据; 脱 敏组件 62, 设置为对目标敏感字段的字段数据进行脱敏处理, 得到脱敏结果; 加 密组件 63, 设置为对脱敏结果进行加密处理, 得到密文脱敏结果; 发送组件 64, 设置为将密文脱敏结果发送给访问终端, 以供访问终端对密文脱敏结 果进行解密, 得到脱敏结果。 可选的, 上述装置还包括识别触发脱敏组件 62, 执行响应于目标敏感字段对所述访 问终端对应 的访问用户全部不可见或 部分可见, 对目标敏感字段的字段数据进行脱敏 处 理, 得到脱敏结果。
可选的, 响应于目标敏感字段对访问终端对应 的访问用户全部不可见 , 则脱敏组件 62 对目标敏感字段的全部的字段数据进行脱敏处理, 得到脱敏结果; 响应于目标敏感字 段对访 问用户部分可见, 则脱敏组件 62 对目标敏感字段的部分的字段数据 进行脱敏处 理, 得到脱敏结果。 可选的, 响应于目标敏感字段对访问用户全部可见, 则触发加密组件 63 对目标敏感 字段的字段数据进行加密 处理, 得到加密结果; 发送组件 64, 还设置为将加密结果发送给访问终端, 以供访问终端对加密结果进行 解密, 得到目标敏感字段的字段数据。 可选的, 识别组件设置为: 获取为目标敏感字段配置的授权用户列表, 其中, 授权用 户列表包括第一授权 用户的用户标识和第二授权用户的用户标识 , 目标敏感字段对第一授 权用户全部可见 , 目标敏感字段对第二授权用户部分可见; 将访问用户的用户标识与授权 用户列表 中的用户标识进行匹配; 根据匹配结果, 识别目标敏感字段对访问用户的可 见 性。 可选的, 识别组件根据匹配结果, 识别目标敏感字段对访问终端对应的访问用户的可 见性时, 设置为: 响应于所述匹配结果为访问用户的用户标识与第一授权用户的用户标识 匹配成功, 确定目标敏感字段对访问用户全部可见; 响应于所述匹配结果为访问用户的用 户标识与第二授权用户 的用户标识匹配成功, 则确定目标敏感字段对访问用户部分可见; 响应于访问用户的用户标 识与授权用户列表中的用户标识匹配失败 , 则确定目标敏感字段 对访问用户全部不可见 。 可选的, 脱敏组件 62 设置为: 响应于访问用户为目标敏感字段配置对应的自定义脱 敏算法, 则利用自定义脱敏算法对 目标敏感字段的字段数据进 行脱敏处理, 得到脱敏结 果; 响应于访问用户没有为目标敏感字段配置对应的自定义脱敏算法 , 则利用预先为目标 敏感字段配置的系 统默认脱敏算法对目标敏感字段的字段数据进行脱敏 处理, 得到脱敏结 果。 可选的, 脱敏组件 62 还设置为: 响应于从查询请求解析出脱敏算法配置信息, 脱敏 算法配置信息包括 自定义脱敏算法的标识和算法参数, 根据自定义脱敏算法的标识将对应 的算法参数写入 自定义脱敏算法模板中, 得到自定义脱敏算法; 响应于未从查询请求解析 出脱敏算法配置信息 , 确定访问用户没有为目标敏感字段配置对应的自定义脱敏算法。 可选的, 加密组件 63 设置为: 响应于访问用户为目标敏感字段配置对应的自定义加 密算法, 则利用自定义加密算法对脱敏结果进行加密处理, 得到密文脱敏结果; 响应于访 问用户没有为 目标敏感字段配置对应的自定义加密算法, 则利用预先为目标敏感字段配置
的系统默认加密算法对脱 敏结果进行加密处理, 得到密文脱敏结果。 可选的, 加密组件 63 还设置为: 响应于从查询请求解析出加密算法配置信息, 加密 算法配置信息包括 自定义加密算法的标识和算法参数, 根据自定义加密算法的标识将对应 的算法参数写入 自定义加密算法模板中, 得到自定义加密算法; 响应于未从查询请求解析 出加密算法配置信息 , 确定访问用户没有为目标敏感字段配置对应的自定义加密算法。 可选的, 上述装置还包括: 配置组件, 设置为响应于配置终端发送的敏感规则, 以及 配置终端的签名信 息, 敏感规则包括以下一种或多种: 为目标敏感字段配置的授权用户列 表、 系统默认脱敏算法、 系统默认加密算法、 自定义脱敏算法模板、 自定义加密算法模 板; 对签名信息进行验证; 响应于签名信息验证通过, 在本地保存敏感规则。 图 6所示的装置可以执行前述方法实施例, 其实现原理和技术效果不再赘述。 对于上述 实施例中的图 6所示的装置其中各个组件、 组件执行操作的具体方式已经在有关方法实施例 中进行了详细描述, 此处将不做详细阐述说明。 需要说明的是, 上述实施例所提供方法的各步骤的执行主体均可以是同一设备, 或者, 该方法也由不同设备作为执行主体。 比如, 步骤 301至步骤 307的执行主体可以为设备 A; 又比如, 步骤 301和 302的执行主体可以为设备 A, 步骤 303至 307的执行主体可以为设备 B; 等等。 另外 , 在上述实施例及附图中的描述的一些流程中, 包含了按照特定顺序出现的多个操 作, 但是应该清楚了解, 这些操作可以不按照其在本文中出现的顺序来执行或并行执行, 操 作的序号如 301、 302 等, 仅仅是用于区分开各个不同的操作, 序号本身不代表任何的执行 顺序。 另外, 这些流程可以包括更多或更少的操作, 并且这些操作可以按顺序执行或并行执 行。 需要说明的是, 本文中的“第一” 、 “第二”等描述, 是用于区分不同的消息、 设备、 组件等, 不代表先后顺序, 也不限定 “第一 ”和 “第二”是不同的类型。 需要说明的是, 本公开所涉及的用户信息 (包括但不限于用户设备信息、 用户个人信息 等) 和数据 (包括但不限于用于分析的数据、 存储的数据、 展示的数据等), 均为经用户授 权或者经过各方充分授权的信息和数据, 并且相关数据的收集、 使用和处理需要遵守相关国 家和地区的相关法律法规和标准, 并提供有相应的操作入口, 供用户选择授权或者拒绝。 图 7 为本公开实施例提供的一种电子设备的结构示意图。 如图 7所示, 该电子设备包 括: 存储器 71和处理器 72; 存储器 71 , 设置为存储计算机程序, 并可被配置为存储其它各种数据以支持在计算 平台上 的操作。 这些数据的示例包括用于在计算平台上操作 的任何应用程序或方法 的指 令, 联系人数据, 电话簿数据, 消息, 图片, 视频等。
存储器 71 可以由任何类型的易失性或非易失性存储设备或者它们的组合实现, 如静 态随机存取存储 器 (Static Random-AccessMemory, 简称为 SRAM) , 电可擦除可编程只 读 存储 器 ( Electrical ly Erasable Programmable read only memory , 简称为 EEPROM) , 可擦除可编程只读存储器 (Erasable Programmable Read Only Memory, 简 称为 EPROM) , 可编程只读存储器 (Programmable read-only memory, 简称为 PROM) , 只读存储器 (Read-Only Memory, 简称为 ROM) , 磁存储器, 快闪存储器, 磁盘或光盘。 处理器 72, 与存储器 71耦合, 设置为执行存储器 71 中的计算机程序, 以设置为执 行: 敏感数据的数据查询方法中的步骤。 可选的, 如图 7所示, 该电子设备还包括: 通信组件 73、 显示器 74、 电源组件 75、 音频组件 76等其它组件。 图 7 中仅示意性给出部分组件, 并不意味着电子设备只包括图 7 所示组件。 另外, 图 7 中虚线框内的组件为可选组件, 而非必选组件, 具体可视电子设 备的产品形态而定 。 本实施例的电子设备可以实现为台式电脑、 笔记本电脑、 智能手机或 I0T (物联网, Internet of things) 设备等终端设备, 也可以是常规服务器、 云服务器 或服务器阵列等服务 端设备。 若本实施例的电子设备实现为台式电脑、 笔记本电脑、 智能 手机等终端设备 , 可以包含图 7中虚线框内的组件; 若本实施例的电子设备实现为常规服 务器、 云服务器或服务器阵列等服务端设备, 则可以不包含图 7中虚线框内的组件。 关于处理器执行各动作的详细实施过程可参见 前述方法实施例或设备实施例中的相关 描述, 在此不再赘述。 相应地, 本公开实施例还提供一种存储有计算机程序的计算机可读存储介质, 计算机 程序被执行时能够实现 上述方法实施例中可由电子设备执行的各步骤。 相应地, 本公开实施例还提供一种计算机程序产品, 包括计算机程序/指令, 当计算 机程序/指令被处 理器执行时, 致使处理器能够实现上述方法实施例中可由电子设备 执行 的各步骤。 上述通信组件被配置 为便于通信组件所在设备和其他设备之间有线或无线方式的通信。 通信组件所在设备可以接入基于通信标准的无线网络, 如 WiFi (Wireless Fidelity, 无线 保真)、 2G (2Generation, 2代)、 3G (3Generation, 3代)、 4G (4Generation, 4代) /进 长期演 ( long Term Evolution, 简称为 LTE)、 5G (5Generation, 5代) 等移动通信网络, 或它们的组合。 在一个示例性实施例中, 通信组件经由广播信道接收来自外部广播管理系统 的广播信 号或广播相关信息。 在一个示例性实施例中, 通信组件还包括近场通信 (Near Field Communication, 简称为 NFC) 组件, 以促进短程通信。 例如, 在 NFC组件可基于射 频识别 (Radio Frequency Identification , 简称为 RFID) 技术, 红外数据协会 ( The
Infrared Data Association, 简称为 IrDA) 技术, 超宽带 (Ultra Wide Band, 简称为 UWB)技术, 蓝牙 (Bluetooth, 简称为 BT)技术和其他技术来实现。 上述 显示器包括屏幕, 其屏幕可以包括液晶显示器 (Liquid Crystal Display, 简称为 LCD)和触摸面板 (Touch Panel, 简称为 TP)O 如果屏幕包括触摸面板, 屏幕可以被实现为 触摸屏, 以接收来自用户的输入信号。 触摸面板包括一个或多个触摸传感器以感测触摸、 滑 动和触摸面板上的手势。 触摸传感器可以不仅感测触摸或滑动动作的边界, 而且还检测与触 摸或滑动操作相关的持续时间和压力。 上述 电源组件, 为电源组件所在设备的各种组件提供电力。 电源组件可以包括电源管理 系统, 一个或多个电源, 及其他与为电源组件所在设备生成、 管理和分配电力相关联的组 件。 上述 音频组件, 可被配置为输出和 /或输入音频信号。 例如, 音频组件包括一个麦克风 (microphone, 简称为 MIC), 当音频组件所在设备处于操作模式, 如呼叫模式、 记录模式 和语音识别模式时, 麦克风被配置为接收外部音频信号。 所接收的音频信号可以被进一步存 储在存储器或经由通信组件发送。 在一些实施例中, 音频组件还包括一个扬声器, 设置为输 出音频信号。 本领 域内的技术人员应明白, 本公开的实施例可提供为方法、 系统、 或计算机程序产 品。 因此, 本公开可采用完全硬件实施例、 完全软件实施例、 或结合软件和硬件方面的实施 例的形式。 而且, 本公开可采用在一个或多个其中包含有计算机可用程序代码的计算机可读 存储介质 (包括但不限于磁盘存储器、 CD-ROM, 光学存储器等) 上实施的计算机程序产品的 形式。 本 公开是参照根据本公开实施例的方法、 设备 (系统)、 和计算机程序产品的流程图和 / 或方框图来描述的。 应理解可由计算机程序指令实现流程图和 /或方框图中的每一流程和 / 或方框、 以及流程图和 /或方框图中的流程和/或方框的结合。 可提供这些计算机程序指 令到通用计算机、 专用计算机、 嵌入式处理机或其他可编程数据处理设备的处理器以产生一 个机器, 使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生设置为实现在 流程图一个流程或多个流程和 /或方框图一个方框或多个方框中指定的功能的装置。 这些计算机程序指令 也可存储在能引导计算机或其他可编程数据处理设备以特定方式工 作的计算机可读存储器中, 使得存储在该计算机可读存储器中的指令产生包括指令装置的制 造品, 该指令装置实现在流程图一个流程或多个流程和 /或方框图一个方框或多个方框中指 定的功能。 这些计算机程序指令 也可装载到计算机或其他可编程数据处理设备上, 使得在计算机或
其他可编程设备上执行一系列操作步骤以产生计算机实现的处理, 从而在计算机或其他可编 程设备上执行的指令提供用于实现在流程图一个流程或多个流程和 /或方框图一个方框或多 个方框中指定的功能的步骤。 在 一个典型的配置中, 计算设备包括一个或多个处理器 (Central Processing Unit, 简 称为 CPU)、 输入 /输出接口、 网络接口和内存。 内存可能包括计算机可读介质中的非永久性存储器, 随机存取存储器 (Random Access Memory, 简称为 RAM)和 /或非易失性内存等形式, 如只读存储器 (Read Only Memory, 简称 为 ROM)或闪存 (flash RAM) O 内存是计算机可读介质的示例。 计算机 可读介质包括永久性和非永久性、 可移动和非可移动媒体可以由任何方法或技术 来实现信息存储。 信息可以是计算机可读指令、 数据结构、 程序的组件或其他数据。 计算机 的存储介质的例子包括 , 但不限于相变化内存 (Phase Change RAM, 简称为 PRAM) , 静态随 机存取存储器、 动态随机存取存储器 (Dynamic Random Access Memory, 简称为 DRAM) , 其 他类型的随机存取存储器、 只读存储器、 电可擦除可编程只读存储器、 快闪记忆体或其他内 存技术、 只读光盘只读存储器 (CD-ROM) , 数字多功能光盘 (Digital versatile disc, 简称 为 DVD)或其他光学存储、 磁盒式磁带, 磁带磁盘存储或其他磁性存储设备或任何其他非传 输介质, 可用于存储可以被计算设备访问的信息。 按照本文中的界定, 计算机可读介质不包 括暂存电脑可读媒体 (transitory media) , 如调制的数据信号和载波。 还 需要说明的是, 术语 “包括” 、 “包含”或者其任何其他变体意在涵盖非排他性的包 含, 从而使得包括一系列要素的过程、 方法、 商品或者设备不仅包括那些要素, 而且还包括 没有明确列出的其他要素, 或者是还包括为这种过程、 方法、 商品或者设备所固有的要素。 在没有更多限制的情况下, 由语句 “包括一个 …… ” 限定的要素, 并不排除在包括要素的过 程、 方法、 商品或者设备中还存在另外的相同要素。 以上仅为本公开的实施例而已, 并不用于限制本公开。 对于本领域技术人员来说, 本公 开可以有各种更改和变化。 凡在本公开的精神和原理之内所作的任何修改、 等同替换、 改进 等, 均应包含在本公开的权利要求范围之内。 工业实用性 本 公开实施例提供的方案可以应用于数据查询的过程中, 响应于访问终端的查询请求, 在数据库系统中查询 目标敏感字段的字段数据; 对目标敏感字段的字段数据进行脱敏处理, 得到脱敏结果; 对脱敏结果进行加密处理, 得到密文脱敏结果; 将密文脱敏结果发送给访问 终端, 以供访问终端对密文脱敏结果进行解密, 得到脱敏结果, 进而解决了敏感数据泄露的 风险高的技术问题。
Claims
1、 一种敏感数据的数据查询方法, 应用于数据库系统, 所述方法包括: 响应于访问终端的查询请求, 在所述数据库系统中查询目标敏感字段的字段数据; 对 所述目标敏感字段的字段数据进行脱敏处理, 得到脱敏结果; 对 所述脱敏结果进行加密处理, 得到密文脱敏结果; 将 所述密文脱敏结果发送给所述访问终端 , 以供所述访问终端对所述密文脱敏结果进 行解密, 得到所述脱敏结果。
2、 根据权利要求 1 所述的方法, 其中, 对所述目标敏感字段的字段数据进行脱敏处 理, 得到脱敏结果, 包括: 响应于所述目标敏感字段对所述访问终端对应 的访问用户全部不可见或部分可见, 对 所述目标敏感字段 的字段数据进行脱敏处理, 得到所述脱敏结果。
3、 根据权利要求 2 所述的方法, 其中, 所述响应于所述目标敏感字段对所述访问终 端对应的访 问用户全部不可见, 对所述目标敏感字段的字段数据进行脱敏处理, 得到所述 脱敏结果, 包括: 响应于所述目标敏感字段对所述访问用户全部不可 见, 对所述目标敏感字段的全部的 所述字段数据进行脱敏 处理, 得到所述脱敏结果。
4 、 根据权利要求 2 所述的方法, 其中, 所述响应于所述目标敏感字段对所述访问终 端对应的访 问用户部分可见, 对所述目标敏感字段的字段数据进行脱敏处理, 得到所述脱 敏结果, 包括: 响应于所述目标敏感字段对所述访问用户部分可见 , 对所述目标敏感字段的部分的所 述字段数据进行脱敏处 理, 得到所述脱敏结果。
5、 根据权利要求 2所述的方法, 其中, 所述方法还包括: 响应于所述目标敏感字段对所述访问用户全部可见 , 对所述目标敏感字段的所述字段 数据进行加密处理 , 得到加密结果; 将 所述加密结果发送给所述访问终端, 以供所述访问终端对所述加密结果进行解密, 得到所述 目标敏感字段的所述字段数据。
6 、 根据权利要求 2所述的方法, 其中, 所述方法还包括: 获取为所述目标敏感字段配置的授权用户列表 , 其中, 所述授权用户列表包括第一授 权用户的用户标识和第 二授权用户的用户标识, 所述目标敏感字段对所述第一授权用户全 部可见, 所述目标敏感字段对所述第二授权用户部分可见;
将 所述访问用户的用户标识与所述授权用户列表 中的用户标识进行匹配, 得到匹配结 果; 根 据所述匹配结果, 识别所述目标敏感字段对所述访问用户的可见性。
7、 根据权利要求 6 所述的方法, 其中, 所述根据匹配结果, 识别所述目标敏感字段 对所述访问终端对应 的访问用户的可见性, 包括: 响应于所述匹配结果为所述访问用户的用户标识与所 述第一授权用户的用户标识匹配 成功, 确定所述目标敏感字段对所述访问用户全部可见。
8 、 根据权利要求 6 所述的方法, 其中, 所述根据匹配结果, 识别所述目标敏感字段 对所述访问终端对应 的访问用户的可见性, 包括: 响应于所述匹配结果为所述访问用户的用户标识与所 述第二授权用户的用户标识匹配 成功, 确定所述目标敏感字段对所述访问用户部分可见。
9 、 根据权利要求 6 所述的方法, 其中, 所述根据匹配结果, 识别所述目标敏感字段 对所述访问终端对应 的访问用户的可见性, 包括: 响应于所述访问用户的用户标识与所述授权用户列表 中的用户标识匹配失败, 确定所 述目标敏感字段对所述访 问用户全部不可见。
10、 根据权利要求 1所述的方法, 其中, 所述对所述目标敏感字段的字段数据进行脱 敏处理, 得到脱敏结果, 包括: 响应于所述访问用户为所述目标敏感字段配置对应 的自定义脱敏算法, 利用所述自定 义脱敏算法, 对所述目标敏感字段的字段数据进行脱敏处理, 得到所述脱敏结果。
11、 根据权利要求 1所述的方法, 其中, 所述对所述目标敏感字段的字段数据进行脱 敏处理, 得到脱敏结果, 包括: 响应于所述访问用户未为所述目标敏感字段配置对应 的自定义脱敏算法, 利用预先为 所述目标敏感字段配置 的系统默认脱敏算法, 对所述目标敏感字段的字段数据进行脱敏处 理, 得到所述脱敏结果。
12、 根据权利要求 11所述的方法, 其中, 所述方法还包括: 响应于从所述查询请求解析出脱敏算法配置信息 , 所述脱敏算法配置信息包括所述自 定义脱敏算法的标识和 算法参数, 根据所述自定义脱敏算法的标识将对应的算法参数写入 自定义脱敏算法模板 中, 得到所述自定义脱敏算法。
13、 根据权利要求 7所述的方法, 其中, 所述方法还包括: 响应于未从所述查询请求解析出所述脱敏算法配置信 息, 确定所述访问用户没有为所 述目标敏感字段配置对应 的自定义脱敏算法。
14、 根据权利要求 1所述的方法, 其中, 所述对所述脱敏结果进行加密处理, 得到密 文脱敏结果, 包括: 响应于所述访问用户为所述目标敏感字段配置对应 的自定义加密算法, 利用所述自定 义加密算法对所述脱敏 结果进行加密处理, 得到所述密文脱敏结果; 响应于所述访问用户没有为所述目标敏感字段配置对 应的所述自定义加密算法, 利用 预先为所述 目标敏感字段配置的系统默认加密算法对所述脱敏结果进行加 密处理, 得到所 述密文脱敏结果 。
15、 根据权利要求 14所述的方法, 其中, 所述方法还包括: 响应于从所述查询请求解析出加密算法配置信息 , 所述加密算法配置信息包括所述自 定义加密算法的标识和 算法参数, 根据所述自定义加密算法的标识将对应的算法参数写入 自定义加密算法模板 中, 得到所述自定义加密算法; 响应于未从所述查询请求解析出所述加密算法配置信 息, 确定所述访问用户没有为所 述目标敏感字段配置对应 的所述自定义加密算法。
16、 根据权利要求 1至 15任一项所述的方法, 其中, 所述响应于访问终端的查询请 求, 在所述数据库系统中查询目标敏感字段的字段数据之前, 还包括: 响应于配置终端发送的敏感规则, 以及所述配置终端的签名信息, 所述敏感规则包括 以下一种或多种 : 为所述目标敏感字段配置的授权用户列表、 系统默认脱敏算法、 系统默 认加密算法、 自定义脱敏算法模板、 自定义加密算法模板, 对所述签名信息进行验证; 响应于所述签名信息验证通过, 在本地保存所述敏感规则。
17、 一种电子设备, 包括: 存储器和处理器; 所述存储器, 设置为存储计算机程序; 所述处理器耦合至所述存储 器, 设置为执行所述计算机程序以用于执行权利要求 1-16 任 一项所述方法中的步骤 。
18、 一种存储有计算机程序的计算机可读存储介质, 当所述计算机程序被处理器执行 时, 致使所述处理器能够实现权利要求 1T6任一项所述方法 中的步骤。
19、 一种计算机程序产品, 包括计算机程序/指令, 当计算机程序 /指令被处理器执行 时, 致使处理器能够实现权利要求 1T6任一项所述方法 中的步骤。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410748697.4 | 2024-06-11 | ||
| CN202410748697.4A CN121118092A (zh) | 2024-06-11 | 2024-06-11 | 敏感数据的数据查询方法、电子设备、存储介质及计算机程序产品 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2025257622A1 true WO2025257622A1 (zh) | 2025-12-18 |
Family
ID=97955348
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/IB2025/052757 Pending WO2025257622A1 (zh) | 2024-06-11 | 2025-03-17 | 敏感数据的数据查询方法、电子设备、存储介质及计算机程序产品 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN121118092A (zh) |
| WO (1) | WO2025257622A1 (zh) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN121706142A (zh) * | 2026-02-12 | 2026-03-20 | 深圳市乔安科技有限公司 | 图像脱敏方法、装置、计算机设备和存储介质 |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20150186635A1 (en) * | 2014-01-02 | 2015-07-02 | Madjid F. Nakhjiri | Granular Redaction of Resources |
| CN115547441A (zh) * | 2022-09-14 | 2022-12-30 | 广东聚健康信息科技有限公司 | 一种基于个人健康医疗数据的安全获取方法及系统 |
| CN116049884A (zh) * | 2023-01-17 | 2023-05-02 | 三江学院 | 基于角色访问控制的数据脱敏方法、系统及介质 |
-
2024
- 2024-06-11 CN CN202410748697.4A patent/CN121118092A/zh active Pending
-
2025
- 2025-03-17 WO PCT/IB2025/052757 patent/WO2025257622A1/zh active Pending
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20150186635A1 (en) * | 2014-01-02 | 2015-07-02 | Madjid F. Nakhjiri | Granular Redaction of Resources |
| CN115547441A (zh) * | 2022-09-14 | 2022-12-30 | 广东聚健康信息科技有限公司 | 一种基于个人健康医疗数据的安全获取方法及系统 |
| CN116049884A (zh) * | 2023-01-17 | 2023-05-02 | 三江学院 | 基于角色访问控制的数据脱敏方法、系统及介质 |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN121706142A (zh) * | 2026-02-12 | 2026-03-20 | 深圳市乔安科技有限公司 | 图像脱敏方法、装置、计算机设备和存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN121118092A (zh) | 2025-12-12 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11489874B2 (en) | Trusted-code generated requests | |
| CN103685267B (zh) | 数据访问方法及装置 | |
| US11290446B2 (en) | Access to data stored in a cloud | |
| US11921883B2 (en) | Contact discovery service with privacy aspect | |
| US11509709B1 (en) | Providing access to encrypted insights using anonymous insight records | |
| US12289310B2 (en) | Decentralized application authentication | |
| WO2014207554A2 (en) | Method and apparatus for providing database access authorization | |
| US20160085861A1 (en) | Private cloud api | |
| CN112287372B (zh) | 用于保护剪贴板隐私的方法和装置 | |
| CN113645226B (zh) | 一种基于网关层的数据处理方法、装置、设备及存储介质 | |
| US20140032904A1 (en) | Securing private information in public, private and mobile devices | |
| US11764976B2 (en) | System and method for secure internet communications | |
| KR101721582B1 (ko) | 음성 데이터를 이용한 비대면 사용자 인증 시스템, 방법 및 컴퓨터 프로그램 | |
| CN121118092A (zh) | 敏感数据的数据查询方法、电子设备、存储介质及计算机程序产品 | |
| US20250055691A1 (en) | Secure sharing of data between applications | |
| US12063210B1 (en) | Secure authentication for a virtual computer | |
| CN116244682A (zh) | 数据库的访问方法、装置、设备以及存储介质 | |
| US20250373423A1 (en) | Systems and methods for controlling access to data on electronic documents using vaultless tokenization | |
| US12556370B2 (en) | Systems and methods of cloud-based multifactor authentication | |
| US12147992B2 (en) | System, method, and computer-accessible medium for determining the veracity of a bank fraud call | |
| US12445435B2 (en) | Time-based one time password user interfaces | |
| US20260031982A1 (en) | Key distribution using key duplication policies | |
| US20250094618A1 (en) | Virtual keys for column dataset access management | |
| CN118484477A (zh) | 敏感规则的配置方法、设备、存储介质和计算机程序产品 | |
| WO2025038118A1 (en) | Secure and efficient one-time password system and method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 25821435 Country of ref document: EP Kind code of ref document: A1 |