Blockchain-based emission data storage method, device, equipment and medium

By using the block generation nodes of the blockchain network to obtain and verify the emission data storage requests of the vehicle terminal, the problem of insufficient emission data security in the existing technology is solved, and the persistent storage and security of emission data are achieved.

CN116127533BActive Publication Date: 2026-04-28GUANGXI QIZHI DIGITAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGXI QIZHI DIGITAL TECH CO LTD
Filing Date
2023-02-08
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

In existing technologies, the emission data of vehicle terminals is digitally signed and encrypted using a security chip, which poses security risks. Furthermore, the encryption method is centralized on a single machine, which carries the risk of data tampering.

Method used

The system uses block-generating nodes in the blockchain network to obtain emission data storage requests from vehicle terminals. It determines whether the corresponding vehicle terminal's chain structure data exists on the chain by using the terminal identifier, generates the corresponding block, broadcasts it to the blockchain network, verifies the block, and finally stores the emission data on the chain.

Benefits of technology

This enables persistent storage of emission data from vehicle terminals, improving storage security, reducing the possibility of data tampering, and ensuring the authenticity and immutability of the data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116127533B_ABST
    Figure CN116127533B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on blockchain's emission data storage method, device, equipment and medium.The method comprises: obtaining the emission data storage request sent by vehicle terminal;Emission data storage request includes the emission data of vehicle terminal and car end information;Car end information includes terminal identifier;According to terminal identifier, it is judged whether the chain structure data of corresponding vehicle terminal exists on chain, and data judgment result is obtained;According to data judgment result, corresponding block is generated, and broadcast to blockchain network, so that block verification node carries out block verification to corresponding block, and obtains block verification result;According to block verification result, the chain structure data of corresponding vehicle terminal under this consensus is determined and stored on chain, for viewing.The emission data storage security of the present application embodiment is improved, and the possibility of emission data being tampered is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of blockchain technology, and in particular to a blockchain-based method, apparatus, device, and medium for storing emissions data. Background Technology

[0002] Relevant road standards stipulate that emission data from both on-road and off-road vehicles must be collected and recorded, and that this data must not be tampered with. Currently, emission data is collected through onboard terminals installed in vehicles. To prevent tampering, the raw emission data is digitally signed and encrypted using a security chip on the onboard terminal's PCB (Printed Circuit Board) and then transmitted to enterprise platforms and national environmental protection platforms via IoT technologies.

[0003] However, current solutions for digitally signing and encrypting emission data using security chips have security issues. If the private key of the security chip is leaked, the signing and encryption will fail. In addition, the current encryption method is a single-machine centralized encryption, which also carries the risk of data tampering. Summary of the Invention

[0004] This invention provides a blockchain-based emission data storage method, apparatus, device, and medium to improve the security of emission data storage and reduce the possibility of emission data being tampered with.

[0005] According to one aspect of the present invention, a blockchain-based emission data storage method is provided, executed by a block-generating node in a blockchain network, the method comprising:

[0006] Obtain an emissions data storage request sent by the vehicle-mounted terminal; the emissions data storage request includes emissions data from the vehicle-mounted terminal and vehicle information; the vehicle information includes a terminal identifier;

[0007] Based on the terminal identifier, determine whether there is chain structure data of the corresponding vehicle terminal on the chain, and obtain the data judgment result;

[0008] Based on the data judgment results, a corresponding block is generated and broadcast to the blockchain network so that the block verification nodes can verify the corresponding block and obtain the block verification result.

[0009] Based on the block verification results, the chain structure data of the corresponding vehicle terminal under this consensus is determined and stored on the chain for viewing.

[0010] According to another aspect of the present invention, a blockchain-based emission data storage device is provided, applied to a block generation node in a blockchain network, the device comprising:

[0011] The storage request acquisition module is used to acquire emission data storage requests sent by the vehicle terminal; the emission data storage request includes emission data and vehicle information of the vehicle terminal; the vehicle information includes a terminal identifier;

[0012] The judgment result determination module is used to determine whether there is chain structure data of the corresponding vehicle terminal on the chain based on the terminal identifier, and to obtain the data judgment result;

[0013] The block broadcasting module is used to generate corresponding blocks based on the data judgment results and broadcast them to the blockchain network so that block verification nodes can verify the corresponding blocks and obtain the block verification results.

[0014] The chain structure data determination module is used to determine the chain structure data of the corresponding vehicle terminal under this consensus based on the block verification results and store it on the chain for viewing.

[0015] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0016] At least one processor; and

[0017] A memory communicatively connected to the at least one processor; wherein,

[0018] The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform the blockchain-based emissions data storage method according to any embodiment of the present invention.

[0019] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the blockchain-based emission data storage method according to any embodiment of the present invention.

