Encryption method, device and equipment of power system data and storage medium

By determining the sensitivity level of power system data based on the sensitive vector library and intelligent classification model, and selecting the encryption method according to the level, the automation problem of encrypted transmission of power system data in the existing technology is solved, and efficient and secure data transmission is achieved.

CN119337400AActive Publication Date: 2025-01-21GUANGDONG POWER GRID CO LTD +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411402049.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-09
Publication Date
2025-01-21
Estimated Expiration
2044-10-09

AI Technical Summary

Technical Problem

The prior art is difficult to automate the encryption transmission of power system data, and the machine learning model cannot guarantee absolute accuracy, resulting in safety risks in high-risk work.

Method used

By obtaining the files and data to be processed from the power system, based on the sensitive vector library and the preset intelligent classification model, the sensitivity level of the files to be processed is determined, and the corresponding encryption method is adopted according to the sensitivity level for encryption.

Benefits of technology

It realizes the automatic processing of file encryption during the power system data transmission process, automatically selects the encryption method according to the sensitivity level of the file, saves computing resources, and improves the security and efficiency of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119337400A_ABST
    Figure CN119337400A_ABST
Patent Text Reader

Abstract

The invention discloses a power system data encryption method, apparatus and device, and a storage medium. The power system data encryption method comprises the steps of obtaining a to-be-processed file and power system data from a power system; obtaining a sensitive vector library based on the power system data; based on the sensitive vector library and a preset intelligent classification model, determining a sensitive level of the to-be-processed file; and encrypting the to-be-processed file by adopting a corresponding encryption mode according to the sensitivity level. According to the sensitive level of the to-be-processed file, the corresponding encryption mode is adopted to encrypt the to-be-processed file, automatic processing of file encryption in the data transmission process of the power system is achieved, the corresponding encryption mode is automatically selected according to the sensitive level of the file, the flexibility is high, and the file encryption efficiency is improved. And moreover, an operator with rich experience does not need to manually select an encryption mode in the whole process, and compared with a method of adopting a high-security encryption means for all files, the computing power resource can be greatly saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cryptography and data security management, and in particular to an encryption method, device, equipment and medium for power system data. Background Art

[0002] In the construction of the new power system, the new power system is based on the traditional smart grid, with photovoltaic power generation, wind power generation and other renewable energy power generation as the main integrated supply, and combined with distributed energy storage systems and various complex power equipment. The security of the new power system involves the data security and privacy protection of power flow, business flow and information flow. Power data includes marketing, power grid, materials, finance and other data, showing the characteristics of large data volume, large user scale, many data collection points and more data types. The use of data and users are more extensive, which brings convenience to power production and marketing, but also brings great data leakage risks to power grid data security.

[0003] Sensitive data in the power system include: power trading data, power grid operation data, infrastructure information, control and dispatching information, security and access rights data, financial data and other data. Since the uses of these data are different, the consequences of data changes are also different, so sensitive data also has different sensitivities. If all sensitive files are encrypted at the highest level, although this approach ensures that different sensitive data have the highest security, it actually wastes manpower and computing resources. If different encryption methods are selected according to the sensitivity of the file, this approach can indeed greatly save computing resources, but generally requires experienced senior staff to consult relevant legal regulations after reviewing specific documents and select appropriate encryption methods based on historical experience, which requires staff to have a high academic level and rich practical experience. This approach saves computing resources to a certain extent, but it is inefficient, unreliable, and requires long-term time costs to train professionals.

[0004] Since the power system is part of the country's critical infrastructure, the protection of its sensitive data is not only related to the operational safety of the enterprise, but also to national security and social stability. However, existing technologies make it difficult to automate the entire data encryption and transmission process. In addition, the inability of machine learning models to guarantee absolute accuracy is inconsistent with the high security required for sensitive data in the power system. The remaining error probability may cause serious security problems in certain specific situations, which may lead to the leakage of user privacy and even threaten national security. Therefore, in high-risk tasks such as the transmission of sensitive data in the power system, it is not possible to achieve full intelligence and automation of the entire process. Summary of the invention

[0005] The present invention provides an encryption method, device, equipment and medium for power system data to solve the above-mentioned technical problems and effectively save computing resources.

