Search

CN-121984786-A - Single-phase electric energy meter data encryption transmission method and system based on edge calculation

CN121984786ACN 121984786 ACN121984786 ACN 121984786ACN-121984786-A

Abstract

The invention relates to the field of digital information transmission, in particular to a single-phase electric energy meter data encryption transmission method and system based on edge calculation, wherein the method comprises the steps of calculating a fluctuation coefficient and adaptively selecting the encryption round number of an AES encryption algorithm according to the fluctuation coefficient; the method comprises the steps of extracting physical noise characteristics, reconstructing an S box of an AES encryption algorithm according to the physical noise characteristics to obtain a dynamic coupling S box, encrypting data to be encrypted by utilizing the dynamic coupling S box and the encryption round number to obtain an intermediate ciphertext, generating a dynamic intensity coefficient based on a fluctuation coefficient, performing energy whitening processing on the intermediate ciphertext to obtain a final ciphertext, and carrying out integrity check on the final ciphertext and transmitting the final ciphertext to a server. By the technical scheme, the accuracy of the transmission result can be improved, and the requirements of safety, instantaneity and low power consumption of data transmission on the edge equipment with limited resources are met.

Inventors

  • CHEN JIE
  • KONG FANHUA
  • SU JIE
  • HUANG KAI

Assignees

  • 江苏盛德电子仪表有限公司

Dates

Publication Date
20260505
Application Date
20260407

Claims (8)

  1. 1. The data encryption transmission method of the single-phase electric energy meter based on edge calculation is characterized by comprising the following steps: Collecting a current sequence, a voltage sequence and an active power sequence of the single-phase electric energy meter in a preset sampling period, performing high-pass filtering on the current sequence to obtain a current ripple component sequence, and calculating a loss equivalent impedance sequence based on the current sequence and the voltage sequence; calculating a fluctuation coefficient based on the active power sequence and the current ripple component sequence, and adaptively selecting the encryption round number of the AES encryption algorithm according to the fluctuation coefficient; Extracting physical noise characteristics based on the loss equivalent impedance sequence, and reconstructing an S box of an AES encryption algorithm according to the physical noise characteristics to obtain a dynamic coupling S box; The method comprises the steps of encrypting data to be encrypted by utilizing a dynamic coupling S box and the number of encryption rounds to obtain an intermediate ciphertext, generating a dynamic intensity coefficient based on a fluctuation coefficient, performing energy whitening treatment on the intermediate ciphertext to obtain a final ciphertext, and performing integrity check on the final ciphertext and transmitting the final ciphertext to a server.
  2. 2. The method for encrypting and transmitting single-phase electric energy meter data based on edge calculation according to claim 1, wherein calculating the fluctuation coefficient comprises: Calculating a first-order difference absolute value sequence of the active power sequence, and calculating an average value of the first-order difference absolute value sequence as a first average value, calculating a range of the active power sequence, and calculating a first sum value of the range and a preset constant, wherein the ratio of the first average value to the first sum value is used as a first ratio; Calculating the root mean square of the current ripple component sequence, taking the ratio of the root mean square to the maximum current measurable by the single-phase electric energy meter as a second ratio, calculating the first difference value of the constant 1 and the power related weight, taking the product of the first difference value and the second ratio as a second product; And taking the sum value of the first product and the second product as a fluctuation coefficient.
  3. 3. The method for encrypting and transmitting single-phase electric energy meter data based on edge calculation according to claim 1, wherein the adaptively selecting the encryption round number of the AES encryption algorithm according to the fluctuation coefficient comprises: comparing the fluctuation coefficient with a preset first threshold value and a preset second threshold value, wherein the first threshold value is smaller than the second threshold value; selecting an AES-128 encryption algorithm in response to the fluctuation coefficient being smaller than a first threshold, wherein the number of encryption rounds is set to 10 rounds of encryption; selecting an AES-192 encryption algorithm in response to the fluctuation coefficient not being smaller than the first threshold and smaller than the second threshold, and setting the number of encryption rounds to 12 rounds of encryption; In response to the fluctuation coefficient being not smaller than the second threshold value and not larger than 1, an AES-256 encryption algorithm is selected, and the number of encryption rounds is set to 14 rounds of encryption.
  4. 4. The method for encrypting and transmitting single-phase electric energy meter data based on edge calculation according to claim 1, wherein the extracting physical noise characteristics based on the loss equivalent impedance sequence comprises: Taking the binary low 8 bits of the loss equivalent impedance value at any sampling moment in the loss equivalent impedance sequence, constructing the binary low 8 bits of the loss equivalent impedance value at all sampling moments in a preset sampling period into a conversion sequence, shifting the binary low 8 bits of the loss equivalent impedance value at each sampling moment in the conversion sequence according to a shift amount to obtain a shift sequence, and performing continuous exclusive OR operation on all sampling moments in the shift sequence to obtain a first result, wherein the shift amount is the remainder of the serial numbers and 8 of the sampling moments; interleaving and splicing a current sequence and a voltage sequence of a preset sampling period according to a sampling time sequence to obtain a spliced sequence, converting the spliced sequence into a binary sequence, performing lightweight hash operation on the binary sequence to obtain a hash fingerprint, and taking the lower 8 bits of the binary system of the hash fingerprint as a second result; and taking the value obtained after the exclusive OR operation of the first result and the second result as the physical noise point characteristic.
  5. 5. The method for encrypting and transmitting the data of the single-phase electric energy meter based on the edge calculation according to claim 1, wherein the step of reconstructing the S-box of the AES encryption algorithm according to the physical noise characteristics to obtain the dynamic coupling S-box comprises: traversing the integer indexes from 0 to 255 to obtain a basic value at a corresponding index in an S box of the AES encryption algorithm; Performing bitwise exclusive OR operation on the basic value and the physical noise point characteristic to obtain an intermediate conversion value; Taking the remainder of the modulo 8 of the physical noise point characteristic as a shift bit number, and executing left cyclic shift operation on the intermediate conversion value to obtain a shift result; and taking the shift result as a mapping value corresponding to the current traversal index in the dynamic coupling S box.
  6. 6. The method for encrypting and transmitting single-phase electric energy meter data based on edge calculation according to claim 1, wherein the generating dynamic intensity coefficient based on the fluctuation coefficient, performing energy whitening processing on intermediate ciphertext to obtain final ciphertext comprises: linearly mapping the fluctuation coefficient into a dynamic intensity coefficient in an integer form; and splitting the intermediate ciphertext according to bytes, and performing exclusive OR operation on any byte and the dynamic intensity coefficient to obtain the corresponding byte of the final ciphertext.
  7. 7. The method for encrypting and transmitting the single-phase electric energy meter data based on the edge calculation according to claim 1, wherein the step of performing the integrity check on the final ciphertext and transmitting the final ciphertext to the server comprises the steps of: the final ciphertext is checked by adopting a CRC32 algorithm to generate a check code, and the final ciphertext and the check code are packed to form an encrypted data packet; the encrypted data packet is published to the server based on the MQTT protocol or CoAP protocol.
  8. 8. An edge calculation-based single-phase electric energy meter data encryption transmission system, characterized by comprising a processor and a memory, wherein the memory stores computer program instructions that when executed by the processor implement the edge calculation-based single-phase electric energy meter data encryption transmission method according to any one of claims 1-7.

