Smart meter data transmission method and system based on dynamic key management

Dynamic key generation through quantum random number generator and improved Diffie-Hellman algorithm, combined with one-way hash function and AES encryption, solves the problem of easy leakage of static key management of smart meters and realizes high-security data transmission.

CN120263413BActive Publication Date: 2025-08-08SHENZHEN JIANGJI IND
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510749073.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-06
Publication Date
2025-08-08
Estimated Expiration
2045-06-06

AI Technical Summary

Technical Problem

The static key management methods of existing smart meters are easily leaked, difficult to withstand complex network attacks, and cannot meet the high security requirements of data transmission.

Method used

The temporary private key is generated by a quantum random number generator, and the dynamic master key is negotiated with the smart meter through the improved Diffie-Hellman algorithm, and a one-way hash function is used to generate the encryption key and verification key. Combined with AES encryption and HMAC signatures, sharded data is transmitted through dynamic selection of the base station.

Benefits of technology

It realizes high security during the data transmission of smart meters, resists quantum attacks and playback attacks, and ensures the integrity and non-repudiation of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120263413B_ABST
    Figure CN120263413B_ABST
Patent Text Reader

Abstract

The present invention discloses a smart meter data transmission method and system based on dynamic key management. The method includes: a master station uses a quantum random number generator to generate a temporary private key, and based on the temporary private key, performs key negotiation with the smart meter using an improved Diffie-Hellman algorithm to generate a dynamic master key; the smart meter generates an encryption key and a verification key using a one-way hash function based on the device identification, the current timestamp, and the dynamic master key issued by the master station, to encrypt and sign the fragmented user electricity usage data to obtain fragmented encrypted data and fragmented signed data, and sends the fragmented encrypted data and fragmented signed data to the master station via a dynamically selected base station; the master station verifies the integrity of the fragmented signed data and decrypts the fragmented encrypted data to generate user electricity usage data. The dynamic key management in this application improves the ability to resist attacks and ensures the high security of smart meter data during transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of smart meters, and in particular to a smart meter data transmission method and system based on dynamic key management. Background Art

[0002] In smart grids, smart meters, as key terminal devices, not only perform the basic metering functions of traditional electricity meters but also possess data collection, remote communication, and control capabilities. To ensure the privacy, legitimacy, and non-repudiation of data exchange between smart meters and the master station via base stations, secure key management is crucial. Existing technologies typically employ static key management, but these methods suffer from drawbacks such as long-term key immutability, vulnerability to leakage, and reliance on manual intervention for updates. This makes them difficult to mitigate against complex network attacks and fails to meet the high security requirements of smart meter data transmission. Summary of the Invention

[0003] The embodiments of the present invention provide a smart meter data transmission method and system based on dynamic key management, aiming to solve the problem that the existing key management has poor anti-attack capability and cannot meet the high security requirements of smart meter data transmission.

[0004] In a first aspect, the present invention provides a smart meter data transmission method based on dynamic key management, comprising:

[0005] The master station uses a quantum random number generator to generate a temporary private key, and performs key negotiation with the smart meter using an improved Diffie-Hellman algorithm based on the temporary private key to generate a dynamic master key, and then sends the dynamic master key to the smart meter;

[0006] The smart meter generates an encryption key through a one-way hash function according to the device identification, the current timestamp and the dynamic master key, and generates a verification key through the one-way hash function according to the encryption key;

[0007] The smart meter encrypts the fragmented user electricity consumption data according to the encryption key to obtain fragmented encrypted data, signs the fragmented encrypted data according to the verification key to obtain fragmented signature data, and sends the fragmented encrypted data and the fragmented signature data to the master station through the dynamically selected base station;

[0008] The master station verifies the integrity of the slice signature data according to the encryption key and the verification key synchronized by the smart meter and decrypts the slice encrypted data to generate the user electricity usage data.

[0009] In a second aspect, the present invention further provides a smart meter data transmission system based on dynamic key management, comprising: a first generation unit and a verification generation unit configured in a master station, and a second generation unit and an encryption signature unit configured in a smart meter, wherein:

[0010] The first generating unit is used for the master station to generate a temporary private key using a quantum random number generator, and perform key negotiation with the smart meter based on the temporary private key through an improved Diffie-Hellman algorithm to generate a dynamic master key, and send the dynamic master key to the smart meter;

