Data transmission method, device and system based on block chain

By adopting a blockchain-based method in data transmission, data is verified and converted and putting it on the chain, the data credibility and security issues are solved, data integrity and immutability are achieved, and the credibility and efficiency of data transmission are improved.

CN120074847APending Publication Date: 2025-05-30SF TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311626741.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-30
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

The credibility issues of data in the prior art include unclear data sources, difficult data integrity, and difficult data traceability, which leads to the inability to accurately judge the credibility and security of data.

Method used

The blockchain-based data transmission method is adopted, and by receiving gateway data and verifying and authenticating, it is converted into trusted data, and then the uplink port of the blockchain network is called for the uplink processing to ensure the integrity, transparency and immutability of the data.

Benefits of technology

Improves the credibility and security of data, ensures data integrity and immutability, supports data sharing and access control across organizations, and provides a trusted data exchange platform.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120074847A_ABST
    Figure CN120074847A_ABST
Patent Text Reader

Abstract

The invention discloses a data transmission method, device and system based on a block chain, and the method comprises the steps: receiving gateway data, and carrying out the verification and authentication of the gateway data; converting the verified and authenticated gateway data to obtain trusted data; and calling a corresponding uplink interface according to the trusted data so as to perform uplink processing on the trusted data through the uplink interface. The method is used for solving the data credibility problem possibly occurring after the data gateway receives the data, meanwhile, the data gateway ensures the integrity, transparency and non-tampering property of the data by utilizing a block chain technology, so that the credibility and security of the data are improved, the credible data gateway can effectively verify the source of the data, and the security of the data is improved. And the integrity and traceability of the data in the transmission and storage process are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data transmission, and particularly to a data transmission method, device and system based on blockchain. Background Art

[0002] With the increasing importance of data, the data gateway, as a key node for data exchange, is used to receive, process and forward data. However, after receiving data, the data gateway may face problems regarding the credibility of the data. For example, the source of the data may be unclear, the integrity of the data may be tampered with, and it may be difficult to trace the data, etc., making it impossible to accurately judge the credibility and securely access the transmitted data.

[0003] Therefore, there is an urgent need for a method that can ensure the integrity, transparency and immutability of data, thereby improving the credibility and security of data. Summary of the Invention

[0004] The present invention provides a data transmission method, device and system based on blockchain to solve the technical problems in the prior art that data is untrustworthy and it is impossible to ensure the integrity, transparency and immutability of data.

[0005] To solve the above technical problems, an embodiment of the present invention provides a data transmission method based on blockchain, including:

[0006] Receiving gateway data, and verifying and authenticating the gateway data;

[0007] Converting the verified and authenticated gateway data to obtain trusted data;

[0008] Invoking a corresponding on-chain interface according to the trusted data, and thereby performing on-chain processing on the trusted data through the on-chain interface.

[0009] In some embodiments, the step of receiving gateway data and verifying and authenticating the gateway data specifically includes:

[0010] Receiving gateway data through data gateways adopting various transmission protocols;

[0011] Verifying and authenticating the gateway data according to a two-way certificate verification and Secure Sockets Layer (SSL) encrypted transmission mechanism to obtain first gateway data;

[0012] Performing hash verification detection on the first gateway data, and thereby using the first gateway data that passes the hash verification detection as legitimate gateway data; wherein, the first gateway data includes a data format for hash verification fields.

[0013] The conversion of the verified and authenticated gateway data to obtain trusted data specifically includes:

[0014] Sending the legitimate gateway data to the real-time processing engine so that the real-time processing engine converts the legitimate gateway data to obtain trusted data.

[0015] In some embodiments, the receiving of the gateway data and the verification and authentication of the gateway data specifically include:

[0016] When the data volume of the received gateway data is greater than a preset value, caching the gateway data in a message queue so that the threads in the message queue scheduling thread pool perform verification and authentication processing on the gateway data; wherein, the scheduling thread pool is set in the message queue.

[0017] In some embodiments, the sending of the legitimate gateway data to the real-time processing engine and the conversion of the legitimate gateway data to obtain trusted data specifically include:

[0018] Sending the legitimate gateway data to the real-time processing engine through a message queue so that the real-time processing engine converts the legitimate gateway data to obtain a data object to be processed;

[0019] Performing standardization processing on the data object to be processed to obtain standardized trusted data; wherein, the standardized trusted data includes data source content, data source identity information, and a timestamp.

[0020] In some embodiments, the calling of the on-chain interface of the corresponding blockchain network according to the trusted data, thereby transmitting the trusted data to the blockchain network through the on-chain interface, specifically includes:

[0021] Performing hash calculation on the trusted data to obtain a hash value corresponding to each trusted data;

[0022] Calling the on-chain interface of the corresponding blockchain network according to the trusted data, and using the hash values of the trusted data as transaction information between the trusted data and the blockchain network;

[0023] Writing the transaction information into the contract of the blockchain network, and according to the written transaction information, through the on-chain interface, transmitting the corresponding trusted data to the target block of the blockchain network; wherein, the blockchain network includes a number of blocks for storing data and a contract for writing transaction information.

[0024] In some embodiments, the blockchain network further includes a number of Peer nodes; the step of writing the transaction information into a contract of the blockchain network and, according to the written transaction information, transmitting corresponding trusted data to a target block of the blockchain network through the on-chain interface specifically includes:

[0025] Connect the real-time processing engine and the Peer nodes in the blockchain network through the on-chain interface, and after connection, call the corresponding chain code. After querying or updating the chain code, the Peer nodes return a proposal response to the real-time processing engine according to the queried or updated chain code;

[0026] Generate a transaction sequence of the trusted data according to the proposal response, and send the transaction sequence to the Peer nodes, so as to update the contract in the blockchain network according to the transaction sequence, and further transmit the corresponding trusted data to the transaction sequence in the target block; wherein, the transaction sequence includes sorted transaction information and corresponding trusted data;

[0027] After completing the update of the contract and block in the blockchain network, generate a ledger update event and save it in the real-time processing engine.

[0028] In some embodiments, the receiving of the gateway data includes:

[0029] Determine the target data source type of the gateway data;

[0030] According to the mapping relationship between the preset data source type and the transmission protocol, determine the target transmission protocol corresponding to the target data source type;

