Section-based power data desensitization method and device, equipment and storage medium

By cutting -based power data desensitization methods, the automatic desensitization process of preset cutting and desensitization rules library is used to solve the problem of low -efficiency efficiency of traditional methods and realize efficient, flexible, and maintainable power data desensitization.

CN119337421APending Publication Date: 2025-01-21SHENZHEN COMTOP INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411443285.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-16
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

Traditional power data desensitization methods are inefficient and error-prone, requiring manual intervention at all stages of data generation or use.

Method used

Provide a method of desensitization of power data based on cutting surface. Through the preset power data desensitization section, the cut -off rules intercepting the original power data, identifying sensitive fields, and screening from the preset desensitization rules library The desensitization rules are processed with sensitive fields.

Benefits of technology

This method significantly improves the efficiency of power data desensitization, reduces the time for developers to manually add desensitization logic at various stages of data processing, realizes the reuse and maintainability of desensitization rules, and adapts to different business scenarios and desensitization needs. .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119337421A_ABST
    Figure CN119337421A_ABST
Patent Text Reader

Abstract

The invention relates to a section-based power data desensitization method and device, equipment and a storage medium. The method comprises the steps of intercepting to-be-desensitized target power data in original power data based on a preset tangent point interception rule in a power data desensitization section; identifying sensitive fields in the target power data; screening out a desensitization rule matched with the sensitive field from a preset desensitization rule base; and based on the desensitization rule, performing desensitization processing on the sensitive field to obtain desensitized power data. By adopting the method, the desensitization efficiency of the power data can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information security technology, and in particular to a power data decryption method, device, equipment and storage medium based on a slice. Background Art

[0002] With the rapid development of information technology, data security issues have become increasingly prominent. In the power system, the operation data of the power grid usually contains a large amount of key information related to the operation of the power system. In some application scenarios involving power grid operation data, for example, when developers build or update business functions related to the power grid, they need to use real data for testing to ensure the accuracy and reliability of the functions. However, during the transmission, storage and use of data, it faces security risks such as leakage and tampering. In order to ensure the security of data, sensitive data needs to be desensitized.

[0003] Traditional desensitization methods often require manual intervention at various stages of data generation or use, which is inefficient and error-prone. Summary of the invention

[0004] Based on this, it is necessary to provide a facet-based power data desensitization method, device, computer equipment, computer-readable storage medium and computer program product that can improve the efficiency of power data desensitization in response to the above technical problems.

[0005] In a first aspect, the present application provides a power data desensitization method based on a slice, comprising:

[0006] Based on the preset point-cut interception rules in the power data desensitization section, the target power data to be desensitized in the original power data is intercepted;

[0007] Identify sensitive fields in target power data;

[0008] Filter out the desensitization rules that match the sensitive fields from the preset desensitization rule library;

[0009] Based on the desensitization rules, the sensitive fields are desensitized to obtain the desensitized power data.

[0010] In one embodiment, identifying sensitive fields in the target power data includes:

[0011] Filter out target fields from target power data based on preset desensitization annotations and reflection mechanisms;

[0012] Identify the target field as a sensitive field.

[0013] In one embodiment, filtering out the desensitization rules matching the sensitive fields from the preset desensitization rule library includes:

[0014] Based on the preset sensitive annotations, determine the sensitive rule category of the sensitive field;

[0015] Filter out the desensitization rules corresponding to the sensitive rule categories from the preset desensitization rule library;

[0016] The desensitization rules corresponding to the filtered sensitive rule categories are determined as the desensitization rules corresponding to the sensitive fields.

[0017] In one of the embodiments, based on the desensitization rules, desensitizing the sensitive fields includes: performing at least one of field replacement, field masking, random processing and encryption processing on the sensitive fields.

[0018] In one of the embodiments, after obtaining the desensitized power data, the aspect-based power data desensitization method further includes:

[0019] Evaluate the desensitization degree of the desensitized power data and obtain the desensitization effect evaluation result;