[0006] In order to solve the above technical problems, the present invention provides a method for encrypting power system data, comprising:

[0007] Obtain files to be processed and power system data from the power system;

[0008] Acquire sensitive vector library based on power system data;

[0009] Determine the sensitivity level of the file to be processed based on the sensitive vector library and the preset intelligent classification model;

[0010] According to the sensitivity level, the corresponding encryption method is used to encrypt the files to be processed.

[0011] The beneficial effects of the present invention are:

[0012] The present invention determines the sensitivity level of the file to be processed based on a sensitive vector library and a preset intelligent classification model, and adopts a corresponding encryption method to encrypt the file to be processed according to the sensitivity level of the file to be processed, thereby realizing the automated processing of file encryption during data transmission in the power system, automatically selecting the corresponding encryption method according to the sensitivity level of the file, having strong flexibility, and eliminating the need for experienced operators to manually select the encryption method throughout the process. Compared with the practice of adopting high-security encryption means for all files, computing resources can be greatly saved.

[0013] As a preferred solution, the method of acquiring a sensitive vector library based on power system data includes:

[0014] Based on the power system data, several segmented words are obtained;

[0015] Get the TF-IDF values ​​of all word segments;

[0016] Summarize the words whose TF-IDF values ​​are greater than the preset threshold to obtain a sensitive word library;

[0017] Vectorize all the words in the sensitive word library to obtain several sensitive vectors;

[0018] Clustering the plurality of sensitive vectors to obtain K clusters, where K is a preset positive integer;

[0019] A sensitive vector library is obtained based on K clusters.

[0020] This preferred solution obtains the TF-IDF values ​​of all word segments 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 the information that is important in a specific document. In this way, this solution can construct a sensitive vector library that reflects 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 solution, the sensitivity level of the to-be-processed file is determined based on the sensitivity vector library and the preset intelligent classification model, including:

[0022] Based on the file to be processed, a number of vectors to be processed are obtained;

[0023] Get 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 is a classifiable vector among the several vectors to be processed, the file to be processed is determined to be an initial sensitive file;

[0026] Based on the preset 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 solution determines whether there are classifiable vectors in a number of vectors to be processed through K clusters of the sensitive vector library and K cluster center vectors corresponding to the K clusters, so as to determine whether the file to be processed is an initial sensitive file. Therefore, the sensitive file to be processed is preliminarily determined to be a sensitive file through the sensitive vector library. When the file to be processed is determined to be an initial sensitive file, the initial sensitive file is divided into sensitivity levels based on a preset intelligent classification model to determine the sensitivity level of the file to be processed, so as to avoid waste of computing resources when the intelligent classification model is applied.

[0028] As a preferred solution, the step of sequentially judging whether each vector to be processed is a classifiable vector based on the K cluster center vectors includes:

[0029] Calculate the Euclidean distances between the current vector to be processed and the K cluster center vectors respectively to obtain K initial Euclidean distances;

[0030] Based on the K initial Euclidean distances, determine the first cluster and obtain the first Euclidean distance;

[0031] Determine a first sensitive vector in the first cluster that is farthest from the first central vector, and calculate the Euclidean distance between the first sensitive vector and the first central vector to obtain a second Euclidean distance; the first central vector is the cluster central 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, it is determined that the current vector to be processed is a classifiable vector.

[0034] This preferred solution determines whether the vector to be processed can be classified into a cluster in the sensitive vector library by comparing two Euclidean distances, thereby determining whether the file to be processed is an initial sensitive file, and achieving a preliminary classification of the sensitivity level of the file to be processed.

[0035] As a preferred solution, the sensitivity level classification of the initial sensitive files is performed based on a preset intelligent classification model to determine the sensitivity level of the files to be processed, including:

[0036] Considering the text semantic features and text layout features, the initial sensitive files are classified into preliminary sensitivity levels based on several integrated sub-models, and several evaluation results are obtained;

[0037] According to the performance of each integrated sub-model, different weights are assigned to several integrated sub-models;

[0038] Obtain a comprehensive evaluation result according to the weight and several evaluation results;

[0039] When the comprehensive evaluation result does not meet the preset conditions, the sensitivity level of the initial sensitive files is divided 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 comprehensively considers the output results of each model when classifying the sensitivity level of the initial sensitive files based on the preset intelligent classification model to determine the sensitivity level of the files to be processed, which can effectively improve the stability, reliability and accuracy of the sensitivity level classification of the files to be processed.