[0031] Based on the target transmission protocol, receive the gateway data through the data gateway.

[0032] Correspondingly, the present invention further provides a blockchain-based data transmission device, including: a gateway module, a conversion module, and a transmission module;

[0033] The gateway module is configured to receive gateway data and perform verification and authentication on the gateway data;

[0034] The conversion module is configured to convert the gateway data after verification and authentication to obtain trusted data;

[0035] The transmission module is configured to call a corresponding on-chain interface according to the trusted data, so as to perform on-chain processing on the trusted data through the on-chain interface.

[0036] In some embodiments, the gateway module includes: a receiving sub-module, a verification sub-module, and a hashing sub-module;

[0037] The receiving sub-module is used to receive gateway data through data gateways adopting various transmission protocols;

[0038] The verification sub-module is used to verify and authenticate the gateway data according to the two-way certificate check and the secure socket layer encryption transmission mechanism, so as to obtain the first gateway data;

[0039] The hashing sub-module is used to perform hashing check detection on the first gateway data, so as to use the first gateway data that passes the hashing check detection as legal gateway data; wherein, the first gateway data includes the data format for the hashing check field.

[0040] The conversion module is specifically used to send the legal gateway data to the real-time processing engine, so that the real-time processing engine converts the legal gateway data to obtain trusted data.

[0041] In some embodiments, the gateway module is specifically further used for:

[0042] When the data volume of the received gateway data is greater than a preset value, cache the gateway data into the message queue, so that the threads in the message queue scheduling thread pool perform verification and authentication processing on the gateway data; wherein, the scheduling thread pool is arranged in the message queue.

[0043] In some embodiments, the conversion module includes: a conversion sub-module and a standard sub-module;

[0044] The conversion sub-module is used to send the legal gateway data to the real-time processing engine through the message queue, so that the real-time processing engine converts the legal gateway data to obtain a data object to be processed;

[0045] The standard sub-module is used to perform standardization processing on the data object to be processed to obtain standardized trusted data; wherein, the standardized trusted data includes data source content, data source identity information, and a timestamp.

[0046] In some embodiments, the transmission module includes: a calculation sub-module, a transaction sub-module, and a contract sub-module;

[0047] The calculation sub-module is used to perform hashing calculation on the trusted data, so as to obtain the hash value corresponding to each trusted data;

[0048] The transaction sub-module is used to call the on-chain interface of the corresponding blockchain network according to the trusted data, and use the hash value of each trusted data as the transaction information between each trusted data and the blockchain network;

[0049] The contract sub-module is used to write the transaction information into the contract of the blockchain network, and according to the written transaction information, through the on-chain interface, transmit the corresponding trusted data to the target block of the blockchain network; wherein, the blockchain network includes several blocks for storing data and contracts for writing transaction information.

[0050] In some embodiments, the blockchain network further includes several Peer nodes; the contract sub-module includes: a response unit, a sorting unit, and an update unit;

[0051] The response unit is used to connect the real-time processing engine and the Peer nodes in the blockchain network through the on-chain interface, and after the connection, call the corresponding chain code, so that after querying or updating the chain code, the Peer nodes return a proposal response to the real-time processing engine according to the queried or updated chain code;

[0052] The sorting unit is used to generate a transaction sequence of the trusted data according to the proposal response, and send the transaction sequence to the Peer nodes, so as to update the contract in the blockchain network according to the transaction sequence, and then transmit the corresponding trusted data to the transaction sequence in the target block; wherein, the transaction sequence includes sorted transaction information and corresponding trusted data;

[0053] The update unit is used to generate a ledger update event after completing the update of the contract and block in the blockchain network, and save it to the real-time processing engine.

[0054] In some embodiments, the gateway module is further used for:

[0055] Determine the target data source type of the gateway data;

[0056] According to the mapping relationship between the preset data source type and the transmission protocol, determine the target transmission protocol corresponding to the target data source type;

[0057] Based on the target transmission protocol, receive the gateway data through the data gateway.

[0058] Correspondingly, the present invention also provides a blockchain-based data transmission system, which is characterized in that it includes: a data gateway, a real-time module, and a blockchain network; the data gateway is connected to the real-time module, and the real-time module is connected to the blockchain network through an on-chain interface;

[0059] The data gateway is a gateway including several transmission protocols, and is used to receive the gateway data sent by the data source, and verify and authenticate the sent gateway data;

[0060] The real-time module is used to send the verified and authenticated gateway data to the real-time processing engine, and convert the gateway data into trusted data; call the on-chain interface of the corresponding blockchain network according to the trusted data, so as to transmit the trusted data to the blockchain network through the on-chain interface;

[0061] The blockchain network includes a number of Peer nodes and a number of blocks connected to the Peer nodes through channels, and each Peer node includes a contract executed by it.

[0062] Correspondingly, the present invention also provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, the data transmission method based on the blockchain described in any one of the above is implemented.

[0063] Correspondingly, the present invention also provides a computer-readable storage medium, which includes a stored computer program. When the computer program runs, it controls the device where the computer-readable storage medium is located to execute the data transmission method based on the blockchain described in any one of the above.

[0064] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0065] The technical solution of the present invention can judge the trustworthiness of the received gateway data by receiving the gateway data and performing verification and authentication, so as to ensure the possible data trustworthiness problem after the data gateway receives the data. After converting the gateway data into trusted data, it ensures that the data formats of different data sources are consistent, avoids the writing of tampered data, and can thus call the on-chain interface of the corresponding blockchain network, and then transmit the trusted data to the blockchain network through the on-chain interface, so as to ensure the integrity, transparency and immutability of the data by using the trusted data gateway and blockchain technology, thereby improving the credibility and security of the data;

[0066] Furthermore, the trusted data gateway can effectively verify the source of the data, and write the transaction information into the contract of the blockchain network to ensure the integrity and traceability of the data during transmission and storage. The trusted data gateway also supports cross-organization data sharing and access control, can conform to the data sent by several different protocol gateways, provides a trusted data exchange platform for all parties, and improves the transmission efficiency of data from different sources. BRIEF DESCRIPTION OF THE DRAWINGS

[0067] Figure 1 : A step flowchart of a data transmission method based on the blockchain provided by the embodiments of the present invention;

