A reliable storage method for metering data of smart electric energy meters
By using guiding functions and hash value verification solutions in smart power meters, the problem of authenticity identification of smart power meters is solved, and the trusted storage of metering data is realized, and tampering is discovered in a timely manner and the fairness of power metering is maintained.
Patent Information
- Application Number
- CN202111358735.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-17
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2041-11-17
AI Technical Summary
The lack of an effective solution to identify the authenticity of data stored in smart power meters makes it difficult to detect and process metered data in a timely manner, affecting the order of electricity consumption.
The metering center generates a guiding function, establishes a connection with the execution node through carrier communication, generates a metering hash value and feature hash value, verify whether these values meet the guidance function, to ensure the authenticity of the metering data, and issue it when the verification fails. Alarm.
Through guidance numbers, timely discover tampering of metrology data, ensure the authenticity and credibility of metrology data, maintain the fairness of power measurement, and protect the guidance function through binary executable code to improve verification efficiency.
Smart Images

Figure CN114117519B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information technology, and in particular to a reliable storage method for metering data of a smart electric energy meter. Background Art
[0002] Smart meters are one of the basic devices for data collection in smart grids (especially smart distribution networks). They undertake the tasks of collecting, measuring and transmitting original electric energy data, and are the basis for realizing information integration, analysis optimization and information display. In addition to the basic electricity consumption metering function of traditional electric energy meters, smart meters also have intelligent functions such as two-way multi-rate metering function, user-side control function, two-way data communication function of multiple data transmission modes, and anti-electricity theft function in order to adapt to the use of smart grids and new energy. The advanced measurement system and automatic meter reading system built on the basis of smart meters can provide users with more detailed electricity consumption information, so that users can better manage their electricity consumption to achieve the goal of saving electricity bills and reducing greenhouse gas emissions. Accurate measurement of electricity consumption not only involves the settlement of fees, but also is the basis for users' energy-saving work, and plays an important role in maintaining the public electricity order. Tampering with electricity metering data includes destroying or interfering with the hardware work of smart electric energy meters. This interference requires the installation of hardware outside the smart electric energy meter, which is easy to be discovered by manual investigation. It can also be achieved by invading the carrier communication network and invading the smart electric energy meter to modify the data. At present, the power grid uses a 15-minute cycle to report metering data. Smart energy meters measure and store metering data every minute or every few minutes depending on the model. Tampering with the data stored in smart energy meters will destroy the metering accuracy and affect the order of electricity use. Therefore, technical means are needed to promptly detect and deal with tampering with smart energy meter data.
[0003] Chinese patent CN112383141A, published on February 19, 2021, discloses a blockchain-based intelligent fusion terminal, including: a power supply unit, a main control unit, a collection unit, a telesignaling unit, a remote control unit, a communication unit and a human-computer interaction unit; wherein: the main control unit includes: a blockchain module, an edge computing module, a container management module and an identity management module. Its technical solution can realize chain storage and data processing from the data source, effectively reducing the risk of data tampering and abuse, and ensuring the reliability and security of the data. However, the use of blockchain storage by a large number of smart electricity meters will bring tremendous pressure to the blockchain network, and new trusted storage solutions for metering data still need to be studied. Summary of the invention
[0004] The technical problem to be solved by the present invention is that there is currently a lack of effective solutions for identifying the authenticity of data stored in smart electric energy meters. A reliable storage method for metering data of smart electric energy meters is proposed, which can authenticate the authenticity of data stored in smart electric energy meters and improve the credibility of data stored in smart electric energy meters.
[0005] In order to solve the above technical problems, the technical solution adopted by the present invention is: a trusted storage method for metering data of smart electric energy meters, including: a metering center generates a guidance function, the guidance function is: guidance number = f (node identifier, timestamp, feature number); a number of execution nodes are set in the user area, the metering center specifies the node identifier for the execution node, converts the guidance function into binary executable machine code, and sends it to the execution node as an execution code; the smart electric energy meter establishes a communication connection with any execution node through carrier communication; the smart electric energy meter generates a metering value at the end of the metering cycle, associates the metering value with the timestamp and the smart electric energy meter number to extract a hash value, and records it as a metering hash value; the metering hash value generated in this metering cycle is extracted together with the hash value generated in the previous metering cycle, and the hash value is used as the feature of this metering cycle. The characteristic hash value is sent to the execution node that establishes communication; after receiving the characteristic hash value, the execution node uses the characteristic hash value as the characteristic value, reads the local time of the execution node to obtain the execution timestamp, inputs the characteristic value and the execution timestamp into the execution code, and feeds back the guidance number and the execution timestamp output by the execution code to the smart electric energy meter; the smart electric energy meter associates the metering value, metering hash value, characteristic hash value, execution timestamp and guidance number of this period as metering data; when the reporting period is reached, the smart electric energy meter reports the metering data of the metering period included in the reporting period to the metering center; the metering center verifies whether the characteristic hash value, execution timestamp and guidance number satisfy the guidance function, and exhaustively tries the value of the node identifier during verification; if the verification passes, the metering data is accepted, if the verification fails, an alarm is issued to prompt manual troubleshooting.
[0006] Preferably, when the metering center verifies the metering data, it obtains several execution nodes that are closest to the carrier communication distance of the smart power meter according to the location of the smart power meter, arranges the several execution nodes in ascending order according to the carrier communication distance, and substitutes the node identifier together with the feature hash value, the execution timestamp and the guidance number into the guidance function in ascending order to determine whether the guidance function is established. If not, it is replaced with the node identifier of the next execution node. If the guidance function is established, the corresponding node identifier is recorded as the common node identifier. The verification of the next metering data is first verified using the common node identifier. If the verification fails, the node identifiers are tried in ascending order.
[0007] Preferably, the node identifier is a numerical value, and the last 2 digits of the guidance number are the same as the last 2 digits of the node identifier, that is, guidance number=100*floor(g(timestamp, feature number))+last 2 digits of node identifier, where floor() is a rounding-down function.
[0008] Preferably, the metering center generates a quick verification function, which is: quick verification number=h(constant C+metering value^node identifier-10^4*(floor(metering value^node identifier / 10^4))), that is, the quick verification number is the sum of the last 4 digits of the metering value and the constant C, and the result is substituted into a preset function h(), and the function h() is a reversible function. The smart electric energy meter randomly sends the metering value to the execution node at any time, and the execution node substitutes the metering value into the quick verification function to obtain the quick verification number, and sends the quick verification number to the smart electric energy meter. The quick verification number is associated with the smart electric energy meter identifier and the timestamp as quick verification data and uploaded to the metering center for storage. After the reporting period arrives, when the metering center verifies the metering data, it reads the quick verification data saved in the reporting period, and infers the last 4 digits and the timestamp of the metering value contained in the quick verification data from the quick verification data, and determines whether the metering value of the metering period where the timestamp is located matches. If not, an alarm is issued to prompt manual investigation.
[0009] Preferably, the method for determining whether the metering value of the metering period in which the timestamp is located matches includes: determining whether the last 5 digits of the metering values corresponding to the start and end times of the metering period in which the timestamp is located are the same; if they are the same, the interval composed of the metering values corresponding to the start and end times of the metering period should include the metering value inferred from the quick verification data, if not, it is determined that there is no match; if they are not the same, the last 4 digits of the metering value at the end of the metering period are used as the lower limit of the interval, and the last 4 digits of the metering value at the end of the metering period plus 10^5 are used as the upper limit of the interval, if the metering value inferred from the quick verification data does not belong to the interval, it is determined that there is no match.
[0010] Preferably, the method for the metering center to verify the metering data includes coarse verification and precise verification. The coarse verification method is to calculate the time difference between the execution timestamp and the timestamp associated with the metering value. If the time difference is less than a preset threshold, the coarse verification passes, otherwise, the coarse verification fails; the precise verification method is to verify whether the characteristic hash value, the execution timestamp and the guidance number satisfy the guidance function; after performing several coarse verifications on the metering data, a precise verification is performed; if the coarse verification fails, a precise verification is performed immediately, and if the precise verification fails, an alarm is issued.
[0011] The substantial effect of the present invention is as follows: by generating a metering value generated within a fixed metering period of a guidance number, if metering data is tampered with, the modification trace can be found through the guidance number, an alarm can be issued in time, and manual investigation and processing can be carried out to ensure the authenticity and reliability of the metering data and maintain the fairness of power metering; the execution node only obtains the binary executable code, which effectively protects the guidance function from being leaked; and the efficiency of metering data verification is accelerated through coarse verification. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 This is a flow chart of a method for trusted storage of metering data according to Example 1.
[0013] Figure 2 This is a schematic diagram of trusted storage of metering data in Example 1.
[0014] Figure 3 This is a schematic diagram of a method for obtaining a node identifier according to Embodiment 1.
[0015] Figure 4 This is a schematic diagram of the verification process of the fast verification function of Example 2.
[0016] Figure 5 This is a schematic diagram of the rapid verification number verification process of Example 2.
[0017] Among them: 10. Metering center, 20. Execution node, 30. Smart electricity meter. DETAILED DESCRIPTION
[0018] The specific implementation of the present invention will be further described below through specific examples in conjunction with the accompanying drawings.
[0019] Embodiment 1:
[0020] A reliable storage method for metering data of a smart electric energy meter 30, as shown in the attached Figure 1As shown, it includes: step A01) the metering center 10 generates a guidance function, the guidance function is: guidance number = f (node identifier, timestamp, feature number); step A02) a plurality of execution nodes 20 are set in the user area, the metering center 10 specifies the node identifier for the execution node 20, converts the guidance function into a binary executable machine code, and sends it to the execution node 20 as an execution code; step A03) the smart electric energy meter 30 establishes a communication connection with any execution node 20 through carrier communication; step A04) the smart electric energy meter 30 generates a metering value at the end of the metering cycle, and the metering value is associated with the timestamp and the number of the smart electric energy meter 30 to extract a hash value, which is recorded as a metering hash value; step A05) the metering hash value generated in the current metering cycle and the hash value generated in the previous metering cycle are extracted together with the hash value, as the feature hash value of the current metering cycle, and the feature hash value is sent to the execution node 20 for establishing communication. Execute node 20; Step A06) After receiving the characteristic hash value, the execution node 20 uses the characteristic hash value as the characteristic value, reads the local time of the execution node 20 to obtain the execution timestamp, inputs the characteristic value and the execution timestamp into the execution code, and feeds back the guidance number and the execution timestamp output by the execution code to the smart power meter 30; Step A07) The smart power meter 30 associates the metering value, metering hash value, characteristic hash value, execution timestamp and guidance number of this period as metering data storage; Step A08) When the reporting period is reached, the smart power meter 30 reports the metering data of the metering period included in the reporting period to the metering center 10; Step A09) The metering center 10 verifies whether the characteristic hash value, execution timestamp and guidance number satisfy the guidance function, and exhaustively tries the value of the node identifier during verification; Step A10) If the verification passes, the metering data is accepted, and if the verification fails, an alarm is issued to prompt manual troubleshooting. As shown in the attached Figure 2As shown, a number of execution nodes 20 are set under the metering center 10, and the execution nodes 20 are basically evenly distributed in the metering area, so that the smart energy meters 30 at different locations can be easily connected to at least one execution node 20. Different execution nodes 20 have different node identifiers. The guidance function needs to be easy to obtain by inverting the characteristic number and the guidance number, that is, it needs to be random. For example, the guidance number = 17*node identifier + floor(3900*cos(timestamp)*sin(characteristic number)). The hash value in this embodiment is a hexadecimal number. By storing the guidance number in association with the metering value, when the metering value is tampered with, the metering hash value will change, which will cause the characteristic hash value to change. After the characteristic hash value is modified, it will no longer match the guidance number. The tamperer cannot obtain the method of generating a matching number, and can only request the execution node 20 by the smart energy meter 30. If the execution node 20 provides a guidance number for the new characteristic hash value obtained after tampering, a new timestamp will be substituted, and the obtained guidance number cannot match the metering period, so that the timestamp, characteristic hash value and guidance number cannot be modified without leaving traces. Therefore, the trustworthiness of the data stored in the smart energy meter 30 is provided.
[0021] When the measurement center 10 verifies the measurement data, Figure 3 As shown, it includes: step B01) according to the location of the smart power meter 30, obtain a number of execution nodes 20 that are closest to the carrier communication distance of the smart power meter 30; step B02) arrange the several execution nodes 20 in ascending order according to the carrier communication distance; step B03) substitute the node identifier together with the feature hash value, the execution timestamp and the guidance number into the guidance function in ascending order to determine whether the guidance function is established. If not, replace it with the node identifier of the next execution node 20. If the guidance function is established; then execute step B04) record the corresponding node identifier as a common node identifier, and the verification of the next metering data is first verified using the common node identifier. If the verification fails, execute step B05) try the node identifiers in ascending order.
[0022] As an alternative implementation scheme, in this embodiment, a guidance number can be used to indicate the node identifier. In this scheme, the node identifier is a numerical value, and the last 2 digits of the guidance number are the same as the last 2 digits of the node identifier, that is, the guidance number = 100*floor(g(timestamp, feature number))+the last 2 digits of the node identifier, where floor() is a rounding function.
[0023] The beneficial technical effect of this embodiment is: by generating the metering value generated within the fixed metering period of the guidance number, if the metering data is tampered with, the modification trace can be found through the guidance number, and an alarm can be issued in time, and manual investigation and processing can be carried out to ensure the authenticity and reliability of the metering data and maintain the fairness of power metering; the execution node 20 only obtains the binary executable code, which effectively protects the guidance function from being leaked. Compared with the use of blockchain for evidence storage in the prior art, this technical solution adopts a completely different technical path to provide proof of authenticity of the stored data. And the authenticity proof is efficient and takes up less resources.
[0024] Embodiment 2:
[0025] A reliable storage method for metering data of a smart electric energy meter 30 is provided. Based on the first embodiment, this embodiment proposes a technical solution including a fast verification function. Figure 4 As shown, the method includes: step C01) the metering center 10 generates a fast verification function, the fast verification function is: fast verification number = h (constant C + metering value ^ node identifier - 10^4 * (floor (metering value ^ node identifier / 10^4))), that is, the fast verification number is the sum of the last 4 digits of the metering value and the constant C, and the result is substituted into the preset function h(), and the function h() is a reversible function; step C02) the smart electric energy meter 30 randomly sends the metering value to the execution node 20 at any time; step C03) the execution node 20 substitutes the metering value into the fast verification function The quick verification number is obtained by counting and the quick verification number is sent to the smart power meter 30; step C04) the quick verification number is associated with the smart power meter 30 identification and timestamp and uploaded to the metering center 10 for storage as quick verification data; step C05) after the reporting period arrives, when the metering center 10 verifies the metering data, it reads the quick verification data saved in the reporting period; step C06) the last 4 digits and timestamp of the metering value contained in the quick verification data are inferred from the quick verification data to determine whether the metering value of the metering period where the timestamp is located matches; step C07) if there is no match, an alarm is issued to prompt manual investigation.
[0026] As attached Figure 5 As shown, the method for determining whether the metering values of the metering period where the timestamp is located match includes: step D01) determining whether the last 5 digits of the metering values corresponding to the start and end times of the metering period where the timestamp is located are the same; step D02) if they are the same, then the interval composed of the metering values corresponding to the start and end times of the metering period should contain the metering value inferred from the fast verification data, if not, it is determined that there is no match; step D03) if they are not the same, then the last 4 digits of the metering value at the end of the metering period are used as the lower limit of the interval, and the last 4 digits of the metering value at the end of the metering period plus 10^5 are used as the upper limit of the interval, and if the metering value inferred from the fast verification data does not belong to the interval, it is determined that there is no match.
[0027] The method for the metering center 10 to verify metering data includes rough verification and precise verification. The rough verification method is to calculate the time difference between the execution timestamp and the timestamp associated with the metering value. If the time difference is less than a preset threshold, the rough verification passes, otherwise, the rough verification fails. The precise verification method is to verify whether the characteristic hash value, the execution timestamp and the guidance number satisfy the guidance function. After performing rough verification on the metering data several times, a precise verification is performed. If the rough verification fails, a precise verification is performed immediately. If the precise verification fails, an alarm is issued. Compared with the first embodiment, this embodiment accelerates the efficiency of metering data verification by combining rough verification and precise verification.
[0028] The above-described embodiment is only a preferred solution of the present invention and does not limit the present invention in any form. There are other variations and modifications without exceeding the technical solution described in the claims.
Claims
1. A reliable storage method for metering data of smart electric energy meters. It is characterized in that include: The measurement center generates a guidance function, wherein the guidance function is: guidance number = f (node identifier, timestamp, feature number); Several execution nodes are set up in the user area. The measurement center assigns node identifiers to the execution nodes, converts the guidance functions into binary executable machine codes, and sends them to the execution nodes as execution codes. The smart energy meter establishes a communication connection with any execution node through carrier communication; The smart energy meter generates a metering value at the end of the metering cycle, and extracts a hash value by associating the metering value with a timestamp and the smart energy meter number, which is recorded as a metering hash value; Extract the hash value of the metering hash value generated in the current metering cycle together with the hash value generated in the previous metering cycle as the characteristic hash value of the current metering cycle, and send the characteristic hash value to the execution node for establishing communication; After receiving the characteristic hash value, the execution node uses the characteristic hash value as the characteristic value, reads the local time of the execution node to obtain the execution timestamp, inputs the characteristic value and the execution timestamp into the execution code, and feeds back the guidance number and the execution timestamp output by the execution code to the smart energy meter; The smart energy meter associates the measurement value, measurement hash value, characteristic hash value, execution timestamp and guidance number of the current cycle as measurement data; When the reporting cycle is reached, the smart energy meter reports the metering data of the metering cycle included in the reporting cycle to the metering center; The measurement center verifies whether the characteristic hash value, execution timestamp, and guidance number satisfy the guidance function, and exhaustively tries the value of the node identifier during verification; If the verification is successful, the metering data is accepted; if the verification is not successful, an alarm is issued to prompt manual troubleshooting; The node identifier is a numerical value, and the last two digits of the guidance number are the same as the last two digits of the node identifier, that is, guidance number=100*floor(g(timestamp, feature number))+last two digits of the node identifier, where floor() is a rounding function; The metering center generates a fast verification function, which is: fast verification number = h (constant C + metering value ^ node identifier - 10^4 * (floor (metering value ^ node identifier / 10^4))), that is, the fast verification number is the sum of the last 4 digits of the metering value and the constant C, and the result is substituted into the preset function h(). Function h() is a reversible function. The smart electric energy meter randomly sends the metering value to the execution node at any time. The execution node substitutes the metering value into the fast verification function to obtain the fast verification number, sends the fast verification number to the smart electric energy meter, and associates the fast verification number with the smart electric energy meter identifier and timestamp as fast verification data to the metering center for storage. After the reporting period arrives, when the metering center verifies the metering data, it reads the fast verification data saved in the reporting period, and infers the last 4 digits and timestamp of the metering value contained in the fast verification data from the fast verification data, and determines whether the metering value of the metering period where the timestamp is located matches. If not, an alarm is issued to prompt manual investigation; Methods for determining whether the measurement values of the measurement period in which the timestamp is located match include: Determine whether the fifth digit at the end of the measurement value corresponding to the start and end times of the measurement period where the timestamp is located is the same; If they are the same, the interval composed of the measurement values corresponding to the start and end times of the measurement cycle should contain the measurement values inverted from the fast verification data. If not, it is determined to be mismatched; If they are not the same, the last 4 digits of the measurement value at the end of the measurement period are taken as the lower limit of the interval, and the last 4 digits of the measurement value at the end of the measurement period plus 10^5 are taken as the upper limit of the interval. If the measurement value inferred from the quick verification data does not belong to the interval, it is judged as a mismatch.
2. A reliable storage method for metering data of a smart electric energy meter according to claim 1, It is characterized in that When the metering center verifies the metering data, it obtains several execution nodes closest to the carrier communication distance of the smart electric energy meter according to the location of the smart electric energy meter, arranges the several execution nodes in ascending order according to the carrier communication distance, and substitutes the node identifier together with the feature hash value, the execution timestamp and the guidance number into the guidance function in ascending order to determine whether the guidance function is established. If not, it is replaced with the node identifier of the next execution node. If the guidance function is established, the corresponding node identifier is recorded as the common node identifier. The verification of the next metering data is first verified using the common node identifier. If the verification fails, the node identifiers are tried in ascending order.
3. A reliable storage method for metering data of a smart electric energy meter according to claim 1 or 2, It is characterized in that The method for the metering center to verify the metering data includes rough verification and precise verification. The rough verification method is to calculate the time difference between the execution timestamp and the timestamp associated with the metering value. If the time difference is less than a preset threshold, the rough verification passes, otherwise, the rough verification fails. The precise verification method is to verify whether the characteristic hash value, the execution timestamp and the guidance number satisfy the guidance function; After several rough verifications of the measurement data, an accurate verification is performed; If the rough verification fails, the precise verification is immediately performed. If the precise verification fails, an alarm is issued.
Citation Information
Patent Citations
Intelligent fusion terminal based on block chain
CN112383141A
Anonymous and certifiable key exchange method based on smart grid
CN109474610A
Transaction verification method and device for block chain system and hardware equipment
CN111524009A
Time stamp giving system, time stamp giving method, time stamp giving program
JP2011205234A
