A method and system for networking and interconnecting electric energy meters in a metering box

By introducing intermediate equipment into the power meter acquisition system and adopting the encryption method, the problem of the security architecture not being adapted after the new equipment is added is solved, and a secure and reliable customer-side data collection and transmission are achieved.

CN115913602BActive Publication Date: 2025-04-25CHINA ELECTRIC POWER RESEARCH INSTITUTE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210287083.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-22
Publication Date
2025-04-25
Estimated Expiration
2042-03-22

AI Technical Summary

Technical Problem

When the existing power meter acquisition system was added to new equipment, it changed the original three-level acquisition mode, resulting in the inability to adapt the security architecture and the inability to achieve secure customer-side data acquisition.

Method used

A method of network interconnection communication of the power meter in the metering box is proposed. By determining the intermediate device at a preset level, communication between the intermediate device and the main station, the concentrator and the power meter in the metering box is established, and key acquisition and data encryption transmission are adopted in the form of transcryption.

Benefits of technology

It realizes the secure customer-side data collection in the new power system, ensures the confidentiality, integrity and authenticity of data transmission, improves the success rate and efficiency of meter reading, and is suitable for the data collection needs of the new power system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115913602B_ABST
    Figure CN115913602B_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for interconnecting and communicating electricity meters within a metering box, comprising: identifying intermediate devices at a preset level; establishing communication between the intermediate devices and the upper-level master station, concentrator, and the lower-level electricity meters within the metering box; the master station sending a meter reading request message to the intermediate devices, causing the intermediate devices to return their own device identifier and the device identifiers of each meter corresponding to the intermediate devices to the master station; the master station obtaining a key based on the received device identifiers using a forward encryption method, and transmitting encrypted data based on the key. This invention constructs a new information flow transmission mode for electricity meter collection, establishing a networked meter reading environment for electricity meters, achieving secure data transmission under the new network architecture, ensuring the confidentiality, integrity, and authenticity of data transmission, and serving as a backup channel for information flow to improve meter reading success rate and efficiency, facilitating data verification and inaccuracy checks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electric energy meters, and more particularly to a method and system for networking and interconnecting electric energy meters in a meter box. Background Art

[0002] With the deepening promotion of the concepts of "carbon neutrality" and "carbon peak" goals, the new power system that is gradually being established will inevitably have the characteristics of "double highs" and "double randomness", which puts forward higher requirements for the electric energy data collection of various energy production equipment, conversion equipment, and pipeline systems in the energy power system. The existing collection system adopts a three-level mode of master station, concentrator, and electricity meter to transmit information flow. In the context of building a new power system, according to the various data requirements of the energy Internet, new equipment such as rail meters, measuring switches, photovoltaic inverters, etc. need to be embedded in the original collection system. The current problem is that adding new equipment to the original collection system will change the original three-level collection mode, and the security architecture of the collection system is based on the original collection mode design, so the existing security solution cannot adapt to the security collection requirements. Therefore, it is necessary to propose a new security networking method to ensure the security of customer-side data collection in the new power system. Summary of the Invention

[0003] The present invention proposes a method and system for networking and interconnecting communication of electric energy meters in a meter box, so as to solve the problem of how to safely realize data collection on the client side.

[0004] In order to solve the above problem, according to one aspect of the present invention, a method for interconnecting and communicating electric energy meters in a meter box is provided, the method comprising:

[0005] Determine an intermediate device at a preset level, and establish communication between the intermediate device and an upper-level master station, a concentrator, and an electric energy meter in a lower-level meter box;

[0006] The master station sends a meter reading request message to the intermediate device, so that the intermediate device returns its own device identification and the device identification of each meter corresponding to the intermediate device to the master station;

[0007] The master station obtains the key based on the received device identification by using a trans-encryption method, and encrypts and transmits data based on the key.

[0008] Preferably, the step of determining an intermediate device at a preset level and establishing communication between the intermediate device and an upper-level master station, a concentrator, and an electric energy meter in a lower-level meter box includes:

[0009] The electric energy meters in the master station, concentrator and meter box are respectively regarded as first-level equipment, second-level equipment and third-level equipment, and a meter box total meter is added between the concentrator and the electric energy meter as an intermediate device of a preset level, so that the intermediate device can obtain the electric energy meter data of the third-level device, and send the electric energy meter data along the concentrator to the master station or communicate directly with the master station, and send the electric energy meter data directly to the master station.

[0010] Preferably, the step of determining an intermediate device at a preset level and establishing communication between the intermediate device and an upper-level master station, a concentrator, and an electric energy meter in a lower-level meter box includes:

[0011] The electric energy meters in the main station, concentrator and meter box are respectively regarded as first-level equipment, second-level equipment and third-level equipment, and any electric energy meter is regarded as an intermediate device of a preset level, so that the intermediate device can obtain the electric energy meter data of the third-level device, and aggregate the electric energy meter data and the electric energy meter data collected by the intermediate device itself and transmit them to the main station.

[0012] Preferably, the step of determining an intermediate device at a preset level and establishing communication between the intermediate device and an upper-level master station, a concentrator, and an electric energy meter in a lower-level meter box includes:

[0013] The master station and concentrator are respectively regarded as first-level equipment and second-level equipment, and each electric energy meter located in the meter box, which originally belongs to the third-level equipment, is regarded as an intermediate device of a preset level, and a network communication chain is established between any two electric energy meters, so that during the communication meter reading process, the master station communicates and notifies any electric energy meter in the meter box, and can control any electric energy meter to read the electric energy meter data of any other electric energy meter in the communication network, and summarize the electric energy meter data and transmit it to the control master station.

[0014] Preferably, the master station obtains the key in a trans-encryption manner based on the received device identification, and performs encrypted transmission of data based on the key, including:

[0015] S1, the master station receives the device ID plaintext message, takes the random number R1, and encrypts it with the cipher machine to obtain the ciphertext E KS1 (R1), using version number, R1, session ID, master certificate C M , MAC field to obtain S1, and use the version number, session ID, master certificate C M 、E KS1 (R1), MAC field and signature S1 form message 1 and send it to the intermediate device;

[0016] S2, the intermediate device verifies the master station certificate C based on message 1 M The validity of decryption E KS1(R1) obtains R1, verifies the legitimacy of signature S1, and the security chip of the intermediate device generates a random number R2 and encrypts it to obtain E KS2 (R2), the version number, session ID, CRL certificate serial number, master certificate serial number, intermediate device certificate package, R2 and R1 use the intermediate device signature private key to sign S2, version number, session ID, E KS2 (R2), CRL certificate serial number, master certificate serial number, intermediate device certificate package, S2 form message 2 and return it to the master;

[0017] S3, the master station verifies the validity of the digital certificate of the intermediate device based on the message 2, uses KS2 to solve the random number R2, and uses the signature public key of the intermediate device to verify the signature S2. After success, the master station generates the pre-master key K, encrypts the ciphertext M1 using the encryption public key Kud of the intermediate device, and converts the ciphertext E obtained in the message 2 into the ciphertext E1. Ks2 (R2) and its master station serial number are uploaded to the certificate server, and the certificate server returns {(E Ks2 (R2) + master certificate serial number + valid status) + CRL signature S3}, use the MAC key TCK and TIV initial vector derived from the pre-master key K, to {(E Ks2 (R2) + certificate serial number + valid status) + signature S3} calculate MAC, generate MAC2, use the master station private key to ciphertext M1, {(E Ks2 (R2) + master certificate serial number + valid status) + CRL signature S3}, MAC2 is signed to form signature S4, ciphertext M1, {(E Ks2 (R2) + master certificate serial number + valid status) + CRL signature S3}, MAC2, S4 form message 3 and send it to the intermediate device;

[0018] S4, the intermediate device verifies the signature S4 based on message 3, and verifies its CRL signature information, the master certificate serial number and E Ks2 (R2) performs verification to determine whether the master station certificate has been revoked. It uses the private key of the intermediate device to decrypt the ciphertext M1 and obtain the pre-master key K. Based on information such as R1 and R2 and the key derivation algorithm, it calculates the master key, data encryption key, MAC key TCK and TIV initialization vector, verifies the correctness of MAC2, and then the intermediate device generates a random number R3 and uses the MAC key TCK and TIV initialization vector to calculate MAC3 for R3. R3 and MAC3 form message 4 and return it to the master station.

[0019] S5, the master station receives message 4 and uses the MAC key and initialization vector to verify the correctness of MAC3; if the verification is successful, the registration is successful, and subsequent messages use the calculated master key, data encryption key, MAC key, initialization vector and random number R3;

