An energy data acquisition encryption and privacy protection method and system

CN120639286BActive Publication Date: 2026-09-22HUBEI CENT CHINA TECH DEV OF ELECTRIC POWER
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510888025.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2026-09-22
Estimated Expiration
2045-06-30

AI Technical Summary

Technical Problem

现有能源数据采集加密方法存在诸多缺陷,一方面,传统加密密钥生成方式随机性不足、安全性差,容易被破解,导致数据泄露风险高

Benefits of technology

[0028]本发明公开了一种能源数据采集加密与隐私保护方法,该方法通过在电网数据采集定时获取电力线载波通信系统电网频率偏差FREQ,运用哈希函数将不同时间点的偏差信息组合成随机数序列;同时,在数据采集点发送特定脉冲信号获取PLC信道脉冲响应CIR,利用最小均方误差估计算法处理,提取最大脉冲幅度等关键特征作为信道特征值。接着,将随机数序列和信道特征值输入经大量数据训练好的深度强化学习模型,生成加密密钥。最后,基于此密钥采用AES算法加密采集的能源数据,并通过OFDM技术传输,同时还设有自适应安全机制,根据信道特征值变化重新生成密钥。该方法显著提高能源数据采集和传输的安全性与隐私性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120639286B_ABST
    Figure CN120639286B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of artificial intelligence, and discloses an energy data acquisition encryption and privacy protection method and system. The power line carrier communication system power grid frequency deviation FREQ is obtained at the power grid data acquisition timing, and the deviation information at different time points is combined into a random number sequence by using a hash function; a specific pulse signal is sent at the data acquisition point to obtain the PLC channel impulse response CIR, which is processed by using the least mean square error estimation algorithm to extract the maximum pulse amplitude and other key features as channel characteristic values. Then, the random number sequence and the channel characteristic values are input into a deep reinforcement learning model trained by a large amount of historical data to generate an encryption key. Finally, the collected energy data is encrypted based on the key by using the AES algorithm, and is transmitted through the OFDM technology, and an adaptive security mechanism is also provided to regenerate the key according to the change of the channel characteristic values. The method significantly improves the security and privacy of energy data acquisition and transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and more specifically to a method and system for encrypting and protecting the privacy of energy data acquisition. Background Technology

[0002] As the digitalization of the energy industry accelerates, the security and privacy protection of energy data become increasingly critical. Existing energy data acquisition encryption methods have several shortcomings. On the one hand, traditional encryption key generation methods lack randomness and have poor security, making them easily cracked and leading to a high risk of data leakage. On the other hand, in the data transmission stage, the complex characteristics of power line carrier communication channels are not fully utilized, making it impossible to effectively cope with channel variations and ensuring transmission reliability.

[0003] Therefore, improving the security and privacy of energy data collection and transmission is an urgent problem to be solved. Summary of the Invention

[0004] The purpose of this invention is to provide a method, system, medium, and device for encrypting and protecting the privacy of energy data acquisition, so as to at least partially solve the above-mentioned problems.

[0005] According to one aspect of this disclosure, a method for encrypting and protecting the privacy of energy data acquisition is proposed, comprising:

[0006] Extract the power grid frequency deviation (FREQ) in the power line carrier PLC communication system, and use the FREQ as a random number source to generate a random number sequence based on the random number source.

[0007] Obtain the impulse response CIR of the power line carrier PLC communication channel, and calculate the channel characteristic value based on the impulse response CIR;

[0008] The random number sequence and the channel feature values ​​are input into a trained deep Q-network model to generate an encryption key. Specifically, the random number sequence and the channel feature values ​​are preprocessed, including normalizing both the random number sequence and the channel feature values, and then fusing the normalized random number sequence and the channel feature values ​​as the current state. The current state The input layer of the model is fed into the input layer, and multiple hidden layers undergo nonlinear processing and multi-layer feature extraction. Finally, the output layer outputs the Q value of each action in the corresponding action space, and the selected actions are combined to generate an encryption key.

[0009] The collected energy data is encrypted and transmitted over power lines based on the encryption key.

[0010] Optionally, the method further includes using the frequency deviation FREQ as a random number source and generating a random number sequence based on the random number source, specifically, using the frequency deviation information obtained at different time points as a random number source and using a hash function to generate the random number sequence.