[0041] As a preferred solution, the corresponding encryption method is adopted to encrypt the file to be processed according to the sensitivity level, including:

[0042] When the sensitivity level is the first level, the national secret algorithm is used to encrypt the files to be processed;

[0043] When the sensitivity level is the second level, considering the data value and encryption cost, the preset encryption technology is used to encrypt the files to be processed;

[0044] When the sensitivity level is the third level, the files to be processed are desensitized to achieve encryption of the files to be processed.

[0045] This preferred solution adopts the corresponding encryption method to encrypt the files to be processed according to the sensitivity level of the files to be processed. Specifically, the national secret algorithm is used to encrypt the files to be processed with the first sensitivity level, and the preset encryption technology is used to encrypt the files to be processed with the second sensitivity level in consideration of data value and encryption cost, and the data of the files to be processed with the third sensitivity level are desensitized. This realizes the automated processing of file encryption during the data transmission of the power system, automatically selects the corresponding encryption method according to the sensitivity level of the file, adopts advanced encryption means for files with high sensitivity levels, and adopts data desensitization methods instead of full encryption for files with low sensitivity levels such as those that may be used for low-sensitivity shared data of other departments. While ensuring data availability, it also protects user privacy. It has strong overall flexibility and high reliability, and does not require experienced operators to manually select encryption methods throughout the process. Compared with the practice of adopting high-security encryption means for all files, it can greatly save computing resources.

[0046] As a preferred solution, the data desensitization of the to-be-processed file is performed to achieve encryption of the to-be-processed file, including:

[0047] Determine the type of data in the file to be processed;

[0048] When the data type in the file to be processed is numerical data, random noise is added to the file to be processed 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 the random noise extracted from the Laplace distribution;

[0051] When the type of data in the file to be processed is non-numeric data, random noise is added to the file to be processed through an exponential mechanism.

[0052] When the sensitivity level of the file to be processed is determined to be the third level, this preferred solution desensitizes the data of the file to be processed. According to the type of data in the file to be processed, different methods are adopted to add random noise to the file to be processed to achieve data desensitization of the file to be processed. Compared with the practice of requiring experienced operators to manually select encryption methods throughout the process and adopting high-security encryption methods for all files, differential privacy can be effectively achieved. Even if the attacker obtains the noisy data, it is difficult to infer sensitive information through differential attacks, thereby protecting personal privacy from infringement and realizing automatic and intelligent data encryption, which can greatly save computing resources and human resources.

[0053] Accordingly, in order to solve the above technical problems, the present invention also provides an encryption device for power system data, comprising: a data acquisition module, a vector library construction module, a level determination module and a file encryption module;

[0054] Wherein, the data acquisition module is used to acquire the files to be processed and the 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 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 in a corresponding encryption manner according to the sensitivity level.

[0058] The present invention also provides a terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the power system data encryption method as described in any one of the above items are implemented.

[0059] The present invention also provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the power system data encryption method as described in any one of the above items are implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 : A flow chart of an embodiment of a method for encrypting power system data provided by the present invention;

[0061] Figure 2 : A structural diagram of an embodiment of an intelligent classification model provided by an embodiment of the present invention;

[0062] Figure 3 : A structural diagram of an embodiment of an encryption device for power system data provided by the present invention. DETAILED DESCRIPTION

[0063] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0064] Since the power system is part of the country's critical infrastructure, the protection of its sensitive data is not only related to the operational safety of the enterprise, but also to national security and social stability. If all sensitive files are encrypted at the highest level, this approach will ensure that different sensitive data have the highest security, but in fact it will also greatly waste manpower and computing resources. If different encryption methods are selected according to the sensitivity of the file, this approach can indeed greatly save computing resources, but generally requires experienced senior staff to consult relevant laws and regulations after reviewing specific documents and select appropriate encryption methods based on historical experience, which requires staff to have a high academic level and rich practical experience. This approach saves computing resources to a certain extent, but it is inefficient, unreliable, and requires a long-term time cost to train professionals.

