Blockchain transmission method, device and equipment of trusted data, and storage medium

By setting file transfer rules and cryptographic signature algorithms on the nodes of the blockchain data sender, generating target files and verifying them on the blockchain, the problems of data tampering and resource waste in blockchain data transmission are solved, and the security and efficiency of data transmission are improved.

CN116614520BActive Publication Date: 2026-04-10CHENGDU PRIME STARK TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-23
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

During blockchain data transmission, data is vulnerable to third-party network attacks that could lead to data tampering, and the sender may waste resources while waiting for feedback from the receiver.

Method used

By setting file transfer rules on the blockchain node of the data sender, the file to be transferred is parsed to generate a target file that conforms to the transfer rules, and a first credential for blockchain verification is generated and uploaded to the chain. At the same time, the target file is transferred using a non-blockchain consensus method and transmitted to the recipient through a file transfer channel. Data transmission security is ensured through encryption and signature algorithms.

Benefits of technology

While achieving data tamper-proofing, it reduces the amount of blockchain data processing and the complexity of data transmission, thereby improving the reliability and efficiency of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116614520B_ABST
    Figure CN116614520B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of blockchains, solves the technical problem of link positioning tracking in the data transmission process in the prior art, and provides a blockchain transmission method, device and equipment for trusted data and a storage medium. The method comprises: setting a file transmission rule on a blockchain node of a data sender to analyze a to-be-transmitted file, determining a target file in the to-be-transmitted file that meets the transmission rule, uploading a first credential for verifying the trustworthiness of the target file to a chain, and simultaneously transmitting the target file to a second node in a non-blockchain chain consensus manner; the first credential of the target file is uploaded to ensure that the target file data received by the second node through a third party is tamper-proof, while reducing the data processing capacity of the blockchain and the complexity of data transmission.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of blockchain technology, and in particular to a blockchain transmission method and device for trusted data, equipment and a storage medium. BACKGROUND

[0002] The blockchain technology is built on a transmission network (also referred to as a blockchain network), and a distributed node device (hereinafter referred to as a node) in the transmission network generates block data by running a blockchain program according to a preset consensus strategy, and verifies and stores the block data by using a chain data structure, thereby realizing a data tamper-proof mechanism and providing a safe and reliable new technical idea for business development.

[0003] In the prior art, when a data sender transmits data to a data receiver, the data transmission process is often attacked by a third party, resulting in tampered transmission data. Since the blockchain is a distributed storage technology, if the complete data to be transmitted is directly transmitted on the blockchain, the storage pressure of each node of the blockchain will be increased. Meanwhile, when the data sender transmits data to the data receiver, the data sender often does not know whether the data meets the use requirements of the data receiver due to the delayed feedback of the data receiver, resulting in resource waste of the data sender due to the need to wait for the feedback information of the data receiver. SUMMARY

[0004] Therefore, the embodiments of the present application provide a blockchain transmission method and device for trusted data, equipment and a storage medium to solve the technical problem of link positioning tracking in the data transmission process in the prior art.

[0005] The technical solution adopted by the present application is as follows:

[0006] The present application provides a blockchain transmission method for trusted data, applied to a blockchain data sender, and the method comprises the following steps:

[0007] In response to a to-be-transmitted file sent by an application system to a first node corresponding to the blockchain data sender, the to-be-transmitted file is parsed based on a file transmission rule to generate a target file to be transmitted;

[0008] According to the target file, a first credential for blockchain verification is generated and uploaded to a blockchain storage;

[0009] Based on the target file, a file transmission channel for data transmission is constructed, wherein the file transmission channel is a channel corresponding to the file transmission of the target file which is not on the blockchain;

[0010] According to the file transmission channel, the target file is transmitted to a second node corresponding to a blockchain data receiver, and the first credential is uploaded to the blockchain storage.

[0011] Preferably, the obtaining the target file comprises:

[0012] In response to the file transmission request of the first node, generating the file transmission rule applied to the first node and the file verification rule applied to the second node based on the file transmission request;

[0013] configuring the file transmission rule to the first node and the file verification rule to the second node;

[0014] analyzing the to-be-transmitted file based on the file transmission rule to obtain an analyzed file;

[0015] generating the target file based on the analyzed file conforming to the file transmission rule;

[0016] wherein the file verification rule is adapted to the file transmission rule.

[0017] Preferably, the transmitting the target file comprises:

[0018] obtaining an encryption algorithm for encrypting the target file and a signature algorithm for signing the file;

[0019] encrypting the target file by using the encryption algorithm to obtain an encrypted file;

[0020] signing the encrypted file by using the signature algorithm to obtain signature information;

[0021] transmitting the encrypted file and the signature information to the second node by using the file transmission channel.

[0022] Preferably, the encrypting the target file based on the elliptic curve key agreement algorithm comprises:

[0023] obtaining a second public key corresponding to the second node;

[0024] generating a negotiated key based on the second public key and a first private key of the first node;

[0025] encrypting the encrypted file by using the negotiated key to obtain the encrypted file;

[0026] wherein the key pair of the first node and the second node is generated based on the same first base point in the same finite field, and the key pair comprises a private key and a public key.

