Patent Description:
Measurement devices or apparatuses have a wide range of applications in various industries. During their life cycle of production, logistics, installation, usage and maintenance, various device state information may be generated, and the various device state information may be of vital significance for the proper and normal use of the measurement devices. Currently, security for the storage and management of such information is insufficient and thus at the risk of abnormal information modification, and the application of the information is not enough.

Current methods for storing and managing various state information about a measurement device generally include decentralized physical storage information management and database or cloud storage-based information management (see e. g <CIT> which discloses the storage of device state information in a database or cloud and the storage of user data and transaction data in a blockchain). With a method of decentralized physical storage information management, information retrieval and multi-functional information application cannot be performed efficiently, and the information may be lost due to failure of a storage device; and with the database or cloud storage-based information management, the efficiency of information retrieval and application is improved; however, the security of information management remains insufficient.

In view of this, one or more embodiments of the specification provide a method and apparatus for managing a measurement device based on a blockchain, a computer device and a computer readable storage medium.

In order to achieve the above object, one or more embodiments of the specification provide a method for managing a measurement device based on a blockchain, which is applied to node devices in a blockchain network, the method comprising:.

In yet another illustrated embodiment, the target transaction includes the device state data or a ciphertext of the device state data; and the life cycle includes a plurality of stages within a cycle of the measurement device from production to retirement, wherein the life cycle includes any combination of the following stages:
a production stage, a logistics stage, an installation stage, a usage stage, and a maintenance stage.

In yet another illustrated embodiment, a smart contract for life cycle management of the measurement device is deployed in the blockchain; and the life cycle management of the measurement device comprises:
invoking, in response to a target invocation transaction for life cycle management of the measurement device sent by a management client, a life cycle management logic declared by the smart contract for life cycle management of the measurement device based on the device state data.

In yet another illustrated embodiment, device state data corresponding to the installation stage comprises device calibration information data; and the life cycle management logic comprises a calibration logic for the measurement device; wherein the calibration logic for the measurement device comprises:.

In yet another illustrated embodiment, device state data corresponding to the installation stage comprises a lead-sealing identification code; the life cycle management logic comprises an electronic lead-sealing state management logic for the measurement device; wherein the electronic lead-sealing state management logic comprises:.

In yet another illustrated embodiment, device state data corresponding to the installation stage comprises abnormal state information data; and the life cycle management logic comprises an abnormal state management logic for the measurement device; wherein the abnormal state management logic comprises:.

In yet another illustrated embodiment, device state data corresponding to the usage stage comprises device performance indicator data; and the life cycle management logic comprises a device performance state management logic for the measurement device, wherein
the device performance state management logic comprises:.

In yet another illustrated embodiment, performance indicator data comprises one or more of metering performance indicator data, measurement precision indicator data, creep indicator data, measurement repeatability indicator data, operating environment indicator data, and electromagnetic compatibility indicator data.

In yet another illustrated embodiment, device state data corresponding to the usage stage comprises device operating environment data, wherein the device operating environment data comprises one or more of temperature, humidity, air pressure, shock, load, and device tilt data.

In yet another illustrated embodiment, device state data corresponding to the maintenance stage comprises one or more of maintenance service personnel data, maintenance time data, and maintenance device identifier data.

In yet another illustrated embodiment, a node device for life cycle management of the measurement device comprises a metering supervision institution node device.

In yet another illustrated embodiment, the target transaction includes a classification index value that is used to identify the category of the device state data.

In yet another illustrated embodiment, the node device comprises the measurement device.

In yet another illustrated embodiment, the blockchain is an alliance chain, and a process of joining the measurement device to the blockchain network comprises:.

In yet another illustrated embodiment, the distributed ledger of the blockchain comprises a local storage database of the node devices of the blockchain network, or a database of cloud storage servers connected to the node devices of the blockchain network.

Accordingly, the specification further provides an apparatus for managing a measurement device based on a blockchain, which is applied to node devices in a blockchain network, the apparatus comprising:.

Accordingly, the specification further provides a computer device, comprising: a memory and a processor, wherein the memory has stored thereon a computer program executable by the processor that, when executed by the processor, causes the implementation of the method for managing a measurement device based on a blockchain as described in the above embodiments.

Accordingly, the specification further provides a computer readable storage medium having stored thereon a computer program that, when executed by a processor, causes the implementation of the method for managing a measurement device based on a blockchain as described in the above embodiments.