[0020] This invention's solution obtains emission data storage requests sent by vehicle-mounted terminals; determines whether corresponding vehicle-mounted terminal chain structure data exists on the blockchain based on the terminal identifier, and obtains a data judgment result; generates a corresponding block based on the data judgment result and broadcasts it to the blockchain network for block verification nodes to verify the corresponding block, obtaining a block verification result; and determines the corresponding vehicle-mounted terminal chain structure data under this consensus and stores it on the blockchain for viewing. This technical solution, by generating and broadcasting corresponding blocks based on data judgment results, and having block verification nodes verify the blocks to obtain block verification results, achieves persistent storage of vehicle-mounted terminal emission data through on-chain storage of the vehicle-mounted terminal's chain structure data. This improves the security of the emission data storage process and environment, reduces the possibility of emission data tampering, and ensures the authenticity, immutability, and security of emission data, providing emission data security guarantees for relevant personnel.

[0021] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0022] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 This is a flowchart of a blockchain-based emission data storage method according to Embodiment 1 of the present invention;

[0024] Figure 2 This is a flowchart of a blockchain-based emission data storage method according to Embodiment 2 of the present invention;

[0025] Figure 3 This is a flowchart of a blockchain-based emission data storage method according to Embodiment 3 of the present invention;

[0026] Figure 4 This is a schematic diagram of the structure of a blockchain-based emission data storage device according to Embodiment 4 of the present invention;

[0027] Figure 5 This is a schematic diagram of the structure of an electronic device that implements the blockchain-based emission data storage method of this invention. Detailed Implementation

[0028] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0029] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0030] Example 1

[0031] Figure 1 This is a flowchart of a blockchain-based emission data storage method provided in Embodiment 1 of the present invention. This embodiment is applicable to the secure storage of emission data from vehicle terminals. The method can be executed by a blockchain-based emission data storage device, which can be implemented in hardware and / or software. The blockchain-based emission data storage device can be configured in an electronic device and applied to a block generation node in a blockchain network.

[0032] S110. Obtain the emission data storage request sent by the vehicle terminal; the emission data storage request includes the emission data of the vehicle terminal and vehicle information; the vehicle information includes the terminal identifier.

[0033] The emission data storage request can be a request from the vehicle terminal to securely store its own emission data on the blockchain. Emission data can include at least one of the following: GPS (Global Positioning System) information, reporting command ID (Identity document), vehicle speed, engine speed, engine fuel level, NOx (used to detect nitrogen oxides such as N2O, NO, NO2, N2O3, N2O4, and N2O5 in engine exhaust) sensor output, SCR (Selective Catalytic Reduction) temperature, DPF differential pressure, cumulative mileage, and cumulative fuel consumption.

[0034] The vehicle-side information may include the terminal identifier of the on-board terminal and the upload time of the emissions data. The terminal identifier is used to identify the uniqueness of the on-board terminal. It should be noted that the emissions data of the on-board terminal can be obtained by collecting engine data through the CAN (Controller Area Network) bus.

[0035] For example, the emission data storage request uploaded by the vehicle terminal can be obtained by a blockchain node in the blockchain network. It should be noted that a large number of blockchain nodes can be deployed in the blockchain network. Since the blockchain nodes in the blockchain network are a distributed ledger data storage structure, a consensus algorithm can be introduced during the data storage process to ensure the security, immutability, and authenticity of the emission data. Therefore, a master node for block generation can be selected from a large number of blockchain nodes through a consensus algorithm, serving as the block generation node. The other blockchain nodes besides the block generation node are designated as block verification nodes. Therefore, the emission data storage request sent by the vehicle terminal can be obtained by the block generation node in the blockchain network.

[0036] It should be noted that after the block-generating node receives the emissions data storage request sent by the vehicle terminal, it can parse the request to obtain the emissions data and vehicle information. Specifically, the vehicle terminal encrypts the emissions data and vehicle information using the private key of the encryption chip deployed on its vehicle, generates an emissions data storage request, and sends it to the blockchain network. After receiving the emissions data storage request, the block-generating node on the blockchain network decrypts the request using the public key of the pre-stored encryption chip, obtaining the emissions data and vehicle information from the vehicle terminal.

[0037] S120. Based on the terminal identifier, determine whether there is a chain structure data of the corresponding vehicle terminal on the chain, and obtain the data judgment result.

[0038] The chain-structured data can be the data format in which emission data is stored on blockchain nodes, with each vehicle terminal corresponding to its own chain-structured data. Each blockchain node stores the corresponding chain-structured data for all vehicle terminals.

[0039] For example, a block-generating node can determine whether a chain-structured data record of the vehicle-mounted terminal corresponding to that terminal exists on the blockchain using the terminal identifier. It should be noted that after a blockchain node obtains the emissions data uploaded by the vehicle-mounted terminal, a chain-structured data record corresponding to that vehicle-mounted terminal may already exist on the chain, or it may obtain the chain-structured data record of a new vehicle-mounted terminal's first upload, for which there is no corresponding chain-structured storage structure on the chain. Therefore, the subsequent storage processing method will differ depending on the situation. The data determination result can include whether a chain-structured storage structure for the corresponding vehicle-mounted terminal exists on the chain, or whether a chain-structured storage structure for the corresponding vehicle-mounted terminal does not exist on the chain.

[0040] S130. Based on the data judgment results, generate the corresponding block and broadcast it to the blockchain network so that the block verification nodes can verify the corresponding block and obtain the block verification result.

