A blockchain-oriented off-chain data processing method and a blockchain edge computing device

By embedding cryptographic chips in blockchain edge computing devices and combining hash algorithms and asynchronous cache forwarding services, the problems of complex interaction logic and long response time in blockchain networks with multiple clients and large data volumes are solved, enabling real-time data processing and efficient storage.

CN122372980APending Publication Date: 2026-07-10HIGHWAY MONITORING & RESPONSE CENT MINIST OF TRANSPORT OF THE P R C +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HIGHWAY MONITORING & RESPONSE CENT MINIST OF TRANSPORT OF THE P R C
Filing Date
2026-05-25
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Blockchain networks, with their complex interaction logic and long response times in the context of multiple clients and large data volumes, struggle to meet the demands for real-time data processing and low response latency, thus impacting data synchronization and storage efficiency.

Method used

Blockchain edge computing devices with built-in cryptographic chips connect with IoT devices and consensus nodes to process and sign data, compress data using hash algorithms, provide cryptographic security services and asynchronous caching and forwarding, forming a high-speed forwarding layer to reduce network load.

Benefits of technology

It enables real-time data processing and low response latency under multi-client and large-volume data conditions, improves data synchronization and storage efficiency, and enhances the performance and availability of the blockchain system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122372980A_ABST
    Figure CN122372980A_ABST
Patent Text Reader

Abstract

The application provides a blockchain-oriented upper chain data processing method and a blockchain edge computing device, and relates to the technical field of wireless communication networks. The method is realized by a blockchain edge computing device with a built-in cryptographic chip, and comprises the following steps: receiving, by the blockchain edge computing device, an upper chain request from an Internet of Things device that has been registered and accessed; determining the blockchain identity information corresponding to the Internet of Things device based on a key permission code, calculating the hash value corresponding to the upper chain data by using a hash algorithm, and generating upper chain information carrying the hash value and the blockchain identity information; signing the upper chain information by using a private key generated by the cryptographic chip based on the key permission code, and sending the upper chain request carrying the upper chain information and the corresponding signature to a connected consensus node. The method and device provided by the application can meet the application requirements of real-time data processing and low response delay under the condition of multiple clients and large data volume, and improve the data synchronization and storage efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of wireless communication network technology, and in particular to an on-chain data processing method for blockchain and a blockchain edge computing device. Background Technology

[0002] In traditional centralized storage, data is stored by one or more central servers, while distributed storage disperses data across different nodes in a network, so that each node keeps a copy of all the data, and when new data is added, it is synchronized to all nodes through a certain protocol.

[0003] Blockchain technology is a distributed ledger technology whose core characteristics are decentralization and security. Distributed storage is a crucial component of blockchain technology, effectively solving the centralization problem inherent in traditional storage methods. Specifically, blockchain's decentralized distributed storage is based on a peer-to-peer network, ensuring data reliability and security. Each node possesses a complete copy of the data, and even if a node fails or is attacked, the data can still be recovered from other nodes. The principle is that, without a central authority for command and coordination, and amidst a complex and ever-changing network state, the consensus mechanism ensures that the data across spatially dispersed nodes is identical. The consensus mechanism is the most complex and sophisticated part of the blockchain system, coordinating distrustful nodes and providing trusted decentralized services to upper-layer applications.

[0004] While blockchain has proposed various consensus mechanisms suitable for different application scenarios—such as PBFT (Practical Byzantine Fault Tolerance), a message-passing-based consensus algorithm that requires three phases of communication across multiple nodes to achieve data consistency—the complexity of blockchain consensus mechanisms makes it difficult to meet the real-time data processing and low-latency requirements of applications with multiple clients and large data volumes.

[0005] Therefore, there is an urgent need for a new on-chain data processing solution to solve the problems of complex interaction logic and long response time inherent in blockchain networks, meet the requirements of real-time data processing and low response latency, and thus improve data synchronization and storage efficiency. Summary of the Invention

[0006] In view of this, embodiments of the present invention provide an on-chain data processing method and a blockchain edge computing device to meet the application requirements of real-time data processing and low response latency in the case of multiple clients and large data volumes, and to improve data synchronization and storage efficiency.