It can be seen from the above technical solutions that with the method and apparatus for managing a measurement device based on a blockchain provided in this specification and a distributed ledger storage mechanism based on blockchain technology, the target transaction is stored or deposited in a decentralized manner (when the device state data is encrypted) into all node devices, and co-maintained by participating node devices of the blockchain, and all records is traceable. Moreover, based on a consensus mechanism of the blockchain, the target transaction provided by each node device cannot be tampered after being provided, thereby ensuring the authenticity and security of the device state data as a basis for the target transaction. Furthermore, by reading an authentic and valid target transaction from the blockchain and performing life cycle management on the measurement device based on the device state data, errors or losses in the management that may be caused by the tampering of the device state data may be avoided.

Exemplary embodiments will be described in detail herein, examples of which are shown in appended drawings. When reference is made to the appended drawings in the description below, identical numbers in different drawings represent identical or similar elements unless otherwise indicated. Implementations described in the following exemplary embodiments are not intended to represent all implementations consistent with one or more embodiments of the specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of one or more embodiments of the specification as detailed in the attached claims.

It should be noted that steps of a corresponding method in other embodiments may not be performed in the order shown and described in the specification. In some other embodiments, steps of the method may be more or fewer than those described in the specification. Moreover, a single step described in the specification may be decomposed into a plurality of steps in other embodiments for the descriptive purpose, while a plurality of steps described in the specification may be combined into a single step in other embodiment for the descriptive purpose as well.

Measurement devices have a wide range of applications in various industries. The life cycle of the measurement device may include a production stage, a logistics stage, an installation stage, a usage stage, a maintenance stage or any combination of the above stages of the measurement device. During the life cycle of the measurement device, various device state information data can be produced, such as device production environment data produced in the production stage (including, for example, temperature and humidity, acid and alkali conditions, production parameters and difference adjustment parameters of devices such as machine tools, etc.), logistics circulation data produced in the logistics stage (including, for example, information about the time of exiting from and entering a logistics station, environmental information on the way, abnormal logistics transit information, etc.), installation adjustment data produced in the installation stage (including, for example, electronic lead-sealing states, device calibration information, initial parameters, etc.), normal or abnormal usage data produced in the usage stage (including measurement data produced in normal use, error information when an abnormality occurs, software information carried by the device, etc.), and information data produced in the maintenance stage (including maintenance records, precision information about the device after maintenance, software update version numbers, etc.).

The device state data produced in the life cycle of the measurement device is of vital significance for the normal use of the measurement device. Current methods for storing and managing various state information about a measurement device generally include decentralized physical storage information management, that is, storing the device state data into computing servers of a manufacturer, a logistics provider, and a user client respectively, or cloud storage data management performed by the above multiple parties. Security for the storage and management of such device state data described above is insufficient and thus at the risk of abnormal data modification. With a method of decentralized physical storage information management, information retrieval and multi-functional information application cannot be performed efficiently, and the information may be lost due to failure of a storage device.

Furthermore, decentralized physical storage is disadvantageous to the coordination, management, and application of the device state data produced in the life cycle of the measurement device.

In view of this, the specification provides a method for managing a measurement device based on a blockchain, which is applied to node devices in a blockchain network.

A blockchain network system according to one or more embodiments of the specification may, in particular, refer to a P2P network system achieved by various node devices through a consensus mechanism and having a distributed data storage structure, where data in a blockchain is distributed within various "blocks" consecutively connected in time, a latter block contains a data summary of a previous block, and full data backup of all or some of nodes is achieved according to different specific consensus mechanisms (such as POW, POS, DPOS or PBFT). It is well known to a person skilled in the art that since a blockchain system is running under a corresponding consensus mechanism, data recorded into a blockchain database is difficult to be tampered by any node, for example, for a blockchain employing Pow consensus, it would take a hash rate of at least <NUM>% of the whole network to attack or tamper the existing data, therefore, the blockchain system is characterized by ensuring the security of data and protecting against attacking and tampering, which is incomparable by other centralized database systems. It can be seen therefrom that in the embodiments provided in the specification, data recorded into a distributed ledger of the blockchain cannot be attacked or tampered, thereby ensuring the authenticity and fairness of performing data management and application based on data stored in the blockchain.

<FIG> illustrates process steps <NUM>, <NUM>, <NUM> of a method for managing a measurement device based on a blockchain according to an exemplary embodiment of the specification, including:
step <NUM>, obtaining device state data of the measurement device at various stages in the life cycle of the measurement device.

The specific type of the measurement device is not defined in the specification, and devices, apparatuses or device or apparatus modules that may have the function of measurement or calibration may all be encompassed within the scope of the measurement devices described in the specification.

