A blockchain-based metering device and a reliable system for monitoring metering data

By introducing blockchain technology into the metering device, public and private keys and certificates are generated, and the metering data is recorded in the blockchain ledger. This solves the problem of untrustworthy metering data in scenarios such as water supply and power supply, and achieves safe and credible metering data. management and monitoring.

CN114900308BActive Publication Date: 2024-10-29BEIJING YIWEIBAO NETWORK TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210315626.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-28
Publication Date
2024-10-29
Estimated Expiration
2042-03-28

AI Technical Summary

Technical Problem

In scenarios such as water supply, power supply, and gas stations, consumers fail to proactively obtain invoices after metering is completed, or suppliers fail to issue invoices, resulting in tax losses. Moreover, metering data is stored in the supplier's system, making account verification unreliable, and there is a lack of credible Measurement using information technology.

Method used

Design a metering device based on the blockchain, including a shunt module, an encryption unit and a network unit. By generating public and private keys, encryption and signature functions, the metering data is sent to the blockchain server, and the CA server is used to issue certificates and place them in the block. Record data in the chain ledger to ensure the credibility and traceability of the data.

Benefits of technology

It achieves safe and credible measurement data recording and monitoring, ensures the non-tamperability and traceability of data, and solves the problems of tax losses and unreliable account verification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114900308B_ABST
    Figure CN114900308B_ABST
Patent Text Reader

Abstract

The present disclosure discloses a metering device based on blockchain, including: a shunt module, which includes an encryption unit, a storage unit and a network unit; an encryption unit for generating public and private keys, encryption and signature functions; a network unit for sending metering data to a business platform and a blockchain server outside the metering device; a storage unit for storing a private key, user information, and a certificate issued to the shunt module by a CA server outside the metering device, wherein the user information is associated with the metering device. In this way, the present disclosure realizes a secure and reliable metering device and its solution.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure belongs to the field of measurement, and in particular relates to a blockchain-based measurement device and a reliable system for monitoring measurement data. Background Art

[0002] In water supply, electricity and gas supply, gas stations, charging facilities and other scenarios, after the metering is completed, consumers often do not consciously ask suppliers to provide invoices, or suppliers do not issue invoices for various reasons, resulting in tax losses. In addition, since the metering data is stored in the supplier's system, the verification of accounts becomes unreliable.

[0003] How to reliably measure and introduce information technology has always been an urgent problem to be solved. Summary of the invention

[0004] In view of this, the present disclosure discloses a blockchain-based metering device, comprising:

[0005] The traffic distribution module includes an encryption unit, a storage unit and a network unit;

[0006] Cryptographic unit, used for generating public and private keys, encryption and signing functions;

[0007] A network unit, used for sending metering data to a business platform and a blockchain server outside the metering device;

[0008] A storage unit is used to store a private key, user information, and a certificate issued by a CA server outside the metering device to the diversion module, wherein the user information is associated with the metering device.

[0009] Preferably,

[0010] The user information includes: a user name to which the metering device belongs, and a unique code of any module or unit in the metering device.

[0011] Preferably,

[0012] The metering device also includes:

[0013] A key generation interface, used to generate a public key and a private key according to user information and a first encryption algorithm and store them in a storage unit;

[0014] Among them, when the metering device is registered to the blockchain, the user information is first checked for duplication by the CA server. When it is confirmed to be legal, the ID associated with the metering device is obtained based on the user information.

[0015] Preferably,

[0016] The unique code of any module or unit includes: the unique code of the network unit (such as a MAC address), the unique code of the encryption unit (such as a unique serial code or ID of the main control chip), and the file verification code of other possible digital modules or digital units (such as a storage unit implemented as a readable and writable file, and the verification code of the file).

[0017] Preferably,

[0018] The metering device starts the blockchain registration process by the following method:

[0019] S100, generating a public key and a private key according to user information and a first encryption algorithm, and using them as the public key and private key of the metering device;

[0020] S200, calculating the intermediate hash value of the user information and the public key, and then signing the intermediate hash value with the private key;

[0021] S300, sending the user information, public key and signature to the CA server via the network module;

[0022] S400, the CA server decrypts the signature using the received public key to obtain a first hash value, and then calculates a hash value based on the user information and the public key to obtain a second hash value. If the first hash value is equal to the second hash value, the signature verification is successful, and,

