A method for safe remote control and disconnection of electricity meters

CN121567336BActive Publication Date: 2026-09-01LIYANG HUAPENG ELECTRIC POWER METER
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511896494.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-16
Publication Date
2026-09-01
Estimated Expiration
2045-12-16

AI Technical Summary

Technical Problem

[0008]本发明的一个目的在于提出一种电能表安全远程控制与切断的方法,针对现有技术在弱网条件下指令伪造与重放、执行乱序以及集中器伪造ACK导致闭环难以达成的问题,提出了以工单序号、操作类型与上一闭环标签经可验证随机函数生成工单标识及证明,以会话密钥对命令与反馈进行认证加密,依据链式上下文为计量微控制器与执行微控制器派生每工单一次性分片密钥并递增单调计数,计量侧获取动作证明与时间窗并与命令标签及计数散列生成绑定消息,双微控制器聚合门限签名且用后作废分片密钥,反馈采用喷泉码发送并由控制端验证后更新闭环标签的技术方案,本发明具备ACK不可伪造、抗重放与抗乱序、指令与继电器动作强绑定、弱网下闭环可靠且可审计的技术效果

Benefits of technology

[0109]1、端到端可信闭环与不可伪造的确认反馈:通过计量与执行两微控制器基于每工单一次性分片密钥分别生成签名份额并在表内聚合为门限签名,将命令标签、动作证明、时间窗及双计数统一散列为绑定消息,实现确认反馈与现场物理动作强绑定,集中器或单芯片无法伪造,同时以上一闭环标签与工单标识形成链式上下文,有效防止重放与乱序;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121567336B_ABST
    Figure CN121567336B_ABST
Patent Text Reader

Abstract

This invention discloses a secure remote control and disconnection method for electricity meters. To address issues such as command forgery or replay, out-of-order execution, and ACK forgery by concentrators in remote disconnection / closing closed-loop systems under weak network (NB-IoT / PLC) environments, this invention generates a work order identifier using a verifiable random function based on the work order number, operation type, and previous closed-loop label; authenticates and encrypts commands and feedback using a session key; derives a one-time fragmentation key for each work order based on a chained context for the metering and execution microcontrollers and aggregates threshold signatures; binds the command label, action proof, time window, and dual-count hash as a message; and encodes feedback using fountain codes. This achieves end-to-end trusted closed-loop control with unforgeable ACKs, strong binding of commands and physical actions, resistance to replay and out-of-order execution, reliable delivery under weak network conditions, and auditability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power metering and smart grid communication security, and in particular to a method for safe remote control and disconnection of electricity meters. Background Technology

[0002] In recent years, AMI (Automatic Management System) and electricity information collection systems have developed rapidly, and the remote disconnection and connection functions of electricity meters have been widely used in operation and safety management. Existing solutions generally adopt a hierarchical architecture of master station or cloud platform-concentrator (DCU)-electricity meter, relying on weak networks such as NB-IoT and PLC for command issuance and ACK confirmation, coupled with link encryption, serial numbers or timestamps, and anti-replay and timeout retransmission mechanisms. On the electricity meter side, sampling and relay driving are typically completed by the metering unit and the execution control unit, respectively. To improve the reliability of weak networks, common practices include increasing the number of retransmissions or using basic error correction; however, the overall closed-loop reliability is still limited by the implementation on the network and device sides.

[0003] Shortcomings of existing technology:

[0004] First, closed-loop trust is difficult to establish end-to-end. ACK is often proxies by the concentrator or generated by a single chip, lacking strong binding with the actual relay action and metering evidence of the electricity meter. There is a risk of it being forged, replaced or out of the field, and it is difficult to prove the consistency of instructions, physical actions and feedback.

[0005] Secondly, the anti-replay and out-of-order capabilities are insufficient. Schemes that rely on serial numbers or timestamps are easily affected by out-of-order, delay, device reset and count rollback under weak network conditions. Count anomalies are difficult to bind and audit, leading to the risk of instruction replay or out-of-order execution.

[0006] Third, the robustness of feedback under weak network conditions is insufficient. In NB-IoT and PLC scenarios with high packet loss and high latency, ACK and feedback based on retransmission are difficult to deliver stably, closed loop is difficult to achieve or the state is out of sync, and there is a lack of efficient coding and recovery mechanisms for out-of-order and high packet loss.

[0007] Therefore, a safe remote control and disconnection method for electricity meters that can overcome the shortcomings of the existing technology is a problem that needs to be solved by those skilled in the art. Summary of the Invention

[0008] One objective of this invention is to propose a method for secure remote control and disconnection of electricity meters. Addressing the problems of command forgery and replay, out-of-order execution, and concentrator ACK forgery leading to difficulty in achieving closed-loop operation under weak network conditions, this invention proposes a method that uses a work order number, operation type, and previous closed-loop label to generate a work order identifier and proof via a verifiable random function. A session key is used to authenticate and encrypt commands and feedback. Based on a chained context, a one-time fragmented key is derived for each work order from the metering microcontroller and the execution microcontroller, and a monotonically incrementing count is used. The metering side obtains the action proof and time window, and generates a binding message with the command label and count hash. The dual microcontrollers aggregate threshold signatures and invalidate the fragmented keys after use. Feedback is sent using fountain codes and updated with the closed-loop label after verification by the control end. This invention possesses the technical advantages of unforgeable ACKs, resistance to replay and out-of-order execution, strong binding of commands and relay actions, reliable and auditable closed-loop operation under weak network conditions.

[0009] This invention provides a method for safe remote control and disconnection of an electricity meter, comprising:

[0010] S1. Read the session key, threshold signature public key, metering and execution long-term sharding key, previous closed-loop label, work order number and operation type. Use the previous closed-loop label, work order number and operation type to obtain the work order identifier through a verifiable random function. Use the session key to authenticate and encrypt the control command, and generate command ciphertext and command label.

[0011] S2. Using the work order identifier and the previous closed-loop label as the derived context, generate corresponding one-time fragment keys based on the long-term fragment keys of metering and execution through the key derivation function, and increment the monotonic count of the two microcontrollers to obtain the metering count and execution count.