The life cycle of the measurement device includes a plurality of stages within a cycle of the measurement device from production to retirement, such as a production stage, a logistics stage, an installation stage, a usage stage, a maintenance stage or any combination of the above multiple stages.

Device state data corresponding to the production stage of the measurement device may include various production parameters recorded during production of the measurement device, such as production date, raw materials for production, production processes, product serial numbers, production environment, production device parameters, and information data of various production chains of the measurement device.

Device state data corresponding to the logistics stage of the measurement device may include information data produced by the measurement device in the circulation process after production, such as information about the time of exiting from and entering a logistics station, environmental information on the way, abnormal logistics transit information, and the like; and for a rather precise and precious measurement device, the device state data in the logistics stage is of vital depository significance in traceability management of the measurement device.

The measurement device, especially a large-scale or precise measurement device, needs to be installed and debugged before coming into use. Therefore, device state data corresponding to the installation stage of the measurement device may include calibration parameters required for use by the measurement device in the installation stage or data produced in the installation stage such as error probability parameters, installation state description, parameter backup or recovery information (for example, factory setting parameters), and the like.

Electronic lead-sealing information data of the measurement device is information data reflecting whether the measurement device is suffered from behaviors such as unknown sealing off or abnormal damage. Therefore, the device state data corresponding to the installation stage may also include the electronic lead-sealing information data of the measurement device (or a particular element or module of the measurement device).

Device state data corresponding to the usage stage of the measurement device may include any information data produced or required for reference and use by the measurement device during use, such as measurement data records produced in normal use, error information when an abnormality occurs (abnormal temperature, overloaded shock, etc.), software information carried by the device, standard operation procedure (SOP) information data, and the like.

Device state data corresponding to the maintenance stage of the measurement device may include any information data produced or referenced and used by the measurement device during maintenance, such as recovery data (factory setting data), fault detection procedure data, maintenance records, and the like.

The node devices may be a computer device managing a production, logistics, installation, use or maintenance process of the measurement device, or may be a computer device communicatively connected to the measurement device, or may be the measurement device itself, which is not defined in the specification. Therefore, the specific approach for obtaining the device state data described above may refer to obtaining, by the node device, based on information recording of the production, logistics, installation, use or maintenance process of the measurement device, or based on the communication with the measurement device, or the device state data may be generated by the node device itself (when the node device is the measurement device), which is not defined in the specification.

By using the measurement device as the node device to directly obtain the device state data, for example, the device state data produced, by the measurement device, in the installation, usage or maintenance stage, a data transmission procedure is simplified, the data processing efficiency is improved, and further, data error or malicious modification may be avoided to some extent, when compared with obtaining the device state data by transmitting data to a management computing device by the measurement device, or by directly recording the data by the management computing device.

In embodiments shown in <FIG>, in a blockchain network system using an alliance chain as an architecture, the process of the measurement device joining a blockchain network to become a node device of the blockchain network may comprise:.

With the management of chain entry permission of the measurement device illustrated in <FIG>, the measurement device may access the blockchain network system directly or indirectly, and store the state data of the measurement device to the distributed ledger of the blockchain directly or indirectly. Therefore, not only the efficiency of data storage backup is improved, but also the timeliness, effectiveness, and reliability of storage of the state data are improved based on a tamper-resistant mechanism of the blockchain.

Step <NUM> (see <FIG>), constructing a target transaction based on the obtained device state data, and then sending the target transaction to other node devices in the blockchain network to perform consensus processing on the target transaction.

For authentic data produced in the physical world, it may be constructed into a standard transaction format supported by the blockchain, and then published to the blockchain, consensus processing is performed on the received transaction by the node devices of the blockchain, and after a consensus is reached, the transaction is packed into a block by a node device, which serves as an accounting node, in the blockchain, and stored in the blockchain persistently (this process may be referred to as "depository").

The target transaction constructed based on the device state data may include the original text of the device state data. Since data stored in the distributed ledger of the blockchain is backed up within a plurality of node devices of the blockchain, in order to ensure the data privacy security, the target transaction may also include encrypted device state data, depository data of the device state data (for example, a hash summary value of the device state data), or the like.

Specific consensus algorithm on which the consensus processing is based is not defined in this embodiment. Currently, consensus algorithms supported in the blockchain may comprise:.

In a blockchain network employing the first type of consensus algorithm, the node devices competing for the accounting authority may all perform a transaction after receiving the transaction. There may be a node device, among the node devices competing for the accounting authority, winning out in the current competing for the accounting authority and becoming an accounting node. The accounting node may pack the received transaction together with other transactions to generate a latest block and send the latest block generated or a block header of the latest block to other node devices for consensus processing.