[0023] The CA server generates a digital certificate and calculates the hash value of the certificate, and then signs the hash value of the certificate with the private key of the CA server to obtain the signature of the certificate;

[0024] The CA server returns the digital certificate and the certificate signature, as well as the public key of the CA server;

[0025] S500, using the public key of the CA server to decrypt the signature of the certificate to obtain a third hash value, and: obtaining a fourth hash value by calculating the hash value of the digital certificate, if the third hash value is equal to the fourth hash value, it means that the digital certificate is valid;

[0026] S600: Save the valid digital certificate to the storage unit.

[0027] Preferably,

[0028] When uploading metering data, the metering device follows the following steps:

[0029] S10, sending the metering data to the diversion module;

[0030] S20, the diversion module sends the metering data to the original business platform;

[0031] S30, calculating the hash value of the user information, the metering data and the certificate, and signing the hash value with a private key;

[0032] S40, sending the user information, metering data, certificate and signature to a blockchain server;

[0033] S50, the blockchain server first verifies the validity of the signature: uses the public key of the CA server to decrypt the certificate, obtains the public key of the metering device, uses the public key to decrypt the signature, and obtains the fifth hash value; then performs hash calculation on the metering data and the certificate to obtain the sixth hash value. If the fifth hash value is equal to the sixth hash value, it means that the signature is valid;

[0034] S60. If the signature is valid, the blockchain server records the user information and metering data into the blockchain account book.

[0035] In addition, the present disclosure also discloses a blockchain-based system for reliable measurement data of monitoring and measuring devices, including:

[0036] The metering device;

[0037] A service platform external to the metering device, the service platform interacting with the metering device through the diversion module; and

[0038] A blockchain, comprising the blockchain server, a CA server, and a blockchain ledger; and

[0039] A monitoring platform that interacts with the blockchain, wherein the monitoring platform reads data from the blockchain ledger to obtain trusted metering data.

[0040] Through the above technical solution, the present invention realizes a safe and reliable metering device and its monitoring system, ensuring the credibility and traceability of data. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 It is a schematic diagram of a system disclosed in one embodiment of the present disclosure. DETAILED DESCRIPTION

[0042] In order to make those skilled in the art understand the technical solutions disclosed in the present disclosure, the following will be combined with the embodiments and related appended Figure 1, the technical solutions of various embodiments are described, and the described embodiments are part of the embodiments of the present disclosure, rather than all of the embodiments. The terms "first", "second", etc. used in the present disclosure are used to distinguish different objects, rather than to describe a specific order. In addition, "including" and "having" and any variations thereof are intended to cover and not exclude inclusion. For example, a process, or method, or system, or product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, systems, products or devices.

[0043] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present disclosure. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It will be understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0044] In one embodiment, the present disclosure discloses a blockchain-based metering device, comprising:

[0045] The traffic distribution module includes an encryption unit, a storage unit and a network unit;

[0046] Cryptographic unit, used for generating public and private keys, encryption and signing functions;

[0047] A network unit, used for sending metering data to a business platform and a blockchain server outside the metering device;

[0048] A storage unit is used to store a private key, user information, and a certificate issued by a CA server outside the metering device to the diversion module, wherein the user information is associated with the metering device.

[0049] It can be understood that the above embodiment provides a metering device based on blockchain technology, the core of which lies in the diversion module, which further diverts traffic to the blockchain server through the module in addition to the original external business platform, thereby achieving security, reliability and traceability.

[0050] In one embodiment,

[0051] The user information includes: a user name to which the metering device belongs, and a unique code of any module or unit in the metering device.

[0052] For this embodiment, it is intended to make the user information unique and representative, so as to uniquely represent the metering device.

[0053] In one embodiment,

[0054] The metering device also includes:

[0055] A key generation interface, used to generate a public key and a private key according to user information and a first encryption algorithm and store them in a storage unit;

[0056] Among them, when the metering device is registered to the blockchain, the user information is first checked for duplication by the CA server. When it is confirmed to be legal, the ID associated with the metering device is obtained based on the user information.

[0057] It can be understood that, similar to user information, the public key and private key are public keys and private keys that can represent the metering device.

[0058] In one embodiment,

[0059] The unique code of any module or unit includes: the unique code of the network unit (such as a MAC address), the unique code of the encryption unit (such as a unique serial code or ID of the main control chip), and the file verification code of other possible digital modules or digital units (such as a storage unit implemented as a readable and writable file, and the verification code of the file).