[0027] Preferably, a first public key corresponding to the first node is chained and / or transmitted to the second node by using the file transmission channel, and the first public key and the first private key constitute a key pair.

[0028] Preferably, the signature information comprises first sub-information and second sub-information, and signing the encrypted file based on an elliptic curve signature algorithm comprises:

[0029] obtaining a third private key of the first node, wherein the third private key is generated based on a second base point of an elliptic curve;

[0030] calculating the first sub-information rG(x, y) according to the second base point and a first random number;

[0031] calculating the second sub-information s=(h+dx) / r) according to the first random number, a first hash value and the third private key;

[0032] wherein r is the first random number, G is the second base point, x is the horizontal coordinate of the point rG, y is the vertical coordinate of the point rG, d is the third private key, and h is the first hash value corresponding to the encrypted file.

[0033] Preferably, the public key corresponding to the third private key is a third public key, and the third public key is chained and / or transmitted to a second node through the file transmission channel.

[0034] In another aspect, the application also provides a blockchain transmission method and device of trusted data, applied to a blockchain data sender, comprising:

[0035] a file analysis module, configured to analyze a to-be-transmitted file based on a file transmission rule, and generate a target file to be transmitted, in response to the to-be-transmitted file sent by an application system to a first node corresponding to the blockchain data sender;

[0036] a first processing module, configured to generate a first credential for blockchain verification and upload to a blockchain storage according to the target file;

[0037] a second processing module, configured to construct a file transmission channel for data transmission based on the target file, wherein the file transmission channel is a channel corresponding to file transmission of the target file on a non-blockchain chain;

[0038] a file transmission module, configured to transmit the target file to a second node corresponding to a blockchain data receiver according to the file transmission channel, and upload the first credential to the blockchain storage.

[0039] The application also provides an electronic device comprising at least one processor, at least one memory, and computer program instructions stored in the memory, which, when executed by the processor, implement the method of any one of the above.

[0040] The application further provides a medium having computer program instructions stored thereon, which, when executed by a processor, implement the method according to any one of the preceding aspects.

[0041] In summary, the application has the following advantages:

[0042] The blockchain transmission method, device and equipment for trusted data and the storage medium provided by the application analyze the to-be-transmitted file by setting a file transmission rule on the blockchain node of the data sender, determine a target file in the to-be-transmitted file that meets the transmission rule, upload a first credential of the trusted verification of the target file to a chain, and simultaneously transmit the target file to a second node by using a non-blockchain on-chain consensus mode; the first credential of the target file is uploaded to ensure that the target file data received by the second node through a third party is tamper-proof, and meanwhile, the blockchain data processing amount is reduced and the data transmission complexity is reduced. BRIEF DESCRIPTION OF DRAWINGS

[0043] In order to more clearly illustrate the technical solutions of the embodiments of the application, the following will briefly introduce the drawings needed to be used in the embodiments of the application. For those skilled in the art, other drawings can also be obtained on the premise of not creating labor, and these are within the protection scope of the application.

[0044] Figure 1 The flowchart of the blockchain transmission method for trusted data in the embodiment 1 of the application;

[0045] Figure 2 The flowchart of the trusted data supervision method based on the blockchain in the embodiment 2 of the application;

[0046] Figure 3 The structural diagram of the blockchain transmission method device for trusted data in the embodiment 3 of the application;

[0047] Figure 4 The structural diagram of the blockchain transmission method device for trusted data in the embodiment 4 of the application;

[0048] Figure 5 The structural diagram of the electronic equipment in the embodiment 5 of the application. DETAILED DESCRIPTION

[0049] In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. It should be noted that, in this document, relationship terms such as first and second are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. In the description of the present application, it should be understood that the orientations or positional relationships indicated by terms such as center, upper, lower, front, rear, left, right, vertical, horizontal, top, bottom, inner, outer and the like are based on the orientations or positional relationships shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and therefore cannot be understood as indicating or implying that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the present application. Moreover, the terms “include”, “contain” or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such a process, method, article or device. Without more limitations, the elements defined by the statement “include” do not exclude the presence of additional identical elements in the process, method, article or device that includes the elements. If there is no conflict, the features of the present application and the embodiments can be combined with each other, and are all within the protection scope of the present application.

[0050] Embodiment 1

[0051] Please refer to Figure 1 , Figure 1 For the blockchain transmission method of trusted data in Embodiment 1 of the present application, applied to a blockchain data sender, the method comprises:

[0052] S11: In response to a to-be-transmitted file sent by an application system to a first node corresponding to the blockchain data sender, the to-be-transmitted file is parsed based on a file transmission rule to generate a target file to be transmitted;

[0053] Specifically, the data sender accesses the blockchain through the first node of the blockchain, and the data receiver accesses the blockchain through the second node of the blockchain. The data sender sends the to-be-transmitted file to the first node through its local application system. The first node parses the to-be-transmitted file based on the configured file transmission rule, and takes the file meeting the transmission rule as the target file. The transmission rule includes a transmission date rule, a transmission time rule, a file name rule, an alarm rule, etc.