[0007] One aspect of the present invention provides an on-chain data processing method for blockchain, which is implemented by a blockchain edge computing device with a built-in cryptographic chip. The blockchain edge computing device establishes connections with IoT devices and consensus nodes in the blockchain network, and the blockchain edge computing device stores the address information of the consensus nodes. The method includes the following steps: The blockchain edge computing device receives on-chain requests from registered and connected IoT devices. The on-chain request includes the on-chain data and key permission code corresponding to the IoT device. The blockchain edge computing device determines the blockchain identity information corresponding to the IoT device based on the key permission code, uses a hash algorithm to calculate the hash value corresponding to the on-chain data, and generates on-chain information carrying the hash value and blockchain identity information. The on-chain information is signed using the private key generated by the cryptographic chip based on the key authorization code, and an on-chain request carrying the on-chain information and the corresponding signature is sent to the connected consensus node.

[0008] In some embodiments of the present invention, the method further includes: Receive and verify device registration requests from unregistered IoT devices; If the device registration request is verified, a public-private key pair corresponding to the IoT device is generated through the cryptographic chip. Based on the public key corresponding to the IoT device, a blockchain registration request is generated and sent to the blockchain network. The blockchain registration request includes the identification information of the IoT device and the public key corresponding to the IoT device. If the blockchain identity registration is successful, a registration success message will be returned to the IoT device.

[0009] In some embodiments of the present invention, before returning a registration success message to the IoT device, the method further includes: if the blockchain identity registration is successful, the blockchain edge computing device locally stores the blockchain identity information, public-private key pair, and identification information of the IoT device. The key authorization code is for the device registration request; and The successful registration message returned to the IoT device includes the IoT device's blockchain identity information.

[0010] In some embodiments of the present invention, before the blockchain edge computing device is first started, the blockchain edge computing device locally stores at least the address information of a consensus node in the blockchain network; wherein, the address information of the consensus node includes the consensus node ID, the IP address and MAC address of the consensus node; Before receiving an on-chain request from an IoT device, the method further includes: the blockchain edge computing device parsing the address information of the consensus node stored locally, and forming a network connection between the blockchain edge computing device and the blockchain network based on the parsing result.

[0011] In some embodiments of the present invention, for each consensus node that locally stores address information, a network connection is formed between the blockchain edge computing device and the blockchain network based on the parsing result, including: If a network connection already exists between the blockchain edge computing device and the consensus node before a network connection is established, the existing network connection is reused; otherwise, a network connection is established between the blockchain edge computing device and the consensus node using communication construction technology.

[0012] In some embodiments of the present invention, the method further includes: The blockchain edge computing device broadcasts an address request to the consensus node that stores address information locally on the device, receives the address information returned by the consensus node, and updates the address information of the consensus node stored locally based on the received address information; wherein, the address information returned by the consensus node includes the address information of the consensus node itself and the address information of other consensus nodes stored by the consensus node.

[0013] In some embodiments of the present invention, sending an on-chain request carrying on-chain information and a corresponding signature to the connected consensus node includes: A list of on-chain transactions is generated by sending a batch on-chain request to the connected consensus node. This on-chain request carries on-chain information and the corresponding signature.

[0014] In some embodiments of the present invention, after sending an on-chain request to the connected consensus node, the method further includes: receiving an on-chain transaction return request from the blockchain network after the transaction on-chain operation is completed, and recording the on-chain transaction return request locally.

[0015] In some embodiments of the present invention, after calculating the hash value corresponding to the on-chain data, the method further includes: using the on-chain data as the value and the hash value corresponding to the on-chain data as the key, storing the on-chain data in the on-chain request locally. After obtaining the signature of the on-chain request, the method further includes: calculating the hash value of the signature corresponding to the on-chain information using a hash algorithm, and using the calculated hash value as the on-chain receipt code to generate signature information returned to the IoT device; and The blockchain edge computing device and the IoT device form a central topology network structure, with the blockchain edge computing device deployed on the side closer to the IoT device.

[0016] Another aspect of the present invention provides a blockchain edge computing device, which establishes connections with IoT devices and consensus nodes in a blockchain network, and stores the address information of the consensus nodes; the blockchain edge computing device includes a data processing module and a data uploading module; wherein, the data processing module is built based on a cryptographic chip; The data processing module is used to receive on-chain requests from registered and connected IoT devices, which contain on-chain data and key authorization codes corresponding to the IoT devices. Based on the key authorization codes, it determines the blockchain identity information corresponding to the IoT devices, calculates the hash value corresponding to the on-chain data using a hash algorithm, and generates on-chain information carrying the hash value and blockchain identity information. The data processing module is also used to sign the on-chain information by calling the private key generated by the cryptographic chip based on the key authorization codes. The data upload module is used to send upload requests carrying upload information and corresponding signatures to the connected consensus nodes.