[0011] The second generating unit is configured to generate an encryption key by the smart meter according to the device identification, the current timestamp and the dynamic master key through a one-way hash function, and generate a verification key according to the encryption key through the one-way hash function;

[0012] The encryption signature unit is used for the smart meter to encrypt the fragmented user electricity consumption data according to the encryption key to obtain fragmented encrypted data, and to sign the fragmented encrypted data according to the verification key to obtain fragmented signature data, and to send the fragmented encrypted data and the fragmented signature data to the master station through the dynamically selected base station;

[0013] The verification generation unit is used by the master station to perform integrity verification on the slice signature data according to the encryption key and the verification key synchronized by the smart meter and to decrypt the slice encrypted data to generate the user electricity usage data.

[0014] The present invention provides a smart meter data transmission method and system based on dynamic key management. The method includes: a master station uses a quantum random number generator to generate a temporary private key, and based on the temporary private key, performs key negotiation with the smart meter through an improved Diffie-Hellman algorithm to generate a dynamic master key, and sends the dynamic master key to the smart meter; the smart meter generates an encryption key through a one-way hash function according to a device identifier, a current timestamp, and the dynamic master key, and generates a verification key through the one-way hash function according to the encryption key; the smart meter encrypts fragmented user electricity usage data according to the encryption key to obtain fragmented encrypted data, and signs the fragmented encrypted data according to the verification key to obtain fragmented signature data, and sends the fragmented encrypted data and the fragmented signature data to the master station through a dynamically selected base station; the master station performs integrity verification on the fragmented signature data according to the encryption key and the verification key synchronized with the smart meter, and decrypts the fragmented encrypted data to generate the user electricity usage data. This application uses a quantum random number generator to generate a temporary private key, and based on the temporary private key, generates a dynamic master key through an improved Diffie-Hellman algorithm and negotiation with the smart meter, which can resist quantum attacks and ensure the security of the dynamic master key; and generates encryption keys and verification keys through a one-way hash function based on the device identification, current timestamp and dynamic master key, realizing the "one-time one-key" of the key, preventing replay attacks, and improving the security of the encryption keys and verification keys; encrypts and signs the sharded user electricity usage data, and sends the encrypted sharded encrypted data and the signed sharded signed data to the main station through a dynamically selected base station. The main station generates the user electricity usage data before sharding based on the encryption key and verification key synchronized with the smart meter, ensuring the high security of the smart meter data during transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0016] Figure 1 A flow chart showing a method for transmitting data using a smart meter based on dynamic key management according to an embodiment of the present invention is presented;

[0017] Figure 2 A schematic diagram of a sub-process of a smart meter data transmission method based on dynamic key management according to an embodiment of the present invention is shown;

[0018] Figure 3Another sub-process diagram of the smart meter data transmission method based on dynamic key management according to an embodiment of the present invention is shown;

[0019] Figure 4 A schematic diagram of another sub-process of the smart meter data transmission method based on dynamic key management according to an embodiment of the present invention is shown;

[0020] Figure 5 A block diagram of a smart meter data transmission system based on dynamic key management according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0021] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0022] Directional terms used herein, such as "upper," "lower," "front," "back," "left," "right," "inner," "outer," and "side," refer only to directions in the accompanying drawings. Therefore, these directional terms are intended to illustrate and facilitate understanding of the present invention and are not intended to limit the present invention. Furthermore, in the accompanying drawings, similar or identical structures are denoted by the same reference numerals.

[0023] An embodiment of the present invention proposes a smart meter data transmission method and system based on dynamic key management, which solves the problem that the existing key management has poor anti-attack capabilities and cannot meet the high security requirements of smart meter data transmission. In this embodiment, a quantum random number generator is used to generate a temporary private key. Based on the temporary private key, an improved Diffie-Hellman algorithm is used to negotiate with the smart meter to generate a dynamic master key. This can resist quantum attacks and ensure the security of the dynamic master key. An encryption key and a verification key are generated through a one-way hash function based on the device identifier, the current timestamp, and the dynamic master key. This implements a "one-time one-pad" key, prevents replay attacks, and improves the security of the encryption key and verification key. The fragmented user electricity usage data is encrypted and signed, and the encrypted fragmented encrypted data and the signed fragmented signed data are sent to the master station via a dynamically selected base station. The master station generates the user electricity usage data before fragmentation based on the encryption key and verification key synchronized with the smart meter, ensuring the high security of the smart meter data during transmission.