Description

Single-phase electric energy meter data encryption transmission method and system based on edge calculation Technical Field The present invention relates to the field of transmission of digital information. In particular to a single-phase electric energy meter data encryption transmission method and system based on edge calculation. Background With the development of smart grids and edge computing, data security transmission of single-phase electric energy meters is increasingly important. In typical application scenes such as new energy battery test and the like, the electric energy data presents obvious smooth-abrupt change alternating characteristics, namely under stable working conditions such as constant current/constant voltage test and the like, sequences such as voltage, current, active power and the like are highly time-dependent, pattern is highly repeated, entropy value is extremely low, and a predictable differential characteristic path is easy to form by a standard AES-128 algorithm which is commonly used, so that the electric energy data is extremely easy to be attacked by differential cryptanalysis. The traditional Chinese patent application document with the publication number of CN120761678A discloses a novel split type single-phase intelligent electric energy meter which is tested by using a new energy battery, electric energy data generated under a stable working condition on edge equipment with limited resources show high time correlation, mode repeatability and low entropy characteristics, so that an AES encryption algorithm is easy to form a predictable differential path to be cracked by differential cryptanalysis attack, and meanwhile, the fixed high-round number encryption calculation cost is high, the power consumption is high, and the encryption transmission result precision is low. Disclosure of Invention In order to solve the above-described technical problems, the present invention provides the following aspects. The invention provides an edge calculation-based single-phase electric energy meter data encryption transmission method which comprises the steps of collecting a current sequence, a voltage sequence and an active power sequence of the single-phase electric energy meter in a preset sampling period, carrying out high-pass filtering on the current sequence to obtain a current ripple component sequence, calculating a loss equivalent impedance sequence based on the current sequence and the voltage sequence, calculating a fluctuation coefficient based on the active power sequence and the current ripple component sequence, adaptively selecting the encryption round number of an AES encryption algorithm according to the fluctuation coefficient, extracting physical noise point characteristics based on the loss equivalent impedance sequence, reconstructing an S box of the AES encryption algorithm according to the physical noise point characteristics to obtain a dynamic coupling S box, encrypting data to be encrypted by utilizing the dynamic coupling S box and the encryption round number to obtain an intermediate ciphertext, generating a dynamic intensity coefficient based on the fluctuation coefficient, carrying out energy whitening treatment on the intermediate ciphertext to obtain a final ciphertext, carrying out integrity check on the final ciphertext, and transmitting the final ciphertext to a server. Preferably, the calculation of the fluctuation coefficient comprises the steps of calculating a first-order difference absolute value sequence of an active power sequence, calculating an average value of the first-order difference absolute value sequence as a first average value, calculating a polar difference of the active power sequence, calculating a first sum value of the polar difference and a preset constant, taking a ratio of the first average value to the first sum value as a first ratio, calculating a product of the first ratio and an acquired power correlation weight as a first product, calculating a root mean square of a current ripple component sequence, taking a ratio of the root mean square to a maximum current measurable by a single-phase electric energy meter as a second ratio, calculating a first difference value of the constant 1 and the power correlation weight, taking a product of the first difference value and the second ratio as a second product, and taking a sum value of the first product and the second product as a fluctuation coefficient. Preferably, the adaptively selecting the number of encryption rounds of the AES encryption algorithm according to the fluctuation coefficient comprises comparing the fluctuation coefficient with a preset first threshold value and a preset second threshold value, wherein the first threshold value is smaller than the second threshold value, selecting the AES-128 encryption algorithm according to the fluctuation coefficient which is smaller than the first threshold value, setting the number of encryption rounds to 10 rounds