A high-speed online proxy service method, system and storage medium for Internet of Things terminals

By introducing a high-speed on-chain proxy device between the IoT terminal and the blockchain node, and using the MQTT protocol and encrypted tunnel to transmit data, the problem of excessive load on the blockchain node is solved, and high-speed on-chaining of IoT data is achieved.

CN114860743BActive Publication Date: 2025-09-16STATE GRID ANHUI ELECTRIC POWER CO LTD ELECTRIC POWER SCI RES INST +2
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202210467312.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-29
Publication Date
2025-09-16
Estimated Expiration
2042-04-29

AI Technical Summary

Technical Problem

Direct access of IoT terminals to blockchain nodes may cause excessive load on blockchain nodes, leading to the possibility of failure in uploading data to the chain.

Method used

A high-speed on-chain proxy device is used as an intermediary to communicate with blockchain nodes through the MQTT protocol and use encrypted tunnels to transmit data, ensuring that blockchain nodes maintain efficient operation.

Benefits of technology

It realizes high-speed on-chain uploading of IoT data, improves the speed of data on-chain uploading, reduces the load of blockchain nodes and network load, and avoids data on-chain failure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114860743B_ABST
    Figure CN114860743B_ABST
Patent Text Reader

Abstract

A high-speed on-chain proxy service method, system and storage medium for Internet of Things terminals belong to the field of Internet of Things and blockchain technology for power grid systems. The method solves the problem of Internet of Things terminals in power grid systems directly accessing blockchain nodes, which causes excessive load on blockchain nodes and leads to failure of Internet of Things data on-chain. The technical solution of the present invention uses a high-speed on-chain proxy device as a proxy for the connection between Internet of Things terminals and blockchain nodes to temporarily store data collected by Internet of Things terminals, and adopts the MQTT protocol to push data to blockchain nodes in a timely manner, ensuring that blockchain nodes always maintain the highest consensus efficiency and the Internet of Things data on-chain speed approaches the maximum throughput rate of the blockchain. The method uses an encrypted tunnel to transmit data instead of data encryption, which, while ensuring encrypted transmission, saves server performance overhead caused by data encryption and decryption, can further improve the data on-chain speed and achieve high-speed on-chain of Internet of Things terminal data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of Internet of Things and blockchain technology of power grid systems, and relates to a high-speed on-chain proxy service method, system and storage medium for Internet of Things terminals. Background Art

[0002] The development of "new infrastructure," exemplified by technologies like artificial intelligence, cloud computing, and blockchain, has injected new momentum into the high-quality development of the real economy. It has also laid a solid foundation for improving social governance and public services, and is focused on modernizing national governance. Blockchain, as the trusted infrastructure within this new infrastructure, is crucial for promoting the digitalization, networking, and intelligent transformation of industrial production, and for driving the transformation and high-quality socioeconomic development of our province.

[0003] State Grid Corporation of China attaches great importance to the research and application of emerging technologies. It launched blockchain-related technology research in 2017. Against the background of a comprehensive analysis of blockchain technology and development trends, and combined with the company's business development needs, in 2019, the Internet Department of State Grid Corporation of China took the lead in building a company-level blockchain public service platform, which is committed to solving blockchain application scenarios in various business areas of the headquarters and 27 provincial (municipal) companies, and promoting the large-scale and ecological development of blockchain technology in the energy and power fields.

[0004] To implement State Grid Corporation's strategic goal of building an "Energy Internet," focusing on diverse energy supply services, improving customer energy efficiency, optimizing energy consumption structures, interacting with grid supply and demand, and synergizing power generation, grid load, and storage, and promoting the company's transformation from an electricity supplier to a comprehensive energy service provider, Anhui Electric Power Co., Ltd. (hereinafter referred to as "Anhui Company") began building a provincial-level smart energy service platform in 2020. This platform promotes ubiquitous access, real-time sensing, intelligent computing, and optimized control of customer-side energy-consuming devices, thereby enabling smart energy use at the customer side and improving grid equipment utilization and overall energy efficiency. By the end of 2021, over 500 customer-side energy collection terminals will be connected through the company's external Internet of Things management platform, supporting customer energy management, energy efficiency management, intelligent operations and maintenance, and demand response services.