[0012] S3. Verify and decrypt the command ciphertext with the session key to obtain the control instruction to be executed. The execution microcontroller drives the relay to cut off or close based on this instruction. The metering microcontroller samples and calculates the action proof digest and time window before and after the action. The work order identifier, command tag, action proof digest, time window, metering count and execution count are connected and hashed in a preset order to generate a binding message.

[0013] S4. The two microcontrollers calculate the signature share of the bound message using their respective one-time fragmentation keys and aggregate them into a threshold signature in the table, then invalidate each one-time fragmentation key.

[0014] S5. Encrypt the binding message, action proof digest, time window, meter count, execution count and threshold signature authentication with the session key, generate feedback ciphertext and feedback tag, and encode them into an encoded symbol stream using fountain code;

[0015] S6. Decode the fountain code to recover the feedback ciphertext and feedback tag. Verify and decrypt the feedback with the session key to obtain the binding message, action proof digest, time window, meter count, execution count and threshold signature. Concatenate the work order identifier, command tag, action proof digest, time window, meter count and execution count in a preset order and hash to generate a local binding message. Compare the local binding message with the decrypted binding message and verify its threshold signature with the threshold signature public key. If it passes the verification, update the previous closed loop tag with the feedback tag.

[0016] Optionally, S1 includes:

[0017] After reading the session key, threshold signature public key, metering long-term sharding key, execution long-term sharding key, previous closed-loop label, work order number and operation type, the previous closed-loop label, work order number and operation type are concatenated in a preset order and then input into a verifiable random function to calculate the work order identifier.

[0018] Using the session key as the key, and the work order identifier and the previous closed-loop tag as additional data, the control command is authenticated and encrypted to generate command ciphertext and command tag.

[0019] Output work order identifier, command ciphertext, and command label.

[0020] Terminology definition:

[0021] The session key is a symmetric key used between the control terminal and the energy meter to authenticate and encrypt commands and feedback, and has a time-sensitive or work order-scoped scope.

[0022] The threshold signature public key is a verification public key used to verify the threshold signature formed by the aggregation of each signature share in the electricity meter;

[0023] The metering long-term fragmentation key is a long-term key material used to derive a one-time fragmentation key for each work order on the metering side;

[0024] The execution long-term fragmentation key is a long-term key material used to derive a one-time fragmentation key for each work order on the execution side;

[0025] The previous closed-loop label is a label value that represents the completion status of the previous work order closed loop. After the feedback verification is passed, the feedback label is updated and used as the chain context of subsequent work orders.

[0026] The work order sequence number is a sequence number used to uniquely identify or sort remote control work orders and participates in the generation of work order identifiers;

[0027] The operation type is an identifier that indicates the category of remote control action, including cutting off or closing, and is used to participate in work order identifier calculation and control instruction determination;

[0028] The verifiable random function is a function that generates a pseudo-random output from the input and includes verifiable proof, used to generate work order identifiers and support verification of correctness;

[0029] The control command is a command data that instructs the energy meter's control unit to cut off or close the circuit;

[0030] The authentication encryption is an encryption process that simultaneously provides data confidentiality and integrity verification and supports additional data binding;

[0031] The additional data is binding data that is not encrypted during the authentication encryption process but participates in integrity verification, and is used to strongly bind commands to the chained context;

[0032] The preset order is a fixed arrangement of related fields during connection and processing to ensure consistency between the results generated by both parties.

[0033] Optionally, S2 includes:

[0034] After obtaining the work order identifier, the previous closed-loop label, the metering long-term sharding key, and the execution long-term sharding key, the work order identifier and the previous closed-loop label are connected in a preset order to form a derived context.

[0035] A metered one-time fragmentation key is generated by using the metered long-term fragmentation key and the derived context as inputs to the key derivation function;

[0036] A one-time fragmentation key is generated by using the long-term fragmentation key and the derived context as inputs to the key derivation function.

[0037] The metering count is obtained by performing an increment operation on the monotonic count of the metering microcontroller, and the execution count is obtained by performing an increment operation on the monotonic count of the execution microcontroller.

[0038] Output the one-time fragmentation key for metering, execute the one-time fragmentation key, metering count, and execution count.

[0039] Terminology definition:

[0040] The work order identifier is an identifier data used to uniquely identify this work order, which is calculated by a verifiable random function based on the previous closed-loop label, the work order number, and the operation type.

[0041] The key derivation function is a cryptographic function that deterministically generates subkeys based on the input key material and the derivation context, and is used to derive a one-time fragmentation key for each work order from a long-term fragmentation key;

[0042] The one-time fragmentation key is a fragmentation sub-key derived for a single work order and is only used within the scope of that work order;

[0043] The metering microcontroller is a microcontroller inside the energy meter that performs metering sampling and related safety processing.

[0044] The execution microcontroller is a microcontroller inside the energy meter that performs relay driving and control execution;

[0045] The monotonic count is a count value maintained by each microcontroller, which increases with each work order and does not decrease.

[0046] The metering count is the current count value obtained by incrementing the monotonic count of the metering microcontroller;

[0047] The execution count is the current count value obtained by incrementing the monotonic count of the execution microcontroller;

[0048] The increment operation is the operation of increasing the count value by a fixed step size, usually by one.

[0049] Optionally, S3 includes:

[0050] After obtaining the session key, command ciphertext, work order identifier, command tag, meter count, and execution count, the session key is used to verify and decrypt the command ciphertext to obtain the control command to be executed.

[0051] The microcontroller drives the relay to perform a cut-off or closing action according to the control command to be executed;

[0052] The metering microcontroller samples electrical parameters before and after the action and calculates the action proof summary and time window;

[0053] The work order identifier, command label, action proof summary, time window, meter count and execution count are concatenated in a preset order and then hashed to generate a binding message.

[0054] Output binding message, action proof summary, and time window.

[0055] Terminology definition:

[0056] The command ciphertext is the ciphertext data obtained by encrypting the control command with the session key after authentication.

[0057] The command tag is an integrity verification tag generated during authentication and encryption, used to verify the command ciphertext and bind it to additional data;

[0058] The control command to be executed is control data obtained by verifying and decrypting the command ciphertext using a session key, which is used to drive the relay to perform disconnection or closing.