[0068] Figure 2 : Schematic diagram of data uploading according to an embodiment of the present invention;

[0069] Figure 3 : Structural diagram of a data transmission device based on a blockchain according to an embodiment of the present invention;

[0070] Figure 4 : Schematic structural diagram of a data transmission system based on a blockchain according to an embodiment of the present invention. Detailed implementation manners

[0071] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0072] Embodiment 1

[0073] Please refer to Figure 1 , an embodiment of the present invention provides a data transmission method based on a blockchain, including the following steps S101 - S103:

[0074] Step S101: Receive gateway data, and verify and authenticate the gateway data.

[0075] In some embodiments, the receiving gateway data and verifying and authenticating the gateway data specifically include:

[0076] Receive gateway data through a data gateway adopting various transmission protocols; verify and authenticate the gateway data according to a two-way certificate verification and Secure Socket Layer (SSL) encryption transmission mechanism to obtain first gateway data; perform a hash check on the first gateway data, and use the first gateway data passing the hash check as legal gateway data; wherein, the first gateway data includes a data format for a hash check field.

[0077] In some embodiments, the receiving gateway data includes:

[0078] Determine the target data source type of the gateway data; determine the target transmission protocol corresponding to the target data source type according to the mapping relationship between the preset data source type and the transmission protocol; receive the gateway data through the data gateway based on the target transmission protocol.

[0079] In some embodiments, gateway data corresponds to a data importance level, and the Secure Sockets Layer (SSL) encryption transmission mechanism corresponds to multiple security levels. Thus, for gateway data with different data importance levels, different security levels of the SSL encryption transmission mechanism can be used for encrypted transmission. Moreover, the data importance level and the security level are in a positive correlation, thereby making the encrypted transmission of gateway data more targeted and secure. Further, the data importance level can be divided according to the data source type of the gateway data, or according to the business scenario type of the gateway data, or according to the user level corresponding to the user to whom the gateway data belongs. That is to say, the data importance level can be determined according to at least one of the data source type, the business scenario type, and the user level corresponding to the user to whom the gateway data belongs.

[0080] In some embodiments, the data gateway serves as the entry point for data and communicates with the data source using common protocols such as HTTP, TCP, and MQTT. At the same time, a two-way certificate verification and SSL encryption transmission mechanism is used to verify and authenticate the data. During the data reception process, the data gateway verifies the legality, integrity, and identity information of the data to ensure that only legitimate data can be transmitted to the real-time processing engine through the message queue. Among them, the legality of the data is detected through hash verification.

[0081] Further, the data gateway, as the entry point for data, is responsible for receiving data from the data source. To communicate with the data source, the data gateway adopts common protocols such as HTTP, TCP, and MQTT, and these protocols provide a reliable data transmission mechanism to ensure that data can be accurately transmitted from the data source to the data gateway. At the same time, to ensure the security of the data, the data gateway adopts a two-way certificate verification and SSL encryption transmission mechanism. Among them, the two-way certificate verification can verify the identities of both communication parties and prevent man-in-the-middle attacks. The SSL encryption transmission mechanism can protect the confidentiality of the data and prevent the data from being stolen or tampered with during transmission. During the data reception process, the data gateway verifies and authenticates the data. That is, first, it verifies the legality of the data, checks whether the data conforms to the data format specified by the gateway, and contains a hash verification field, so as to ensure that the received data is transmitted in the expected format. Second, it verifies the integrity of the data, that is, checks whether the data has been tampered with or lost during transmission. Finally, it verifies the identity information of the data to ensure that only legitimate data can be transmitted to the real-time processing engine through the message queue.

[0082] It is understandable that this preferred embodiment adopts a two-way certificate verification and SSL encrypted transmission mechanism to ensure the security of data during transmission, prevent man-in-the-middle attacks and data leakage. By verifying and authenticating the legality, integrity and identity information of the data, it ensures that only legitimate data can be transmitted to the real-time processing engine, improving the quality and reliability of the data. In addition, common protocols such as HTTP, TCP and MQTT are used for communication, providing an efficient data transmission mechanism and accelerating the data transmission speed and processing efficiency.

[0083] In some embodiments, through the mechanism of two-way certificate verification and SSL encrypted transmission, the mutual authentication of both parties and the confidentiality of communication data are achieved, enabling the data source and the data gateway to mutually verify the legitimacy of each other and ensuring the authenticity of the identities of both parties. At the same time, through encrypted communication, the confidentiality of the data during the communication process is protected, preventing the data from being eavesdropped or tampered with. This mechanism plays an important role in realizing the security and credibility of network communication. It is understandable that SSL encrypted transmission is commonly used in scenarios such as secure web browsing (HTTPS), email transmission (such as SMTPS, POPS, IMAPS), virtual private network (VPN), etc., which can prevent data from being eavesdropped, tampered with or forged, providing a more secure communication environment.

[0084] In some embodiments, receiving the gateway data and verifying and authenticating the gateway data specifically includes:

[0085] When the data volume of the received gateway data is greater than a preset value, cache the gateway data into the message queue so that the threads in the message queue scheduling thread pool can perform verification and authentication processing on the gateway data; wherein, the scheduling thread pool is set in the message queue.

[0086] In some embodiments, when the gateway receives a large amount of data of different protocols, it will be cached into the in-memory message queue and the threads in the scheduling thread pool will be used to process them separately, enabling the gateway to efficiently process a large amount of data from different protocols. Caching the data into the message queue can relieve the pressure during peak hours, while using the thread pool can process multiple data in parallel, improving the processing efficiency.

[0087] Furthermore, to improve the processing efficiency and stability, the gateway will cache the received data into the message queue in the memory. The message queue is a first-in-first-out data structure used to temporarily store data for subsequent processing. At the same time, to efficiently process a large amount of data, the gateway will use a thread pool to manage a group of pre-created threads. When the data is cached into the message queue, the gateway will schedule idle threads from the thread pool to process this gateway data.