[0005] State Grid's current blockchain application landscape: Based on State Grid's 2021 technological innovation priorities and adhering to the principle of "purely internal applications not on-chain," blockchain applications are being considered for businesses involving external users. According to State Grid's blockchain architecture, the blockchain platform is deployed within the broader internet. Intranet applications cannot directly call API services to upload and query data, requiring data and messages to be transferred through the database, effectively reducing the security of the blockchain system.

[0006] The goal of the State Grid blockchain construction is to build a high-throughput data storage and on-chain service capability based on blockchain, and establish a trusted big data system for smart IoT: including application digital identity management services, on-chain metadata modeling and services, data evidence filtering and review, IoT data application priority management, data high-speed on-chain standard model, etc., to expand the State Grid chain's adaptation and service capabilities for massive smart IoT data, and realize scalable IoT data on-chain and storage services capabilities.

[0007] The high-throughput data chain storage service mainly establishes and builds high-throughput data storage chain service capabilities based on blockchain through chain middleware microservices, expands the State Grid Anhui Company's smart energy's trusted adaptation and service capabilities for the chain of data collected by massive IoT devices, and realizes the foundation of scalable massive data chain and storage services.

[0008] In the prior art, the Chinese invention patent application, "Method and System for Uploading IoT Terminal Data to a Blockchain Based on Blockchain," with publication number CN112487011A, discloses obtaining and processing raw IoT data, transmitting the processed data to a cloud platform for storage; performing a hash calculation on the processed data to obtain a hash value, and encapsulating the hash value into a transaction package; signing the transaction package with a private key in a trusted execution environment, where the private key is stored in an unreadable manner; and combining the signed transaction package with the public key and sending it to a blockchain cluster. In the present invention, the transaction package signature is separated from the packaging and transmission of the transaction package, and the private key is stored in an unreadable manner in the trusted execution environment, thus preventing the private key from being read or leaked.

[0009] The technical solution of this invention patent application addresses the existing technical flaw of the risk of private key leakage when uploading IoT terminal data to the blockchain. In existing IoT terminal data uploading systems, public and private keys are stored directly in the IoT terminal. Data collected by sensors is signed with the private key in the terminal device and then directly uploaded to the blockchain. However, this public and private key storage method has the disadvantage that if the terminal device is compromised, the private key will be immediately leaked. Therefore, the technical solution of this invention patent application designs a technical solution that uses private keys to sign transaction packages in a trusted execution environment, and the private keys are stored in an unreadable manner in the trusted execution environment.

[0010] However, the technical solution of this invention patent application focuses primarily on key management to reduce the risk of private key leakage. It does not address the possibility that direct access of IoT terminals to blockchain nodes could lead to excessive blockchain node and network loads when a large amount of IoT data is uploaded to the blockchain, causing the server to become unresponsive and data upload failures. Summary of the Invention

[0011] The purpose of the present invention is to design a high-speed on-chain proxy service method, system and storage medium for IoT terminals to solve the problem of IoT terminals in the power grid system directly accessing blockchain nodes, causing excessive load on blockchain nodes and leading to failure of IoT data on-chain.

[0012] The present invention solves the above technical problems through the following technical solutions:

[0013] A high-speed on-chain proxy service method for an Internet of Things terminal comprises the following steps:

[0014] S1. The IoT terminal collects raw data and transmits the collected data to the high-speed uplink agent device;

[0015] S2, the high-speed on-chain agent calculates the collected data summary;

[0016] S3. The high-speed on-chain proxy device, blockchain node, and IoT terminal run the MQTT protocol, with the high-speed on-chain proxy device as the broker, the blockchain node as the subscriber, and the IoT terminal as the publisher. An encrypted tunnel connection is established between the high-speed on-chain proxy device and the blockchain node.