[0011] Optionally, the method further includes obtaining the impulse response CIR of the power line carrier PLC communication channel and obtaining channel feature values. Specifically, the received signal is processed using minimum mean square error estimation to obtain the impulse response CIR, and several key features are extracted from the obtained CIR to form channel feature values. The channel feature values ​​include at least the maximum pulse amplitude, pulse interval, and delay spread time.

[0012] Optionally, the method further includes determining whether the channel feature value exceeds a preset threshold; if not, generating an encryption key based on the channel feature value and the random number sequence.

[0013] If so, reacquire the second impulse response of the communication channel and calculate the second channel characteristic value based on the second impulse response, and / or, re-extract the second power grid frequency deviation and use it as a random number source to regenerate the second random number sequence.

[0014] The encryption key is regenerated based on the channel feature value and the second random number sequence, or based on the second channel feature value and the second random number sequence, or based on the second channel feature value and the random number sequence.

[0015] Optionally, the method further includes determining whether the channel feature value exceeds a preset threshold, which includes periodically evaluating the security level of the communication channel based on historical channel feature value data of the current communication channel, and adjusting the preset threshold based on the security level. The periodic evaluation of the security level of the communication channel includes determining the security level of the communication channel based on the proportion of historical channel feature values ​​exceeding the preset threshold. Adjusting the preset threshold based on the security level includes setting a lower preset threshold for a higher security level and a higher preset threshold for a lower security level.

[0016] Optionally, the method further includes, during OFDM modulation transmission, dynamically selecting the subcarrier least affected by the channel response to carry encrypted data, while the remaining subcarriers transmit interference signals.

[0017] According to another aspect of this disclosure, an energy data acquisition encryption and privacy protection system is proposed, comprising:

[0018] The first generation unit is used to extract the power grid frequency deviation FREQ in the power line carrier PLC communication system, and use the frequency deviation FREQ as a random number source to generate a random number sequence based on the random number source.

[0019] The acquisition unit is used to acquire the impulse response (CIR) of the power line carrier PLC communication channel and calculate the channel characteristic value based on the impulse response (CIR).

[0020] The second generation unit is used to input the random number sequence and the channel feature values ​​into a trained deep Q-network model to generate an encryption key. This includes preprocessing the random number sequence and the channel feature values, wherein the preprocessing includes normalizing both the random number sequence and the channel feature values, and fusing the normalized random number sequence and the channel feature values ​​as the current state. The current state The input layer of the model is fed into the input layer, and multiple hidden layers undergo nonlinear processing and multi-layer feature extraction. Finally, the output layer outputs the Q value of each action in the corresponding action space, and the selected actions are combined to generate an encryption key.

[0021] An encryption and transmission unit is used to encrypt the collected energy data based on the encryption key and to transmit it on the power line.

[0022] Optionally, the system further includes a third generation unit, used to determine whether the channel feature value exceeds a preset threshold; if not, to generate an encryption key based on the channel feature value and the random number sequence.

[0023] If so, reacquire the second impulse response of the communication channel and calculate the second channel characteristic value based on the second impulse response, and / or, re-extract the second power grid frequency deviation and use it as a random number source to regenerate the second random number sequence.

[0024] The encryption key is regenerated based on the channel feature value and the second random number sequence, or based on the second channel feature value and the second random number sequence, or based on the second channel feature value and the random number sequence.

[0025] Optionally, the system also includes a dynamic selection unit, used to dynamically select the subcarrier least affected by the channel response for encrypted data transmission when transmitting via OFDM modulation, while the remaining subcarriers transmit interference signals.

[0026] This disclosure also provides a computer-readable storage medium storing a computer program that, when executed by a processor, performs the steps described in any of the above embodiments.

[0027] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the steps of the method described in any of the above embodiments by calling the computer program stored in the memory.

[0028] This invention discloses a method for encrypting and protecting the privacy of energy data acquisition. The method involves periodically acquiring the power line carrier communication system's frequency deviation (FREQ) during power grid data acquisition, and using a hash function to combine the deviation information from different time points into a random number sequence. Simultaneously, a specific pulse signal is sent at the data acquisition point to obtain the PLC channel impulse response (CIR), which is then processed using a minimum mean square error estimation algorithm to extract key features such as the maximum pulse amplitude as channel feature values. Next, the random number sequence and channel feature values ​​are input into a deep reinforcement learning model trained on a large amount of data to generate an encryption key. Finally, based on this key, the acquired energy data is encrypted using the AES algorithm and transmitted via OFDM technology. An adaptive security mechanism is also included to regenerate the key based on changes in the channel feature values. This method significantly improves the security and privacy of energy data acquisition and transmission. Attached Figure Description