[0020] When the desensitization effect evaluation result does not meet the preset verification threshold, optimize the desensitization rules.

[0021] In one embodiment, the desensitization degree of the desensitized power data is evaluated, and the desensitization effect evaluation result is obtained, including:

[0022] Perform a reverse operation on the desensitized data to obtain restored data, and determine the degree of data restoration based on the restored data and the desensitized data;

[0023] Compare the power data to be desensitized with the power data after desensitization to determine the data difference;

[0024] Based on the data restoration degree and data difference, the desensitization effect evaluation result is obtained.

[0025] In a second aspect, the present application also provides a power data desensitization device based on a slice, including:

[0026] The power data acquisition module is used to intercept the target power data to be desensitized in the original power data based on the cut-point interception rules in the preset power data desensitization section;

[0027] A sensitive field identification module, used to identify sensitive fields in target power data;

[0028] A desensitization rule determination module is used to filter out desensitization rules that match sensitive fields from a preset desensitization rule library;

[0029] The desensitization processing module is used to perform desensitization processing on sensitive fields based on desensitization rules to obtain desensitized power data.

[0030] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements the steps in any one of the above-mentioned aspects-based power data desensitization method embodiments.

[0031] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps in any one of the above-mentioned aspects-based power data desensitization method embodiments are implemented.

[0032] In a fifth aspect, the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps in any one of the above-mentioned aspects-based power data desensitization method embodiments.

[0033] The above-mentioned power data desensitization method, device, computer equipment, computer-readable storage medium and computer program product based on the aspect, on the one hand, intercepts the target power data to be desensitized from the original power data through the point-cut interception rules in the preset power data desensitization aspect, desensitizes the sensitive fields in the target power data according to the preset desensitization rule library, and integrates the desensitization of the power data, thereby greatly reducing the time for developers to manually add desensitization rules at various stages of data processing, realizing the reuse of the written desensitization rules, and improving the efficiency of power data desensitization; on the other hand, by pre-setting the power data desensitization aspect and the desensitization rule library, the desensitization of the power data is separated from the business logic, and the desensitization behavior can be dynamically added to the methods or operations in the system without intruding the business code, thereby improving the maintainability of the desensitization rules. Secondly, in the aspect, the point-cut interception rules can be flexibly configured, and the flexible configuration of the desensitization rules can be realized through the preset desensitization rule library, thereby meeting different business scenarios and desensitization requirements, and improving the flexibility and adaptability of power data desensitization. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions 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 related drawings can be obtained based on these drawings without paying creative work.

[0035] Figure 1 The following is an application environment diagram of a power data desensitization method based on a section in an embodiment;

[0036] Figure 2 It is a flowchart of a power data desensitization method based on a section in one embodiment;

[0037] Figure 3 is a flow chart of a power data desensitization method based on a slice in another embodiment;

[0038] Figure 4 is a flow chart of a power data desensitization method based on a section in another embodiment;

[0039] Figure 5 It is a flowchart of a power data desensitization method based on a section in another embodiment;

[0040] Figure 6 It is a flowchart of a power data desensitization method based on a section in a detailed embodiment;

[0041] Figure 7 is a structural block diagram of a power data desensitization device based on a slice in one embodiment;

[0042] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0044] The power data desensitization method based on the aspect provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, the terminal 102 communicates with the server 104 through a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers.

[0045] Specifically, the terminal 102 may generate the original power data, and the original power data is transmitted to the server 104 through the network. Secondly, the server intercepts the target power data to be desensitized in the original power data based on the point interception rules in the preset power data desensitization aspect, and then identifies the sensitive fields in the target power data; screens out desensitization rules that match the sensitive fields from the preset desensitization rule library, and finally, based on the desensitization rules, desensitizes the sensitive fields to obtain the desensitized power data.

[0046] The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. Head-mounted devices may be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. The server 104 may be an independent physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides cloud computing services.