[0017] This invention designs an on-chain data processing method and a blockchain edge computing device for blockchain applications. The blockchain edge computing device, with its built-in cryptographic chip, can realize data processing and forwarding, and provides cryptographic security services and asynchronous blockchain caching and forwarding services. The blockchain edge computing device proposed in this application can meet the application requirements of real-time data processing and low response latency in scenarios with multiple clients and large data volumes, improving data synchronization and storage efficiency.

[0018] Additional advantages, objects, and features of the invention will be set forth in part in the description which follows, and will also become apparent in part to those skilled in the art upon studying the description, or may be learned by practice of the invention. The objects and other advantages of the invention can be realized and obtained by means of the structures specifically pointed out in the description and drawings.

[0019] Those skilled in the art will understand that the objectives and advantages achievable with the present invention are not limited to those specifically described above, and that the above and other objectives achievable with the present invention will become clearer from the following detailed description. Attached Figure Description

[0020] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, are not intended to limit the scope of the invention. In the drawings: Figure 1 This is a schematic diagram illustrating the deployment of a blockchain edge computing device in one embodiment of the present invention.

[0021] Figure 2 This is a timing diagram of an on-chain data processing method in one embodiment of the present invention.

[0022] Figure 3This is a flowchart illustrating the on-chain data processing method in one embodiment of the present invention. Detailed Implementation

[0023] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the embodiments and accompanying drawings. Here, the illustrative embodiments and descriptions of this invention are used to explain the invention, but are not intended to limit the invention.

[0024] It should also be noted that, in order to avoid obscuring the invention with unnecessary details, only the structures and / or processing steps closely related to the solution according to the invention are shown in the accompanying drawings, while other details that are not closely related to the invention are omitted.

[0025] It should be emphasized that the term "including / comprises" as used herein refers to the presence of a feature, element, step, or component, but does not exclude the presence or addition of one or more other features, elements, steps, or components.

[0026] It should also be noted that, unless otherwise specified, the term "connection" in this article can refer not only to a direct connection, but also to an indirect connection involving an intermediary.

[0027] In the following description, embodiments of the invention will be illustrated with reference to the accompanying drawings. In the drawings, the same reference numerals represent the same or similar parts, or the same or similar steps.

[0028] Blockchain's distributed storage allows each node in the blockchain network to possess an independent copy of the data. However, the inherent complexity of blockchain system interaction logic and long response times affect synchronization and storage efficiency, hindering large-scale deployment in production environments. Based on this, this application designs a blockchain edge computing device and proposes a blockchain-oriented on-chain data processing method based on this device. Figure 1As shown, this blockchain edge computing device can be deployed between the blockchain data source (i.e., the IoT end) and the blockchain network. In other words, this application designs a blockchain edge computing device that connects upwards to blockchain nodes (also known as consensus nodes) in the blockchain network and downwards to IoT devices. Specifically, the blockchain edge computing device can connect to IoT devices (specifically, the blockchain edge computing device establishes a connection with the IoT devices) to obtain data to be uploaded to the blockchain network (i.e., information collected by the IoT devices) from the IoT devices. Furthermore, the blockchain edge computing device can connect to the blockchain network containing consensus nodes (specifically, the blockchain edge computing device establishes a connection with some or all of the consensus nodes), thereby forwarding the data obtained from the IoT devices to the blockchain network. The blockchain edge computing device proposed in this application has multiple functions, including cryptographic security services, data storage services, and blockchain asynchronous caching and forwarding services, specifically including: Cryptographic Security Services: IoT devices located at the edge of the blockchain network typically have simple functions and limited resources, relying on software programs to perform various cryptographic operations. This leads to risks such as key leakage, cracking, and attacks during software operations. Furthermore, vulnerabilities or errors in the software program itself may also affect the security and accuracy of cryptographic operations. To address this issue, this application proposes embedding cryptographic chips in blockchain edge computing devices to provide cryptographic security services. By embedding a dedicated security chip and encryption algorithms into the hardware of the blockchain edge computing device, the key is protected from leaving the hardware during cryptographic operations, resulting in relatively high security. Moreover, blockchain edge computing devices with embedded cryptographic chips can provide cryptographic services such as proxy signatures and proxy encryption.