[0017] S4, the high-speed on-chain agent distributes the collected data and data summary to the blockchain node through an encrypted tunnel;

[0018] S5. The blockchain node stores the received raw data in the database, saves the data summary on the chain, and establishes a data-summary mapping table.

[0019] The technical solution of the present invention uses a high-speed on-chain proxy device as a proxy for the connection between the Internet of Things terminal and the blockchain node, which is used to temporarily store the data collected by the Internet of Things terminal, and adopts the MQTT protocol to push data to the blockchain node in a timely manner, ensuring that the blockchain node always maintains the highest consensus efficiency and the Internet of Things data on-chain speed is close to the maximum throughput rate of the blockchain; it uses an encrypted tunnel to transmit data instead of data encryption, while ensuring encrypted transmission, saving the server performance overhead caused by data encryption and decryption, further improving the data on-chain speed, and realizing high-speed on-chain of Internet of Things terminal data.

[0020] Furthermore, the method for the IoT terminal in step S1 to collect raw data and transmit the collected data to the high-speed uplink agent is as follows: the IoT terminal collects raw data m periodically, adds a timestamp t to each data, adds a device identifier ioteq_id, and signs the message S O , package the original collected data message M o <m,t,ioteq_id,S O>, initiate a transaction on-chain request and transmit the message to the high-speed on-chain agent device via USB or serial port.

[0021] Furthermore, the method for calculating the collected data summary by the high-speed uplink agent in step S2 is specifically as follows:

[0022] The high-speed uplink agent receives the original collection data message M o <m,t,ioteq_id,S O >Followed by verification:

[0023] 1) Verify the message signature S O Is it correct?

[0024] 2) Verify the signature S O Whether the source corresponds to the device identifier eq_id;

[0025] If any of the above two checks fails, the message is considered illegal and will be ignored.

[0026] If both of the above checks are passed, the original collected data m is separated, the digest algorithm is used to calculate the digest d(m) of the original collected data, the device identifier broker_id is added, the message is signed SP, the message is sorted and numbered num, and the high-speed chain message M is packaged. P <m,d(m),t,broker id , S p ,num>.

[0027] Furthermore, the method for establishing an encrypted tunnel connection between the high-speed on-line proxy device and the blockchain node described in step S3 is as follows: the high-speed on-line proxy device obtains the IP and port of the blockchain node, and establishes a point-to-point encrypted tunnel connection with the blockchain node.

[0028] Furthermore, the specific method of the high-speed uplink agent in step S4 to distribute the collected data and data summary to the blockchain node through the uplink is as follows: Broker receives the Publisher message, processes the message, and encapsulates the good news M P ; Subscriber will request the broker to transmit data as needed according to its own processing queue situation; when the subscriber's consensus queue ConsensusQ is lower than the preset value, it will push the subscriber message to the broker and request the broker to push the message M P Then the broker pushes the message M to the Subscriber through the encrypted tunnel in the order of sorting numbers. P .

[0029] Furthermore, the blockchain node in step S5 stores the received raw data in the database, saves the data summary on the chain, and establishes a data-summary mapping table as follows:

[0030] The blockchain node receives message M P , separate the original collected data m and the summary of the collected data d(m), and use the PBFT algorithm to reach a consensus on the transaction chain request in the blockchain network;

[0031] If the PBFT consensus result is "failed", the transaction is deemed illegal and the on-chain request is discarded;

[0032] If the PBFT consensus result is "successful", the summary of the collected data d(m) is stored on the blockchain, and the block number Bn, block hash Bh, and transaction hash Th of the message are obtained;

[0033] The original collected data m is transferred to the data storage server and stored off-chain, and the database DB, table DT and number Ds where the original data is stored are recorded;

[0034] At the same time, a data-summary mapping table is maintained in the data storage server, and the corresponding relationship between d(m), Bn, Bh, Th and m, DB, DT, Ds is recorded in the table.