[0054] It should be noted that the file transmission rule can be applied for configuration to the management node based on the file transmission requirement, or the management node can pre-configure at least one file transmission rule on each member node of the blockchain; in addition, any file transmission rule has a corresponding file verification rule, and it can be understood that the first node needs to call the file transmission rule corresponding to the file verification rule adapted to the second node when analyzing the to-be-transmitted file based on the file transmission rule.

[0055] S12: generating a first credential for blockchain verification according to the target file and uploading to the blockchain storage;

[0056] Specifically, the corresponding first credential is generated for the to-be-transmitted target file, and the second node can verify the credibility of the target file based on the first credential after receiving the target file, and the first credential includes but is not limited to the hash value of the target file, the summary information of the target file, and the specific identification of the target file.

[0057] S13: constructing a file transmission channel for data transmission based on the target file, wherein the file transmission channel is a channel corresponding to the file transmission of the target file on the non-blockchain chain;

[0058] S14: transmitting the target file to the second node corresponding to the data receiving party according to the file transmission channel, and uploading the first credential to the blockchain storage.

[0059] Specifically, after obtaining the target file, the file transmission channel of the first node and the second node is established based on the address information of the data receiving party, the target file is transmitted to the second node through the file transmission channel, and the first credential is chained (uploaded to the blockchain for storage) through the file transmission channel including but not limited to point-to-point transmission, physical medium transmission, and third-party mail transmission.

[0060] The application analyzes the to-be-transmitted file by setting a file transmission rule on the blockchain node of the data sending party, determines the target file in the to-be-transmitted file that meets the transmission rule, chains the first credential for credibility verification of the target file, and transmits the target file to the second node in a non-blockchain chain consensus manner; by chaining the first credential of the target file, the target file data received by the second node through the third party is prevented from being tampered with, and the data processing amount of the blockchain and the complexity of data transmission are reduced.

[0061] In an embodiment, the S11 includes:

[0062] S111: in response to the file transmission request of the first node, generating the file transmission rule applied to the first node and the file check rule applied to the second node based on the file transmission request;

[0063] S112: configuring the file transmission rule to the first node and the file check rule to the second node;

[0064] S113: parsing the to-be-transmitted file based on the file transmission rule to obtain parsed files;

[0065] S114: generating the target file based on the parsed files conforming to the file transmission rule;

[0066] The file check rule is matched with the file transmission rule.

[0067] Specifically, when the first node receives a to-be-transmitted file of a data sender, a corresponding file transmission request is generated, the file transmission rule of the first node and the file check rule matched with the second node are determined based on the file transmission request, the first node parses the to-be-transmitted file based on the file transmission rule, and each parsed file conforming to the transmission rule is determined as a target file; the file transmission rule cannot be recognized by the file check rule, which avoids abnormal alarm during file parsing.

[0068] In an embodiment, the first credential is a hash value of the target file.

[0069] In an embodiment, the S14 comprises:

[0070] S141: obtaining an encryption algorithm used for encryption of the target file and a signature algorithm used for signature of the to-be-transmitted file;

[0071] S142: encrypting the target file by using the encryption algorithm to obtain an encrypted file;

[0072] S143: signing the encrypted file by using the signature algorithm to obtain signature information;

[0073] S144: transmitting the encrypted file and the signature information to the second node by using the file transmission channel.

[0074] Specifically, before the first node transmits the target file to the second node through the file transmission channel, the encryption algorithm and the signature algorithm are obtained; in order to ensure the transmission safety of the target file, the first node needs to encrypt and sign the target file, and then transmits the target file to the second node.

[0075] In an embodiment, the encrypting the target file based on the elliptic curve key agreement algorithm comprises:

[0076] S1421: obtaining a second public key corresponding to the second node;

[0077] S1422: generating a negotiation key based on the second public key and a first private key of the first node;

[0078] S1423: encrypting the encrypted file by using the negotiation key to obtain the encrypted file;

[0079] The key pair of the first node and the second node is generated based on the same first base point in the same finite field, and the key pair comprises a private key and a public key.

[0080] Specifically, the elliptic curve key agreement algorithm is used to encrypt the target file, the same base point in the same finite field is selected for the first node and the second node, the base point is recorded as a first base point, the first public key and the first private key of the first node are calculated based on the first base point, the second public key and the second private key of the second node are calculated based on the first base point, the first public key and the first private key constitute a key pair, and the second public key and the second private key constitute a key pair; the first key for encrypting the target file is calculated by using the second public key and the first private key, and similarly, the second key for decrypting the target file is calculated by using the second private key and the first public key, since the base point is the same base point in the same finite field, the first key and the second key are the same, recorded as a negotiation key, and the target file is encrypted by using the negotiation key to obtain an encrypted file; the negotiation key is calculated by obtaining the public key of the other party, and the encryption and decryption of the target file can be realized without exposing the private key of the first node and the second node.

[0081] In an embodiment, the first public key corresponding to the first node is chained and / or transmitted to the second node through the file transmission channel, and the first public key and the first private key constitute a key pair.

[0082] Specifically, the first node stores the first public key in the chain and / or sends the first public key to the second node together with the target file through the file transmission channel, preferably, the first public key is chained, so that when the second node receives the target file and decrypts by calling the first public key, the first node can know the processing flow of the target file in the second node, without active feedback of the second node.