[0041] For example, if the data judgment result indicates that a chain storage structure for the corresponding vehicle terminal exists on the chain, the block generating node obtains the chain storage structure for the corresponding vehicle terminal based on the terminal identifier, and generates the corresponding block based on the obtained emission data and vehicle terminal information. Based on the PBFT (Practical Byzantine Fault Tolerance) consensus algorithm, the block generating node broadcasts the block to the blockchain network so that the block verification node can verify the corresponding block and obtain the block verification result.

[0042] For example, if the data judgment result indicates that there is no chain storage structure for the corresponding vehicle terminal on the chain, then the chain storage structure for the vehicle terminal is constructed. Based on the vehicle information, the first block of the chain storage structure for the corresponding vehicle terminal is generated, and the second block of the chain storage structure is generated based on the emission data. The first block and the second block are used as corresponding blocks. Based on the PBFT (Practical Byzantine Fault Tolerance) consensus algorithm, the block generating node broadcasts to the blockchain network so that the block verification node can verify the corresponding block and obtain the block verification result.

[0043] S140. Based on the block verification results, determine the chain structure data of the corresponding vehicle terminal under this consensus and store it on the chain for viewing.

[0044] For example, if the block verification result passes, the block generating node and the block verifying node determine the chain structure data of the corresponding vehicle terminal under this consensus based on the corresponding block and store it in a chain for viewing. Specifically, the block generating node and the block verifying node may add the corresponding block to the end of the chain structure data of the vehicle terminal to obtain the chain structure data of the vehicle terminal under this consensus.

[0045] Optionally, each blockchain node in the blockchain network can publish the relevant information of the obtained emissions data to a message queue, which can be subscribed to by IoT platforms that require it. Specifically, the blockchain node can provide an API (Application Programming Interface) for IoT platforms or external systems to call. IoT platforms or external systems can query all reported emissions data from vehicle terminals using the vehicle terminal ID. Users can call this API through a mobile app or web application to query all reported emissions data and historical records from the blockchain's distributed ledger.

[0046] This invention's solution obtains emission data storage requests sent by vehicle-mounted terminals; determines whether corresponding vehicle-mounted terminal chain structure data exists on the blockchain based on the terminal identifier, and obtains a data judgment result; generates a corresponding block based on the data judgment result and broadcasts it to the blockchain network for block verification nodes to verify the corresponding block, obtaining a block verification result; and determines the corresponding vehicle-mounted terminal chain structure data under this consensus and stores it on the blockchain for viewing. This technical solution, by generating and broadcasting corresponding blocks based on data judgment results, and having block verification nodes verify the blocks to obtain block verification results, achieves persistent storage of vehicle-mounted terminal emission data through on-chain storage of the vehicle-mounted terminal's chain structure data. This improves the security of the emission data storage process and environment, reduces the possibility of emission data tampering, and ensures the authenticity, immutability, and security of emission data, providing emission data security guarantees for relevant personnel.

[0047] Example 2

[0048] Figure 2 This is a flowchart of a blockchain-based emission data storage method provided in Embodiment 2 of the present invention. This embodiment is an optimization and improvement based on the above technical solutions.

[0049] Furthermore, the step "based on the data judgment result, generate the corresponding block and broadcast it to the blockchain network for block verification nodes to verify the corresponding block and obtain the block verification result" is refined to "if the chain structure data of the corresponding vehicle terminal exists on the chain, then obtain the tail block in the chain structure data of the corresponding vehicle terminal; the tail block includes the block hash value corresponding to the block; generate the current block based on the emission data and the block hash value of the tail block; broadcast the current block to the blockchain network for block verification nodes to verify the current block and obtain the block verification result." This improves the method for determining the block verification result. It should be noted that parts not described in detail in this embodiment of the invention can be found in the descriptions of other embodiments.

[0050] See Figure 2 The blockchain-based emissions data storage method shown includes:

[0051] S210. Obtain the emission data storage request sent by the vehicle terminal; the emission data storage request includes the emission data of the vehicle terminal and vehicle information; the vehicle information includes the terminal identifier.

[0052] S220. Based on the terminal identifier, determine whether there is a chain structure data of the corresponding vehicle terminal on the chain, and obtain the data judgment result.

[0053] S230. If there is chain structure data of the corresponding vehicle terminal on the chain, then obtain the tail block in the chain structure data of the corresponding vehicle terminal; the tail block includes the block hash value corresponding to the block.

[0054] The tail block can be the last block in the chained data structure of the corresponding vehicle terminal. The tail block includes the block hash value corresponding to that tail block.

[0055] For example, if there is chain structure data of the corresponding vehicle terminal on the blockchain, the chain structure data of the vehicle terminal is obtained, and the block hash value corresponding to the tail block in the chain structure data is determined.

[0056] S240. Generate the current block based on the emission data and the block hash value of the tail block.

[0057] For example, the block generating node can perform a hash operation on the emission data and the block hash value of the tail block to obtain the block hash value of the current block, thereby obtaining the current block including the block hash value.