[0024] In order to better understand the above technical solution, the above technical solution will be described in detail below with reference to the accompanying drawings and specific implementation methods.

[0025] The embodiment of the present invention proposes a smart meter data transmission method based on dynamic key management. The smart meter data transmission method based on dynamic key management can be used in a smart meter data transmission system based on dynamic key management. The smart meter data transmission system based on dynamic key management includes a master station and a smart meter. The units configured in the master station and the smart meter and the functions implemented in the units will be described in detail in the embodiments below. For the sake of simplicity, they will not be repeated here. Please refer to Figure 1 , Figure 1 The following is a flow chart showing a method for transmitting data of a smart meter based on dynamic key management according to an embodiment of the present invention. Figure 1 As shown, the smart meter data transmission method based on dynamic key management includes steps: S110-S140.

[0026] S110. The master station generates a temporary private key using a quantum random number generator, performs key negotiation with the smart meter using an improved Diffie-Hellman algorithm based on the temporary private key to generate a dynamic master key, and sends the dynamic master key to the smart meter.

[0027] In this embodiment, the master station uses a quantum random number generator to generate a temporary private key, preventing the pseudo-random number algorithm from being predicted. After generating the temporary private key, the master station calculates the master station public key based on the temporary private key through elliptic curve scalar multiplication. The master station sends the master station public key to the smart meter, causing the smart meter to use the quantum random number generator to generate a quantum random private key and calculate the meter public key based on the quantum random private key through elliptic curve scalar multiplication. The master station receives the meter public key transmitted back by the smart meter and generates a master station shared key based on the temporary private key and the meter public key. Based on the master station shared key, the master station negotiates with the meter shared key generated by the smart meter using the quantum random private key and the master station public key to obtain a shared key. The master station encrypts the shared key using the NTRU public key to generate the dynamic master key. It should be noted that in this embodiment, secondary encryption using the NTRU public key can resist quantum computing attacks on elliptic curves. It should also be noted that in this embodiment, even if an attacker intercepts the master station public key and the meter public key, they cannot obtain the dynamic master key because they cannot crack the discrete logarithm problem of elliptic curve cryptography and the NTRU encryption layer. NTRU (Nth-degree Truncated Polynomial Ring Unit) is a public key cryptosystem based on lattice cryptography. The improved Diffie-Hellman algorithm, through a triple mechanism of temporary private key + key agreement + NTRU secondary encryption, achieves quantum-resistant, forward-secure, and highly random dynamic key management, making it suitable for high-security scenarios such as smart meters.

[0028] S120. The smart meter generates an encryption key through a one-way hash function according to the device identification, the current timestamp, and the dynamic master key, and generates a verification key through the one-way hash function according to the encryption key.

[0029] In this embodiment, after receiving the dynamic master key from the master station, the smart meter generates a verification key using a one-way hash function based on the device identifier, the current timestamp, and the dynamic master key. The device identifier is the smart meter's unique hardware identifier (e.g., a 128-bit unique code). It should be noted that in this embodiment, the one-way hash function is the SHA-3 hash function, which is highly resistant to quantum computing attacks. It should also be noted that in this embodiment, the current timestamp ensures that the generated key dynamically changes each time, meaning that the verification key is constantly changing.

[0030] In one embodiment, such as this embodiment, Figure 2 As shown, step S120 specifically includes steps S121-S125:

[0031] S121. The smart meter concatenates the device identifier and the current timestamp to generate an identifier time, and inputs the identifier time into the one-way hash function to generate an initial hash value.

[0032] S122. The smart meter decodes the dynamic master key using the NTRU private key to obtain the shared key, where the NTRU private key and the NTRU public key form a key pair.

[0033] S123, the smart meter performs XOR operation on the shared key and the initial hash value to calculate a target hash value;

[0034] S124. The smart meter concatenates the target hash value and the first preset hash value to obtain a first concatenated hash, and inputs the first concatenated hash into the one-way hash function to obtain a first target hash.

[0035] S125. The smart meter selects the value of the preset bit before the first target hash as the encryption key.