[0020] S6: The master station uses the meter ID to calculate the key in the electric energy meter and returns the result to the intermediate device, completing the encryption step. The intermediate device already has the ciphertext of the key corresponding to the electric energy meter in the meter box and can encrypt and transmit data;

[0021] S7, the intermediate device uses the session key to decrypt the key ciphertext of the energy meter n to obtain Kmn;

[0022] S8, the intermediate device generates random numbers R4 and Rt, then identifies Pinfo and the device ID of the energy meter n, and encrypts Pinfo, the energy meter n ID, and R4 using the key Kmn to obtain E Kmn (R4, Rt), use Kmn and Rt to calculate MAC for Pinfo, energy meter n ID, R4, get MAC4, assemble E Kmn (R4, Rt)+MAC4 message 5 is sent to electricity meter n;

[0023] S9, after receiving the message 5 sent by the intermediate device, the energy meter n first decrypts and verifies the MAC, and checks whether Pinfo, ID are consistent with the stored content in the table, and obtains R4, Rt; the energy meter n generates a random number R5, identifies Pinfo and the intermediate device ID, and encrypts Pinfo, ID, R4, and R5 using Kmn to obtain E Kmn (R4, R5, Rt), use Kmn and Rt to calculate MAC for Pinfo, ID, R4, R5, get MAC5, assemble E Kmn (R4, R5, Rt) and MAC5 form message 6 and send it to the intermediate device;

[0024] S10: After receiving message 6 from meter n, the intermediate device first decrypts and verifies the MAC, and verifies whether Pinfo and ID are consistent with the contents of the intermediate device, obtains R4 and R5, and verifies whether R4 and Rt are consistent with the initialization;

[0025] S11, the intermediate device uses R4 and R5 to calculate the session key Ker after initialization authentication; the energy meter n uses R4 and R5 to calculate the session key Ker after initialization authentication, and the intermediate device encrypts R5 with the session key to obtain the ciphertext E Ker (R5), use Ker and Rt to calculate MAC for R5, and get MAC6, E Ker (R5)+MAC6 forms message 7 and sends it to electricity meter n;

[0026] S12, the energy meter n receives message 7, decrypts it, verifies the MAC, and checks whether R5 is consistent with the initiating message, thus completing the session negotiation.

[0027] S13, encrypting and transmitting information between the intermediate device and the corresponding meter.

[0028] Preferably, the method further comprises:

[0029] If a power outage occurs in step S6 and the trans-encryption process fails, the session key negotiation is performed again through the session recovery process, as follows:

[0030] S14, the master station takes the random number R1 and encrypts it with the cipher machine to obtain the ciphertext E KS1 (R1), using version number, R1, session ID, master certificate C M , MAC field is digitally signed to obtain S1, generation, at this time the session ID is 1, which means using the last session key, using the MAC key and initial vector generated by the last session to encrypt the session ID and E KS1 (R1) performs MAC calculation to obtain MAC1, and uses the version number, session ID, master certificate CM, EKS1(R1), MAC field and signature S1 to form message 1 and send it to the intermediate device;

[0031] S15, the intermediate device receives message 1 and verifies the master station certificate C M The validity of decryption E KS1 (R1) obtains R1, verifies the legitimacy of signature S1, verifies the MAC value in message 1, and the security unit of the intermediate device generates random numbers R2 and R3, and encrypts them with the preset key Ks2 to obtain E KS2 (R2), use the new R1, R2 and the original pre-master key K to derive a new master key, data encryption key, MAC key and initial vector, and use the newly generated MAC key and initial vector to encrypt the session ID, E KS2 (R2) and R3 perform MAC calculation to obtain MAC2, version number, session ID, E KS2 (R2), R3, and MAC2 form message 2 and return it to the master station;

[0032] S16, the master station receives message 2 and decrypts E KS2 (R2) Get R2, use the new R1, R2 and the original pre-master key K to derive a new master key, data encryption key, MAC key and initialization vector, verify the correctness of MAC2, verify the correctness of MAC2, and the registration is successful. Subsequent messages use the newly calculated master key, data encryption key, MAC key, initialization vector and random number R3, and then go to step S6.

[0033] According to another aspect of the present invention, a communication system for interconnecting electric energy meters in a meter box is provided, the system comprising:

[0034] a communication establishing unit, configured to determine an intermediate device at a preset level and establish communication between the intermediate device and an upper-level master station, a concentrator, and an electric energy meter in a lower-level meter box;

[0035] a meter reading request sending unit, configured to cause the master station to send a meter reading request message to the intermediate device, so that the intermediate device returns its own device identification and the device identification of each meter corresponding to the intermediate device to the master station;

[0036] The data transmission unit is used to enable the master station to obtain the key in a trans-encryption manner based on the received device identification, and to perform encrypted transmission of data based on the key.

[0037] Preferably, the communication establishing unit determines an intermediate device at a preset level and establishes communication between the intermediate device and an upper-level master station, a concentrator, and an electric energy meter in a lower-level meter box, including:

[0038] The electric energy meters in the master station, concentrator and meter box are respectively regarded as first-level equipment, second-level equipment and third-level equipment, and a meter box total meter is added between the concentrator and the electric energy meter as an intermediate device of a preset level, so that the intermediate device can obtain the electric energy meter data of the third-level device, and send the electric energy meter data along the concentrator to the master station or communicate directly with the master station, and send the electric energy meter data directly to the master station.

[0039] Preferably, the communication establishing unit determines an intermediate device at a preset level and establishes communication between the intermediate device and an upper-level master station, a concentrator, and an electric energy meter in a lower-level meter box, including:

[0040] The electric energy meters in the main station, concentrator and meter box are respectively regarded as first-level equipment, second-level equipment and third-level equipment, and any electric energy meter is regarded as an intermediate device of a preset level, so that the intermediate device can obtain the electric energy meter data of the third-level device, and aggregate the electric energy meter data and the electric energy meter data collected by the intermediate device itself and transmit them to the main station.

[0041] The present invention provides a method and system for networking and interconnecting communication of electric energy meters in a meter box, comprising: determining an intermediate device at a preset level, establishing communication between the intermediate device and the upper master station, concentrator, and electric energy meters in the lower meter box; the master station sending a meter reading request message to the intermediate device, so that the intermediate device returns its own device identification and the device identification of each meter corresponding to the intermediate device to the master station; the master station uses a trans-encryption method to obtain a key based on the received device identification, and encrypts and transmits data based on the key. The present invention establishes a networked meter reading environment for electric energy meters by constructing a new information flow transmission mode for electric energy meter collection, realizes secure data transmission under the new network framework, ensures the confidentiality, integrity, and authenticity of data transmission, and serves as a backup information flow channel to improve the success rate and efficiency of meter reading, which is conducive to the development of data verification and inaccuracy calibration services. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] A more complete understanding of exemplary embodiments of the present invention may be obtained by referring to the following drawings:

[0043] Figure 1 Flowchart of a method 100 for networking and interconnecting electric energy meters in a meter box according to an embodiment of the present invention;

[0044] Figure 2 This is a schematic diagram of performing data transmission by adding an independent device outside the meter box according to Mode 1 of an embodiment of the present invention;

[0045] Figure 3 Schematic diagram of data transmission by modifying an electric energy meter in a meter box according to Mode 2 of an embodiment of the present invention;

[0046] Figure 4 Schematic diagram of data transmission by establishing a networking communication chain between smart electric energy meters in a meter box according to Mode 3 of an embodiment of the present invention;

[0047] Figure 5 This is a flowchart of networking interaction under Mode 1 according to an embodiment of the present invention;

[0048] Figure 6 Flowchart of the interaction between tables in Mode 1 according to an embodiment of the present invention;

[0049] Figure 7 This is a flowchart of network interaction in Mode 2 according to an embodiment of the present invention;

[0050] Figure 8 Flowchart of the interaction between tables in Mode 2 according to an embodiment of the present invention;

[0051] Figure 9Schematic diagram of the structure of a networked communication system 900 for electric energy meters in a meter box according to an embodiment of the present invention. DETAILED DESCRIPTION

[0052] Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings. However, the present invention may be embodied in many different forms and is not limited to the embodiments described herein. These embodiments are provided to provide a thorough and complete disclosure of the present invention and to fully convey the scope of the present invention to those skilled in the art. The terminology used in the exemplary embodiments shown in the accompanying drawings is not intended to limit the present invention. In the accompanying drawings, identical elements are denoted by the same reference numerals.

[0053] Unless otherwise specified, the terms used herein (including technical terms) have the meanings commonly understood by those skilled in the art. In addition, it is understood that terms defined in commonly used dictionaries should be understood to have the same meanings as those in the context of the relevant fields, and should not be understood as idealized or overly formal meanings.