[0058] S250. Broadcast the current block to the blockchain network so that the block verification nodes can verify the current block and obtain the block verification result.

[0059] For example, a block generating node can broadcast the current block to the blockchain network, and a block verifying node can verify the current block to obtain a block verification result. The block verification result includes whether the block verification passed or failed.

[0060] In one optional embodiment, the current block is broadcast to the blockchain network for block verification nodes to perform block verification and obtain a block verification result. This includes: performing signature processing on the current block to obtain a currently signed block and sending it to the block verification nodes for signature verification, obtaining a first vote pass result, and broadcasting the first vote pass result to the blockchain network; if a first vote pass result of a first preset threshold number is received, a confirmation message is broadcast to the blockchain network for the block verification nodes to perform a second vote based on the confirmation message, obtaining a second vote pass result, and broadcasting the second vote pass result to the blockchain network; and determining the block verification result based on the number of received second vote pass results.

[0061] For example, a block generating node signs the current block to obtain a signed block, and broadcasts this signed block to the blockchain network for block verification nodes to verify. Upon receiving the signed block, the block verification node parses it to obtain the current block and verifies the correctness of the signature and digest information. After successful verification, the block verification node broadcasts a vote of approval to the blockchain network. It should be noted that for blocks whose signature verification fails, the block verification node does not broadcast a vote of approval. When a block verification node receives a vote of approval for a first preset threshold number of nodes, it broadcasts a confirmation message to the blockchain network. This first preset threshold number of messages can be pre-set by relevant technical personnel. For example, it could be 2f+1, where f is the number of downtime nodes. It should also be noted that the block verification node broadcasts a confirmation message to the blockchain network upon receiving a vote of approval for the first preset threshold number of nodes. Therefore, the block verification node conducts a secondary vote based on the number of confirmation messages received. If it receives a preset threshold of confirmation messages, such as 2f+1, it broadcasts the secondary vote result to the blockchain network. It should be noted that a blockchain verification node that does not receive the preset threshold of confirmation messages, such as 2f+1, does not broadcast. The block generating node determines the block verification result based on the number of secondary vote results received.

[0062] S260. Based on the block verification results, determine the chain structure data of the corresponding vehicle terminal under this consensus and store it on the chain for viewing.

[0063] For example, if block verification passes, the current block is added to the end of the chain structure data of the vehicle terminal, updating the chain structure data, thereby obtaining the chain structure data of the corresponding vehicle terminal under this consensus and storing it on the chain for viewing. If block verification fails, the current chain structure data of the corresponding vehicle terminal is retained, and no block addition operation is performed.

[0064] In one optional embodiment, the block verification result is determined based on the number of received secondary voting results, including: if the number of received secondary voting results is not less than a second preset threshold, the block verification result is determined to be passed; if the number of received secondary voting results is less than the second preset threshold, the block verification result is determined to be failed. Correspondingly, based on the block verification result, the chain structure data of the corresponding vehicle terminal under this consensus is determined and stored on the chain, including: if the block verification result is passed, the current block is used to update the chain structure data of the corresponding vehicle terminal under this consensus and stored on the chain; if the block verification result is failed, the obtained chain structure data of the corresponding vehicle terminal is used as the chain structure data of the corresponding vehicle terminal under this consensus and stored on the chain.

[0065] For example, if the number of secondary voting results received by the block-generating node is not less than a second preset threshold, the block verification result is determined to be successful; if the number of secondary voting results received by the block-generating node is less than the second preset threshold, the block verification result is determined to be unsuccessful. If the block verification result is successful, the current block is added to the end of the last block of the chain structure data of the vehicle terminal to update the chain structure data, thereby obtaining the chain structure data of the corresponding vehicle terminal under this consensus and storing it on the chain. If the block verification result is unsuccessful, the obtained chain structure data of the corresponding vehicle terminal is used as the chain structure data of the corresponding vehicle terminal under this consensus and stored on the chain.

[0066] This embodiment of the solution, upon determining the existence of chain-structured data for a corresponding vehicle-mounted terminal on the blockchain, obtains the block hash value of the tail block within that chain-structured data. Based on the emission data and the block hash value of the tail block, it generates the current block and broadcasts it to the blockchain network for block verification nodes to verify. This improves the method for determining the block verification result, enabling accurate determination of the block verification result when the existence of chain-structured data for a corresponding vehicle-mounted terminal on the blockchain is confirmed, thereby further enhancing the accuracy of determining the chain-structured data of the vehicle-mounted terminal.

[0067] Example 3

[0068] Figure 3This is a flowchart of a blockchain-based emission data storage method provided in Embodiment 3 of the present invention. This embodiment is an optimization and improvement based on the above technical solutions.