[0083] In an embodiment, the signature information comprises first sub-information and second sub-information, and the signing the encrypted file based on the elliptic curve signature algorithm comprises:

[0084] S1431: obtaining a third private key of the first node, wherein the third private key is generated based on a second base point of the elliptic curve.

[0085] S1432: calculating the first sub-information rG(x, y) according to the second base point and the first random number;

[0086] S1433: calculating the second sub-information s=(h+dx) / r according to the first random number, the first hash value and the third private key;

[0087] wherein r is the first random number, G is the second base point, x is the horizontal coordinate of the point rG, y is the vertical coordinate of the point rG, d is the third private key, and h is the first hash value corresponding to the encrypted file.

[0088] Specifically, the second base point of an elliptic curve and the first random number are obtained, the third private key and the third public key of the first node are generated based on the second base point, and the first sub-information rG(x, y) is calculated. Then, the second sub-information s is calculated based on the formula s=(h+dx) / r through the first random number, the first hash value and the third private key. The first sub-information and the second sub-information are taken as the signature information. The first hash value is the hash value of the target file or the hash value of the encrypted file thereof. If the target file is transmitted in plaintext, the first hash value is the target file. If the target file is transmitted in ciphertext, the first hash value is the hash value corresponding to the encrypted file of the target file. In order to save the computer overhead of the first node, the second base point and the first base point are preferably the same base point, that is, the first public key is equal to the third public key, and the first private key is equal to the third private key.

[0089] In an embodiment, the public key corresponding to the third private key is the third public key, and the third public key is chained and / or transmitted to the second node through the file transmission channel.

[0090] Specifically, the first node stores the third public key on the chain and / or sends the third public key to the second node together with the target file through the file transmission channel. Preferably, the third public key is chained, so that when the second node receives the target file and performs signature authenticity verification by calling the third public key, the first node can know the processing flow of the target file in the second node, without the second node actively feeding back.

[0091] The blockchain transmission method of trusted data provided by the application can analyze the to-be-transmitted file by setting a file transmission rule on the blockchain node of the data sender, determine the target file in the to-be-transmitted file that meets the transmission rule, chain the first credential of the target file for trusted verification, and simultaneously transmit the target file to the second node in a non-blockchain chain consensus manner. By chaining the first credential of the target file, the target file data received by the second node through a third party can be prevented from being tampered with, while the data processing amount of the blockchain and the complexity of data transmission can be reduced.

[0092] Embodiment 2

[0093] Please refer to Figure 2 , Figure 2 For the blockchain data transmission tracking method in embodiment 2 of the application, applied to a blockchain data receiver, the method comprises:

[0094] S21: in response to the target file transmitted by the first node corresponding to the blockchain data sender to the second node corresponding to the data application party, obtaining a file verification rule for verifying the target file;

[0095] S22: according to the first verification stage of the file verification rule, calling the first verification voucher to verify the target file, and obtaining the first verification file;

[0096] S23: according to the second verification stage of the file verification rule, calling the second verification voucher to verify the first verification file, and obtaining the application file corresponding to the target file.

[0097] Specifically, when the data sender sends the target file to the second node of the data receiver through the first node, the first node and the second node need to configure corresponding file transmission rules and file verification rules. For specific configuration mode, please refer to the above embodiment, which will not be repeated here; the file verification rule includes a first verification stage and a second verification stage, and each verification stage needs different verification vouchers. After completing all verification stages, the target file that passes the verification is recorded as an application file, and then the application file is sent to the data receiver.

[0098] It should be noted that: the verification voucher used in each verification stage is directly or indirectly obtained from the first node, or the first node or the second node obtains the corresponding verification voucher in response to the calling information, such as: when the second node initiates a transaction corresponding to the first verification voucher and the second verification voucher to the blockchain, the first node will perform consensus, accounting and other operations on the transaction.

[0099] The application divides the target file verification into multiple stages when the data receiver performs the target file verification, and each stage needs to obtain the corresponding verification voucher for verification, so that the processing link information of the target file in the second node can be automatically obtained by the first node, without the real-time feedback of the second node to the processing link of the target file, realizing the tracking and positioning of the data sender to the processing link of the sent file.

[0100] In an embodiment, after obtaining the application file, it further comprises:

[0101] S24: obtaining the address information of the file receiver;

[0102] S25: transmitting the application file from the second node to the file receiving party according to the address information.

[0103] Specifically, the second node obtains the application file after completing the verification of the target file, and sends the application file to the file receiving party according to the address of the file receiving party of the target file. It should be noted that one node of the blockchain can correspond to multiple user terminals.

[0104] In an embodiment, the first verification credential and the second verification credential are both stored on the blockchain.

[0105] Specifically, the first verification credential and the second verification credential are both stored on the blockchain. When the second node needs to verify the target file using the first verification credential and the second verification credential, the second node initiates a verification credential calling transaction to the blockchain, thereby obtaining the first verification credential or the second verification credential from the blockchain. By calling the verification credential from the blockchain, the first node can learn about the processing link of the target file at the second node, without the first node actively obtaining the target file processing information from the second node, and without the second node actively feeding back the current target file processing information to the first node, thereby improving the processing efficiency and experience of the blockchain.