[0060] It should be noted that this embodiment means that: the unique code can be related to hardware, so that the measuring device is in the field of traditional measuring instruments; however, the unique code can also be independent of hardware and related to digital files, which means that the technical solution of the present disclosure is also applicable to virtual measuring instruments, as long as they meet the uniqueness and can represent the measuring device.

[0061] When it is a software digital metering device, the shunt device of the metering device includes at least one or more interfaces to interact with the system or interface outside the metering device. The digital metering device can be a digital file in various formats, and its interface is implemented by a digital interface for reading and writing files or other suitable API technology, so that the metering device can interact with the system or interface outside it by accessing such digital files. Obviously, hardware metering devices generally have higher security than software digital metering devices, but this does not prevent the present disclosure from adopting existing digital encryption technology or monitoring technology or other digital security technology to improve the security of software digital metering devices or virtual metering devices.

[0062] In one embodiment,

[0063] The metering device starts the blockchain registration process by the following method:

[0064] S100, generating a public key and a private key according to user information and a first encryption algorithm, and using them as the public key and private key of the metering device;

[0065] S200, calculating the intermediate hash value of the user information and the public key, and then signing the intermediate hash value with the private key;

[0066] S300, sending the user information, public key and signature to the CA server via the network module;

[0067] S400, the CA server decrypts the signature using the received public key to obtain a first hash value, and then calculates a hash value based on the user information and the public key to obtain a second hash value. If the first hash value is equal to the second hash value, the signature verification is successful, and,

[0068] The CA server generates a digital certificate and calculates the hash value of the certificate, and then signs the hash value of the certificate with the private key of the CA server to obtain the signature of the certificate;

[0069] The CA server returns the digital certificate and the certificate signature, as well as the public key of the CA server;

[0070] S500, using the public key of the CA server to decrypt the signature of the certificate to obtain a third hash value, and: obtaining a fourth hash value by calculating the hash value of the digital certificate, if the third hash value is equal to the fourth hash value, it means that the digital certificate is valid;

[0071] S600: Save the valid digital certificate to the storage unit.

[0072] In combination with the foregoing, it can be understood that the public key and private key can be the public key and private key of the shunt module itself, and used as the public key and private key of the metering device; the public key and private key can also be the public key and private key of other hardware or other digital modules / units themselves, as long as they are part of the metering device, they can also be used as the public key and private key of the metering device. This is exactly what the present disclosure points out: the general meaning of user information. In other words, the user information of the present disclosure is not limited to the traditional user name.

[0073] Through the above steps, the above embodiment finally registers the metering device on the chain, so that it can interact with the blockchain later.

[0074] By extension, the registered metering device can be further connected to other management systems through its diversion module to implement trusted management and operation, such as remote maintenance.

[0075] In one embodiment,

[0076] When uploading metering data, the metering device follows the following steps:

[0077] S10, sending the metering data to the diversion module;

[0078] S20, the diversion module sends the metering data to the original business platform;

[0079] S30, calculating the hash value of the user information, the metering data and the certificate, and signing the hash value with a private key;

[0080] S40, sending the user information, metering data, certificate and signature to a blockchain server;

[0081] S50, the blockchain server first verifies the validity of the signature: uses the public key of the CA server to decrypt the certificate, obtains the public key of the metering device, uses the public key to decrypt the signature, and obtains the fifth hash value; then performs hash calculation on the metering data and the certificate to obtain the sixth hash value. If the fifth hash value is equal to the sixth hash value, it means that the signature is valid;

[0082] S60. If the signature is valid, the blockchain server records the user information and metering data into the blockchain account book.

[0083] It can be understood that, through this embodiment, the present disclosure illustrates in detail a process of uploading metering data to the chain.

[0084] In addition, see Figure 1 The present disclosure also discloses a blockchain-based system for reliable measurement data of monitoring and measuring devices, including:

[0085] The metering device as described in any of the preceding embodiments;

[0086] A service platform external to the metering device, the service platform interacting with the metering device through the diversion module; and

[0087] A blockchain, comprising the blockchain server, a CA server, and a blockchain ledger; and

[0088] A monitoring platform that interacts with the blockchain, wherein the monitoring platform reads data from the blockchain ledger to obtain trusted metering data.