[0059] The action proof summary is a fixed-length proof summary data obtained by hashing electrical parameters sampled by the metering microcontroller before and after the control action, statistical processing, and then the data.

[0060] The time window is a predefined time interval surrounding the moment the relay operates, used to limit the sampling and statistical range;

[0061] The hash operation is the process of calculating a message digest from fields concatenated in a preset order using a predetermined cryptographic hash function;

[0062] The binding message is a message digest obtained by concatenating the work order identifier, command tag, action proof digest, time window, meter count, and execution count in a preset order and performing a hash operation. It is used to achieve strong binding between instructions, physical actions, and counting status.

[0063] Optionally, S4 includes:

[0064] After obtaining the metering one-time fragmentation key, the execution one-time fragmentation key, and the binding message, the metering signature share and the execution signature share of the binding message are calculated on the metering microcontroller and the execution microcontroller, respectively.

[0065] Within the electricity meter, the metering signature share and the execution signature share are aggregated to generate a threshold signature;

[0066] After generating the threshold signature, both the metering one-time fragmentation key and the execution one-time fragmentation key are invalidated;

[0067] Output threshold signature.

[0068] Terminology definition:

[0069] The metering signature share is the local signature data calculated by the metering microcontroller based on its metering one-time fragmentation key to the bound message;

[0070] The execution signature share is the local signature data calculated by the execution microcontroller based on the message bound by its execution one-time fragmentation key;

[0071] The signature share is an aggregateable signature component formed by a single microcontroller on bound messages under a one-time fragmentation key, which is used to participate in the generation of threshold signatures;

[0072] The signature share aggregation is a process of combining the metering signature share and the execution signature share within the energy meter to generate a threshold signature;

[0073] The threshold signature is a signature result formed by the aggregation of multiple signature shares and can be verified using the threshold signature public key, used to prove that the bound message has been jointly confirmed by the two microcontrollers;

[0074] The invalidation refers to the irreversible destruction or invalidation of the one-time fragment key of this work order after the threshold signature is generated to prevent subsequent reuse.

[0075] The metering one-time fragment key is a metering side subkey generated by combining the metering long-term fragment key with the derived context through a key derivation function and is limited to the scope of this work order;

[0076] The execution one-time fragment key is an execution side subkey generated by combining the execution long-term fragment key with the derived context through a key derivation function and limited to the scope of this work order.

[0077] Optionally, S5 includes:

[0078] After obtaining the session key, binding message, action proof digest, time window, meter count, execution count, threshold signature, work order identifier, and command tag, the session key is used as the key, and the aforementioned work order identifier and command tag are used as additional data to authenticate and encrypt the binding message, action proof digest, time window, meter count, execution count, and threshold signature, generating feedback ciphertext and feedback tag.

[0079] The feedback ciphertext and feedback tag are used as encoded data and input into the fountain code algorithm for encoding to generate an encoded symbol stream;

[0080] Output encoded symbol stream.

[0081] Terminology definition:

[0082] The feedback ciphertext is a ciphertext payload obtained by authenticating and encrypting the binding message, action proof digest, time window, meter count, execution count and threshold signature with the session key;

[0083] The feedback tag is an integrity verification tag generated during the above authentication encryption, used to verify the feedback ciphertext and bind it to additional data;

[0084] The fountain code is a forward error correction coding system, and the receiving end can recover the original coded data from any sufficient number of coded symbols under conditions of out-of-order and packet loss.

[0085] The fountain code algorithm is a set of algorithms for implementing fountain code encoding and decoding, used to generate encoded symbols from encoded data according to predetermined rules and support recovery;

[0086] The fountain code encoding is a process of inputting encoded data into a fountain code algorithm to generate encoded symbols for transmission;

[0087] The encoded data is the input source data of the fountain code algorithm, and in this invention it is a combination of feedback ciphertext and feedback tag;

[0088] The encoded symbol stream is a continuously output sequence of encoded symbols in fountain code encoding, used for transmission in weak network environments and supporting out-of-order reception and reassembly.

[0089] Optionally, S6 includes:

[0090] After obtaining the encoded symbol stream, session key, threshold signature public key, work order identifier and command tag, the fountain code is decoded on the encoded symbol stream to recover the feedback ciphertext and feedback tag;

[0091] The session key is used to verify and decrypt the feedback ciphertext to obtain the binding message, action proof digest, time window, meter count, execution count and threshold signature;

[0092] The work order identifier, command tag, action proof summary, time window, meter count and execution count are concatenated in a preset order and then hashed to generate a local binding message.

[0093] The local binding message is compared with the decrypted binding message for consistency, and the threshold signature and the decrypted binding message are verified using the threshold signature public key.

[0094] After both the consistency comparison and signature verification are passed, the feedback label will be updated to the previous closed-loop label.

[0095] Output the updated label of the previous closed loop.

[0096] Terminology definition:

[0097] The fountain code decoding process involves performing fountain code decoding on the encoded symbol stream to recover the original encoded data (feedback ciphertext and feedback tag) under conditions of out-of-order delivery and packet loss.

[0098] The local binding message is a binding message that is independently calculated at the control end after being concatenated in a preset order based on the work order identifier, command tag, action proof summary, time window, meter count and execution count, and then hashed.

[0099] The consistency comparison is a process of performing an equality check between the local binding message and the decrypted binding message to confirm that the two are completely consistent.

[0100] The signature verification is a process of verifying the threshold signature and its corresponding bound message using the threshold signature public key to confirm that the signature is valid and matches the message.

[0101] The updated previous closed-loop label is a new label obtained by updating the feedback label after both the consistency comparison and signature verification have passed, and it is used as the chain context for subsequent work orders.

[0102] Optional:

[0103] S1 calculates the work order identifier and outputs the corresponding verifiable proof by a verifiable random function. Before executing S3, the following steps are also taken: the energy meter verifies the verifiable proof. If the verification is successful, S3 is executed. If the verification fails, the execution of the control instruction to be executed is refused and the event is recorded.

[0104] Optional:

[0105] The metering count and execution count are maintained by a secure storage unit and have an anti-rollback mechanism. Their encoding includes an overflow flag and a reset detection flag to bind and audit count anomalies when the binding message is constructed in S3.

[0106] Optional:

[0107] The action proof summary is obtained by the metering microcontroller statistically analyzing the effective value of the current and the power factor, including the mean and variance, in two time windows before and after the action, and then hashing the results. The time windows are triggered by the reliable clock of the energy meter to align with the relay action time.

[0108] The beneficial effects of this invention are:

[0109] 1. End-to-end trusted closed loop and unforgeable confirmation feedback: The metering and execution microcontrollers generate signature shares based on the one-time sharding key of each work order and aggregate them into a threshold signature in the table. The command tag, action proof, time window and dual counter are uniformly hashed into a binding message to realize strong binding between confirmation feedback and on-site physical action. The concentrator or single chip cannot forge it. At the same time, the above closed loop tag and work order identifier form a chain context to effectively prevent replay and out-of-order.

[0110] 2. Improved robustness and closed-loop efficiency of feedback under weak network conditions: Feedback data is encoded into a coded symbol stream by fountain code, which can be recovered with fewer symbols in high packet loss and out-of-order environments, reducing retransmission and latency, and improving the achievement rate and consistency of remote disconnection and closing loop.

[0111] 3. Enhanced security and auditability: Commands and feedback are authenticated and encrypted using session keys; metering and execution counts are maintained in secure storage and include overflow and reset flags; action proofs are statistically generated within two time windows aligned with a trusted clock; control-end verification can validate random function proofs and threshold signatures; and anomalies are bound to messages and are traceable and auditable. Attached Figure Description

[0112] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0113] Figure 1This is a flowchart of a method for safe remote control and disconnection of an electricity meter proposed in this invention;

[0114] Figure 2 This is a flowchart illustrating step S4 of the present invention, which aggregates the dual microcontroller signature share and threshold signature, and then invalidates the one-time fragment key. Detailed Implementation

[0115] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.

[0116] refer to Figure 1 A method for safe remote control and disconnection of an electricity meter, comprising:

[0117] S1. Read the session key, threshold signature public key, metering and execution long-term sharding key, previous closed-loop label, work order number and operation type. Use the previous closed-loop label, work order number and operation type to obtain the work order identifier through a verifiable random function. Use the session key to authenticate and encrypt the control command, and generate command ciphertext and command label.

[0118] S2. Using the work order identifier and the previous closed-loop label as the derived context, generate corresponding one-time fragment keys based on the long-term fragment keys of metering and execution through the key derivation function, and increment the monotonic count of the two microcontrollers to obtain the metering count and execution count.

[0119] S3. Verify and decrypt the command ciphertext with the session key to obtain the control instruction to be executed. The execution microcontroller drives the relay to cut off or close based on this instruction. The metering microcontroller samples and calculates the action proof digest and time window before and after the action. The work order identifier, command tag, action proof digest, time window, metering count and execution count are connected and hashed in a preset order to generate a binding message.

[0120] S4. The two microcontrollers calculate the signature share of the bound message using their respective one-time fragmentation keys and aggregate them into a threshold signature in the table, then invalidate each one-time fragmentation key.

[0121] S5. Encrypt the binding message, action proof digest, time window, meter count, execution count and threshold signature authentication with the session key, generate feedback ciphertext and feedback tag, and encode them into an encoded symbol stream using fountain code;

[0122] S6. Decode the fountain code to recover the feedback ciphertext and feedback tag. Verify and decrypt the feedback with the session key to obtain the binding message, action proof digest, time window, meter count, execution count and threshold signature. Concatenate the work order identifier, command tag, action proof digest, time window, meter count and execution count in a preset order and hash to generate a local binding message. Compare the local binding message with the decrypted binding message and verify its threshold signature with the threshold signature public key. If it passes the verification, update the previous closed loop tag with the feedback tag.

[0123] In this specific embodiment, S1 includes:

[0124] This is executed by the control terminal, which prepares the session key at the start. Threshold signature public key (this public key is used for subsequent verification but is not included in the calculation of this step), previous closed-loop label Work order number With operation type Meanwhile, the system side confirms that the long-term sharding key for metering and the long-term sharding key for execution are only securely stored at the electricity meter end and used in subsequent steps, and are not read in this step;

[0125] The control terminal will use the previous closed-loop tag Work order number With operation type The input context is formed by connecting elements in a preset order, the work order identifier is calculated using a verifiable random function, and then used as the session key. control commands in plaintext Perform authentication encryption to generate command ciphertext and command label. The overall process is as follows:

[0126] ;

[0127] Where wid represents the work order identifier, which is output by a verifiable random function; This indicates a ciphertext command. Indicates command label; This represents a function that computes a pseudo-random output over an input context under a verifiable random function private key skv; This is a private key for a verifiable random function; Indicates the previous closed-loop label; Indicates the work order number; Indicates the operation type; Indicates connection operations in a preset order; AEAD_Enc Indicated by session key The algorithm that performs authentication encryption returns ciphertext and an integrity check tag; This indicates the plaintext of the control command; AAD indicates additional data, which is bound to the wid in this step. The connection is used to achieve a strong binding between commands and chained contexts;

[0128] The control terminal outputs the work order identifier (wid) and the command ciphertext. With command labels The command is sent to the electricity meter for use in steps S2 and S3, thus achieving end-to-end strong binding between the command and the previous closed-loop state, improving anti-forgery and anti-replay capabilities, and providing a consistent basis for subsequent closed-loop verification.

[0129] In this specific embodiment, S2 includes:

[0130] Executed by the electricity meter, the electricity meter obtains the work order identifier (wid) and the previous closed-loop tag. Subsequently, the respective long-term sharding keys for metering are read in the secure environments of the metering microcontroller and the execution microcontroller. With the execution of long-term fragmentation keys The work order identifier (wid) is linked to the previous closed-loop label. The derived context is formed by connecting the keys in a preset order. This derived context is used as the input of the key derivation function and combined with the long-term sharding key to calculate the metering one-time sharding key and the execution one-time sharding key corresponding to this work order. At the same time, the monotonic counts on the metering side and the execution side are incremented to obtain the current metering count and execution count. This is used to provide the key material and auditable count status of each work order when calculating the signature share of the bound message in the future.