[0088] In some embodiments, the above method may further include: when the amount of gateway data received is greater than a preset value, counting the number of gateway data of different data source types to determine target gateway data; the target gateway data is gateway data whose data volume meets the preset data volume condition; caching the gateway data into a message queue so that the target threads in the message queue scheduling thread pool perform verification and authentication processing on the target gateway data; the proportion of the number of target threads in the thread pool meets the preset proportion condition; the preset data volume condition may be that the data volume is greater than a preset data volume, for example, it may be the largest data volume; the preset proportion condition may be that the proportion is greater than a preset proportion, for example, it may be greater than 80%, 85% or other proportion values. Thus, in this embodiment, when there is a large amount of gateway data of a certain data source type, most threads in the thread pool can be scheduled to process the gateway data of this data source type, improving the scheduling flexibility of the thread pool while alleviating the data processing pressure.

[0089] Step S102: Convert the verified and authenticated gateway data to obtain trusted data.

[0090] The conversion of the verified and authenticated gateway data to obtain trusted data specifically includes:

[0091] Send the legitimate gateway data to the real-time processing engine so that the real-time processing engine converts the legitimate gateway data to obtain trusted data.

[0092] In some embodiments, the sending of the legitimate gateway data to the real-time processing engine and the conversion of the legitimate gateway data to obtain trusted data specifically include:

[0093] Send the legitimate gateway data to the real-time processing engine through the message queue so that the real-time processing engine converts the legitimate gateway data to obtain a data object to be processed;

[0094] Perform standardization processing on the data object to be processed to obtain standardized trusted data; wherein, the standardized trusted data includes data source content, data source identity information, and timestamp.

[0095] It should be noted that as a data consumer, the real-time processing engine obtains data from the message queue in real time and performs further processing and archiving. The real-time processing engine adopts streaming processing technology and can efficiently process a large amount of data streams. It is responsible for converting the received data into a trusted data object and calling the on-chain interface of the blockchain network to perform the on-chain archiving operation.

[0096] In some embodiments, the legal gateway data after verification and authentication is sent by the message queue to the real-time processing engine, and then the legal gateway data is converted into a data object to be processed. Thus, the real-time processing engine performs data conversion and standardization on the data object to be processed. The real-time processing engine converts the received legal data into a trusted data object and standardizes the data to ensure that the data formats of different data sources are consistent, so as to avoid the situation of data uploading errors due to different data formats when the data is subsequently uploaded to the blockchain. The standardized data object includes, but is not limited to, data content, data source identity information, timestamp, etc.

[0097] Step S103: Invoke the corresponding blockchain interface according to the trusted data, and thus perform the blockchain uploading process on the trusted data through the blockchain interface.

[0098] In some embodiments, the step of invoking the blockchain interface of the corresponding blockchain network according to the trusted data, and thus performing the blockchain uploading process on the trusted data through the blockchain interface, specifically includes:

[0099] Perform a hash calculation on the trusted data to obtain the hash value corresponding to each trusted data;

[0100] Invoke the blockchain interface of the corresponding blockchain network according to the trusted data, and use the hash values of the trusted data as the transaction information between the trusted data and the blockchain network;

[0101] Write the transaction information into the contract of the blockchain network, and according to the written transaction information, transmit the corresponding trusted data to the target block of the blockchain network through the blockchain interface; wherein, the blockchain network includes a number of blocks for storing data and a contract for writing transaction information.

[0102] In some embodiments, the real-time processing engine performs a hash calculation on the data object to generate the unique hash value of the trusted data. The hash value is used to ensure the integrity of the trusted data, and any tampering with the data will cause a change in the hash value. Then, the corresponding blockchain interface is invoked through the calculated hash value, so that the hash values of the trusted data are used as the transaction information of the blockchain network, and at the same time, the transaction information is written into the contract of the blockchain network, so that the corresponding trusted data can be transmitted to the block of the blockchain network through the blockchain interface through the written transaction information, so as to perform the operation of data uploading to the blockchain.

[0103] It should be noted that the processing engine calls the on-chain interface of the blockchain network to send the hash value of the data to the blockchain network for the operation of storing evidence on the chain. The on-chain interface interacts with the blockchain network through a contract, packs the hash value of the data into a transaction, and writes the transaction into the blockchain. Blockchain data is stored on a decentralized public ledger, where each block is linked together using cryptography and has a timestamp and the identifier of the previous block. The data stored on the blockchain cannot be changed or deleted, ensuring the security and immutability of the data.

[0104] Furthermore, the processing engine calls the on-chain interface of the blockchain network to send the hash value of the data to the blockchain network for the operation of storing evidence on the chain. First, the processing engine calculates the hash value of the data to be stored as evidence and sends the hash value to the blockchain network through the on-chain interface. The on-chain interface is an interface that interacts with the blockchain network and uses a contract to perform corresponding operations. A contract is a piece of pre-written code used to define and execute specific business logic. In this preferred embodiment, the contract is responsible for packing the hash value of the data into a transaction and writing the transaction into the blockchain. A transaction is the basic unit in the blockchain, which contains the operations to be executed and the relevant data. The blockchain is a decentralized public ledger composed of multiple nodes, and each node stores the complete blockchain data. When a transaction is written into the blockchain, it will be broadcast to all nodes and verified and confirmed by a consensus algorithm. Once the transaction is confirmed, it will be packed into a block and linked to the previous block using cryptography. In this way, each block contains a certain number of transaction records and the data in it cannot be changed or deleted.

[0105] It should be noted that the real-time processing engine saves the relevant information of the data object and the evidence storage transaction (such as transaction hash, block height, evidence storage time, etc.) to the local database, and this information can be used for subsequent data traceability and auditing.

[0106] It can be understood that due to the decentralized characteristics of the blockchain and the application of cryptography methods, the data stored on the blockchain has a high degree of security and immutability. Any modification to the data requires modifying the entire blockchain, which is almost impossible, thus ensuring the immutability of the data. In addition, the transaction records on the blockchain are publicly visible and anyone can view and verify them. This transparency makes data traceability simple and credible, helping to prevent fraud and improper operations. At the same time, traditional centralized systems usually need to establish a trust relationship to conduct data exchange and sharing. Through blockchain technology, participants can directly conduct data exchange without trusting a third-party institution or intermediary, reducing the trust cost and risk.

[0107] In some embodiments, gateway data is received and the gateway data is verified and authenticated, including: receiving gateway data through a data gateway, and after verifying and authenticating the gateway data, transmitting the verified and authenticated gateway data to a real-time processing engine;