[0089] In this way, the present disclosure solves the respective needs of the business platform and the monitoring platform for metering data by building a system, and has credibility and security.

[0090] It can be understood that the encryption algorithm described in the present disclosure can be an international encryption algorithm or a national encryption algorithm, such as the SM2 algorithm in the national encryption algorithm, etc.

[0091] Those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions, modules, and units involved are not necessarily required for the present invention.

[0092] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0093] In several embodiments provided in the present disclosure, it should be understood that the disclosed metering device can be implemented as a corresponding functional unit, a processor or even a system, wherein the various parts of the system can be located in one place or distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, each functional unit can be integrated in a processing unit, or each unit can exist separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit. If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present disclosure is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a smart phone, a personal digital assistant, a wearable device, a laptop, a tablet computer) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage media include: U disk, read-only memory unit (ROM), random access memory unit (RAM), mobile hard disk, magnetic disk or optical disk and other media that can store program code, and are not limited to different interfaces or transmission methods such as USB, Bluetooth or audio.

[0094] As described above, the above embodiments are only used to illustrate the technical solutions of the present disclosure, rather than to limit them. Although the present disclosure has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present disclosure.

Claims

1. A blockchain-based metering device, comprising: A traffic distribution module, which includes a storage unit and a network unit; A network unit, used for sending metering data to a business platform and a blockchain server outside the metering device; a storage unit, used to store a private key, user information, and a certificate issued by a CA server outside the metering device to the diversion module, wherein the user information is associated with the metering device; The metering device starts the blockchain registration process by the following method: S100, generating a public key and a private key according to user information and a first encryption algorithm, and using them as the public key and private key of the metering device; S200, calculating the intermediate hash value of the user information and the public key, and then signing the intermediate hash value with the private key; S300, sending the user information, public key and signature to the CA server via the network unit; S400, the CA server decrypts the signature using the received public key to obtain a first hash value, and then calculates a hash value based on the user information and the public key to obtain a second hash value. If the first hash value is equal to the second hash value, the signature verification is successful, and, The CA server generates a digital certificate and calculates the hash value of the certificate, and then signs the hash value of the certificate with the private key of the CA server to obtain the signature of the certificate; The CA server returns the digital certificate and the certificate signature, as well as the public key of the CA server; S500, using the public key of the CA server to decrypt the signature of the certificate to obtain a third hash value, and: obtaining a fourth hash value by calculating the hash value of the digital certificate, if the third hash value is equal to the fourth hash value, the digital certificate is valid; S600, saving the valid digital certificate to the storage unit; Wherein, when uploading the metering data, the metering device performs the following steps: S10, sending the metering data to the diversion module; S20, the diversion module sends the metering data to the original business platform; S30, calculating the hash value of the user information, metering data, and the certificate issued to the diversion module by the CA server outside the metering device stored in the storage unit, and signing the hash value with a private key; wherein the private key is a private key that can represent the metering device; S40, sending the user information, metering data, certificate and signature to a blockchain server; S50, the blockchain server first verifies the validity of the signature: uses the public key of the CA server to decrypt the certificate, obtains the public key of the metering device, uses the public key to decrypt the signature, and obtains the fifth hash value; then performs hash calculation on the metering data and the certificate to obtain the sixth hash value. If the fifth hash value is equal to the sixth hash value, the signature is valid; S60. If the signature is valid, the blockchain server records the user information and metering data into the blockchain account book.

2. The metering device according to claim 1, wherein: The user information includes: a user name to which the metering device belongs, and a unique code of a module or unit in the metering device.

3. The metering device according to claim 1, wherein: The metering device also includes: A key generation interface, used to generate a public key and a private key according to user information and a first encryption algorithm and store them in a storage unit; Among them, when the metering device is registered to the blockchain, the user information is first checked for duplication by the CA server. When it is confirmed to be legal, the ID associated with the metering device is obtained based on the user information.

4. The metering device according to claim 2, wherein: The unique code of the module or unit includes: the unique code of the network unit and the unique code of the encryption unit.

5. The metering device according to claim 4, wherein: The unique code of the network element includes the MAC address.

6. The metering device according to claim 4, wherein: The storage unit is implemented as a readable and writable file, and the checksum of the file serves as the unique code of the encryption unit.

Citation Information

Patent Citations

  • Method for recording transport data of object, medium, Internet of Things (IoT) device, blockchain platform, and IoT system

    CN108073829A