[0069] Furthermore, the step "based on the data judgment result, generate the corresponding block and broadcast it to the blockchain network for block verification nodes to verify the corresponding block and obtain the block verification result" is refined to "if the chain structure data of the corresponding vehicle terminal does not exist on the chain, then based on the vehicle terminal information, generate the first block of the chain structure data corresponding to the corresponding vehicle terminal; the first block includes the block hash value corresponding to the block; based on the emission data and the block hash value of the first block, generate the second block of the chain structure data corresponding to the corresponding vehicle terminal; broadcast the second block to the blockchain network for block verification nodes to verify the second block and obtain the block verification result." This improves the method for determining the block verification result. It should be noted that parts not described in detail in this embodiment of the invention can be found in the descriptions of other embodiments.

[0070] See Figure 3 The blockchain-based emissions data storage method shown includes:

[0071] S310. Obtain the emission data storage request sent by the vehicle terminal; the emission data storage request includes the emission data of the vehicle terminal and vehicle information; the vehicle information includes the terminal identifier.

[0072] S320. Based on the terminal identifier, determine whether there is a chain structure data of the corresponding vehicle terminal on the chain, and obtain the data judgment result.

[0073] S330. If there is no chain structure data for the corresponding vehicle terminal on the chain, then based on the vehicle terminal information, generate the first block of the chain structure data corresponding to the corresponding vehicle terminal; the first block includes the block hash value corresponding to the block.

[0074] For example, if the corresponding vehicle terminal's chain-structured data does not exist on the blockchain, it indicates that the blockchain node has received the vehicle terminal's emission data for the first time. Therefore, the chain-structured data of the vehicle terminal can be constructed, and based on the vehicle terminal information, the first block of the chain-structured data corresponding to the vehicle terminal can be generated. The first block can be the first block in the chain-structured data.

[0075] The vehicle-side information can include the terminal identifier and upload time of the vehicle terminal. Therefore, the vehicle-side information can be hashed to generate the first block and obtain the block hash value of the block.

[0076] S340. Based on the emission data and the block hash value of the first block, generate the second block of chain-structured data corresponding to the vehicle terminal.

[0077] For example, the block generating node can perform a hash operation on the emission data and the block hash value of the first block to obtain the block hash value of the second block, thereby obtaining a second block including the block hash value.

[0078] S350. Broadcast the second block to the blockchain network so that the block verification nodes can verify the second block and obtain the block verification result.

[0079] For example, a block generating node can broadcast a second block to the blockchain network, and a block verifying node can verify the second block to obtain a block verification result. The block verification result includes whether the block verification passed or failed.

[0080] In one optional embodiment, broadcasting a second block to the blockchain network for block verification nodes to verify the second block and obtain a block verification result includes: performing signature processing on the second block to obtain a second signed block and sending it to the block verification nodes for signature verification, obtaining three passed votes, and broadcasting the three passed votes to the blockchain network; if three passed votes of a third preset threshold are received, a confirmation message is broadcast to the blockchain network for the block verification nodes to perform four votes based on the confirmation message, obtaining four passed votes, and broadcasting the four passed votes to the blockchain network; and determining the block verification result based on the number of received four passed votes.

[0081] For example, the block generating node signs the second block to obtain a second signed block, and broadcasts the second signed block to the blockchain network for block verification nodes to verify. Upon receiving the second signed block, the block verification node parses it to obtain the second block and verifies the correctness of the signature and digest information. After successful verification, the block verification node broadcasts the three-vote pass result to the blockchain network. It should be noted that block verification nodes do not broadcast the three-vote pass result for blocks whose second signed blocks fail verification. When a block verification node receives three-vote pass results exceeding a third preset threshold, it broadcasts a confirmation message to the blockchain network. This third preset threshold can be pre-set by relevant technical personnel. For example, it could be 2f+1, where f is the number of downtime nodes. It should also be noted that the block verification node broadcasts a confirmation message to the blockchain network upon receiving three-vote pass results exceeding the third preset threshold. Therefore, the block verification node conducts four rounds of voting based on the number of confirmation messages received. If it receives a preset threshold of 2f+1 confirmation messages, it broadcasts the results of the four votes to the blockchain network. It should be noted that a blockchain verification node that does not receive the preset threshold of 2f+1 confirmation messages does not broadcast. The block generating node determines the block verification result based on the number of successful votes received.

[0082] S360. Based on the block verification results, determine the chain structure data of the corresponding vehicle terminal under this consensus and store it on the chain for viewing.

[0083] For example, if block verification passes, a chain-structured data of the corresponding vehicle terminal under this consensus is generated, which includes the first block and the second block. For example, if block verification fails, only the chain-structured data including the first block can be obtained under this consensus, or no chain-structured data of the corresponding vehicle terminal can be generated under this consensus.

[0084] In one optional embodiment, the block verification result is determined based on the number of received four-vote approval results, including: if the number of received four-vote approval results is not less than a fourth preset threshold, the block verification result is determined to be passed; if the number of received four-vote approval results is less than the fourth preset threshold, the block verification result is determined to be failed. Correspondingly, based on the block verification result, the chain structure data of the corresponding vehicle terminal under this consensus is determined and stored on the chain, including: if the block verification result is passed, the chain structure data of the corresponding vehicle terminal under this consensus is generated based on the first block and the second block and stored on the chain; if the block verification result is failed, the chain structure data of the corresponding vehicle terminal under this consensus is generated based on the first block and stored on the chain.