In a blockchain network employing the second type of consensus algorithm, a node device having the accounting authority has been agreed before this round of accounting. Therefore, after receiving a transaction, the node device may send the transaction to an accounting node if it is not an accounting node of this round. For the accounting node of this round, the transaction may be performed during or before a process that the transaction and other transactions are packed to generate the latest block. After the latest block is generated, the accounting node may send the latest block or a block header of the latest block to other node devices for consensus processing.

<FIG> illustrates contents of an exemplary block packed with one or more target transactions. As shown in <FIG>, device state data contained in a block body of the block may include: state data of the measurement device, such as product serial number, production parameter information, logistics transit information, measurement and calibration information, electronic lead-sealing information, abnormal state information, measurement software version information, and other information. It should be noted that various information data described above may be included in one or more target transactions.

In order to facilitate the statistics, retrieval, and application of device state data, as shown in <FIG>, the target transaction may include a classification index value that is used to identify the category of the device state data. For example, the following classification index values are set for device state data corresponding to the production stage, the logistics stage, the installation stage, the usage stage, and the maintenance stage: [<NUM>], [<NUM>], [<NUM>], [<NUM>], [<NUM>], and the like.

Step <NUM> (see <FIG>), storing, when a consensus of the target transaction is reached, the target transaction into a distributed ledger of the blockchain network, wherein the target transaction stored in the distributed ledger of the blockchain network is used for life cycle management of the measurement device.

As described above, no matter which consensus algorithm shown above is used in the blockchain, the accounting node of this round may pack the received transactions to generate the latest block and send the latest block generated or a block header of the latest block to other node devices for consensus verification. If other node devices receive the latest block or the block header of the latest block and there is no problem after verification, the latest block may be added to the end of the original blockchain to complete an accounting process of the blockchain. During a process that other nodes verify a new block or block header sent by the accounting node, transactions included in the block may also be performed.

It should be noted that the distributed ledger of the blockchain described in the specification includes a local storage database of the node devices of the blockchain network system, or a database of cloud storage servers communicatively connected to the node devices of the blockchain network system.

With the method for managing a measurement device based on a blockchain provided in one or more of the embodiments described above and a distributed ledger storage mechanism based on blockchain technology, the target transactions are stored into all node devices in a decentralized manner and co-maintained by participating node devices of the blockchain, and all records are traceable. Moreover, based on a consensus mechanism of the blockchain, the target transaction provided by each node device cannot be tampered after provision, thereby ensuring the authenticity and security of the device state data as a basis for the target transaction. Since the device state data may include information data corresponding to the life cycle stages of the measurement device such as the production stage, the logistics stage, the installation stage, the usage stage, and the maintenance stage, with a method for storing data based on the blockchain provided in one or more of the embodiments described above, the security and privacy (when the target transaction includes encrypted device state data) of the life cycle management of the measurement device is improved, and the efficiency of data management is improved as well.

Contents of the device state data stored in the distributed ledger of the blockchain may increase continuously with the circulation and use of the measurement device. Based on the state data of the measurement device, analysis and application may be performed on various device state information about the measurement device, for example, big data analysis or artificial intelligence technology may be used to perform information analysis on a full life cycle of the measurement device, or life cycle management contents of the measurement device such as traceability tracking, usage calibration, lead-sealing state determination, and usage state determination.

In an illustrated embodiment, any node device of the blockchain network system may obtain the target transaction from the distributed ledger of the blockchain, and perform life cycle management on the measurement device at the node device locally based on the device state data included in the target transaction or the encrypted device state data. A node device obtaining the target transactions and performing life cycle management of the measurement device may be referred to as a management client.

In yet another illustrated embodiment, a smart contract for life cycle management of the measurement device is deployed in the blockchain; and the blockchain network may be provided with a management client communicatively connected to the node device to perform life cycle management of the measurement device. the life cycle management of the measurement device comprises: invoking, in response to a target invocation transaction for life cycle management of the measurement device sent by a management client, a life cycle management logic declared by the smart contract for life cycle management of the measurement device based on the device state data. Compared with running life cycle management locally by a centralized management client, invoking the smart contract at any time in response to the target invocation transaction sent by a corresponding client may improve the efficiency of life cycle management greatly; moreover, performing with the smart contract has the advantages of lower human intervention and decentralized authority, which further increases the fairness of life cycle management behaviors.

The specification will provide below a plurality of embodiments of life cycle management of the measurement device based on the target transaction.