[0108] The verified and authenticated gateway data is converted to obtain trusted data, including:

[0109] Converting the verified and authenticated gateway data through a real-time processing engine to obtain trusted data;

[0110] According to the trusted data, a corresponding on-chain interface is called, so as to perform on-chain processing on the trusted data through the on-chain interface, including:

[0111] According to the trusted data, a corresponding on-chain interface in the blockchain network is called through a real-time processing engine, so as to perform on-chain processing on the trusted data through the on-chain interface. Optionally, there is a corresponding relationship between the data type of the trusted data and the on-chain interface, that is to say, trusted data of different data types corresponds to different on-chain interfaces, and a specific on-chain interface is used to correspond to trusted data of a specific data type; alternatively, there is a corresponding relationship between the data importance level of the gateway data corresponding to the trusted data and the on-chain interface.

[0112] In some embodiments, according to the trusted data, a corresponding on-chain interface in the blockchain network is called through a real-time processing engine, so as to perform on-chain processing on the trusted data through the on-chain interface, including: determining the data importance level of the gateway data corresponding to the trusted data; according to the data importance level, calling an on-chain interface with a corresponding interface performance level in the blockchain network through a real-time processing engine, so as to perform on-chain processing on the trusted data through the on-chain interface; the data importance level and the interface performance level are in a positive correlation relationship, that is to say, if the data importance level of the gateway data corresponding to the trusted data is higher, the interface performance level of the called on-chain interface is also higher; the interface performance level can characterize interface performances such as the data carrying capacity, data processing efficiency, and security level of the on-chain interface.

[0113] In some embodiments, the blockchain network further includes a plurality of Peer nodes; writing the transaction information into the contract of the blockchain network, and according to the written transaction information, transmitting the corresponding trusted data to the target block of the blockchain network through the on-chain interface, specifically including:

[0114] Connect the real-time processing engine and the Peer nodes in the blockchain network through the above chain interface, and call the corresponding chain code after the connection. After querying or updating the chain code, the Peer nodes return a proposal response to the real-time processing engine according to the queried or updated chain code; generate a transaction sequence of the trusted data according to the proposal response, and send the transaction sequence to the Peer nodes, so as to update the contract in the blockchain network according to the transaction sequence, and then transmit the corresponding trusted data to the transaction sequence in the target block; wherein, the transaction sequence includes sorted transaction information and corresponding trusted data; after completing the update of the contract and block in the blockchain network, generate a ledger update event and save it in the real-time processing engine.

[0115] In some embodiments, Peer nodes are the basic components of a blockchain network. Each Peer node holds one or more ledgers and one or more contracts. Among them, the ledger records the transactions generated or updated by the contract. In this embodiment, since the transaction sequence has been generated by the real-time processing engine in advance, the contracts in the Peer nodes can directly update each transaction information in the transaction sequence. All ledger queries and ledger modifications can be operated through chain codes, and all chain code operations can be invoked through Peer nodes. A block is the basic unit of a blockchain. Each block contains a set of trusted data corresponding to transaction information and a hash value pointing to the previous block. It should be noted that whenever new transaction information is generated through the contract of a Peer node, a new target block can be generated according to the transaction information, so that the corresponding trusted data is stored in the target block. The new target block will be verified by one or more Peer nodes. Once the verification passes, the block will be added to the blockchain maintained by the Peer nodes.

[0116] In some embodiments, please refer to Figure 2 , which is a schematic diagram of data on-chain. The blockchain network is mainly composed of a series of Peer nodes. Peer nodes are the foundation of the entire blockchain network, and Peer nodes are the carriers of ledgers and contracts. Through the contract, the ledger records the whole process of transactions in an immutable way. Among them, Flink Application is the real-time processing engine in this embodiment, ChainCode is the module related to the code chain, Ledger is the ledger in the blockchain, and Orderer is the sorter, which is a component used to sort and package transactions in the blockchain. It should be noted that blockchain networks, such as Ethereum, Hyperledger, etc., support the deposit of data and the recording of transactions. Setting corresponding nodes and verification mechanisms in the network can ensure the security and reliability of the network.

[0117] Further, by connecting the processing engine and the blockchain network, that is, connecting the processing engine and the Peer nodes in the blockchain network through the connection port, and invoking the chaincode for query or update. After the connection, the processing engine will invoke the corresponding chaincode to perform query or update operations on the blockchain, so that the Peer nodes return proposal responses. After querying or updating the chaincode, the Peer nodes will generate proposal responses according to the execution results of the chaincode and return them to the real-time processing engine. Furthermore, the real-time processing engine will sort the trusted data and transaction information through the proposal responses, generate a transaction sequence and send it to the Peer nodes. The contract update in the blockchain network is realized by the received transaction sequence in the blockchain network, and then the corresponding trusted data is transmitted to the target block, so that the target block stores the trusted data or updates the original stored data with the trusted data. After completing the contract update in the blockchain network and the storage or update of the trusted data in the target block, a ledger update event is generated and sent and saved to the real-time processing engine.

[0118] It can be understood that based on the interaction process between the real-time processing engine and the blockchain network, through the invocation of the chaincode and the update of the transaction sequence, the query and data update operations of the blockchain network are realized, and the updated results are saved to the real-time processing engine, which can ensure the trusted and accurate transmission of data between the real-time processing engine and the blockchain network.

[0119] Implementing the above embodiments has the following effects:

[0120] The technical solution of the present invention can judge the trustworthiness of the data access of the received gateway data by receiving, verifying and authenticating the gateway data, thus ensuring the possible data trustworthiness problems after the data gateway receives the data. After converting the gateway data into trusted data, the data formats of different data sources are ensured to be consistent, and the writing of tampered data is avoided. Therefore, the on-chain interface of the corresponding blockchain network can be invoked, and then the trusted data is transmitted to the blockchain network through the on-chain interface, so as to ensure the integrity, transparency and immutability of the data by using the trusted data gateway and blockchain technology, thereby improving the credibility and security of the data;

[0121] Further, the trusted data gateway can effectively verify the source of the data and write the transaction information into the contract of the blockchain network to ensure the integrity and traceability of the data during the transmission and storage processes. Moreover, the trusted data gateway also supports cross-organization data sharing and access control, can conform to the data sent by several different protocol gateways, provides a trusted data exchange platform for all parties, and improves the transmission efficiency of data from different sources.