[0065] In addition, existing technologies still find it difficult to automate the entire data encryption transmission process. The inability of machine learning models to guarantee absolute accuracy is somewhat inconsistent with the high security required for sensitive data in the power system. The remaining certain error probability may cause serious security problems in certain specific situations, which may lead to the leakage of user privacy and even threaten national security. Therefore, in high-risk tasks such as the transmission of sensitive data in the power system, it is still impossible to achieve full process intelligence and automation.

[0066] Embodiment 1

[0067] In order to solve the above technical problems, the present invention provides an encryption method, device, equipment and medium for power system data to solve the above technical problems and effectively save computing resources.

[0068] Please refer to Figure 1 , is a flow chart of an embodiment of a method for encrypting power system data provided by an embodiment of the present invention. Figure 1 As shown, the power system data encryption method includes steps 101 to 104, specifically:

[0069] Step 101: Obtaining a file to be processed and power system data from a power system;

[0070] Step 102: Acquire a sensitive 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: According to the sensitivity level, a corresponding encryption method is adopted to encrypt the file to be processed.

[0073] Further, in step 102, acquiring a sensitive vector library based on power system data includes:

[0074] Based on the power system data, several segmented words are obtained;

[0075] Get the TF-IDF values ​​of all word segments;

[0076] Summarize the words whose TF-IDF values ​​are greater than the preset threshold to obtain a sensitive word library;

[0077] Vectorize all the words in the sensitive word library to obtain several sensitive vectors;

[0078] Clustering the plurality of sensitive vectors to obtain K clusters, where K is a preset positive integer;

[0079] A sensitive vector library is obtained based on K clusters.

[0080] The present invention obtains the TF-IDF values ​​of all word segments in the power system data, and constructs a sensitive vector library including K clusters based on the TF-IDF values. The TF-IDF statistics can effectively filter out common but meaningless information and highlight the information that is important in a specific document. In this way, the present solution can construct a sensitive vector library that reflects 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.

[0081] In this embodiment, several segmentations are obtained based on the power system data, including:

[0082] The power system data is processed into sentences to obtain a number of sentences;

[0083] The participles in each sentence are extracted to obtain a number of participles.

[0084] In this embodiment, one implementation method of obtaining the TF-IDF values ​​of all word segments is to use a TF-IDF algorithm to calculate the TF-IDF value of each word segment to obtain the TF-IDF values ​​of all word segments.

[0085] In this embodiment, the preset threshold is reasonably selected according to actual conditions.

[0086] In this embodiment, each word segmentation may be vectorized using, but is not limited to, an embedding model.

[0087] In this embodiment, the K-Means clustering algorithm is used to divide all sensitive vectors into K clusters to obtain a sensitive vector library containing K clusters; the sensitive vector library records the position of each cluster center point (the position of the cluster center vector) and the Euclidean distance d of the point farthest from the center point in the cluster from the center point. k .

[0088] Furthermore, in step 103, the sensitivity level of the to-be-processed file is determined based on the sensitivity vector library and the preset intelligent classification model, including:

[0089] Based on the file to be processed, a number of vectors to be processed are obtained;

[0090] Get 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 is a classifiable vector among the several vectors to be processed, the file to be processed is determined to be an initial sensitive file;

[0093] Based on the preset intelligent classification model, the initial sensitive files are classified into sensitivity levels to determine the sensitivity level of the files to be processed.

[0094] The present invention determines whether there are classifiable vectors in a number of vectors to be processed through K clusters of a sensitive vector library and K cluster center vectors corresponding to the K clusters, so as to determine whether the file to be processed is an initial sensitive file. Therefore, the sensitive file is preliminarily determined to be a sensitive file through the sensitive vector library. When the file to be processed is determined to be an initial sensitive file, the initial sensitive file is divided into sensitivity levels based on a preset intelligent classification model to determine the sensitivity level of the file to be processed, so as to avoid waste of computing resources when the intelligent classification model is applied.

