A power system data encryption method, device, equipment and storage medium
By employing a power system data encryption method based on a sensitivity vector library and an intelligent classification model, the sensitivity level of files is automatically determined and the encryption method is selected. This solves the problems of resource waste and security risks during power system data transmission, and achieves efficient and flexible data encryption and privacy protection.
Patent Information
- Application Number
- CN202411402049.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2044-10-09
AI Technical Summary
Existing technologies struggle to automate the encryption of power system data transmission, and machine learning models cannot guarantee absolute accuracy, leading to resource waste and security risks.
Based on a sensitivity vector library and intelligent classification model, the sensitivity level of the file to be processed is automatically determined, and the corresponding encryption method is selected according to the level, including national cryptographic algorithms, preset encryption technologies and data desensitization, to build a data encryption device and equipment for the power system.
It achieves automated encryption of power system data transmission, saves computing resources, improves security and flexibility, reduces human intervention, and ensures data availability and privacy protection.
Smart Images

Figure CN119337400B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of cryptography and data security management, and in particular to a method, apparatus, device and medium for encrypting power system data. Background Technology
[0002] In the construction of new power systems, the traditional smart grid serves as the foundation, with renewable energy generation such as photovoltaic and wind power as the main supply sources, combined with distributed energy storage systems and various complex power equipment. The security of new power systems involves the data security and privacy protection of power flow, business flow, and information flow. Power data includes marketing, grid, material, and financial data, characterized by large data volume, a large user base, numerous data collection points, and more diverse data types. The wider range of data usage and users, while bringing convenience to power production and marketing, also poses a significant risk of data leakage to grid data security.
[0003] Sensitive data in the power system includes: power trading data, grid operation data, infrastructure information, control and dispatch information, security and access permission data, and financial data. Because these data have different uses and the consequences of changes vary, they also have different levels of sensitivity. If all documents of varying sensitivity are encrypted with the highest level of security, while this ensures the highest level of security for all sensitive data, it also represents a significant waste of human and computing resources. Choosing different encryption methods based on the sensitivity of the document can indeed save computing resources considerably, but this generally requires experienced senior staff to review the specific document, consult relevant laws and regulations, and combine historical experience to select the appropriate encryption method. This requires staff with high academic qualifications and extensive practical experience. While this approach saves computing resources to some extent, it is inefficient, unreliable, and requires a long-term investment of time in training specialized personnel.
[0004] As the power system is part of the nation's critical infrastructure, the protection of its sensitive data is not only related to the operational security of enterprises, but also to national security and social stability. However, current technologies are still insufficient to automate the entire data encryption and transmission process. Furthermore, the fact that machine learning models cannot guarantee absolute accuracy is somewhat contradictory to the high level of security required for sensitive power system data. The remaining certain probability of error may cause serious security problems under certain circumstances, ranging from minor leaks of user privacy to serious threats to national security. Therefore, it is not yet possible to achieve full-process intelligence and automation in high-risk tasks such as the transmission of sensitive power system data. Summary of the Invention
[0005] This invention provides a method, apparatus, device, and medium for encrypting power system data, thereby solving the aforementioned technical problems and effectively saving computing resources.
[0006] To address the aforementioned technical problems, this invention provides a method for encrypting power system data, comprising:
[0007] Retrieve files to be processed and power system data from the power system;
[0008] Sensitive vector library based on power system data;
[0009] Based on the sensitivity vector library and the preset intelligent classification model, the sensitivity level of the file to be processed is determined;
[0010] Based on the sensitivity level, the corresponding encryption method is used to encrypt the files to be processed.
[0011] The beneficial effects of this invention are as follows:
[0012] This invention determines the sensitivity level of the file to be processed based on a sensitivity vector library and a preset intelligent classification model. Then, it encrypts the file according to the sensitivity level, achieving automated file encryption during power system data transmission. It automatically selects the appropriate encryption method based on the file's sensitivity level, offering high flexibility and eliminating the need for experienced operators to manually select encryption methods throughout the process. Compared to using high-security encryption for all files, this invention significantly saves computing resources.
[0013] As a preferred embodiment, the acquisition of the sensitivity vector library based on power system data includes:
[0014] Based on power system data, several word segments were obtained;
[0015] Get the TF-IDF values of all word segments;
[0016] Summarize the word segments with TF-IDF values greater than a preset threshold to obtain a sensitive word list;
[0017] Vectorize all word segments in the sensitive word library to obtain several sensitive vectors;
[0018] Cluster the aforementioned sensitive vectors to obtain K clusters; K is a preset positive integer;
[0019] A sensitivity vector library is obtained based on K clusters.
[0020] This preferred solution obtains the TF-IDF values of all words in the power system data and constructs a sensitive vector library including K clusters based on the TF-IDF values. TF-IDF statistics can effectively filter out common but meaningless information and highlight information that is important in a specific document. In this way, this solution can construct a sensitive vector library that reflects the sensitive data in the power system data. The obtained sensitive vector library can be used to determine the sensitivity level of subsequent files to be processed.
[0021] As a preferred embodiment, determining the sensitivity level of the file to be processed based on a sensitivity vector library and a preset intelligent classification model includes:
[0022] Based on the file to be processed, several vectors to be processed are obtained;
[0023] Obtain the K cluster center vectors corresponding to the K clusters;
[0024] Based on the K cluster center vectors, determine in turn whether each vector to be processed is a classifiable vector;
[0025] If there are classifiable vectors among several vectors to be processed, then the file to be processed is determined to be an initial sensitive file;
[0026] Based on a pre-defined intelligent classification model, the initial sensitive files are classified into sensitivity levels to determine the sensitivity level of the files to be processed.
[0027] This preferred scheme uses K clusters in a sensitive vector library and K cluster center vectors corresponding to those K clusters to determine whether there are classifiable vectors among several vectors to be processed. This determines whether the file to be processed is an initial sensitive file. Thus, the sensitive vector library is used to initially determine whether the file to be processed is a sensitive file. When the file to be processed is determined to be an initial sensitive file, a sensitivity level is then classified based on a preset intelligent classification model to determine the sensitivity level of the file to be processed, thereby avoiding the waste of computing resources when applying the intelligent classification model.
[0028] As a preferred embodiment, the step of sequentially determining whether each vector to be processed is a classifiable vector based on K cluster center vectors includes:
[0029] Calculate the Euclidean distance between the current vector to be processed and the K cluster center vectors respectively to obtain K initial Euclidean distances;
[0030] Based on K initial Euclidean distances, the first cluster is determined and the first Euclidean distance is obtained;
[0031] Determine the first sensitive vector within the first cluster that is farthest from the first center vector, and calculate the Euclidean distance between the first sensitive vector and the first center vector to obtain the second Euclidean distance; the first center vector is the cluster center vector of the first cluster.
[0032] Compare the first Euclidean distance and the second Euclidean distance;
[0033] When the first Euclidean distance is less than the second Euclidean distance, the current vector to be processed is determined to be a classifiable vector.
[0034] This preferred solution compares two Euclidean distances to determine whether the vector to be processed can be classified into a certain cluster in the sensitive vector library, thereby determining whether the file to be processed is an initial sensitive file and realizing the preliminary classification of the sensitivity level of the file to be processed.
[0035] As a preferred embodiment, the initial sensitive files are classified into sensitivity levels based on a preset intelligent classification model to determine the sensitivity level of the files to be processed, including:
[0036] Considering text semantic features and text layout features, the initial sensitive files are initially classified into sensitivity levels based on several ensemble sub-models, resulting in several evaluation results;
[0037] Based on the performance of each ensemble sub-model, different weights are assigned to several ensemble sub-models;
[0038] A comprehensive evaluation result is obtained based on weights and several evaluation results;
[0039] If the overall evaluation results do not meet the preset conditions, the initial sensitive files are classified into sensitivity levels based on the preset external knowledge base and LLM model to determine the sensitivity level of the files to be processed.
[0040] This preferred solution, based on a preset intelligent classification model, classifies initial sensitive files by sensitivity level to determine the sensitivity level of the files to be processed. It comprehensively considers the output results of various models, which can effectively improve the stability, reliability and accuracy of the sensitivity level classification of the files to be processed.
[0041] As a preferred embodiment, the step of encrypting the file to be processed using a corresponding encryption method based on the sensitivity level includes:
[0042] When the sensitivity level is Level 1, the national cryptographic algorithm is used to encrypt the file to be processed;
[0043] When the sensitivity level is Level 2, considering the data value and encryption cost, the preset encryption technology is used to encrypt the file to be processed.
[0044] When the sensitivity level is level 3, data anonymization is performed on the file to be processed in order to encrypt the file.
[0045] This preferred solution encrypts files according to their sensitivity level. Specifically, files at the first sensitivity level are encrypted using the national cryptographic algorithm; files at the second sensitivity level are encrypted using a preset encryption technology, considering data value and encryption cost; and files at the third sensitivity level undergo data desensitization. This automates file encryption during power system data transmission, automatically selecting the appropriate encryption method based on the file's sensitivity level. High-sensitivity files utilize advanced encryption, while low-sensitivity files, such as those potentially used for low-sensitivity shared data in other departments, are desensitized instead of fully encrypted. This ensures data availability while protecting user privacy, offering high flexibility and reliability. Furthermore, it eliminates the need for experienced operators to manually select encryption methods throughout the process, significantly saving computing resources compared to applying high-security encryption to all files.
[0046] As a preferred embodiment, the step of data anonymization of the file to be processed to achieve encryption of the file includes:
[0047] Determine the data type in the file to be processed;
[0048] When the data in the file to be processed is numerical, random noise is added to the file using the following formula:
[0049] NoiseResult=TrueResult+LaplaceNoise(λ)
[0050] In the above formula, TrueResult is the data in the file to be processed; LaplaceNoise(λ) is random noise drawn from the Laplace distribution;
[0051] When the data in the file to be processed is non-numerical, random noise is added to the file through an exponential mechanism.
[0052] This preferred solution, when determining the sensitivity level of the file to be processed to be Level 3, performs data anonymization on the file. Specifically, depending on the type of data in the file, different methods are used to add random noise to the file to achieve data anonymization. Compared to the practice of requiring experienced operators to manually select encryption methods throughout the process and to use high-security encryption methods for all files, this solution can effectively achieve differential privacy. Even if an attacker obtains the noisy data, it is difficult to deduce sensitive information through differential attacks, thus protecting personal privacy from infringement. It achieves automated and intelligent data encryption, which can greatly save computing and human resources.
[0053] Accordingly, in order to solve the above-mentioned technical problems, the present invention also provides an encryption device for power system data, including: a data acquisition module, a vector library construction module, a level determination module, and a file encryption module;
[0054] The data acquisition module is used to acquire files to be processed and power system data from the power system.
[0055] The vector library construction module is used to obtain a sensitive vector library based on power system data;
[0056] The sensitivity level determination module is used to determine the sensitivity level of the file to be processed based on the sensitivity vector library and the preset intelligent classification model.
[0057] The file encryption module is used to encrypt the file to be processed by adopting the corresponding encryption method according to the sensitivity level.
[0058] The present invention also provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the power system data encryption method as described in any of the above.
[0059] The present invention also provides a storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the encryption method for power system data as described in any of the preceding claims. Attached Figure Description
[0060] Figure 1 : A flowchart illustrating an embodiment of a power system data encryption method provided by the present invention;
[0061] Figure 2 : A schematic diagram of the structure of one embodiment of the intelligent classification model provided in this invention;
[0062] Figure 3 : A schematic diagram of an embodiment of an encryption device for power system data provided by the present invention. Detailed Implementation
[0063] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0064] As the power system is part of the nation's critical infrastructure, the protection of its sensitive data is crucial not only for the operational security of enterprises but also for national security and social stability. While using the highest level of encryption for all documents of varying sensitivity ensures maximum security for all types of sensitive data, it also represents a significant waste of human and computing resources. Selecting different encryption methods based on the sensitivity of the documents can indeed save considerable computing resources, but this typically requires experienced senior staff to review specific documents, consult relevant laws and regulations, and combine historical experience to choose the appropriate encryption method. This requires staff with high academic qualifications and extensive practical experience. While this approach saves computing resources to some extent, it is inefficient, unreliable, and requires a long-term investment of time in training specialized personnel.
[0065] Furthermore, existing technologies cannot fully automate the entire data encryption and transmission process. The fact that machine learning models cannot guarantee absolute accuracy is somewhat contradictory to the high level of security required for sensitive power system data. The remaining certain probability of error may cause serious security problems under certain circumstances, ranging from user privacy leaks to threats to national security. Therefore, it is not yet possible to achieve full-process intelligence and automation in high-risk tasks such as the transmission of sensitive power system data.
[0066] Example 1
[0067] To address the aforementioned technical problems, this invention provides a method, apparatus, device, and medium for encrypting power system data, thereby effectively saving computing resources.
[0068] Please refer to Figure 1 This is a flowchart illustrating one embodiment of a power system data encryption method provided by an embodiment of the present invention. Figure 1 As shown, the encryption method for the power system data includes steps 101 to 104, specifically:
[0069] Step 101: Obtain the file to be processed and power system data from the power system;
[0070] Step 102: Obtain a sensitivity vector library based on power system data;
[0071] Step 103: Determine the sensitivity level of the file to be processed based on the sensitivity vector library and the preset intelligent classification model;
[0072] Step 104: Based on the sensitivity level, encrypt the file to be processed using the corresponding encryption method.
[0073] Further, in step 102, the acquisition of the sensitivity vector library based on power system data includes:
[0074] Based on power system data, several word segments were obtained;
[0075] Get the TF-IDF values of all word segments;
[0076] Summarize the word segments with TF-IDF values greater than a preset threshold to obtain a sensitive word list;
[0077] Vectorize all word segments in the sensitive word library to obtain several sensitive vectors;
[0078] Cluster the aforementioned sensitive vectors to obtain K clusters; K is a preset positive integer;
[0079] A sensitivity vector library is obtained based on K clusters.
[0080] This invention obtains the TF-IDF values of all words in power system data and constructs a sensitive vector library including K clusters based on the TF-IDF values. TF-IDF statistics can effectively filter out common but meaningless information and highlight information that is important in a specific document. In this way, this solution can construct a sensitive vector library that reflects sensitive data in power system data. The obtained sensitive vector library can be used to determine the sensitivity level of subsequent files to be processed.
[0081] In this embodiment, the process of obtaining several word segments based on power system data includes:
[0082] The power system data is segmented into several sentences.
[0083] Extract the word segments from each clause to obtain a number of word segments.
[0084] In this embodiment, one way to obtain the TF-IDF values of all word segments is to use the TF-IDF algorithm to calculate the TF-IDF value of each word segment in order to obtain the TF-IDF values of all word segments.
[0085] In this embodiment, the preset threshold is selected reasonably according to the actual situation.
[0086] In this embodiment, the embedding model can be used to vectorize each word segmentation.
[0087] In this embodiment, the K-Means clustering algorithm is used to divide all sensitive vectors into K clusters, resulting in a sensitive vector library containing K clusters. The sensitive vector library records the position of the center point of each cluster (the position of the cluster center vector) and the Euclidean distance d between the farthest point from the center point in that cluster and the center point. k .
[0088] Further, in step 103, determining the sensitivity level of the file to be processed based on the sensitivity vector library and a preset intelligent classification model includes:
[0089] Based on the file to be processed, several vectors to be processed are obtained;
[0090] Obtain the K cluster center vectors corresponding to the K clusters;
[0091] Based on the K cluster center vectors, determine in turn whether each vector to be processed is a classifiable vector;
[0092] If there are classifiable vectors among several vectors to be processed, then the file to be processed is determined to be an initial sensitive file;
[0093] Based on a pre-defined intelligent classification model, the initial sensitive files are classified into sensitivity levels to determine the sensitivity level of the files to be processed.
[0094] This invention uses K clusters in a sensitive vector library and K cluster center vectors corresponding to those K clusters to determine whether there are classifiable vectors among several vectors to be processed. This determines whether the file to be processed is an initial sensitive file. Thus, the sensitive vector library is used to initially determine whether the file to be processed is a sensitive file. When the file to be processed is determined to be an initial sensitive file, a sensitivity level is then classified based on a preset intelligent classification model to determine the sensitivity level of the file to be processed, thereby avoiding the waste of computing resources when applying the intelligent classification model.
[0095] In this embodiment, based on the file to be processed, several vectors to be processed are obtained, including:
[0096] The file to be processed is segmented into sentences to obtain several sentences to be processed;
[0097] Extract the unprocessed word segments from each sentence to obtain a number of unprocessed word segments;
[0098] The preset vectorization model is used to vectorize several words to be processed, resulting in several vectors to be processed.
[0099] The preset vectorization model can be, but is not limited to, an embedding model.
[0100] In this embodiment, if there are no successfully categorized word vectors in the file to be processed, the sensitivity (sensitivity level) of the file to be processed cannot be accurately determined using an intelligent method (preset intelligent classification model). The file to be processed should be identified as a manually processed file and then manually classified.
[0101] Furthermore, the step of sequentially determining whether each vector to be processed is a classifiable vector based on K cluster center vectors includes:
[0102] Calculate the Euclidean distance between the current vector to be processed and the K cluster center vectors respectively to obtain K initial Euclidean distances;
[0103] Based on K initial Euclidean distances, the first cluster is determined and the first Euclidean distance is obtained;
[0104] Determine the first sensitive vector within the first cluster that is farthest from the first center vector, and calculate the Euclidean distance between the first sensitive vector and the first center vector to obtain the second Euclidean distance; the first center vector is the cluster center vector of the first cluster.
[0105] Compare the first Euclidean distance and the second Euclidean distance;
[0106] When the first Euclidean distance is less than the second Euclidean distance, the current vector to be processed is determined to be a classifiable vector.
[0107] This invention determines whether a vector to be processed can be classified into a certain cluster in a sensitive vector library by comparing two Euclidean distances, thereby determining whether the file to be processed is an initial sensitive file and realizing the preliminary classification of the sensitivity level of the file to be processed.
[0108] In this embodiment, the Euclidean distance D between each vector to be processed and the cluster center vector in the sensitive vector library is calculated. k Select the cluster k with the smallest Euclidean distance. m The distance between the vector to be processed and cluster k is compared and determined. m The Euclidean distance D of the center point km With cluster k m The Euclidean distance d between the point farthest from the center and the center. km The size of D, if km >d km If the vector to be processed is determined to be unclassifiable, it is considered unclassifiable; otherwise, it is successfully classified. If the current vector to be processed is determined to be classifiable, then it is also considered a sensitive vector.
[0109] Determining whether a file needs encryption by detecting the presence of sensitive vectors is incomplete. Furthermore, in today's rapidly evolving energy science landscape, power systems constantly encounter new concepts and rules that intelligent classification models trained on past datasets cannot detect. Therefore, the absence of detectable sensitive vectors in a file does not automatically mean it lacks sensitive content. Moreover, system maintenance personnel should regularly update the sensitive vector library to ensure its timeliness. Thus, this invention, after determining whether a file is initially sensitive based on the sensitive vector library, further determines the sensitivity level of the file based on a pre-set intelligent classification model. This allows for a more accurate assessment of whether a file requires encryption, preventing omissions and improving the security of power system data.
[0110] Furthermore, the initial sensitive files are classified into sensitivity levels based on a preset intelligent classification model to determine the sensitivity level of the files to be processed, including:
[0111] Considering text semantic features and text layout features, the initial sensitive files are initially classified into sensitivity levels based on several ensemble sub-models, resulting in several evaluation results;
[0112] Based on the performance of each ensemble sub-model, different weights are assigned to several ensemble sub-models;
[0113] A comprehensive evaluation result is obtained based on weights and several evaluation results;
[0114] If the overall evaluation results do not meet the preset conditions, the initial sensitive files are classified into sensitivity levels based on the preset external knowledge base and LLM model to determine the sensitivity level of the files to be processed.
[0115] In this embodiment, the preset intelligent classification model is composed of multiple models, including an LLM model using RAG technology and several ensemble sub-models obtained after training machine learning models on preprocessed datasets.
[0116] For the several ensemble sub-models obtained after training machine learning models on preprocessed datasets, the datasets are created according to two criteria during the dataset processing stage: text semantics and text structure. For example, when creating a dataset based on text semantics, all text in the dataset is segmented into text paragraphs while retaining their annotations. Structural features such as extensive charts and graphs are removed, transforming the text into a uniform paragraph structure. This minimizes the impact of text layout features on the model while preserving the text content. Paragraphs with obvious semantic features are selected as the training dataset. When creating a dataset based on text layout, files with significant document layout features are selected as the training dataset to reduce the impact of text semantic features on the model.
[0117] Since the acquisition of sensitive data in power system data is limited and involves significant internal security issues, it is foreseeable that the amount of training data for machine learning models will be extremely limited. To ensure the reliability and stability of models trained on limited datasets, this invention employs the Bagging (Bootstrap Aggregating) ensemble learning method. In a limited dataset, the Bootstrap method is used to extract samples from the original dataset, and multiple small models are obtained through multiple training sessions. Each model uses all the data in different combinations, and the final model evaluation result is the combined result of multiple small models.
[0118] Please refer to the following: Figure 2 , Figure 2 This is a schematic diagram of the structure of one embodiment of the intelligent classification model provided in this invention.
[0119] For example, five small models (ensemble sub-models) are trained from limited data, each with different training data. After classification by the five small models, if more than three of them obtain the same result, the result of the majority of the small models is taken as the final result. If the results obtained by multiple small models are scattered and it is difficult to reach a consensus, the initial sensitive files are classified as sensitive files that the machine learning model cannot accurately classify, and further classification should be carried out in conjunction with the output results of the LLM model.
[0120] In this process, different weights should be assigned to the multiple ensemble sub-models based on their performance on the test set. The final result should comprehensively consider the evaluation results of each ensemble sub-model, thereby improving the stability of training the model on a limited dataset. If the results obtained by different models are too scattered, it is impossible to accurately determine the sensitivity level of the initial sensitive files. In such cases, the files to be processed need to be classified as manually processed files for subsequent manual processing.
[0121] For the LLM model, this invention defines the technical requirements and specifications for power system data processing, communication, storage, and exchange; specific specification documents for relevant data within various departments; and complete, detailed, and accurate textual descriptions of the layout characteristics of high, medium, and low sensitivity files as an external knowledge base for the LLM model. Based on this external knowledge base, the LLM model can refer to various industry standards and the structural characteristics of different levels of sensitivity files when classifying initial sensitive files, thus achieving the classification of initial sensitive files.
[0122] This invention, based on a preset intelligent classification model, classifies initial sensitive files by sensitivity level to determine the sensitivity level of the files to be processed. By comprehensively considering the output results of various models, it can effectively improve the stability, reliability, and accuracy of the sensitivity level classification of the files to be processed.
[0123] Further, in step 104, encrypting the file to be processed using a corresponding encryption method based on the sensitivity level includes:
[0124] When the sensitivity level is Level 1, the national cryptographic algorithm is used to encrypt the file to be processed;
[0125] When the sensitivity level is Level 2, considering the data value and encryption cost, the preset encryption technology is used to encrypt the file to be processed.
[0126] When the sensitivity level is level 3, data anonymization is performed on the file to be processed in order to encrypt the file.
[0127] In this embodiment, when the sensitivity level is Level 1, the file to be processed contains high-level sensitive information, which may include core control instructions and configuration information of critical infrastructure. When the sensitivity level is Level 2, the file to be processed contains medium-level sensitive information, which may involve general operational data and basic user information. When the sensitivity level is Level 3, the file to be processed contains low-level sensitive information, which may only include a large amount of structured, non-critical monitoring data and publicly available information.
[0128] In this embodiment, the highly sensitive information involves core control commands and configuration information of critical infrastructure, etc. Therefore, Chinese national cryptographic algorithms are used for encryption to ensure that the risk of information leakage is minimized; Chinese national cryptographic algorithms include SM2, SM3 and SM4 algorithms, etc.
[0129] Intermediate-level sensitive information has a lower intrinsic value than high-level sensitive information, but it still needs to be encrypted accordingly. Therefore, it is necessary to weigh the data value against the encryption cost and adopt an appropriate encryption method based on the actual situation.
[0130] Low-level sensitive information contains a large amount of structured data. While the value of a single piece of data is limited, holding a large amount of the same type of data can still lead to data leaks and other risks to personal privacy through data mining and other technologies. Furthermore, the conventional approach of encrypting a large amount of this type of data is not proportional to the encryption cost and the value of the data itself. Therefore, data desensitization is used for this type of data instead of directly encrypting all content.
[0131] This invention encrypts files according to their sensitivity level, using corresponding encryption methods. Specifically, files at the first sensitivity level are encrypted using national cryptographic algorithms; files at the second sensitivity level are encrypted using preset encryption techniques, considering data value and encryption costs; and files at the third sensitivity level undergo data desensitization. This automates file encryption during power system data transmission, automatically selecting the appropriate encryption method based on the file's sensitivity level. High-sensitivity files utilize advanced encryption methods, while low-sensitivity files, such as those potentially used for low-sensitivity shared data in other departments, are desensitized instead of fully encrypted. This ensures data availability while protecting user privacy, offering high flexibility and reliability. Furthermore, it eliminates the need for experienced operators to manually select encryption methods throughout the process, significantly saving computing resources compared to applying high-security encryption to all files.
[0132] Furthermore, the process of desensitizing the data in the file to be processed to achieve encryption of the file includes:
[0133] Determine the data type in the file to be processed;
[0134] When the data in the file to be processed is numerical, random noise is added to the file using the following formula:
[0135] NoiseResult=TrueResult+LaplaceNoise(λ)
[0136] In the above formula, TrueResult is the data in the file to be processed; LaplaceNoise(λ) is random noise drawn from the Laplace distribution;
[0137] When the data in the file to be processed is non-numerical, random noise is added to the file through an exponential mechanism.
[0138] In this embodiment, when the sensitivity level of the file to be processed is level three, that is, when there is a large amount of low-level sensitive information in the file to be processed, a centralized differential privacy protection technology is adopted to add random noise. Two different noise addition mechanisms are used for numerical data and non-numerical data.
[0139] For numerical data, random noise is added using the Laplace mechanism, and the formula for adding noise is as follows:
[0140] NoiseResult=TrueResult+LaplaceNoise(λ)
[0141] In the above formula, TrueResult represents the actual data in the file to be processed, and LaplaceNoise(λ) is random noise drawn from the Laplace distribution; the Laplace density function is:
[0142]
[0143] In the above formula, μ is the noise mean, and the scale parameter b is determined by the following formula:
[0144]
[0145] Here, Δf is the query sensitivity, which is the absolute value by which changing a record in the dataset can cause the query result to change at most; ∈ is the parameter of differential privacy, which determines the degree of privacy protection. The smaller ∈ is, the stronger the privacy protection. In this way, the added noise will ensure that the query result satisfies the definition of ∈-differential privacy.
[0146] For non-numerical queries, an exponential mechanism is used to add random noise. The core idea of the exponential mechanism is to assign a score to each possible output based on a utility function, and then select one output in a privacy-preserving manner. Let D be the dataset, and R be all possible outputs. Let ∈1 be the utility function, which measures the utility of output r given dataset D; let ∈1 be the differential privacy parameter, representing the privacy budget; for each possible output r∈R, the probability of the exponential mechanism choosing r is:
[0147]
[0148] In the above formula, Δu is the sensitivity of the utility function u, that is, the maximum change in the utility function caused by a change in any element in the dataset.
[0149] In this embodiment, depending on the actual situation of the power system, other suitable data anonymization methods can also be selected to anonymize the files to be processed, such as data masking, hashing, randomization, etc.
[0150] When the sensitivity level of a file to be processed is determined to be Level 3, this invention performs data anonymization on the file. Specifically, depending on the type of data in the file, different methods are used to add random noise to the file to achieve data anonymization. Compared to the practice of requiring experienced operators to manually select encryption methods throughout the process and to use high-security encryption methods for all files, this invention can effectively achieve differential privacy. Even if an attacker obtains the noisy data, it is difficult to deduce sensitive information through differential attacks, thus protecting personal privacy from infringement. This invention achieves automated and intelligent data encryption, which can greatly save computing and human resources.
[0151] Accordingly, to address the aforementioned technical problems, embodiments of the present invention also provide an encryption device for power system data. Please refer to... Figure 3 This is a schematic diagram of an embodiment of an encryption device for power system data provided by the present invention.
[0152] like Figure 3 As shown, the encryption device 20 for power system data includes: a data acquisition module 201, a vector library construction module 202, a level determination module 203, and a file encryption module 204;
[0153] The data acquisition module 201 is used to acquire files to be processed and power system data from the power system.
[0154] The vector library construction module 202 is used to obtain a sensitive vector library based on power system data;
[0155] The level determination module 203 is used to determine the sensitivity level of the file to be processed based on the sensitivity vector library and the preset intelligent classification model.
[0156] The file encryption module 204 is used to encrypt the file to be processed by adopting the corresponding encryption method according to the sensitivity level.
[0157] The present invention also provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the power system data encryption method as described in any of the above.
[0158] The present invention also provides a storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the encryption method for power system data as described in any of the preceding claims.
[0159] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0160] This invention determines the sensitivity level of files to be processed based on a sensitivity vector library and a preset intelligent classification model. It then encrypts the files using corresponding encryption methods based on their sensitivity level, thus automating the encryption of sensitive files during power system data transmission. The invention automatically selects the appropriate encryption method based on the file's sensitivity level, employing advanced encryption for highly sensitive files and data desensitization instead of full encryption for low-sensitivity shared data that may be used by other departments. This approach ensures data availability while protecting user privacy, offering high flexibility and reliability. Furthermore, it eliminates the need for experienced operators to manually select encryption methods throughout the process, significantly saving computing resources compared to applying high-security encryption to all files.
[0161] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.
Claims
1. A method for encrypting power system data, characterized in that, include: Retrieve files to be processed and power system data from the power system; Sensitive vector library based on power system data; Based on a sensitive vector library and a pre-defined intelligent classification model, the sensitivity level of the file to be processed is determined, including: obtaining several vectors to be processed based on the file; obtaining K cluster center vectors corresponding to K clusters; judging whether each vector to be processed is a classifiable vector based on the K cluster center vectors; if there are classifiable vectors among the several vectors to be processed, the file to be processed is determined as an initial sensitive file; considering text semantic features and text layout features, the initial sensitive file is initially classified into several sensitive levels based on several ensemble sub-models, resulting in several evaluation results; according to the performance of each ensemble sub-model, different weights are assigned to the several ensemble sub-models; a comprehensive evaluation result is obtained based on the weights and several evaluation results; when the comprehensive evaluation result does not meet the pre-defined conditions, the initial sensitive file is classified into sensitive levels based on a pre-defined external knowledge base and an LLM model to determine the sensitivity level of the file to be processed. Based on the sensitivity level, the corresponding encryption method is used to encrypt the files to be processed.
2. The method for encrypting power system data as described in claim 1, characterized in that, The sensitivity vector library based on power system data acquisition includes: Based on power system data, several word segments were obtained; Get the TF-IDF values of all word segments; Summarize the word segments with TF-IDF values greater than a preset threshold to obtain a sensitive word list; Vectorize all word segments in the sensitive word library to obtain several sensitive vectors; Cluster the aforementioned sensitive vectors to obtain K clusters; K is a preset positive integer; A sensitivity vector library is obtained based on K clusters.
3. The method for encrypting power system data as described in claim 1, characterized in that, The step of determining whether each vector to be processed is a classifiable vector based on K cluster center vectors includes: Calculate the Euclidean distance between the current vector to be processed and the K cluster center vectors respectively to obtain K initial Euclidean distances; Based on K initial Euclidean distances, the first cluster is determined and the first Euclidean distance is obtained; Determine the first sensitive vector within the first cluster that is farthest from the first center vector, and calculate the Euclidean distance between the first sensitive vector and the first center vector to obtain the second Euclidean distance; the first center vector is the cluster center vector of the first cluster. Compare the first Euclidean distance and the second Euclidean distance; When the first Euclidean distance is less than the second Euclidean distance, the current vector to be processed is determined to be a classifiable vector.
4. The method for encrypting power system data as described in claim 1, characterized in that, The step of encrypting the file to be processed using corresponding encryption methods based on the sensitivity level includes: When the sensitivity level is Level 1, the national cryptographic algorithm is used to encrypt the file to be processed; When the sensitivity level is Level 2, considering the data value and encryption cost, the preset encryption technology is used to encrypt the file to be processed. When the sensitivity level is level 3, data anonymization is performed on the file to be processed in order to encrypt the file.
5. The method for encrypting power system data as described in claim 4, characterized in that, The process of de-identifying the data in the file to be processed in order to encrypt the file includes: Determine the data type in the file to be processed; When the data in the file to be processed is numerical, random noise is added to the file using the following formula: NoiseResult=TrueResult+LaplaceNoise(λ) In the above formula, TrueResult is the data in the file to be processed; LaplaceNoise(λ) is random noise drawn from the Laplace distribution; When the data in the file to be processed is non-numerical, random noise is added to the file through an exponential mechanism.
6. A power system data encryption device, characterized in that, include: Data acquisition module, vector library construction module, level determination module, and file encryption module; The data acquisition module is used to acquire files to be processed and power system data from the power system. The vector library construction module is used to obtain a sensitive vector library based on power system data; The sensitivity level determination module is used to determine the sensitivity level of a file to be processed based on a sensitivity vector library and a preset intelligent classification model. This includes: obtaining several vectors to be processed based on the file; acquiring K cluster center vectors corresponding to K clusters; sequentially determining whether each vector to be processed is a classifiable vector based on the K cluster center vectors; if a classifiable vector exists among the several vectors to be processed, then the file to be processed is determined to be an initial sensitive file; considering text semantic features and text layout features, performing a preliminary sensitivity level classification of the initial sensitive file based on several ensemble sub-models, obtaining several evaluation results; assigning different weights to the several ensemble sub-models according to the performance of each ensemble sub-model; obtaining a comprehensive evaluation result based on the weights and several evaluation results; when the comprehensive evaluation result does not meet preset conditions, then performing a sensitivity level classification of the initial sensitive file based on a preset external knowledge base and an LLM model to determine the sensitivity level of the file to be processed. The file encryption module is used to encrypt the file to be processed by adopting the corresponding encryption method according to the sensitivity level.
7. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the encryption method for power system data as described in any one of claims 1 to 5.
8. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the encryption method for power system data as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Method for detecting sensitive information based on D-S evidence theory
CN102426599A
Sensitive file identification processing method and system based on clustering model
CN117610037A