[0122] Embodiment 2

[0123] Please refer toFigure 3 , which is a data transmission device based on blockchain provided by the present invention, including: a gateway module 201, a conversion module 202, and a transmission module 203;

[0124] The gateway module 201 is configured to receive gateway data and perform verification and authentication on the gateway data;

[0125] The conversion module 202 is configured to convert the verified and authenticated gateway data to obtain trusted data;

[0126] The transmission module 203 is configured to call a corresponding on-chain interface according to the trusted data, so as to perform on-chain processing on the trusted data through the on-chain interface.

[0127] In some embodiments, the gateway module includes: a receiving sub-module, a verification sub-module, and a hashing sub-module;

[0128] The receiving sub-module is configured to receive gateway data through a data gateway adopting various transmission protocols;

[0129] The verification sub-module is configured to perform verification and authentication on the gateway data according to a two-way certificate verification and secure socket layer encryption transmission mechanism, so as to obtain first gateway data;

[0130] The hashing sub-module is configured to perform hashing verification detection on the first gateway data, so as to use the first gateway data passing the hashing verification detection as legal gateway data; wherein, the first gateway data includes a data format for a hashing verification field;

[0131] The conversion module is specifically configured to send the legal gateway data to a real-time processing engine, so that the real-time processing engine converts the legal gateway data to obtain trusted data.

[0132] In some embodiments, the gateway module is specifically further configured to:

[0133] When the data volume of the received gateway data is greater than a preset value, cache the gateway data into a message queue, so that a thread in a message queue scheduling thread pool performs verification and authentication processing on the gateway data; wherein, the scheduling thread pool is disposed in the message queue.

[0134] In some embodiments, the conversion module includes: a conversion sub-module and a standard sub-module;

[0135] The conversion sub-module is configured to send the legal gateway data to a real-time processing engine through a message queue, so that the real-time processing engine converts the legal gateway data to obtain a data object to be processed;

[0136] The standard sub-module is used to standardize the data object to be processed to obtain standardized trusted data; wherein, the standardized trusted data includes data source content, data source identity information, and timestamp.

[0137] In some embodiments, the transmission module includes: a calculation sub-module, a transaction sub-module, and a contract sub-module;

[0138] The calculation sub-module is used to perform hash calculation on the trusted data to obtain the hash value corresponding to each trusted data;

[0139] The transaction sub-module is used to call the on-chain interface of the corresponding blockchain network according to the trusted data, and use the hash value of each trusted data as the transaction information between each trusted data and the blockchain network;

[0140] The contract sub-module is used to write the transaction information into the contract of the blockchain network, and according to the written transaction information, through the on-chain interface, transmit the corresponding trusted data to the target block of the blockchain network; wherein, the blockchain network includes several blocks for storing data and a contract for writing transaction information.

[0141] In some embodiments, the blockchain network further includes several Peer nodes; the contract sub-module includes: a response unit, a sorting unit, and an update unit;

[0142] The response unit is used to connect the real-time processing engine and the Peer nodes in the blockchain network through the on-chain interface, and after connection, call the corresponding chain code, so that after querying or updating the chain code, the Peer nodes return a proposal response to the real-time processing engine according to the queried or updated chain code;

[0143] The sorting unit is used to generate a transaction sequence of the trusted data according to the proposal response, and send the transaction sequence to the Peer nodes, so as to update the contract in the blockchain network according to the transaction sequence, and then transmit the corresponding trusted data to the transaction sequence in the target block; wherein, the transaction sequence includes sorted transaction information and corresponding trusted data;

[0144] The update unit is used to generate a ledger update event after completing the update of the contract and block in the blockchain network, and save it to the real-time processing engine.

[0145] In some embodiments, the gateway module is further used to:

[0146] Determine the target data source type of the gateway data;

[0147] Determine the target transfer protocol corresponding to the target data source type according to the mapping relationship between the preset data source type and the transfer protocol;

[0148] Receive gateway data through the data gateway based on the target transfer protocol.

[0149] Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working process of the above-described device can refer to the corresponding process in the foregoing method embodiment, and will not be elaborated herein.

[0150] Implementing the above embodiments has the following effects:

[0151] The technical solution of the present invention can judge the trustworthiness of the data access of the received gateway data by receiving, verifying and authenticating the gateway data, so as to ensure the possible data trustworthiness problems after the data gateway receives the data. After performing trusted data conversion on the gateway data, it ensures that the data formats of different data sources are consistent, avoids the writing of tampered data, and can thus call the on-chain interface of the corresponding blockchain network, and then transmits the trusted data to the blockchain network through the on-chain interface, thereby using the trusted data gateway and blockchain technology to ensure the integrity, transparency and immutability of the data, thereby improving the credibility and security of the data.

[0152] Embodiment III

[0153] Please refer to Figure 4 , which is a blockchain-based data transmission system provided by the present invention for executing the blockchain-based data transmission method described in Embodiment I, including: a data gateway, a real-time module, and a blockchain network; the data gateway is connected to the real-time module, and the real-time module is connected to the blockchain network through an on-chain interface.

[0154] The data gateway includes gateways of several protocols for receiving gateway data sent by a data source and verifying and authenticating the sent gateway data.

[0155] In some embodiments, the data gateway, as the entry of data, is responsible for receiving data from the data source and sending the data to a message queue (such as Kafka). The data gateway communicates with the data source using common HTTP, TCP, and MQTT protocols, and adopts a two-way certificate verification and SSL encryption transmission mechanism, and verifies and authenticates the data. During the data reception process, the data gateway verifies the legality (the data format specified by the gateway includes a hash verification field), integrity, and identity information of the data to ensure that only legal data is transmitted to the real-time processing engine. When the gateway receives a large amount of data of different protocols, it will be cached in the in-memory message queue and the threads in the scheduling thread pool will be used to process them separately.

[0156] The real-time module is used to send the verified and authenticated gateway data to the real-time processing engine, and convert the gateway data into trusted data; call the on-chain interface of the corresponding blockchain network according to the trusted data, so as to transmit the trusted data to the blockchain network through the on-chain interface.