[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 processed sentence by sentence to obtain a number of sentences to be processed;

[0097] Extracting the to-be-processed participles in each to-be-processed sentence to obtain a plurality of to-be-processed participles;

[0098] Use a preset vectorization model to vectorize several word segmentations to be processed to obtain several vectors to be processed.

[0099] The preset vectorization model may be, but is not limited to, an embedding model.

[0100] In this embodiment, if there is no successfully classified word segmentation vector in the file to be processed, it is impossible to use an intelligent method (preset intelligent classification model) to accurately judge the sensitivity (sensitivity level) of the file to be processed. The file to be processed should be determined as a manually processed file and subsequently manually classified.

[0101] Furthermore, judging in turn whether each vector to be processed is a classifiable vector based on the K cluster center vectors includes:

[0102] Calculate the Euclidean distances between the current vector to be processed and the K cluster center vectors respectively to obtain K initial Euclidean distances;

[0103] Based on the K initial Euclidean distances, determine the first cluster and obtain the first Euclidean distance;

[0104] Determine a first sensitive vector in the first cluster that is farthest from the first central vector, and calculate the Euclidean distance between the first sensitive vector and the first central vector to obtain a second Euclidean distance; the first central vector is the cluster central 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, it is determined that the current vector to be processed is a classifiable vector.

[0107] The present invention determines whether the vector to be processed can be classified into a cluster in the 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 each cluster center vector in the sensitive vector library is calculated. k , select the cluster k with the smallest Euclidean distance m , compare and determine the distance cluster k of the vector to be processed m The Euclidean distance D of the center point km With cluster k m The Euclidean distance d of the point farthest from the center point km If D km >d km , then it is determined that the vector to be processed cannot be classified into a certain cluster, otherwise it is successfully classified. When the current vector to be processed is determined to be a classifiable vector, the current vector to be processed is also a sensitive vector.

[0109] Since it is one-sided to determine whether the to-be-processed file needs to be encrypted by detecting whether there is a sensitive vector in the to-be-processed file, and in today's rapidly developing energy science, the power system will continue to face emerging concepts or rules over time, which cannot be detected by the intelligent classification model trained in the past data set. Therefore, on the one hand, it cannot be judged that the file that cannot detect the sensitive vector does not contain sensitive content. Moreover, the system maintenance personnel should regularly maintain and update the sensitive vector library to maintain timeliness. Therefore, after determining whether the to-be-processed file is an initial sensitive file based on the sensitive vector library, the present invention also determines the sensitivity level of the to-be-processed file based on the preset intelligent classification model, which can more accurately determine whether the to-be-processed file is a sensitive file that needs to be encrypted, avoid omissions, and improve the security of power system data.

[0110] Furthermore, the sensitivity level classification of the initial sensitive files based on the preset intelligent classification model to determine the sensitivity level of the files to be processed includes:

[0111] Considering the text semantic features and text layout features, the initial sensitive files are classified into preliminary sensitivity levels based on several integrated sub-models, and several evaluation results are obtained;

[0112] According to the performance of each integrated sub-model, different weights are assigned to several integrated sub-models;

[0113] Obtain a comprehensive evaluation result according to the weight and several evaluation results;

[0114] When the comprehensive evaluation result does not meet the preset conditions, the sensitivity level of the initial sensitive files is divided 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 aggregated by multiple models, including an LLM model using RAG technology and several integrated sub-models obtained after training the machine learning model with a preprocessed data set.

[0116] Among them, for several integrated sub-models obtained after training the machine learning model with the preprocessed data set, in the data set processing stage, the data set is produced according to the two standards of text semantics and text structure. For example, when producing a data set according to text semantics, all texts in the data set are divided into text paragraphs and their annotations are retained, and the structural features of the text, such as large-scale graphic content, are removed and converted into a unified text paragraph structure. While keeping the text content unchanged, the impact of text layout features on the model is minimized, and paragraphs with obvious semantic features are selected as training data sets. When producing a data set according to text layout, files with significant document layout features are selected as training data sets to reduce the impact of text semantic features on the model.

[0117] Since there are limited ways to obtain sensitive data in the power system data and it greatly involves the internal security issues of the system, it can be predicted that the training data of the machine learning model is extremely limited in quantity. In order to achieve the reliability and stability of the model trained on a limited data set, the present invention adopts the Bagging (Bootstrap Aggregating) ensemble learning method. The Bootstrap method is used to extract samples from the original data set in a limited data set, and multiple small models are obtained by multiple training. Each model will use all the data in different combinations, and the final model evaluation result is the common result of multiple small models.

[0118] See below Figure 2 , Figure 2 A schematic diagram of the structure of an embodiment of the intelligent classification model provided by the embodiment of the present invention.

[0119] For example, five small models (integrated sub-models) are trained from limited data, and the training data of each small model is different. After classification by five small models, if more than three of the small models obtain the same result, the result of the majority of the small models will be used 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 will be classified as sensitive files that cannot be accurately classified by the machine learning model, and further classification should be combined with the output results of the LLM model.

[0120] Among them, different weights should be assigned to multiple integrated sub-models according to their effects on the test set, and the final result should comprehensively consider the evaluation results of each integrated sub-model, thereby improving the stability of the training model of the limited data set. If the results obtained by different models are too scattered, it is impossible to accurately judge the sensitivity level of the initial sensitive file, and the files to be processed need to be classified as manually processed files and then manually processed.

[0121] For the LLM model, the present invention will specify the technical requirements for processing, communication, storage and exchange of power system data, the specific specification documents for relevant data within each department, and the complete, detailed and accurate text description of the layout characteristics of the three types of sensitive files, high, medium and low, as the external knowledge base of the LLM model. From then on, based on the external knowledge base, when classifying the initial sensitive files, the LLM model can refer to the standards within various industries and the structural characteristics of sensitive files of different levels to achieve the classification of the initial sensitive files.

[0122] The present invention classifies the sensitivity levels of initial sensitive files based on a preset intelligent classification model to determine the sensitivity levels of files to be processed, and comprehensively considers the output results of various models, which can effectively improve the stability, reliability and accuracy of the sensitivity level classification of files to be processed.

[0123] Furthermore, in step 104, the file to be processed is encrypted using a corresponding encryption method according to the sensitivity level, including:

[0124] When the sensitivity level is the first level, the national secret algorithm is used to encrypt the files to be processed;

[0125] When the sensitivity level is the second level, considering the data value and encryption cost, the preset encryption technology is used to encrypt the files to be processed;

[0126] When the sensitivity level is the third level, the files to be processed are desensitized to achieve encryption of the files to be processed.

[0127] In this embodiment, when the sensitivity level is the first level, the file to be processed contains high-level sensitive information, wherein the high-level sensitive information may include information such as core control instructions and configuration information of key infrastructure; when the sensitivity level is the second level, the file to be processed contains intermediate-level sensitive information, wherein the intermediate-level sensitive information may involve general operation data and user basic information; when the sensitivity level is the third level, the file to be processed contains low-level sensitive information, wherein the low-level sensitive information may only include a large amount of structured non-critical monitoring data and public information.

[0128] In this embodiment, high-level sensitive information involves core control instructions and configuration information of key infrastructure, so the national secret algorithm is used for encryption to minimize the risk of information leakage; the national secret algorithm includes SM2 algorithm, SM3 algorithm and SM4 algorithm, etc.;

[0129] Compared with high-sensitivity information, the value of medium-sensitivity information is lower, but it still needs to be encrypted accordingly. Therefore, it is necessary to weigh the data value and encryption cost and adopt the appropriate encryption method according to the actual situation;

[0130] Low-level sensitive information contains a large amount of structured data. The value of a single piece of data itself is limited. However, if a large amount of the same type of data is held, data mining and other technologies will still cause risky data leakage such as personal privacy. In addition, the conventional encryption of 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 such data rather than directly encrypting all the content.

[0131] The present invention adopts a corresponding encryption method to encrypt the file to be processed according to the sensitivity level of the file to be processed. Specifically, the national secret algorithm is used to encrypt the file to be processed with a first sensitivity level, and a preset encryption technology is used to encrypt the file to be processed in consideration of data value and encryption cost for the file to be processed with a second sensitivity level, and data desensitization is performed on the file to be processed with a third sensitivity level, thereby realizing the automated processing of file encryption in the data transmission process of the power system, automatically selecting the corresponding encryption method according to the sensitivity level of the file, adopting advanced encryption means for files with high sensitivity levels, and adopting data desensitization methods instead of full encryption for files with low sensitivity levels such as those that may be used for low-sensitivity shared data of other departments, thereby ensuring data availability while protecting user privacy, having strong overall flexibility and high reliability, and not requiring experienced operators to manually select encryption methods throughout the process, and can greatly save computing resources compared to the practice of adopting high-security encryption means for all files.

[0132] Furthermore, the data desensitization of the to-be-processed file is performed to achieve encryption of the to-be-processed file, including:

[0133] Determine the type of data in the file to be processed;

[0134] When the data type in the file to be processed is numerical data, random noise is added to the file to be processed 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 the random noise extracted from the Laplace distribution;

[0137] When the type of data in the file to be processed is non-numeric data, random noise is added to the file to be processed through an exponential mechanism.

[0138] In this embodiment, when the sensitivity level of the file to be processed is the third level, that is, there is a large amount of low-level sensitive information in the file to be processed, centralized differential privacy protection technology is adopted to add random noise, in which two different noise addition mechanisms are adopted for numerical data and non-numerical data.

[0139] For numerical data, the Laplace mechanism is used to add random noise. The noise addition formula is as follows:

[0140] NoiseResult=TrueResult+LaplaceNoise(λ)

[0141] In the above formula, TrueResult is the real data in the file to be processed, LaplaceNoise(λ) is the random noise extracted 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] Among them, Δf is the sensitivity of the query, that is, the absolute value of the maximum change in the query result caused by changing a record in the data set; ∈ is the parameter of differential privacy, which determines the degree of privacy protection. The smaller ∈ is, the stronger the privacy protection is. In this way, the added noise will ensure that the query result meets 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 that it assigns a score to each possible output based on a utility function, and then selects one output from them in a privacy-preserving way. Let D be the dataset, R be all possible outputs, is a utility function that measures the utility of output r under 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 selecting 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 the change of any element in the data set.