Calibration may refer to detecting, by using standard metering parameters, whether the accuracy (precision) of a measurement device conforms to a standard, which is mostly used for a measurement device of high precision; and calibration may also be considered to be alignment. In order to ensure the accuracy of measurement results generated by the measurement device during use, the measurement device generally needs to be calibrated before use (which may be understood as an installation stage). Calibration information described in this embodiment may include standard metering parameters used during calibration.

The measurement device may be calibrated initially before use, and calibration information produced or used in an initial calibration stage may be uploaded to the distributed ledger of the blockchain in a transaction format by the measurement device (as a node device) or a node device connected to the measurement device. It should be noted that the transaction may also include a classification index value corresponding to the calibration information. If failure occurs to the measurement device during use, the calibration information about the measurement device may need to be updated once again, and the updated calibration information also needs to be transmitted to the distributed ledger of the blockchain in a transaction format.

<FIG> illustrates calibration management of the measurement device based on the method for managing a measurement device provided in the specification. A management process comprises:.

With the process of managing calibration of the measurement device described in the steps <NUM> to <NUM>, the measurement device may be debugged to a calibration state corresponding to the latest calibration information, and the tamper-resistant mechanism based on the blockchain is used for depository of the latest calibration information, which may prevent the latest calibration information from being tampered maliciously, thereby ensuring that the measurement device is running and used in the calibration state corresponding to the latest calibration information.

In the embodiment, a smart contract used to manage calibration of a measurement device is declared in the blockchain network, and the smart contract may declare a calibration management logic for the measurement device described in the steps <NUM>-<NUM>. The measurement device may be communicatively connected to the management client of the blockchain, or the measurement device may serve as the management client of the blockchain. The method for managing calibration of a measurement device described in the embodiment may comprise:
invoking, in response to an invocation transaction for calibration management of the measurement device sent by the management client, the calibration management logic for the measurement device declared by the smart contract to calibrate the measurement device based on the latest calibration information deposited on the blockchain, thereby enabling the measurement device to conform to the device calibration state corresponding to the latest calibration information.

Calibration management of the measurement device may be completed automatically if a smart contract invocation transaction is sent to the blockchain by the management client, which saves the time and economic cost spent in calibrating the measurement device on site by professional personnel. Moreover, with the tamper-resistant mechanism based on the blockchain, the latest calibration information is prevented from being tampered maliciously, thereby ensuring that the measurement device reaches the accurate calibration state corresponding to the latest calibration information.

In order to ensure the security or precision of the measuring device and prevent the measurement device from being enabled or having parameters changed without authorization, an electronic lead-sealing module is generally provided for protecting the measurement device. The electronic lead-sealing module (such as an RFID radio frequency chip) is configured with a unique lead-sealing identification code which may correspond to an identity identifier such as a product serial number of the measurement device on a one-to-one basis. In the embodiment, device state data may include the lead-sealing identification code.

The lead-sealing identification code of the measurement device may be obtained by a data acquisition device before the measurement device is initially installed and used, and the lead-sealing identification code and the identity identifier such as the product serial number of the measurement device are uploaded to the distributed ledger of the blockchain in a transaction format by the measurement device (as a node device) or a node device connected to the measurement device. It should be noted that the transaction may also include a classification index value corresponding to the lead-sealing identification code. If a failure occurs to the measurement device during use or the measurement device is maintained and updated regularly, the electronic lead-sealing module may be reconfigured or replaced, at which time, the updated lead-sealing identification code and identity identifier such as a product serial number of the measurement device are uploaded to the distributed ledger of the blockchain in a transaction format by the measurement device (as a node device) or a node device connected to the measurement device, thereby ensuring that the latest effective lead-sealing identification code corresponding to the measurement device is deposited in the distributed ledger of the blockchain.

<FIG> illustrates electronic lead-sealing state management of the measurement device based on the method for managing a measurement device provided in the specification. A management process comprises:.

With the process of electronic lead-sealing state management of the measurement device described in the steps <NUM> to <NUM>, the tamper-resistant mechanism based on the blockchain may deposit the latest effective lead-sealing identification code of the measurement device, so that when the existing lead-sealing identification code of the measurement device is different from the lead-sealing identification code deposited in the blockchain, it may be known accurately that unauthorized enabling or change have occurred to the measurement device, thereby facilitating the relevant personnel to know an abnormal state of the measurement device timely for responding accordingly.