[0035] A high-speed on-link proxy service system adopting the high-speed on-link proxy service method for Internet of Things terminals comprises: a plurality of Internet of Things terminals, a high-speed on-link proxy device, and a blockchain node; the plurality of Internet of Things terminals communicate with the high-speed on-link proxy device via USB or Ethernet, and transmit the collected data to the high-speed on-link proxy device; at the same time, the high-speed on-link proxy device is connected to the Internet of Things terminals via a USB or Ethernet interface for downlink connection, and the high-speed on-link proxy device is connected to the blockchain node via at least one uplink; when working, the high-speed on-link proxy device synchronously processes the data transmitted from the plurality of Internet of Things terminals, sorts and temporarily stores the data, and then transmits the data to the blockchain node in sequence.

[0036] Furthermore, the uplink uses an encrypted channel for communication.

[0037] Furthermore, the high-speed uplink proxy device adopts a server host.

[0038] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the high-speed uplink proxy service method for an Internet of Things terminal.

[0039] The advantages of the present invention are:

[0040] (1) The technical solution of the present invention addresses the weakness of the existing power grid system in which the blockchain node load and network load are too high, causing the server to lose response and thus resulting in the possibility of data on-chain failure. A high-speed on-chain proxy device is used as a proxy for the connection between the IoT terminal and the blockchain node. The data collected by the IoT terminal can be temporarily stored, and the MQTT protocol is used to push data to the blockchain node in a timely manner, ensuring that the blockchain node always maintains the highest consensus efficiency. The data on-chain speed can be close to the maximum throughput rate of the blockchain.

[0041] (2) In view of the weakness of the existing technology that requires computer computing power to encrypt and decrypt data, when the amount of data is large, data encryption and decryption will further occupy the load of the blockchain node, resulting in a further decrease in the actual data upload speed, the encrypted tunnel is used to transmit data instead of data encryption. While ensuring encrypted transmission, the server performance overhead caused by data encryption and decryption can be saved, which can further improve the data upload speed and realize high-speed upload of IoT terminal data. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 This is a structural diagram of the high-speed uplink proxy service system for Internet of Things terminals according to the first embodiment of the present invention;

[0043] Figure 2 This is a flowchart of a high-speed uplink proxy service method for an Internet of Things terminal according to a first embodiment of the present invention. DETAILED DESCRIPTION

[0044] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0045] The technical solution of the present invention is further described below with reference to the accompanying drawings and specific embodiments:

[0046] Example 1

[0047] like Figure 1As shown, a high-speed on-chain proxy service system for IoT terminals includes: multiple IoT terminals applied to the power grid system, high-speed on-chain proxy devices, and blockchain nodes; multiple IoT terminals communicate with the high-speed on-chain proxy device via USB or Ethernet, and transmit the collected data to the high-speed on-chain proxy device. At the same time, the high-speed on-chain proxy device is connected to the IoT terminal through a USB or Ethernet interface for downlink connection, and the high-speed on-chain proxy device is connected to the blockchain node through at least one uplink; the uplink uses an encrypted channel for communication; when working, the high-speed on-chain proxy device needs to synchronously process data transmitted from multiple IoT terminals, sort and temporarily store the data, and then transmit it to the blockchain node on demand and in sequence.

[0048] The IoT terminal can be an embedded IoT terminal, which needs to be composed of CPU, memory, storage, communication module, internal bus and other devices. Its performance only needs to be able to process and forward the data collected by the source end, and does not require powerful computing performance.

[0049] The high-speed on-chain proxy device needs to be served by a server host with certain performance. It needs to be able to connect to multiple IoT terminals, process data incoming from multiple IoT terminals in parallel, temporarily store a certain amount of incoming data, and store and forward messages.