[0106] In an embodiment, the S21 comprises:

[0107] S211: in response to the file receiving request of the second node, generating the file transmission rule for the first node and the file verification rule applied to the second node based on the file receiving request;

[0108] S212: configuring the file transmission rule to the first node and configuring the file verification rule to the second node;

[0109] S213: based on the received target file, calling the pre-configured file verification rule.

[0110] Specifically, when the first node and the second node perform file transmission and reception operations, corresponding file transmission rules and matching file verification rules need to be configured; the configuration of the file transmission rule and the file verification rule can be based on the file receiving request to apply for configuration to the management node, or the management node can pre-configure at least one file transmission rule on each member node of the blockchain, and configure each file verification rule on each member node of the blockchain.

[0111] In an embodiment, the first verification stage is the signature information verification of the first node, and the S22 comprises:

[0112] S221: in response to the signature information verification, initiating a first certificate transaction corresponding to the first verification certificate to the blockchain;

[0113] S222: according to the first certificate transaction, calling the first verification certificate pre-stored on the blockchain;

[0114] S223: verifying the signature information of the target file by using the first certificate, to obtain the first verification file.

[0115] Specifically, the first verification stage is to verify the authenticity of the signature information of the first node in the target file, and the second node initiates a first certificate transaction to the blockchain, thereby calling the first verification certificate pre-stored on the blockchain, and verifying the signature information of the target file by using the first verification certificate.

[0116] In an embodiment, the first verification stage is the signature information verification of the first node, the signature information includes first sub-information and second sub-information, and generating the first verification certificate includes:

[0117] obtaining a third private key and a third public key of the first node, wherein the third private key and the third public key are generated by a key pair based on a second base point of an elliptic curve;

[0118] calculating the first sub-information rG(x, y) according to the second base point and a first random number;

[0119] calculating the second sub-information s=(h+dx) / r) according to the first random number, a first hash value and the third private key;

[0120] after obtaining the signature information, storing the third public key on the chain;

[0121] wherein r is the first random number, G is the second base point, x is the horizontal coordinate of the point rG, y is the vertical coordinate of the point rG, d is the third private key, and h is the first hash value of the encrypted file of the target file.

[0122] Specifically, a second base point of an elliptic curve and a first random number are acquired, a third private key and a third public key of a first node are generated based on the second base point, and a first sub-information rG(x, y) is calculated; a second sub-information s is calculated based on a formula s=(h+dx) / r through the first random number, a first hash value, and the third private key; the first sub-information and the second sub-information are taken as signature information, and the third public key for signature verification is stored on a chain, and the third public key is a first check voucher; the first hash value is a hash value of a target file or a hash value of an encrypted file of the target file; if the target file is transmitted in plaintext, the first hash value is the target file; if the target file is transmitted in ciphertext, the first hash value is a hash value corresponding to the encrypted file of the target file; in order to save the computer overhead of the first node, the second base point and the first base point are preferably the same base point, that is, the first public key is equal to the third public key, and the first private key is equal to the third private key.

[0123] Signature information verification of the target file by using the first check voucher is that a second node calculates a second hash value H of the target file based on the received target file, calculates M=hG / s+xQ / s, and compares M with rG of the signature information, if consistent, the signature verification is successful, wherein M=hG / s+xQ / s=hG / s+x(dG) / s=(H+xd)G / s=r(H+xd)G / (h+dx).

[0124] In an embodiment, the second check stage is subjected to data trust verification based on an elliptic curve key agreement algorithm, and the S23 comprises:

[0125] S231: acquiring a first public key of the first node and a first hash value corresponding to an encrypted file of the target file;

[0126] S232: generating a negotiation key based on the first public key and a second private key of the second node;

[0127] S233: decrypting the encrypted file by using the negotiation key to obtain a decrypted file;

[0128] S234: comparing a second hash value of the decrypted file with the first hash value, if the first hash value is consistent with the second hash value, outputting the application file;

[0129] The key pair of the first node and the second node is generated based on the same first base point in the same finite field, and the key pair comprises a private key and a public key.

[0130] Specifically, the elliptic curve key agreement algorithm is used to encrypt the target file, the same base point in the same finite field is selected in the first node and the second node, the base point is recorded as the first base point, the first public key and the first private key of the first node are calculated based on the first base point, the second public key and the second private key of the second node are calculated based on the first base point, the first public key and the first private key constitute a key pair, and the second public key and the second private key constitute a key pair; the first key used for target file encryption is calculated by using the second public key and the first private key, and similarly, the second key used for target file decryption is calculated by using the second private key and the first public key, since the base point is the same base point in the same finite field, the first key and the second key are the same, and are recorded as the negotiated key.

[0131] When the second node obtains the first check file, a file decryption transaction is initiated to the blockchain, so as to call the first public key pre-stored on the blockchain, that is, the first check voucher, the negotiated key is calculated based on the first public key and the second private key, and the encrypted file is decrypted, if the decryption is successful, the decrypted file is output; after obtaining the decrypted file, the second node initiates an anti-tampering transaction verification to the blockchain again, obtains the first hash value from the blockchain, and compares the first hash value with the second hash value of the decrypted file, if they are consistent, it is considered that the target file has not been tampered with, and the application file is obtained.