[0047] In an exemplary embodiment, Figure 2 As shown in the figure, a power data desensitization method based on slices is provided, which is applied to Figure 1 The server 104 in the example is used for explanation, including the following S100 to S400. Among them:

[0048] S100, intercepting target power data to be desensitized in the original power data based on the cut-point interception rule in the preset power data desensitization facet.

[0049] Aspects are modular units that cross-cut concerns in AOP (Aspect Oriented Programming). They are used to encapsulate common methods of multiple classes. When multiple classes need this operation, the code is dynamically cut into the specified method and location of the class. Concerns refer to functions that affect multiple modules, such as power data desensitization in this embodiment.

[0050] The pointcut interception rule is a matching rule for interfaces that require data desensitization, and is used to intercept specified methods. You can define a pointcut expression based on the interface to be intercepted to intercept method calls under the specified interface, or define a pointcut expression based on the path to intercept method calls of all interfaces under the specified package and its subpackages.

[0051] Power data can refer to information related to electricity, such as power policies and regulations, power public service information, power grid equipment operation data, user power consumption data and other power consumption statistics. The target power data to be desensitized is power data involving sensitive data, which may include power grid equipment operation data, user power consumption data, etc. Among them, power grid operation data may include the specific location and detailed operation parameters of key infrastructure equipment or facilities.

[0052] In practical applications, one or more interfaces may be predefined, and multiple implementation methods involving sensitive data may be defined under the interfaces. These interfaces may be used as cut points, and desensitizing annotations may be set. These interfaces may be marked with desensitizing annotations, and cut point interception rules may be defined through cut point expressions to intercept all methods under the specified interfaces marked with desensitizing annotations. A desensitizing aspect of power data may be created based on the cut point interception rules. When a method is called through a specified interface, the calling method is automatically intercepted, the original method is executed, and the target power data to be desensitized is obtained. Exemplarily, the terminal may retrieve the operating data and device parameters of a certain power grid device from the database. Among them, the operating data of the power grid device involves sensitive data, and its calling method triggers the cut point interception rules, and the target power data to be desensitized is obtained by interception. It can be understood that the specified interface is intercepted by using annotations in combination with the cut point interception rules. When data desensitization is not required for a specified interface, the desensitization requirements can be flexibly adapted by removing the annotations without changing the logic of the interceptor.

[0053] S200, identifying sensitive fields in target power data.

[0054] Sensitive fields in power data may include fields in power grid operation data and user power consumption data, etc. For example, sensitive fields in power grid operation data include the geographical location, capacity, hourly load data and planned maintenance date of substations, etc.; user personal information in user power consumption data includes user name, address, telephone number, power supply station, etc., total power consumption during the settlement period, total amount, meter reading date, settlement date, basic electricity fee and detailed power consumption information, etc.

[0055] In practical applications, sensitive fields in target power data can be identified through preset rules, such as keywords.

[0056] S300, filter out desensitization rules that match the sensitive field from a preset desensitization rule library.

[0057] Among them, the preset sensitive rule library may include a mapping relationship between different sensitive fields and corresponding desensitization rules.

[0058] In actual applications, specific desensitization rules can be configured for each sensitive field in advance according to the sensitivity and desensitization requirements of different sensitive fields. Among them, the sensitivity of sensitive fields can be divided into different sensitivity levels in advance according to the nature of the data, potential security risks, legal and regulatory requirements, and business needs, and a corresponding sensitivity level is assigned to each sensitive field. Exemplarily, personal identity information, electricity bill information, geographic location information of key power facilities, and detailed user electricity usage data are highly sensitive; monthly or quarterly electricity consumption, electricity maintenance, and service request records are medium sensitive information; regional total electricity consumption, average electricity consumption, technical specifications of power equipment, etc. are low sensitive. Among them, the nature of the data may include personal identity information, financial information, electricity usage data, and geographic location information.