[0054] Figure 1 FIG. 1 is a flow chart of a method 100 for interconnecting and communicating electric energy meters in a meter box according to an embodiment of the present invention. Figure 1 As shown, the method for networking and interconnecting electric energy meters in a meter box provided by an embodiment of the present invention establishes a networked meter reading environment for electric energy meters by constructing a new electric energy meter collection information flow transmission mode, achieving secure data transmission under the new network architecture, ensuring the confidentiality, integrity, and authenticity of data transmission, and serving as a backup information flow channel to improve the success rate and efficiency of meter reading, which is conducive to the development of data verification and inaccuracy correction services. The method 100 for networking and interconnecting electric energy meters in a meter box provided by an embodiment of the present invention begins at step 101. In step 101, an intermediate device at a preset level is determined and communication is established between the intermediate device and the upper-level master station, concentrator, and electric energy meters in the lower-level meter box.

[0055] Preferably, the step of determining an intermediate device at a preset level and establishing communication between the intermediate device and an upper-level master station, a concentrator, and an electric energy meter in a lower-level meter box includes:

[0056] The electric energy meters in the master station, concentrator and meter box are respectively regarded as first-level equipment, second-level equipment and third-level equipment, and a meter box total meter is added between the concentrator and the electric energy meter as an intermediate device of a preset level, so that the intermediate device can obtain the electric energy meter data of the third-level device, and send the electric energy meter data along the concentrator to the master station or communicate directly with the master station, and send the electric energy meter data directly to the master station.

[0057] Preferably, the step of determining an intermediate device at a preset level and establishing communication between the intermediate device and an upper-level master station, a concentrator, and an electric energy meter in a lower-level meter box includes:

[0058] The electric energy meters in the main station, concentrator and meter box are respectively regarded as first-level equipment, second-level equipment and third-level equipment, and any electric energy meter is regarded as an intermediate device of a preset level, so that the intermediate device can obtain the electric energy meter data of the third-level device, and aggregate the electric energy meter data and the electric energy meter data collected by the intermediate device itself and transmit them to the main station.

[0059] Preferably, the step of determining an intermediate device at a preset level and establishing communication between the intermediate device and an upper-level master station, a concentrator, and an electric energy meter in a lower-level meter box includes:

[0060] The master station and concentrator are respectively regarded as first-level equipment and second-level equipment, and each electric energy meter located in the meter box, which originally belongs to the third-level equipment, is regarded as an intermediate device of a preset level, and a network communication chain is established between any two electric energy meters, so that during the communication meter reading process, the master station communicates and notifies any electric energy meter in the meter box, and can control any electric energy meter to read the electric energy meter data of any other electric energy meter in the communication network, and summarize the electric energy meter data and transmit it to the control master station.

[0061] In the present invention, the method of the present invention is improved based on the three-level information flow transmission architecture model of "master station-concentrator-electricity meter" of the original collection system. A type of intermediate device with a preset level of 2.5 is added between the electric energy meter located at the third level and the concentrator located at the second level. The intermediate device can collect data from any meter in the corresponding meter box.

[0062] Different from the information flow architecture, the architecture of the present invention can be implemented in the following ways:

[0063] 1. By adding independent equipment outside the meter box (meter box master meter, measuring switch)

[0064] This mode sets up metering box master meter and other meters outside the metering box as 2.5 level equipment. The structure is as follows Figure 2 shown. Figure 2 The existing "meter-concentrator-master station" is represented by a thin solid line. The data information of the electricity meters is summarized through the concentrator and then transmitted to the master station. When independent equipment such as the meter box master meter is installed, the electricity meter data in the box can be summarized to the master meter along the information flow channel represented by the thick solid line. The meter box master meter can send the data to the master station along the concentrator and can also communicate directly with the master station.

[0065] Among them, compared with the original "electricity meter-concentrator-master station" mode, the communication information flow from the electricity meter to the master station has an additional "electricity meter-total meter-master station", and the two information flows can serve as backup for each other.

[0066] 2. By modifying a certain meter in the meter box

[0067] This mode transforms an electric energy meter in the meter box into a Class 2.5 device. Its structure is as follows: Figure 3 shown. Figure 3 In the diagram, the existing "meter-concentrator-master station" process is represented by thin solid lines. Meter data is aggregated by the concentrator and then transmitted to the master station. Furthermore, meter 1 within the box has been modified to aggregate and transmit information from these meters to the master station. This information flow is represented by thick solid lines.

[0068] 3. Hand-in-hand (module networking) of smart meters in meter boxes

[0069] This mode transforms all the energy meters in the meter box into level 2.5 devices. The energy meters also serve as the third level of the original communication architecture. Its structure is as follows: Figure 4 shown. Figure 4 In the figure, the existing "meter-concentrator-master" information flow pattern remains unchanged, as in Modes 1 and 2, and is represented by thin arrows. A new communication chain, designed for each meter in a single meter box, is established through Bluetooth and other communication modules in the smart meter. During meter reading, the master station notifies any smart meter in the meter box, allowing it to read parameters such as the forward active power, voltage, and current of any other meter in the communication network. These parameters are then transmitted along the meter Bluetooth network chain to the meters communicating with the master station for data aggregation and feedback, represented by thick solid lines.

[0070] Among the above-mentioned implementation methods, the characteristics of Level 2.5 equipment are that it has the function of collecting electricity meter information and can be collected by the concentrator. The installation location is close to the meter box, so the carrier required for communication with the meter in the meter box can be a micro-power wireless (LoRa, etc.), Bluetooth, Zigbee, NB-IOT and other wireless communication modules, or information can be transmitted through the power line carrier inside and outside the meter box.

[0071] In step 102, the master station sends a meter reading request message to the intermediate device, so that the intermediate device returns its own device identification and the device identification of each meter corresponding to the intermediate device to the master station.

[0072] In step 103, the master station obtains the key in a trans-encryption manner based on the received device identification, and performs encrypted transmission of data based on the key.

[0073] Preferably, the master station obtains the key in a trans-encryption manner based on the received device identification, and performs encrypted transmission of data based on the key, including:

[0074] S1, the master station receives the device ID plaintext message, takes the random number R1, and encrypts it with the cipher machine to obtain the ciphertext E KS1 (R1), using version number, R1, session ID, master certificate C M , MAC field to obtain S1, and use the version number, session ID, master certificate C M 、E KS1 (R1), MAC field and signature S1 form message 1 and send it to the intermediate device;

[0075] S2, the intermediate device verifies the master station certificate C based on message 1 M The validity of decryption E KS1 (R1) obtains R1, verifies the legitimacy of signature S1, and the security chip of the intermediate device generates a random number R2 and encrypts it to obtain E KS2 (R2), the version number, session ID, CRL certificate serial number, master certificate serial number, intermediate device certificate package, R2 and R1 use the intermediate device signature private key to sign S2, version number, session ID, E KS2 (R2), CRL certificate serial number, master certificate serial number, intermediate device certificate package, S2 form message 2 and return it to the master;

[0076] S3, the master station verifies the validity of the digital certificate of the intermediate device based on the message 2, uses KS2 to solve the random number R2, and uses the signature public key of the intermediate device to verify the signature S2. After success, the master station generates the pre-master key K, encrypts the ciphertext M1 using the encryption public key Kud of the intermediate device, and converts the ciphertext E obtained in the message 2 into the ciphertext E1. Ks2 (R2) and its master station serial number are uploaded to the certificate server, and the certificate server returns {(E Ks2 (R2) + master certificate serial number + valid status) + CRL signature S3}, use the MAC key TCK and TIV initial vector derived from the pre-master key K, to {(E Ks2 (R2) + certificate serial number + valid status) + signature S3} calculate MAC, generate MAC2, use the master station private key to ciphertext M1, {(E Ks2 (R2) + master certificate serial number + valid status) + CRL signature S3}, MAC2 is signed to form signature S4, ciphertext M1, {(E Ks2 (R2) + master certificate serial number + valid status) + CRL signature S3}, MAC2, S4 form message 3 and send it to the intermediate device;

[0077] S4, the intermediate device verifies the signature S4 based on message 3, and verifies its CRL signature information, the master certificate serial number and E Ks2 (R2) performs verification to determine whether the master station certificate has been revoked. It uses the private key of the intermediate device to decrypt the ciphertext M1 and obtain the pre-master key K. Based on information such as R1 and R2 and the key derivation algorithm, it calculates the master key, data encryption key, MAC key TCK and TIV initialization vector, verifies the correctness of MAC2, and then the intermediate device generates a random number R3 and uses the MAC key TCK and TIV initialization vector to calculate MAC3 for R3. R3 and MAC3 form message 4 and return it to the master station.