[0157] In some embodiments, the real-time module includes a message queue and a processing engine; the message queue is used to receive the legal gateway data after verification and authentication, and forward the legal gateway data to the real-time processing engine; the real-time processing engine is used to convert the gateway data into trusted data, and call the on-chain interface of the corresponding blockchain network according to the trusted data, so as to transmit the trusted data to the blockchain network through the on-chain interface.

[0158] In some embodiments, the message queue is specifically further used for:

[0159] When the data volume of the received gateway data is greater than a preset value, cache the gateway data, and initiate a thread in the scheduling thread pool to perform verification and authentication processing on the gateway data; wherein, the scheduling thread pool is set in the message queue.

[0160] In some embodiments, the real-time processing engine, as a data consumer, obtains data from the message queue in real time, and performs further processing and archiving. The real-time processing engine adopts streaming processing technology, which can efficiently process a large amount of data streams. It can be responsible for converting the received data into trusted data objects, and calling the on-chain interface of the blockchain network for archiving and on-chain operations.

[0161] Furthermore, the processing engine mainly includes the following functions: data conversion and standardization, data hash calculation, calling the on-chain interface of the blockchain network, and storing data and transaction information. The real-time processing engine converts the received raw data into trusted data objects, and performs standardization processing on the data to ensure that the data formats of different data sources are consistent. The standardized data objects include data content, data source identity information, timestamp, etc. At the same time, the real-time processing engine performs hash calculation on the data objects to generate a unique hash value of the data. The hash value is used to ensure the integrity of the data, and any tampering of the data will cause a change in the hash value. And, the real-time processing engine sends the hash value of the data to the blockchain network for archiving and on-chain operations by calling the on-chain interface of the blockchain network. The on-chain interface interacts with the blockchain network through a contract, packages the hash value of the data into a transaction, and writes the transaction into the blockchain.

[0162] Furthermore, to ensure data traceability, the real-time processing engine saves the relevant information of data objects and deposit transactions (such as transaction hash, block height, deposit time, etc.) to the local database, making this information available for subsequent data tracing and auditing.

[0163] The blockchain network includes a number of Peer nodes and a number of blocks connected to the Peer nodes through channels, and each Peer node includes a corresponding contract executed by it.

[0164] In some embodiments, the blockchain network is a network based on blockchain technology, such as Ethereum, Hyperledger, etc., to support data deposit and transaction recording. Corresponding nodes and verification mechanisms are set in the network to ensure the security and reliability of the network. At the same time, as a storage and verification platform for trusted data, the blockchain network plays an important role in ensuring data immutability and traceability. The blockchain network is based on a decentralized consensus mechanism to ensure data consistency and credibility.

[0165] In some embodiments, the blockchain network provides an on-chain interface for the real-time processing engine to call. The on-chain interface can be based on RESTful API or other suitable communication protocols, and is used to send the hash value of data to the blockchain network and trigger the deposit on-chain operation.

[0166] Furthermore, the contract in the blockchain network is responsible for verifying the integrity of data and performing the operation of depositing on-chain. The contract receives the data hash value from the on-chain interface, packages it into a transaction, and writes it into the blockchain. At the same time, the contract is also responsible for recording the relevant information of data transmission and storage for subsequent auditing and tracing. The blockchain network can also store and verify data information. The blockchain network uses distributed storage technology to record data transactions in blocks and ensures data consistency through the consensus mechanism. Among them, anyone can verify the data on the blockchain to confirm the integrity and immutability of the data.

[0167] It can be understood that the trusted data gateway based on blockchain can realize data reception, verification, deposit and traceability. The data gateway is responsible for receiving data, the real-time processing engine performs real-time processing and deposits on-chain, and the blockchain network provides data storage and verification. The embodiments of the present invention can effectively solve the problem of data trustworthiness that may occur after the data gateway receives data, improve the credibility and security of data. At the same time, the data gateway that transmits data through multiple protocols can also support cross-organization data sharing and access control, providing a trusted data exchange platform for all parties.

[0168] Implementing the above embodiments has the following effects:

[0169] The embodiments of the present invention can improve the credibility of data. Through the transparency and immutability of the blockchain, it ensures the credibility and integrity of data, reduces the risk of data credibility problems, and ensures data security. By adopting the decentralized storage of the blockchain and the verification mechanism of the contract, it improves the security of data, prevents data from being tampered with and accessed improperly. At the same time, it can trace and audit data. The blockchain stores the relevant information of data transmission and storage, providing the ability to trace and audit data, which helps to solve the traceability requirements of data credibility problems. And it can also achieve cross-organization data sharing. The trusted data gateway supports cross-organization data sharing and access control, providing a trusted data exchange platform for all parties.

[0170] Embodiment 4

[0171] Correspondingly, the present invention further provides a terminal device, including: a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the blockchain-based data transmission method described in any one of the above embodiments.

[0172] The terminal device of this embodiment includes: a processor, a memory, and a computer program and computer instructions stored in the memory and executable on the processor. When the processor executes the computer program, it implements each step in Embodiment 1 above, for example Figure 1 the steps S101 to S103 shown. Alternatively, when the processor executes the computer program, it implements the functions of each module / unit in the above device embodiment, such as the conversion module 202.

[0173] Exemplarily, the computer program can be divided into one or more modules / units. The one or more modules / units are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units can be a series of computer program instruction segments capable of performing specific functions, and this instruction segment is used to describe the execution process of the computer program in the terminal device. For example, the conversion module 202 is used to convert the gateway data after verification and authentication to obtain trusted data.

[0174] The terminal device can be a computing device such as a desktop computer, a notebook, a palm computer, and a cloud server. The terminal device may include, but is not limited to, a processor and a memory. Those skilled in the art can understand that the schematic diagram is only an example of the terminal device, and does not constitute a limitation on the terminal device. It may include more or fewer components than shown in the figure, or combine some components, or different components. For example, the terminal device may further include input / output devices, network access devices, a bus, etc.

[0175] The so-called processor may be a Central Processing Unit (CPU), or may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The processor is the control center of the terminal device and connects all parts of the entire terminal device through various interfaces and circuits.