[0059] After pre-configuring the corresponding desensitization rules for each sensitive field, create a configuration class to associate the sensitive field with the desensitization rule. Thus, after identifying the sensitive fields in the target power data, the matching desensitization rules are screened out through the mapping relationship between different sensitive fields and corresponding desensitization rules in the preset desensitization rule library.

[0060] S400, based on the desensitization rule, desensitize the sensitive field to obtain desensitized power data.

[0061] The desensitization rules are specific desensitization logic for sensitive fields. The desensitization rules include but are not limited to replacing sensitive fields with preset characters, replacing part of the sensitive fields with preset characters, and encoding sensitive fields.

[0062] In practical applications, the sensitive fields are desensitized according to the desensitization rules corresponding to the sensitive fields to obtain the desensitized power data.

[0063] In other embodiments, after obtaining the desensitized power data, the desensitized data is verified for data integrity and correctness, so that the desensitized power data takes into account both the protection of sensitive information and the satisfaction of business needs. After the verification is passed, the desensitized power data is returned at the interception point.

[0064] In other embodiments, after desensitizing the sensitive fields to obtain the desensitized power data, the desensitized power data is further encrypted to ensure the security of transmission or storage of the desensitized power data. Specifically, the desensitized power data can be encrypted using encryption methods such as symmetric encryption algorithms, asymmetric encryption algorithms, or digital signatures.

[0065] In the above-mentioned aspect-based power data desensitization method, on the one hand, the target power data to be desensitized is intercepted from the original power data through the point-cut interception rules in the preset power data desensitization aspect, and the sensitive fields in the target power data are desensitized according to the preset desensitization rule library, and the desensitization of the power data is integrated, thereby greatly reducing the time for developers to manually add desensitization rules at various stages of data processing, realizing the reuse of the written desensitization rules, and improving the efficiency of power data desensitization; on the other hand, by pre-setting the power data desensitization aspect and the desensitization rule library, the desensitization of power data is separated from the business logic, and desensitization behavior can be dynamically added to the methods or operations in the system without intruding the business code, thereby improving the maintainability of the desensitization rules. Secondly, in the aspect, the point-cut interception rules can be flexibly configured, and the flexible configuration of the desensitization rules can be realized through the preset desensitization rule library, so as to meet different business scenarios and desensitization requirements, and improve the flexibility and adaptability of power data desensitization.

[0066] In order to improve the efficiency of identifying sensitive fields in target power data, in an exemplary embodiment, Figure 3 As shown, S200 includes S220 to S240. Among them:

[0067] S220, filtering out target fields from target power data according to a preset desensitization rule library and reflection mechanism.

[0068] Among them, the reflection mechanism: in the running state of the Java program, for any entity class, all the properties and methods of this class can be known, and for any object, any of its methods and properties can be called. This function of dynamically obtaining information and dynamically calling object methods is called the reflection mechanism of the Java language. The target field is the field that needs to be desensitized.

[0069] In actual applications, after intercepting the method under the specified interface marked with the desensitizing annotation through the pointcut interception rule, the original method is called to obtain the returned object, and all fields of the returned object are obtained through the reflection mechanism. The matching target fields are filtered out through the desensitized fields in the preset desensitizing configuration.

[0070] S240: Determine the target field as a sensitive field.

[0071] Identify the target fields that require data desensitization as sensitive fields.

[0072] In this embodiment, based on the reflection mechanism and the preset desensitization rule library, sensitive fields that need to be desensitized in the target power data are quickly locked, thereby improving the efficiency of identifying sensitive fields.

[0073] In order to adopt appropriate desensitization rules for different sensitive fields, in an exemplary embodiment, Figure 4 As shown, S300 includes S320 to S340. Among them:

[0074] S320: Determine the sensitivity rule category of the sensitive field based on a preset desensitization rule library.

[0075] Among them, the sensitive rule category is used to distinguish the desensitization rules corresponding to different sensitive fields.

[0076] In practical applications, the sensitive rule category of each sensitive field in the target power data is matched through the sensitive rule category of the desensitized field in the desensitization rule library.