[0036] In this embodiment, the smart meter uses the identification time generated by concatenating the device identification and the current timestamp as the input seed value for a one-way hash function, ensuring the uniqueness of the seed value. The initial hash value is generated using the SHA-3 hash function, specifically the SHA-3-256 hash function. The one-way nature of the SHA-3-256 hash function ensures that the input seed value cannot be reverse-derived from the initial hash value. It should be noted that the NTRU private key and the NTRU public key form a key pair in the NTRU algorithm. The smart meter calculates the target hash value by performing a bitwise XOR operation on the shared key and the initial hash value. This bitwise XOR operation increases randomness and obfuscation, preventing direct exposure of the shared key. Furthermore, the XOR operation, due to its low computational complexity, is well-suited for resource-constrained smart meter environments. It should also be noted that in this embodiment, the preset bits are 128 bits. In other embodiments, the preset bits may vary depending on the actual situation.

[0037] Furthermore, generating a verification key based on the encryption key through the one-way hash function includes: the smart meter concatenating the encryption key with a second preset hash value to obtain a second concatenated hash, inputting the second concatenated hash into the one-way hash function to obtain a second target hash; and the smart meter selecting the value of the preset bit before the second target hash as the verification key. It should be noted that in this embodiment, the first preset hash value and the second preset hash value are different constants, ensuring that the encryption key and the verification key are independent and unrelated.

[0038] S130. The smart meter encrypts the fragmented user electricity usage data according to the encryption key to obtain fragmented encrypted data, and signs the fragmented encrypted data according to the verification key to obtain fragmented signature data, and sends the fragmented encrypted data and the fragmented signature data to the master station through a dynamically selected base station.

[0039] In this embodiment, after the smart meter generates the encryption key and the verification key, it will encrypt, sign and send the collected user electricity consumption data according to the encryption key and the verification key. Figure 3As shown, step S130 specifically includes steps S131-S134: S131, the smart meter slices the collected user electricity consumption data to obtain multiple different sliced electricity consumption data, and encrypts the multiple different sliced electricity consumption data through the AES encryption algorithm according to the encryption key to obtain multiple different electricity encrypted data, and uses the multiple different electricity encrypted data as the sliced encrypted data; S132, the smart meter performs HMAC signature on the multiple different electricity encrypted data according to the verification key to obtain multiple different signature data, and uses the multiple different signature data as the sliced signature data; S133, the smart meter performs signal scoring on the base station between the smart meter and the main station through a preset base station signal scoring model to obtain a scoring result, wherein the base station signal scoring model is established according to signal strength, base station load rate and interference value; S134, the smart meter selects a target base station based on the scoring result, and sends the sliced encrypted data and the sliced signature data to the main station through the target base station. It should be noted that in this embodiment, for ease of understanding, it is assumed that the smart meter fragments the collected user electricity usage data D into three different fragmented electricity usage data D1, D2, and D3. D1, D2, and D3 are encrypted using the AES algorithm based on the encryption key to obtain encrypted electricity usage data C1, C2, and C3. HMAC signatures are then applied to C1, C2, and C3 based on the verification key to obtain multiple different signature data H1, H2, and H3. It can be understood that fragmenting the user electricity usage data D into three different fragmented electricity usage data D1, D2, and D3 requires an attacker to obtain multiple fragments simultaneously to restore the data, significantly increasing the difficulty of the attack. Even if a fragment is lost or damaged, the data can be restored from the remaining fragments. The AES encryption algorithm balances efficiency and security, making it suitable for resource-constrained smart meters. The HMAC signature verifies that the fragments have not been tampered with and is bound to the timestamp to prevent replay. It should also be noted that in this embodiment, the base station signal scoring model is Score = 0.5 × RSSI + 0.3 × (100% − load factor) + 0.2 × SINR, where RSSI represents signal strength and SINR represents interference. Signal strength is generally required to be > 80dB, and load factor is required to be < 60% (to avoid congestion). SINR represents the channel interference-to-noise ratio, which must be above a threshold (e.g., 15dB). Understandably, in this embodiment, optimizing paths based on real-time signal quality can reduce transmission delay and packet loss.