[0131] The core relationship between derivation and counting:

[0132] ;

[0133] in, The derived context is obtained by connecting the work order identifier with the previous closed-loop label; wid represents the work order identifier, which is the identifier data output in step S1. This indicates the previous closed-loop tag, forming a chain of context tags; This indicates connection operations performed in a preset order; This indicates a one-time fragmentation key, which can only be used within the scope of this work order; This represents the long-term fragmentation key for metering, used to derive a one-time fragmentation key for each work order on the metering side; This indicates that a one-time fragmentation key will be used only within the scope of this work order; This indicates the execution of a long-term fragmentation key, used to derive a one-time fragmentation key per work order on the execution side; This represents a key derivation function that deterministically generates subkeys based on the input key material and the derivation context. This represents the current count value after a monotonically increasing count on the metering side. This represents the execution count, which is the current count value after monotonically incrementing the execution side count. This indicates an increment operation, which increases the count value by a fixed step size, usually one. This indicates the current monotonic count (before incrementing) of the metering microcontroller; This indicates the current monotonic count (before incrementing) of the microcontroller.

[0134] After the above processing, the electricity meter outputs a one-time sharding key. Execute one-time fragmentation key , measurement and counting With execution count .

[0135] In this specific embodiment, S3 includes:

[0136] This is executed by the electricity meter; the electricity meter obtains the session key. Command ciphertext Work order identifier (wid), command label , measurement and counting With execution count Then, with the session key For command ciphertext Verification and decryption are performed to obtain the control instructions to be executed. The execution microcontroller is based on The driving relay performs a cutting-off or closing action. The metering microcontroller samples electrical parameters within two time windows triggered by a reliable clock around the moment of relay action and performs statistical analysis to generate an action proof summary. And record the time window. This is used to subsequently bind with commands and counts to verify the consistency between on-site physical actions and instructions. The work order identifier (wid) and command label are then linked. Action Proof Summary Time window , measurement and counting With execution count The messages are connected in a preset order and hashed to generate binding messages, as follows:

[0137] ;

[0138] in, This indicates a bound message, which is a message digest obtained by performing a hash operation on the fields concatenated in a preset order. This represents the predetermined cryptographic hash function used to calculate the message digest; wid represents the work order identifier, which is the identifier data output in step S1 and involved in binding in this step. This indicates a command label, which is an integrity verification label generated during authentication encryption. The action proof summary is a fixed-length summary obtained by hashing the electrical parameters statistically analyzed by the metering microcontroller in two time windows before and after the action. The time window represents the time interval around the moment the relay operates, used to limit the sampling and statistical range. This represents the current count value after a monotonically increasing count on the metering side. This represents the execution count, which is the current count value after monotonically incrementing the execution side count. This indicates connection operations performed in a preset order;

[0139] After the above processing, the electricity meter outputs a binding message. Action Proof Summary With time window .

[0140] In this specific embodiment, S4 includes:

[0141] Executed by the electricity meter, the electricity meter obtains the one-time sharding key for metering. Execute one-time fragmentation key With bound messages Subsequently, the binding messages were processed in the secure environments of both the metering microcontroller and the execution microcontroller. Calculate the metering signature share and the execution signature share, and aggregate the two signature shares in the energy meter to generate a threshold signature. At the same time, after generating the threshold signature, invalidate the metering one-time fragment key and the execution one-time fragment key of this work order to avoid subsequent reuse. Finally, output the threshold signature.

[0142] The core relationship between signature share calculation and aggregation is as follows:

[0143] ;

[0144] in, This represents the metered signature share, which is the local signature data calculated by the metering microcontroller based on its metered one-time fragmentation key to the bound message; This represents the execution signature share, which is the local signature data calculated by the execution microcontroller based on the one-time fragmentation key of the bound message; This describes the signature share calculation algorithm, given a one-time fragmentation key. Under the condition of generating an aggregatable local signature for the input message; The measurement one-time fragmentation key is a subkey derived on the measurement side in step S2 and limited to the scope of this work order; This indicates that a one-time fragmentation key is to be executed, which is a subkey derived from step S2 on the execution side and limited to the scope of this work order; The binding message is the message digest obtained by concatenating the work order identifier, command tag, action proof digest, time window, meter count and execution count in a preset order and performing a hash operation in step S3. Threshold signature refers to a signature result formed by aggregating the metering signature share and the execution signature share within the energy meter, which can be verified by the threshold signature public key; This represents a signature share aggregation algorithm used to combine multiple signature shares to generate a threshold signature in an in-table security environment.

[0145] After the above processing is completed, the electricity meter will measure the one-time sharding key. With the execution of one-time fragmentation keys Invalidate and output threshold signature .

[0146] In this specific embodiment, S5 includes:

[0147] This is executed by the electricity meter; the electricity meter obtains the session key. Message binding Action Proof Summary Time window , measurement and counting Execution count Threshold signature Work order identifier (wid) and command label Then, using the session key The feedback payload is authenticated and encrypted using the key and the aforementioned work order identifier and command tag as additional data. The feedback payload is composed of a binding message, action proof digest, time window, meter count, execution count, and threshold signature concatenated in a preset order. Simultaneously, the feedback ciphertext generated from the authentication encryption and the feedback tag are input into the fountain code encoding algorithm as encoded data to form an encoded symbol stream for weak network transmission. The core processing relationships are as follows:

[0148] ;