[0149] In this embodiment, according to the actual situation of the power system, other suitable data desensitization methods may be selected to desensitize the files to be processed, such as data masking, hashing, randomization, etc.

[0150] When the present invention determines that the sensitivity level of the file to be processed is the third level, the file to be processed is desensitized. Specifically, according to the type of data in the file to be processed, different methods are adopted to add random noise to the file to be processed to achieve data desensitization of the file to be processed. Compared with the method that experienced operators are required to manually select the encryption method throughout the process and all files are encrypted with high security means, differential privacy can be effectively achieved. Even if the attacker obtains the noisy data, it is difficult to infer sensitive information through differential attacks, thereby protecting personal privacy from infringement, realizing automatic and intelligent data encryption, and greatly saving computing resources and human resources.

[0151] Accordingly, in order to solve the above technical problems, an embodiment of the present invention further provides an encryption device for power system data. Figure 3 , which is a structural diagram of an embodiment of an encryption device for power system data provided by the present invention.

[0152] like Figure 3 As shown, the power system data encryption device 20 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 the to-be-processed files and the 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 a corresponding encryption method according to the sensitivity level.

[0157] The present invention also provides a terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the power system data encryption method as described in any one of the above items are implemented.

[0158] The present invention also provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the power system data encryption method as described in any one of the above items are implemented.