[0078] S5, the master station receives message 4 and uses the MAC key and initialization vector to verify the correctness of MAC3; if the verification is successful, the registration is successful, and subsequent messages use the calculated master key, data encryption key, MAC key, initialization vector and random number R3;

[0079] S6: The master station uses the meter ID to calculate the key in the electric energy meter and returns the result to the intermediate device, completing the encryption step. The intermediate device already has the ciphertext of the key corresponding to the electric energy meter in the meter box and can encrypt and transmit data;

[0080] S7, the intermediate device uses the session key to decrypt the key ciphertext of the energy meter n to obtain Kmn;

[0081] S8, the intermediate device generates random numbers R4 and Rt, then identifies Pinfo and the device ID of the energy meter n, and encrypts Pinfo, the energy meter n ID, and R4 using the key Kmn to obtain E Kmn (R4, Rt), use Kmn and Rt to calculate MAC for Pinfo, energy meter n ID, R4, get MAC4, assemble E Kmn (R4, Rt)+MAC4 message 5 is sent to electricity meter n;

[0082] S9, after receiving the message 5 sent by the intermediate device, the energy meter n first decrypts and verifies the MAC, and checks whether Pinfo, ID are consistent with the stored content in the table, and obtains R4, Rt; the energy meter n generates a random number R5, identifies Pinfo and the intermediate device ID, and encrypts Pinfo, ID, R4, and R5 using Kmn to obtain E Kmn (R4, R5, Rt), use Kmn and Rt to calculate MAC for Pinfo, ID, R4, R5, get MAC5, assemble E Kmn (R4, R5, Rt) and MAC5 form message 6 and send it to the intermediate device;

[0083] S10: After receiving message 6 from meter n, the intermediate device first decrypts and verifies the MAC, and verifies whether Pinfo and ID are consistent with the contents of the intermediate device, obtains R4 and R5, and verifies whether R4 and Rt are consistent with the initialization;

[0084] S11, the intermediate device uses R4 and R5 to calculate the session key Ker after initialization authentication; the energy meter n uses R4 and R5 to calculate the session key Ker after initialization authentication, and the intermediate device encrypts R5 with the session key to obtain the ciphertext E Ker (R5), use Ker and Rt to calculate MAC for R5, and get MAC6, E Ker (R5)+MAC6 forms message 7 and sends it to electricity meter n;

[0085] S12, the energy meter n receives message 7, decrypts it, verifies the MAC, and checks whether R5 is consistent with the initiating message, thus completing the session negotiation.

[0086] S13, encrypting and transmitting information between the intermediate device and the corresponding meter.

[0087] Preferably, the method further comprises:

[0088] If a power outage occurs in step S6 and the trans-encryption process fails, the session key negotiation is performed again through the session recovery process, as follows:

[0089] S14, the master station takes the random number R1 and encrypts it with the cipher machine to obtain the ciphertext E KS1 (R1), using version number, R1, session ID, master certificate C M , MAC field is digitally signed to obtain S1, generation, at this time the session ID is 1, which means using the last session key, using the MAC key and initial vector generated by the last session to encrypt the session ID and E KS1 (R1) performs MAC calculation to obtain MAC1, and uses the version number, session ID, master certificate CM, EKS1(R1), MAC field and signature S1 to form message 1 and send it to the intermediate device;

[0090] S15, the intermediate device receives message 1 and verifies the master station certificate C M The validity of decryption E KS1 (R1) obtains R1, verifies the legitimacy of signature S1, verifies the MAC value in message 1, and the security unit of the intermediate device generates random numbers R2 and R3, and encrypts them with the preset key Ks2 to obtain E KS2 (R2), use the new R1, R2 and the original pre-master key K to derive a new master key, data encryption key, MAC key and initial vector, and use the newly generated MAC key and initial vector to encrypt the session ID, E KS2(R2) and R3 perform MAC calculation to obtain MAC2, version number, session ID, E KS2 (R2), R3, and MAC2 form message 2 and return it to the master station;

[0091] S16, the master station receives message 2 and decrypts E KS2 (R2) Get R2, use the new R1, R2 and the original pre-master key K to derive a new master key, data encryption key, MAC key and initialization vector, verify the correctness of MAC2, verify the correctness of MAC2, and the registration is successful. Subsequent messages use the newly calculated master key, data encryption key, MAC key, initialization vector and random number R3, and then go to step S6.

[0092] Currently, electricity meters are equipped with security chips for information security. Usually, the keys between meters are different, making communication impossible. Regarding the acquisition mode proposed in this invention, the security protection under the new networking mode uses a trans-encryption method to obtain the key. The main participants in the process are the meter in the meter box, the corresponding level 2.5 device of the meter box, and the master station. The specific steps are as follows:

[0093] a. The master station sends a meter reading request message to the level 2.5 device;

[0094] b. The Level 2.5 device requests the device ID of each meter in the meter box in turn;

[0095] c. Each meter in the meter box returns its own device ID to the Level 2.5 device;

[0096] d. The level 2.5 device returns the meter device ID and its own device ID to the master station;

[0097] e. After receiving the device ID plaintext message, the master station takes the random number R1 and encrypts it with the cipher machine to obtain the ciphertext E. KS1 (R1), using version number, R1, session ID, master certificate C M , MAC field is digitally signed to obtain S1, where the version number represents the protocol version and the encryption algorithm used. The session ID is 0 when it is first initiated and must be initialized to 0 once a day. For example, within 24 hours, the last session key can be fully utilized. At this time, the session ID is 1 and the MAC is filled with 0 when it is first initiated. The version number, session ID, and master certificate C M 、E KS1 (R1), MAC field and signature S1 form message 1 and send it to the level 2.5 device.

[0098] f.2.5 level device receives message 1 and verifies the master station certificate C M The validity of decryption E KS1(R1) obtains R1, verifies the legitimacy of signature S1, and the security chip of level 2.5 device generates random number R2 and encrypts it to obtain E KS2 (R2), the version number, session ID, CRL certificate serial number, master certificate serial number, 2.5-level device certificate package (2.5-level device signature certificate upper certificate serial number + 2.5-level device signature certificate + 2.5-level device encryption certificate upper certificate serial number + 2.5-level device encryption certificate), R2 and R1 use the 2.5-level device signature private key to sign S2, version number, session ID, E KS2 (R2), CRL certificate serial number, master certificate serial number, 2.5 level device certificate package, S2 form message 2 and return it to the master;

[0099] g. The master station receives message 2, verifies the validity of the 2.5-level device digital certificate, uses KS2 to decrypt the random number R2, and uses the 2.5-level device signature public key to verify the signature S2. After success, the master station generates the pre-master key K, encrypts it with the 2.5-level device encryption public key Kud to obtain the ciphertext M1, and then adds the ciphertext E obtained in message 2 to the ciphertext M1. Ks2 (R2) and its master station serial number are uploaded to the certificate server, and the certificate server returns {(E Ks2 (R2) + master certificate serial number + valid status) + CRL signature S3}, use the MAC key (TCK) derived from the pre-master key K and the TIV initial vector to {(E Ks2 (R2) + certificate serial number + valid status) + signature S3} calculate MAC, generate MAC2, use the master station private key to ciphertext M1, {(E Ks2 (R2) + master certificate serial number + valid status) + CRL signature S3}, MAC2 is signed to form signature S4, ciphertext M1, {(E Ks2 (R2) + master certificate serial number + valid status) + CRL signature S3}, MAC2, S4 form message 3 and send it to the level 2.5 device;

[0100] h.2.5 level device receives message 3, verifies signature S4, and checks its CRL signature information, master certificate serial number and E Ks2 (R2) performs verification to determine whether the master station certificate has been revoked. It uses the private key of the Level 2.5 device to decrypt the ciphertext M1 and obtain the pre-master key K. Based on information such as R1 and R2 and the key derivation algorithm, it calculates the master key, data encryption key, MAC key (TCK), and TIV initialization vector. It verifies the correctness of MAC2. The Level 2.5 device then generates a random number R3 and uses the MAC key (TCK) and TIV initialization vector to calculate MAC3 for R3. R3 and MAC3 form message 4 and return it to the master station.

[0101] i. The master station receives message 4 and uses the MAC key and initialization vector to verify the correctness of MAC3. If verification is successful, registration is successful. Subsequent messages use the calculated master key, data encryption key, MAC key, initialization vector, and random number R3.

[0102] j. The master station uses the meter ID to calculate the key in the energy meter and returns the result to the Level 2.5 device. This completes the encryption step. The Level 2.5 device now has the ciphertext of the key corresponding to the meter box energy meter and can encrypt and transmit data.

[0103] The k.2.5 level device uses the session key to decrypt the key ciphertext of the energy meter n to obtain Kmn;