[0149] in, This indicates the feedback ciphertext, which is the ciphertext payload obtained by performing authentication encryption using the session key; This indicates a feedback tag, which is an integrity verification tag generated simultaneously with the above authentication encryption; AEAD_Enc Indicated by session key The algorithm that performs authentication encryption returns ciphertext and an integrity check tag; Indicates feedback load, as The connection result; AAD represents additional data, which is bound to the work order identifier wid and command label in this step. The connection is used to achieve a strong binding between feedback and the chained context; FC_Enc( () indicates the fountain code encoding algorithm, used for forward error correction encoding of encoded data to support out-of-order and packet loss recovery; This represents the encoded symbol stream, which is a continuously output sequence of encoded symbols for fountain codes; The binding message is the message digest obtained by concatenating the work order identifier, command tag, action proof digest, time window, meter count and execution count in a preset order and performing a hash operation as described in the previous steps. The action proof summary is a fixed-length summary obtained by hashing the electrical parameters statistically analyzed by the metering microcontroller in two time windows before and after the action. The time window represents the time interval within which sampling and statistics are limited around the moment the relay operates. This represents the current count value after a monotonically increasing count on the metering side. This represents the execution count, which is the current count value after monotonically incrementing the execution side count. The threshold signature is a signature result formed by aggregating the metered signature share and the executed signature share, and which can be verified by the threshold signature public key. This indicates connection operations performed in a preset order;

[0150] After the above processing, the electricity meter outputs a coded symbol stream. .

[0151] In this specific embodiment, S6 includes:

[0152] Executed by the control terminal, the control terminal obtains the encoded symbol stream. Session key Threshold signature public key Work order identifier (wid) and command label First, the encoded symbol stream is decoded using fountain codes to recover the feedback ciphertext and feedback tag. Then, the feedback ciphertext is verified and decrypted using the session key to obtain the binding message, action proof digest, time window, meter count, execution count, and threshold signature. Then, the control terminal connects the work order identifier, command tag, action proof digest, time window, and double count in a preset order and performs hash operation to independently calculate the local binding message. Subsequently, the local binding message is compared with the decrypted binding message for consistency. The threshold signature is verified with the threshold signature public key. After both the consistency comparison and signature verification are passed, the previous closed loop tag is updated with the feedback tag and the updated previous closed loop tag is output as the chain context for subsequent work orders.

[0153] The core processing relationship described above can be represented as:

[0154] FC_Dec ,

[0155] wid ,

[0156] ;

[0157] in, FC_Dec(•) represents the coded symbol stream, which is a sequence of coded symbols continuously output by the fountain code at the electricity meter terminal; FC_Dec(•) represents the fountain code decoding algorithm, which is used to recover the coded data from the coded symbol stream under conditions of out-of-order and packet loss. This indicates the feedback ciphertext, which is the ciphertext payload recovered after decoding; This indicates a feedback tag, which is a tag for verifying the integrity of the decoded and recovered data; AEAD_Dec Indicated by session key The executed authentication and decryption algorithm is used to verify integrity and decrypt to obtain the plaintext fields; AAD represents additional data, which is bound to the work order identifier wid and command label in this step. The connection is used to achieve a strong binding between feedback and the chained context; The binding message is a message digest obtained by connecting and hashing the work order identifier, command tag, action proof digest, time window and dual counter in a preset order at the energy meter end; The action proof summary is a fixed-length summary obtained by hashing the electrical parameters statistically analyzed by the metering microcontroller in two time windows before and after the action. The time window represents the time interval within which sampling and statistics are limited around the moment the relay operates. This represents the current count value after a monotonically increasing count on the metering side. This represents the execution count, which is the current count value after monotonically incrementing the execution side count. The threshold signature is a signature result formed by aggregating the metered signature share and the executed signature share, and which can be verified by the threshold signature public key. This indicates a locally bound message, which is a message digest calculated by the control end based on the work order identifier, command tag, action proof digest, time window, and dual counter in a preset order and then performing a hash operation. Represents a predefined cryptographic hash function; This indicates connection operations performed in a preset order; This represents the threshold signature public key, used on the control end to... and Verify the matching relationship;

[0158] If the consistency comparison and threshold signature verification fail, the control terminal refuses to update the previous closed-loop label and logs the event.

[0159] In this specific embodiment, it includes:

[0160] While calculating the work order identifier in step S1, the control terminal generates a verifiable certificate and sends the work order identifier and the verifiable certificate to the energy meter when the command is issued. The energy meter verifies the verifiable certificate before executing step S3. If the verification is successful, the control terminal continues to execute the command verification, decryption, relay action and metering sampling in step S3. If the verification fails, the control terminal refuses to execute the control command to be executed and records the event for auditing.

[0161] Specifically: the control terminal holds a verifiable random function private key skv, and reads the previous closed-loop tag. Work order number With operation type ,Will The input context is connected in a preset order, and a verifiable random function is used to calculate the work order identifier and verifiable proof. The electricity meter holds the public key of the verifiable random function. In its secure environment, the received work order identifier and verifiable proof are verified, and a decision is made as to whether to proceed to step S3.

[0162] The relationship between generation and verification is as follows:

[0163] ;

[0164] Where wid represents the work order identifier, which is a unique identifier calculated by a verifiable random function on the input context and participates in binding in subsequent steps; This indicates verifiable proof, specifically the verifiable evidence output by the verifiable random function when generating the work order identifier; VRF Eval This indicates the private key of the verifiable random function. The function that computes pseudo-random output and proofs over the input context; This indicates that the private key for the verifiable random function is securely stored and used only by the control end; This indicates the previous closed-loop tag, forming a chain of context tags; This indicates the work order number, used to uniquely identify or sort remote control work orders. Indicates the operation type, including action categories such as disconnection or closing; This indicates connection operations performed in a preset order; This indicates the verification result flag, which is the power meter's public key. The following verifies the input context, work order identifier, and verifiable proof, with a value of either pass or fail; VRF Verify This represents a proof-verification algorithm for a verifiable random function, given a public key. Under the given conditions, the matching relationship between the input context, output, and proof is verified, and the electricity meter data is used. The result determines whether to proceed to step S3, and if it fails, the pending control instruction is rejected and the event is recorded.

[0165] In this specific embodiment, it includes:

[0166] The electricity meter maintains monotonic counts in the secure storage units of the metering microcontroller and the execution microcontroller, respectively. It employs an anti-rollback mechanism to ensure that the count can only increase and cannot be rolled back. This mechanism includes applying atomicity and write protection strategies to the count write by the secure storage unit.

[0167] When power-on reset or abnormal recovery, the counting status is checked for consistency and a reset detection flag is set. When the count reaches the encoding limit or an overflow risk occurs, an overflow flag is set. At the same time, the above count and its abnormal flag are encoded in a fixed format and used to replace the original count in connection and hashing when constructing the binding message in step S3. This makes any count abnormality, command, action proof and time window strongly bound and auditable.

[0168] The counting encoding relationship is as follows:

[0169] ;

[0170] in, This represents the metering count code, which is a coded field obtained by combining the metering count and its abnormal flag bit in a fixed format on the metering side. The execution count encoding is an encoded field obtained by combining the execution count and its exception flag bits in a fixed format on the execution side; Cnt Enc() denotes a counting encoding function used to combine a count value with two flag bits into a fixed-length representation for binding and transmission; This represents the current count value after a monotonically increasing count on the metering side. This represents the execution count, which is the current count value after monotonically incrementing the execution side count. This indicates the overflow flag on the metering side, used to indicate the state where the meter count has reached or is close to the upper limit of the code; This indicates the execution-side overflow flag, used to indicate the state where the execution count has reached or is close to the upper limit of the encoding; This indicates the metering side reset detection flag, which is used to indicate that after a power-on reset or abnormal recovery, a consistency check reveals a reset-related risk in the metering count; This indicates the execution-side reset detection flag, used to indicate that after a power-on reset or abnormal recovery, a consistency check reveals a reset-related risk in the execution count;

[0171] After the above processing, the electricity meter in step S3... and It replaces the original metering count and execution count in the connection and hashing of binding messages, thereby achieving strong binding and auditability of counting anomalies.

[0172] In this specific embodiment, it includes:

[0173] The metering microcontroller aligns the relay action time under the trigger of a trusted clock, and obtains a trusted timestamp of the relay action. And construct two time windows around that moment. and ,in Indicates the window before the action, The window after the action is indicated. The boundaries of the two time windows are generated by the reliable clock of the energy meter to ensure alignment with the relay action.

[0174] Within each time window, the metering microcontroller performs statistical analysis on electrical parameters using the power frequency cycle as the basic granularity, obtaining a sequence of effective current values ​​and a sequence of power factors consisting of multiple cycles, and calculates the mean and variance respectively to characterize the changes in the power consumption state before and after the action.

[0175] Subsequently, the metering microcontroller concatenates the mean and variance of the effective current value before and after the action, and the mean and variance of the power factor in a preset order, and performs hash calculation to generate an action proof summary. This summary is used in step S3 to participate in the binding with the work order identifier, command tag, and count status, and is verified end-to-end in steps S5 and S6. Its core relationship can be expressed as follows:

[0176] ;

[0177] in, The action proof summary is a fixed-length summary obtained by hashing the electrical parameters statistically analyzed by the metering microcontroller in two time windows before and after the action. Represents a predefined cryptographic hash function; and They represent in and The mean value of the effective current obtained by calculating the power frequency cycle; and They represent in and The variance of the effective value of the current calculated based on the power frequency cycle; and They represent in and The average power factor calculated based on the power frequency cycle; and They represent in and The variance of the power factor calculated based on the power frequency cycle; PF represents the effective value of the current, which is the root mean square current calculated based on the sampled waveform within a single power frequency cycle; PF represents the power factor, which is a periodic statistic of the ratio of active power to apparent power; the superscripts "-" and "+" indicate the statistical attribution of the time window before and after the action, respectively. This indicates connection operations performed in a preset order; A reliable timestamp indicating the moment the relay operates is generated by the reliable clock of the energy meter and used to trigger and align the aforementioned time window, thereby ensuring... and The boundaries and action events are strictly synchronized, and the repeatability and auditability of action proofs are improved.

[0178] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

[0179] This invention focuses on the goal of end-to-end trusted closed-loop operation in weak network scenarios, constructing a continuous link from instruction generation and table-side execution to feedback verification. A unique work order identifier and proof are generated through a verifiable random function, and the previous closed-loop label is embedded as additional data for authentication encryption in the context, achieving strong binding between instructions and sessions. The metering and execution microcontrollers, within the same chained context, obtain one-time sharding keys for each work order through a key derivation function. They then issue signature shares for the bound messages containing command tags, action proof digests, time windows, and double counters, aggregating them into threshold signatures within a table. The feedback side uses session key authentication encryption and transmits via fountain codes. After reconstruction at the control end, the consistency between the threshold signature and the bound message is verified, and the closed loop is updated with the feedback label. This simultaneously solves the problems of forgery, replay, and out-of-order delivery, making the confirmation feedback unforgeable and maintaining closed-loop reachability and consistency even in high packet loss environments.

[0180] This invention specifically introduces improvements such as a chained verifiable random function context, one-time fragmentation key derivation per work order, and cross-layer bound signature sets. The chained context connects the work order identifier with the previous closed-loop label, linking commands, signatures, and feedback, ensuring each interaction is constrained by the previous state, significantly improving replay resistance and out-of-order delivery capabilities. The one-time fragmentation key is derived from a long-term fragmentation key combined with the context; it is discarded after use, limiting the possibility of forged confirmations from any single chip or centralized device. The cross-layer bound signature set hashes and signs the command label, metering-side action proof, time window, metering count, and execution count, along with securely stored overflow and reset flags, making physical actions and logical instructions inseparable and auditable. Fountain codes provide out-of-order tolerance and efficient recovery, further improving feedback delivery rate and closed-loop efficiency. The synergistic effect of these structures significantly improves reliability and robustness compared to traditional schemes relying on sequence numbers or retransmissions.

Claims

1. A method for safe remote control and disconnection of an electricity meter, characterized in that, include: S1. Read the session key, threshold signature public key, metering and execution long-term sharding key, previous closed-loop label, work order number and operation type. Use the previous closed-loop label, work order number and operation type to obtain the work order identifier through a verifiable random function. Use the session key to authenticate and encrypt the control command, and generate command ciphertext and command label. S2. Using the work order identifier and the previous closed-loop label as the derived context, generate corresponding one-time fragment keys based on the long-term fragment keys of metering and execution through the key derivation function, and increment the monotonic count of the two microcontrollers to obtain the metering count and execution count. S3. Verify and decrypt the command ciphertext with the session key to obtain the control instruction to be executed. The execution microcontroller drives the relay to cut off or close based on this instruction. The metering microcontroller samples and calculates the action proof digest and time window before and after the action. The work order identifier, command tag, action proof digest, time window, metering count and execution count are connected and hashed in a preset order to generate a binding message. S4. The two microcontrollers calculate the signature share of the bound message using their respective one-time fragmentation keys and aggregate them into a threshold signature in the table, then invalidate each one-time fragmentation key. S5. Encrypt the binding message, action proof digest, time window, meter count, execution count and threshold signature authentication with the session key, generate feedback ciphertext and feedback tag, and encode them into an encoded symbol stream using fountain code; S6. Decode the fountain code to recover the feedback ciphertext and feedback tag. Verify and decrypt the feedback with the session key to obtain the binding message, action proof digest, time window, meter count, execution count and threshold signature. Concatenate the work order identifier, command tag, action proof digest, time window, meter count and execution count in a preset order and hash to generate a local binding message. Compare the local binding message with the decrypted binding message and verify its threshold signature with the threshold signature public key. If it passes the verification, update the previous closed loop tag with the feedback tag.

2. The method for safe remote control and disconnection of an electricity meter according to claim 1, characterized in that, S1 includes: After reading the session key, threshold signature public key, metering long-term sharding key, execution long-term sharding key, previous closed-loop label, work order number and operation type, the previous closed-loop label, work order number and operation type are concatenated in a preset order and then input into a verifiable random function to calculate the work order identifier. Using the session key as the key, and the work order identifier and the previous closed-loop tag as additional data, the control command is authenticated and encrypted to generate command ciphertext and command tag. Output work order identifier, command ciphertext, and command label.

3. The method for safe remote control and disconnection of an electricity meter according to claim 1, characterized in that, S2 include: After obtaining the work order identifier, the previous closed-loop label, the metering long-term sharding key, and the execution long-term sharding key, the work order identifier and the previous closed-loop label are connected in a preset order to form a derived context. A metered one-time fragmentation key is generated by using the metered long-term fragmentation key and the derived context as inputs to the key derivation function; A one-time fragmentation key is generated by using the long-term fragmentation key and the derived context as inputs to the key derivation function. The metering count is obtained by performing an increment operation on the monotonic count of the metering microcontroller, and the execution count is obtained by performing an increment operation on the monotonic count of the execution microcontroller. Output the one-time fragmentation key for metering, execute the one-time fragmentation key, metering count, and execution count.

4. The method for safe remote control and disconnection of an electricity meter according to claim 1, characterized in that, S3 includes: After obtaining the session key, command ciphertext, work order identifier, command tag, meter count, and execution count, the session key is used to verify and decrypt the command ciphertext to obtain the control command to be executed. The microcontroller drives the relay to perform a cut-off or closing action according to the control command to be executed; The metering microcontroller samples electrical parameters before and after the action and calculates the action proof summary and time window; The work order identifier, command tag, action proof summary, time window, meter count and execution count are concatenated in a preset order and then hashed to generate a binding message. Output binding message, action proof summary, and time window.

5. The method for safe remote control and disconnection of an electricity meter according to claim 1, characterized in that, S4 includes: After obtaining the metering one-time fragmentation key, the execution one-time fragmentation key, and the binding message, the metering signature share and the execution signature share of the binding message are calculated on the metering microcontroller and the execution microcontroller, respectively. Within the electricity meter, the metering signature share and the execution signature share are aggregated to generate a threshold signature; After generating the threshold signature, both the metering one-time fragmentation key and the execution one-time fragmentation key are invalidated; Output threshold signature.

6. A method for safe remote control and disconnection of an electricity meter according to claim 1, characterized in that, S5 include: After obtaining the session key, binding message, action proof digest, time window, meter count, execution count, threshold signature, work order identifier, and command tag, the session key is used as the key, and the aforementioned work order identifier and command tag are used as additional data to authenticate and encrypt the binding message, action proof digest, time window, meter count, execution count, and threshold signature, generating feedback ciphertext and feedback tag. The feedback ciphertext and feedback tag are used as encoded data and input into the fountain code algorithm for encoding to generate an encoded symbol stream; Output encoded symbol stream.

7. A method for safe remote control and disconnection of an electricity meter according to claim 1, characterized in that, S6 include: After obtaining the encoded symbol stream, session key, threshold signature public key, work order identifier and command tag, the fountain code is decoded on the encoded symbol stream to recover the feedback ciphertext and feedback tag; The session key is used to verify and decrypt the feedback ciphertext to obtain the binding message, action proof digest, time window, meter count, execution count and threshold signature; The work order identifier, command tag, action proof summary, time window, meter count and execution count are concatenated in a preset order and then hashed to generate a local binding message. The local binding message is compared with the decrypted binding message for consistency, and the threshold signature and the decrypted binding message are verified using the threshold signature public key. After both the consistency comparison and signature verification are passed, the feedback label will be updated to the previous closed-loop label. Output the updated previous closed-loop label.

8. A method for safe remote control and disconnection of an electricity meter according to claim 1, characterized in that, S1 calculates the work order identifier and outputs the corresponding verifiable proof by a verifiable random function. Before executing S3, the following steps are also taken: the energy meter verifies the verifiable proof. If the verification is successful, S3 is executed. If the verification fails, the execution of the control instruction to be executed is refused and the event is recorded.

9. A method for safe remote control and disconnection of an electricity meter according to claim 3, characterized in that, The metering count and execution count are maintained by a secure storage unit and have an anti-rollback mechanism. Their encoding includes an overflow flag and a reset detection flag to bind and audit count anomalies when the binding message is constructed in S3.

10. A method for safe remote control and disconnection of an electricity meter according to claim 4, characterized in that, The action proof summary is obtained by the metering microcontroller statistically analyzing the mean and variance of the effective current value and power factor in two time windows before and after the action, concatenating the results, and then hashing them. The time windows are triggered by the reliable clock of the energy meter to align with the relay action time.

Citation Information

Patent Citations

  • Intelligent meter remote switching on and switching off control method based on domestic cryptographic algorithm

    CN103516519A

  • Method, system and device for improving security of smart electric energy meter

    CN107249002A