In the embodiment, a smart contract used to manage the electronic lead-sealing state of the measurement device is declared in the blockchain network, and the smart contract may declare an electronic lead-sealing state management logic for the measurement device described in the steps <NUM> to <NUM>. The measurement device may be communicatively connected to the management client of the blockchain, or the measurement device may serve as the management client of the blockchain. The method for managing an electronic lead-sealing state of a measurement device described in the embodiment may comprise:
invoking, in response to an invocation transaction for electronic lead-sealing state management of the measurement device sent by the management client, the electronic lead-sealing state management logic for the measurement device declared by the smart contract to compare an existing lead-sealing identification code of the measurement device with the latest lead-sealing identification code deposited on the blockchain, so that it can be known accurately whether an unauthorized abnormal change occurs to the measurement device.

Electronic lead-sealing state management of the measurement device may be completed automatically if the smart contract invocation transaction is sent to the blockchain by the management client, which saves the time and economic cost spent in querying the electronic lead-sealing state of the measurement device on site by professional personnel; with the tamper-resistant mechanism based on the blockchain, the latest lead-sealing identification code described above is prevented from being tampered maliciously, thereby ensuring the accuracy of the latest lead-sealing identification code; and based on a preset alarm operation logic, an alarm operation or record is completed automatically.

During using the measurement device, many performance indicators are usually used to characterize performance states of the measurement device, such as metering performance indicator, measurement precision indicator, creep indicator, measurement repeatability indicator, operating environment indicator, electromagnetic compatibility indicator, and the like. After the measurement device is used for a period of time, the performance of the device may change, and accordingly, the indicators may have some changes.

Device performance indicator data of an initial state of the measurement device may be obtained by a data acquisition device or a standard mold before the measurement device is used, and the device performance indicator data of the initial state and the identity identifier such as the product serial number of the measurement device are uploaded to the distributed ledger of the blockchain in a transaction format by the measurement device (as a node device) or a node device connected to the measurement device. It should be noted that the transaction may also include a classification index value corresponding to the device performance indicator data. After the measurement device is used for a certain time period or for a particular number of times, the device performance indicators may change, at which time, existing device performance indicator data of the measurement device is then obtained by the data acquisition device, the standard mold or the measurement device itself through measurement and calculation.

<FIG> illustrates device performance indicator state management of the measurement device based on the method for managing a measurement device provided in the specification. A management process comprises:.

After the measurement device is used for a certain period, the performance state of the measurement device may decline. With the process of device performance state management of the measurement device described in the steps <NUM> to <NUM>, the tamper-resistant mechanism based on the blockchain may deposit device performance indicators of the initial state of the measurement device, so as to manage the performance state of the measurement device, thereby facilitating the relevant personnel to know the difference between the performance states of the measurement device timely for responding accordingly.

In the embodiment, a smart contract used to manage a device performance state of a measurement device is declared in the blockchain network, and the smart contract may declare a device performance state management logic for the measurement device as described in the steps <NUM> to <NUM>. The measurement device may be communicatively connected to the management client of the blockchain, or the measurement device may serve as the management client of the blockchain. The method for managing a device performance state of a measurement device described in the embodiment may comprise:
invoking, in response to an invocation transaction for device performance state management of the measurement device sent by the management client, the device performance state management logic for the measurement device declared by the smart contract to compare the device performance indicator data of the existing state of the measurement device with the device performance indicator data of the initial state deposited on the blockchain, and performing the preset performance difference processing logic if the device performance indicators of the measurement device are changed abnormally.

Performance state management of the measurement device may be completed automatically if the smart contract invocation transaction is sent to the blockchain by the management client, which saves the time and economic cost spent in querying the performance indicator state of the measurement device on site by professional personnel; with the tamper-resistant mechanism based on the blockchain, the performance indicator data of the initial state is prevented from being tampered or lost, thereby ensuring the accuracy of the data; and based on the preset performance difference processing logic, performance difference processing is completed automatically.

The measurement device is generally configured with various types of sensors to acquire data signals or supervise a use environment condition for the device. In the embodiment, when abnormal state information, for example, abnormal temperature information, humidity information, shock information, and the like, is sensed by the measurement device or a sensing module provided in the measurement device, the abnormal state information may be uploaded to the distributed ledger of the blockchain in a transaction format by the measurement device (as a node device) or a node device connected to the measurement device, thereby performing blockchain depository on the abnormal state information. It should be noted that the transaction may also include a classification index value corresponding to the abnormal state information, or relates to setting corresponding classification index values for different types of abnormal state information respectively, so as to facilitate retrieval and query of the abnormal state information.

In failure analysis of the measurement device, various types of abnormal state information stored may be read from the blockchain according to the classification index value, and then, failure analysis of the measurement device may be carried out according the abnormal state information.

