Metering data management method and device based on block chain technology, and traceability platform
By constructing a key-value storage space and an id-version data version control space on the blockchain, combined with smart contracts, the problems of authenticity and tamper resistance of metering data are solved, the traceability and immutability of data are realized, and the security and convenience of metering data management are improved.
Patent Information
- Application Number
- CN202411335756.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2025-01-10
AI Technical Summary
Existing technologies are insufficient to effectively address the issues of authenticity, integrity, and tamper resistance of metering data, especially given the widespread distribution of metering devices and the difficulty in supervising and managing them, leading to a crisis of trust between users and power supply companies.
A blockchain-based metrological data management method is adopted. By constructing a key-value storage space and an id-version data version control space, smart contracts are used to realize data storage, updating, deletion and querying, and record the historical version and operation record of each operation to ensure the immutability and traceability of the data.
It ensures the authenticity, integrity, and tamper resistance of measurement data, allows users to view all historical versions and operation records of data, ensures data transparency and immutability, and improves the security and convenience of data management.
Smart Images

Figure CN119293013A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of metrology data management, and in particular to a metrology data management method, device and traceability platform based on blockchain technology. Background Art
[0002] Data measurement exists in all aspects of daily life, such as electricity, gas, and water supply; taking electricity as an example, electric energy data is the basic data item of power metering instruments. Accurate measurement of user electricity consumption and other metering data not only involves the economic interests of power supply companies and users, but also concerns transaction fairness and social stability. Metering devices are usually provided by power supply companies and installed in distribution boxes at the user's line entry or near the user. The number of metering devices is large and their distribution is scattered, making it difficult for power supply companies to supervise and manage them, resulting in some users stealing electricity by modifying metering devices or changing metering data. Some users suspect that power supply companies will privately change the data reported by their metering devices. The trust issue between power supply companies and users has always plagued power supply companies and electricity users.
[0003] In industry, the accuracy and immutability of data measurement are also of great significance.
[0004] Blockchain is a decentralized distributed ledger that is tamper-proof, secure and reliable. It combines distributed storage, peer-to-peer transmission, consensus mechanism, cryptography and other technologies to record transactions and information through a growing data block chain to ensure data security and transparency. Smart contracts are automatically executed computer programs that run on blockchain. Its working principle is that when the terms of the contract are met, the smart contract will be automatically executed without the intervention of a third party. Smart contracts have the characteristics of de-trust, tamper-proof, and economical and efficient. Smart contract technology makes blockchain programmable and supports a wider range of applications.
[0005] The Chinese patent with publication number CN117200843A discloses a blockchain-based measurement electronic certificate verification and management system, which is simply a method of using blockchain for one-time and tamper-proof storage, and has certain limitations. Summary of the invention
[0006] In order to solve the technical problems existing in the above-mentioned prior art, the purpose of the present invention is to provide a metering data management method, device and traceability platform based on blockchain technology, which can realize the normal addition, deletion, modification and query of metering data, and can view all historical versions of all data and historical operation records of all data, thereby ensuring the authenticity, integrity and tamper-resistance of the metering data.
[0007] To achieve the above-mentioned purpose of the invention, the present invention provides a measurement data management method based on blockchain technology, comprising the following steps:
[0008] On the blockchain, a key-value pair storage space and an id-version data version control space are constructed, wherein the key-value pair storage space is used to store pairs of key data and value data, and the id-version data version control space is used to store pairs of id data and version data;
[0009] The metering data management system is used to control the key-value pair storage space and the id-version data version control space through the smart contract to realize data storage, data update, data deletion, and data query of metering data. The records of the data storage, data update, and data deletion are saved in the key-value pair storage space and the id-version data version control space.
[0010] According to a technical solution of the present invention, before the metering data is stored, the metering data is processed, and the method for processing the metering data comprises the following steps:
[0011] A version number and a unique id are assigned to the metering data.
[0012] According to a technical solution of the present invention, the data storage method of any metering data to be stored comprises the following steps:
[0013] The id and the version number of the metering data to be stored are combined as key data, and the value of the metering data to be stored is used as value data, and written into the key-value pair storage space in pairs;
[0014] The id of the metering data to be stored is used as id data, and the version number of the metering data to be stored is used as version data, and are written into the id-version data version control space in pairs.
[0015] According to a technical solution of the present invention, the method for updating the data of the metering data is to update the value of the stored metering data to the new value of the metering data, comprising the following steps:
[0016] According to the id corresponding to the metering data to be stored, obtaining the version data corresponding to the id from the id-version data version control space through the corresponding id data;
[0017] Increment the version data by one;
[0018] The id and the version data processed by self-increment are combined as the new key data, and the new value of the metering data is used as the new value data, and written into the key-value pair storage space in pairs;
[0019] In the id-version data version control space, the version data corresponding to the id is updated to the version data that has been processed by self-increment.
[0020] According to a technical solution of the present invention, the method for deleting metering data comprises the following steps:
[0021] According to the id corresponding to the metering data, the version data corresponding to the id is obtained from the id-version data version control space,
[0022] The version data is incremented by one.
[0023] The id and the version data processed by self-increment are combined as the new key data, and the deletion mark del is used as the new value data, and are written into the key-value pair storage space in pairs;
[0024] In the id-version data version control space, the version data corresponding to the id is updated to the version data that has been processed by self-increment.
[0025] According to a technical solution of the present invention, the data query method comprises the following steps:
[0026] According to the id corresponding to the metering data to be queried, the version data corresponding to the id is obtained from the id-version data version control space,
[0027] The id and the version data are combined as the key data, and the value of the value data corresponding to the key data is read from the key-value pair storage space, where the value of the value data is the value of the metering data to be queried.
[0028] According to a technical solution of the present invention, the metrology data management system includes:
[0029] Graphical user interface;
[0030] Data management interface: The data management interface is implemented through a smart contract, and the data management interface includes a data storage interface and a data output interface.
[0031] According to one aspect of the present invention, a metering data management device for implementing the above-mentioned metering data management method is provided, wherein the metering data management device comprises a plurality of metering data management devices, and any metering data management device comprises:
[0032] An identity recognition module, the identity recognition module including a unique identity identification public key and private key pair;
[0033] Blockchain management module, used to interact with the blockchain;
[0034] The metering data management module is used to provide the data storage, data update, data deletion and data query services.
[0035] According to a technical solution of the present invention, the blockchain management module is used to configure blockchain node addresses and smart contract addresses, and allocate blockchain storage space.
[0036] According to one aspect of the present invention, a metering data traceability platform implemented based on the above-mentioned metering data management method is provided, and the metering data traceability platform realizes the traceability of metering data based on the key-value key value pair storage space and the id-version data version control space.
[0037] Compared with the prior art, the present invention has the following beneficial effects:
[0038] (1) Using smart contracts on the blockchain, an incremental and tamper-proof key-value pair storage space is established, which will objectively and truthfully record the source public key of each operation data. While being able to add, delete, modify, and check the latest version of data normally, all historical versions of all data and historical operation records of all data can be viewed, and all data can be traced and tamper-proof, ensuring the authenticity, integrity, and tamper-proof nature of the measurement data;
[0039] (2) The data uploaded to the chain is accompanied by the version number;
[0040] (3) Data deletion operations cannot be performed in on-chain smart contracts, and data can only be deleted by adding versions;
[0041] (4) Save all historical version information of all data.
[0042] (5) The improvement from manually managing private keys to having private keys built into dedicated devices greatly improves security and convenience. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0044] Figure 1 A schematic diagram schematically showing the control principle of metering data storage of an embodiment of the present invention;
[0045] Figure 2 A schematic diagram schematically showing the principle of updating the metering data of an embodiment of the present invention;
[0046] Figure 3 A schematic diagram schematically showing the principle of deleting metering data according to an embodiment of the present invention;
[0047] Figure 4 A schematic diagram schematically shows the structure of a metering data management device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0048] The description of the embodiments of this specification should be combined with the corresponding drawings, which should be considered as part of the complete specification. In the drawings, the shape or thickness of the embodiments may be enlarged and indicated for simplification or convenience. Furthermore, the parts of each structure in the drawings will be described separately. It is worth noting that the elements not shown in the drawings or not described in words are in a form known to ordinary technicians in the relevant technical field.
[0049] The description of the embodiments herein and any reference to directions and orientations are only for the convenience of description and are not to be construed as any limitation on the scope of protection of the present invention. The following description of the preferred embodiments may involve combinations of features, which may exist independently or in combination, and the present invention is not particularly limited to the preferred embodiments. The scope of the present invention is defined by the claims.
[0050] This embodiment performs data storage, updating, deletion and query operations on metering data based on the method of the present invention, which can be applied to the metering of household electricity meters and also to the electricity metering of industrial equipment.
[0051] Specifically, taking electricity metering data as an example, it is necessary to store the meter data of each household in a community, update it once a month, and delete the metering data when a household is closed. Therefore, it is necessary to store, update, delete and query the meter data of each household.
[0052] Taking the metrology data of the secondary metrology station as an example, in the important tasks of value transfer and traceability, it is necessary to store the metrology data of each type of each standard equipment, update it once every cycle, and delete data in special circumstances. It is necessary to leave historical data and detailed records. Therefore, it is necessary to store, update, delete and query the metrology data of the standard equipment.
[0053] The specific scheme of the measurement data management method based on blockchain technology of the present invention is as follows:
[0054] On the blockchain, the metering data management device is used to build Figure 1 The key-value pair storage space and id-version data version control space shown in the figure, the key-value pair storage space is used to store pairs of key data and value data, and the id-version data version control space is used to store pairs of id data and version data;
[0055] In the key-value pair storage space, the key part of each key-value pair consists of two parts: the data entry index id and the unique version number of the data. The value part is the specific data. The id is used to uniquely identify and locate the data entry, and the version is used to find the latest version of the data and trace the historical operation records of the data. The data in the value part can be non-encrypted public data or encrypted private data.
[0056] A metering data management system is built on the blockchain. The metering data management system includes a graphical user interface and a data management interface implemented by a smart contract. A smart contract is an automatically executed computer program that runs on the blockchain. When the terms of the contract are met, the smart contract will be automatically executed without the intervention of a third party. The graphical user interface is for administrators and users. Administrators can configure the blockchain node address and smart contract address of the storage space through the metering data management system. Users can perform data storage, data update, data deletion, and data query operations on metering data through the metering data management system.
[0057] The data management interface is implemented using smart contracts. The data management interface only has a data storage interface and a data output interface, and does not provide an interface for updating or deleting data.
[0058] The data storage, data update, data deletion, and data query operations of metering data are realized through smart contracts, key-value key-value pair storage space and id-version data version control space. The records of the above operations are saved in the key-value key-value pair storage space and id-version data version control space.
[0059] Smart contracts are used on the blockchain to establish an incremental, non-tamperable key-value pair storage space, which will objectively and truthfully record the source public key of each operation data. While being able to add, delete, modify, and check the latest version of data normally, all historical versions of all data and historical operation records of all data can be viewed, and all data can be traced and cannot be tampered with, ensuring the authenticity, integrity, and tamper-resistance of the measurement data;
[0060] (1) Storage of measurement data
[0061] When a piece of data is stored for the first time, an initial version number and a unique id are first assigned to the data. The storage instruction, the id of the data, the initial version number and the value of the data are input through the metering data management device. The smart contract will combine the id and initial version number of the metering data as key data, and the value of the metering data as value data. The data management interface is called to write them in pairs into the key-value pair storage space. The id of the metering data to be stored is used as id data, and the initial version number of the metering data to be stored is used as version data. The data management interface is called to write them in pairs into the id-version data version control space.
[0062] (2) Update of measurement data
[0063] like Figure 2 As shown, when updating a piece of stored data, the update instruction, the ID of the metering data and the new value are input through the metering data management device, and the smart contract obtains the version data corresponding to the ID from the id-version data version control space according to the ID of the metering data;
[0064] The smart contract increments the version data by one;
[0065] The smart contract combines the id and the self-incremented version data as the new key data, and writes the new value of the measurement data as the new value data into the key-value pair storage space in pairs; at the same time, the version data corresponding to the id is updated to the self-incremented version data in the id-version data version control space.
[0066] (3) Deletion of measurement data
[0067] like Figure 3 As shown, when deleting a piece of data, the ID of the metering data and the deletion instruction are input through the metering data management device. The smart contract will obtain the version data corresponding to the ID from the id-version data version control space according to the ID corresponding to the metering data.
[0068] The smart contract automatically increments the version data.
[0069] The smart contract merges the id and the version data that has been processed by self-increment as the new key data, and writes the deletion mark del as the new value data in pairs into the key-value pair storage space; at the same time, the version data corresponding to the id is updated to the version data that has been processed by self-increment in the id-version data version control space.
[0070] (4) Query measurement data
[0071] When querying a piece of data, the ID of the metering data and the query instruction are input through the metering data management device. The smart contract obtains the version data corresponding to the ID from the id-version data version control space according to the ID corresponding to the metering data to be queried.
[0072] Combine the id and version data as key data, read the value of the value data corresponding to the key data from the key-value pair storage space, and the value of the value data returned by the smart contract is the value of the metering data to be queried.
[0073] From the above operations, we can see that each data deletion, data storage, and data update operation of the metering data is recorded in the key-value key-value pair storage space, and the id-version data version control space stores the id of the metering data and the corresponding version. The version data shows how many times the metering data has been operated.
[0074] This embodiment also provides a metering data management device based on the above method;
[0075] The metering data management device is used to interact with the blockchain and perform data management work, including multiple metering data management devices and administrator devices.
[0076] Administrator device: used to provide the administrator with authority control and allocation functions of the metering data management device;
[0077] Each metering data management device is Figure 4 Shown include:
[0078] Identity module: A unique public key and private key pair. The private key exists only in the device and cannot be viewed or exported.
[0079] Blockchain management module: responsible for managing the interaction with the public blockchain, providing a blockchain-specific interaction module. Administrators can configure the blockchain node addresses and smart contract addresses to be interacted with in the blockchain-specific interaction module.
[0080] Metering data management module: provides an operation interface for adding, deleting, modifying and checking metering managers, and provides a traditional data interface for adding, deleting, modifying and checking traditional metering management information systems.
[0081] The metering data management device also provides a metering data traceability platform. The metering data traceability platform is based on the key-value pair storage space and the id-version data version control space to view all historical versions of all data and historical operation records of all data, and to authorize third-party access rights for data mining.
[0082] When tracing the metering data, based on the ID of the metering data, the metering data tracing platform extracts all key-value data pairs and id-version data pairs corresponding to the id in the key-value key pair storage space and id-version data version control space. Based on the initial version number of the metering data and the extracted version data, it can be seen how many times the data has been updated and deleted in total. Based on the key-value data, the content of each modification and the corresponding version as well as the public key of the modifier can be seen.
[0083] Through the measurement data management device, the latest version of data can be added, deleted, modified and checked normally while ensuring that the data is open, transparent, tamper-proof, non-forgeable and traceable.
[0084] The metrology data management method of the present invention can realize the authenticity, integrity, tamper resistance and traceability of metrology data. In specific applications, taking the aerospace industry as an example:
[0085] 1. Ensure flight safety
[0086] Spacecraft rely on accurate data measurement in all stages of launch, operation and return. From the thrust parameters of rocket engines to the orbital data of spacecraft, any inaccuracy in data can lead to catastrophic consequences. Accurate measurement can help engineers accurately grasp the status of the spacecraft, detect potential problems in time and take corresponding measures to ensure the safety of the flight mission.
[0087] 2. Optimized design and performance improvement
[0088] Aerospace engineering is a highly complex system engineering involving many disciplines and technical fields. Accurate data measurement provides a key basis for the design and performance optimization of spacecraft. For example, accurate measurement of mechanical properties, thermal properties and other data of materials can help designers select the most suitable materials and improve the structural strength and heat resistance of spacecraft. At the same time, accurate measurement of engine performance parameters helps optimize engine design, improve propulsion efficiency, and increase the carrying capacity and flight distance of spacecraft.
[0089] 3. Improve reliability and quality traceability
[0090] In the aerospace industry, the authenticity and reliability of data are of vital importance. Unalterable data can ensure that the recorded flight parameters, experimental results, etc. are original and authentic, and have not been modified or forged. This is of great significance for accident investigation, quality control and scientific research. Once a space accident occurs, unalterable data can provide investigators with accurate clues to help them find the cause of the accident and take corresponding improvement measures to avoid similar accidents from happening again. At the same time, in the quality control process, unalterable data can ensure that product quality meets standards and improve the reliability and safety of aerospace products.
[0091] IV. Safeguarding National Security and Strategic Interests
[0092] Unalterable data can ensure the safe application of aerospace technology, prevent data from being maliciously tampered with or stolen, and safeguard national security and strategic interests. For example, accurate and unalterable data is essential for tasks such as missile warning, satellite communications, and intelligence gathering. Only by ensuring the security and reliability of data can we effectively maintain national security and strategic advantages.
[0093] The accuracy and immutability of data measurement are important foundations for ensuring space flight safety, promoting technological innovation, facilitating scientific research and safeguarding national interests.
[0094] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0095] Finally, it should be noted that the above is a preferred embodiment of the present invention. It should be pointed out that although the preferred embodiment of the present invention has been described, for those skilled in the art, once the basic creative concept of the present invention is known, several improvements and modifications can be made without departing from the principles of the present invention, and these improvements and modifications should also be regarded as the protection scope of the present invention. Therefore, the attached claims are intended to be interpreted as including the preferred embodiment and all changes and modifications that fall within the scope of the embodiments of the present invention.
Claims
1. A measurement data management method based on blockchain technology, characterized in that: The steps include: On the blockchain, a key-value pair storage space and an id-version data version control space are constructed, wherein the key-value pair storage space is used to store pairs of key data and value data, and the id-version data version control space is used to store pairs of id data and version data; The metering data management system is used to control the key-value pair storage space and the id-version data version control space through the smart contract to realize data storage, data update, data deletion, and data query of metering data. The records of the data storage, data update, and data deletion are saved in the key-value pair storage space and the id-version data version control space.
2. The method for managing measurement data according to claim 1, characterized in that: Before storing the metering data, the metering data is processed. The method for processing the metering data comprises the following steps: A version number and a unique id are assigned to the metering data.
3. The method for managing measurement data according to claim 1 or 2, characterized in that: The data storage method of any of the metering data to be stored comprises the following steps: The id and the version number of the metering data to be stored are combined as key data, and the value of the metering data to be stored is used as value data, and written into the key-value pair storage space in pairs; The id of the metering data to be stored is used as id data, and the version number of the metering data to be stored is used as version data, and are written into the id-version data version control space in pairs.
4. The method for managing measurement data according to claim 1 or 2, characterized in that: The method for updating the data of the metering data is to update the value of the stored metering data to the new value of the metering data, comprising the following steps: According to the id corresponding to the metering data to be stored, obtaining the version data corresponding to the id from the id-version data version control space through the corresponding id data; Increment the version data by one; The id and the version data processed by self-increment are combined as the new key data, and the new value of the metering data is used as the new value data, and written into the key-value pair storage space in pairs; In the id-version data version control space, the version data corresponding to the id is updated to the version data that has been processed by self-increment.
5. The method for managing measurement data according to claim 1 or 2, characterized in that: The method for deleting metering data comprises the following steps: According to the id corresponding to the metering data, the version data corresponding to the id is obtained from the id-version data version control space, The version data is incremented by one. The id and the version data processed by self-increment are combined as the new key data, and the deletion mark del is used as the new value data, and are written into the key-value pair storage space in pairs; In the id-version data version control space, the version data corresponding to the id is updated to the version data that has been processed by self-increment.
6. The method for managing measurement data according to claim 1 or 2, characterized in that: The data query method comprises the following steps: According to the id corresponding to the metering data to be queried, the version data corresponding to the id is obtained from the id-version data version control space, The id and the version data are combined as the key data, and the value of the value data corresponding to the key data is read from the key-value pair storage space, where the value of the value data is the value of the metering data to be queried.
7. The method for managing measurement data according to claim 1, characterized in that: The measurement data management system comprises: Graphical user interface; Data management interface: The data management interface is implemented through a smart contract, and the data management interface includes a data storage interface and a data output interface.
8. A metering data management device for implementing the metering data management method according to any one of claims 1 to 7, characterized in that: The metering data management device includes a plurality of metering data management devices, any of which includes: An identity recognition module, the identity recognition module including a unique identity identification public key and private key pair; Blockchain management module, used to interact with the blockchain; The metering data management module is used to provide the data storage, data update, data deletion and data query services.
9. The metering data management device according to claim 8, characterized in that: The blockchain management module is used to configure blockchain node addresses and smart contract addresses, and allocate blockchain storage space.
10. A metrology data traceability platform implemented based on the metrology data management method according to any one of claims 1 to 7, characterized in that: The metering data traceability platform realizes the traceability of metering data based on the key-value key value pair storage space and the id-version data version control space.
Citation Information
Patent Citations
Millimeter wave networking communication multi-beam phased-array antenna device
CN117200843A