[0077] S340, filter out desensitization rules corresponding to the sensitive rule category from a preset desensitization rule library.

[0078] Considering that in actual desensitization scenarios, the desensitization rules of some desensitized fields may be the same, therefore, the corresponding desensitization rule categories can be specified in advance for the fields that need to be desensitized, and the desensitization rules corresponding to the sensitive rule categories can be configured. Create a configuration file, associate the sensitive rule categories of sensitive fields with the desensitization rules, and obtain a desensitization rule library. It can be understood that when desensitizing power data based on the desensitization rule library, when it is necessary to modify the desensitization rules or add new desensitization requirements, there is no need to modify the business code, only to make adjustments in the configuration file to adapt to different application scenarios and data types, and meet diverse desensitization requirements.

[0079] In actual applications, according to the mapping relationship between the sensitive rule categories of different sensitive fields and the corresponding desensitizing rules in the preset desensitizing rule library, the desensitizing rules corresponding to the sensitive rule categories are screened out.

[0080] S360: Determine the desensitization rule corresponding to the screened sensitive rule category as the desensitization rule corresponding to the sensitive field.

[0081] In actual applications, after desensitizing rules corresponding to sensitive rule categories are screened out from a preset desensitizing rule library, the screened out desensitizing rules are determined as desensitizing rules corresponding to sensitive fields.

[0082] In this embodiment, based on the preset sensitive annotations and sensitive rule library, the desensitization rules corresponding to the sensitive fields are determined, and the corresponding sensitive rules can be matched to the sensitive fields with different desensitization requirements, which is beneficial to improving the accuracy of desensitization. Furthermore, according to different desensitization requirements, the sensitive rule library can be flexibly configured, and the sensitive fields that need to be desensitized can be added, deleted or modified, which is beneficial to improving the flexibility and diversity of power data desensitization.

[0083] In an exemplary embodiment, S400 includes performing at least one of field replacement, field masking, random processing, and encryption processing on sensitive fields. Specifically:

[0084] Among them, field replacement: replace sensitive fields with set fictitious values ​​or fixed characters (such as "*"). Exemplarily, the substation ID: "S001" is replaced with "N123". Field masking: determine the target masked field in the sensitive field according to the characters that need to be retained, and replace the target masked field with a preset symbol. Exemplarily, the telephone number is masked as "138****1234", and the substation address: "XX Road, Haidian District, Beijing" is masked as "A certain road in a certain district in Beijing". Shuffle processing: disrupt the order of characters in the sensitive field. Encryption processing: use a data algorithm to encode sensitive data so that unauthorized personnel cannot interpret the data content. The encryption algorithm may include AES (Advanced Encryption Standard, symmetric encryption) encryption algorithm, RSA asymmetric encryption, etc.

[0085] In other embodiments, before desensitizing the sensitive fields, the target power data is cleaned and the data integrity and accuracy are verified to improve the accuracy of data desensitization.

[0086] In other embodiments, desensitizing sensitive fields based on sensitivity rules may also include: scrambling the sensitive fields to hide the real data by adding small, random changes to the original data while keeping the statistical characteristics of the data unchanged. For example, the data in the load curve of the substation is changed.

[0087] In this embodiment, a variety of desensitization rules are set to adapt to data desensitization of sensitive fields with different desensitization requirements, thereby improving the accuracy of power data desensitization.

[0088] After obtaining the desensitized power data, in an exemplary embodiment, after S400, as Figure 5 As shown, the power data desensitization method based on the slice also includes S500 to S600. Among them:

[0089] S500, evaluating the desensitization degree of the desensitized power data to obtain a desensitization effect evaluation result.

[0090] Among them, the desensitization effect evaluation result may include the desensitization effect score of the desensitized power data.