[0159] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0160] The present invention determines the sensitivity level of the file to be processed based on a sensitive vector library and a preset intelligent classification model, and adopts a corresponding encryption method to encrypt the file to be processed according to the sensitivity level of the file to be processed, thereby realizing automatic auxiliary processing of encryption of sensitive files in the process of data transmission in the power system, automatically selecting a corresponding encryption method according to the sensitivity level of the file, adopting advanced encryption means for highly sensitive files, and adopting a data desensitization method instead of full encryption for low-sensitivity shared data that may be used for other departments, thereby protecting user privacy while ensuring data availability, having strong overall flexibility and high reliability, and without the need for experienced operators to manually select encryption methods throughout the process, thereby greatly saving computing resources compared to the practice of adopting high-security encryption means for all files.

[0161] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for encrypting power system data, characterized in that: include: Obtain files to be processed and power system data from the power system; Acquire sensitive vector library based on power system data; Determine the sensitivity level of the file to be processed based on the sensitive vector library and the preset intelligent classification model; According to the sensitivity level, the corresponding encryption method is used to encrypt the files to be processed.

2. A method for encrypting power system data according to claim 1, characterized in that: The method of acquiring a sensitive vector library based on power system data includes: Based on the power system data, several segmented words are obtained; Get the TF-IDF values ​​of all word segments; Summarize the words whose TF-IDF values ​​are greater than the preset threshold to obtain a sensitive word library; Vectorize all the words in the sensitive word library to obtain several sensitive vectors; Clustering the plurality of sensitive vectors to obtain K clusters, where K is a preset positive integer; A sensitive vector library is obtained based on K clusters.