[0029] Data storage service: In traditional blockchain storage models, network load becomes extremely high when IoT devices need to send large amounts of data to consensus nodes. Therefore, this application proposes a blockchain edge computing device with certain storage and computing capabilities. This device can receive and store data collected and uploaded by IoT devices, and calculate the hash value of the data sent by the IoT devices using a hash function, replacing the original data content and sending it to the consensus node. This significantly reduces the network load on data transmission. Furthermore, due to the irreversible nature of hash functions, it is impossible to achieve identical hash values, thus preventing data forgery and tampering and ensuring the security of edge node data.

[0030] Blockchain asynchronous caching and forwarding services: On the one hand, blockchain edge computing devices can be added to the blockchain network as special edge nodes (therefore, blockchain edge computing devices can also be called blockchain edge nodes), and each edge node stores and maintains the address information of other consensus nodes in the blockchain network, so that a high-speed forwarding layer is formed between the blockchain edge computing device and the consensus nodes connected to the network, reducing the network load of the consensus nodes, reducing response latency, and having certain advantages in performance and scalability; on the other hand, blockchain edge computing devices can form an autonomous cluster with the connected IoT terminals and provide asynchronous caching and forwarding services to the IoT terminals.

[0031] As an example, a central topology network structure can be formed between blockchain edge computing devices and IoT devices (a central topology network structure can be adopted within the autonomous cluster formed by blockchain edge computing devices and IoT devices). This means that one blockchain edge computing device can connect to multiple IoT devices, and one IoT device connects to only one blockchain edge computing device. A blockchain edge computing device needs to connect to at least one consensus node in the blockchain to forward acquired data to the blockchain network (the blockchain edge computing device forwards the acquired data to the connected consensus node, and the consensus node that acquired the forwarded data can share the forwarded data with other consensus nodes based on the consensus mechanism). Furthermore, a blockchain network can connect to multiple blockchain edge computing devices, and even a single consensus node in the blockchain network can connect to multiple blockchain edge computing devices. All connections mentioned above in this application refer to network connections, indicating that both IoT devices and consensus nodes can transmit data with the blockchain edge computing device.

[0032] This application does not impose specific restrictions on the deployment location of blockchain edge computing devices; the location can be designed according to specific needs. For example, blockchain edge computing devices can be deployed closer to the IoT endpoint, meaning they are closer to the blockchain data source to improve service response speed.

[0033] In some embodiments of this invention, this application proposes an on-chain data processing method based on a blockchain edge computing device. This method can be implemented by a blockchain edge computing device with a built-in cryptographic chip, and the blockchain edge computing device supports hash algorithms. Before performing on-chain data processing, it is necessary to ensure that the blockchain edge computing device establishes a connection with IoT devices and consensus nodes. Therefore, the blockchain edge computing device can locally store the address information of some or all consensus nodes in the blockchain network, thereby establishing a connection between the blockchain edge computing device and the blockchain network based on the locally stored consensus node address information. The consensus node address information stored locally by the blockchain edge computing device may include consensus node ID, consensus node IP address, and MAC address, etc., consensus node identification information (or consensus node identity information). Moreover, considering the variability of the blockchain network, the consensus node address information stored locally by the blockchain edge computing device is updatable. It should be noted that the blockchain edge computing device may not store the address information of all consensus nodes in the blockchain network. After a consensus node obtains information from the blockchain edge computing device, it can share information in the blockchain network based on the consensus mechanism. Therefore, the number of consensus nodes whose address information is locally stored by the blockchain edge computing device can be set according to data transmission requirements.