[0040] Furthermore, step S134 specifically includes: if the scores in the scoring results differ significantly, the smart meter selects a preset number of base stations with higher scores in the scoring results as target base stations, wherein the preset number is the same as the number of shards of the user's electricity usage data; if the scores in the scoring results differ slightly, the smart meter selects the preset number of base stations as target base stations using a random round-robin mechanism. It should be noted that in this embodiment, if the scores in the scoring results differ significantly, for example, the difference is greater than 5%, because the number of shards is 3, the three base stations with the highest scores are selected, namely B1, B2, and B3. If the difference is less than 5%, the random round-robin mechanism is used to select three base stations from all base stations as target base stations. For example, assuming there are a total of six base stations, namely B1, B2, B3, B4, B5, and B6, B1, B2, and B3 are selected as target base stations for the first time, and B4, B5, and B6 are selected as base stations for the second time. It should also be noted that, in this embodiment, after the target base station is determined, the fragmented encrypted data and the fragmented signed data are sent to the main station through the target base station. Specifically, C1 and H1 are sent to the base station B1 with the highest score, C2 and H3 are sent to the base station B2 with the second highest score, and C3 and H3 are sent to the base station B3 with the third highest score. Through base stations B1, B2 and B3, the main station can receive C1, H1, C2, H2, C3 and H3.

[0041] S140. The master station verifies the integrity of the sliced signature data according to the encryption key and the verification key synchronized with the smart meter, and decrypts the sliced encrypted data to generate the user electricity usage data.

[0042] In this embodiment, after the master station receives C1, H1, C2, H2, C3 and H3, it verifies the integrity of the fragmented signature data according to the encryption key and the verification key synchronized by the smart meter and decrypts the fragmented encrypted data to generate the user electricity consumption data. Specifically, Figure 4As shown, step S140 specifically includes steps S141-S144: S141, the master station performs an HMAC signature on the sharded encrypted data based on the verification key synchronized with the smart meter to generate verification sharded signature data; S142, compares the verification sharded signature data with the sharded signature data; S143, if the verification sharded signature data and the sharded signature data are the same, decrypts the sharded encrypted data based on the encryption key synchronized with the smart meter to generate sharded electricity usage data; S144, generates the user electricity usage data based on the sharded electricity usage data. It is understandable that if the verification sharded signature data and the sharded signature data are different, indicating that the signature is invalid and the sharded electricity usage data corresponding to the sharded encrypted data has been tampered with, an alarm is triggered, and the sharded electricity usage data corresponding to the sharded encrypted data is discarded. It should be noted that, in this embodiment, the master station performs HMAC signature on the fragmented encrypted data C1, C2 and C3 according to the verification key synchronized by the smart meter to generate verification fragmented signature data S1, S2 and S3, compares S1 with H1, S2 with H2, and S3 with H3. If S1 is the same as H1, C1 is decrypted to obtain D1; if S1 is different from H1, D1 is discarded. Understandably, if S2 is the same as H2, C2 is decrypted to obtain D2; if S2 is different from H2, D2 is discarded; if S3 is the same as H3, C3 is decrypted to obtain D3; if S3 is different from H3, D3 is discarded.

[0043] Furthermore, step S144 specifically includes: if the number of the sliced electricity consumption data is the same as the number of slices of the user electricity consumption data, directly splicing all the sliced electricity consumption data to obtain the user electricity consumption data; if the number of the sliced electricity consumption data is different from the number of slices, then using an exclusive-or redundant recovery mechanism based on the sliced electricity consumption data to generate the user electricity consumption data. It should be noted that in this embodiment, if three sliced electricity consumption data D1, D2, and D3 are obtained, and the number 3 of the sliced electricity consumption data is the same as the number 3 of slices, then D1, D2, and D3 are directly spliced to generate the user electricity consumption data D; if two sliced electricity consumption data, such as D1 and D2, are obtained, and the number 2 of the sliced electricity consumption data is different from the number 3 of slices, then using an exclusive-or redundant recovery mechanism based on D1 and D2 to generate the user electricity consumption data D.

[0044] To summarize, in this embodiment, a quantum random number generator is used to generate a temporary private key, and a dynamic master key is generated through negotiation with the smart meter based on the temporary private key through an improved Diffie-Hellman algorithm, which can resist quantum attacks and ensure the security of the dynamic master key; an encryption key and a verification key are iteratively generated through a one-way hash function according to the device identification, the current timestamp, and the dynamic master key, thereby realizing the "one-time one-key" of the key, preventing replay attacks, and improving the security of the encryption key and the verification key; the user electricity consumption data is sharded, and then encrypted and signed using the encryption key and the verification key after sharding, and the encrypted sharded encrypted data and the signed sharded signed data are sent to the master station through a dynamically selected base station. The master station generates the user electricity consumption data before sharding based on the encryption key and verification key synchronized with the smart meter, which greatly increases the difficulty of attack and ensures the high security of the smart meter data during transmission.