[0050] Blockchain nodes require powerful computing power and are typically hosted on high-performance servers. They are responsible for generating consensus on the uploaded data. When the consensus queue for a blockchain node falls below a certain value, indicating that the node load is about to decrease and that it can receive more data, a message is sent to a high-speed on-chain proxy (i.e., a broker) requesting data.

[0051] like Figure 2 As shown, a high-speed on-chain proxy service method for an Internet of Things terminal includes the following steps:

[0052] Step 1: The IoT terminal collects raw data and transmits the collected data to the high-speed chain agent device

[0053] The IoT terminal collects raw data m at a certain period, adds a timestamp t to each piece of data, adds the device identifier ioteq_id, and signs the message S O , package the original collected data message M o <m,t,ioteq_id,S O >, initiate a transaction on-chain request and transmit the message via USB or serial port to the high-speed on-chain proxy device.

[0054] Step 2: High-speed on-chain agent calculates the collected data summary

[0055] High-speed uplink agent receives M o, do the following verification:

[0056] 1. Verify the message signature S O Is it correct?

[0057] 2. Verify signature S O Whether the source corresponds to the device identifier eq_id.

[0058] If any of the above two checks fails, the message is considered illegal and will be ignored.

[0059] If both of the above checks are passed, the original collected data m is separated, and the digest algorithm (such as MD5, SHA1, SHA256, SHA512, SM3, etc.) is used to calculate the digest d(m) of the original collected data, add the device identifier broker_id, and sign the message S P , sort the messages by number num, and pack the high-speed chain message M P <m,d(m),t,broker id , S p ,num>.

[0060] Step 3: The high-speed on-chain agent device acts as an MQTT Broker, runs the MQTT protocol, and establishes an encrypted tunnel connection with the blockchain node.

[0061] The high-speed on-chain proxy device, blockchain node, and IoT terminal run the MQTT protocol, with the high-speed on-chain proxy device as the Broker, the blockchain node as the Subscriber, and the IoT terminal as the Publisher.

[0062] The high-speed on-chain proxy device obtains the blockchain node IP and port and establishes a point-to-point encrypted tunnel connection with the blockchain node.

[0063] Step 4: The high-speed on-chain agent distributes the collected data and data summary to the blockchain node through an encrypted tunnel.

[0064] Broker receives the message from Publisher, processes the message in steps 1 and 2, and then encapsulates the good news M P The Subscriber will request the broker to transmit data as needed according to its own processing queue situation. When the consensus queue ConsensusQ of the Subscriber (i.e. the blockchain node) is lower than the preset value, it will push the subscribe message to the broker and request the broker to push the message M P Then the broker pushes the message M to the Subscriber through the encrypted tunnel in the order of sorting numbers. P .

[0065] Step 5: The blockchain node stores the received raw data in the database, saves the data summary on the chain, and establishes a data-summary mapping table

[0066] The blockchain node receives message M P , separate the original collected data m and the summary of the collected data d(m), and use the PBFT algorithm to reach a consensus on the transaction chain request in the blockchain network.

[0067] If the PBFT consensus result is "failed", the transaction is deemed illegal and the on-chain request is discarded.

[0068] If the PBFT consensus result is "successful," the summary of the collected data, d(m), is stored on the blockchain. The block number Bn, block hash Bh, and transaction hash Th of the message are obtained. The original collected data, m, is transmitted to the data storage server and stored off-chain. The database DB, table DT, and number Ds where the original data is stored are recorded.

[0069] At the same time, a data-summary mapping table is maintained in the data storage server, and the corresponding relationship between d(m), Bn, Bh, Th and m, DB, DT, Ds is recorded in the table.

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

Claims

