Energy data acquisition encryption and privacy protection method and system
By using the grid frequency deviation and channel impulse response to generate encryption keys in the power line carrier communication system, combined with the deep Q network model and the AES algorithm, the problems of insufficient security and adaptability to channel changes of traditional encryption methods are solved, and high-security and privacy data transmission is achieved.
Patent Information
- Application Number
- CN202510888025.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-30
- Publication Date
- 2025-09-12
AI Technical Summary
Among the existing energy data collection encryption methods, the traditional encryption key generation method is not secure enough and is easy to crack. In addition, the power line carrier communication channel is not fully utilized and cannot effectively respond to channel changes, making it difficult to ensure the reliability of data transmission.
The grid frequency deviation FREQ of the power line carrier PLC communication system is used as a random number source, combined with the channel impulse response CIR, and an encryption key is generated through a deep Q network model. The AES algorithm is used to encrypt data, combined with OFDM technology for transmission, and an adaptive security mechanism is set up to regenerate the key according to the change of channel eigenvalues.
It significantly improves the security and privacy of energy data collection and transmission, and enhances the reliability and anti-attack capability of data transmission.
Smart Images

Figure CN120639286A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method and system for energy data collection, encryption, and privacy protection. Background Art
[0002] As the digitalization of the energy industry accelerates, the security and privacy of energy data are becoming increasingly critical. Existing encryption methods for energy data collection suffer from numerous flaws. For one thing, traditional encryption key generation methods lack randomness and security, making them susceptible to cracking and leading to a high risk of data leakage. Furthermore, data transmission fails to fully utilize the complex characteristics of power line carrier communication channels, making it difficult to effectively cope with channel variations and ensuring transmission reliability.
[0003] Therefore, how to improve the security and privacy of energy data collection and transmission is an urgent problem to be solved. Summary of the Invention
[0004] The object of the present invention is to provide a method, system, medium and device for energy data collection encryption and privacy protection, so as to at least partially solve the above problems.
[0005] According to one aspect of the present disclosure, a method for energy data collection encryption and privacy protection is proposed, comprising:
[0006] Extracting a grid frequency deviation FREQ in a power line carrier PLC communication system, using the frequency deviation FREQ as a random number source, and generating a random number sequence based on the random number source;
[0007] Obtaining an impulse response CIR of a power line carrier (PLC) communication channel, and calculating a channel characteristic value based on the impulse response CIR;
[0008] The random number sequence and the channel characteristic value are input into the trained deep Q network model to generate an encryption key; specifically, the random number sequence and the channel characteristic value are preprocessed, and the preprocessing includes normalizing the random number sequence and the channel characteristic value respectively, fusing the normalized random number sequence and the channel characteristic value as the current state , the current state The input is fed into the input layer of the model, and multiple hidden layers are processed through nonlinear processing and multi-layer feature extraction. Finally, the Q value of each action in the corresponding action space is output through the output layer, and the selected actions are combined to generate the encryption key;
[0009] The collected energy data is encrypted based on the encryption key and transmitted on the power line.
[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 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 also includes obtaining the pulse response CIR of the power line carrier PLC communication channel and obtaining the channel characteristic value, specifically, processing the received signal using minimum mean square error estimation to obtain the pulse response CIR, and extracting several key features from the obtained CIR to form the channel characteristic value, wherein the channel characteristic value includes at least the maximum pulse amplitude, pulse interval, and delay extension time.
[0012] Optionally, the method further includes determining whether the channel characteristic value exceeds a preset threshold, and if not, generating an encryption key based on the channel characteristic value and the random number sequence,
[0013] If yes, 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 grid frequency deviation and use it as a random number source to regenerate the second random number sequence,
[0014] And regenerate an encryption key based on the channel characteristic value and the second random number sequence, or based on the second channel characteristic value and the second random number sequence, or based on the second channel characteristic value and the random number sequence.
[0015] Optionally, the method also includes determining whether the channel characteristic value exceeds a preset threshold, including 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, wherein 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 situations in which the historical channel characteristic value of the current communication channel exceeds the preset threshold, and adjusting the preset threshold based on the security level includes, the higher the security level, the lower the corresponding preset threshold, and the lower the security level, the higher the corresponding preset threshold.
[0016] Optionally, the method further includes, when transmitting via OFDM modulation, dynamically selecting a subcarrier least affected by the channel response to carry encrypted data, and the remaining subcarriers to transmit interference signals.
[0017] According to another aspect of the present disclosure, an energy data collection encryption and privacy protection system is proposed, comprising:
[0018] A first generating unit is configured to extract a grid frequency deviation FREQ in a 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;
[0019] An acquisition unit, configured to acquire an impulse response CIR of a power line carrier (PLC) communication channel, and calculate a channel characteristic value based on the impulse response CIR;
[0020] The second generating unit is used to input the random number sequence and the channel characteristic value into the trained deep Q network model to generate an encryption key, including preprocessing the random number sequence and the channel characteristic value, the preprocessing including normalizing the random number sequence and the channel characteristic value respectively, and fusing the normalized random number sequence and the channel characteristic value as the current state , the current state The input is fed into the input layer of the model, and multiple hidden layers are processed through nonlinear processing and multi-layer feature extraction. Finally, the Q value of each action in the corresponding action space is output through the output layer, and the selected actions are combined to generate the encryption key;
[0021] The encryption and transmission unit is used to encrypt the collected energy data based on the encryption key and transmit it on the power line.
[0022] Optionally, the system further includes a third generating unit configured to determine whether the channel characteristic value exceeds a preset threshold, and if not, to generate an encryption key based on the channel characteristic value and the random number sequence,
[0023] If yes, 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 grid frequency deviation and use it as a random number source to regenerate the second random number sequence,
[0024] And regenerate an encryption key based on the channel characteristic value and the second random number sequence, or based on the second channel characteristic value and the second random number sequence, or based on the second channel characteristic value and the random number sequence.
[0025] Optionally, the system further includes a dynamic selection unit configured to dynamically select a subcarrier least affected by a channel response to carry encrypted data when transmitting via OFDM modulation, and to use the remaining subcarriers to transmit interference signals.
[0026] The present disclosure further provides a computer-readable storage medium storing a computer program, wherein the computer program is executed by a processor to execute the steps of the method described in any of the above embodiments.
[0027] An embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein 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] The present invention discloses a method for energy data collection encryption and privacy protection. The method obtains the power line carrier communication system power grid frequency deviation FREQ at the time of power grid data collection, and uses a hash function to combine the deviation information at different time points into a random number sequence; at the same time, a specific pulse signal is sent at the data collection point to obtain the PLC channel impulse response CIR, and the minimum mean square error estimation algorithm is used to process it, and key features such as the maximum pulse amplitude are extracted as channel eigenvalues. Then, the random number sequence and channel eigenvalues are input into a deep reinforcement learning model trained with a large amount of data to generate an encryption key. Finally, based on this key, the collected energy data is encrypted using the AES algorithm and transmitted through OFDM technology. At the same time, an adaptive security mechanism is also provided to regenerate the key according to changes in the channel eigenvalues. This method significantly improves the security and privacy of energy data collection and transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 A schematic diagram of an energy data collection encryption and privacy protection method provided in an embodiment of the present application;
[0030] Figure 2 A schematic diagram of an energy data collection encryption and privacy protection system provided in an embodiment of the present application;
[0031] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0032] The following is a further description of specific embodiments of the present invention in conjunction with the accompanying drawings. It should be noted that the description of these embodiments is intended to facilitate understanding of the present invention and does not constitute a limitation of the present invention. In addition, the technical features involved in the various embodiments of the present invention described below may 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 references are used to distinguish between different categories for ease of description and are not intended to limit the scope of the embodiments of this application. For example, they are used to distinguish between different classification results, rather than to describe a specific order or precedence. It should be understood that the terms described in this manner are interchangeable, where appropriate, to enable description of solutions beyond the embodiments of this application.
[0034] Specifically, Figure 1The following is a flowchart showing a specific implementation of an energy data collection encryption and privacy protection method provided by an embodiment of the present application. Figure 1 , the energy data collection encryption and privacy protection method provided in this application has the following specific steps:
[0035] S101 , extracting a grid frequency deviation (FREQ) in a power line carrier (PLC) communication system, using the frequency deviation FREQ as a random number source, and generating 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 on-site meters and sensors in real time. Professional grid frequency monitoring equipment is installed at key nodes of the industrial park's power system, such as entrances and substations, and data transmission is carried out using power line carrier (PLC) communication technology. These devices are capable of real-time monitoring of the grid frequency within the PLC communication system, with an accuracy of 0.01 Hz, for example. Every minute, the acquisition device acquires the grid frequency and compares the result with a standard frequency (e.g., 50 Hz or 60 Hz, depending on the region) to calculate the frequency deviation (FREQ). For example, at a certain moment, the acquisition device measures the grid frequency as 50.03 Hz. Compared to the standard frequency of 50 Hz, the frequency deviation (FREQ) is 50.03 - 50 = 0.03 Hz. To ensure data accuracy and reliability, five consecutive acquisitions are performed at each measurement point, and the average value is used as the final frequency deviation.
[0037] Furthermore, the SHA-256 (Secure Hash Algorithm 256-bit) hash function was used to combine the frequency deviation information obtained at different time points into a random number sequence. First, each frequency deviation value was converted into a string and 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] This concatenated string is then used as input to the SHA-256 hash function. After the hash operation, a 256-bit hash value is obtained. This hash value is then converted into a 32-element random number sequence according to a certain rule (such as converting each 8 bits to a decimal number). For example, the first 8 bits of the hash value "10101010" are converted to the decimal number 170. Similarly, a random number sequence similar to [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] is obtained.
[0039] S102: Obtain an impulse response CIR of a power line carrier (PLC) communication channel, and calculate a channel characteristic value based on the impulse response CIR.
[0040] In this embodiment, several representative data collection points (e.g., factory distribution boxes in five different areas) were selected within an industrial park. PLC communication channel impulse response acquisition devices were installed at each collection point. These devices transmit specific pulse signals to the power lines and then receive the reflected signals to obtain the PLC communication channel impulse response (CIR). Due to the complex characteristics of power line channels, such as noise and multipath propagation, the received signals are subject to distortion and delay. The acquisition devices record the time difference between signal transmission and reception of the reflected signal, as well as the amplitude variation of the received signal. For example, at a certain data collection point, after a signal is transmitted, a reflected signal is received 5 microseconds later, with an amplitude of 0.8 volts. The received signal is processed using the minimum mean square error (MMSE) channel estimation algorithm to determine 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 known signal sent, and the true impulse response is gradually approached through iterative calculation. Assume that after multiple iterative calculations, the impulse response CIR obtained 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 response of the channel to the signal at different time points. Several key features are extracted from the obtained CIR to form the channel characteristic value. At least the three key features of maximum pulse amplitude, pulse interval, and delay spread time are extracted. For example, in this embodiment,
[0042] Maximum pulse amplitude: In the above CIR sequence, find the maximum value 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. Assume 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, resulting in a pulse interval sequence [1, 2, 3, 4, 5, 6, 7, 8, 9]. This sequence is then statistically analyzed, such as by calculating the mean and standard deviation, to obtain the characteristic values of the pulse intervals. Assume that the mean of the pulse intervals is 5 microseconds and the standard deviation is 2 microseconds.
[0044] Delay spread: The delay spread is determined by analyzing the signal delay in the CIR sequence. For example, if the time from sending a signal to receiving the first valid reflected signal is 3 microseconds, and the time from receiving the last valid reflected signal is 10 microseconds, the delay spread is 10-3 = 7 microseconds.
[0045] S103, inputting the random number sequence and the channel eigenvalue into the trained deep Q network model to generate an encryption key, specifically, preprocessing the random number sequence and the channel eigenvalue, the preprocessing including normalizing the random number sequence and the channel eigenvalue respectively, fusing the normalized random number sequence and the channel eigenvalue as the current state , the current state The input is fed into the input layer of the model, and multiple hidden layers are processed through nonlinear processing and multi-layer feature extraction. Finally, the Q value of each action in the corresponding action space is output through the output layer, and the selected actions are combined to generate an encryption key.
[0046] In this embodiment, the deep reinforcement learning model exemplarily employs 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 in the format required by the model. The model first extracts and processes the input data. Then, through computation using a multi-layer neural network, it ultimately outputs an encryption key with a predetermined length. The length of the encryption key can be determined based on the encryption standard employed, and this embodiment is not limiting. In one embodiment, the length of the encryption key is, for example, 128 bits. It is understood that, through nonlinear processing and multi-layer feature extraction, the multiple hidden layers learn, using trained hyperparameters, a mapping between input states and subsequent actions (i.e., a key generation strategy). For example, each action can be considered a decision component of key generation. For example, for each key bit, the network output action may correspond to a choice of "0" or "1." The outputs are then aggregated, i.e., all selected actions are combined to produce the final encryption key.
[0047] For ease of understanding, the main parts of the deep Q network model are briefly introduced below. It can be understood that the deep Q network model is a conventional model in this field.
[0048] Specifically, the network structure of the deep Q network model can be: the model input is the current state For example, the current state may 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 understandable that other fusion methods may also be used, and this embodiment does not impose any restrictions thereto. The input fusion feature vector is extracted through several fully connected layers or convolutional layers to abstractly represent the Q value of each action in the corresponding action space output by the last layer.
[0049] The model initialization process includes initializing network parameters (weights) to random values, establishing the target network, copying the initial parameters to the autonomous Q network, and configuring the experience replay buffer to store state, action, reward, and next state transition samples.
[0050] In one embodiment, based on the above network structure and initialization process, the model training process includes:
[0051] Collect data from the power grid and PLC channels to build the initial state , using the ε-greedy strategy: Randomly select actions (exploration) with probability The probability of selecting the action with the largest Q value (utilization), according to the selected action Each action can be regarded as a part of the decision of key generation. For example, for each key, the action output by the network may correspond to the 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 security evaluation is performed based on the key output: if the key meets the requirements of randomness, anti-attack and synchronization consistency, the system will receive a positive reward. ; Otherwise, a negative reward is given.
[0052] State update: After a certain sampling period, the system re-collects random input and channel characteristics to form a new state Then The experience replay buffer is stored, and a mini-batch of samples is randomly sampled from the buffer periodically to prevent correlation between samples from affecting training stability. Loss calculation: Using the mean squared error (MSE) loss function, the error between the current Q value and the target Q value is calculated. Stochastic gradient descent (SGD) or the Adam optimizer is used to update the parameters of the main network to gradually reduce the loss function. After a 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] At the same time, considering that the channel characteristics and power grid status may change dynamically in the actual environment, the model can set an online fine-tuning mechanism to maintain the accuracy and robustness of the mapping relationship by continuously collecting new data, updating the playback buffer, and retraining regularly. This embodiment will not be repeated here.
[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 collection point, including power, voltage, current, power factor, etc., is encrypted using the encryption key generated in step S103, illustratively using the Advanced Encryption Standard (AES) algorithm. The AES algorithm is a symmetric encryption algorithm that is highly efficient and secure.
[0056] For example, consider a set of collected electricity data representing 1000 kWh. This data is converted into binary data and then fed into the AES encryption algorithm along with a 128-bit encryption key. This encryption algorithm generates a string of ciphertext data. This encrypted data is then transmitted to the data center via a power line carrier communication system. For example, orthogonal frequency division multiplexing (OFDM) technology can be used to divide the data into multiple subcarriers for transmission, improving transmission reliability and anti-interference capabilities.
[0057] In some possible embodiments, encrypted ciphertext data is preferably divided into multiple subcarriers for transmission, with each subcarrier carrying a portion of the data. Simultaneously, based on the real-time state of the channel, 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 improves data transmission security and prevents data theft and cracking.
[0058] In some embodiments, during data transmission, changes in channel characteristic values are continuously monitored. At regular intervals (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 then compared with preset thresholds. The preset thresholds can be determined based on practical application experience. For example, the threshold for the maximum pulse amplitude can be set to 1.2, the threshold for the average pulse interval can be set to 8 microseconds, and the threshold for the delay spread can be set to 10 microseconds. If, among the newly acquired channel characteristic values, the maximum pulse amplitude exceeds 1.2, the average pulse interval exceeds 8 microseconds, or the delay spread exceeds 10 microseconds, the channel characteristic value is determined to have exceeded the preset threshold.
[0059] When the channel characteristic value exceeds the preset threshold, it indicates that the current communication channel is relatively complex. In order to further enhance the security of key generation, the characteristic value of the communication channel is reacquired according to step S102 until the characteristic value is less than the preset threshold, and / or the random number sequence is regenerated according to step S101, and based on the regenerated communication channel characteristics, the regenerated random sequence, or at least one of the two, the encryption key is regenerated according to the method of step S103.
[0060] Furthermore, the preset threshold is dynamically adjusted based on the security level of the current periodic communication channel. Exemplarily, the security level of the communication channel is determined based on the historical channel characteristic value data of the current communication channel, for example, based on the proportion of situations in which the historical channel characteristic values of the current communication channel exceed the preset threshold, wherein the higher the security level, the lower the corresponding preset threshold, and the lower the security level, the higher the corresponding preset threshold.
[0061] At the same time, taking into account the time-varying characteristics of the channel and the changing trends and patterns of the channel, appropriate adjustments are made to the random number sequence generation method to avoid the risk of leakage caused by long-term fixed keys. For example, when regenerating the random number sequence, the frequency deviation acquisition frequency is increased from once every minute to once every 30 seconds to obtain more real-time frequency deviation information, thereby generating a more random and adaptable random number sequence.
[0062] In this example, a deep reinforcement learning model based on the DQN establishes a nonlinear mapping from random inputs (grid frequency deviation and PLC channel eigenvalues) to encryption key outputs. This process combines exploration (ε-greedy strategy), experience replay, and a target network update mechanism to ensure the secure transmission and privacy protection of collected energy data.
[0063] Throughout the entire process of the disclosed method, the random number sequence and channel characteristics together constitute the state information of the system, and the trained deep Q network uses the input features to learn the optimal key generation strategy. The Q value obtained through forward propagation guides the selection of actions, thereby generating an encryption key with high randomness and environmental dependence. The present disclosure not only utilizes the advantages of deep reinforcement learning in complex decision-making problems, but also combines the physical characteristics of wireless channels. Combining the channel characteristics of the physical layer and random numbers, the generated key has environmental 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 the privacy protection of users.
[0064] Corresponding to the energy data collection encryption and privacy protection method of the above embodiment, Figure 2 A structural block diagram of an energy data acquisition encryption and privacy protection system provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0065] See also Figure 2 As shown, an energy data collection encryption and privacy protection system 200 provided in an embodiment of the present application includes:
[0066] A first generating unit is configured to extract a frequency deviation FREQ of a power grid in a 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;
[0067] An acquiring unit, configured to acquire an impulse response CIR of a power line carrier (PLC) communication channel, and to calculate and acquire a channel characteristic value based on the impulse response CIR;
[0068] The second generating unit is used to input the random number sequence and the channel characteristic value into the trained deep Q network reinforcement learning model to generate an encryption key; specifically, the random number sequence and the channel characteristic value are preprocessed, and the preprocessing includes normalizing the random number sequence and the channel characteristic value respectively, and fusing the normalized random number sequence and the channel characteristic value as the current state , the current state The input is fed into the input layer of the model, and multiple hidden layers are processed through nonlinear processing and multi-layer feature extraction. Finally, the Q value of each action in the corresponding action space is output through the output layer, and the selected actions are combined to generate the encryption key;
[0069] The encryption and transmission unit is used to encrypt the collected energy data based on the encryption key and transmit it on the power line.
[0070] Optionally, the system further includes a third generating unit configured to determine whether the channel characteristic value exceeds a preset threshold, and if not, to generate an encryption key based on the channel characteristic value and the random number sequence,
[0071] If yes, 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 grid frequency deviation and use it as a random number source to regenerate the second random number sequence,
[0072] And regenerate an encryption key based on the channel characteristic value and the second random number sequence, or based on the second channel characteristic value and the second random number sequence, or based on the second channel characteristic value and the random number sequence.
[0073] Optionally, the system further includes a dynamic selection unit configured to dynamically select a subcarrier least affected by a channel response to carry encrypted data when transmitting via OFDM modulation, and to use the remaining subcarriers to transmit interference signals.
[0074] Accordingly, an embodiment of the present application further provides an electronic device, which may be a terminal or a server. Figure 3 As shown, Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0075] The electronic device 300 includes a processor 301 having one or more processing cores, a memory 302 having one or more computer-readable storage media, and a computer program stored in the memory 302 and executable on the processor. The processor 301 is electrically connected to the memory 302. Those skilled in the art will appreciate that the electronic device structure shown in the figures does not limit the electronic device and may include more or fewer components than shown, or combine certain components, or arrange the components differently.
[0076] The processor 301 is the control center of the electronic device 300. It uses various interfaces and lines to connect various parts of the entire electronic device 300. 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 executes various functions of the electronic device 300 and processes data, thereby monitoring the electronic device 300 as a whole.
[0077] In the embodiment of the present application, the processor 301 in the electronic device 300 loads instructions corresponding to one or more application processes into the memory 302 according to the following steps, and the processor 301 runs the application stored in the memory 302 to implement various functions:
[0078] Extract the grid frequency deviation FREQ 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 obtain the channel characteristic value;
[0080] Inputting the random number sequence and the channel characteristic value 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] The specific implementation of the above operations can be found in the aforementioned embodiments and will not be described again 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. Among them, the processor 301 is electrically connected to the protection module 303, the communication module 304, the input unit 305 and the power supply 306 respectively. It can be understood by those skilled in the art that Figure 3 The electronic device structure shown in the figure does not constitute a limitation to the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0084] The protection module 303 can be used for energy data collection encryption and privacy protection.
[0085] The communication module 304 can be used to communicate with other devices.
[0086] The input unit 305 may be configured to receive input digital, character information, or user feature information (such as fingerprint, iris, or facial information), and generate keyboard, mouse, joystick, optical, or trackball signal input 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 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. Power supply 306 can also include one or more DC or AC power supplies, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and other arbitrary components.
[0088] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0089] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be accomplished by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0090] To this end, an embodiment of the present application provides a computer-readable storage medium, which stores multiple computer programs. The computer programs can be loaded by a processor to execute the steps of an energy data collection encryption and privacy protection method provided in an embodiment of the present application.
[0091] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.
[0092] The computer-readable storage medium may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0093] Since the computer program stored in the storage medium can execute the steps of any energy data collection, encryption, and privacy protection method provided in the embodiments of the present application, the beneficial effects of any energy data collection, encryption, and privacy protection method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0094] The present application is described with reference to flowcharts and / or block diagrams of methods, devices (systems) and computer program products according to embodiments of the present application. These computer program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the flowchart. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0095] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0096] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0097] The embodiments of the present invention are described in detail above with reference to the accompanying drawings, but the present invention is not limited to the described embodiments. It is apparent to those skilled in the art that various changes, modifications, substitutions, and variations to these embodiments may be made without departing from the principles and spirit of the present invention, and these changes and modifications still fall within the scope of protection of the present invention.
Claims
1. A method for energy data collection encryption and privacy protection, characterized in that: include: Extracting a grid frequency deviation FREQ in a power line carrier PLC communication system, using the frequency deviation FREQ as a random number source, and generating a random number sequence based on the random number source; Obtaining an impulse response CIR of a power line carrier (PLC) communication channel, and calculating a channel characteristic value based on the impulse response CIR; Inputting the random number sequence and the channel characteristic value into a trained deep Q network model to generate an encryption key; Specifically, the random number sequence and the channel characteristic value are preprocessed, and the preprocessing includes normalizing the random number sequence and the channel characteristic value respectively, fusing the normalized random number sequence and the channel characteristic value to obtain the current state , the current state The input is fed into the input layer of the model, and multiple hidden layers are processed through nonlinear processing and multi-layer feature extraction. Finally, the Q value of each action in the corresponding action space is output through the output layer, and the selected actions are combined to generate the encryption key; The collected energy data is encrypted based on the encryption key and transmitted on the power line.
2. The energy data collection encryption and privacy protection method according to claim 1 is characterized in that: The method further comprises: The method of using the frequency deviation FREQ as a random number source and generating a random number sequence based on the random number source specifically includes using frequency deviation information obtained at different time points as a random number source and using a hash function to generate the random number sequence.
3. The energy data collection encryption and privacy protection method according to any one of claim 1, characterized in that: The method further comprises: The method of obtaining the pulse response CIR of the power line carrier PLC communication channel and obtaining the channel characteristic value specifically includes processing the received signal using minimum mean square error estimation to obtain the pulse response CIR, and extracting several key features from the obtained CIR to form the channel characteristic value, wherein the channel characteristic value includes at least the maximum pulse amplitude, the pulse interval, and the delay spread time.
4. The energy data collection encryption and privacy protection method according to claim 1 is characterized in that: The method further comprises: determining whether the channel characteristic value exceeds a preset threshold, and if not, generating an encryption key based on the channel characteristic value and the random number sequence, If yes, 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 grid frequency deviation and use it as a random number source to regenerate the second random number sequence, And regenerate an encryption key based on the channel characteristic value and the second random number sequence, or based on the second channel characteristic value and the second random number sequence, or based on the second channel characteristic value and the random number sequence.
5. The energy data collection encryption and privacy protection method according to claim 4 is characterized in that: The method further comprises: The determining whether the channel characteristic value exceeds a preset threshold value 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 value 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 characteristic values of the current communication channel exceeding a preset threshold value. The adjusting the preset threshold based on the security level includes: a higher security level corresponds to a lower preset threshold, and a lower security level corresponds to a higher preset threshold.
6. The energy data collection encryption and privacy protection method according to claim 5, characterized in that: The method further comprises: When transmitting through OFDM modulation, the subcarrier least affected by the channel response is dynamically selected to carry encrypted data, and the remaining subcarriers transmit interference signals.
7. An energy data collection encryption and privacy protection system, characterized in that: include: A first generating unit is configured to extract a grid frequency deviation FREQ in a 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; An acquisition unit, configured to acquire an impulse response CIR of a power line carrier (PLC) communication channel, and calculate a channel characteristic value based on the impulse response CIR; A second generating unit is configured to input the random number sequence and the channel characteristic value into a trained deep Q network model to generate an encryption key; Specifically, the random number sequence and the channel characteristic value are preprocessed, and the preprocessing includes normalizing the random number sequence and the channel characteristic value respectively, fusing the normalized random number sequence and the channel characteristic value as the current state , the current state The input is fed into the input layer of the model, and multiple hidden layers are processed through nonlinear processing and multi-layer feature extraction. Finally, the Q value of each action in the corresponding action space is output through the output layer, and the selected actions are combined to generate the encryption key; The encryption and transmission unit is used to encrypt the collected energy data based on the encryption key and transmit it on the power line.
8. The energy data collection encryption and privacy protection system according to claim 7, characterized in that: The system further includes, The third generating unit is configured to determine whether the channel characteristic value exceeds a preset threshold, and if not, to generate an encryption key based on the channel characteristic value and the random number sequence. If yes, 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 grid frequency deviation and use it as a random number source to regenerate the second random number sequence, And regenerate an encryption key based on the channel characteristic value and the second random number sequence, or based on the second channel characteristic value and the second random number sequence, or based on the second channel characteristic value and the random number sequence.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is executed.
10. An electronic device, characterized in that: The method comprises a memory storing executable program code and a processor coupled to the memory; wherein the processor calls the executable program code stored in the memory to execute the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Random number generation device and method
CN112912838A
Wireless physical layer key generation technology based on neural network model
CN114430550A
Communication method and device, electronic equipment and storage medium
CN115801238A
Wireless multipath grid structure and secret communication-oriented application method thereof
CN117857035A
Network access authentication method and device based on frequency deviation, computer equipment, readable storage medium and program product
CN118921666A
Cited By
Privacy protection system and method based on distributed data aggregation of smart power grid
CN121864305A
Privacy protection system and method based on smart grid distributed data aggregation
CN121864305B