[0045] Figure 5 1 is a schematic block diagram of a smart meter data transmission system 200 based on dynamic key management provided by an embodiment of the present invention. Figure 5 As shown, it corresponds to the smart meter data transmission method based on dynamic key management applied to the master station 10 and the smart meter 20. The smart meter data transmission system based on dynamic key management 200 includes a unit for executing the smart meter data transmission method based on dynamic key management. Figure 5 The smart meter data transmission system 200 based on dynamic key management includes a first generation unit 101 and a verification generation unit 102 configured in the master station 10, and a second generation unit 201 and an encryption signature unit 202 configured in the smart meter 20.

[0046] Among them, the first generation unit 101 is used by the master station to generate a temporary private key using a quantum random number generator, and based on the temporary private key, perform key negotiation with the smart meter through the improved Diffie-Hellman algorithm to generate a dynamic master key, and send the dynamic master key to the smart meter; the second generation unit 201 is used by the smart meter to generate an encryption key through a one-way hash function according to the device identification, the current timestamp and the dynamic master key, and to generate a verification key through the one-way hash function according to the encryption key; the encryption signature unit 202 is used by the smart meter to encrypt the sharded user electricity usage data according to the encryption key to obtain sharded encrypted data, and to sign the sharded encrypted data according to the verification key to obtain sharded signature data, and send the sharded encrypted data and the sharded signature data to the master station through the dynamically selected base station; the verification generation unit 102 is used by the master station to perform integrity verification on the sharded signature data according to the encryption key and the verification key synchronized by the smart meter, and to decrypt the sharded encrypted data to generate the user electricity usage data.

[0047] In certain embodiments, such as the present embodiment, the first generating unit 101 is specifically configured to: the master station obtains a master station public key by performing elliptic curve scalar multiplication based on the temporary private key, and sends the master station public key to the smart meter, so that the smart meter uses the quantum random number generator to generate a quantum random private key, and obtains a meter public key by performing elliptic curve scalar multiplication based on the quantum random private key; the master station receives the meter public key transmitted back by the smart meter, generates a master station shared key based on the temporary private key and the meter public key, and negotiates with the smart meter based on the master station shared key and the meter shared key generated based on the quantum random private key and the master station public key to obtain a shared key; the master station generates the dynamic master key by encrypting the shared key using the NTRU public key.

[0048] In some embodiments, such as the present embodiment, the second generation unit 201 is specifically configured for the smart meter to concatenate the device identifier and the current timestamp to generate an identification time, and input the identification time into the one-way hash function to generate an initial hash value; the smart meter decodes the dynamic master key using the NTRU private key to obtain the shared key, wherein the NTRU private key and the NTRU public key form a key pair; the smart meter XORs the shared key and the initial hash value to calculate a target hash value; the smart meter concatenates the target hash value with a first preset hash value to obtain a first concatenated hash, and inputs the first concatenated hash into the one-way hash function to obtain a first target hash; the smart meter selects a value preset before the first target hash as the encryption key; the smart meter concatenates the encryption key with a second preset hash value to obtain a second concatenated hash, and inputs the second concatenated hash into the one-way hash function to obtain a second target hash; the smart meter selects a value preset before the second target hash as the verification key.

[0049] In certain embodiments, such as the present embodiment, the encryption signature unit 202 is specifically configured to cause the smart meter to slice the collected user electricity usage data to obtain a plurality of different sliced electricity usage data, and to encrypt the plurality of different sliced electricity usage data using the AES encryption algorithm according to the encryption key to obtain a plurality of different electricity usage encrypted data, and to use the plurality of different electricity usage encrypted data as the sliced encrypted data; the smart meter to perform HMAC signatures on the plurality of different electricity usage encrypted data according to the verification key to obtain a plurality of different signature data, and to use the plurality of different signature data as the sliced signature data; the smart meter to perform signal scoring on the base station between the smart meter and the master station using a preset base station signal scoring model to obtain a scoring result, wherein the base station signal scoring model is established based on signal strength, base station load rate, and interference value; the smart meter selects a target base station based on the scoring result, and sends the sliced encrypted data and the sliced signature data to the master station through the target base station.