3. A method for encrypting power system data as claimed in claim 2, characterized in that: The step of determining the sensitivity level of the file to be processed based on the sensitivity vector library and the preset intelligent classification model includes: Based on the file to be processed, a number of vectors to be processed are obtained; Get K cluster center vectors corresponding to the K clusters; Based on the K cluster center vectors, determine in turn whether each vector to be processed is a classifiable vector; If there is a classifiable vector among the several vectors to be processed, the file to be processed is determined to be an initial sensitive file; Based on the preset intelligent classification model, the initial sensitive files are classified into sensitivity levels to determine the sensitivity level of the files to be processed.

4. A method for encrypting power system data as claimed in claim 3, characterized in that: The step of sequentially judging whether each vector to be processed is a classifiable vector based on the K cluster center vectors includes: Calculate the Euclidean distances between the current vector to be processed and the K cluster center vectors respectively to obtain K initial Euclidean distances; Based on the K initial Euclidean distances, determine the first cluster and obtain the first Euclidean distance; Determine a first sensitive vector in the first cluster that is farthest from the first central vector, and calculate the Euclidean distance between the first sensitive vector and the first central vector to obtain a second Euclidean distance; the first central vector is the cluster central 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, it is determined that the current vector to be processed is a classifiable vector.

5. A method for encrypting power system data as claimed in claim 3, characterized in that: The method of classifying the initial sensitive files into different sensitivity levels based on the preset intelligent classification model to determine the sensitivity level of the files to be processed includes: Considering the text semantic features and text layout features, the initial sensitive files are classified into preliminary sensitivity levels based on several integrated sub-models, and several evaluation results are obtained; According to the performance of each integrated sub-model, different weights are assigned to several integrated sub-models; Obtain a comprehensive evaluation result according to the weight and several evaluation results; When the comprehensive evaluation result does not meet the preset conditions, the sensitivity level of the initial sensitive files is divided based on the preset external knowledge base and LLM model to determine the sensitivity level of the files to be processed.

6. A method for encrypting power system data according to claim 1, characterized in that: According to the sensitivity level, the corresponding encryption method is adopted to encrypt the file to be processed, including: When the sensitivity level is the first level, the national secret algorithm is used to encrypt the files to be processed; When the sensitivity level is the second level, considering the data value and encryption cost, the preset encryption technology is used to encrypt the files to be processed; When the sensitivity level is the third level, the files to be processed are desensitized to achieve encryption of the files to be processed.

7. A method for encrypting power system data as claimed in claim 6, characterized in that: The data desensitization of the to-be-processed file to achieve encryption of the to-be-processed file includes: Determine the type of data in the file to be processed; When the data type in the file to be processed is numerical data, random noise is added to the file to be processed using the following formula: NoiseResult=TrueResult+LaplaceNoise(λ) In the above formula, TrueResult is the data in the file to be processed; LaplaceNoise(λ) is the random noise extracted from the Laplace distribution; When the type of data in the file to be processed is non-numeric data, random noise is added to the file to be processed through an exponential mechanism.

8. A device for encrypting power system data, characterized in that: include: Data acquisition module, vector library construction module, level determination module and file encryption module; Wherein, the data acquisition module is used to acquire the files to be processed and the 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 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; The file encryption module is used to encrypt the file to be processed in a corresponding encryption manner according to the sensitivity level.

9. 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, the steps of the power system data encryption method according to any one of claims 1 to 7 are implemented.

10. A 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 for encrypting power system data as claimed in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Method for detecting sensitive information based on D-S evidence theory

    CN102426599A

  • Large NLP language model privacy protection method based on differential privacy

    CN116502263A

  • Sensitive file identification processing method and system based on clustering model

    CN117610037A

  • Private data full life cycle protection method and system based on data platform

    CN117972779A

  • Power grid data privacy protection and security processing method and system based on encryption protection

    CN118153071A