[0029] Figure 1 This is a schematic diagram of an energy data acquisition encryption and privacy protection method provided in an embodiment of this application;

[0030] Figure 2 A schematic diagram of an energy data acquisition encryption and privacy protection system provided in this application embodiment;

[0031] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0032] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings. It should be noted that these descriptions are for the purpose of aiding understanding the present invention, but do not constitute a limitation thereof. Furthermore, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0033] It should be noted that in this application, the terms "first," "second," and various numerical designations are used for ease of description and are not intended to limit the scope of the embodiments of this application. For example, they may distinguish different classification results, rather than describing a specific order or sequence. It should be understood that such described objects can be interchanged where appropriate to describe solutions other than those in the embodiments of this application.

[0034] Specifically, Figure 1This diagram illustrates a detailed implementation flowchart of an energy data acquisition encryption and privacy protection method according to an embodiment of this application. Please refer to... Figure 1 The method for encryption and privacy protection of energy data acquisition provided in this application has the following specific steps:

[0035] S101, extract the power grid frequency deviation (FREQ) in the power line carrier (PLC) communication system, use the frequency deviation FREQ as a random number source, and generate a random number sequence based on the random number source.

[0036] In this embodiment, taking an industrial park as an example, the energy management center of the industrial park needs to collect data from distributed meters and sensors in real time. Specialized power grid frequency monitoring equipment is installed at key nodes of the industrial park's power system, such as entrances and substations, and power line carrier PLC communication technology is used for data transmission. These devices have the ability to monitor the power grid frequency in the power line carrier communication system in real time; for example, their acquisition accuracy can reach 0.01Hz. Every minute, the acquisition device acquires the power grid frequency and compares the result with a standard frequency (such as 50Hz or 60Hz, depending on the region) to calculate the frequency deviation (FREQ). For example, at a certain moment, the acquisition device measures the power grid frequency as 50.03Hz. Compared with the standard frequency of 50Hz, the frequency deviation (FREQ) is 50.03 - 50 = 0.03Hz. To ensure the accuracy and reliability of the data, each measurement point is acquired five times consecutively, and the average value is taken as the final frequency deviation value.

[0037] Furthermore, the SHA-256 hash function (a 256-bit version of the Secure Hash Algorithm) is used to combine the frequency deviation information obtained at different time points into a random number sequence. First, the frequency deviation value obtained each time is converted into string form and then concatenated in chronological order. For example, within 10 minutes, 10 frequency deviation values ​​were obtained: 0.03Hz, 0.01Hz, 0.02Hz, 0.05Hz, 0.01Hz, 0.04Hz, 0.02Hz, 0.03Hz, 0.06Hz, and 0.04Hz.

[0038] Then, this concatenated string is used as input to the SHA-256 hash function. After hashing, a 256-bit hash value is obtained. This hash value is then converted into a random number sequence containing 32 elements according to certain rules (such as converting every 8 bits to a decimal number). For example, the first 8 bits of the hash value "10101010" are converted to the decimal number 170, and so on, resulting in a random number sequence like [170,23,45,120,78,90,111,222,33,44,55,66,77,88,99,100,110,120,130,140,150,160,170,180,190,200,210,220,230,240,250,255].

[0039] S102, obtain the impulse response CIR of the power line carrier PLC communication channel, and calculate the channel characteristic value based on the impulse response CIR.

[0040] In this embodiment, several representative data acquisition points (such as power distribution boxes in five different areas of the factory) are selected within the industrial park, and a PLC communication channel impulse response acquisition device is installed at each acquisition point. These devices acquire the impulse response (CIR) of the PLC communication channel by sending a specific pulse signal to the power line and then receiving the reflected signal. Due to the complex characteristics of power line channels, such as noise and multipath propagation, the received signal will be distorted and delayed. The acquisition device records the time difference between sending the signal and receiving the reflected signal, as well as the amplitude change of the received signal. For example, at a certain data acquisition point, after sending the signal, the reflected signal is received after 5 microseconds, and the amplitude of the received signal is 0.8 volts. The received signal is processed using the minimum mean square error (MMSE) channel estimation algorithm to obtain the impulse response CIR. The MMSE algorithm continuously adjusts the estimated value to minimize the mean square error between the estimated value and the actual value.