[0176] The memory can be used to store the computer programs and / or modules. The processor realizes various functions of the terminal device by running or executing the computer programs and / or modules stored in the memory, and by calling the data stored in the memory. The memory may mainly include a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function, etc.; the data storage area can store data created according to the use of the mobile terminal, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as a hard disk, memory, plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, at least one magnetic disk storage device, flash device, or other volatile solid-state storage devices.

[0177] Among them, if the modules / units integrated in the terminal device are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, to implement all or part of the processes in the above-described embodiment methods of the present invention, it can also be completed by a computer program instructing relevant hardware. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-described various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content included in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.

[0178] Embodiment Five

[0179] Correspondingly, the present invention further provides a computer-readable storage medium, the computer-readable storage medium includes a stored computer program, wherein when the computer program runs, it controls the device where the computer-readable storage medium is located to execute the data transmission method based on blockchain as described in any one of the above embodiments.

[0180] The above-described specific embodiments have further elaborated on the purpose, technical solutions, and beneficial effects of the present invention. It should be understood that the above description is only for the specific embodiments of the present invention and is not used to limit the protection scope of the present invention. It is particularly pointed out that for those skilled in the art, any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A data transmission method based on blockchain, characterized in that, it includes: Receiving gateway data and verifying and authenticating the gateway data; Converting the verified and authenticated gateway data to obtain trusted data; Invoking the corresponding on-chain interface according to the trusted data, so as to perform on-chain processing on the trusted data through the on-chain interface.

2. The data transmission method based on blockchain according to claim 1, characterized in that, the receiving gateway data and verifying and authenticating the gateway data specifically include: Receiving gateway data through data gateways adopting various transmission protocols; Verifying and authenticating the gateway data according to the two-way certificate verification and Secure Sockets Layer encryption transmission mechanism to obtain the first gateway data; Performing hash verification detection on the first gateway data, and taking the first gateway data that passes the hash verification detection as legal gateway data; wherein, the first gateway data includes the data format for the hash verification field; the converting the verified and authenticated gateway data to obtain trusted data specifically includes: Sending the legal gateway data to a real-time processing engine so that the real-time processing engine converts the legal gateway data to obtain trusted data.

3. The data transmission method based on blockchain according to claim 1, characterized in that, the receiving gateway data and verifying and authenticating the gateway data specifically include: When the data volume of the received gateway data is greater than a preset value, caching the gateway data into a message queue, so that the threads in the message queue scheduling thread pool perform verification and authentication processing on the gateway data; wherein, the scheduling thread pool is set in the message queue.

4. The data transmission method based on blockchain according to claim 2, characterized in that, the sending the legal gateway data to a real-time processing engine and converting the legal gateway data to obtain trusted data specifically include: Sending the legal gateway data to a real-time processing engine through a message queue, so that the real-time processing engine converts the legal gateway data to obtain a data object to be processed; Performing standardization processing on the data object to be processed to obtain standardized trusted data; wherein, the standardized trusted data includes data source content, data source identity information and timestamp.

5. The data transmission method based on blockchain according to claim 1, characterized in that, the invoking the corresponding on-chain interface according to the trusted data, so as to perform on-chain processing on the trusted data through the on-chain interface specifically includes: Performing hash calculation on the trusted data to obtain the hash value corresponding to each trusted data; Invoking the on-chain interface of the corresponding blockchain network according to the trusted data, and taking the hash values of each trusted data as the transaction information between each trusted data and the blockchain network; Write the transaction information into the contract of the blockchain network, and according to the written transaction information, transmit the corresponding trusted data to the target block of the blockchain network through the on-chain interface; wherein, the blockchain network includes several blocks for storing data and a contract for writing transaction information.

6. A blockchain-based data transmission method as claimed in claim 5, wherein, the blockchain network further includes several Peer nodes; the step of writing the transaction information into the contract of the blockchain network and transmitting the corresponding trusted data to the target block of the blockchain network according to the written transaction information specifically includes: Connect the real-time processing engine and the Peer nodes in the blockchain network through the on-chain interface, and call the corresponding chain code after the connection, so that after querying or updating the chain code, the Peer nodes return a proposal response to the real-time processing engine according to the queried or updated chain code; Generate a transaction sequence of the trusted data according to the proposal response, and send the transaction sequence to the Peer nodes, so as to update the contract in the blockchain network according to the transaction sequence, and then transmit the corresponding trusted data to the target block; wherein, the transaction sequence includes sorted transaction information and corresponding trusted data; After completing the update of the contract and block in the blockchain network, generate a ledger update event and save it in the real-time processing engine.

7. A blockchain-based data transmission method as claimed in any one of claims 1-6, wherein, the receiving of the gateway data includes: Determine the target data source type of the gateway data; Determine the target transmission protocol corresponding to the target data source type according to the mapping relationship between the preset data source type and the transmission protocol; Receive the gateway data through the data gateway based on the target transmission protocol.

8. A blockchain-based data transmission device, wherein, it includes: A gateway module, a conversion module and a transmission module; The gateway module is used to receive the gateway data and perform verification and authentication on the gateway data; The conversion module is used to convert the gateway data after verification and authentication to obtain trusted data; The transmission module is used to call the corresponding on-chain interface according to the trusted data, so as to perform on-chain processing on the trusted data through the on-chain interface.

9. A blockchain-based data transmission system, wherein, it includes: A data gateway, a real-time module and a blockchain network; the data gateway is connected to the real-time module, and the real-time module is connected to the blockchain network through an on-chain interface; The data gateway is a gateway including several transmission protocols, and is used to receive the gateway data sent by the data source and perform verification and authentication on the sent gateway data; The real-time module is used to send the gateway data after verification and authentication to the real-time processing engine and convert the gateway data to obtain trusted data; Call the on-chain interface of the corresponding blockchain network according to the trusted data, so as to transmit the trusted data to the blockchain network through the on-chain interface; The blockchain network includes a number of Peer nodes and a number of blocks connected to the Peer nodes through channels, and each Peer node includes a corresponding contract executed by it.

10. A terminal device, Characterized in that, It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the blockchain-based data transmission method according to any one of claims 1 to 7.

11. A computer-readable storage medium, Characterized in that, The computer-readable storage medium includes a stored computer program, wherein when the computer program runs, it controls the device where the computer-readable storage medium is located to execute the blockchain-based data transmission method according to any one of claims 1 to 7.