[0091] In practical applications, after obtaining the desensitized power data, the desensitization effect can be quantitatively evaluated according to the numerical value of the preset desensitization degree evaluation index, and the desensitization effect of the desensitized power data can be qualitatively evaluated by manually analyzing whether the desensitization effect is true and whether the sensitive information retained is small enough. The desensitization effect evaluation results of power data are measured in the form of scores or percentages. The desensitization degree evaluation index can be data integrity: whether the desensitized data maintains the basic structure and format of the original data, business applicability: whether the desensitized data is still applicable to specific business scenarios and analysis requirements, irreversibility: whether the desensitized data cannot be restored to the original data through simple reverse operations, information loss: the amount of information lost during the desensitization process, to ensure that the desensitized data still has a certain degree of usability and practicality, and re-identification risk: whether the desensitized data is easy to be re-identified or associated with a specific individual, which can be evaluated through technologies such as k-anonymity and l-diversity.

[0092] S600: When the desensitization effect evaluation result does not meet the preset verification threshold, optimize the desensitization rules.

[0093] In practical applications, the verification threshold of the desensitization effect is preset according to the actual desensitization requirements, and the desensitization effect evaluation result is compared with the verification threshold. If the desensitization effect evaluation result does not meet the preset verification threshold, the desensitization rules are optimized in the desensitization interface and configuration file. For example, an encryption algorithm with better encryption performance is used, and fewer fields are reserved for masking processing.

[0094] In this embodiment, after obtaining the desensitized power data, the desensitization effect of the desensitized power data is evaluated, so as to optimize the desensitization rules when the desensitization effect does not meet expectations, which is conducive to improving the security of the interaction of the power data.

[0095] The desensitization evaluation index is set to evaluate the desensitization effect. In an exemplary embodiment, S500 includes S520 to S560. Among them:

[0096] S520, performing a reverse operation on the desensitized data to obtain restored data, and determining a degree of data restoration based on the restored data and the desensitized data.

[0097] Data restoration degree is used to evaluate whether the desensitized data can be restored to the original data through reverse operations. If it can be restored, it may lead to the leakage of sensitive data. Therefore, the lower the data restoration degree, the better.

[0098] In practical applications, the reverse operation can be determined based on the desensitization method of the desensitized data, and can include restoring the desensitized data through a mapping relationship between a key or replacement character and the original data. For example, after encrypting the data using a symmetric encryption algorithm (such as AES) or an asymmetric encryption algorithm (such as RSA), the data is decrypted using a key to obtain the restored data, and the data before and after restoration are compared to determine the degree of data restoration.

[0099] S540, comparing the power data to be desensitized with the desensitized power data to determine the data difference.

[0100] The data difference refers to the difference between the data before and after desensitization. The greater the difference, the better the effect of the desensitization rule.

[0101] In practical applications, the data difference can be determined by the data variation coefficient and data mean square error of the power data to be desensitized and the power data after desensitization.

[0102] S560: Based on the data restoration degree and the data difference degree, a desensitization effect evaluation result is obtained.

[0103] In practical applications, weights can be set for data restoration and data difference respectively, and the desensitization effect evaluation result can be obtained based on the data restoration and data difference and the corresponding weights. For example, if the data restoration is 40 points, the data difference is 60 points, and the weights are 0.2 and 0.8 respectively, the desensitization effect evaluation result is 56 points.

[0104] In this embodiment, the desensitization effect of the desensitized field is evaluated through the data restoration degree and data difference degree indicators, which is conducive to improving the setting of the desensitization rules based on the evaluation effect, thereby improving the quality of power data desensitization.

[0105] In order to make a clearer description of the power data desensitization method based on the slice provided by the present application, the following is a specific embodiment and the attached Figure 6 To illustrate, this specific embodiment includes the following steps:

[0106] S1, intercepting the target power data to be desensitized in the original power data based on the cut-point interception rule in the preset power data desensitization facet.

[0107] S2, according to the preset desensitization rule library and reflection mechanism, the target field is screened out from the target power data and the target field is determined as a sensitive field.