[0041] In this embodiment, the received signal is compared with the transmitted known signal, and the true impulse response is gradually approximated through iterative calculation. Assuming that after multiple iterations, the obtained impulse response CIR is a sequence containing 10 elements, such as [0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0], this sequence represents the channel's response to the signal at different time points. Several key features are extracted from the obtained CIR to form channel feature values. At least three key features are extracted: maximum impulse amplitude, impulse interval, and delay spread time. For example, in this embodiment...

[0042] Maximum pulse amplitude: In the CIR sequence above, the maximum value is found by comparing the values ​​of each element. For example, in [0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0], the maximum pulse amplitude is 1.0.

[0043] Pulse interval: Calculates the time interval between adjacent pulses. Assuming that in a CIR sequence, the time interval between the first and second pulses is 1 microsecond, the time interval between the second and third pulses is 2 microseconds, and so on, we obtain a pulse interval sequence [1,2,3,4,5,6,7,8,9]. Then, we perform statistical analysis on this sequence, such as calculating the mean and standard deviation, to obtain the characteristic values ​​of the pulse intervals. Assuming the mean pulse interval is 5 microseconds and the standard deviation is 2 microseconds.

[0044] Delay spread time: The delay spread time is determined by analyzing the signal delay in the CIR sequence. For example, if the time from transmitting the signal to receiving the first valid reflected signal is 3 microseconds, and the time to receiving the last valid reflected signal is 10 microseconds, then the delay spread time is 10 - 3 = 7 microseconds.

[0045] S103, input the random number sequence and the channel feature value into the trained deep Q-network model to generate an encryption key. Specifically, preprocess the random number sequence and the channel feature value, including normalizing the random number sequence and the channel feature value respectively, and fusing the normalized random number sequence and the channel feature value as the current state. The current state The input layer of the model is fed into multiple hidden layers, which undergo nonlinear processing and multi-layer feature extraction. Finally, the output layer outputs the Q value of each action in the corresponding action space, and the selected actions are combined to generate an encryption key.

[0046] In this embodiment, for example, the deep reinforcement learning model adopts a deep Q-network (DQN) architecture. The random number sequence generated in step S101 and the channel feature values ​​obtained in step S102 are input into the trained deep reinforcement learning model according to the format required by the model. The model first performs feature extraction and processing on the input data, and then outputs an encryption key of a predetermined length through the calculation of a multi-layer neural network. The number of bits of the encryption key can be determined based on the encryption standard adopted, and this embodiment does not limit it. In one embodiment, the number of bits of the encryption key is, for example, 128 bits. It can be understood that multiple hidden layers learn the mapping relationship between the input state and subsequent actions (i.e., the key generation strategy) through nonlinear processing and multi-layer feature extraction processing, and through the trained hyperparameters. For example, the mapping relationship can be that each action can be regarded as a part of the key generation decision. For example, for each bit of the key, the action output by the network may correspond to the choice of "0" or "1", and then the output is integrated, that is, all the selected actions are combined to obtain the final encryption key.

[0047] For ease of understanding, the main parts of the deep Q-network model will be briefly introduced below. It is understood that the deep Q-network model is a conventional model in this field.

[0048] Specifically, the network structure of a deep Q-network model can be such that the model input is the current state. For example, the current state can be a fusion of a normalized random number sequence and channel features. A common fusion method is to concatenate the normalized random number sequence and channel features into a new feature vector. It is understood that other fusion methods can also be used, and this embodiment does not impose any restrictions. The input fused feature vector is processed through several fully connected layers or convolutional layers to extract abstract representations. The last layer outputs the Q value of each action in the corresponding action space.

[0049] The model initialization process includes initializing network parameters (weights) to random values, establishing the target network, replicating the initial parameters of the autonomous Q network, and configuring an experience replay buffer to store transition samples of states, actions, rewards, and the next state.

[0050] In one embodiment, based on the above network structure and initialization process, the model training process includes:

[0051] Data is collected from the power grid and PLC channels to construct the initial state. Employing an ε-greedy strategy: The probability of randomly selecting an action (exploration); The probability of selecting the action with the maximum Q value (utilization) is based on the selected action. Each action can be viewed as part of the key generation decision. For example, for each bit of the key, the action output by the network might correspond to a choice of "0" or "1". By combining all the selected actions, the model generates partial parameters of the encryption key or directly outputs the complete key. The system performs a security assessment based on the output key: if the key meets the requirements of randomness, attack resistance, and synchronization consistency, the system receives a positive reward. Otherwise, a negative reward will be given.

[0052] State Update: After a certain sampling period, the system re-acquires random input and channel characteristics to form a new state. Next, The data is stored in an experience replay buffer. A small batch of samples is randomly sampled from the buffer periodically to avoid the correlation between samples affecting training stability. Loss calculation: The mean squared error (MSE) loss function is used to calculate the error between the current Q value and the target Q value. Stochastic gradient descent (SGD) or Adam optimizer is used to update the parameters of the main network, so that the loss function gradually decreases. Every certain number of training steps, the parameters of the main network are copied to the target network to improve training stability. The above steps are repeated until the model's policy converges, that is, the output encryption key meets the preset security, randomness and consistency standards in multiple tests.

[0053] Meanwhile, considering that channel characteristics and power grid conditions may change dynamically in the actual environment, the model can be set with an online fine-tuning mechanism. This mechanism continuously collects new data, updates the replay buffer, and retrains periodically to maintain the accuracy and robustness of the mapping relationship. This embodiment will not elaborate further.

[0054] S104, encrypt the collected energy data based on the encryption key and transmit it on the power line.

[0055] In some embodiments, the energy data collected by the data acquisition point, including electricity, voltage, current, power factor, etc., is encrypted using the encryption key generated in step S103, exemplarily employing the Advanced Encryption Standard (AES) algorithm. The AES algorithm is a symmetric encryption algorithm characterized by high efficiency and security.

[0056] Assuming a set of electricity consumption data is collected in the amount of 1000 kWh, it is converted into binary data and then input into the AES encryption algorithm along with a 128-bit encryption key. After processing by the encryption algorithm, a string of ciphertext data is obtained. The encrypted ciphertext data is then transmitted to the data center via a power line carrier communication system. For example, during transmission, Orthogonal Frequency Division Multiplexing (OFDM) technology can be used to divide the data into multiple subcarriers for transmission, thereby improving transmission reliability and anti-interference capabilities.

[0057] In some possible embodiments, preferably, the encrypted ciphertext data is divided into multiple subcarriers for transmission, with each subcarrier carrying a portion of the data. Simultaneously, based on the real-time channel status, the subcarrier least affected by the channel response is dynamically selected to carry the encrypted data, while the remaining subcarriers transmit interference signals. This approach further enhances the security of data transmission, preventing data theft and decryption.

[0058] In some embodiments, changes in channel characteristic values ​​are continuously monitored during data transmission. Every certain time interval (e.g., 5 minutes), the impulse response (CIR) of the power line carrier PLC communication channel is reacquired, and new channel characteristic values ​​are obtained. These newly acquired channel characteristic values ​​are compared with preset thresholds. The preset thresholds can be determined based on practical application experience; for example, the preset threshold for maximum pulse amplitude is 1.2, the threshold for average pulse interval is 8 microseconds, and the threshold for delay spread time is 10 microseconds. If, in the newly acquired channel characteristic values, the maximum pulse amplitude exceeds 1.2, the average pulse interval exceeds 8 microseconds, or the delay spread time exceeds 10 microseconds, the channel characteristic value is determined to exceed the preset threshold.

[0059] When the channel feature value exceeds the preset threshold, it indicates that the current communication channel is relatively complex. In order to further enhance the security of the generated key, the feature value of the communication channel is re-acquired according to step S102 until the feature value is less than the preset threshold, and / or the random number sequence is regenerated according to step S101. Based on the regenerated communication channel feature and the regenerated random sequence, or at least one of them, the encryption key is regenerated according to the method in step S103.

[0060] Furthermore, the preset threshold is dynamically adjusted based on the security level of the current periodic communication channel. For example, the security level of the communication channel is determined based on the historical channel characteristic value data of the current communication channel, such as the proportion of cases where the historical channel characteristic value of the current communication channel exceeds the preset threshold. The higher the security level, the lower the preset threshold, and the lower the security level, the higher the preset threshold.