[0085] For example, if the number of passed votes received by the block-generating node is not less than a third preset threshold, the block verification result is determined to be passed; if the number of passed votes received by the block-generating node is less than a fourth preset threshold, the block verification result is determined to be failed. If the block verification result is passed, a chain-structured data of the vehicle terminal, including the first and second blocks, is generated under this consensus and stored on the chain; if the block verification result is failed, a chain-structured data of the vehicle terminal, including the first block, is generated under this consensus and stored on the chain.

[0086] This embodiment determines the block verification result by determining that the chain structure data of the corresponding vehicle terminal does not exist on the chain. Based on the vehicle terminal information, it generates the block hash of the first block of the chain structure data corresponding to the vehicle terminal. Then, based on the emission data and the block hash value of the first block, it generates and broadcasts the second block of the chain structure data corresponding to the vehicle terminal, allowing block verification nodes to verify the second block. This method ensures accurate determination of the block verification result even when the chain structure data of the corresponding vehicle terminal is confirmed to exist on the chain, thereby further improving the accuracy of determining the chain structure data of the vehicle terminal.

[0087] Example 4

[0088] Figure 4 This is a schematic diagram of a blockchain-based emission data storage device provided in Embodiment 4 of the present invention. The blockchain-based emission data storage device provided in this embodiment of the present invention is suitable for securely storing emission data from vehicle terminals. This blockchain-based emission data storage device can be implemented in hardware and / or software, such as... Figure 4 As shown, the device specifically includes: a storage request acquisition module 401, a judgment result determination module 402, a block broadcast module 403, and a chain structure data determination module 404. Among them,

[0089] The storage request acquisition module 401 is used to acquire the emission data storage request sent by the vehicle terminal; the emission data storage request includes the emission data of the vehicle terminal and vehicle information; the vehicle information includes the terminal identifier;

[0090] The judgment result determination module 402 is used to determine whether there is chain structure data of the corresponding vehicle terminal on the chain based on the terminal identifier, and to obtain the data judgment result;

[0091] The block broadcasting module 403 is used to generate a corresponding block based on the data judgment result and broadcast it to the blockchain network so that the block verification nodes can verify the corresponding block and obtain the block verification result.

[0092] The chain structure data determination module 404 is used to determine the chain structure data of the corresponding vehicle terminal under this consensus based on the block verification result and store it on the chain for viewing.

[0093] This invention's solution obtains emission data storage requests sent by vehicle-mounted terminals; determines whether corresponding vehicle-mounted terminal chain structure data exists on the blockchain based on the terminal identifier, and obtains a data judgment result; generates a corresponding block based on the data judgment result and broadcasts it to the blockchain network for block verification nodes to verify the corresponding block, obtaining a block verification result; and determines the corresponding vehicle-mounted terminal chain structure data under this consensus and stores it on the blockchain for viewing. This technical solution, by generating and broadcasting corresponding blocks based on data judgment results, and having block verification nodes verify the blocks to obtain block verification results, achieves persistent storage of vehicle-mounted terminal emission data through on-chain storage of the vehicle-mounted terminal's chain structure data. This improves the security of the emission data storage process and environment, reduces the possibility of emission data tampering, and ensures the authenticity, immutability, and security of emission data, providing emission data security guarantees for relevant personnel.

[0094] Optionally, the block broadcast module 403 includes:

[0095] The tail block acquisition unit is used to acquire the tail block in the chain structure data of the corresponding vehicle terminal if the chain structure data of the corresponding vehicle terminal exists on the chain; the tail block includes the block hash value corresponding to the block.

[0096] The current block generation unit is used to generate the current block based on the emission data and the block hash value of the tail block;

[0097] The current block broadcasting unit is used to broadcast the current block to the blockchain network so that the block verification node can verify the current block and obtain the block verification result.

[0098] Optionally, the block broadcast unit includes:

[0099] The current signature block sending subunit is used to perform signature processing on the current block, obtain the current signature block, and send it to the block verification node so that the block verification node can verify the current signature block, obtain a vote pass result, and broadcast the vote pass result to the blockchain network;

[0100] The first confirmation message broadcasting subunit is used to broadcast a confirmation message to the blockchain network if it receives a first preset number threshold of first vote passing result, so that the block verification node can perform a second vote according to the confirmation message, obtain a second vote passing result, and broadcast the second vote passing result to the blockchain network;

[0101] The first verification result determination subunit is used to determine the block verification result based on the number of results received from the second vote.

[0102] Optionally, the first verification result determining subunit is specifically used for:

[0103] If the number of received secondary voting results is not less than the second preset threshold, then the block verification result is determined to be passed.

[0104] If the number of received secondary voting results is less than the second preset threshold, the block verification result is determined to have failed.

[0105] Accordingly, the chain structure data determination module 404 is specifically used for:

[0106] If the block verification result passes, the current block is used to update the chain structure data of the corresponding vehicle terminal under this consensus and store it on the chain.

[0107] If the block verification result fails, the obtained chain structure data of the corresponding vehicle terminal will be used as the chain structure data of the corresponding vehicle terminal under this consensus and stored on the chain.