[0104] 1.2.5 level device generates random numbers R4 and Rt, then identifies Pinfo and the ID of the energy meter n, and encrypts Pinfo, the ID of the energy meter n, and R4 using the key Kmn to obtain E Kmn (R4, Rt), use Kmn and Rt to calculate MAC for Pinfo, energy meter n ID, R4, get MAC4, assemble E Kmn (R4, Rt)+MAC4 message 5 is sent to electricity meter n;

[0105] m. After receiving message 5 from the Level 2.5 device, meter n first decrypts and verifies the MAC, and checks whether Pinfo and ID are consistent with the contents stored in the meter, obtaining R4 and Rt; meter n generates a random number R5, identifies Pinfo and the Level 2.5 device ID, and encrypts Pinfo, ID, R4, and R5 using Kmn to obtain E Kmn (R4, R5, Rt), use Kmn and Rt to calculate MAC for Pinfo, ID, R4, R5, get MAC5, assemble E Kmn (R4, R5, Rt) and MAC5 form message 6 and send it to the level 2.5 device.

[0106] After receiving message 6 from meter n, the Level 2.5 device first decrypts and verifies the MAC address. It then verifies that Pinfo and ID are consistent with those of the Level 2.5 device, obtains R4 and R5, and verifies that R4 and Rt are consistent with those at the time of initiation.

[0107] o. The level 2.5 device uses R4 and R5 to calculate the session key Ker after initialization and authentication; the energy meter n uses R4 and R5 to calculate the session key Ker after initialization and authentication, and the level 2.5 device encrypts R5 with the session key to obtain the ciphertext E Ker (R5), use Ker and Rt to calculate MAC for R5, and get MAC6, E Ker(R5)+MAC6 forms message 7 and sends it to electricity meter n;

[0108] p. The energy meter n receives message 7, decrypts and verifies MAC, checks whether R5 is consistent with the initiation, and completes the session negotiation;

[0109] q. Perform encrypted transmission of information between the Level 2.5 device and the corresponding meter; the subsequent communication steps with Energy Meter 2 and Energy Meter 3 are the same as kq.

[0110] If a power outage occurs during step j, causing the encryption process to fail, the session key can be negotiated again through the session recovery process. The steps are as follows:

[0111] r. The master station takes the random number R1 and encrypts it with a cipher machine to obtain the ciphertext E KS1 (R1), using version number, R1, session ID, master certificate C M , MAC field is digitally signed to obtain S1, generation, at this time the session ID is 1, which means using the last session key, using the MAC key and initial vector generated by the last session to encrypt the session ID and E KS1 (R1) performs MAC calculation to obtain MAC1, and uses the version number, session ID, master certificate CM, EKS1(R1), MAC field and signature S1 to form message 1 and send it to the level 2.5 device.

[0112] s.2.5 level device receives message 1 and verifies the master station certificate C M The validity of decryption E KS1 (R1) obtains R1, verifies the legitimacy of signature S1, verifies the MAC value in message 1, and the security unit of the level 2.5 device generates random numbers R2 and R3, and encrypts them with the preset key Ks2 to obtain E KS2 (R2), use the new R1, R2 and the original pre-master key K to derive a new master key, data encryption key, MAC key and initial vector, and use the newly generated MAC key and initial vector to encrypt the session ID, E KS2 (R2) and R3 perform MAC calculation to obtain MAC2, version number, session ID, E KS2 (R2), R3, and MAC2 form message 2 and return it to the master station;

[0113] t. The master station receives message 2 and decrypts E KS2 (R2) Get R2, use the new R1, R2 and the original pre-master key K to derive a new master key, data encryption key, MAC key and initialization vector, verify the correctness of MAC2, verify the correctness of MAC2, and the registration is successful. Subsequent messages use the newly calculated master key, data encryption key, MAC key, initialization vector and random number R3, and then go to step j.

[0114] In mode 1, the networking process between the master station, level 2.5 equipment, and the electric energy meter in the meter box is shown as follows: Figure 5 As shown, through interaction, the level 2.5 device can finally communicate with the meter in the corresponding meter box with the same key. The communication process is as follows Figure 6 shown.

[0115] The difference between Mode 2 and Mode 3 is only the modification of a single meter in the box or the modification of all meters in the box, which results in the difference in the way the master station interacts with a specific meter and interacts with any meter. Figure 7 This is the network interaction process between meters under mode 2, which is also applicable to mode 3; the communication process between meters under mode 2 is as follows Figure 8 As shown, the process also applies to Mode 3.

[0116] The method of the present invention proposes for the first time a method for networking and interconnecting communication of electric energy meters in a metering box. Under the mode of the original three-level acquisition system, a new 2.5-level information flow transmission layer is added, and the key is transmitted by means of trans-encryption to ensure that the new device can communicate normally with the corresponding meter; application mode 1 uses meters such as guide rail meters as 2.5-level devices, and application mode 2 uses the smart meter itself as a 2.5-level device to carry out hand-in-hand connection of the meters in the metering box. If the communication with any meter is successful, the data of the entire box meter can be collected; the newly added mode can serve as a backup for the original three-level acquisition mode to improve the acquisition success rate, and at the same time can count the total electricity consumption data of the meters in the box, which can be beneficial to the development of services such as anti-electricity theft and replacement of inaccurate meters to a certain extent; this design has good scalability.

[0117] The schematic diagram of the structure of the electric energy meter networking and interconnection communication system 900 is shown in FIG. Figure 9 As shown, the communication system 900 for interconnecting electric energy meters in a meter box provided by the embodiment of the present invention includes: a communication establishing unit 901 , a meter reading request sending unit 902 and a data transmission unit 903 .

[0118] Preferably, the communication establishing unit 901 is used to determine an intermediate device at a preset level, and establish communication between the intermediate device and an upper-level master station, a concentrator, and an electric energy meter in a lower-level meter box.

[0119] Preferably, the communication establishing unit 901 determines an intermediate device at a preset level and establishes communication between the intermediate device and an upper-level master station, a concentrator, and an electric energy meter in a lower-level meter box, including:

[0120] The electric energy meters in the master station, concentrator and meter box are respectively regarded as first-level equipment, second-level equipment and third-level equipment, and a meter box total meter is added between the concentrator and the electric energy meter as an intermediate device of a preset level, so that the intermediate device can obtain the electric energy meter data of the third-level device, and send the electric energy meter data along the concentrator to the master station or communicate directly with the master station, and send the electric energy meter data directly to the master station.

[0121] Preferably, the communication establishing unit 901 determines an intermediate device at a preset level and establishes communication between the intermediate device and an upper-level master station, a concentrator, and an electric energy meter in a lower-level meter box, including:

[0122] The electric energy meters in the main station, concentrator and meter box are respectively regarded as first-level equipment, second-level equipment and third-level equipment, and any electric energy meter is regarded as an intermediate device of a preset level, so that the intermediate device can obtain the electric energy meter data of the third-level device, and aggregate the electric energy meter data and the electric energy meter data collected by the intermediate device itself and transmit them to the main station.

[0123] Preferably, the communication establishing unit 901 determines an intermediate device at a preset level and establishes communication between the intermediate device and an upper-level master station, a concentrator, and an electric energy meter in a lower-level meter box, including:

[0124] The master station and concentrator are respectively regarded as first-level equipment and second-level equipment, and each electric energy meter located in the meter box, which originally belongs to the third-level equipment, is regarded as an intermediate device of a preset level, and a network communication chain is established between any two electric energy meters, so that during the communication meter reading process, the master station communicates and notifies any electric energy meter in the meter box, and can control any electric energy meter to read the electric energy meter data of any other electric energy meter in the communication network, and summarize the electric energy meter data and transmit it to the control master station.

[0125] Preferably, the meter reading request sending unit 902 is configured to enable the master station to send a meter reading request message to the intermediate device, so that the intermediate device returns its own device identification and the device identification of each meter corresponding to the intermediate device to the master station.

[0126] Preferably, the data transmission unit 903 is configured to enable the master station to obtain the key in a trans-encryption manner based on the received device identification, and to perform encrypted data transmission based on the key.

[0127] Preferably, the data transmission unit 903 enables the master station to obtain the key in a trans-encryption manner based on the received device identification, and encrypt and transmit data based on the key, including:

[0128] S1, the master station receives the device ID plaintext message, takes the random number R1, and encrypts it with the cipher machine to obtain the ciphertext E KS1 (R1), using version number, R1, session ID, master certificate C M , MAC field to obtain S1, and use the version number, session ID, master certificate C M 、E KS1 (R1), MAC field and signature S1 form message 1 and send it to the intermediate device;