[0061] Simultaneously, considering the time-varying characteristics of the channel and its changing trends and patterns, the method for generating random number sequences is appropriately adjusted to avoid the risk of leakage caused by long-term fixed keys. For example, when regenerating random number sequences, the frequency of frequency deviation acquisition is increased from once per minute to once every 30 seconds to obtain more real-time frequency deviation information, thereby generating more random and adaptable random number sequences.

[0062] In this embodiment, a deep reinforcement learning model based on DQN establishes a nonlinear mapping relationship from random inputs (grid frequency deviation and PLC channel characteristic values) to encrypted key output. This process combines exploration (ε-greedy strategy), experience replay, and target network update mechanism, providing security for the encrypted transmission and privacy protection of the collected energy data.

[0063] In the entire process of this disclosed method, the random number sequence and channel characteristics together constitute the system's state information. The trained deep Q-network learns the optimal key generation strategy using the input features. The Q-value obtained through forward propagation guides the choice of actions, thereby generating an encryption key with high randomness and environment dependence. This disclosure not only leverages the advantages of deep reinforcement learning in complex decision-making problems but also combines the physical characteristics of the wireless channel. By combining the channel characteristics of the physical layer with random numbers, the generated key exhibits environment dependence and high randomness. Even if an attacker eavesdrops on the communication link, it is difficult to reconstruct the key information, thereby improving the security of the communication system and protecting user privacy.

[0064] Corresponding to the above embodiment, an energy data acquisition encryption and privacy protection method, Figure 2 This diagram illustrates a structural block diagram of an energy data acquisition encryption and privacy protection system provided in an embodiment of this application. For ease of explanation, only the parts relevant to the embodiments of this application are shown.

[0065] See Figure 2 As shown in the figure, an energy data acquisition encryption and privacy protection system 200 provided in this application embodiment includes:

[0066] The first generation unit is used to extract the frequency deviation FREQ of the power grid in the power line carrier PLC communication system, and use the frequency deviation FREQ as a random number source to generate a random number sequence based on the random number source.

[0067] The acquisition unit is used to acquire the impulse response (CIR) of the PLC communication channel of the power line carrier PLC, and to calculate and acquire the channel characteristic value based on the impulse response (CIR).

[0068] The second generation unit is used to input the random number sequence and the channel feature values ​​into a trained deep Q-network reinforcement learning model to generate an encryption key; specifically, it preprocesses the random number sequence and the channel feature values, the preprocessing including normalizing the random number sequence and the channel feature values ​​respectively, and fusing the normalized random number sequence and the channel feature values ​​as the current state. The current state The input layer of the model is fed into the input layer, and multiple hidden layers undergo nonlinear processing and multi-layer feature extraction. Finally, the output layer outputs the Q value of each action in the corresponding action space, and the selected actions are combined to generate an encryption key.

[0069] An encryption and transmission unit is used to encrypt the collected energy data based on the encryption key and to transmit it on power lines.

[0070] Optionally, the system further includes a third generation unit, used to determine whether the channel feature value exceeds a preset threshold; if not, to generate an encryption key based on the channel feature value and the random number sequence.

[0071] If so, reacquire the second impulse response of the communication channel and calculate the second channel characteristic value based on the second impulse response, and / or, re-extract the second power grid frequency deviation and use it as a random number source to regenerate the second random number sequence.

[0072] The encryption key is regenerated based on the channel feature value and the second random number sequence, or based on the second channel feature value and the second random number sequence, or based on the second channel feature value and the random number sequence.

[0073] Optionally, the system also includes a dynamic selection unit, used to dynamically select the subcarrier least affected by the channel response for encrypted data transmission when transmitting via OFDM modulation, while the remaining subcarriers transmit interference signals.

[0074] Accordingly, embodiments of this application also provide an electronic device, which can be a terminal or a server. For example... Figure 3 As shown, Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. For ease of explanation, only the parts related to the embodiments of this application are shown.

[0075] The electronic device 300 includes a processor 301 with one or more processing cores, a memory 302 with one or more computer-readable storage media, and a computer program stored in the memory 302 and executable on the processor. The processor 301 and the memory 302 are electrically connected. Those skilled in the art will understand that the electronic device structure shown in the figures does not constitute a limitation on the electronic device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0076] The processor 301 is the control center of the electronic device 300. It connects various parts of the electronic device 300 through various interfaces and lines. By running or loading software programs (computer programs) and / or units stored in the memory 302, and calling data stored in the memory 302, it performs various functions of the electronic device 300 and processes data, thereby monitoring the electronic device 300 as a whole.