[0108] Optionally, the block broadcast module 403 includes:

[0109] The first block generation unit is used to generate a first block of chain structure data corresponding to the corresponding vehicle terminal based on the vehicle terminal information if there is no chain structure data of the corresponding vehicle terminal on the chain; the first block includes the block hash value corresponding to the block.

[0110] The second block generation unit is used to generate a second block of chain-structured data corresponding to the corresponding vehicle terminal based on the emission data and the block hash value of the first block.

[0111] The second block broadcasting unit is used to broadcast the second block to the blockchain network so that the block verification node can verify the second block and obtain the block verification result.

[0112] Optionally, the second block broadcast unit includes:

[0113] The second signature block sending subunit is used to process the signature of the second block, obtain the second signature block, and send it to the block verification node so that the block verification node can verify the signature of the second signature block, obtain the three-vote pass result, and broadcast the three-vote pass result to the blockchain network.

[0114] The second determination message broadcasting subunit is used to broadcast a confirmation message to the blockchain network if it receives three votes passing the third preset threshold, so that the block verification node can vote four times according to the confirmation message, obtain four votes passing the result, and broadcast the four votes passing the result to the blockchain network.

[0115] The second verification result determination subunit is used to determine the block verification result based on the number of results received from the four votes.

[0116] Optionally, the second verification result determines the subunit, specifically for:

[0117] If the number of the four votes received is not less than the fourth preset threshold, then the block verification result is determined to be passed.

[0118] If the number of the four votes received is less than the fourth preset threshold, then the block verification result is determined to be unsuccessful.

[0119] Accordingly, the chain structure data determination module 404 is specifically used for:

[0120] If the block verification result passes, then based on the first block and the second block, the chain structure data of the corresponding vehicle terminal under this consensus is generated and stored on the chain;

[0121] If the block verification result fails, then based on the first block, the chain structure data of the corresponding vehicle terminal under this consensus is generated and stored on the chain.

[0122] The blockchain-based emission data storage device provided in this embodiment of the invention can execute the blockchain-based emission data storage method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0123] Example 5

[0124] Figure 5 A schematic diagram of an electronic device 50 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0125] like Figure 5 As shown, the electronic device 50 includes at least one processor 51 and a memory, such as a read-only memory (ROM) 52 and a random access memory (RAM) 53, communicatively connected to the at least one processor 51. The memory stores computer programs executable by the at least one processor. The processor 51 can perform various appropriate actions and processes based on the computer program stored in the ROM 52 or loaded into the RAM 53 from storage unit 58. The RAM 53 can also store various programs and data required for the operation of the electronic device 50. The processor 51, ROM 52, and RAM 53 are interconnected via a bus 54. An input / output (I / O) interface 55 is also connected to the bus 54.

[0126] Multiple components in electronic device 50 are connected to I / O interface 55, including: input unit 56, such as keyboard, mouse, etc.; output unit 57, such as various types of monitors, speakers, etc.; storage unit 58, such as disk, optical disk, etc.; and communication unit 59, such as network card, modem, wireless transceiver, etc. Communication unit 59 allows electronic device 50 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0127] Processor 51 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 51 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 51 performs the various methods and processes described above, such as blockchain-based emissions data storage methods.

[0128] In some embodiments, the blockchain-based emissions data storage method can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 58. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 50 via ROM 52 and / or communication unit 59. When the computer program is loaded into RAM 53 and executed by processor 51, one or more steps of the blockchain-based emissions data storage method described above can be performed. Alternatively, in other embodiments, processor 51 can be configured to execute the blockchain-based emissions data storage method by any other suitable means (e.g., by means of firmware).

[0129] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0130] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0131] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0132] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0133] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0134] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0135] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0136] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A blockchain-based emission data storage method, characterized in that, Executed by block-generating nodes in the blockchain network, including: Obtain an emissions data storage request sent by the vehicle-mounted terminal; the emissions data storage request includes emissions data from the vehicle-mounted terminal and vehicle information; the vehicle information includes a terminal identifier; Based on the terminal identifier, determine whether there is chain structure data of the corresponding vehicle terminal on the chain, and obtain the data judgment result; Based on the data judgment results, a corresponding block is generated and broadcast to the blockchain network so that the block verification nodes can verify the corresponding block and obtain the block verification result. Based on the block verification results, the chain structure data of the corresponding vehicle terminal under this consensus is determined and stored on the chain for viewing; The step of generating a corresponding block based on the data judgment result and broadcasting it to the blockchain network for block verification nodes to verify the corresponding block and obtain the block verification result includes: If the chain structure data of the corresponding vehicle terminal exists on the chain, then the tail block in the chain structure data of the corresponding vehicle terminal is obtained; the tail block includes the block hash value corresponding to the block; The current block is generated based on the emission data and the block hash value of the tail block; The current block is broadcast to the blockchain network so that the block verification nodes can verify the current block and obtain the block verification result; The step of generating a corresponding block based on the data judgment result and broadcasting it to the blockchain network for block verification nodes to verify the corresponding block and obtain the block verification result also includes: If there is no chain structure data for the corresponding vehicle terminal on the chain, then based on the vehicle terminal information, a first block of chain structure data corresponding to the corresponding vehicle terminal is generated; the first block includes the block hash value corresponding to the block. Based on the emission data and the block hash value of the first block, a second block of chained data corresponding to the vehicle terminal is generated; The second block is broadcast to the blockchain network so that the block verification node can verify the second block and obtain the block verification result.