[0050] In some embodiments, such as the present embodiment, the encryption signature unit 202 is further configured to select a preset number of base stations with higher scores in the scoring results as the target base stations if the scores in the scoring results differ greatly, wherein the preset number is the same as the number of shards of the user's electricity usage data; if the scores in the scoring results do not differ much, the smart meter uses a random polling mechanism to select a preset number of base stations as the target base stations.

[0051] In certain embodiments, such as the present embodiment, the verification generation unit 102 is specifically configured to cause the master station to perform an HMAC signature on the sharded encrypted data according to the verification key synchronized with the smart meter to generate verification sharded signature data; compare the verification sharded signature data with the sharded signature data; if the verification sharded signature data is the same as the sharded signature data, decrypt the sharded encrypted data according to the encryption key synchronized with the smart meter to generate sharded electricity usage data; and generate the user electricity usage data based on the sharded electricity usage data.

[0052] In certain embodiments, such as the present embodiment, the verification generation unit 102 is further used to directly concatenate all of the sliced electricity usage data to obtain the user electricity usage data if the number of the sliced electricity usage data is the same as the number of slices of the user electricity usage data; if the number of the sliced electricity usage data is different from the number of slices, then generate the user electricity usage data using an XOR redundant recovery mechanism based on the sliced electricity usage data.

[0053] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and such modifications or substitutions are intended to be within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.

Claims

1. A smart meter data transmission method based on dynamic key management, characterized in that: include: The master station uses a quantum random number generator to generate a temporary private key, and performs key negotiation with the smart meter using an improved Diffie-Hellman algorithm based on the temporary private key to generate a dynamic master key, and then sends the dynamic master key to the smart meter; The smart meter generates an encryption key through a one-way hash function according to the device identification, the current timestamp and the dynamic master key, and generates a verification key through the one-way hash function according to the encryption key; The smart meter encrypts the fragmented user electricity consumption data according to the encryption key to obtain fragmented encrypted data, signs the fragmented encrypted data according to the verification key to obtain fragmented signature data, and sends the fragmented encrypted data and the fragmented signature data to the master station through the dynamically selected base station; The master station verifies the integrity of the slice signature data according to the encryption key and the verification key synchronized by the smart meter and decrypts the slice encrypted data to generate the user electricity consumption data; The step of performing key negotiation with the smart meter using an improved Diffie-Hellman algorithm based on the temporary private key to generate a dynamic master key includes: The master station calculates a master station public key according to the temporary private key by elliptic curve scalar multiplication, and sends the master station public key to the smart meter, so that the smart meter uses the quantum random number generator to generate a quantum random private key, and calculates the meter public key according to the quantum random private key by elliptic curve scalar multiplication; The master station receives the meter public key transmitted back by the smart meter, generates a master station shared key based on the temporary private key and the meter public key, and negotiates with the meter shared key generated by the smart meter based on the quantum random private key and the master station public key to obtain a shared key. The master station generates the dynamic master key by encrypting the shared key using the NTRU public key.

2. The method according to claim 1, characterized in that The smart meter generates an encryption key through a one-way hash function according to the device identification, the current timestamp, and the dynamic master key, including: The smart meter concatenates the device identifier and the current timestamp to generate an identification time, and inputs the identification time into the one-way hash function to generate an initial hash value; The smart meter decodes the dynamic master key using the NTRU private key to obtain the shared key, wherein the NTRU private key and the NTRU public key form a key pair; The smart meter calculates a target hash value by performing an XOR operation on the shared key and the initial hash value; The smart meter concatenates the target hash value and the first preset hash value to obtain a first concatenated hash, and inputs the first concatenated hash into the one-way hash function to obtain a first target hash; The smart meter selects a value of a preset bit before the first target hash as the encryption key.

3. The method according to claim 1, characterized in that Generating a verification key according to the encryption key through the one-way hash function includes: The smart meter concatenates the encryption key and a second preset hash value to obtain a second concatenated hash, and inputs the second concatenated hash into the one-way hash function to obtain a second target hash; The smart meter selects the value of a preset digit before the second target hash as the verification key.