[0077] In this embodiment, the processor 301 in the electronic device 300 loads the instructions corresponding to the processes of one or more applications into the memory 302 according to the following steps, and the processor 301 runs the applications stored in the memory 302 to realize various functions:

[0078] Extract the frequency deviation (FREQ) of the power grid in the power line carrier communication system and generate a random number sequence;

[0079] Obtain the impulse response (CIR) of the power line carrier communication PLC channel and acquire the channel characteristic values;

[0080] The random number sequence and the channel feature values ​​are input into a trained deep reinforcement learning model to generate an encryption key;

[0081] The collected energy data is encrypted and transmitted based on the encryption key.

[0082] For details on the specific implementation of each of the above operations, please refer to the aforementioned embodiments, which will not be repeated here.

[0083] Optional, such as Figure 3 As shown, the electronic device 300 further includes: a protection module 303, a communication module 304, an input unit 305, and a power supply 306. The processor 301 is electrically connected to the protection module 303, the communication module 304, the input unit 305, and the power supply 306. Those skilled in the art will understand that... Figure 3 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0084] The protection module 303 can be used for energy data acquisition encryption and privacy protection.

[0085] The communication module 304 can be used to communicate with other devices.

[0086] The input unit 305 can be used to receive input numbers, characters, or user characteristic information (such as fingerprints, iris, facial information, etc.), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.

[0087] Power supply 306 is used to supply power to various components of electronic device 300. Optionally, power supply 306 can be logically connected to processor 301 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. Power supply 306 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0088] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0089] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0090] Therefore, embodiments of this application provide a computer-readable storage medium storing multiple computer programs that can be loaded by a processor to execute the steps of an energy data acquisition encryption and privacy protection method provided in embodiments of this application.

[0091] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0092] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0093] Since the computer program stored in the storage medium can execute the steps in any of the energy data acquisition encryption and privacy protection methods provided in the embodiments of this application, the beneficial effects of any of the energy data acquisition encryption and privacy protection methods provided in the embodiments of this application can be achieved. For details, please refer to the previous embodiments, which will not be repeated here.

[0094] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0095] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0096] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0097] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings, but the present invention is not limited to the described embodiments. For those skilled in the art, various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present invention, and these variations still fall within the protection scope of the present invention.

Claims

1. A method for encrypting and protecting the privacy of energy data acquisition, characterized in that, include: Extract the power grid frequency deviation (FREQ) in the power line carrier PLC communication system, and use the FREQ as a random number source to generate a random number sequence based on the random number source. Obtain the impulse response CIR of the power line carrier PLC communication channel, and calculate the channel characteristic value based on the impulse response CIR; The random number sequence and the channel feature values ​​are input into a trained deep Q-network model to generate an encryption key; Specifically, the random number sequence and the channel feature value are preprocessed. The preprocessing includes normalizing the random number sequence and the channel feature value respectively, fusing the normalized random number sequence and the channel feature value to obtain the current state, inputting the current state into the input layer of the model, performing nonlinear processing and multi-layer feature extraction on multiple hidden layers, and finally outputting the Q value of each action in the corresponding action space through the output layer, and combining the selected actions to generate an encryption key. The training process of the deep Q network model includes: performing a security evaluation based on the output key: if the key meets the requirements of randomness, anti-attack, and synchronization consistency, the system receives a positive reward; otherwise, a negative reward is given. The current state, selected action, reward, and next state are stored in an experience replay buffer, and a small batch of samples is randomly sampled from the buffer periodically for training until the output encryption key meets the preset security, randomness, and consistency standards in multiple tests. The collected energy data is encrypted and transmitted over power lines based on the encryption key.

2. The method for encrypting and protecting the privacy of energy data acquisition according to claim 1, characterized in that, The method further includes: The step of using the frequency deviation FREQ as a random number source and generating a random number sequence based on the random number source specifically involves using the frequency deviation information obtained at different time points as a random number source and generating the random number sequence using a hash function.