[0132] The application is based on blockchain data transmission tracking, and the target file checking is divided into multiple stages by the data receiver when the target file is checked, and the corresponding check voucher is required for checking in each stage, so that the processing link information of the target file at the second node can be automatically obtained by the first node, without the real-time feedback of the second node to the processing link of the target file, the tracking and positioning of the data sender to the processing link of the sent file are realized.

[0133] Embodiment 3

[0134] The application provides a blockchain transmission method of trusted data based on the blockchain transmission method of trusted data in the embodiment 1, and also provides a blockchain transmission method device of trusted data, please refer to Figure 3 , which is applied to a blockchain data sender and includes:

[0135] The file analysis module is configured to analyze the to-be-transmitted file based on a file transmission rule in response to the to-be-transmitted file sent by the application system to the first node corresponding to the blockchain data sender, and generate a target file to be transmitted.

[0136] The first processing module is configured to generate a first voucher for blockchain verification based on the target file and upload the first voucher to the blockchain storage.

[0137] The second processing module is configured to construct a file transmission channel for data transmission based on the target file, wherein the file transmission channel is a channel corresponding to file transmission of the target file on a non-blockchain chain.

[0138] The file transmission module is configured to transmit the target file to a second node corresponding to a blockchain data receiver according to the file transmission channel, and upload the first credential to the blockchain storage.

[0139] In an embodiment, the file parsing module comprises:

[0140] The first response unit is configured to generate the file transmission rule applied to the first node and the file verification rule applied to the second node based on the file transmission request of the first node in response to the file transmission request of the first node.

[0141] The first configuration unit is configured to configure the file transmission rule to the first node and the file verification rule to the second node.

[0142] The first parsing unit is configured to parse the to-be-transmitted file based on the file transmission rule to obtain a parsed file.

[0143] The first generation unit is configured to generate the target file based on the parsed file that meets the file transmission rule.

[0144] The file verification rule is adapted to the file transmission rule.

[0145] In an embodiment, the file transmission module comprises:

[0146] The data acquisition unit is configured to acquire an encryption algorithm used for encryption of the target file and a signature algorithm used for signature of the to-be-transmitted file.

[0147] The file encryption unit is configured to encrypt the target file by using the encryption algorithm to obtain an encrypted file.

[0148] The file signature unit is configured to sign the encrypted file by using the signature algorithm to obtain signature information.

[0149] The file transmission unit is configured to transmit the encrypted file and the signature information to the second node by using the file transmission channel.

[0150] In an embodiment, the encryption of the target file based on the elliptic curve key agreement algorithm comprises:

[0151] The information acquisition unit is configured to acquire a second public key corresponding to the second node.

[0152] The key negotiation unit generates a negotiation key based on the second public key and a first private key of the first node.

[0153] The negotiation encryption unit encrypts the encrypted file using the negotiation key to obtain the encrypted file.

[0154] The key pair of the first node and the second node is generated based on the same first base point in the same finite field, and the key pair includes a private key and a public key.

[0155] In an embodiment, the first public key corresponding to the first node is chained and / or transmitted to the second node through the file transmission channel, and the first public key and the first private key constitute a key pair.

[0156] In an embodiment, the signature information includes first sub-information and second sub-information, and signing the encrypted file based on an elliptic curve signature algorithm includes:

[0157] The third acquisition unit acquires a third private key of the first node, wherein the third private key is generated based on a second base point of an elliptic curve.

[0158] The information calculation unit calculates the first sub-information rG(x, y) according to the second base point and a first random number.

[0159] The second calculation unit calculates the second sub-information s=(h+dx) / r) according to the first random number, a first hash value, and the third private key.

[0160] Wherein, r is the first random number, G is the second base point, x is the horizontal coordinate of the point rG, y is the vertical coordinate of the point rG, d is the third private key, and h is the first hash value corresponding to the encrypted file.

[0161] In an embodiment, the public key corresponding to the third private key is a third public key, and the third public key is chained and / or transmitted to the second node through the file transmission channel.

[0162] The application provides a blockchain transmission method, device, equipment and storage medium of trusted data, which analyzes the to-be-transmitted file by setting a file transmission rule on the blockchain node of the data sender, determines a target file in the to-be-transmitted file that meets the transmission rule, chains a first credential of the target file, and simultaneously transmits the target file to a second node in a non-blockchain chaining consensus manner; by chaining the first credential of the target file, the target file data received by the second node through a third party is ensured to be tamper-proof, while the blockchain data processing amount is reduced and the data transmission complexity is reduced.

[0163] Embodiment 4

[0164] The application based on the blockchain data transmission tracking method of example 2 also provides a blockchain-based trusted data supervision device, please see Figure 4 , applied to the blockchain data receiver, the device comprises:

[0165] File acquisition module: for acquiring file verification rules for target file verification in response to the target file transmitted by the first node corresponding to the blockchain data sender to the second node corresponding to the data application party;