4. The method according to claim 1, wherein The smart meter encrypts the fragmented user electricity consumption data according to the encryption key to obtain fragmented encrypted data, and signs the fragmented encrypted data according to the verification key to obtain fragmented signed data, including: The smart meter slices the collected user electricity usage data to obtain a plurality of different sliced electricity usage data, and encrypts the plurality of different sliced electricity usage data using an AES encryption algorithm according to the encryption key to obtain a plurality of different electricity usage encrypted data, and uses the plurality of different electricity usage encrypted data as the sliced encrypted data; The smart meter will perform HMAC signatures on multiple different electricity usage encrypted data according to the verification key to obtain multiple different signature data, and use the multiple different signature data as the fragmented signature data.

5. The method according to claim 1, wherein The sending the fragmented encrypted data and the fragmented signed data to the master station through the dynamically selected base station includes: The smart meter performs a signal scoring on the base station between the smart meter and the master station using a preset base station signal scoring model to obtain a scoring result, wherein the base station signal scoring model is established based on signal strength, base station load rate, and interference value; The smart meter selects a target base station based on the scoring result, and sends the fragmented encrypted data and the fragmented signed data to the master station through the target base station.

6. The method according to claim 5, characterized in that The smart meter selects a target base station based on the scoring result, including: If the scores in the scoring results differ greatly, the smart meter selects a preset number of base stations with higher scores in the scoring results as the target base stations, wherein the preset number is the same as the number of shards of the user electricity consumption data; If the scores in the scoring results are not much different, the smart meter uses a random polling mechanism to select a preset number of base stations as the target base stations.

7. The method according to claim 1, characterized in that The master station verifies the integrity of the slice signature data according to the encryption key and the verification key synchronized by the smart meter and decrypts the slice encrypted data to generate the user electricity usage data, including: The master station performs HMAC signature on the fragmented encrypted data according to the verification key synchronized by the smart meter to generate verification fragment signature data; Comparing the verification slice signature data with the slice signature data; If the verification fragment signature data is identical to the fragment signature data, decrypting the fragment encrypted data according to the encryption key synchronized by the smart meter to generate fragment electricity usage data; The user electricity usage data is generated according to the slice electricity usage data.

8. The method according to claim 7, characterized in that Generating the user electricity usage data according to the slice electricity usage data includes: If the number of the sliced electricity usage data is the same as the number of slices of the user electricity usage data, directly concatenate all the sliced electricity usage data to obtain the user electricity usage data; If the number of the sharded electricity usage data is different from the number of shards, the user electricity usage data is generated based on the sharded electricity usage data using an XOR redundancy recovery mechanism.

9. A smart meter data transmission system based on dynamic key management, characterized in that: include: The first generation unit and the verification generation unit are configured in the master station, and the second generation unit and the encryption signature unit are configured in the smart meter, wherein: The first generating unit is used for the master station to generate a temporary private key using a quantum random number generator, and perform key negotiation with the smart meter based on the temporary private key through an improved Diffie-Hellman algorithm to generate a dynamic master key, and send the dynamic master key to the smart meter; The second generating unit is configured to generate an encryption key by the smart meter according to the device identification, the current timestamp and the dynamic master key through a one-way hash function, and generate a verification key according to the encryption key through the one-way hash function; The encryption signature unit is used for the smart meter to encrypt the fragmented user electricity consumption data according to the encryption key to obtain fragmented encrypted data, and to sign the fragmented encrypted data according to the verification key to obtain fragmented signature data, and to send the fragmented encrypted data and the fragmented signature data to the master station through the dynamically selected base station; The verification generation unit is used for the master station to perform integrity verification on the slice signature data according to the encryption key and the verification key synchronized by the smart meter and to decrypt the slice encrypted data to generate the user electricity consumption data; Among them, the first generation unit is specifically used to: the master station obtains the master station public key through elliptic curve scalar multiplication according to the temporary private key, and sends the master station public key to the smart meter, so that the smart meter uses the quantum random number generator to generate a quantum random private key, and obtains the meter public key through elliptic curve scalar multiplication according to the quantum random private key; the master station receives the meter public key sent back by the smart meter, and generates a master station shared key according to the temporary private key and the meter public key, and negotiates with the meter shared key generated by the smart meter according to the quantum random private key and the master station public key based on the master station shared key to obtain a shared key; the master station encrypts the shared key through the NTRU public key to generate the dynamic master key.

Citation Information

Patent Citations

  • Intelligent power grid safety communication method based on combination cipher

    CN105245326A

  • Data security protection method for intelligent electric meter

    CN111865989A