3. The method for encrypting and protecting the privacy of energy data acquisition according to any one of claims 1, characterized in that, The method further includes: The acquisition of the impulse response (CIR) of the power line carrier PLC communication channel and the acquisition of channel feature values ​​specifically involves processing the received signal using minimum mean square error estimation to obtain the impulse response (CIR), and extracting several key features from the obtained CIR to form channel feature values. The channel feature values ​​include at least the maximum pulse amplitude, pulse interval, and delay spread time.

4. The method for encrypting and protecting the privacy of energy data acquisition according to claim 1, characterized in that, The method further includes: Determine whether the channel feature value exceeds a preset threshold; if not, generate an encryption key based on the channel feature value and the random number sequence. If so, reacquire the second impulse response of the communication channel and calculate the second channel characteristic value based on the second impulse response, and / or, re-extract the second power grid frequency deviation and use it as a random number source to regenerate the second random number sequence. The encryption key is regenerated based on the channel feature value and the second random number sequence, or based on the second channel feature value and the second random number sequence, or based on the second channel feature value and the random number sequence.

5. The method for encrypting and protecting the privacy of energy data acquisition according to claim 4, characterized in that, The method further includes: The step of determining whether the channel characteristic value exceeds a preset threshold includes periodically evaluating the security level of the communication channel based on historical channel characteristic value data of the current communication channel, and adjusting the preset threshold based on the security level. The periodic assessment of the security level of the communication channel includes determining the security level of the communication channel based on the proportion of historical channel characteristic values ​​exceeding a preset threshold. The step of adjusting the preset threshold based on the security level includes the following: the higher the security level, the lower the preset threshold, and the lower the security level, the higher the preset threshold.

6. The method for encrypting and protecting the privacy of energy data acquisition according to claim 5, characterized in that, The method further includes: When transmitting via OFDM modulation, the subcarrier least affected by the channel response is dynamically selected to carry encrypted data, while the remaining subcarriers transmit interference signals.

7. An energy data acquisition encryption and privacy protection system, characterized in that, include: The first generation unit is used to extract the power grid frequency deviation FREQ in the power line carrier PLC communication system, and use the frequency deviation FREQ as a random number source to generate a random number sequence based on the random number source. The acquisition unit is used to acquire the impulse response (CIR) of the power line carrier PLC communication channel and calculate the channel characteristic value based on the impulse response (CIR). The second generation unit is used to input the random number sequence and the channel feature value into the trained deep Q network model to generate an encryption key; Specifically, the random number sequence and the channel feature value are preprocessed. The preprocessing includes normalizing the random number sequence and the channel feature value respectively, fusing the normalized random number sequence and the channel feature value as the current state, inputting the current state into the input layer of the model, performing nonlinear processing and multi-layer feature extraction on multiple hidden layers, and finally outputting the Q value of each action in the corresponding action space through the output layer, and combining the selected actions to generate an encryption key. The training process of the deep Q network model includes: performing a security evaluation based on the output key: if the key meets the requirements of randomness, anti-attack, and synchronization consistency, the system receives a positive reward; otherwise, a negative reward is given. The current state, selected action, reward, and next state are stored in an experience replay buffer, and a small batch of samples is randomly sampled from the buffer periodically for training until the output encryption key meets the preset security, randomness, and consistency standards in multiple tests. An encryption and transmission unit is used to encrypt the collected energy data based on the encryption key and to transmit it on the power line.

8. The energy data acquisition encryption and privacy protection system according to claim 7, characterized in that, The system also includes, The third generation unit is used to determine whether the channel feature value exceeds a preset threshold. If not, it generates an encryption key based on the channel feature value and the random number sequence. If so, reacquire the second impulse response of the communication channel and calculate the second channel characteristic value based on the second impulse response, and / or, re-extract the second power grid frequency deviation and use it as a random number source to regenerate the second random number sequence. The encryption key is regenerated based on the channel feature value and the second random number sequence, or based on the second channel feature value and the second random number sequence, or based on the second channel feature value and the random number sequence.

9. A computer-readable storage medium storing a computer program, characterized in that: The computer program is executed by the processor to perform the method as described in any one of claims 1-6.

10. An electronic device, characterized in that: The method includes a memory storing executable program code and a processor coupled to the memory; wherein the processor invokes the executable program code stored in the memory to perform the method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Random number generation device and method

    CN112912838A

  • Wireless physical layer key generation technology based on neural network model

    CN114430550A