Optionally, an execution logic for obtaining abnormal state information from the distributed ledger of the blockchain and performing failure analysis of the measurement device based on a preset failure analysis logic may be declared in the smart contract. The measurement device may be communicatively connected to the management client of the blockchain, or the measurement device may serve as the management client of the blockchain.

A management logic declared by the smart contract is invoked in response to an invocation transaction for failure analysis management of the measurement device sent by the management client to obtain abnormal state information from the distributed ledger of the blockchain and perform failure analysis of the measurement device based on the preset failure analysis logic. The management client may obtain results of running the smart contract by listening to or querying a transaction log of the blockchain.

With the invocation transaction sent by the management client, any personnel managing the measurement device may complete failure analysis of the measurement device according to the smart contract conveniently and rapidly. Since the smart contract may be run by invoking at any time, the cost spent in performing failure analysis of the measurement device on site by professional failure maintenance or analysis personnel is greatly saved in this embodiment.

In yet another illustrated embodiment, the device state data may include logistic circulation information data. A life cycle management logic declared by the smart contract may comprise: performing circulation process tracing of the measurement device based on the logistics circulation information data stored in the distributed ledger of the blockchain. With the tamper-resistant mechanism based on the blockchain and the invocation by the management client, circulation tracing of the measurement device may be performed in a precise manner, thereby effectively preventing forging circulation of the measurement device.

In yet another illustrated embodiment, the device state data may include software information data (such as a software version number) carried by the measurement device, and the life cycle management logic declared by the smart contract may include: performing software update management of the measurement device based on the software information data stored in the distributed ledger of the blockchain. For example, when the current software version number of the measurement device is lower than the software version number stored in the blockchain, software upgrading on the measurement device is performed; when the current software version number of the measurement device is higher than the software version number stored in the blockchain, a depository transaction of the current software version number is sent to the distributed ledger of the blockchain. With the tamper-resistant mechanism based on the blockchain and the invocation by the management client, software state management of the measurement device may be performed quickly and accurately.

In yet another illustrated embodiment, the device state data may further include factory setting parameters or system backup parameters of the measurement device, and the life cycle management logic declared by the smart contract may include: restoring settings of the measurement device based on the factory setting parameters or system backup parameters stored in the distributed ledger of the blockchain. With the tamper-resistant mechanism based on the blockchain and the invocation by the management client, the measurement device may achieve an expected recovery setting quickly and accurately.

In yet another illustrated embodiment, the device state data may further include standard operation procedure (SOP) information data, and the life cycle management logic declared by the smart contract may include: bringing the measurement device into the standard operation procedure based on the SOP data stored in the distributed ledger of the blockchain. With the tamper-resistant mechanism based on the blockchain and the invocation by the management client, the measurement device may be used quickly and accurately according to the standard operation procedure.

It can be known that, in various embodiments provided in this specification, a node device of the blockchain can send various device state data in the life cycle of the measurement device to the distributed ledger of the blockchain network for depository. Therefore, the life cycle management of the measurement device can be performed by taking the above-mentioned various device state data as a basis. Due to the tamper-resistant mechanism of the blockchain, the life cycle management logic described in each of the above embodiments is based on accurate data, thus improving the accuracy of the management of the measurement device; since various state data of the measurement device during the production process, logistics circulation, installation and debugging, use process, and maintenance stage of the measurement equipment are all stored in the distributed ledger of the blockchain, not only the security of storage of device state data is improved, but also the ratio of application based on the above-mentioned various device state data and the efficiency of the management of measurement device is increased, compared to the distributed storage of the various management information in manufacturer terminals and logistics company terminals and client terminals.

In order to further improve the security of the management of the measurement device and prevent the state data information of the measurement device from being learned by unauthorized client terminals or node devices, the node device may encrypt the device state data when constructing the target transaction.

For example, the node device used to send the target transaction may use the public key of the authorized client to encrypt the device state data, and package the ciphertext to the target transaction; As a node device or a blockchain client of an authorized client terminal, the ciphertext contained in the target transaction can be decrypted based on the private key of the authorized client, thereby obtaining the original text of the device state data. For a terminal of unauthorized client, even if being a node device of the blockchain, has obtained the target transaction, the original information of the device state data cannot be obtained because the ciphertext cannot be decrypted.