[0129] S2, the intermediate device verifies the master station certificate C based on message 1 M The validity of decryption E KS1 (R1) obtains R1, verifies the legitimacy of signature S1, and the security chip of the intermediate device generates a random number R2 and encrypts it to obtain E KS2 (R2), the version number, session ID, CRL certificate serial number, master certificate serial number, intermediate device certificate package, R2 and R1 use the intermediate device signature private key to sign S2, version number, session ID, E KS2 (R2), CRL certificate serial number, master certificate serial number, intermediate device certificate package, S2 form message 2 and return it to the master;

[0130] S3, the master station verifies the validity of the digital certificate of the intermediate device based on the message 2, uses KS2 to solve the random number R2, and uses the signature public key of the intermediate device to verify the signature S2. After success, the master station generates the pre-master key K, encrypts the ciphertext M1 using the encryption public key Kud of the intermediate device, and converts the ciphertext E obtained in the message 2 into the ciphertext E1. Ks2 (R2) and its master station serial number are uploaded to the certificate server, and the certificate server returns {(E Ks2 (R2) + master certificate serial number + valid status) + CRL signature S3}, use the MAC key TCK and TIV initial vector derived from the pre-master key K, to {(E Ks2 (R2) + certificate serial number + valid status) + signature S3} calculate MAC, generate MAC2, use the master station private key to ciphertext M1, {(E Ks2 (R2) + master certificate serial number + valid status) + CRL signature S3}, MAC2 is signed to form signature S4, ciphertext M1, {(E Ks2 (R2) + master certificate serial number + valid status) + CRL signature S3}, MAC2, S4 form message 3 and send it to the intermediate device;

[0131] S4, the intermediate device verifies the signature S4 based on message 3, and verifies its CRL signature information, the master certificate serial number and E Ks2(R2) performs verification to determine whether the master station certificate has been revoked. It uses the private key of the intermediate device to decrypt the ciphertext M1 and obtain the pre-master key K. Based on information such as R1 and R2 and the key derivation algorithm, it calculates the master key, data encryption key, MAC key TCK and TIV initialization vector, verifies the correctness of MAC2, and then the intermediate device generates a random number R3 and uses the MAC key TCK and TIV initialization vector to calculate MAC3 for R3. R3 and MAC3 form message 4 and return it to the master station.

[0132] S5, the master station receives message 4 and uses the MAC key and initialization vector to verify the correctness of MAC3; if the verification is successful, the registration is successful, and subsequent messages use the calculated master key, data encryption key, MAC key, initialization vector and random number R3;

[0133] S6: The master station uses the meter ID to calculate the key in the electric energy meter and returns the result to the intermediate device, completing the encryption step. The intermediate device already has the ciphertext of the key corresponding to the electric energy meter in the meter box and can encrypt and transmit data;

[0134] S7, the intermediate device uses the session key to decrypt the key ciphertext of the energy meter n to obtain Kmn;

[0135] S8, the intermediate device generates random numbers R4 and Rt, then identifies Pinfo and the device ID of the energy meter n, and encrypts Pinfo, the energy meter n ID, and R4 using the key Kmn to obtain E Kmn (R4, Rt), use Kmn and Rt to calculate MAC for Pinfo, energy meter n ID, R4, get MAC4, assemble E Kmn (R4, Rt)+MAC4 message 5 is sent to electricity meter n;

[0136] S9, after receiving the message 5 sent by the intermediate device, the energy meter n first decrypts and verifies the MAC, and checks whether Pinfo, ID are consistent with the stored content in the table, and obtains R4, Rt; the energy meter n generates a random number R5, identifies Pinfo and the intermediate device ID, and encrypts Pinfo, ID, R4, and R5 using Kmn to obtain E Kmn (R4, R5, Rt), use Kmn and Rt to calculate MAC for Pinfo, ID, R4, R5, get MAC5, assemble E Kmn (R4, R5, Rt) and MAC5 form message 6 and send it to the intermediate device;

[0137] S10: After receiving message 6 from meter n, the intermediate device first decrypts and verifies the MAC, and verifies whether Pinfo and ID are consistent with the contents of the intermediate device, obtains R4 and R5, and verifies whether R4 and Rt are consistent with the initialization;

[0138] S11, the intermediate device uses R4 and R5 to calculate the session key Ker after initialization authentication; the energy meter n uses R4 and R5 to calculate the session key Ker after initialization authentication, and the intermediate device encrypts R5 with the session key to obtain the ciphertext E Ker (R5), use Ker and Rt to calculate MAC for R5, and get MAC6, E Ker (R5)+MAC6 forms message 7 and sends it to electricity meter n;

[0139] S12, the energy meter n receives message 7, decrypts it, verifies the MAC, and checks whether R5 is consistent with the initiating message, thus completing the session negotiation.

[0140] S13, encrypting and transmitting information between the intermediate device and the corresponding meter.

[0141] Preferably, the data transmission unit 903 further includes:

[0142] If a power outage occurs in step S6 and the trans-encryption process fails, the session key negotiation is performed again through the session recovery process, as follows:

[0143] S14, the master station takes the random number R1 and encrypts it with the cipher machine to obtain the ciphertext E KS1 (R1), using version number, R1, session ID, master certificate C M , MAC field is digitally signed to obtain S1, generation, at this time the session ID is 1, which means using the last session key, using the MAC key and initial vector generated by the last session to encrypt the session ID and E KS1 (R1) performs MAC calculation to obtain MAC1, and uses the version number, session ID, master certificate CM, EKS1(R1), MAC field and signature S1 to form message 1 and send it to the intermediate device;

[0144] S15, the intermediate device receives message 1 and verifies the master station certificate C M The validity of decryption E KS1 (R1) obtains R1, verifies the legitimacy of signature S1, verifies the MAC value in message 1, and the security unit of the intermediate device generates random numbers R2 and R3, and encrypts them with the preset key Ks2 to obtain E KS2 (R2), use the new R1, R2 and the original pre-master key K to derive a new master key, data encryption key, MAC key and initial vector, and use the newly generated MAC key and initial vector to encrypt the session ID, E KS2(R2) and R3 perform MAC calculation to obtain MAC2, version number, session ID, E KS2 (R2), R3, and MAC2 form message 2 and return it to the master station;

[0145] S16, the master station receives message 2 and decrypts E KS2 (R2) Get R2, use the new R1, R2 and the original pre-master key K to derive a new master key, data encryption key, MAC key and initialization vector, verify the correctness of MAC2, verify the correctness of MAC2, and the registration is successful. Subsequent messages use the newly calculated master key, data encryption key, MAC key, initialization vector and random number R3, and then go to step S6.

[0146] The electric energy meter networking and interconnection communication system 900 in the meter box according to the embodiment of the present invention corresponds to the electric energy meter networking and interconnection communication method 100 in another embodiment of the present invention, and will not be described in detail here.

[0147] The invention has been described above with reference to a few embodiments. However, it is readily apparent to a person skilled in the art that other embodiments than the ones disclosed above are equally within the scope of the invention, as defined by the appended patent claims.

[0148] Generally, all terms used in the claims are to be interpreted according to their ordinary meaning in the technical field, unless explicitly defined otherwise herein. All references to "a / the [means, component, etc.]" are to be interpreted openly as referring to at least one instance of the means, component, etc., unless explicitly stated otherwise. The steps of any method disclosed herein do not necessarily need to be performed in the exact order disclosed, unless explicitly stated otherwise.

[0149] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0150] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can 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 process. 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.

[0151] 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.

[0152] 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.

[0153] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered by the scope of protection of the claims of the present invention.

Claims