[0166] First verification module: for verifying the target file by calling the first verification credential according to the first verification stage of the file verification rule, obtaining the first verification file;

[0167] Second verification module: for verifying the first verification file by calling the second verification credential according to the second verification stage of the file verification rule, obtaining the application file corresponding to the target file.

[0168] In an embodiment, the file acquisition module comprises:

[0169] File receiving unit: in response to the file receiving request of the second node, generating the file transmission rule for the first node and the file verification rule applied to the second node based on the file receiving request;

[0170] Rule configuration unit: configure the file transmission rule to the first node, and configure the file verification rule to the second node;

[0171] Rule calling unit: based on the received target file, call the pre-configured file verification rule.

[0172] In an embodiment, the first verification credential and the second verification credential are stored on the blockchain.

[0173] In an embodiment, the first verification stage is the signature information verification of the first node, and the first verification module comprises:

[0174] First initiation unit: in response to the signature information verification, initiating the first credential transaction corresponding to the first verification credential to the blockchain;

[0175] First calling unit: according to the first credential transaction, call the first verification credential pre-stored on the blockchain;

[0176] First verification unit: verifying the signature information of the target file by using the first credential, obtaining the first verification file.

[0177] In an embodiment, the signature information includes a first sub-information and a second sub-information, and the first verification credential is generated by:

[0178] obtaining a third private key and a third public key of the first node, wherein the third private key and the third public key are generated by a key pair based on a second base point of an elliptic curve;

[0179] a first information calculation unit: calculating the first sub-information rG(x, y) according to the second base point and a first random number;

[0180] a second information calculation unit: calculating the second sub-information s=(h+dx) / r) according to the first random number, a first hash value and the third private key;

[0181] an information chaining unit: after obtaining the signature information, chaining and storing the third public key;

[0182] wherein r is the first random number, G is the second base point, x is the horizontal coordinate of the point rG, y is the vertical coordinate of the point rG, d is the third private key, and h is the first hash value of the encrypted file of the target file.

[0183] In an embodiment, the second verification stage is subjected to data trusted verification based on an elliptic curve key agreement algorithm, and the second verification module includes:

[0184] a second calling unit: obtaining a first public key of the first node and a first hash value corresponding to an encrypted file of the target file;

[0185] a key calculation unit: generating a negotiated key based on the first public key and a second private key of the second node;

[0186] a file decryption unit: decrypting the encrypted file by using the negotiated key to obtain a decrypted file;

[0187] a trusted verification unit: comparing a second hash value of the decrypted file with the first hash value, and if the first hash value is consistent with the second hash value, outputting the application file;

[0188] wherein the key pair of the first node and the second node is generated based on the same first base point in the same finite field, and the key pair includes a private key and a public key.

[0189] In an embodiment, after obtaining the application file, the method further includes:

[0190] an information querying unit: obtaining address information of a file receiving party;

[0191] a file output unit: transmitting the application file from the second node to the file receiving party according to the address information.

[0192] The blockchain-based data transmission tracking device of the present application can automatically obtain the processing link information of the target file at the second node without real-time feedback from the second node to the processing link of the target file, thereby realizing tracking and positioning of the processing link of the transmitted file by the data sender.

[0193] Embodiment 5

[0194] The present application provides an electronic device and a storage medium, such as Figure 5 As shown, the electronic device includes at least one processor, at least one memory, and computer program instructions stored in the memory.

[0195] Specifically, the processor can include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present application. The electronic device includes at least one of the following: a computer, a mobile terminal, a PC, a tablet computer, etc.

[0196] The memory can include a mass storage for data or instructions. By way of example and not limitation, the memory can include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a Universal Serial Bus (USB) drive or a combination of two or more of these. Where appropriate, the memory can include removable or non-removable (or fixed) media. Where appropriate, the memory can be internal or external to the data processing device. In certain embodiments, the memory is non-volatile solid-state memory. In certain embodiments, the memory includes read-only memory (ROM). Where appropriate, this ROM can be mask-programmed ROM, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), electrically alterable ROM (EAROM), or flash memory, or a combination of two or more of these.

[0197] The processor reads and executes the computer program instructions stored in the memory to implement any one of the blockchain transmission methods of trusted data and the blockchain-based data transmission tracking method in the above-mentioned embodiment mode one.

[0198] In one example, the electronic device can further include a communication interface and a bus. Wherein the processor, the memory, the communication interface are connected through the bus and complete the communication between each other.

[0199] The communication interface is mainly used to realize the communication between the modules, devices, units and / or equipment in the embodiments of the present application.

[0200] The bus includes hardware, software or both, which couples the components of the electronic device to each other. By way of example, and not limitation, the bus can include an accelerated graphics port (AGP) or other graphics bus, an enhanced industry standard architecture (EISA) bus, a front-side bus (FSB), a HyperTransport (HT) interconnect, an industry standard architecture (ISA) bus, an InfiniBand (IB) interconnect, a low pin count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a serial advanced technology attachment (SATA) bus, a video electronics standards board (VLB) bus, or another suitable bus or a combination of two or more of these. Where appropriate, the bus can include one or more buses. Although the present embodiments describe and show a particular bus, the present application contemplates any suitable bus or interconnect.

