Data desensitization method and device, electronic equipment and computer program product
By acquiring data from a vector database and utilizing pre-trained models and rules to dynamically adjust the desensitization strategy, the problem of inflexibility in data desensitization in existing technologies is solved, achieving data usability without visibility and ensuring data security and privacy protection.
Patent Information
- Application Number
- CN202411534469.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2024-11-26
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing technologies lack flexibility in the data anonymization process, failing to dynamically adjust anonymization strategies based on data type, sensitivity, and usage scenario. This can lead to over- or under-anonymization, affecting data integrity and privacy protection.
By receiving a target data query command, the target data is retrieved from a vector database. Using a pre-trained data anonymization model and rules, the anonymization strategy is dynamically adjusted to select the anonymization method that best suits the current data usage scenario, thus achieving data usability without visibility.
It enables dynamic adjustment of anonymization strategies based on different business needs, ensuring that data does not leak privacy information while being used for its value, thereby improving data security and compliance.
Smart Images

Figure CN119026177A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to data desensitization methods, devices, electronic devices and computer program products. Background Art
[0002] With the development of information technology and the improvement of digitalization, the amount of data in various industries has shown explosive growth. These data are of great value for business analysis, decision support, personalized services, scientific research, etc.
[0003] However, these data contain a large amount of sensitive information. If not handled properly, it is very easy to cause privacy leaks, data abuse and other problems, which in turn will cause adverse effects such as personal privacy leaks, corporate reputation loss, and decline in social trust, and even violate relevant laws and regulations.
[0004] Therefore, how to make data available but invisible, that is, how to protect data security and privacy while ensuring data availability, has become an urgent problem to be solved. Summary of the invention
[0005] The main purpose of this application is to provide a data desensitization method, device, electronic device and computer program product, aiming to achieve the availability and invisibility of data.
[0006] To achieve the above objectives, the present application provides a data desensitization method, which includes: After receiving the target data query instruction, query from a preset database to obtain the target data to be desensitized corresponding to the target data query instruction, wherein the database is a vector database, and the data in the vector database is stored in the form of vectors; Obtaining the target data desensitization rule corresponding to the target data query instruction; Based on the target data desensitization rule and the pre-trained data desensitization model, the target data to be desensitized is desensitized to obtain the target desensitized data corresponding to the target data query instruction.
[0007] In one embodiment, the step of obtaining the target data desensitization rule corresponding to the target data query instruction includes: Determine the target data desensitization rule query instruction corresponding to the target data query instruction; From a preset data desensitization rule library, a data desensitization rule corresponding to the target data desensitization rule query instruction is queried and obtained as the target data desensitization rule corresponding to the target data query instruction.
[0008] In one embodiment, the step of determining the target data desensitization rule query instruction corresponding to the target data query instruction includes: Parsing the target data query instruction to obtain a target data query condition and a target data query purpose, wherein the target data query condition includes a target data type; The data desensitization rule query instruction commonly associated with the target data type and the target data query purpose is determined as the target data desensitization rule query instruction corresponding to the target data query instruction.
[0009] In one embodiment, the step of obtaining the target data desensitization rule corresponding to the target data query instruction includes: Determine the target data application scenario and target data type corresponding to the target data query instruction; According to the target data application scenario and the target data type, a target data desensitization rule corresponding to the target data query instruction is constructed.
[0010] In one embodiment, the step of constructing a target data desensitization rule corresponding to the target data query instruction according to the target data application scenario and the target data type includes: Input the target data application scenario and the target data type into a pre-trained data desensitization rule construction model to obtain the data desensitization rule output by the data desensitization rule construction model; The data desensitization rule output by the data desensitization rule construction model is determined as the target data desensitization rule corresponding to the target data query instruction.
[0011] In one embodiment, the target data desensitization rule is embodied in the form of a prompt word text, and the step of desensitizing the target data to be desensitized based on the target data desensitization rule and a pre-trained data desensitization model to obtain the target desensitized data corresponding to the target data query instruction includes: Inputting the target data desensitization rule into a pre-trained data desensitization model, desensitizing the target data to be desensitized through the data desensitization model, and obtaining desensitized data output by the data desensitization model; The desensitized data output by the data desensitization model is determined as the target desensitized data corresponding to the target data query instruction.
[0012] In one embodiment, the step of desensitizing the target data to be desensitized based on the target data desensitization rule and the pre-trained data desensitization model to obtain the target desensitized data corresponding to the target data query instruction includes: Generate target prompt word text according to the target data desensitization rule; The target prompt word text is input into a pre-trained data desensitization model, and the target data to be desensitized is desensitized by the data desensitization model to obtain the desensitized data output by the data desensitization model as the target desensitized data corresponding to the target data query instruction.
[0013] In addition, to achieve the above purpose, the present application also provides a data desensitization device, the data desensitization device comprising: A data acquisition module is used to query and obtain the target data to be desensitized corresponding to the target data query instruction from a preset database after receiving the target data query instruction, wherein the database is a vector database, and the data in the vector database is stored in the form of vectors; A rule acquisition module, used to acquire the target data desensitization rule corresponding to the target data query instruction; The data desensitization module is used to desensitize the target data to be desensitized based on the target data desensitization rule and a pre-trained data desensitization model to obtain the target desensitized data corresponding to the target data query instruction.
[0014] In addition, to achieve the above-mentioned purpose, the present application also provides an electronic device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program implements the steps of the data desensitization method as described above when executed by the processor.
[0015] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the data desensitization method as described above.
[0016] The embodiments of the present application provide a data desensitization method, device, electronic device and computer program product. The technical solution of the embodiments of the present application is to obtain the target data to be desensitized corresponding to the target data query instruction from a preset database after receiving the target data query instruction, wherein the database is a vector database, and the data in the vector database is stored in the form of vectors; obtain the target data desensitization rule corresponding to the target data query instruction; based on the target data desensitization rule and a pre-trained data desensitization model, desensitize the target data to be desensitized to obtain the target desensitized data corresponding to the target data query instruction, so that the embodiments of the present application can dynamically adjust the desensitization strategy according to the data query instructions of different business needs, select the desensitization method that best suits the current data usage scenario, desensitize the data, and then achieve the data being available but invisible. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying any creative work.
[0019] Figure 1 A schematic diagram of the process flow provided for the first embodiment of the data desensitization method of this application; Figure 2 This is a schematic diagram of the first process of obtaining target data desensitization rules in the data desensitization method of this application; Figure 3 This is a schematic diagram of the second process of obtaining target data desensitization rules in the data desensitization method of this application; Figure 4 This is a schematic diagram of the module structure of the data desensitization device according to an embodiment of the present application; Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the data desensitization method in the embodiment of the present application.
[0020] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0021] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0022] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0023] At present, the mainstream data desensitization methods in the industry generally adopt a one-size-fits-all approach. Taking the field of medical technology as an example, the data desensitization methods for medical data apply the same desensitization standards to all medical data without considering the type, sensitivity and usage scenarios of the medical data. They lack flexibility and cannot implement differentiated desensitization processing for different types of medical data. As a result, in some cases, desensitization is excessive, which damages the integrity and availability of the data and causes distorted data analysis results. In other cases, desensitization is insufficient, and too much sensitive information is retained, resulting in patient privacy leaks, making it impossible to truly achieve the availability and invisibility of medical data.
[0024] In this regard, the main solution of the embodiment of the present application is: after receiving the target data query instruction, query from a preset database to obtain the target data to be desensitized corresponding to the target data query instruction, wherein the database is a vector database, and the data in the vector database is stored in the form of vectors; obtain the target data desensitization rule corresponding to the target data query instruction; based on the target data desensitization rule and a pre-trained data desensitization model, desensitize the target data to be desensitized to obtain the target desensitized data corresponding to the target data query instruction.
[0025] The embodiment of the present application can dynamically adjust the desensitization strategy according to the data query instructions of different business needs, select the desensitization method that best suits the current medical data usage scenario, desensitize the data, and thus achieve the data being available but invisible.
[0026] It should be noted that the execution subject of the embodiments of the present application is an electronic device, which may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs (Televisions), desktop computers, etc., or any electronic device that can achieve the above functions, and the embodiments of the present application do not specifically limit this. The following uses electronic devices as the execution subject as an example to illustrate the following embodiments of the present application.
[0027] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0028] Please refer to Figure 1 , Figure 1 A flowchart of the first embodiment of the data desensitization method of this application is provided.
[0029] The present application proposes a data desensitization method of a first embodiment, which includes steps S100 to S300: Step S100, after receiving the target data query instruction, query from a preset database to obtain the target data to be desensitized corresponding to the target data query instruction, wherein the database is a vector database, and the data in the vector database is stored in the form of vectors; It should be noted that the data desensitization method in this embodiment can be applied to different technical fields such as medical care, finance, education, telecommunications, real estate, etc. That is, for a specific technical field, the data desensitization method in this embodiment can be adopted, and after targeted fine-tuning, highly suitable data desensitization can be performed.
[0030] Exemplarily, when the data desensitization method in this embodiment is applied to the field of medical technology, the target data query instruction is a target medical data query instruction, the preset database is a medical database, and the target data to be desensitized corresponding to the target data query instruction is the target medical data to be desensitized. Step S100 may be: after receiving the target medical data query instruction, query from the preset medical database to obtain the target medical data to be desensitized corresponding to the target medical data query instruction, wherein the medical database is a vector database, and the data in the vector database is stored in the form of vectors.
[0031] As those skilled in the art know, medical data refers to various information records related to medical services, including but not limited to patients' personal information (such as name, ID number), health status (such as medical history, diagnosis results), treatment plans, drug prescriptions, examination reports, etc. These data are usually used in clinical decision support, disease research, health management, etc., and contain a large amount of patients' personal privacy information. Medical database refers to an information system specially designed to store and manage medical data. Such databases can be relational databases, document databases or other types. They are characterized by the ability to efficiently store, retrieve and manage large amounts of complex medical information while supporting strict privacy protection and security measures. Vector databases are a special database management system that is mainly used to store high-dimensional vector data. These vectors usually represent the characteristics of objects, such as word embeddings of text or feature vectors of images. Vector databases allow for fast similarity searches, that is, finding the data items that are most similar to the query vector.
[0032] It should be noted that the medical database in this embodiment is a vector database, and the medical data in the medical database is stored in the form of vectors. This embodiment stores medical data in the form of vectors, and can improve the query efficiency and accuracy of medical data through vector similarity retrieval, while avoiding direct medical data leakage.
[0033] In this embodiment, the medical data query instruction is an operation instruction for querying and obtaining specific medical data from a medical database, including query conditions and query purposes. The target medical data query instruction is a specific medical data query instruction issued by a user or a system, which has clear query conditions and query purposes, is associated with a specific medical data usage scenario, and is used to query and obtain medical data for the specific medical data usage scenario from a medical database. Medical data to be desensitized refers to medical data that has been retrieved from a medical database through a medical data query instruction but has not yet undergone corresponding desensitization processing, and contains the patient's personal privacy information. Target medical data to be desensitized refers to desensitized medical data obtained by querying from a medical database through a target medical data query instruction.
[0034] After receiving the target data query instruction input by the user or the system, this embodiment accesses the database in the form of a vector database based on the target data query instruction, and quickly and accurately finds the data to be desensitized that meets the query conditions of the target data query instruction, and obtains the target data to be desensitized, so as to desensitize the target data to be desensitized in vector form through artificial intelligence in subsequent steps.
[0035] This embodiment uses a vector database to execute the query of target data, which not only greatly improves the speed and accuracy of data retrieval, but also provides a high-quality data foundation for subsequent desensitization processing, thereby bringing significant technical benefits to the entire data desensitization processing flow.
[0036] In addition to being applied to the field of medical technology, the data desensitization method in this embodiment can also be applied to other technical fields.
[0037] For example, when the data desensitization method in this embodiment is applied to the field of financial technology, the target data query instruction is a target financial data query instruction, the preset database is a financial database, and the target data to be desensitized corresponding to the target data query instruction is the target financial data to be desensitized. Step S100 may be: after receiving the target financial data query instruction, query the preset financial database to obtain the target financial data to be desensitized corresponding to the target financial data query instruction, wherein the financial database is a vector database, and the data in the vector database is stored in the form of vectors, and the technical effect is similar to that when applied to the field of medical technology, which will not be elaborated here.
[0038] When the data desensitization method in this embodiment is applied to the field of telecommunications technology, the target data query instruction is a target telecommunications data query instruction, the preset database is a telecommunications database, and the target data to be desensitized corresponding to the target data query instruction is the target telecommunications data to be desensitized. Step S100 may be: after receiving the target telecommunications data query instruction, query the preset telecommunications database to obtain the target telecommunications data to be desensitized corresponding to the target telecommunications data query instruction, wherein the telecommunications database is a vector database, the data in the vector database is stored in the form of vectors, and the technical effect is similar to that when applied to the field of medical technology, which will not be elaborated here.
[0039] Step S200, obtaining a target data desensitization rule corresponding to the target data query instruction; When the data desensitization method in this embodiment is applied to the field of medical technology, the target data desensitization rule corresponding to the target data query instruction is the target medical data desensitization rule, and step S200 may be: obtaining the target medical data desensitization rule corresponding to the target medical data query instruction.
[0040] Those skilled in the art will know that medical data desensitization refers to the process of modifying, replacing or hiding the sensitive information of patients in medical data without affecting the use value of medical data. Its purpose is to protect the patient's personal privacy and ensure the security of medical data while still maintaining the practicality of medical data. Common desensitization techniques include obfuscation, pseudonymization, encryption, randomization, data replacement, etc.
[0041] It should be noted that medical data desensitization rules are a set of specific instructions that define how to desensitize medical data. All medical data desensitization rules take into account the unique sensitivity and complexity of medical data, including but not limited to patients' personal information, medical records, diagnosis results, etc., and strictly comply with relevant medical privacy protection laws and standards to ensure that patient privacy is properly protected. Generally speaking, medical data desensitization rules include which fields or data elements in medical data need to be desensitized, what desensitization technology to use, and the output format after desensitization.
[0042] This embodiment pre-customizes one or more medical data desensitization rules for different medical data usage scenarios based on the type of medical data, actual business needs (i.e., the purpose of the data), relevant requirements of laws and regulations, and the sensitivity of different data, and the medical data desensitization rules corresponding to different medical data usage scenarios can be reused. For example, medical data usage scenario A corresponds to medical data desensitization rules a and b, and medical data usage scenario B corresponds to medical data desensitization rules b and c. In A and B, medical data desensitization rule b is reused.
[0043] It is not difficult to understand that the target medical data desensitization rule is a medical data desensitization rule for the target medical data query instruction. In this embodiment, different types of medical data query instructions are set in advance for different medical data usage scenarios. Different types of medical data query instructions can be distinguished by their query purposes. Each query purpose corresponds to a specific medical data usage scenario. The user can obtain the medical data required for the current medical data usage scenario from the medical database by selecting the medical data query instruction corresponding to the query purpose and the current medical data usage scenario, and setting the corresponding query conditions.
[0044] In this embodiment, the target data desensitization rules can be obtained through the query purpose, type or corresponding data usage scenario of the target data query instruction, so that this embodiment can dynamically adjust the desensitization strategy for data query instructions with different business needs, thereby selecting the data desensitization rules that best fit the current data usage scenario, and desensitizing the data to be desensitized, thereby ensuring the value of data use while not leaking privacy information, ensuring data security, and truly achieving data availability but invisibility.
[0045] Accordingly, when the data desensitization method in this embodiment is applied to the field of financial technology, the target data desensitization rule corresponding to the target data query instruction is the target financial data desensitization rule, and step S200 may be: obtaining the target financial data desensitization rule corresponding to the target financial data query instruction, and the technical effect is similar to that when applied to the field of medical technology, and will not be elaborated here.
[0046] When the data desensitization method in this embodiment is applied to the field of telecommunications technology, the target data desensitization rule corresponding to the target data query instruction is the target telecommunications data desensitization rule, and step S200 may be: obtaining the target telecommunications data desensitization rule corresponding to the target telecommunications data query instruction, and the technical effect is similar to that when applied to the field of medical technology, and will not be elaborated here.
[0047] In one possible implementation, please refer to Figure 2 , step S200 may include steps S210 to S220: Step S210, determining the target data desensitization rule query instruction corresponding to the target data query instruction; Step S220, querying and obtaining the data desensitization rule corresponding to the target data desensitization rule query instruction from the preset data desensitization rule library as the target data desensitization rule corresponding to the target data query instruction.
[0048] When the data desensitization method in this embodiment is applied to the field of medical technology, the target data desensitization rule query instruction corresponding to the target data query instruction is a target medical data desensitization rule query instruction, the preset data desensitization rule library is a medical data desensitization rule library, and the data desensitization rule corresponding to the target data desensitization rule query instruction is a medical data desensitization rule. Step S210 is: determine the target medical data desensitization rule query instruction corresponding to the target medical data query instruction, and step S220 is: query and obtain the medical data desensitization rule corresponding to the target medical data desensitization rule query instruction from the preset medical data desensitization rule library as the target medical data desensitization rule corresponding to the target medical data query instruction.
[0049] It should be noted that, in this embodiment, the medical data desensitization rule base is a database for storing and managing medical data desensitization rules. Users can manage the medical data desensitization rules stored in the medical data desensitization rule base according to actual needs or changes in relevant laws and regulations, including adding, modifying and deleting. The medical data desensitization rule query instruction is an operation instruction for querying and obtaining specific medical data desensitization rules from the medical data desensitization rule base. The target medical data desensitization rule query instruction is a specific medical data desensitization rule query instruction, which is used to query and obtain the target medical data desensitization rule from the medical data desensitization rule base.
[0050] In this embodiment, a corresponding data desensitization rule query instruction can be constructed in advance for each data query instruction, query purpose or data usage scenario, and stored in association (for example, stored in association in the form of a mapping table). Therefore, in actual applications, the target data desensitization rule query instruction is determined according to the type of target data query instruction, the query purpose or the corresponding data usage scenario, and then the target data desensitization rule is obtained by querying from the preset data desensitization rule library, so that this embodiment can flexibly respond to data query instructions of different business needs, dynamically adjust the desensitization strategy, and select the desensitization method that best suits the current data usage scenario to desensitize the desensitized data, ensuring that each data desensitization meets actual needs and compliance requirements, effectively enhancing the security and compliance of data use, and achieving data availability and invisibility.
[0051] At the same time, this implementation method processes data query instructions and data desensitization rule query instructions separately, which can facilitate maintenance personnel to manage the data desensitization rule library at any time according to actual needs and new regulations.
[0052] Accordingly, when the data desensitization method in this embodiment is applied to the field of financial technology, the target data desensitization rule query instruction corresponding to the target data query instruction is a target financial data desensitization rule query instruction, the preset data desensitization rule library is a financial data desensitization rule library, and the data desensitization rule corresponding to the target data desensitization rule query instruction is a financial data desensitization rule. Step S210 is: determine the target financial data desensitization rule query instruction corresponding to the target financial data query instruction, and step S220 is: query and obtain the financial data desensitization rule corresponding to the target financial data desensitization rule query instruction from the preset financial data desensitization rule library as the target financial data desensitization rule corresponding to the target financial data query instruction, and the technical effect is similar to that when applied to the field of medical technology, and will not be repeated here.
[0053] When the data desensitization method in this embodiment is applied to the field of telecommunications technology, the target data desensitization rule query instruction corresponding to the target data query instruction is a target telecommunications data desensitization rule query instruction, the preset data desensitization rule library is a telecommunications data desensitization rule library, and the data desensitization rule corresponding to the target data desensitization rule query instruction is a telecommunications data desensitization rule. Step S210 is: determining the target telecommunications data desensitization rule query instruction corresponding to the target telecommunications data query instruction, and step S220 is: querying and obtaining the telecommunications data desensitization rule corresponding to the target telecommunications data desensitization rule query instruction from the preset telecommunications data desensitization rule library as the target telecommunications data desensitization rule corresponding to the target telecommunications data query instruction. The technical effect is similar to that when applied to the field of medical technology, and will not be elaborated here.
[0054] Further, in a feasible implementation manner, step S210 may include steps S211-S212: Step S211, parsing the target data query instruction to obtain the target data query condition and the target data query purpose, wherein the target data query condition includes the target data type; Step S212: determine the data desensitization rule query instruction that is commonly associated with the target data type and the target data query purpose as the target data desensitization rule query instruction corresponding to the target data query instruction.
[0055] When the data desensitization method in this embodiment is applied to the field of medical technology, the target data query condition is the target medical data query condition, the target data query purpose is the target medical data query purpose, the target data query condition includes the target medical data type, and the data desensitization rule query instruction commonly associated with the target data type and the target data query purpose is the medical data desensitization rule query instruction. Step S211 may be: parsing the target medical data query instruction to obtain the target medical data query condition and the target medical data query purpose, wherein the target medical data query condition includes the target medical data type, and step S212 may be: determining the medical data desensitization rule query instruction commonly associated with the target medical data type and the target medical data query purpose as the target medical data desensitization rule query instruction corresponding to the target medical data query instruction.
[0056] It should be noted that, in this embodiment, the target medical data query condition refers to the query condition of the target medical data query instruction, the target medical data query purpose refers to the query purpose of the target medical data query instruction, and the target medical data type refers to the type of all medical data queried by the target medical data query instruction.
[0057] In this embodiment, even if the query purpose is the same, that is, the same medical data usage scenario, different medical data desensitization rules will be required for desensitization due to the different types of medical data used. It is not difficult to understand that in the same medical data usage scenario of AIDS disease research, the medical data desensitization rules required for text-type medical data and image-type medical data are different, and the medical data desensitization rules required for blood test-type medical data and drug prescription-type medical data are also different.
[0058] This implementation manner designs different data desensitization rules corresponding to different query purposes and data types, and stores them in association. Therefore, in practical applications, the target data query purpose and target data type can be obtained by parsing the target data query instruction, and the data desensitization rule query instruction associated with the target data query purpose and the target data type can be determined as the target data desensitization rule query instruction, and then the target data desensitization rule query instruction is used to query and obtain the target data desensitization rule for desensitizing the target data to be desensitized.
[0059] Accordingly, when the data desensitization method in this embodiment is applied to the field of financial technology, the target data desensitization rule corresponding to the target data query instruction is the target financial data desensitization rule, and step S200 may be: obtaining the target financial data desensitization rule corresponding to the target financial data query instruction, and the technical effect is similar to that when applied to the field of medical technology, and will not be elaborated here.
[0060] When the data desensitization method in this embodiment is applied to the field of telecommunications technology, the target data desensitization rule corresponding to the target data query instruction is the target telecommunications data desensitization rule, and step S200 may be: obtaining the target telecommunications data desensitization rule corresponding to the target telecommunications data query instruction, and the technical effect is similar to that when applied to the field of medical technology, and will not be elaborated here.
[0061] In one possible implementation, please refer to Figure 3 , step S200 may further include steps S230 to S240: Step S230, determining the target data application scenario and target data type corresponding to the target data query instruction; Step S240, constructing a target data desensitization rule corresponding to the target data query instruction according to the target data application scenario and the target data type.
[0062] When the data desensitization method in this embodiment is applied to the field of medical technology, the target data application scenario corresponding to the target data query instruction is the target medical data application scenario, and the target data type corresponding to the target data query instruction is the target medical data type. Step S230 may be: determining the target medical data application scenario and the target medical data type corresponding to the target medical data query instruction. Step S240 may be: constructing the target medical data desensitization rules corresponding to the target medical data query instruction according to the target medical data application scenario and the target medical data type.
[0063] It should be noted that the medical data application scenario in this implementation refers to the medical data usage scenario, and the target medical data application scenario refers to the medical data usage scenario corresponding to the target medical data query instruction.
[0064] After receiving the target medical data query instruction, this embodiment parses it and extracts key information therefrom to determine the target medical data application scenario and the target medical data type, and then constructs the target medical data desensitization rules based on the target medical data application scenario and the target medical data type.
[0065] Exemplarily, according to the target medical data application scenario and the target medical data type, a suitable template can be selected from the preset medical data desensitization rule templates, and the parameter information in the template can be adjusted, including which fields or data elements in the medical data need to be desensitized, which desensitization technology to use, and the output format after desensitization, etc., so as to construct the target medical data desensitization rules.
[0066] This implementation constructs the most appropriate desensitization rules in real time according to specific application scenarios and data types, thereby improving the pertinence and effectiveness of the desensitization rules and enabling the system to flexibly respond to different business needs.
[0067] Accordingly, when the data desensitization method in this embodiment is applied to the field of financial technology, the target data desensitization rule corresponding to the target data query instruction is the target financial data desensitization rule, and step S200 may be: obtaining the target financial data desensitization rule corresponding to the target financial data query instruction, and the technical effect is similar to that when applied to the field of medical technology, and will not be elaborated here.
[0068] When the data desensitization method in this embodiment is applied to the field of telecommunications technology, the target data desensitization rule corresponding to the target data query instruction is the target telecommunications data desensitization rule, and step S200 may be: obtaining the target telecommunications data desensitization rule corresponding to the target telecommunications data query instruction, and the technical effect is similar to that when applied to the field of medical technology, and will not be elaborated here.
[0069] Further, in a feasible implementation manner, step S240 may include steps S241-S242: Step S241, inputting the target data application scenario and the target data type into a pre-trained data desensitization rule construction model to obtain the data desensitization rule output by the data desensitization rule construction model; Step S242, determining the data desensitization rule output by the data desensitization rule construction model as the target data desensitization rule corresponding to the target data query instruction.
[0070] When the data desensitization method in this embodiment is applied to the field of medical technology, the pre-trained data desensitization rule construction model is the medical data desensitization rule construction model, and the data desensitization rules output by the data desensitization rule construction model are the medical data desensitization rules. Step S241 may be: input the target medical data application scenario and the target medical data type into the pre-trained medical data desensitization rule construction model to obtain the medical data desensitization rules output by the medical data desensitization rule construction model. Step S242 may be: determine the medical data desensitization rules output by the medical data desensitization rule construction model as the target medical data desensitization rules corresponding to the target medical data query instruction.
[0071] It should be noted that in the present embodiment, with respect to the field of medical technology, corresponding medical data desensitization rules are constructed in advance by experts for different medical data application scenarios and medical data types, and a large number of samples with medical data application scenarios and medical data types as sample features and the medical data desensitization rules specifically constructed by experts as sample labels are obtained. A data set is formed and divided into a training set, a validation set, and a test set. The basic deep learning model is trained, and finally a medical data desensitization rule construction model is obtained, which can output corresponding medical data desensitization rules based on the input medical data application scenarios and medical data types.
[0072] This embodiment builds a model by using pre-trained data desensitization rules, and automatically outputs the most suitable data desensitization rules according to specific data application scenarios and data types, thereby improving the intelligence level of data desensitization rule generation, enhancing the flexibility and adaptability of the system, and enabling the system to better respond to diverse data desensitization needs.
[0073] Accordingly, when the data desensitization method in this embodiment is applied to the field of financial technology, the pre-trained data desensitization rule construction model is the financial data desensitization rule construction model, and the data desensitization rules output by the data desensitization rule construction model are the financial data desensitization rules. Step S241 may be: input the target financial data application scenario and the target financial data type into the pre-trained financial data desensitization rule construction model to obtain the financial data desensitization rules output by the financial data desensitization rule construction model. Step S242 may be: determine the financial data desensitization rules output by the financial data desensitization rule construction model as the target financial data desensitization rules corresponding to the target financial data query instruction, and the technical effect is similar to that when applied to the field of medical technology, and will not be elaborated here.
[0074] When the data desensitization method in this embodiment is applied to the field of telecommunications technology, the pre-trained data desensitization rule construction model is the telecommunications data desensitization rule construction model, and the data desensitization rules output by the data desensitization rule construction model are the telecommunications data desensitization rules. Step S241 may be: inputting the target telecommunications data application scenario and the target telecommunications data type into the pre-trained telecommunications data desensitization rule construction model to obtain the telecommunications data desensitization rules output by the telecommunications data desensitization rule construction model. Step S242 may be: determining the telecommunications data desensitization rules output by the telecommunications data desensitization rule construction model as the target telecommunications data desensitization rules corresponding to the target telecommunications data query instruction, and the technical effect is similar to that when applied to the field of medical technology, which will not be elaborated here.
[0075] Step S300, based on the target data desensitization rule and the pre-trained data desensitization model, the target data to be desensitized is desensitized to obtain the target desensitized data corresponding to the target data query instruction.
[0076] When the data desensitization method in this embodiment is applied to the field of medical technology, the pre-trained data desensitization model is the medical data desensitization model, and the target desensitized data corresponding to the target data query instruction is the target desensitized medical data. Step S300 may be: based on the target medical data desensitization rules and the pre-trained medical data desensitization model, the target medical data to be desensitized is desensitized to obtain the target desensitized medical data corresponding to the target medical data query instruction.
[0077] It should be noted that in this embodiment, for the field of medical technology, the pre-trained medical data desensitization model can be any general large language model on the market, or a specific model that has been trained in medical data desensitization. The medical data desensitization model has the ability to desensitize medical data according to medical data desensitization rules. The target desensitized medical data is the medical data obtained after the target data to be desensitized is desensitized by the target medical data desensitization rules and the medical data desensitization model. In the medical data usage scenario corresponding to the target medical data query instruction, the target desensitized medical data has a high use value and will not leak too much of the patient's privacy information, achieving usability without being visible.
[0078] In this embodiment, the data desensitization rules can be reflected as prompt words in text form, that is, prompt word text, so that the data desensitization rules can be directly input into the data desensitization model. The prompt words can be converted from other forms of expression into text form and then input into the data desensitization model.
[0079] That is, the data desensitization rules library may store data desensitization rules in the form of prompt word text or other forms of data desensitization rules. That is, the data desensitization rule construction model may output data desensitization rules in the form of prompt word text or other forms of data desensitization rules. This embodiment does not make any specific limitations on this.
[0080] Accordingly, when the data desensitization method in this embodiment is applied to the field of financial technology, the pre-trained data desensitization model is a financial data desensitization model, and the target desensitized data corresponding to the target data query instruction is the target desensitized financial data. Step S300 may be: based on the target financial data desensitization rules and the pre-trained financial data desensitization model, the target financial data to be desensitized is desensitized to obtain the target desensitized financial data corresponding to the target financial data query instruction, and the technical effect is similar to that when applied to the field of medical technology, which will not be elaborated here.
[0081] When the data desensitization method in this embodiment is applied to the field of telecommunications technology, the pre-trained data desensitization model is a telecommunications data desensitization model, and the target desensitized data corresponding to the target data query instruction is the target desensitized telecommunications data. Step S300 may be: based on the target telecommunications data desensitization rule and the pre-trained telecommunications data desensitization model, the target telecommunications data to be desensitized is desensitized to obtain the target desensitized telecommunications data corresponding to the target telecommunications data query instruction, and the technical effect is similar to that when applied to the field of medical technology, which will not be elaborated here.
[0082] For example, in a feasible implementation, the target data desensitization rule is embodied in the form of a prompt word text, and step S300 may include steps S310 to S320: Step S310, inputting the target data desensitization rule into the pre-trained data desensitization model, desensitizing the target data to be desensitized through the data desensitization model, and obtaining desensitized data output by the data desensitization model; Step S320, determining the desensitized data output by the data desensitization model as the target desensitized data corresponding to the target data query instruction.
[0083] When the data desensitization method in this embodiment is applied to the field of medical technology, the pre-trained data desensitization model is a medical data desensitization model, the desensitized data output by the data desensitization model is desensitized medical data, and the target medical data desensitization rule is embodied in a prompt word text, step S310 may be: inputting the target medical data desensitization rule into the pre-trained medical data desensitization model, desensitizing the target medical data to be desensitized through the medical data desensitization model, and obtaining the desensitized medical data output by the medical data desensitization model, and step S320 may be: determining the desensitized medical data output by the medical data desensitization model as the target desensitized medical data corresponding to the target medical data query instruction.
[0084] In this embodiment, the medical data desensitization rule is embodied as a prompt word in text form, that is, the target medical data desensitization rule is embodied in the form of a prompt word text. The prompt word text corresponding to the medical data desensitization rule is input into a pre-trained medical data desensitization model, which can guide the medical data desensitization model to properly desensitize the target medical data to be desensitized, ensuring that the desensitized medical data is available but not visible, and that the data analysis results will not be distorted due to excessive desensitization, nor will the patient's privacy be leaked due to insufficient desensitization.
[0085] Accordingly, when the data desensitization method in this embodiment is applied to the field of financial technology, the pre-trained data desensitization model is a financial data desensitization model, the desensitized data output by the data desensitization model is desensitized financial data, and the target financial data desensitization rule is embodied in the form of a prompt word text, step S310 may be: inputting the target financial data desensitization rule into the pre-trained financial data desensitization model, desensitizing the target financial data to be desensitized through the financial data desensitization model, and obtaining the desensitized financial data output by the financial data desensitization model; step S320 may be: determining the desensitized financial data output by the financial data desensitization model as the target desensitized financial data corresponding to the target financial data query instruction, and the technical effect is similar to that when applied to the field of medical technology, and will not be elaborated here.
[0086] When the data desensitization method in this embodiment is applied to the field of telecommunications technology, the pre-trained data desensitization model is a telecommunications data desensitization model, the desensitized data output by the data desensitization model is desensitized telecommunications data, and the target telecommunications data desensitization rule is embodied in a prompt word text, step S310 may be: inputting the target telecommunications data desensitization rule into the pre-trained telecommunications data desensitization model, desensitizing the target telecommunications data to be desensitized by the telecommunications data desensitization model, and obtaining the desensitized telecommunications data output by the telecommunications data desensitization model, and step S320 may be: determining the desensitized telecommunications data output by the telecommunications data desensitization model as the target desensitized telecommunications data corresponding to the target telecommunications data query instruction, and the technical effect is similar to that when applied to the field of medical technology, which will not be elaborated here.
[0087] For example, in another feasible implementation, step S300 may include steps S330 to S340: Step S330, generating a target prompt word text according to the target data desensitization rule; Step S340, input the target prompt word text into a pre-trained data desensitization model, desensitize the target data to be desensitized through the data desensitization model, and obtain desensitized data output by the data desensitization model as the target desensitized data corresponding to the target data query instruction.
[0088] When the data desensitization method in this embodiment is applied to the field of medical technology, the pre-trained data desensitization model is the medical data desensitization model, and the desensitized data output by the data desensitization model is the desensitized medical data. Step S330 may be: generating a target prompt word text according to the target medical data desensitization rule, and step S340 may be: inputting the target prompt word text into the pre-trained medical data desensitization model, desensitizing the target medical data to be desensitized through the medical data desensitization model, and obtaining the desensitized medical data output by the medical data desensitization model as the target desensitized medical data corresponding to the target medical data query instruction.
[0089] In this embodiment, the medical data desensitization rules are embodied in forms other than prompt words in text form. Therefore, this embodiment first converts other forms of medical data desensitization rules into prompt words in text form, that is, converts the embodiment of the target medical data desensitization rules into prompt word text, thereby obtaining the target prompt word text, that is, the prompt word text corresponding to the target medical data desensitization rules, and then inputs the target prompt word text into a pre-trained medical data desensitization model, and desensitizes the target medical data to be desensitized through the medical data desensitization model.
[0090] Accordingly, when the data desensitization method in this embodiment is applied to the field of financial technology, the pre-trained data desensitization model is a financial data desensitization model, and the desensitized data output by the data desensitization model is desensitized financial data. Step S330 may be: generating a target prompt word text according to the target financial data desensitization rule, and step S340 may be: inputting the target prompt word text into the pre-trained financial data desensitization model, desensitizing the target financial data to be desensitized through the financial data desensitization model, and obtaining the desensitized financial data output by the financial data desensitization model as the target desensitized financial data corresponding to the target financial data query instruction, and the technical effect is similar to that when applied to the field of medical technology, and will not be elaborated here.
[0091] When the data desensitization method in this embodiment is applied to the field of telecommunications technology, the pre-trained data desensitization model is a telecommunications data desensitization model, and the desensitized data output by the data desensitization model is desensitized telecommunications data. Step S330 may be: generating a target prompt word text according to the target telecommunications data desensitization rule, and step S340 may be: inputting the target prompt word text into the pre-trained telecommunications data desensitization model, desensitizing the target telecommunications data to be desensitized by the telecommunications data desensitization model, and obtaining the desensitized telecommunications data output by the telecommunications data desensitization model as the target desensitized telecommunications data corresponding to the target telecommunications data query instruction, and the technical effect is similar to that when applied to the field of medical technology, which will not be elaborated here.
[0092] After receiving the target data query instruction, this embodiment queries from a preset database to obtain the target data to be desensitized corresponding to the target data query instruction, wherein the database is a vector database, and the data in the vector database is stored in the form of vectors; obtains the target data desensitization rule corresponding to the target data query instruction; based on the target data desensitization rule and a pre-trained data desensitization model, desensitizes the target data to be desensitized to obtain the target desensitized data corresponding to the target data query instruction, so that this embodiment can dynamically adjust the desensitization strategy according to the data query instructions of different business needs, select the desensitization method that best suits the current data usage scenario, desensitize the data, and then achieve the data being available but invisible.
[0093] In addition, please refer to Figure 4 , Figure 4 This is a schematic diagram of the module structure of the data desensitization device according to an embodiment of the present application.
[0094] The present application also provides a data desensitization device, which includes: The data acquisition module 10 is used to query and obtain the target data to be desensitized corresponding to the target data query instruction from a preset database after receiving the target data query instruction, wherein the database is a vector database, and the data in the vector database is stored in the form of vectors; A rule acquisition module 20 is used to acquire a target data desensitization rule corresponding to a target data query instruction; The data desensitization module 30 is used to desensitize the target data to be desensitized based on the target data desensitization rules and the pre-trained data desensitization model to obtain the target desensitized data corresponding to the target data query instruction.
[0095] In one embodiment, the rule acquisition module 20 is further used for: Determine the target data desensitization rule query instruction corresponding to the target data query instruction; From the preset data desensitization rule library, the data desensitization rule corresponding to the target data desensitization rule query instruction is queried and obtained as the target data desensitization rule corresponding to the target data query instruction.
[0096] In one embodiment, the rule acquisition module 20 is further used for: Parsing the target data query instruction to obtain the target data query condition and the target data query purpose, wherein the target data query condition includes the target data type; The data desensitization rule query instruction that is jointly associated with the target data type and the target data query purpose is determined as the target data desensitization rule query instruction corresponding to the target data query instruction.
[0097] In one embodiment, the rule acquisition module 20 is further used for: Determine the target data application scenario and target data type corresponding to the target data query instruction; According to the target data application scenario and target data type, construct the target data desensitization rules corresponding to the target data query instructions.
[0098] In one embodiment, the rule acquisition module 20 is further used for: Input the target data application scenario and the target data type into the pre-trained data desensitization rule construction model to obtain the data desensitization rules output by the data desensitization rule construction model; The data desensitization rules output by the data desensitization rule construction model are determined as the target data desensitization rules corresponding to the target data query instructions.
[0099] In one embodiment, the target data desensitization rule is embodied in the form of a prompt word text, and the data desensitization module 30 is further used to: Input the target data desensitization rules into the pre-trained data desensitization model, desensitize the target data to be desensitized through the data desensitization model, and obtain the desensitized data output by the data desensitization model; The desensitized data output by the data desensitization model is determined as the target desensitized data corresponding to the target data query instruction.
[0100] In one embodiment, the data desensitization module 30 is further used to: Generate target prompt word text according to target data desensitization rules; The target prompt word text is input into the pre-trained data desensitization model, and the target data to be desensitized is desensitized by the data desensitization model to obtain the desensitized data output by the data desensitization model as the target desensitized data corresponding to the target data query instruction.
[0101] The data desensitization device provided by the present application adopts the data desensitization method in the above embodiment to achieve the availability of data without visibility. Compared with the prior art, the beneficial effects of the data desensitization device provided by the present application are the same as the beneficial effects of the data desensitization method provided by the above embodiment, and other technical features in the data desensitization device are the same as the features disclosed by the data desensitization method in the above embodiment, which will not be described in detail here.
[0102] In addition, please refer to Figure 5 , Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the data desensitization method in the embodiment of the present application.
[0103] The present application also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the steps of the data desensitization method in the above-mentioned embodiment.
[0104] Reference below Figure 5 , which shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present application. The electronic devices in the embodiments of the present application may include but are not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs (Televisions), desktop computers, etc., or any electronic device that can implement the above functions. Figure 5 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0105] like Figure 5As shown, the electronic device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the electronic device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows an electronic device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0106] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0107] The electronic device provided by the present application adopts the data desensitization method in the above embodiment to achieve the availability of data without visibility. Compared with the prior art, the beneficial effects of the electronic device provided by the present application are the same as the beneficial effects of the data desensitization method provided by the above embodiment, and the other technical features in the electronic device are the same as the features disclosed by the data desensitization method in the above embodiment, which will not be described in detail here.
[0108] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0109] In addition, the present application also provides a computer-readable storage medium having computer-readable program instructions (ie, a computer program) stored thereon, and the computer-readable program instructions are used to execute the steps of the data desensitization method in the above-mentioned embodiment.
[0110] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0111] The computer-readable storage medium may be included in the electronic device, or may exist independently without being installed in the electronic device.
[0112] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by an electronic device, the electronic device: after receiving the target data query instruction, queries from a preset database to obtain the target data to be desensitized corresponding to the target data query instruction, wherein the database is a vector database, and the data in the vector database is stored in the form of vectors; obtains the target data desensitization rule corresponding to the target data query instruction; based on the target data desensitization rule and a pre-trained data desensitization model, desensitizes the target data to be desensitized to obtain the target desensitized data corresponding to the target data query instruction.
[0113] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0114] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0115] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0116] The computer-readable storage medium provided by the present application stores computer-readable program instructions (i.e., computer programs) for executing the steps of the above-mentioned data desensitization method, which can realize the availability and invisibility of data. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the data desensitization method provided by the above-mentioned embodiment, and will not be described in detail here.
[0117] In addition, an embodiment of the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the data desensitization method in the above embodiment.
[0118] The computer program product provided in this application can achieve the availability of data without visibility. Compared with the prior art, the beneficial effects of the computer program product provided in the embodiment of this application are the same as the beneficial effects of the data desensitization method provided in the above embodiment, which will not be repeated here.
[0119] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A data desensitization method, characterized in that: The data desensitization method includes: After receiving the target data query instruction, query from a preset database to obtain the target data to be desensitized corresponding to the target data query instruction, wherein the database is a vector database, and the data in the vector database is stored in the form of vectors; Obtaining the target data desensitization rule corresponding to the target data query instruction; Based on the target data desensitization rule and the pre-trained data desensitization model, the target data to be desensitized is desensitized to obtain the target desensitized data corresponding to the target data query instruction.
2. The data desensitization method according to claim 1, characterized in that: The step of obtaining the target data desensitization rule corresponding to the target data query instruction includes: Determine the target data desensitization rule query instruction corresponding to the target data query instruction; From a preset data desensitization rule library, a data desensitization rule corresponding to the target data desensitization rule query instruction is queried and obtained as the target data desensitization rule corresponding to the target data query instruction.
3. The data desensitization method according to claim 2, characterized in that: The step of determining the target data desensitization rule query instruction corresponding to the target data query instruction includes: Parsing the target data query instruction to obtain a target data query condition and a target data query purpose, wherein the target data query condition includes a target data type; The data desensitization rule query instruction commonly associated with the target data type and the target data query purpose is determined as the target data desensitization rule query instruction corresponding to the target data query instruction.
4. The data desensitization method according to claim 1, characterized in that: The step of obtaining the target data desensitization rule corresponding to the target data query instruction includes: Determine the target data application scenario and target data type corresponding to the target data query instruction; According to the target data application scenario and the target data type, a target data desensitization rule corresponding to the target data query instruction is constructed.
5. The data desensitization method according to claim 4, characterized in that: The step of constructing a target data desensitization rule corresponding to the target data query instruction according to the target data application scenario and the target data type includes: Input the target data application scenario and the target data type into a pre-trained data desensitization rule construction model to obtain the data desensitization rule output by the data desensitization rule construction model; The data desensitization rule output by the data desensitization rule construction model is determined as the target data desensitization rule corresponding to the target data query instruction.
6. The data desensitization method according to any one of claims 1 to 5, characterized in that: The target data desensitization rule is embodied in the form of a prompt word text. The step of desensitizing the target data to be desensitized based on the target data desensitization rule and a pre-trained data desensitization model to obtain the target desensitized data corresponding to the target data query instruction includes: Inputting the target data desensitization rule into a pre-trained data desensitization model, desensitizing the target data to be desensitized through the data desensitization model, and obtaining desensitized data output by the data desensitization model; The desensitized data output by the data desensitization model is determined as the target desensitized data corresponding to the target data query instruction.
7. The data desensitization method according to any one of claims 1 to 5, characterized in that: The step of desensitizing the target data to be desensitized based on the target data desensitization rule and the pre-trained data desensitization model to obtain the target desensitized data corresponding to the target data query instruction includes: Generate target prompt word text according to the target data desensitization rule; The target prompt word text is input into a pre-trained data desensitization model, and the target data to be desensitized is desensitized by the data desensitization model to obtain the desensitized data output by the data desensitization model as the target desensitized data corresponding to the target data query instruction.
8. A data desensitization device, characterized in that: The data desensitization device comprises: A data acquisition module is used to query and obtain the target data to be desensitized corresponding to the target data query instruction from a preset database after receiving the target data query instruction, wherein the database is a vector database, and the data in the vector database is stored in the form of vectors; A rule acquisition module, used to acquire the target data desensitization rule corresponding to the target data query instruction; The data desensitization module is used to desensitize the target data to be desensitized based on the target data desensitization rule and a pre-trained data desensitization model to obtain the target desensitized data corresponding to the target data query instruction.
9. An electronic device, characterized in that: The electronic device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the data desensitization method as claimed in any one of claims 1 to 7.
10. A computer program product, characterized in that The computer program product comprises a computer program, which, when executed by a processor, implements the steps of the data desensitization method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Data desensitization method and device, equipment and storage medium
CN118332587A
Medical text privacy desensitization method and system
CN118520495A
Data desensitization method and device, equipment and storage medium
CN118626452A