[0034] More specifically, the address information of consensus nodes stored locally on blockchain edge computing devices can be updated, such as... Figure 2 As shown ( Figure 2 Phases 1-3 are the address information update phase, and phases 4-10 are the on-chain data processing phase. The process is as follows: The blockchain edge computing device broadcasts an address request to the consensus nodes whose address information is locally stored on the edge computing device, in order to identify and discover consensus nodes in the blockchain network. Upon receiving the address request, the consensus node sends its own address information and the address information of other consensus nodes stored therein (e.g., address information of consensus nodes that can communicate directly based on the consensus mechanism) to the blockchain edge computing device. The blockchain edge computing device receives the address information returned by the consensus nodes and updates and maintains the address information of the consensus nodes stored locally on the edge computing device based on the received address information. The address request may include the identity information or identification information of the blockchain edge computing device (e.g., identification information may be device ID, IP address, and MAC address).

[0035] As an example, the step of updating the consensus node address information can be performed according to a second set condition. For instance, the second set condition could be to periodically update the locally stored consensus node address information, or to update the locally stored consensus node address information before the blockchain edge computing device forwards data obtained from the IoT terminal to the blockchain network. This application does not specifically limit the second set condition; it can be designed according to data transmission requirements. Furthermore, before the blockchain edge computing device first establishes a network connection with the blockchain network (or before the blockchain edge computing device is first started), the blockchain edge computing device locally stores the address information of at least one consensus node to enable data forwarding. In addition, the address information of the consensus nodes stored locally by the blockchain edge computing device can be stored in a list format. For simplicity, the term "node address table" will be used below to represent the address information of the consensus nodes stored locally by the blockchain edge computing device.

[0036] Furthermore, since the consensus node address information stored locally on the blockchain edge computing device is updatable, the connection between the blockchain edge computing device and the blockchain network is also updatable. The specific process is as follows: Before receiving an on-chain request from an IoT device, the blockchain edge computing device parses the node address table to determine the address information of each consensus node in the table. Based on the parsing results, a network connection is established between the blockchain edge computing device and each consensus node in the node address table to achieve rapid data forwarding. That is, the blockchain edge computing device can establish a connection with consensus nodes whose address information is stored locally.

[0037] In some embodiments of the present invention, during the establishment of a network connection, this application can reduce the network load of the consensus node through connection reuse. Therefore, for a consensus node that locally stores address information, establishing a network connection between the blockchain edge computing device and the blockchain network based on the parsing result includes: if a network connection already exists between the blockchain edge computing device and the consensus node before establishing the network connection based on the parsing result, the existing network connection is reused to achieve data forwarding; if no network connection exists between the blockchain edge computing device and the consensus node before establishing the network connection based on the parsing result, a network connection is established between the blockchain edge computing device and the consensus node through communication construction technology.

[0038] As an example, updating the connection between the blockchain edge computing device and the blockchain network can be performed according to a first set condition. For instance, the first set condition could be to periodically update the connection between the blockchain edge computing device and the blockchain network, or it could be to update the connection between the blockchain edge computing device and the blockchain network after the node address table is updated. This application does not specifically limit the first set condition; it can be designed according to data transmission requirements. Furthermore, the first set condition and the second set condition can be set in combination.

[0039] In some embodiments of the present invention, the blockchain edge computing device may also have IoT device registration and data processing functions.

[0040] More specifically, regarding the IoT device registration function of the blockchain edge computing device, if a new unregistered IoT device exists on the IoT end, the blockchain edge computing device needs to execute the IoT device registration process after the IoT device is first started. This allows the unregistered but connected IoT device to register in the blockchain network and obtain a blockchain identity. In this application, an unregistered but connected IoT device refers to an IoT device that has established a connection with the blockchain edge computing device but has not yet registered and obtained a blockchain identity. The IoT device registration process includes the following steps: An unregistered IoT device sends a device registration request to the blockchain edge computing device. The blockchain edge computing device receives and verifies the device registration request from the IoT device. If the device registration request is verified, it randomly generates a public and private key corresponding to the IoT device using a hardware cryptographic chip. The blockchain edge computing device derives the public key corresponding to the IoT device, generates a blockchain registration request based on the public key, and sends the blockchain registration request to the blockchain network (specifically, it sends the blockchain registration request to each consensus node in the blockchain network that is connected to the blockchain edge computing device). After receiving the blockchain registration request, the blockchain network executes the registration operation and returns a message indicating successful blockchain identity registration to the blockchain edge computing device. The blockchain edge computing device determines that the IoT device has been successfully registered based on the message indicating successful blockchain identity registration returned by the blockchain network, and returns a registration success message to the IoT device in the IoT terminal if the blockchain identity registration is successful.

[0041] Specifically, the device registration request sent by an IoT device to a blockchain edge computing device must include the IoT device's identification information (such as device ID and MAC address); and the blockchain registration request sent by the blockchain edge computing device to the blockchain network includes the IoT device's identification information and the public key corresponding to the IoT device. In addition, the blockchain registration request may also include the blockchain edge computing device's identification information. The blockchain network's message returning a successful blockchain identity registration to the blockchain edge computing device includes the IoT device's corresponding blockchain identity information and a registration success notification; the blockchain edge computing device's message returning a successful registration to the IoT device in the IoT terminal includes a registration success notification.

[0042] As an example, a blockchain edge computing device can use existing blockchain registration and verification technologies to verify the completeness of information in a device registration request, and the blockchain network performing the registration operation can also be an existing technology. This application does not specifically limit the blockchain registration and verification technology or the registration operation performed by the blockchain network. After generating a device registration request, the IoT device can store it locally. Furthermore, after the blockchain edge computing device determines that the IoT device has successfully registered, and before returning a registration success message to the IoT device, the blockchain edge computing device can also locally store the IoT device's blockchain identity information, public-private key pair, and the IoT device's identification information. Since the device registration request, public-private key, IoT device's blockchain identity information, and IoT device's identification information all correspond to a unique IoT device, it can be assumed that there is a correspondence between these information.

[0043] Furthermore, since the public-private key pair corresponding to the IoT device is generated after the device registration request is verified, the IoT device can send the device registration request to the blockchain edge computing device as a key authorization code to enable subsequent data forwarding.

[0044] Figure 3 This is a flowchart illustrating an on-chain data processing method for blockchain according to one embodiment of this application. (Combined with...) Figure 2 and Figure 3 The specific processing procedure for on-chain data by the blockchain edge computing device in this application is as follows: Step S110: After collecting information, an IoT device that has been registered in the blockchain network and has established a connection with the blockchain edge computing device (i.e., a registered and connected IoT device) sends an on-chain request to the blockchain edge computing device, which then receives the on-chain request from the IoT device. The on-chain request sent by the IoT device to the blockchain edge computing device includes the information collected by the IoT device and the device registration request generated by the IoT device during the IoT device registration process (the device registration request is sent to the blockchain edge computing device as a key permission code). Therefore, it can also be understood that the on-chain request sent by the IoT device to the blockchain edge computing device includes the on-chain data corresponding to the IoT device (on-chain data refers to the information collected by the IoT device, so on-chain data can also be called collected information) and the key permission code corresponding to the IoT device.

[0045] As an example, IoT devices located at the IoT endpoint can be devices such as IoT sensors and IoT cameras; therefore, the information collected by IoT devices can be file data such as images and videos. This application does not specifically limit the types of information collected by IoT devices.

[0046] Step S120: To compress the on-chain data, this application designs a blockchain edge computing device to calculate the hash value corresponding to the information collected by the IoT device through a hash algorithm, and to determine the blockchain identity information corresponding to the IoT device based on the key permission code, thereby generating on-chain information carrying the hash value and blockchain identity information (at this time, the consensus node can only receive the hash value corresponding to the information collected by the IoT device, and the collected information is not uploaded to the chain).

[0047] Specifically, blockchain edge computing devices can access the local storage database based on key permission codes to query the blockchain identity information of IoT devices locally, and then add the queried blockchain identity information to the on-chain information, so that the on-chain information includes the hash value corresponding to the collected information and the blockchain identity information of IoT devices.

[0048] In some embodiments of the present invention, after calculating the hash value corresponding to the collected information in step S110, the blockchain edge computing device can also use the information collected by the Internet of Things as the value, the hash value corresponding to the collected information as the key, and store the collected information in the on-chain request locally in the form of key-value pairs.

[0049] Step S130: The blockchain edge computing device uses the key permission code to call the private key generated by the cryptographic chip during the registration of the IoT device (i.e., calling the private key corresponding to the IoT device based on the key permission code), and uses the private key corresponding to the IoT device to sign the on-chain information generated in step S120. At this time, the information to be uploaded to the blockchain network by the blockchain edge computing device includes the hash value corresponding to the collected information, the blockchain identity information of the IoT device, and the signature corresponding to the on-chain information.

[0050] As an example, after obtaining the signature corresponding to the on-chain information, the blockchain edge computing device can also call a hash algorithm to calculate the hash value of the signature corresponding to the on-chain information, and use the calculated hash value as the on-chain receipt code, thereby generating signature information to be returned to the IoT device based on the on-chain receipt code.

[0051] Step S140: The blockchain edge computing device sends the on-chain request to the consensus node with which it has established a connection; the on-chain request sent by the blockchain edge computing device to the blockchain network carries on-chain information and the signature corresponding to the on-chain information. To distinguish on-chain requests containing different information, this application may refer to the on-chain request sent by the IoT device to the blockchain edge computing device as the first on-chain request, and the on-chain request sent by the blockchain edge computing device to the blockchain network as the second on-chain request.

[0052] As an example, the second on-chain request can be added to the on-chain transaction cache to generate an on-chain transaction list, enabling batch uploading. Specifically, this application can be designed to periodically generate a batch of second on-chain requests to form an on-chain transaction list, thereby sending the batch of second on-chain requests to the blockchain network. The process is as follows: the blockchain edge computing device obtains the on-chain transaction list from the on-chain transaction cache and sends the on-chain transaction list to the consensus node with which it has established a connection (i.e., the node sending module sends the on-chain transaction list to the consensus node with which it has a network connection with the blockchain edge computing device), so that the consensus node receives the on-chain transaction list containing the second on-chain request.

[0053] In some embodiments of the present invention, after the consensus node receives the second on-chain request, the following process may be included: after verifying the signature corresponding to the on-chain information and the blockchain identity information corresponding to the IoT device, the hash value corresponding to the collected information is retained to complete the transaction on-chain operation, and an on-chain transaction return request is sent to the blockchain edge computing device; the blockchain edge computing device receives the on-chain transaction return request from the blockchain network and records the on-chain transaction return request locally. The on-chain transaction return request includes the following information: the on-chain transaction hash value (TxHash), the transaction status, and the block height at which the transaction occurred.

[0054] Furthermore, the purpose of the on-chain transaction cache is to cache on-chain transactions and their signatures, and the cached content can be deleted after the on-chain operation is completed. For example, after the blockchain edge computing device receives an on-chain transaction return request from the blockchain network, it can delete the on-chain information and the corresponding signatures that have been completed from the on-chain transaction cache.

[0055] The blockchain edge computing device proposed in this application can contribute computing and storage resources, enhancing the performance and availability of the entire blockchain system. Based on the above description, the blockchain edge computing device can be divided into multiple functional modules: the blockchain edge computing device includes a network discovery module, a node connection module, a data processing module, and a data upload module. Specifically, the network discovery module is used to update the address information of consensus nodes stored locally on the blockchain edge computing device; the node connection module is used to update the connection relationship between the blockchain edge computing device and the blockchain network; the data processing module can perform IoT device registration and data compression processing, and is used to receive the first upload request from a registered and connected IoT device, determine the blockchain identity information corresponding to the IoT device based on the key authorization code, calculate the hash value corresponding to the collected information using a hash algorithm, and generate upload information carrying the hash value and blockchain identity information. Furthermore, the data processing module is also used to sign the upload information using the private key generated by the cryptographic chip based on the key authorization code; the data upload module is used to send a second upload request carrying the upload information and corresponding signature to the connected consensus node. The data processing module can be constructed based on the cryptographic chip built into the blockchain edge computing device.

[0056] As an example, before each functional module in a blockchain edge computing device can run, the blockchain edge device needs to be started first. Similarly, before an IoT device obtains its blockchain identity information through the IoT device registration process, the IoT device also needs to be started first. Furthermore, using cryptographic chips in IoT devices is costly, and IoT devices have a high degree of integration. Therefore, this application designs a method to embed cryptographic chips in a blockchain edge computing device that supports hash algorithms to provide services such as proxy signatures and proxy encryption.

[0057] The on-chain data processing method and blockchain edge computing device proposed in this application have the following significant advantages: ① This blockchain edge computing device has a built-in hardware security device (i.e., a cryptographic chip), which can protect the security of the key and provide a more secure cryptographic computing service for the Internet of Things.

[0058] ② Blockchain edge computing devices can act as edge nodes, contributing storage capacity to provide on-chain storage services for information collected by IoT devices. This compresses the on-chain data, which can greatly reduce the blockchain network load. At the same time, the device can be deployed closer to the data source (i.e., the IoT end) to provide a faster blockchain service response speed.

[0059] ③ Blockchain edge computing devices store and maintain the address information of blockchain consensus nodes, which can form a fast forwarding layer with the blockchain network, enabling information collected at the IoT end to be quickly transmitted to all consensus nodes in the blockchain network. Furthermore, during the network connection establishment process, the network load of consensus nodes can be greatly reduced through connection reuse.

[0060] Those skilled in the art will understand that the exemplary components, systems, and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software, or a combination of both. Whether implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this invention. When implemented in hardware, it can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this invention are programs or code segments used to perform the desired tasks. The programs or code segments can be stored in a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried in a carrier wave.

[0061] It should be clarified that the present invention is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of the present invention.

[0062] In this invention, features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, and / or combined with or in place of features of other embodiments.

[0063] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, various modifications and variations of the embodiments of the present invention are possible. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A blockchain-based on-chain data processing method, characterized in that, This method is implemented by a blockchain edge computing device with a built-in cryptographic chip. The blockchain edge computing device establishes connections with IoT devices and consensus nodes in the blockchain network, and stores the address information of the consensus nodes. The method includes the following steps: The blockchain edge computing device receives on-chain requests from registered and connected IoT devices, the on-chain requests containing on-chain data and key permission codes corresponding to the IoT devices; The blockchain edge computing device determines the blockchain identity information corresponding to the IoT device based on the key permission code, calculates the hash value corresponding to the on-chain data using a hash algorithm, and generates on-chain information carrying the hash value and the blockchain identity information. Based on the key authorization code, the private key generated by the cryptographic chip is invoked to sign the on-chain information, and an on-chain request carrying the on-chain information and the corresponding signature is sent to the connected consensus node.

2. The method according to claim 1, characterized in that, The method further includes: Receive and verify device registration requests from unregistered IoT devices; If the device registration request is verified, a public-private key pair corresponding to the IoT device is generated through the cryptographic chip. Based on the public key corresponding to the IoT device, a blockchain registration request is generated and sent to the blockchain network. The blockchain registration request includes the identification information of the IoT device and the public key corresponding to the IoT device. If the blockchain identity registration is successful, a registration success message will be returned to the IoT device.

3. The method according to claim 2, characterized in that, Before returning a successful registration message to the IoT device, the method further includes: in the case of successful blockchain identity registration, the blockchain edge computing device locally stores the blockchain identity information, public-private key pair, and identification information of the IoT device. The key authorization code is a device registration request; and The successful registration message returned to the IoT device includes the IoT device's blockchain identity information.

4. The method according to claim 1, characterized in that, Before the blockchain edge computing device is first started, the blockchain edge computing device locally stores at least the address information of a consensus node in the blockchain network; wherein, the address information of the consensus node includes the consensus node ID, the consensus node's IP address and MAC address; Before receiving an on-chain request from an IoT device, the method further includes: the blockchain edge computing device parsing the address information of the consensus node stored locally, and forming a network connection between the blockchain edge computing device and the blockchain network based on the parsing result.

5. The method according to claim 4, characterized in that, For each consensus node that locally stores address information, the process of forming a network connection between the blockchain edge computing device and the blockchain network based on the parsing results includes: If a network connection already exists between the blockchain edge computing device and the consensus node before a network connection is established, the existing network connection is reused; otherwise, a network connection is established between the blockchain edge computing device and the consensus node using communication construction technology.

6. The method according to claim 5, characterized in that, The method further includes: The blockchain edge computing device broadcasts an address request to the consensus node that has its address information stored locally, receives the address information returned by the consensus node, and updates the address information of the consensus node stored locally based on the received address information; wherein, the address information returned by the consensus node includes the address information of the consensus node itself and the address information of other consensus nodes stored by the consensus node.

7. The method according to claim 1, characterized in that, Sending a request to the connected consensus node, carrying the on-chain information and the corresponding signature, includes: A list of on-chain transactions is generated by sending a batch on-chain request to the connected consensus node. The on-chain request carries the on-chain information and the corresponding signature.

8. The method according to claim 1, characterized in that, After sending an on-chain request to the connected consensus node, the method further includes: receiving an on-chain transaction return request from the blockchain network after the transaction on-chain operation is completed, and recording the on-chain transaction return request locally.

9. The method according to claim 1, characterized in that, After calculating the hash value corresponding to the on-chain data, the method further includes: using the on-chain data as the value and the hash value corresponding to the on-chain data as the key, storing the on-chain data in the on-chain request locally; After obtaining the signature of the on-chain request, the method further includes: calculating the hash value of the signature corresponding to the on-chain information using a hash algorithm, and using the calculated hash value as the on-chain receipt code to generate signature information returned to the IoT device; and The blockchain edge computing device and the IoT device form a central topology network structure, and the blockchain edge computing device is deployed on the side closer to the IoT device.

10. A blockchain edge computing device, characterized in that, The blockchain edge computing device establishes connections with IoT devices and consensus nodes in the blockchain network, and stores the address information of the consensus nodes; the blockchain edge computing device includes a data processing module and a data uploading module; wherein, the data processing module is built based on a cryptographic chip; The data processing module is used to receive on-chain requests from registered and connected IoT devices, which contain on-chain data and key authorization codes corresponding to the IoT devices. Based on the key authorization codes, it determines the blockchain identity information corresponding to the IoT devices, calculates the hash value corresponding to the on-chain data using a hash algorithm, and generates on-chain information carrying the hash value and the blockchain identity information. The data processing module is also used to sign the on-chain information by calling the private key generated by the cryptographic chip based on the key authorization codes. The data upload module is used to send an upload request carrying the upload information and corresponding signature to the connected consensus node.