Data desensitization method and device, storage medium and electronic equipment
By using feature extraction and matching with a classification and grading rule base, the system automatically determines the data category and importance level, and determines the de-identification rules based on the transmission destination. This solves the problems of low efficiency and low accuracy of manual de-identification, and achieves efficient and accurate data de-identification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- QINGDAO JUSHANGHUI NETWORK TECH CO LTD
- Filing Date
- 2025-12-30
- Publication Date
- 2026-05-08
AI Technical Summary
Existing technologies rely on manual data anonymization, which results in low efficiency and accuracy, especially when dealing with large amounts of data and hidden or indirect personal identifiers, which can easily lead to omissions or misjudgments.
By extracting features and matching with a classification and grading rule base, the system automatically determines the data category and importance level, determines the de-identification rules based on the transmission destination, and performs data de-identification, including similarity calculation and priority processing to ensure accuracy.
It improves the efficiency and accuracy of data anonymization, ensures data security and compliance in complex scenarios, and provides automated data processing solutions.
Smart Images

Figure CN121997369A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of smart home technology, and more specifically, to a data desensitization method and apparatus, storage medium and electronic device. Background Technology
[0002] In related technologies, manual data masking is a common data protection method widely used in the data processing workflows of enterprises and organizations. However, manual masking relies on manually identifying and processing sensitive information in the data. With the explosive growth of data volume, this inefficient manual operation is difficult to meet the real-time and large-scale requirements of modern business. Furthermore, the human eye's ability to identify sensitive information is limited, especially when the data contains hidden or indirect personal identifiers, making manual masking prone to omissions or misjudgments.
[0003] There is currently no effective solution to the problem that manual data anonymization in related technologies leads to low efficiency and low accuracy. Summary of the Invention
[0004] This application provides a data desensitization method, apparatus, storage medium, and electronic device to at least solve the problems of low efficiency and low accuracy in related technologies where data is desensitized manually.
[0005] According to one embodiment of this application, a data desensitization method is provided, comprising: upon receiving a transmission request for target data, extracting features from the target data to obtain data features of the target data; matching the data features with rule vectors in a classification and grading rule base, determining a first category and a first importance level of the target data based on the matched first rule vector; determining a first desensitization rule for the target data based on the first category, the first importance level, and a first transmission destination of the target data, and desensitizing the target data according to the first desensitization rule.
[0006] In an optional embodiment, matching the data features with rule vectors in a classification and grading rule base, and determining the first category and first importance level of the target data based on the matched first rule vector, includes: converting the data features into feature vectors; calculating the similarity between the feature vectors and multiple rule vectors to obtain multiple similarities, wherein the multiple similarities correspond one-to-one with the multiple rule vectors; determining whether a first similarity among the multiple similarities is greater than a first preset value, wherein the first similarity is the maximum value among the multiple similarities; if the first similarity is determined to be greater than the first preset value, determining the rule vector corresponding to the first similarity as the first rule vector; determining the second category of the first rule vector as the first category, and determining the second importance level of the first rule vector as the first importance level.
[0007] In an optional embodiment, before determining the rule vector corresponding to the first similarity as the first rule vector, the method further includes: when there are multiple first similarities, determining that there are multiple first rule vectors among the multiple rule vectors, and determining the priority of the multiple first rule vectors; determining the first priority with the highest priority among the multiple priorities, and determining the second rule vector corresponding to the first priority; determining the third category of the second rule vector as the first category, and determining the third importance level of the second rule vector as the first importance level.
[0008] In an optional embodiment, determining a first de-identification rule for the target data based on the first category, the first importance level, and the first transmission destination of the target data includes: determining a plurality of second de-identification rules in a de-identification rule base based on the first category, wherein the fourth category of the plurality of second de-identification rules is the same as the first category; determining a plurality of third de-identification rules among the plurality of second de-identification rules based on the first importance level, wherein the fourth importance level of the plurality of third de-identification rules is the same as the first importance level; and determining the first de-identification rule among the plurality of third de-identification rules based on the first transmission destination.
[0009] In an optional embodiment, determining the first desensitization rule from the plurality of third desensitization rules based on the first transmission destination includes: determining a fourth desensitization rule from the plurality of third desensitization rules based on the first transmission destination, wherein the second transmission destination of the fourth desensitization rule is the same as the first transmission destination; if the fourth desensitization rule is unique, determining the fourth desensitization rule as the first desensitization rule; if the fourth desensitization rule is not unique, determining the fifth desensitization rule with the highest priority among the plurality of fourth desensitization rules as the first desensitization rule.
[0010] In an optional embodiment, desensitizing the target data according to the first desensitization rule includes: parsing the first desensitization rule to determine multiple feature categories and multiple desensitization strategies in the first desensitization rule, wherein the multiple feature categories and the multiple desensitization strategies correspond one-to-one; for any first feature category among the multiple feature categories, determining a first feature among the multiple data features based on the first feature category, wherein the second feature category of the first feature is the same as the first feature category; and desensitizing the first feature according to the first desensitization strategy corresponding to the first feature category, wherein the multiple desensitization strategies include the first desensitization strategy.
[0011] In an optional embodiment, after desensitizing the target data according to the first desensitization rule, the method further includes: detecting the desensitized target data to determine whether there is a second feature that failed to desensitize in the desensitized target data, wherein the plurality of data features include the second feature; and, if it is determined that the second feature exists in the desensitized target data, sending a desensitization instruction to the target object, wherein the desensitization instruction is used to instruct the target object to perform desensitization processing on the second feature.
[0012] According to another aspect of the present invention, a data desensitization apparatus is also provided, comprising: a feature extraction module, configured to extract features from the target data upon receiving a transmission request for target data, thereby obtaining data features of the target data; a determination module, configured to match the data features with rule vectors in a classification and grading rule base, and determine a first category and a first importance level of the target data based on the matched first rule vector; and a desensitization module, configured to determine a first desensitization rule for the target data based on the first category, the first importance level, and a first transmission destination of the target data, and desensitize the target data according to the first desensitization rule.
[0013] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer-readable storage medium, and the computer program is configured to execute the above-mentioned data desensitization method when running.
[0014] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the data desensitization method through the computer program.
[0015] According to another aspect of the embodiments of this application, a computer program product is also provided, including a computer program that, when executed by a processor, implements the above-mentioned data desensitization method.
[0016] In this embodiment, upon receiving a transmission request for target data, feature extraction is performed on the target data to obtain its data features. These data features are then matched with rule vectors in a classification and grading rule base. Based on the matched first rule vector, a first category and a first importance level of the target data are determined. A first desensitization rule is then determined based on the first category, the first importance level, and the first transmission destination of the target data. The target data is then desensitized according to this first desensitization rule. This technical solution solves the problem in related technologies where manual data desensitization leads to low efficiency and inaccuracy. Attached Figure Description
[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a schematic diagram of the hardware environment for a data desensitization method according to an embodiment of this application;
[0020] Figure 2 This is a flowchart of a data desensitization method according to an embodiment of this application;
[0021] Figure 3 This is a first schematic diagram of a data desensitization method according to an optional embodiment of this application;
[0022] Figure 4 This is a second schematic diagram of a data desensitization method according to an optional embodiment of this application;
[0023] Figure 5 This is a third schematic diagram of a data desensitization method according to an optional embodiment of this application;
[0024] Figure 6 This is a fourth schematic diagram of a data desensitization method according to an optional embodiment of this application;
[0025] Figure 7 This is a structural block diagram of a data desensitization device according to an embodiment of this application. Detailed Implementation
[0026] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0027] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0028] According to one aspect of the embodiments of this application, a data anonymization method is provided. This data anonymization method is widely used in whole-house intelligent digital control application scenarios such as smart homes, smart home ecosystems, and intelligence house ecosystems. Optionally, in this embodiment, the above-mentioned data anonymization method can be applied to, for example... Figure 1 The hardware environment shown consists of smart device 102 and computer terminal 104. Figure 1 As shown, the smart device 102 is connected to the computer terminal 104 via a network and can be used to provide services (such as application services) to the smart device 102 or clients installed on the smart device 102. A database can be set up on or independently of the smart device 102 to provide data storage services for the smart device 102 and the computer terminal 104. Cloud computing and / or edge computing services can be configured on or independently of the smart device 102 to provide data processing services for the smart device 102 and the computer terminal 104.
[0029] The aforementioned networks may include, but are not limited to, at least one of the following: wired network, wireless network. The aforementioned wired network may include, but is not limited to, at least one of the following: wide area network, metropolitan area network, local area network. The aforementioned wireless network may include, but is not limited to, at least one of the following: Wi-Fi (Wireless Fidelity), Bluetooth. The smart device 102 and computer terminal 104 may not be limited to PCs, mobile phones, tablets, smart air conditioners, smart range hoods, smart refrigerators, smart ovens, smart stoves, smart washing machines, smart water heaters, smart washing equipment, smart dishwashers, smart projectors, smart TVs, smart clothes racks, smart curtains, smart audio-visual equipment, smart sockets, smart speakers, smart speakers, smart fresh air systems, smart kitchen and bathroom equipment, smart bathroom equipment, smart robot vacuum cleaners, smart window cleaning robots, smart mopping robots, smart air purifiers, smart steam ovens, smart microwave ovens, smart water heaters, smart air purifiers, smart water dispensers, system platforms, etc.
[0030] This embodiment provides a data desensitization method, applied to the aforementioned smart device. Figure 2 This is a flowchart of a data desensitization method according to an embodiment of this application, which includes the following steps:
[0031] Step S202: Upon receiving a transmission request for target data, feature extraction is performed on the target data to obtain the data features of the target data;
[0032] Step S204: Match the data features with the rule vectors in the classification and grading rule base, and determine the first category and first importance level of the target data based on the matched first rule vector;
[0033] Step S206: Determine the first desensitization rule for the target data based on the first category, the first importance level, and the first transmission destination of the target data, and desensitize the target data according to the first desensitization rule.
[0034] In this embodiment, upon receiving a transmission request for target data, feature extraction is performed on the target data to obtain its data features. These data features are then matched with rule vectors in a classification and grading rule base. Based on the matched first rule vector, a first category and a first importance level of the target data are determined. A first desensitization rule is then determined based on the first category, the first importance level, and the first transmission destination of the target data. The target data is then desensitized according to this first desensitization rule. This technical solution solves the problem in related technologies where manual data desensitization leads to low efficiency and inaccuracy.
[0035] In an optional embodiment, matching the data features with rule vectors in a classification and grading rule base, and determining the first category and first importance level of the target data based on the matched first rule vector, includes: converting the data features into feature vectors; calculating the similarity between the feature vectors and multiple rule vectors to obtain multiple similarities, wherein the multiple similarities correspond one-to-one with the multiple rule vectors; determining whether a first similarity among the multiple similarities is greater than a first preset value, wherein the first similarity is the maximum value among the multiple similarities; if the first similarity is determined to be greater than the first preset value, determining the rule vector corresponding to the first similarity as the first rule vector; determining the second category of the first rule vector as the first category, and determining the second importance level of the first rule vector as the first importance level.
[0036] like Figure 3 As shown, to achieve automatic data classification and grading, the data features are first converted into feature vectors, and the similarity between these feature vectors and all rule vectors in a preset rule vector library is calculated, resulting in a series of similarity values, each corresponding to a rule vector in the library. The highest similarity value is determined, i.e., the first similarity. If the first similarity exceeds a preset threshold (first preset value, e.g., 0.6), the rule vector that best matches the data features is considered to have been found, i.e., the first rule vector. Subsequently, the defined category (second category) and importance level (second importance level) are extracted from the first rule vector, and these are respectively determined as the data's classification (first category) and grading (first importance level). Further, the classification and grading results of the target data are manually verified for accuracy. If correct, the target data is stored in the database based on the classification and grading results.
[0037] In an optional embodiment, before determining the rule vector corresponding to the first similarity as the first rule vector, the method further includes: when there are multiple first similarities, determining that there are multiple first rule vectors among the multiple rule vectors, and determining the priority of the multiple first rule vectors; determining the first priority with the highest priority among the multiple priorities, and determining the second rule vector corresponding to the first priority; determining the third category of the second rule vector as the first category, and determining the third importance level of the second rule vector as the first importance level.
[0038] When the maximum value among multiple similarity scores is not unique, i.e., when multiple first similarity scores exist, the priority among the multiple first rule vectors corresponding to the multiple first similarity scores is further determined. By comparison, the second rule vector with the highest priority is identified. Subsequently, its category (third category) and importance level (third importance level) are extracted from this second rule vector, and this information is assigned as the classification (first category) and grade (first importance level) of the target data, respectively. This multi-matching and priority ranking mechanism ensures that the classification and grading strategy that best meets business requirements and regulatory standards can be selected from multiple similarity rules, thereby effectively ensuring data security and compliance even in complex scenarios.
[0039] In an optional embodiment, determining a first de-identification rule for the target data based on the first category, the first importance level, and the first transmission destination of the target data includes: determining a plurality of second de-identification rules in a de-identification rule base based on the first category, wherein the fourth category of the plurality of second de-identification rules is the same as the first category; determining a plurality of third de-identification rules among the plurality of second de-identification rules based on the first importance level, wherein the fourth importance level of the plurality of third de-identification rules is the same as the first importance level; and determining the first de-identification rule among the plurality of third de-identification rules based on the first transmission destination.
[0040] In the data anonymization process, the first step is to filter out multiple second anonymization rules applicable to the first category from the anonymization rule base, based on the established first category. These second anonymization rules share the common characteristic of being specifically designed to process data whose type matches the first category. Next, the filtering criteria are further refined, focusing on the first importance level. Multiple third anonymization rules are selected from the second rules. These third rules not only belong to the same category but also have the same defined importance level as the first, ensuring the accuracy and consistency of the data processing strategy. Finally, based on the destination of the target data, i.e., the first transmission destination, the most suitable first anonymization rule is determined from the third anonymization rules. This first anonymization rule fully considers the regulatory requirements and data security standards of the transmission destination, thus performing appropriate anonymization processing before data transmission to ensure data security and compliance.
[0041] In an optional embodiment, determining the first desensitization rule from the plurality of third desensitization rules based on the first transmission destination includes: determining a fourth desensitization rule from the plurality of third desensitization rules based on the first transmission destination, wherein the second transmission destination of the fourth desensitization rule is the same as the first transmission destination; if the fourth desensitization rule is unique, determining the fourth desensitization rule as the first desensitization rule; if the fourth desensitization rule is not unique, determining the fifth desensitization rule with the highest priority among the plurality of fourth desensitization rules as the first desensitization rule.
[0042] Based on the first data transmission destination, all fourth masking rules related to that destination are selected from multiple third masking rules. The transmission destination defined by the fourth masking rule matches the first transmission destination. If only one such fourth masking rule exists after selection, it is directly confirmed as the first masking rule, i.e., the rule ultimately determined for data masking. However, if multiple fourth masking rules exist, the fifth masking rule with the highest priority among them is selected and formally determined as the first masking rule for performing data masking. Optionally, as... Figure 4 and Figure 5 As shown, the country of the first transmission destination is determined, and a fourth de-identification rule is selected from multiple third de-identification rules based on the country code. The fourth de-identification rule is parsed to determine the de-identification strategy for different data characteristics within the fourth de-identification rule, and the target data is de-identified according to multiple de-identification strategies (e.g., rule parameters, regular expressions).
[0043] In an optional embodiment, desensitizing the target data according to the first desensitization rule includes: parsing the first desensitization rule to determine multiple feature categories and multiple desensitization strategies in the first desensitization rule, wherein the multiple feature categories and the multiple desensitization strategies correspond one-to-one; for any first feature category among the multiple feature categories, determining a first feature among the multiple data features based on the first feature category, wherein the second feature category of the first feature is the same as the first feature category; and desensitizing the first feature according to the first desensitization strategy corresponding to the first feature category, wherein the multiple desensitization strategies include the first desensitization strategy.
[0044] like Figure 6As shown, the process determines whether multiple data features in the target data need to be anonymized or encrypted. If multiple data features are not anonymized or encrypted, the target data is anonymized according to the first anonymization rule. During the data anonymization process, the selected first anonymization rule is deeply analyzed to extract multiple feature categories and corresponding anonymization strategies. A one-to-one correspondence exists between these feature categories and anonymization strategies, ensuring that each feature category has its own dedicated anonymization processing method. Subsequently, for each first feature category in the first anonymization rule, all matching first features are identified among the multiple data features of the target data. The feature categories of these matching first features must be consistent with the first feature category. Once the first feature is located, precise anonymization processing is performed on the first feature according to the first anonymization strategy.
[0045] In an optional embodiment, after desensitizing the target data according to the first desensitization rule, the method further includes: detecting the desensitized target data to determine whether there is a second feature that failed to desensitize in the desensitized target data, wherein the plurality of data features include the second feature; and, if it is determined that the second feature exists in the desensitized target data, sending a desensitization instruction to the target object, wherein the desensitization instruction is used to instruct the target object to perform desensitization processing on the second feature.
[0046] After data anonymization is completed, to verify the effectiveness of the process, the anonymized target data needs to be checked to confirm whether any unanonymized secondary features remain. If the check shows that unanonymized secondary features do exist in the anonymized target data, a detailed anonymization instruction is sent to the entity responsible for data maintenance. This instruction clearly indicates which part of the data (the secondary feature) needs to be anonymized again, ensuring the thorough implementation of data security measures. This detection and feedback mechanism constitutes a key part of the closed-loop data security management system, effectively strengthening the supervision of the implementation of anonymization strategies, preventing potential data leakage risks, and maintaining data integrity and user privacy.
[0047] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, operating terminal, or network device, etc.) to execute the methods of the various embodiments of this application.
[0048] Figure 7 This is a structural block diagram of a data desensitization device according to an embodiment of this application; as shown below. Figure 7 As shown, it includes:
[0049] The feature extraction module 72 is used to extract features from the target data upon receiving a transmission request for target data, thereby obtaining the data features of the target data;
[0050] The determination module 74 is used to match the data features with the rule vectors in the classification and grading rule base, and determine the first category and first importance level of the target data based on the matched first rule vector;
[0051] The desensitization module 76 is used to determine a first desensitization rule for the target data based on the first category, the first importance level, and the first transmission destination of the target data, and to desensitize the target data according to the first desensitization rule.
[0052] In this embodiment, upon receiving a transmission request for target data, feature extraction is performed on the target data to obtain its data features. These data features are then matched with rule vectors in a classification and grading rule base. Based on the matched first rule vector, a first category and a first importance level of the target data are determined. A first desensitization rule is then determined based on the first category, the first importance level, and the first transmission destination of the target data. The target data is then desensitized according to this first desensitization rule. This technical solution solves the problem in related technologies where manual data desensitization leads to low efficiency and inaccuracy.
[0053] In an optional embodiment, the determining module 74 is further configured to convert the data features into feature vectors; calculate the similarity between the feature vectors and a plurality of rule vectors to obtain a plurality of similarities, wherein the plurality of similarities correspond one-to-one with the plurality of rule vectors; determine whether a first similarity among the plurality of similarities is greater than a first preset value, wherein the first similarity is the maximum value among the plurality of similarities; if the first similarity is determined to be greater than the first preset value, determine the rule vector corresponding to the first similarity as the first rule vector; determine the second category of the first rule vector as the first category, and determine the second importance level of the first rule vector as the first importance level.
[0054] In an optional embodiment, the determining module 74 is further configured to: determine that there are multiple first rule vectors among the multiple rule vectors when there are multiple first similarities; determine the priority of the multiple first rule vectors; determine the first priority with the highest priority among the multiple priorities; and determine the second rule vector corresponding to the first priority; determine the third category of the second rule vector as the first category; and determine the third importance level of the second rule vector as the first importance level.
[0055] In an optional embodiment, the desensitization module 76 is further configured to determine a plurality of second desensitization rules in a desensitization rule base according to the first category, wherein the fourth category of the plurality of second desensitization rules is the same as the first category; determine a plurality of third desensitization rules among the plurality of second desensitization rules according to the first importance level, wherein the fourth importance level of the plurality of third desensitization rules is the same as the first importance level; and determine the first desensitization rule among the plurality of third desensitization rules according to the first transmission destination.
[0056] In an optional embodiment, the desensitization module 76 is further configured to determine a fourth desensitization rule among the plurality of third desensitization rules according to the first transmission destination, wherein the second transmission destination of the fourth desensitization rule is the same as the first transmission destination; if the fourth desensitization rule is unique, the fourth desensitization rule is determined as the first desensitization rule; if the fourth desensitization rule is not unique, the fifth desensitization rule with the highest priority among the plurality of fourth desensitization rules is determined as the first desensitization rule.
[0057] In an optional embodiment, the desensitization module 76 is further configured to parse the first desensitization rule to determine multiple feature categories and multiple desensitization strategies in the first desensitization rule, wherein the multiple feature categories and the multiple desensitization strategies correspond one-to-one; for any first feature category among the multiple feature categories, a first feature is determined from the multiple data features according to the first feature category, wherein the second feature category of the first feature is the same as the first feature category; the first feature is desensitized according to the first desensitization strategy corresponding to the first feature category, wherein the multiple desensitization strategies include the first desensitization strategy.
[0058] In an optional embodiment, the desensitization module 76 is further configured to detect the desensitized target data, determine whether there is a second feature that failed to desensitize in the desensitized target data, wherein the plurality of data features include the second feature; if it is determined that the second feature exists in the desensitized target data, a desensitization instruction is sent to the target object, wherein the desensitization instruction is used to instruct the target object to perform desensitization processing on the second feature.
[0059] Embodiments of this application also provide a storage medium including a stored program, wherein the program executes any of the methods described above when it is run.
[0060] Optionally, in this embodiment, the storage medium may be configured to store program code for performing the following steps:
[0061] S1, Upon receiving a transmission request for target data, feature extraction is performed on the target data to obtain the data features of the target data;
[0062] S2, match the data features with the rule vectors in the classification and grading rule base, and determine the first category and first importance level of the target data based on the matched first rule vector;
[0063] S3, determine the first desensitization rule for the target data based on the first category, the first importance level, and the first transmission destination of the target data, and desensitize the target data according to the first desensitization rule.
[0064] Embodiments of this application also provide an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0065] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0066] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:
[0067] S1, Upon receiving a transmission request for target data, feature extraction is performed on the target data to obtain the data features of the target data;
[0068] S2, match the data features with the rule vectors in the classification and grading rule base, and determine the first category and first importance level of the target data based on the matched first rule vector;
[0069] S3, determine the first desensitization rule for the target data based on the first category, the first importance level, and the first transmission destination of the target data, and desensitize the target data according to the first desensitization rule.
[0070] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0071] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.
[0072] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.
[0073] The embodiments described herein also provide a computer program that includes computer instructions stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps in any of the above method embodiments.
[0074] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.
[0075] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.
[0076] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for desensitizing data, characterized in that, include: Upon receiving a transmission request for target data, feature extraction is performed on the target data to obtain the data features of the target data; The data features are matched with the rule vectors in the classification and grading rule base, and the first category and first importance level of the target data are determined based on the first matched rule vector. A first desensitization rule is determined for the target data based on the first category, the first importance level, and the first transmission destination of the target data, and the target data is desensitized according to the first desensitization rule.
2. The data desensitization method according to claim 1, characterized in that, The data features are matched with rule vectors in the classification and grading rule base. Based on the matched first rule vector, the first category and first importance level of the target data are determined, including: Convert the data features into feature vectors; Calculate the similarity between the feature vector and the multiple rule vectors to obtain multiple similarity scores, wherein the multiple similarity scores correspond one-to-one with the multiple rule vectors; Determine whether a first similarity among the plurality of similarities is greater than a first preset value, wherein the first similarity is the maximum value among the plurality of similarities; If it is determined that the first similarity is greater than the first preset value, the rule vector corresponding to the first similarity is determined as the first rule vector; The second category of the first rule vector is determined as the first category, and the second importance level of the first rule vector is determined as the first importance level.
3. The data desensitization method according to claim 2, characterized in that, Before determining the rule vector corresponding to the first similarity as the first rule vector, the method further includes: When there are multiple first similarities, it is determined that there are multiple first rule vectors among the multiple rule vectors, and the priority of the multiple first rule vectors is determined; Among the multiple priorities, determine the highest priority first priority, and determine the second rule vector corresponding to the first priority; The third category of the second rule vector is determined as the first category, and the third importance level of the second rule vector is determined as the first importance level.
4. The data desensitization method according to claim 1, characterized in that, Determining the first de-identification rule for the target data based on the first category, the first importance level, and the first transmission destination of the target data includes: Based on the first category, a plurality of second desensitization rules are determined in the desensitization rule base, wherein the fourth category of the plurality of second desensitization rules is the same as the first category; Based on the first importance level, a plurality of third desensitization rules are determined from the plurality of second desensitization rules, wherein the fourth importance level of the plurality of third desensitization rules is the same as the first importance level; The first desensitization rule is determined from the plurality of third desensitization rules based on the first transmission destination.
5. The data desensitization method according to claim 4, characterized in that, The first desensitization rule is determined from the plurality of third desensitization rules based on the first transmission destination, including: A fourth desensitization rule is determined from the plurality of third desensitization rules based on the first transmission destination, wherein the second transmission destination of the fourth desensitization rule is the same as the first transmission destination; If the fourth desensitization rule is unique, then the fourth desensitization rule shall be determined as the first desensitization rule; If the fourth desensitization rule is not unique, the fifth desensitization rule with the highest priority among the multiple fourth desensitization rules shall be determined as the first desensitization rule.
6. The data desensitization method according to claim 1, characterized in that, De-identifying the target data according to the first de-identification rule includes: The first desensitization rule is parsed to determine multiple feature categories and multiple desensitization strategies in the first desensitization rule, wherein the multiple feature categories and the multiple desensitization strategies correspond one-to-one; For any first feature category among the plurality of feature categories, a first feature is determined among the plurality of data features based on the first feature category, wherein the second feature category of the first feature is the same as the first feature category; The first feature is desensitized according to the first desensitization strategy corresponding to the first feature category, wherein the plurality of desensitization strategies include the first desensitization strategy.
7. The data desensitization method according to claim 1, characterized in that, After desensitizing the target data according to the first desensitization rule, the method further includes: The desensitized target data is detected to determine whether there is a second feature indicating desensitization failure in the desensitized target data, wherein the multiple data features include the second feature; If it is determined that the second feature exists in the de-identified target data, a de-identification instruction is sent to the target object, wherein the de-identification instruction is used to instruct the target object to perform de-identification processing on the second feature.
8. A data desensitization device, characterized in that, include: The feature extraction module is used to extract features from the target data upon receiving a transmission request for target data, thereby obtaining the data features of the target data; The determination module is used to match the data features with the rule vectors in the classification and grading rule base, and determine the first category and first importance level of the target data based on the matched first rule vector; The desensitization module is used to determine a first desensitization rule for the target data based on the first category, the first importance level, and the first transmission destination of the target data, and to desensitize the target data according to the first desensitization rule.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program, when executed, performs the method described in any one of claims 1 to 7.
10. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method described in any one of claims 1 to 7 through the computer program.