1. A method for networking and interconnecting electric energy meters in a metering box, characterized in that: The method comprises: Determine an intermediate device at a preset level, and establish communication between the intermediate device and an upper master station, a concentrator, and an electric energy meter in a lower meter box; The master station sends a meter reading request message to the intermediate device, so that the intermediate device returns its own device identification and the device identification of each meter corresponding to the intermediate device to the master station; The master station obtains the key based on the received device identification by trans-encryption, and encrypts and transmits the data based on the key; The master station obtains the key by trans-encryption based on the received device identification, and performs encrypted transmission of data based on the key, including: S1, the master station receives the device ID plaintext message and takes the random number R1, and encrypts it with the cipher machine to obtain the ciphertext E KS1 (R1), using version number, R1, session ID, master certificate C M , MAC field to obtain S1, and use the version number, session ID, master certificate C M 、E KS1 (R1), the MAC field and the signature S1 form a message 1 and send it to the intermediate device; S2, the intermediate device verifies the master station certificate C based on message 1 M The validity of decryption E KS1 (R1) gets R1, verifies the legitimacy of signature S1, and the security chip of the intermediate device generates a random number R2, which is encrypted to get E KS2 (R2), the version number, session ID, CRL certificate serial number, master certificate serial number, intermediate device certificate package, R2 and R1 use the intermediate device signature private key to sign S2, version number, session ID, E KS2 (R2), CRL certificate serial number, master station certificate serial number, intermediate device certificate package, S2 form message 2 and return it to the master station; S3, the master station verifies the validity of the digital certificate of the intermediate device based on the message 2, uses KS2 to solve the random number R2, and uses the signature public key of the intermediate device to verify the signature S2. After success, the master station generates the pre-master key K, uses the encryption public key Kud of the intermediate device to encrypt the ciphertext M1, and converts the ciphertext E obtained in the message 2 into Ks2 (R2) and its master station serial number are uploaded to the certificate server, and the certificate server returns {(E Ks2 (R2) + master certificate serial number + valid status) + CRL signature S3}, use the MAC key TCK and TIV initial vector derived from the pre-master key K to {(E Ks2 (R2) + certificate serial number + valid status) + signature S3} calculate MAC, generate MAC2, use the master station private key to ciphertext M1, {(E Ks2 (R2) + master certificate serial number + valid status) + CRL signature S3}, MAC2 is signed to form signature S4, ciphertext M1, {(E Ks2 (R2) + master certificate serial number + valid status) + CRL signature S3}, MAC2, S4 form message 3 and send it to the intermediate device; S4, the intermediate device verifies the signature S4 based on message 3, and verifies its CRL signature information, the master certificate serial number and E Ks2 (R2) performs verification to determine whether the master station certificate has been revoked, uses the private key of the intermediate device to decrypt the ciphertext M1, obtains the pre-master key K, calculates the master key, data encryption key, MAC key TCK and TIV initial vector based on information such as R1 and R2 combined with the key derivation algorithm, verifies the correctness of MAC2, and then the intermediate device generates a random number R3 and uses the MAC key TCK and TIV initial vector to calculate MAC3 for R3. R3 and MAC3 form message 4 and return it to the master station; S5, the master station receives message 4, uses the MAC key and initial vector to verify the correctness of MAC3; if the verification is successful, the registration is successful, and the subsequent messages use the calculated master key, data encryption key, MAC key, initial vector and random number R3; S6, the master station uses the meter ID to calculate the key in the electric energy meter, and the result is returned to the intermediate device to complete the encryption step. The intermediate device already has the ciphertext of the key corresponding to the electric energy meter in the meter box, and can encrypt and transmit data; S7, the intermediate device uses the session key to decrypt the key ciphertext of the energy meter n to obtain Kmn; S8, the intermediate device generates random numbers R4 and Rt, then identifies Pinfo and the device ID of the energy meter n, and encrypts Pinfo, the energy meter n ID, and R4 using the key Kmn to obtain E Kmn (R4, Rt), use Kmn and Rt to calculate MAC for Pinfo, meter ID, R4, and get MAC4, assemble E Kmn (R4, Rt)+MAC4 message 5 is sent to the energy meter n; S9, after receiving the message 5 sent by the intermediate device, the energy meter n first decrypts and verifies the MAC, and checks whether Pinfo, ID and the content stored in the table are consistent, and obtains R4, Rt; the energy meter n generates a random number R5, identifies Pinfo and the intermediate device ID, and encrypts Pinfo, ID, R4, R5 using Kmn to obtain E Kmn (R4, R5, Rt), use Kmn and Rt to calculate MAC for Pinfo, ID, R4, R5, get MAC5, assemble E Kmn (R4, R5, Rt) and MAC5 form message 6 and send it to the intermediate device; S10, after the intermediate device receives the message 6 sent by the electric energy meter n, the intermediate device first decrypts and verifies the MAC, and verifies whether Pinfo and ID are consistent with the content of the intermediate device, obtains R4 and R5, and verifies whether R4 and Rt are consistent with the initiation; S11, the intermediate device uses R4 and R5 to calculate the session key Ker after initialization authentication; the energy meter n uses R4 and R5 to calculate the session key Ker after initialization authentication, and the intermediate device encrypts R5 with the session key to obtain the ciphertext E Ker (R5), use Ker and Rt to calculate MAC for R5, and get MAC6, E Ker (R5)+MAC6 forms message 7 and sends it to the energy meter n; S12, the energy meter n receives message 7, decrypts and verifies MAC, checks whether R5 is consistent with the initiation, and completes the session negotiation; S13, encrypting and transmitting the information between the intermediate device and the corresponding meter.

2. The method according to claim 1, characterized in that The step of determining an intermediate device at a preset level and establishing communication between the intermediate device and an upper master station, a concentrator and an electric energy meter in a lower meter box includes: The electric energy meters in the main station, concentrator and meter box are respectively regarded as first-level equipment, second-level equipment and third-level equipment, and a meter box total meter is added between the concentrator and the electric energy meter as an intermediate device of a preset level, so that the intermediate device can obtain the electric energy meter data of the third-level device, and send the electric energy meter data along the concentrator to the main station or directly communicate with the main station, and send the electric energy meter data directly to the main station.

3. The method according to claim 1, characterized in that The step of determining an intermediate device at a preset level and establishing communication between the intermediate device and an upper master station, a concentrator and an electric energy meter in a lower meter box includes: The electric energy meters in the main station, concentrator and meter box are respectively regarded as first-level equipment, second-level equipment and third-level equipment, and any electric energy meter is regarded as an intermediate device of a preset level, so that the intermediate device can obtain the electric energy meter data of the third-level device, and aggregate the electric energy meter data and the electric energy meter data collected by the intermediate device itself and transmit them to the main station.

4. The method according to claim 1, characterized in that: The step of determining an intermediate device at a preset level and establishing communication between the intermediate device and an upper master station, a concentrator and an electric energy meter in a lower meter box includes: The master station and concentrator are respectively regarded as first-level equipment and second-level equipment, and each electric energy meter located in the meter box, which originally belongs to the third-level equipment, is regarded as an intermediate device of a preset level, and a networking communication chain is established between any two electric energy meters, so that during the communication meter reading process, the master station communicates and notifies any electric energy meter in the meter box, and can control any electric energy meter to read the electric energy meter data of any other electric energy meter in the communication network, and the electric energy meter data is summarized and transmitted to the master station.

5. The method according to claim 1, characterized in that: The method further comprises: When a power outage occurs in step S6 and causes the trans-encryption process to fail, the session key negotiation is performed again through the session recovery process, and the steps are as follows: S14, the master station takes the random number R1 and encrypts it with the cipher machine to obtain the ciphertext E KS1 (R1), using version number, R1, session ID, master certificate C M , MAC field is digitally signed to obtain S1, generation, at this time, the session ID is 1, which means that the session key is used, and the MAC key and initial vector generated by the last session are used to sign the session ID and E KS1 (R1) performs MAC calculation to obtain MAC1, and uses the version number, session ID, master certificate CM, EKS1(R1), MAC field and signature S1 to form message 1 and send it to the intermediate device; S15, the intermediate device receives message 1 and verifies the master station certificate C M The validity of decryption E KS1 (R1) Get R1, verify the legitimacy of signature S1, verify the MAC value in message 1, the security unit of the intermediate device generates random numbers R2 and R3, and encrypts them with the preset key Ks2 to get E KS2 (R2), use the new R1, R2 and the original pre-master key K to derive a new master key, data encryption key, MAC key and initial vector, and use the newly generated MAC key and initial vector to encrypt the session ID, E KS2 (R2) and R3 perform MAC calculation to obtain MAC2, version number, session ID, E KS2 (R2), R3, and MAC2 form message 2 and return it to the master station; S16, the master station receives message 2 and decrypts E KS2 (R2) Get R2, use the new R1, R2 and the original pre-master key K to derive a new master key, data encryption key, MAC key and initial vector, verify the correctness of MAC2, the verification passes, the registration is successful, and subsequent messages use the newly calculated master key, data encryption key, MAC key, initial vector and random number R3, and then go to step S6.