Corresponding to the above process implementation, the embodiments of the specification further provide an apparatus <NUM> for managing a measurement device based on a blockchain. The apparatus <NUM> may be implemented by software, and may also be implemented by hardware or a combination of software and hardware. Taking software implementation as an example, as an apparatus in a logical sense, it is formed by reading a corresponding computer program instruction into a memory through a CPU (Central Process Unit) of an device where it is located. In terms of hardware, in addition to the CPU, the internal storage, and the memory shown in <FIG>, the device where the above apparatus is located generally also includes other hardwares such as a chip for wireless signal transmission and reception, and/or a board card for realizing network communication function and other hardwares.

As shown in <FIG>, the specification further provide an apparatus <NUM> for managing a measurement device based on a blockchain, which is applied to node devices in a blockchain network, comprising:.

For details about the implementation process of the functions and effects of the units <NUM>, <NUM>, <NUM> in the above apparatus <NUM>, see the implementation process of the corresponding steps in the method for managing a measurement device based on a blockchain performed by the node devices of the blockchain, and for the relevant parts, see the description in the section of the method embodiment which is not repeated here.

The apparatus embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical modules, that is, may be located in one place, or may be distributed to multiple network modules. Some or all of the units or modules may be selected according to actual needs to achieve the objectives of the solution in this specification. Those of ordinary skill in the art can understand and implement the invention without creative efforts.

The apparatus, units, and modules described in the above embodiments may be specifically implemented by a computer chip or entity, or may be implemented by a product having a certain function. A typical implementation device is a computer, and the specific form of the computer may be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email sending and receiving device, and a game control desk, a tablet computer, a wearable device, or a combination of any of these devices.

Corresponding to the above embodiments of the method, the embodiments of the specification further provides a computer device, as shown in <FIG>, which includes a memory and a processor. The memory has stored thereon a computer program executable by the processor. The processor, when executing the stored computer program, implementing the various steps of the method for managing a measurement device based on a blockchain, which is performed by the node devices of the blockchain as described in the embodiments of the specification. For a detailed description of each step of the method for managing a measurement device based on a blockchain performed by the node device, refer to the previous content, and will not be repeated.

Corresponding to the above embodiments of the method, the embodiments of the specification further provide a computer readable storage medium which has stored thereon a computer program that, when executed by a processor, cause the implementation of the steps of the method for managing a measurement device based on a blockchain, which is performed by the node devices of the blockchain as described in the embodiments of the specification. For a detailed description of each step of the method for managing a measurement device based on a blockchain which is performed by the node devices of the blockchain, please refer to the previous content, and will not be repeated.

The above are only the preferred embodiments of this specification and are not intended to limit this specification. Any modification, equivalent replacement, or improvement made shall be in accordance with the appended claims.

In a typical configuration, a computer device comprises one or more central processing units (CPUs), an input/output interface, a network interface, and a memory.

The memory may include a non-permanent memory, a random access memory (RAM) and/or a non-volatile memory (such as a read-only memory (ROM) or a flash memory (flash RAM)) and so on in a computer-readable medium. A memory is an example of a computer-readable medium.

The computer-readable medium comprises non-volatile and volatile media, and removable and non-removable media, wherein information storage can be implemented with any method or technology. Information may be modules of computer-readable instructions, data structures and programs, or other data.

Examples of a computer storage medium include but are not limited to a phase-change memory (PRAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), other types of random access memories (RAMs), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory or other memory technologies, compact disk read-only memory (CD-ROM), a digital versatile disc (DVD) or other optical storages, a magnetic cassette tape, and magnetic tape and magnetic disk storage or other magnetic storage devices or any other non-transmission media, which can be used to store information that can be accessed by a computing device. According to the definition herein, the computer-readable medium does not include a transitory computer-readable medium, such as a modulated data signal and carrier.

It should further be noted that the terms "include", "comprise", or any variation thereof are intended to cover a non-exclusive inclusion. Therefore, in the context of a process, method, commodity, or device that comprises a series of elements, the process, method, commodity, or device not only comprises such elements, but also comprises other elements not specified expressly, or may comprise inherent elements of the process, method, commodity, or device. If no more limitations are made, an element limited by "comprise a/an. " does not exclude other same elements existing in the process, the method, the article, or the device which comprises the element.

Claim 1:
A method for managing a measurement device based on a blockchain, which is applied to node devices in a blockchain network, the method comprising the steps of:
obtaining device state data of the measurement device at various stages in the life cycle of the measurement device;
constructing a target transaction based on the obtained device state data, and then sending the target transaction to other node devices in the blockchain network to perform consensus processing on the target transaction; and
storing, when a consensus of the target transaction is reached, the target transaction into a distributed ledger of the blockchain network, wherein the target transaction stored in the distributed ledger of the blockchain network is used for life cycle management of the measurement device.