[0108] S3, based on the preset desensitizing rule library, determine the sensitive rule category of the sensitive field, filter out the desensitizing rules corresponding to the sensitive rule category from the preset desensitizing rule library, and determine the desensitizing rules corresponding to the filtered sensitive rule category as the desensitizing rules corresponding to the sensitive field.

[0109] S4, based on the desensitization rules, perform at least one of field replacement, field masking, random processing and encryption processing on the sensitive fields to obtain desensitized power data.

[0110] S5, perform reverse operation on the desensitized data to obtain restored data, determine the data restoration degree based on the restored data and the desensitized data, compare the power data to be desensitized with the desensitized power data to determine the data difference, and obtain the desensitization effect evaluation result based on the data restoration degree and the data difference.

[0111] S6: When the desensitization effect evaluation result does not meet the preset verification threshold, optimize the desensitization rules.

[0112] The aspect-based power data desensitization method provided in this application has the following advantages:

[0113] 1. Significantly improve desensitization efficiency:

[0114] Through the automated desensitization process, the time for developers to manually add desensitization logic at various stages of power data processing is greatly reduced. The automated processing method makes data processing more efficient, especially when processing large amounts of power data. Through integrated operations, the desensitization logic is integrated into the data processing process, which reduces the tediousness of manual operations, enables data to pass desensitization processing faster, and improves the overall data processing efficiency. 2. Reduce the possibility of errors in power data desensitization. By managing the desensitization logic in a rule-based manner, the desensitization process is more standardized and normalized. Developers only need to configure the desensitization logic according to the rules, avoiding the problem of forgetting to desensitize or incorrectly applying the desensitization rules due to human negligence. 3. Improve maintainability. By decoupling the desensitization logic from the business logic, the code structure is clearer and easier to maintain. When it is necessary to modify the desensitization rules or add new desensitization requirements, you only need to adjust the rules in the configuration file without modifying the business code, reducing the risk of errors and maintenance costs. Using modular design ideas, the desensitization logic is encapsulated into independent modules, which improves the reusability and maintainability of the code. 4. Enhanced flexibility supports dynamic configuration of desensitization rules, and desensitization rules can be flexibly adjusted according to actual needs to adapt to different application scenarios and data types to meet diverse desensitization needs. Sufficient expansion space is reserved for future needs, so that when the desensitization rules or application scenarios change, the functions of the present invention can be easily expanded without large-scale modifications to the existing code. 5. Reduce repetitive work Developers can easily reuse the desensitization logic that has been written to implement the same desensitization function in multiple places or projects without rewriting the code. This not only reduces the workload, but also ensures the consistency and accuracy of the code. A shared desensitization rule library can be established, from which different teams or projects can choose desensitization rules that suit them, further reducing repetitive work and improving work efficiency.

[0115] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0116] In an exemplary embodiment, Figure 7As shown, a power data desensitization device 700 based on a section is provided, comprising: a power data acquisition module 710, a sensitive field identification module 720, a desensitization rule determination module 730 and a desensitization processing module 740, wherein:

[0117] The power data acquisition module 710 is used to intercept the target power data to be desensitized in the original power data based on the cut-point interception rule in the preset power data desensitization section;

[0118] A sensitive field identification module 720, used to identify sensitive fields in target power data;

[0119] The desensitization rule determination module 730 is used to filter out desensitization rules that match sensitive fields from a preset desensitization rule library;

[0120] The desensitization processing module 740 is used to perform desensitization processing on sensitive fields based on desensitization rules to obtain desensitized power data.

[0121] In an exemplary embodiment, the sensitive field identification module 720 is further used to filter out the target field from the target power data according to a preset desensitization rule library and reflection mechanism; and determine the target field as a sensitive field.

[0122] In an exemplary embodiment, the desensitization rule determination module 730 is also used to determine the sensitive rule category of the sensitive field based on a preset desensitization rule library; filter out the desensitization rules corresponding to the sensitive rule category from the preset desensitization rule library; and determine the desensitization rules corresponding to the filtered sensitive rule category as the desensitization rules corresponding to the sensitive field.