6. A network interconnection communication system for electric energy meters in a meter box, characterized in that: The system comprises: A communication establishing unit, used to determine an intermediate device at a preset level, and establish communication between the intermediate device and an upper-level master station, a concentrator, and an electric energy meter in a lower-level meter box; A meter reading request sending unit, used to enable the master station to send a meter reading request message to the intermediate device, so that the intermediate device returns its own device identification and the device identification of each meter corresponding to the intermediate device to the master station; The data transmission unit is used to enable the master station to obtain the key in a trans-encryption manner based on the received device identification, and to perform encrypted transmission of data based on the key; The data transmission unit enables the master station to obtain the key by trans-encryption based on the received device identification, and encrypts and transmits data based on the key, including: S1, the master station receives the device ID plaintext message and takes the random number R1, and encrypts it with the cipher machine to obtain the ciphertext E KS1 (R1), using version number, R1, session ID, master certificate C M , MAC field to obtain S1, and use the version number, session ID, master certificate C M 、E KS1 (R1), the MAC field and the signature S1 form a message 1 and send it to the intermediate device; S2, the intermediate device verifies the master station certificate C based on message 1 M The validity of decryption E KS1 (R1) gets R1, verifies the legitimacy of signature S1, and the security chip of the intermediate device generates a random number R2, which is encrypted to get E KS2 (R2), the version number, session ID, CRL certificate serial number, master certificate serial number, intermediate device certificate package, R2 and R1 use the intermediate device signature private key to sign S2, version number, session ID, E KS2 (R2), CRL certificate serial number, master station certificate serial number, intermediate device certificate package, S2 form message 2 and return it to the master station; S3, the master station verifies the validity of the digital certificate of the intermediate device based on the message 2, uses KS2 to solve the random number R2, and uses the signature public key of the intermediate device to verify the signature S2. After success, the master station generates the pre-master key K, uses the encryption public key Kud of the intermediate device to encrypt the ciphertext M1, and converts the ciphertext E obtained in the message 2 into Ks2 (R2) and its master station serial number are uploaded to the certificate server, and the certificate server returns {(E Ks2 (R2) + master certificate serial number + valid status) + CRL signature S3}, use the MAC key TCK and TIV initial vector derived from the pre-master key K to {(E Ks2 (R2) + certificate serial number + valid status) + signature S3} calculate MAC, generate MAC2, use the master station private key to ciphertext M1, {(E Ks2 (R2) + master certificate serial number + valid status) + CRL signature S3}, MAC2 is signed to form signature S4, ciphertext M1, {(E Ks2 (R2) + master certificate serial number + valid status) + CRL signature S3}, MAC2, S4 form message 3 and send it to the intermediate device; S4, the intermediate device verifies the signature S4 based on message 3, and verifies its CRL signature information, the master certificate serial number and E Ks2 (R2) performs verification to determine whether the master station certificate has been revoked, uses the private key of the intermediate device to decrypt the ciphertext M1, obtains the pre-master key K, calculates the master key, data encryption key, MAC key TCK and TIV initial vector based on information such as R1 and R2 combined with the key derivation algorithm, verifies the correctness of MAC2, and then the intermediate device generates a random number R3 and uses the MAC key TCK and TIV initial vector to calculate MAC3 for R3. R3 and MAC3 form message 4 and return it to the master station; S5, the master station receives message 4, uses the MAC key and initial vector to verify the correctness of MAC3; if the verification is successful, the registration is successful, and the subsequent messages use the calculated master key, data encryption key, MAC key, initial vector and random number R3; S6, the master station uses the meter ID to calculate the key in the electric energy meter, and the result is returned to the intermediate device to complete the encryption step. The intermediate device already has the ciphertext of the key corresponding to the electric energy meter in the meter box, and can encrypt and transmit data; S7, the intermediate device uses the session key to decrypt the key ciphertext of the energy meter n to obtain Kmn; S8, the intermediate device generates random numbers R4 and Rt, then identifies Pinfo and the device ID of the energy meter n, and encrypts Pinfo, the energy meter n ID, and R4 using the key Kmn to obtain E Kmn (R4, Rt), use Kmn and Rt to calculate MAC for Pinfo, meter ID, R4, and get MAC4, assemble E Kmn (R4, Rt)+MAC4 message 5 is sent to the energy meter n; S9, after receiving the message 5 sent by the intermediate device, the energy meter n first decrypts and verifies the MAC, and checks whether Pinfo, ID and the content stored in the table are consistent, and obtains R4, Rt; the energy meter n generates a random number R5, identifies Pinfo and the intermediate device ID, and encrypts Pinfo, ID, R4, R5 using Kmn to obtain E Kmn (R4, R5, Rt), use Kmn and Rt to calculate MAC for Pinfo, ID, R4, R5, get MAC5, assemble E Kmn (R4, R5, Rt) and MAC5 form message 6 and send it to the intermediate device; S10, after the intermediate device receives the message 6 sent by the electric energy meter n, the intermediate device first decrypts and verifies the MAC, and verifies whether Pinfo and ID are consistent with the content of the intermediate device, obtains R4 and R5, and verifies whether R4 and Rt are consistent with the initiation; S11, the intermediate device uses R4 and R5 to calculate the session key Ker after initialization authentication; the energy meter n uses R4 and R5 to calculate the session key Ker after initialization authentication, and the intermediate device encrypts R5 with the session key to obtain the ciphertext E Ker (R5), use Ker and Rt to calculate MAC for R5, and get MAC6, E Ker (R5)+MAC6 forms message 7 and sends it to the energy meter n; S12, the energy meter n receives message 7, decrypts and verifies MAC, checks whether R5 is consistent with the initiation, and completes the session negotiation; S13, encrypting and transmitting the information between the intermediate device and the corresponding meter.

7. The system according to claim 6, characterized in that The communication establishing unit determines an intermediate device at a preset level, and establishes communication between the intermediate device and an upper master station, a concentrator, and an electric energy meter in a lower meter box, including: The electric energy meters in the main station, concentrator and meter box are respectively regarded as first-level equipment, second-level equipment and third-level equipment, and a meter box total meter is added between the concentrator and the electric energy meter as an intermediate device of a preset level, so that the intermediate device can obtain the electric energy meter data of the third-level device, and send the electric energy meter data along the concentrator to the main station or directly communicate with the main station, and send the electric energy meter data directly to the main station.

8. The system according to claim 6, characterized in that The communication establishing unit determines an intermediate device at a preset level, and establishes communication between the intermediate device and an upper master station, a concentrator, and an electric energy meter in a lower meter box, including: The electric energy meters in the main station, concentrator and meter box are respectively regarded as first-level equipment, second-level equipment and third-level equipment, and any electric energy meter is regarded as an intermediate device of a preset level, so that the intermediate device can obtain the electric energy meter data of the third-level device, and aggregate the electric energy meter data and the electric energy meter data collected by the intermediate device itself and transmit them to the main station.

9. The system according to claim 6, characterized in that The communication establishing unit determines an intermediate device at a preset level, and establishes communication between the intermediate device and an upper master station, a concentrator, and an electric energy meter in a lower meter box, including: The master station and concentrator are respectively regarded as first-level equipment and second-level equipment, and each electric energy meter located in the meter box, which originally belongs to the third-level equipment, is regarded as an intermediate device of a preset level, and a networking communication chain is established between any two electric energy meters, so that during the communication meter reading process, the master station communicates and notifies any electric energy meter in the meter box, and can control any electric energy meter to read the electric energy meter data of any other electric energy meter in the communication network, and the electric energy meter data is summarized and transmitted to the master station.

10. The system according to claim 6, characterized in that The data transmission unit further comprises: When a power outage occurs in step S6 and causes the trans-encryption process to fail, the session key negotiation is performed again through the session recovery process, and the steps are as follows: S14, the master station takes the random number R1 and encrypts it with the cipher machine to obtain the ciphertext E KS1 (R1), using version number, R1, session ID, master certificate C M , MAC field is digitally signed to obtain S1, generation, at this time, the session ID is 1, which means that the session key is used, and the MAC key and initial vector generated by the last session are used to sign the session ID and E KS1 (R1) performs MAC calculation to obtain MAC1, and uses the version number, session ID, master certificate CM, EKS1(R1), MAC field and signature S1 to form message 1 and send it to the intermediate device; S15, the intermediate device receives message 1 and verifies the master station certificate C M The validity of decryption E KS1 (R1) Get R1, verify the legitimacy of signature S1, verify the MAC value in message 1, the security unit of the intermediate device generates random numbers R2 and R3, and encrypts them with the preset key Ks2 to get E KS2 (R2), use the new R1, R2 and the original pre-master key K to derive a new master key, data encryption key, MAC key and initial vector, and use the newly generated MAC key and initial vector to encrypt the session ID, E KS2 (R2) and R3 perform MAC calculation to obtain MAC2, version number, session ID, E KS2 (R2), R3, and MAC2 form message 2 and return it to the master station; S16, the master station receives message 2 and decrypts E KS2 (R2) Get R2, use the new R1, R2 and the original pre-master key K to derive a new master key, data encryption key, MAC key and initial vector, verify the correctness of MAC2, the verification passes, the registration is successful, and subsequent messages use the newly calculated master key, data encryption key, MAC key, initial vector and random number R3, and then go to step S6.

Citation Information

Patent Citations

  • Multilevel communication system and communication detection method thereof

    CN101626318A

  • System and method applicable to electric power information collection system for distributing safety tasks

    CN103051450A