Data transmission method and device based on block chain, electronic equipment, storage medium and program product
Through blockchain-based data transmission method and RDMA communication, the original data is encrypted and verified, which solves the problem of unstable communication data transmission and realizes efficient and secure data transmission and storage.
Patent Information
- Application Number
- CN202510532358.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-07-22
AI Technical Summary
The existing communication data transmission is unstable, and there are problems such as high network bandwidth usage, connection timeout, poor security, low management and control efficiency, and vulnerability to man-in-the-middle attacks.
The blockchain-based data transmission method is adopted and combined with RDMA communication to encrypt, format, clean, standardize, encapsulate and sign the original data, and verify it through the blockchain network to ensure the security and integrity of the data during the transmission process.
It realizes the secure and efficient transmission of communication data, ensures the traceability and verifiability of data, and improves the stability and credibility of data transmission.
Smart Images

Figure CN120358010A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data transmission, and in particular to a data transmission method, device, electronic device, storage medium and program product based on a blockchain. Background Art
[0002] The communication industry bears a large amount of massive data generated by a large number of users and devices during business development. These data resources are rich and diverse. Communication data includes high-value data such as call data, Internet access log data, base station data, blacklist data, risk websites, and user portraits. The efficient transmission of communication data has important value.
[0003] The existing transmission of communication data includes interface-based data transmission, Kafka-based data transmission, and Remote Direct Memory Access (RDMA)-technology-based data transmission. (1) Interface-based data transmission requires the server and the client to be online at the same time. When the server is unavailable, data interaction cannot be carried out. At the same time, in interface-based data transmission, the transmission of a large amount of data may occupy a large amount of network bandwidth, resulting in connection timeouts and affecting the reliability of the service. Interface-based data transmission does not encrypt data during the transmission process, is vulnerable to man-in-the-middle attacks, and is prone to leaking sensitive data in error messages. In addition, if the Application Programming Interface (API) is not properly designed, too many internal logics or implementation details are likely to be exposed. (2) Kafka-based data transmission is relatively complex to set up and maintain and requires an in-depth understanding of the operating mechanism of Kafka. Kafka-based data transmission is prone to high message delays in various situations such as sending and processing large messages and improper configuration, and also consumes more system resources (memory, storage). (3) In RDMA-technology-based data transmission, since the existing trusted data exchange scheme needs to first create a protection domain through the RDMA management interface, then establish an MR and perform authorization, and only after authorization can data transmission be carried out by establishing a QP and establishing a connection, the management authorization process is relatively cumbersome and takes a lot of time, resulting in low management control efficiency and affecting the application implementation progress. At the same time, since traditional RDMA technology relies on a preset trust relationship during the data exchange process and lacks sufficient security protection measures, it is vulnerable to problems such as man-in-the-middle attacks and data tampering, resulting in poor data security control capabilities and large security risks. In summary, the existing transmission of communication data is not stable. Summary of the Invention
[0004] The present invention provides a blockchain-based data transmission method, apparatus, electronic device, storage medium, and program product, which are used to solve the defect that the transmission of communication data in the prior art is not stable, and to achieve the improvement of the stability of the transmission of communication data.
[0005] In a first aspect, the present invention provides a blockchain-based data transmission method, which is applied to a sender and includes: obtaining data to be transmitted based on the collected original data; sending the data to be transmitted to the memory area of the receiver through Remote Direct Memory Access (RDMA) communication; uploading the data to be transmitted to the blockchain network based on the blockchain node of the sender for the blockchain network to verify the data to be transmitted and send the verification result to the blockchain node of the receiver; wherein, the verification result is used to assist the receiver in storing the data to be transmitted.
[0006] In one embodiment, sending the data to be transmitted to the memory area of the receiver through Remote Direct Memory Access (RDMA) communication includes: sending a message carrying the key of the memory area to the receiver for the receiver to register the memory area in the RDMA device; accessing the memory area based on the write operation instruction of the registered RDMA device to send the data to be transmitted to the memory area.
[0007] In one embodiment, obtaining the data to be transmitted based on the collected original data includes: formatting, cleaning, and standardizing the original data to obtain standardized original data; encrypting the standardized original data to obtain encrypted data; encapsulating the hash value of the standardized original data, the type of the standardized original data, the size of the standardized original data, the generation time of the standardized original data, and the encrypted data to obtain encapsulated data, and generating a check code based on the hash value of the encapsulated data; signing the encapsulated data or the hash value of the encapsulated data to obtain a signature result; and obtaining the data to be transmitted based on the encapsulated data, the check code, and the signature result.
[0008] In a second aspect, the present invention provides a blockchain-based data transmission method, which is applied to the blockchain network and includes: after the sender sends the data to be transmitted to the memory area of the receiver through Remote Direct Memory Access (RDMA) communication, receiving the data to be transmitted uploaded by the sender; the data to be transmitted is obtained by the sender based on the collected original data; the data to be transmitted is uploaded to the blockchain network through the blockchain node of the sender; verifying the data to be transmitted and sending the verification result to the blockchain node of the receiver for the receiver to assist in storing the data to be transmitted based on the verification result.
[0009] In one embodiment, verifying the data to be transmitted and sending the verification result to the blockchain node of the receiving party includes: obtaining the information of the verifier for the data to be transmitted, and sending the data to be transmitted to the verifier based on the information of the verifier for the verifier to verify the transaction information of the data to be transmitted; receiving the verification result sent by the verifier, generating contract data for the data to be transmitted based on the verification result, where the contract data includes the data to be transmitted, the information of the sender, the information of the receiver, the information of the verifier, and the verification result; and sending the contract data to the blockchain node of the receiving party.
[0010] In a third aspect, the present invention provides a data transmission method based on a blockchain, which is applied to a receiving party and includes: receiving, based on the memory area of the receiving party, the data to be transmitted sent by the sending party through remote direct memory access (RDMA) communication, where the data to be transmitted is obtained by the sending party based on the collected original data; receiving the verification result of the data to be transmitted sent by the blockchain network, and storing the data to be transmitted based on the verification result; where the verification result is obtained by verifying the data to be transmitted after the blockchain network receives the data to be transmitted uploaded by the sending party, and the data to be transmitted is uploaded to the blockchain network based on the blockchain node of the sending party after the sending party sends the data to be transmitted to the memory area of the receiving party.
[0011] In one embodiment, storing the data to be transmitted based on the verification result includes: when it is determined based on the verification result that the data to be transmitted is reliable and complete, decrypting the data to be transmitted based on the public key to obtain the decrypted data; and storing the decrypted data to store the data to be transmitted.
[0012] In a fourth aspect, the present invention provides a data transmission system based on a blockchain, including a sending party, a receiving party, and a blockchain network, where: the sending party is configured to obtain the data to be transmitted based on the collected original data, send the data to be transmitted to the memory area of the receiving party through remote direct memory access (RDMA) communication, and upload the data to be transmitted to the blockchain network based on the blockchain node of the sending party; the blockchain network is configured to verify the data to be transmitted and send the verification result to the blockchain node of the receiving party; and the receiving party is configured to store the data to be transmitted based on the verification result.
[0013] In a fifth aspect, the present invention further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements any one of the above-mentioned data transmission methods based on a blockchain when executing the computer program.
[0014] In a sixth aspect, the present invention further provides a non-transitory computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements any one of the above-mentioned data transmission methods based on a blockchain.
[0015] In a seventh aspect, the present invention further provides a computer program product, including a computer program which, when executed by a processor, implements any of the above-described blockchain-based data transmission methods.
[0016] The blockchain-based data transmission method, device, electronic device, storage medium, and program product provided by the present invention encrypt and automatically verify the original data by constructing a blockchain network and combining RDMA communication, and decrypt and store the data to be transmitted that passes the verification, thereby realizing the secure and efficient transmission of communication data. The present invention utilizes the RDMA technology to achieve efficient data transmission, and at the same time realizes the traceability and verifiability of the data exchange process by means of the blockchain technology. While ensuring the transmission security of the data to be transmitted, the present invention combines the immutability and decentralization characteristics of the blockchain to ensure the integrity and credibility of the data to be transmitted during the transmission and storage processes. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for use in the embodiments or the prior art description. Obviously, the following-described drawings are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0018] Figure 1 FIG. 1 is one of the flow diagrams of the blockchain-based data transmission system provided by the present invention.
[0019] Figure 2 FIG. 2 is another flow diagram of the blockchain-based data transmission method provided by the present invention.
[0020] Figure 3 FIG. 3 is the flow diagram of obtaining the data to be transmitted based on the original data collected by the present invention.
[0021] Figure 4 FIG. 4 is the flow diagram of performing RDMA communication provided by the present invention.
[0022] Figure 5 FIG. 5 is another flow diagram of the blockchain-based data transmission method provided by the present invention.
[0023] Figure 6 FIG. 6 is the flow diagram of verifying the data to be transmitted provided by the present invention.
[0024] Figure 7 FIG. 7 is another flow diagram of the blockchain-based data transmission method provided by the present invention.
[0025] Figure 8 FIG. 8 is the structural diagram of the electronic device provided by the present invention. Detailed implementation manners
[0026] To make the objectives, technical solutions and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described below with reference to the accompanying drawings in the present invention. Apparently, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present invention without making creative efforts shall fall within the protection scope of the present invention.
[0027] The following will be combined with Figures 1 - 8 to describe the blockchain-based data transmission method, device and electronic device of the present invention.
[0028] Figure 1 is one of the flow diagrams of the blockchain-based data transmission method provided by the present invention. As Figure 1 and Figure 2 shown, the blockchain-based data transmission method is applied to a sender and includes steps S100 to S300. The specific steps are as follows.
[0029] S100: Obtain data to be transmitted based on the collected original data.
[0030] The execution subject of the present invention is a blockchain-based data transmission system. As Figure 1 shown, the blockchain-based data transmission system includes a sender, a receiver and a blockchain network.
[0031] The sender (host 1) includes a data acquisition unit, a data processing unit, a blockchain node and a first Remote Direct Memory Access (RDMA) unit.
[0032] The data acquisition unit acquires the original data and sends the original data to the data processing unit. The data processing unit encrypts, encapsulates, performs integrity verification and signs the original data to obtain the data to be transmitted, so as to protect the security and integrity of the data to be transmitted during the transmission process.
[0033] S200: Send the data to be transmitted to the memory area of the receiver through remote direct memory access RDMA communication.
[0034] RDMA communication allows computers in a network to directly read and write to the memory of another computer without the intervention of a Central Processing Unit (CPU). RDMA communication is achieved through a Protection Domain (PD). In RDMA communication, a protection domain (PD) is a logical concept that is similar to a "container" for holding various resources, such as Queue Pairs (QPs) and Memory Regions (MRs). These resources are brought under the protection of the PD to prevent unauthorized access. Among them, an MR is a contiguous memory managed by RDMA for registering and managing the data to be shared, and RDMA communication controls the memory access rights. A QP is a connection for RDMA communication used for data transmission.
[0035] Before performing RDMA communication, the context initialization of RDMA is carried out first, including configuring the RDMA device and creating queue peers. During the process of registering the memory region, it is necessary to inform the RDMA device of the memory regions for performing RDMA operations, so that the RDMA device can directly access these memory regions without the intervention of the operating system, thus achieving efficient data transmission. At the same time, when establishing RDMA communication, control information needs to be exchanged between the client (sender) and the server (receiver). The control information includes the identifier of the queue pair and the key of the memory region. These information are used to establish the communication path and data transmission permissions between the two parties. By exchanging this information, the sender and the receiver can identify each other's queue pairs and determine the memory regions to be accessed, thus establishing effective RDMA communication.
[0036] The data processing unit of the sender sends the data to be transmitted to the first RDMA unit of the sender. The first RDMA unit sends the data to be transmitted to the memory region of the receiver through RDMA communication.
[0037] S300: Based on the blockchain node of the sender, the data to be transmitted is uploaded to the blockchain network for the blockchain network to verify the data to be transmitted and send the verification result to the blockchain node of the receiver; among them, the verification result is used to assist the receiver in storing the data to be transmitted.
[0038] As Figure 1 shown, the sender includes a data acquisition unit (including a memory region), a data storage unit, a blockchain node, a trusted verification unit, and a second RDMA unit. The second RDMA unit is used to communicate with the first RDMA unit to send the data to be transmitted to the memory region of the receiver.
[0039] After the first RDMA unit of the sender sends the data to be transmitted to the memory area of the receiver, the data processing unit of the sender sends the data to be transmitted to the blockchain node of the sender. The blockchain node of the sender uploads the data to be transmitted to the data exchange smart contract of the blockchain network. The data exchange smart contract generates transaction information based on the data to be transmitted and sends the transaction information to the data exchange consensus node of the blockchain network. The data exchange consensus node verifies the transaction information and sends the verification result to the blockchain node of the receiver. At the same time, the transaction is recorded in the blockchain network to ensure the traceability and security of the transaction.
[0040] The blockchain node of the receiver sends the verification result to the trusted verification unit. The trusted verification unit analyzes the verification result. When the verification result is passed, the passed verification result is sent to the data storage unit. The data storage unit obtains the data to be transmitted from the memory area of the receiver according to the passed verification result, decrypts the data to be transmitted, and stores it.
[0041] The data transmission method based on blockchain provided by the embodiment of the present invention encrypts and automatically verifies the original data by constructing a blockchain network and combining RDMA communication, and decrypts and stores the data to be transmitted that has passed the verification, realizing the secure and efficient transmission of communication data. The present invention uses RDMA technology to achieve efficient data transmission, and at the same time uses blockchain technology to achieve traceability and verifiability of the data exchange process. While ensuring the security of the data to be transmitted, the present invention combines the immutability and decentralization characteristics of the blockchain to ensure the integrity and credibility of the data to be transmitted during the transmission and storage processes.
[0042] Based on the above embodiments, obtaining the data to be transmitted based on the collected original data includes: formatting, cleaning, and standardizing the original data to obtain standardized original data; encrypting the standardized original data to obtain encrypted data; encapsulating the hash value of the standardized original data, the type of the standardized original data, the size of the standardized original data, the generation time of the standardized original data, and the encrypted data to obtain encapsulated data, and generating a check code based on the hash value of the encapsulated data; signing the encapsulated data or the hash value of the encapsulated data to obtain a signature result; and obtaining the data to be transmitted based on the encapsulated data, the check code, and the signature result.
[0043] The data processing unit is mainly responsible for tasks such as data encryption, encapsulation, integrity verification, and signature to protect the security and integrity of the data during transmission. As Figure 3 shown, obtaining the data to be transmitted based on the collected original data includes the following steps.
[0044] (1)Data reception and preprocessing. In the data reception and preprocessing stage, the data acquisition unit of the sender receives the original data, which may come from various sources such as sensors, Application Programming Interface (API) calls, or user inputs. Then, operations such as formatting, cleaning, transformation, and standardization are performed on the original data to obtain standardized original data, ensuring the quality and consistency of the original data and making it suitable for subsequent encryption and encapsulation requirements.
[0045] (2)Data encryption. In the data encryption stage, the standardized original data is encrypted using a symmetric encryption algorithm or an asymmetric encryption algorithm to obtain encrypted data. Symmetric encryption algorithms include the Advanced Encryption Standard (AES). Asymmetric encryption algorithms include the RSA (Rivest-Shamir-Adleman) encryption algorithm.
[0046] (3)The encrypted data is encapsulated into encapsulated data with a specific structure. The encapsulated data includes the definitions and arrangements of each field for subsequent parsing and processing. The encapsulated data includes the hash value of the standardized original data, the type of the standardized original data, the size of the standardized original data, the generation time of the standardized original data, and the encrypted data.
[0047] The hash value of the standardized original data is calculated through hashing. The hash value can be used to verify the integrity of the data and ensure that the data has not been tampered with during transmission. The type of the standardized original data is used to identify the type of data and indicate what type of information the data contains, such as text, image, video, etc. The size of the standardized original data is used to indicate the storage space occupied by the standardized original data, facilitating planning during subsequent processing and transmission. The generation time of the standardized original data is used to record the timestamp information of the generation of the standardized original data, for tracing the generation time of the standardized original data and ensuring the timeliness and traceability of the standardized original data. The encrypted data is the data after encryption processing to ensure the security of the data during transmission. The encrypted data can only be decrypted by the receiver with the correct key to protect the data from unauthorized access.
[0048] For example, the original data that the sender needs to send is: "This is the sample data for encryption and encapsulation". The encapsulated data after encapsulation is as follows.
[0049] Hash value of the standardized original data: "e9ea45a74b1258a7f4833b63d3a654d2". Type of the encrypted data: "text". Size of the encrypted data: "64 bytes". Generation time (timestamp) of the standardized original data: "2024-03-20T10:00:00Z". Encrypted data: "9f8b15d7bc3c3e12d3e8a1b5fca47ab3".
[0050] (4)Data integrity verification. The encapsulated data calculates a unique hash value of the encapsulated data through a hash algorithm (such as SHA-256) as the verification code and transmits it together with the encapsulated data. After receiving the encapsulated data, the receiving party also performs a hash calculation and compares the calculated hash value with the transmitted verification code to verify the integrity of the encapsulated data during transmission and ensure that the data has not been tampered with or damaged.
[0051] (5)Data signature. The sender uses the private key to sign the encapsulated data or the hash value of the encapsulated data to ensure the accurate source of the hash value of the encapsulated data and prevent it from being tampered with. Signatures usually use digital signature algorithms, such as the Elliptic Curve Digital Signature Algorithm (ECDSA), to achieve. The signature result will be attached to the encapsulated data to form the final data to be transmitted. In this way, after receiving the data to be transmitted, the receiving party can use the public key of the sender to verify the validity of the signature, thereby ensuring the integrity and trustworthiness of the data source.
[0052] After data signature, prepare to send the data to be transmitted.
[0053] Through standardizing, encrypting, encapsulating, verifying and signing the original data, the present invention obtains the data to be transmitted, realizes the encrypted transmission and verification of the data, and is beneficial to improving the security and reliability of communication data during transmission.
[0054] Based on the above embodiments, through Remote Direct Memory Access (RDMA) communication, the data to be transmitted is sent to the memory area of the receiving party, including: sending a message carrying the key of the memory area to the receiving party for the receiving party to register the memory area into the RDMA device; accessing the memory area based on the write operation instruction of the registered RDMA device to send the data to be transmitted to the memory area.
[0055] Such as Figure 4As shown, after establishing RDMA communication between the sender and the receiver, information exchange is carried out through SEND / RECEIVE operations. The sender sends a message carrying the key of the memory area to the receiver. After receiving the message carrying the key of the memory area, the receiver registers the corresponding memory area in the RDMA device to obtain the registered RDMA device. The first RDMA unit of the sender can directly access this memory area through the registered RDMA device without the intervention of the operating system. In this way, the sender can directly read and write the memory area of the receiver on the RDMA device, thus realizing efficient data transmission and exchange.
[0056] Optionally, when the receiver needs to access the target memory area of the sender, the receiver sends a message carrying the key of the target memory area to the sender. After receiving the message carrying the key of the target memory area, the sender registers the corresponding target memory area in the RDMA device to obtain the registered RDMA device. The second RDMA unit of the receiver can directly access this target memory area through the registered RDMA device without the intervention of the operating system. In this way, the receiver can directly read and write the target memory area of the sender on the RDMA device.
[0057] After registering the memory area or the target memory area in the RDMA device, data transmission can be carried out through the WRITE or READ operation of the registered RDMA device. The WRITE or READ operation allows direct access to the memory area of the other party without the participation of the other party's CPU. The sender can use the WRITE operation to directly write data into the memory area of the receiver, while the receiver can use the READ operation to directly read data from the target memory area of the sender. This zero-copy data transmission method greatly improves the transmission efficiency and reduces the latency during data transmission.
[0058] Furthermore, after the data transmission is completed, one party will send a completion message (Message Done, MSG_DONE) to the other party to indicate that the data transmission has been completed. The completion message is used to notify the other party that subsequent processing can be carried out, such as data parsing or other operations. At the same time, both parties can perform necessary cleanup work according to the protocol agreement, and then close the RDMA communication and release relevant resources.
[0059] By registering the pre-accessed memory area in the RDMA device, the present invention realizes that the sender can directly access the memory area of the receiver, and sends the data to be transmitted to the memory area through the write operation instruction, improving the transmission security and efficiency of the data to be transmitted.
[0060] Such as Figure 5As shown in the figure, the present invention also provides a blockchain-based data transmission method, which is applied to a blockchain network and includes steps S400 to S500. The specific steps are as follows.
[0061] S400: After the sender sends the data to be transmitted to the memory area of the receiver through Remote Direct Memory Access (RDMA) communication, the receiver receives the data to be transmitted uploaded by the sender; the data to be transmitted is obtained by the sender based on the collected original data; the data to be transmitted is uploaded to the blockchain network through the blockchain node of the sender.
[0062] The data acquisition unit of the sender acquires the original data and sends the original data to the data processing unit of the sender. The data processing unit of the sender encrypts, encapsulates, performs integrity verification and signs the original data to obtain the data to be transmitted.
[0063] The data processing unit of the sender sends the data to be transmitted to the first RDMA unit of the sender. The first RDMA unit sends the data to be transmitted to the memory area of the receiver through RDMA communication.
[0064] After the first RDMA unit of the sender sends the data to be transmitted to the memory area of the receiver, the data processing unit of the sender sends the data to be transmitted to the blockchain node of the sender. The blockchain node of the sender uploads the data to be transmitted to the data exchange smart contract of the blockchain network.
[0065] S500: Verify the data to be transmitted and send the verification result to the blockchain node of the receiver for the receiver to assist in storing the data to be transmitted based on the verification result.
[0066] The data exchange smart contract generates transaction information according to the data to be transmitted and sends the transaction information to the data exchange consensus node of the blockchain network. The data exchange consensus node verifies the transaction information and sends the verification result to the blockchain node of the receiver. At the same time, the transaction is recorded in the blockchain network to ensure the traceability and security of the transaction.
[0067] The blockchain node of the receiver sends the verification result to the trusted verification unit of the receiver. The trusted verification unit analyzes the verification result. When the verification result is verification passed, it sends the verification passed result to the data storage unit of the receiver. The data storage unit obtains the data to be transmitted from the memory area of the receiver according to the verification passed result and decrypts and stores the data to be transmitted.
[0068] The data transmission method based on blockchain provided by the embodiments of the present invention encrypts and automatically verifies the original data by constructing a blockchain network and combining RDMA communication, and decrypts and stores the to-be-transmitted data that passes the verification, realizing the secure and efficient transmission of communication data. The present invention utilizes the RDMA technology to achieve efficient data transmission, and at the same time, realizes the traceability and verifiability of the data exchange process by means of the blockchain technology. While ensuring the transmission security of the to-be-transmitted data, the present invention combines the immutability and decentralization characteristics of the blockchain to ensure the integrity and credibility of the to-be-transmitted data during the transmission and storage processes.
[0069] Based on the above embodiments, verifying the to-be-transmitted data and sending the verification result to the blockchain node of the receiving party includes: obtaining the information of the confirmor of the to-be-transmitted data, and sending the to-be-transmitted data to the confirmor based on the confirmor information for the confirmor to verify the transaction information of the to-be-transmitted data; receiving the verification result sent by the confirmor, and generating contract data of the to-be-transmitted data based on the verification result, where the contract data includes the to-be-transmitted data, the sender information, the receiver information, the confirmor information, and the verification result; and sending the contract data to the blockchain node of the receiving party.
[0070] As Figure 6 shown, blockchain nodes are deployed on each host node of the receiving party and the sending party to add the sending party and the receiving party to the blockchain network. After the first RDMA unit of the sending party sends the to-be-transmitted data to the memory area of the receiving party, the blockchain node of the sending party uploads the to-be-transmitted data to the data exchange smart contract of the blockchain network.
[0071] The data exchange smart contract aims to provide a secure and trustworthy solution for data exchange on the blockchain. The functions of the data exchange smart contract include managing transaction submission, verification, and confirmation to ensure the integrity and traceability of transactions. Through this contract, users can securely submit data transactions, query and verify information of specific transactions, and conduct confirmations, thereby promoting the security, transparency, and efficiency of data exchange.
[0072] The data exchange smart contract generates transaction information based on the data to be transmitted and sends the transaction information to the data exchange consensus nodes in the blockchain network. When submitting the data to be transmitted, the sender also needs to submit the information of the confirmor, the sender's information, and the recipient's information. When obtaining the transaction information, the data exchange consensus nodes also obtain the information of the confirmor (e.g., the list of confirmor addresses), the sender's information, and the recipient's information. The data exchange consensus nodes send the transaction information to the confirmor for confirmation. After receiving the transaction information, the confirmor verifies, confirms, and signs the transaction information. The confirmor feeds back the verification result (the signed information) to the data exchange consensus nodes. After receiving the signed information of all confirmors, the data exchange consensus nodes generate the contract data of the data to be transmitted according to the verification result and send the contract data to the blockchain node of the recipient to send the verification result to the blockchain node of the recipient.
[0073] Furthermore, the contract data is stored in the blockchain network. The contract data includes the transaction ID, the data to be transmitted (including the hash value of the standardized original data, the type of the standardized original data, the size of the standardized original data, the generation time of the standardized original data, and the encrypted data), the sender's information (e.g., the sender's address and the sender's identity identifier), the recipient's information (e.g., the recipient's address and the recipient's identity identifier), the confirmor's information (the list of confirmor addresses), the transaction time, and the verification result (success, failure, etc.).
[0074] For example, an example of the contract data is as follows.
[0075] Transaction ID: 123456789.
[0076] Data to be transmitted: a. Hash value of the standardized original data: 0xabcdef123456; b. Type of the standardized original data: text; c. Size of the standardized original data: 1024KB; d. Generation time of the standardized original data: 2024-03-20 15:30:00.
[0077] Sender's information: Name: Alice; Address: 0x1234567890abcdef; Email: alice@example.com.
[0078] Recipient's information: Name: Bob; Address: 0x9876543210fedcba; Email: bob@example.com.
[0079] List of confirmor addresses: 0xfedcba0987654321, 0x13579ace2468bdf0.
[0080] Transaction time: 2024-03-20 15:35:00.
[0081] Verification result: Success.
[0082] The present invention ensures the authenticity and reliability of the data transaction to be transmitted and ensures that the data to be transmitted is not tampered with by sending the data to be transmitted to the verifier for verification and generating contract data according to the verification result, and sending the contract data to the blockchain node of the receiver.
[0083] As Figure 7 shown, the embodiment of the present invention further provides a blockchain-based data transmission method, which is applied to the receiver and includes steps S600 to S700, and the specific steps are as follows.
[0084] S600: Based on the memory area of the receiver, receive the data to be transmitted sent by the sender through remote direct memory access (RDMA) communication, and the data to be transmitted is obtained by the sender based on the collected original data.
[0085] The data acquisition unit of the sender acquires the original data and sends the original data to the data processing unit. The data processing unit encrypts, encapsulates, performs integrity verification and signs the original data to obtain the data to be transmitted.
[0086] The data processing unit of the sender sends the data to be transmitted to the first RDMA unit of the sender. The first RDMA unit sends the data to be transmitted to the memory area of the receiver through RDMA communication. The receiver acquires the data to be transmitted.
[0087] S700: Receive the verification result of the data to be transmitted sent by the blockchain network, and store the data to be transmitted based on the verification result; wherein, the verification result is obtained by the blockchain network after receiving the data to be transmitted uploaded by the sender, and the data to be transmitted is uploaded to the blockchain network based on the blockchain node of the sender after the sender sends the data to be transmitted to the memory area of the receiver.
[0088] Storing the data to be transmitted based on the verification result includes: when it is determined based on the verification result that the data to be transmitted is reliable and complete, decrypt the data to be transmitted based on the public key to obtain the decrypted data; store the decrypted data to store the data to be transmitted.
[0089] After the first RDMA unit of the sender sends the data to be transmitted to the memory area of the receiver, the data processing unit of the sender sends the data to be transmitted to the blockchain node of the sender. The blockchain node of the sender uploads the data to be transmitted to the data exchange smart contract of the blockchain network. The data exchange smart contract generates transaction information according to the data to be transmitted and sends the transaction information to the data exchange consensus node of the blockchain network. The data exchange consensus node verifies the transaction information and sends the verification result to the blockchain node of the receiver.
[0090] The receiving blockchain node sends the verification result to the trusted verification unit, which analyzes the verification result.
[0091] The trusted verification unit analyzes the verification results, including the reliability of the verification results and the integrity of the verification results. The reliability of the verification results refers to the receiver reading the verification results from the blockchain node to ensure that the source of the data is credible. By recording the verification results of the transaction on the blockchain network, including the confirmation and status of the transaction, the receiver can directly obtain this information from the blockchain node and ensure the authenticity and reliability of the data to be transmitted based on the immutability and decentralization of the blockchain. The integrity of the verification results refers to comparing the hash value of the encapsulated data obtained from the blockchain with the hash value of the encapsulated data in the memory area to ensure the integrity of the data, that is, the data has not been tampered with during the transmission process. By comparing the hash value of the encapsulated data recorded in the blockchain with the hash value of the encapsulated data in the memory area, it can be verified whether the data to be transmitted has been tampered with or damaged. Due to the immutability of the blockchain, once the data is recorded on the blockchain, its hash value will serve as the unique identifier of the data, and any tampering with the data will result in a change in the hash value, which will be detected.
[0092] When the verification result is passed (with reliable and complete transmission data), the verification result of passing the verification is sent to the data storage unit. The data storage unit obtains the data to be transmitted from the memory area of the receiver according to the verification result of passing the verification. The receiver uses the corresponding public key to decrypt the data to be transmitted obtained in the memory area to restore the data to be transmitted to its original plaintext form, and stores and subsequently uses the decrypted data to be transmitted.
[0093] The blockchain-based data transmission method provided by the embodiment of the present invention realizes the safe and efficient transmission of communication data by constructing a blockchain network and combining RDMA communication to encrypt and automatically verify the original data, and decrypt and store the verified data to be transmitted. The present invention uses RDMA technology to realize efficient data transmission, and at the same time uses blockchain technology to realize the traceability and verifiability of the data exchange process. While ensuring the security of the data transmission to be transmitted, the present invention combines the immutability and decentralization characteristics of blockchain to ensure the integrity and credibility of the data to be transmitted during the transmission and storage process.
[0094] The blockchain-based data transmission system provided by the present invention is described below. The blockchain-based data transmission system described below and the blockchain-based data transmission method described above can refer to each other.
[0095] like Figure 1As shown, the blockchain-based data transmission system includes a sender, a receiver, and a blockchain network, where: The sender is used to obtain the data to be transmitted based on the collected original data, send the data to be transmitted to the memory area of the receiver through Remote Direct Memory Access (RDMA) communication, and upload the data to be transmitted to the blockchain network based on the blockchain node of the sender.
[0096] The blockchain network is used to verify the data to be transmitted and send the verification result to the blockchain node of the receiver.
[0097] The receiver is used to store the data to be transmitted based on the verification result.
[0098] The data acquisition unit of the sender acquires the original data and sends the original data to the data processing unit of the sender. The data processing unit of the sender encrypts, encapsulates, performs integrity verification, and signs the original data to obtain the data to be transmitted.
[0099] The data processing unit of the sender sends the data to be transmitted to the first RDMA unit of the sender. The first RDMA unit sends the data to be transmitted to the memory area of the receiver through RDMA communication.
[0100] After the first RDMA unit of the sender sends the data to be transmitted to the memory area of the receiver, the data processing unit of the sender sends the data to be transmitted to the blockchain node of the sender. The blockchain node of the sender uploads the data to be transmitted to the data exchange smart contract of the blockchain network.
[0101] The data exchange smart contract generates transaction information based on the data to be transmitted and sends the transaction information to the data exchange consensus node of the blockchain network. The data exchange consensus node verifies the transaction information and sends the verification result to the blockchain node of the receiver. At the same time, the transaction is recorded in the blockchain network to ensure the traceability and security of the transaction.
[0102] The blockchain node of the receiver sends the verification result to the trusted verification unit of the receiver. The trusted verification unit analyzes the verification result. When the verification result is verification passed, it sends the verification result of verification passed to the data storage unit of the receiver. The data storage unit obtains the data to be transmitted from the memory area of the receiver according to the verification result of verification passed, decrypts the data to be transmitted, and stores it.
[0103] The data transmission method based on blockchain provided by the embodiments of the present invention encrypts and automatically verifies the original data by constructing a blockchain network and combining RDMA communication, and decrypts and stores the data to be transmitted that passes the verification, realizing the secure and efficient transmission of communication data. The present invention utilizes the RDMA technology to achieve efficient data transmission, and at the same time realizes the traceability and verifiability of the data exchange process with the help of blockchain technology. While ensuring the security of the data to be transmitted, the present invention combines the immutability and decentralization characteristics of the blockchain to ensure the integrity and credibility of the data to be transmitted during the transmission and storage processes.
[0104] Figure 8 Illustrates a schematic diagram of the physical structure of an electronic device, as Figure 8 shown, the electronic device may include: a processor 810, a communications interface 820, a memory 830, and a communication bus 840. Among them, the processor 810, the communications interface 820, and the memory 830 complete the communication with each other through the communication bus 840. The processor 810 can call the logical instructions in the memory 830 to execute the data transmission method based on blockchain, and the method includes: obtaining the data to be transmitted based on the collected original data; sending the data to be transmitted to the memory area of the receiving party through remote direct memory access (RDMA) communication; uploading the data to be transmitted to the blockchain network based on the blockchain node of the sending party for the blockchain network to verify the data to be transmitted and send the verification result to the blockchain node of the receiving party; where the verification result is used to assist the receiving party in storing the data to be transmitted.
[0105] Alternatively, execute the above-mentioned data transmission method based on blockchain, and the method includes: after the sending party sends the data to be transmitted to the memory area of the receiving party through remote direct memory access (RDMA) communication, receiving the data to be transmitted uploaded by the sending party; the data to be transmitted is obtained by the sending party based on the collected original data; the data to be transmitted is uploaded to the blockchain network through the blockchain node of the sending party; verifying the data to be transmitted and sending the verification result to the blockchain node of the receiving party for the receiving party to assist in storing the data to be transmitted based on the verification result.
[0106] Alternatively, the above blockchain-based data transmission method is executed, which includes: receiving, based on the memory area of the recipient, the data to be transmitted sent by the sender through remote direct memory access (RDMA) communication, where the data to be transmitted is obtained by the sender based on the collected original data; receiving the verification result of the data to be transmitted sent by the blockchain network, and storing the data to be transmitted based on the verification result; where the verification result is obtained by the blockchain network after receiving the data to be transmitted uploaded by the sender, and the data to be transmitted is uploaded to the blockchain network based on the blockchain node of the sender after the sender sends the data to be transmitted to the memory area of the recipient.
[0107] In addition, when the logical instructions in the above-mentioned memory 830 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, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.
[0108] On the other hand, the present invention also provides a computer program product, where the computer program product includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the blockchain-based data transmission method provided by the above-mentioned various methods, which includes: obtaining the data to be transmitted based on the collected original data; sending the data to be transmitted to the memory area of the recipient through remote direct memory access (RDMA) communication; uploading the data to be transmitted to the blockchain network based on the blockchain node of the sender for the blockchain network to verify the data to be transmitted and send the verification result to the blockchain node of the recipient; where the verification result is used to assist the recipient in storing the data to be transmitted.
[0109] Alternatively, a computer is capable of executing the blockchain-based data transmission method provided by each of the above methods. The method includes: after the sender sends the data to be transmitted to the memory area of the receiver through Remote Direct Memory Access (RDMA) communication, receiving the data to be transmitted uploaded by the sender; the data to be transmitted is obtained by the sender based on the collected original data; the data to be transmitted is uploaded to the blockchain network through the blockchain node of the sender; verifying the data to be transmitted and sending the verification result to the blockchain node of the receiver for the receiver to assist in storing the data to be transmitted based on the verification result.
[0110] Alternatively, a computer is capable of executing the blockchain-based data transmission method provided by each of the above methods. The method includes: based on the memory area of the receiver, receiving the data to be transmitted sent by the sender through Remote Direct Memory Access (RDMA) communication, where the data to be transmitted is obtained by the sender based on the collected original data; receiving the verification result of the data to be transmitted sent by the blockchain network and storing the data to be transmitted based on the verification result; wherein, the verification result is obtained by the blockchain network verifying the data to be transmitted after receiving the data to be transmitted uploaded by the sender, and the data to be transmitted is uploaded to the blockchain network based on the blockchain node of the sender after the sender sends the data to be transmitted to the memory area of the receiver.
[0111] In another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the blockchain-based data transmission method provided by each of the above methods. The method includes: obtaining the data to be transmitted based on the collected original data; sending the data to be transmitted to the memory area of the receiver through Remote Direct Memory Access (RDMA) communication; uploading the data to be transmitted to the blockchain network based on the blockchain node of the sender for the blockchain network to verify the data to be transmitted and send the verification result to the blockchain node of the receiver; wherein, the verification result is used to assist the receiver in storing the data to be transmitted.
[0112] Alternatively, when the computer program is executed by a processor, it implements the blockchain-based data transmission method provided by each of the above methods. The method includes: after the sender sends the data to be transmitted to the memory area of the receiver through Remote Direct Memory Access (RDMA) communication, receiving the data to be transmitted uploaded by the sender; the data to be transmitted is obtained by the sender based on the collected original data; the data to be transmitted is uploaded to the blockchain network through the blockchain node of the sender; verifying the data to be transmitted and sending the verification result to the blockchain node of the receiver for the receiver to assist in storing the data to be transmitted based on the verification result.
[0113] Alternatively, when the computer program is executed by a processor, it implements the blockchain-based data transmission method provided by the above-mentioned various methods. The method includes: receiving, based on the memory area of the recipient, the data to be transmitted sent by the sender through Remote Direct Memory Access (RDMA) communication, where the data to be transmitted is obtained by the sender based on the collected original data; receiving the verification result of the data to be transmitted sent by the blockchain network, and storing the data to be transmitted based on the verification result; where the verification result is obtained by the blockchain network after verifying the data to be transmitted received from the sender, and the data to be transmitted is uploaded to the blockchain network based on the blockchain node of the sender after the sender sends the data to be transmitted to the memory area of the recipient.
[0114] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative effort.
[0115] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0116] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A data transmission method based on blockchain, characterized in that Applied to the sender, including: Obtain the data to be transmitted based on the collected original data; Send the data to be transmitted to the memory area of the receiver through Remote Direct Memory Access (RDMA) communication; Upload the data to be transmitted to the blockchain network based on the blockchain node of the sender, so that the blockchain network verifies the data to be transmitted and sends the verification result to the blockchain node of the receiver; wherein, the verification result is used to assist the receiver in storing the data to be transmitted.
2. The data transmission method based on blockchain according to claim 1, characterized in that, The step of sending the data to be transmitted to the memory area of the receiver through Remote Direct Memory Access (RDMA) communication includes: Send a message carrying the key of the memory area to the receiver for the receiver to register the memory area in the RDMA device; Access the memory area based on the write operation instruction of the registered RDMA device to send the data to be transmitted to the memory area.
3. The data transmission method based on blockchain according to claim 1, wherein, The step of obtaining the data to be transmitted based on the collected original data includes: Format, clean, and standardize the original data to obtain standardized original data; Encrypt the standardized original data to obtain encrypted data; Package the hash value of the standardized original data, the type of the standardized original data, the size of the standardized original data, the generation time of the standardized original data, and the encrypted data to obtain packaged data, and generate a check code based on the hash value of the packaged data; Sign the packaged data or the hash value of the packaged data to obtain a signature result; Obtain the data to be transmitted based on the packaged data, the check code, and the signature result.
4. A data transmission method based on blockchain, characterized in that, Applied to the blockchain network, including: After the sender sends the data to be transmitted to the memory area of the receiver through Remote Direct Memory Access (RDMA) communication, receive the data to be transmitted uploaded by the sender; the data to be transmitted is obtained by the sender based on the collected original data; the data to be transmitted is uploaded to the blockchain network through the blockchain node of the sender; Verify the data to be transmitted and send the verification result to the blockchain node of the receiver for the receiver to assist in storing the data to be transmitted based on the verification result.
5. The data transmission method based on blockchain according to claim 4, wherein The step of verifying the data to be transmitted and sending the verification result to the blockchain node of the receiver includes: Obtain the confirmation party information of the data to be transmitted, and send the data to be transmitted to the confirmation party based on the confirmation party information for the confirmation party to verify the transaction information of the data to be transmitted; Receive the verification result sent by the confirmation party, and generate contract data of the data to be transmitted based on the verification result. The contract data includes the data to be transmitted, sender information, receiver information, the confirmation party information, and the verification result; Send the contract data to the blockchain node of the receiver.
6. A data transmission method based on blockchain, characterized in that, Applied to the receiver, including: Receive the data to be transmitted sent by the sender through Remote Direct Memory Access (RDMA) communication based on the memory area of the receiver. The data to be transmitted is obtained by the sender based on the collected original data; Receive the verification result of the data to be transmitted sent by the blockchain network, and store the data to be transmitted based on the verification result; wherein, the verification result is obtained by the blockchain network after verifying the data to be transmitted after receiving the data to be transmitted uploaded by the sender, and the data to be transmitted is uploaded to the blockchain network based on the blockchain node of the sender after the sender sends the data to be transmitted to the memory area of the receiver.
7. The data transmission method based on blockchain according to claim 6, wherein The storing the data to be transmitted based on the verification result includes: When it is determined based on the verification result that the data to be transmitted is reliable and complete, decrypt the data to be transmitted based on the public key to obtain decrypted data; Store the decrypted data to store the data to be transmitted.
8. A blockchain-based data transmission system, characterized in that, It includes a sender, a receiver and a blockchain network, wherein: The sender is configured to obtain the data to be transmitted based on the collected original data, send the data to be transmitted to the memory area of the receiver through Remote Direct Memory Access (RDMA) communication, and upload the data to be transmitted to the blockchain network based on the blockchain node of the sender; The blockchain network is configured to verify the data to be transmitted and send the verification result to the blockchain node of the receiver; The receiver is configured to store the data to be transmitted based on the verification result.
9. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the blockchain-based data transmission method according to any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the blockchain-based data transmission method according to any one of claims 1 to 7.
11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the blockchain-based data transmission method according to any one of claims 1 to 7.