[0123] In an exemplary embodiment, the desensitization processing module 740 is also used to perform at least one of field replacement, field masking, shuffling and encryption processing on sensitive fields.

[0124] In an exemplary embodiment, the aspect-based power data desensitization device 600 also includes a desensitization effect evaluation module 750, which is used to evaluate the desensitization degree of the desensitized power data and obtain a desensitization effect evaluation result; when the desensitization effect evaluation result does not meet the preset verification threshold, the desensitization rules are optimized.

[0125] In an exemplary embodiment, the desensitization effect evaluation module 750 is also used to perform reverse operations on the desensitized data to obtain restored data, and determine the data restoration degree based on the restored data and the desensitized data; compare the power data to be desensitized and the desensitized power data to determine the data difference; and obtain the desensitization effect evaluation result based on the data restoration degree and the data difference.

[0126] Each module in the above-mentioned aspect-based power data desensitization device 600 can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0127] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 8 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the target power data to be desensitized and the desensitized power data. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a power data desensitization method based on a section is implemented.

[0128] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0129] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the steps in any one of the above-mentioned aspects-based power data desensitization method embodiments are implemented.

[0130] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in any one of the above-mentioned aspects-based power data desensitization method embodiments are implemented.

[0131] In one embodiment, a computer program product is provided, including a computer program, which, when executed by a processor, implements the steps in any one of the above-mentioned aspects-based power data desensitization method embodiments.

[0132] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0133] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0134] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0135] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A power data desensitization method based on a section, characterized in that: The method comprises: Based on the preset point-cut interception rules in the power data desensitization section, the target power data to be desensitized in the original power data is intercepted; Identifying sensitive fields in the target power data; Filtering out a desensitization rule that matches the sensitive field from a preset desensitization rule library; Based on the desensitization rule, the sensitive field is desensitized to obtain desensitized power data.

2. The method according to claim 1, characterized in that The identifying of sensitive fields in the target power data includes: Filtering target fields from the target power data according to a preset desensitization rule library and reflection mechanism; The target field is determined as a sensitive field.

3. The method according to claim 1, characterized in that The step of selecting a desensitization rule that matches the sensitive field from a preset desensitization rule library includes: Determine the sensitive rule category of the sensitive field based on a preset desensitization rule library; Filtering out desensitization rules corresponding to the sensitive rule category from a preset desensitization rule library; The desensitization rule corresponding to the screened sensitive rule category is determined as the desensitization rule corresponding to the sensitive field.

4. The method according to claim 1, characterized in that The desensitizing the sensitive field based on the desensitizing rule includes: performing at least one of field replacement, field masking, random processing and encryption processing on the sensitive field.

5. The method according to any one of claims 1 to 4, characterized in that: After obtaining the desensitized power data, the method further includes: Evaluate the desensitization degree of the desensitized power data to obtain a desensitization effect evaluation result; When the desensitization effect evaluation result does not meet the preset verification threshold, the desensitization rule is optimized.

6. The method according to claim 5, characterized in that The evaluating the desensitization degree of the desensitized power data to obtain the desensitization effect evaluation result includes: Performing a reverse operation on the desensitized data to obtain restored data, and determining a data restoration degree based on the restored data and the desensitized data; Comparing the power data to be desensitized with the desensitized power data to determine the data difference; Based on the data restoration degree and the data difference degree, a desensitization effect evaluation result is obtained.

7. A power data desensitization device based on a section, characterized in that: The device comprises: The power data acquisition module is used to intercept the target power data to be desensitized in the original power data based on the cut-point interception rules in the preset power data desensitization section; A sensitive field identification module, used to identify sensitive fields in the target power data; A desensitization rule determination module, used to filter out desensitization rules that match the sensitive field from a preset desensitization rule library; The desensitization processing module is used to perform desensitization processing on the sensitive field based on the desensitization rule to obtain desensitized power data.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

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

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.