[0201] It needs to be clear that the present application is not limited to the specific configurations and processes described above and shown in the drawings. For the sake of brevity, detailed descriptions of well-known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between steps, after understanding the spirit of the present application.

[0202] The functional blocks shown in the structural block diagram described above can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a functional card, etc. When implemented in software, the elements of the present application are program or code segments used to perform the required tasks. The program or code segments can be stored in a machine-readable medium or transmitted through a data signal carried in a carrier wave over a transmission medium or communication link. The "machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segments can be downloaded via a computer network such as the Internet, an intranet, etc.

[0203] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, and are not intended to limit the present application; although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions recorded in the above embodiments can be modified, or some or all of the technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A blockchain transmission method of trusted data, characterized in that, The method is applied to a blockchain data sender, and the method comprises: In response to a to-be-transmitted file sent by an application system to a first node corresponding to the blockchain data sender, a target file to be transmitted is generated by analyzing the to-be-transmitted file based on a file transmission rule, including: in response to a file transmission request of the first node, a file transmission rule applied to the first node and a file verification rule applied to a second node are generated based on the file transmission request; the file transmission rule is configured to the first node, and the file verification rule is configured to the second node; the to-be-transmitted file is analyzed based on the file transmission rule to obtain an analyzed file; the target file is generated based on the analyzed file that meets the file transmission rule; wherein the file verification rule is adapted to the file transmission rule; According to the target file, a first credential for blockchain verification is generated and uploaded to a blockchain storage; Based on the target file, a file transmission channel for data transmission is constructed, wherein the file transmission channel is a channel corresponding to file transmission of the target file on a non-blockchain chain; According to the file transmission channel, the target file is transmitted to a second node corresponding to a blockchain data receiver, and the first credential is uploaded to the blockchain storage. 2.The method of claim 1, wherein, Transmitting the target file comprises: Obtaining an encryption algorithm for encrypting the target file and a signature algorithm for signing the transmitted file; Encrypting the target file by using the encryption algorithm to obtain an encrypted file; Signing the encrypted file by using the signature algorithm to obtain signature information; Transmitting the encrypted file and the signature information to the second node by using the file transmission channel. 3.The method of claim 2, wherein, Encrypting the target file based on an elliptic curve key agreement algorithm comprises: Obtaining a second public key corresponding to the second node; Generating a negotiated key based on the second public key and a first private key of the first node; Encrypting the encrypted file by using the negotiated key to obtain the encrypted file; Wherein, the key pair of the first node and the second node is generated based on the same first base point in the same finite field, and the key pair includes a private key and a public key. 4.The method of claim 3, wherein, The first public key corresponding to the first node is chained and / or transmitted to the second node through the file transmission channel, and the first public key and the first private key constitute a key pair. 5.The method of claim 2, wherein, The signature information includes first sub-information and second sub-information, and signing the encrypted file based on an elliptic curve signature algorithm comprises: Obtaining a third private key of the first node, wherein the third private key is generated based on a second base point of an elliptic curve; According to the second base point and a first random number, the first sub-information rG(x, y) is calculated; According to the first random number, a first hash value and the third private key, the second sub-information s=(h+dx) / r) is calculated; Wherein, r is the first random number, G is the second base point, x is the horizontal coordinate of point rG, y is the vertical coordinate of point rG, d is the third private key, and h is the first hash value corresponding to the encrypted file. 6.The method of claim 5, wherein, The third private key corresponds to a third public key, and the third public key is chained and / or transmitted to a second node through the file transmission channel. Applied to a blockchain data sender, comprising:

7. A blockchain method and apparatus for transmitting trusted data, characterized in that, A file analysis module: for responding to a to-be-transmitted file sent by an application system to a first node corresponding to the blockchain data sender, analyzing the to-be-transmitted file based on a file transmission rule to generate a target file to be transmitted, including: in response to a file transmission request of the first node, generating a file transmission rule applied to the first node and a file verification rule applied to a second node based on the file transmission request; the file transmission rule is configured to the first node, and the file verification rule is configured to the second node; based on the file transmission rule, the to-be-transmitted file is analyzed to obtain an analysis file; based on the analysis file conforming to the file transmission rule, the target file is generated; wherein the file verification rule is adapted to the file transmission rule; A first processing module: for generating a first credential for blockchain verification according to the target file and uploading to a blockchain storage; A second processing module: for constructing a file transmission channel for data transmission based on the target file, wherein the file transmission channel is a channel corresponding to the file transmission of the target file on the non-blockchain chain; A file transmission module: for transmitting the target file to a second node corresponding to a blockchain data receiver according to the file transmission channel, and uploading the first credential to the blockchain storage. Comprising:

8. An electronic device, comprising: At least one processor, at least one memory, and computer program instructions stored in the memory, when the computer program instructions are executed by the processor, implement the method of any one of claims 1-6. When the computer program instructions are executed by the processor, the method of any one of claims 1-6 is implemented.

9. A storage medium having stored thereon computer program instructions, characterized in that, ​

Citation Information

Patent Citations

  • E-mail encryption method, first client and blockchain system

    CN111464494A