1. A high-speed on-chain proxy service method for an Internet of Things terminal, characterized in that: Applied to the power grid system, the following steps are included: S1. The IoT terminal collects raw data and transmits the collected data to the high-speed chain agent device; the specific method is as follows: The IoT terminal collects raw data periodically , add a timestamp to each piece of data , add device identifier , sign the message , package the original collected data message , initiate a transaction on-chain request and transmit the message to the high-speed on-chain proxy device via USB or serial port; S2. The high-speed on-chain agent calculates the collected data summary. The specific method is as follows: The high-speed uplink agent receives the original collected data message Then perform verification: 1) Verify the message signature Is it correct? 2) Verify the signature Is the source related to the device identifier? correspond; If any of the above two checks fails, the message is considered illegal and will be ignored. If both of the above checks are passed, the original collected data is separated , use the summary algorithm to calculate the summary of the original collected data , add device identifier , sign the message , sort the messages by number , package high-speed chain messages ; S3. The high-speed on-chain proxy device, blockchain node, and IoT terminal run the MQTT protocol, with the high-speed on-chain proxy device as the broker, the blockchain node as the subscriber, and the IoT terminal as the publisher. An encrypted tunnel connection is established between the high-speed on-chain proxy device and the blockchain node. The method for establishing an encrypted tunnel connection between the high-speed on-chain proxy device and the blockchain node is specifically as follows: the high-speed on-chain proxy device obtains the blockchain node IP and port, and establishes a point-to-point encrypted tunnel connection with the blockchain node; S4. The high-speed on-chain agent distributes the collected data and data summary to the blockchain node through an encrypted tunnel. The specific method is as follows: Broker receives Publisher messages, processes them, and then encapsulates the good news. ;Subscriber will request the broker to transmit data as needed according to its own processing queue situation; when the consensus queue of Subscriber When it is lower than the preset value, the subscriber message is pushed to the broker, requesting the broker to push the message Then the broker pushes messages to the Subscriber through the encrypted tunnel in the order of sorting numbers. ; S5. The blockchain node stores the received raw data in the database, saves the data summary on the chain, and establishes a data-summary mapping table.

2. The method for providing high-speed on-link proxy services for Internet of Things terminals according to claim 1, characterized in that: The blockchain node in step S5 stores the received raw data in the database, saves the data summary on the chain, and establishes the data-summary mapping table as follows: The blockchain node receives the message , separate the original collected data and a summary of the collected data , the PBFT algorithm is used in the blockchain network to reach consensus on the transaction request; If the PBFT consensus result is "failed", the transaction is deemed illegal and the on-chain request is discarded; If the PBFT consensus result is "successful", the summary of the collected data will be Stored on the blockchain, get the block number of the message on the chain , block hash , transaction hash ; The original collected data Transfer to the data storage server, save it off-chain, and record the database where the original data is saved ,surface and number ; At the same time, a data-summary mapping table is maintained in the data storage server, and the table records and The corresponding relationship.

3. A high-speed uplink proxy service system using the high-speed uplink proxy service method for an Internet of Things terminal according to any one of claims 1-2, characterized in that: include: Multiple IoT terminals, high-speed on-chain proxy devices, and blockchain nodes; Multiple IoT terminals communicate with the high-speed chain proxy device via USB or Ethernet, and transmit the collected data to the high-speed chain proxy device. At the same time, the high-speed chain proxy device is connected to the IoT terminal through the USB or Ethernet interface for downlink connection, and the high-speed chain proxy device is connected to the blockchain node through at least one uplink; when working, the high-speed chain proxy device synchronously processes the data from multiple IoT terminals, sorts and temporarily stores the data, and then transmits it to the blockchain node in sequence.

4. The high-speed on-link proxy service system according to claim 3, characterized in that: The uplink uses an encrypted channel for communication.

5. The high-speed on-link proxy service system according to claim 3, characterized in that: The high-speed uplink agent device adopts a server host.

6. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the steps of the Internet of Things terminal high-speed uplink proxy service method according to any one of claims 1 to 2 are implemented.

Citation Information

Patent Citations

  • Internet-of-things terminal data chaining method and system based on blockchain

    CN112487011A

  • Method and device for data processing based on block chain

    CN107426170A

  • Intelligent cloud gateway of industrial IoT (Internet of Things) and communication method of gateway

    CN109150703A

  • KR20200063959A