2. The method according to claim 1, characterized in that, The step of broadcasting the current block to the blockchain network for the block verification nodes to perform block verification and obtain the block verification result includes: The current block is signed to obtain a current signed block, which is then sent to the block verification node for signature verification. The block verification node verifies the current signed block, obtains a vote, and broadcasts the vote to the blockchain network. If a first-preset threshold number of votes is received, a confirmation message is broadcast to the blockchain network so that the block verification node can conduct a second vote based on the confirmation message, obtain a second-vote pass result, and broadcast the second-vote pass result to the blockchain network. The block verification result is determined based on the number of received secondary voting results.

3. The method according to claim 2, characterized in that, The step of determining the block verification result based on the number of received secondary voting results includes: If the number of received secondary voting results is not less than the second preset threshold, then the block verification result is determined to be passed. If the number of received secondary voting results is less than the second preset threshold, the block verification result is determined to have failed. Accordingly, determining the chain structure data of the corresponding vehicle terminal under this consensus and storing it on the chain based on the block verification result includes: If the block verification result passes, the current block is used to update the chain structure data of the corresponding vehicle terminal under this consensus and store it on the chain. If the block verification result fails, the obtained chain structure data of the corresponding vehicle terminal will be used as the chain structure data of the corresponding vehicle terminal under this consensus and stored on the chain.

4. The method according to claim 1, characterized in that, The step of broadcasting the second block to the blockchain network for the block verification nodes to verify the second block and obtain the block verification result includes: The second block is signed to obtain a second signed block, which is then sent to the block verification node for signature verification. The block verification node verifies the second signed block and obtains a three-vote pass result, which is then broadcast to the blockchain network. If three votes pass the third preset threshold, a confirmation message is broadcast to the blockchain network so that the block verification node can vote four times based on the confirmation message to obtain four votes passing the result, and then broadcast the four votes passing the result to the blockchain network. The block verification result is determined based on the number of successful votes received from the four voting processes.

5. The method according to claim 4, characterized in that, The step of determining the block verification result based on the number of successful votes received from the four rounds includes: If the number of the four votes received is not less than the fourth preset threshold, then the block verification result is determined to be passed. If the number of the four votes received is less than the fourth preset threshold, then the block verification result is determined to be unsuccessful. Accordingly, determining the chain structure data of the corresponding vehicle terminal under this consensus and storing it on the chain based on the block verification result includes: If the block verification result passes, then based on the first block and the second block, the chain structure data of the corresponding vehicle terminal under this consensus is generated and stored on the chain; If the block verification result fails, then based on the first block, the chain structure data of the corresponding vehicle terminal under this consensus is generated and stored on the chain.

6. A blockchain-based emissions data storage device, characterized in that, Block-generating nodes used in blockchain networks include: The storage request acquisition module is used to acquire emission data storage requests sent by the vehicle terminal; the emission data storage request includes emission data and vehicle information of the vehicle terminal; the vehicle information includes a terminal identifier; The judgment result determination module is used to determine whether there is chain structure data of the corresponding vehicle terminal on the chain based on the terminal identifier, and to obtain the data judgment result; The block broadcasting module is used to generate corresponding blocks based on the data judgment results and broadcast them to the blockchain network so that block verification nodes can verify the corresponding blocks and obtain the block verification results. The chain structure data determination module is used to determine the chain structure data of the corresponding vehicle terminal under this consensus based on the block verification results and store it on the chain for viewing; The block broadcast module includes: The tail block acquisition unit is used to acquire the tail block in the chain structure data of the corresponding vehicle terminal if the chain structure data of the corresponding vehicle terminal exists on the chain; the tail block includes the block hash value corresponding to the block. The current block generation unit is used to generate the current block based on the emission data and the block hash value of the tail block; The current block broadcasting unit is used to broadcast the current block to the blockchain network so that the block verification node can verify the current block and obtain the block verification result; The block broadcast module further includes: The first block generation unit is used to generate a first block of chain structure data corresponding to the corresponding vehicle terminal based on the vehicle terminal information if there is no chain structure data of the corresponding vehicle terminal on the chain; the first block includes the block hash value corresponding to the block. The second block generation unit is used to generate a second block of chain-structured data corresponding to the corresponding vehicle terminal based on the emission data and the block hash value of the first block. The second block broadcasting unit is used to broadcast the second block to the blockchain network so that the block verification node can verify the second block and obtain the block verification result.

7. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the blockchain-based emission data storage method according to any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the blockchain-based emission data storage method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Multi-warehouse data management method based on block chain and related device

    WO2019184210A1

  • KR20210051077A