Blockchain-based File Transfer Method, Device, Electronic Device, and Storage Medium

By building a multi-party shared transfer matrix structure on the blockchain network, the problem of secure communication and access control of file data in the decentralized storage environment is solved, and the secure transmission and access of data is realized, which is suitable for secure data sharing and financial services.

CN115834571BActive Publication Date: 2025-07-29INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211471480.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-23
Publication Date
2025-07-29
Estimated Expiration
2042-11-23

AI Technical Summary

Technical Problem

In a decentralized storage environment, there are challenges in secure communication and access control of file data. Eavesdroppers can splice complete file information by mastering the location of storage nodes. In addition, traditional blockchain technology has problems such as large resource usage, single server failure, and data loss and privacy leakage.

Method used

By building a multi-party shared transfer matrix structure on the blockchain network, using the encoding matrix and data matrix to generate the transfer matrix, and distribute it to multiple decentralized storage nodes, combining the decoding matrix to reconstruct files, it provides consistency consensus synchronization capabilities to ensure safe data transmission and access.

Benefits of technology

It realizes secure transmission and access of file data in a decentralized environment, prevents eavesdroppers from obtaining complete data, improves the security and reliability of data transmission, and is suitable for secure data sharing and financial business scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115834571B_ABST
    Figure CN115834571B_ABST
Patent Text Reader

Abstract

The present invention can be used in the field of blockchain technology in the financial field. The present invention provides a blockchain-based file transmission method and apparatus. The corresponding method includes: generating a data matrix corresponding to the file to be sent according to the encoding matrix of the pre-stored certificate in the blockchain and the file to be sent; generating a transfer matrix according to the data matrix and the encoding matrix, and uploading the transfer matrix to the blockchain; and distributing the data matrix to multiple decentralized storage nodes. The present invention makes full use of the characteristics of multi-party sharing and trusted evidence storage of the blockchain, constructs a multi-party shared transfer matrix structure on the blockchain network, and at the same time provides a method for transmitting data through multiple channels in the above scenario, which not only facilitates the secure transmission of data, but also provides the ability of consistent consensus synchronization, effectively solves the problems of secure communication and access of decentralized file data, and is convenient for wide application in business scenarios such as secure data sharing and financial services, and has high promotion value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the technical field of blockchain, specifically to the technical field of secure channel data transmission in the blockchain scenario, and particularly to a file transmission method and device based on blockchain. Background Art

[0002] The development of blockchain applications has led to a geometric exponential growth in the scale of on-chain data. Due to the limitation of the on-chain storage bottleneck in traditional blockchain technology, centralized storage technology is adopted for off-chain storage, which has problems such as large resource consumption, single-point server failure, data loss, and privacy leakage, and does not conform to the principle of decentralized data protection. The decentralized storage technology splits files into multiple data fragments to achieve multi-point and multi-location decentralized storage, effectively solving the problems of data backup and sharing in multiple copies, but at the same time, it also poses higher security requirements for the communication and access of data files.

[0003] InterPlanetary File System (IPFS) is a decentralized distributed file system that aims to connect all computer devices with the same file system. By splitting and storing files and multi-point concurrent transmission, it saves content storage space and improves the transmission efficiency of the distributed file system. Its working principle is similar to the web, but different from the centralized web, IPFS is a single decentralized file storage cluster.

[0004] In the decentralized open environment, file data communication and transmission bring new challenges: one is that data files are split and stored in different physical locations, and there is a risk of data leakage at each physical node; the other is that although file fragments are stored in different physical locations, eavesdroppers can piece together complete file information as long as they know the locations of the storage nodes. Currently, in terms of decentralized file security communication and access control, encryption technology is used for access control to establish a logical isolation mechanism similar to a "circle of friends", but there is still little research on the security of decentralized communication. To achieve enterprise-level secure and reliable file communication and transmission functions, there is still much room for improvement in the capabilities of decentralized file data security transmission and access control. Summary of the Invention

[0005] The present invention can be used in the technical field of blockchain applications in the financial aspect, and can also be used in any field other than the financial field. The present invention makes full use of the characteristics of multi-party sharing and trusted deposit in the blockchain, constructs a multi-party shared transfer matrix structure on the blockchain network, and at the same time provides a method for transmitting data through multiple channels in the above scenario, which is convenient for secure data transmission and provides consistency consensus synchronization ability, ensuring that eavesdroppers cannot obtain complete data information for storage nodes, effectively solving the problems of decentralized file data security communication and access, and being convenient for wide application in business scenarios such as secure data sharing and financial services, and having high promotion value.

[0006] To solve the technical problems in the background art of the present application, the present invention provides the following technical solutions:

[0007] In a first aspect, the present invention provides a blockchain-based file transmission method applicable to a file sender, including:

[0008] Generating a data matrix corresponding to the file to be sent according to the encoding matrix of the pre-stored certificate in the blockchain and the file to be sent;

[0009] Generating a transfer matrix according to the data matrix and the encoding matrix, and uploading the transfer matrix to the blockchain;

[0010] Distributing the data matrix to a plurality of decentralized storage nodes.

[0011] In one embodiment, the generating a data matrix corresponding to the file to be sent according to the encoding matrix of the pre-stored certificate in the blockchain and the file to be sent includes:

[0012] Determining the length of the file to be sent according to the total number of the decentralized storage nodes, the number of the centralized storage nodes selected during the distribution process, and the number of the decentralized storage nodes for data repair;

[0013] Determining the data matrix space according to the length;

[0014] Filling the file to be sent into the data matrix with the space determined according to the encoding matrix to generate a data matrix corresponding to the file to be sent.

[0015] In one embodiment, the generating a transfer matrix according to the data matrix and the encoding matrix includes:

[0016] Multiplying the data matrix by the encoding matrix to generate the transfer matrix.

[0017] In one embodiment, the distributing the data matrix to a plurality of decentralized storage nodes includes:

[0018] Dividing the data matrix into a plurality of data segments;

[0019] Transmitting each data segment to the corresponding decentralized storage node through a plurality of physical channels.

[0020] In a second aspect, the present invention provides a blockchain-based file transmission method applicable to a file receiver, including:

[0021] Generating a decoding matrix according to the transfer matrix sent in the blockchain and the encoding matrix of the pre-stored certificate in the blockchain;

[0022] Receive data matrix fragments sent by multiple decentralized storage nodes respectively;

[0023] Generate a file to be received according to the decoding matrix and the multiple data matrix fragments.

[0024] In one embodiment, the generating a file to be received according to the decoding matrix and the multiple data matrix fragments includes:

[0025] Determine the length of the file to be received according to the total number of the decentralized storage nodes, the number of the corresponding decentralized storage nodes in the process of receiving the matrix fragments, and the number of the decentralized storage nodes for data repair;

[0026] Reconstruct the multiple data matrix fragments according to the length through the decoding matrix to generate the file to be received.

[0027] In a third aspect, the present invention provides a blockchain-based file transmission device applicable to a file sender, and the device includes:

[0028] A data matrix generation module, configured to generate a data matrix corresponding to the file to be sent according to a coding matrix pre-stored in a blockchain and the file to be sent;

[0029] A transfer matrix generation module, configured to generate a transfer matrix according to the data matrix and the coding matrix, and upload the transfer matrix to the blockchain;

[0030] A data matrix distribution module, configured to distribute the data matrix to multiple decentralized storage nodes.

[0031] In one embodiment, the data matrix generation module includes:

[0032] A first length determination unit, configured to determine the length of the file to be sent according to the total number of the decentralized storage nodes, the number of the selected centralized storage nodes in the distribution process, and the number of the decentralized storage nodes for data repair;

[0033] A matrix space determination unit, configured to determine the data matrix space according to the length;

[0034] A data matrix generation unit, configured to fill the file to be sent in the data matrix after the space is determined according to the coding matrix to generate a data matrix corresponding to the file to be sent.

[0035] In one embodiment, the transfer matrix generation module includes:

[0036] A transfer matrix generation unit, configured to multiply the data matrix by the coding matrix to generate the transfer matrix.

[0037] In one embodiment, the data matrix distribution module includes:

[0038] A data segment generation unit, configured to divide the data matrix into multiple data segments;

[0039] A data segment transmission unit, configured to transmit each data segment to a corresponding decentralized storage node through multiple physical channels.

[0040] Fourthly, the present invention provides a blockchain-based file transmission device applicable to a file receiver, and the device includes:

[0041] A decoding matrix generation module, configured to generate a decoding matrix according to a transfer matrix sent in the blockchain and an encoding matrix pre-stored in the blockchain;

[0042] A data matrix segment receiving module, configured to respectively receive data matrix segments sent by multiple decentralized storage nodes;

[0043] A file generation module, configured to generate a file to be received according to the decoding matrix and the multiple data matrix segments.

[0044] In one embodiment, the file generation module includes:

[0045] A length determination second unit, configured to determine the length of the file to be received according to the total number of decentralized storage nodes, the number of corresponding decentralized storage nodes in the process of receiving the matrix segments, and the number of decentralized storage nodes for repairing data;

[0046] A received file generation unit, configured to reconstruct multiple data matrix segments according to the length through the decoding matrix to generate the file to be received.

[0047] Fifthly, the present invention provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the steps of the blockchain-based file transmission method are implemented.

[0048] Sixthly, the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the blockchain-based file transmission method are implemented.

[0049] As can be seen from the above description, the embodiments of the present invention provide a blockchain-based file transmission method and device. The corresponding method includes: first, generating a data matrix corresponding to a file to be sent according to an encoding matrix pre-stored in the blockchain and the file to be sent; then, generating a transfer matrix according to the data matrix and the encoding matrix, and uploading the transfer matrix to the blockchain; finally, distributing the data matrix to multiple decentralized storage nodes.

[0050] The present invention makes full use of the characteristics of multi-party sharing and trustworthy evidence storage of the blockchain, constructs a multi-party shared transfer matrix structure on the blockchain network, and at the same time provides a method for transmitting data through multiple channels, which not only facilitates the secure transmission of data but also provides the ability of consistent consensus synchronization, ensuring that eavesdroppers cannot obtain complete data information for storage nodes, effectively solving the problems of secure communication and access of decentralized file data, being convenient for wide application in business scenarios such as secure data sharing and financial services, having high promotion value, and better solving the problems of security and reliability in the process of decentralized file transmission and access. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0052] Figure 1 It is a schematic flowchart of the blockchain-based file transmission method in the embodiment of the present invention (applicable to the file sender);

[0053] Figure 2 It is a schematic flowchart of step 100 of the blockchain-based file transmission method in the embodiment of the present invention;

[0054] Figure 3 It is a schematic flowchart of step 200 of the blockchain-based file transmission method in the embodiment of the present invention;

[0055] Figure 4 It is a schematic flowchart of step 300 of the blockchain-based file transmission method in the embodiment of the present invention;

[0056] Figure 5 It is a schematic flowchart of the blockchain-based file transmission method in the embodiment of the present invention (applicable to the file receiver);

[0057] Figure 6 It is a schematic flowchart of step 900 of the blockchain-based file transmission method in the embodiment of the present invention;

[0058] Figure 7 It is a structural diagram of the blockchain distributed channel in the specific implementation manner of the present invention;

[0059] Figure 8 It is a structural diagram of the decentralized storage node (DSS) of the blockchain distributed channel in the specific implementation manner of the present invention;

[0060] Figure 9Structural diagram of a blockchain node of a blockchain distributed channel in a specific embodiment of the present invention;

[0061] Figure 10 Frame diagram of a file decentralized storage system in a specific embodiment of the present invention;

[0062] Figure 11 Flowchart of a file transmission method based on blockchain in a specific embodiment of the present invention

[0063] Figure 12 Block diagram of a file transmission device based on blockchain in an embodiment of the present invention (applicable to a file sender);

[0064] Figure 13 Block diagram of a data matrix generation module 10 of a file transmission device based on blockchain in an embodiment of the present invention;

[0065] Figure 14 Block diagram of a transfer matrix generation module 20 of a file transmission device based on blockchain in an embodiment of the present invention;

[0066] Figure 15 Block diagram of a data matrix distribution module 30 of a file transmission device based on blockchain in an embodiment of the present invention;

[0067] Figure 16 Block diagram of a file transmission device based on blockchain in an embodiment of the present invention (applicable to a file receiver);

[0068] Figure 17 Block diagram of a file generation module 90 of a file transmission device based on blockchain in an embodiment of the present invention;

[0069] Figure 18 Structural schematic diagram of an electronic device in an embodiment of the present invention. Specific embodiments

[0070] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, 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 of the present invention without creative efforts shall fall within the scope of protection of the present invention.

[0071] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0072] It should be noted that the terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices. Without conflict, the embodiments in this application and the features in the embodiments can be combined with each other. The following will refer to the drawings and combine with the embodiments to detail this application.

[0073] In the technical solution of this application, the acquisition, storage, use, processing, etc. of data all comply with the relevant regulations of national laws and regulations.

[0074] The embodiments of the present invention provide a specific implementation manner of a blockchain-based file transmission method applicable to a file sender. Refer to Figure 1 , and the method specifically includes the following content:

[0075] Step 100: Generate a data matrix corresponding to the file to be sent according to the encoding matrix of the pre-stored certificate in the blockchain and the file to be sent;

[0076] Specifically, by sending to the blockchain through a secure channel and pre-defining the relationship between the encoding matrix and the data matrix to be generated, the file to be sent is converted into the data matrix corresponding to the file to be sent according to this relationship and the encoding matrix of the pre-stored certificate in the blockchain.

[0077] Step 200: Generate a transfer matrix according to the data matrix and the encoding matrix, and upload the transfer matrix to the blockchain;

[0078] It can be understood that uploading the transfer matrix to the blockchain can construct a multi-party shared transfer matrix structure, and thus make full use of the characteristics of multi-party sharing and trusted deposit of the blockchain.

[0079] Step 300: Distribute the data matrix to multiple decentralized storage nodes.

[0080] It can be understood that the decentralized storage node is a data storage node on the Data Security Channel (DSCC). It randomly selects k physical channels from n physical channels and transmits data to k centralized storage nodes. The DSCC provides a blockchain-based infrastructure, shares the transfer matrix as the public key among various DSS nodes.

[0081] As can be seen from the above description, an embodiment of the present invention provides a blockchain-based file transmission method, including: first, generating a data matrix corresponding to the file to be sent according to the encoding matrix of the pre-stored certificate in the blockchain and the file to be sent; then, generating a transfer matrix according to the data matrix and the encoding matrix, and uploading the transfer matrix to the blockchain; finally, distributing the data matrix to multiple decentralized storage nodes.

[0082] The present invention introduces the Blockchain Secure Channel (DSCC). The DSCC defines the correspondence between the encoding matrix and the message matrix, and stores the encoding matrix in the blockchain network. When the sender sends file information, the file is encoded into a data matrix, and the transfer matrix is uploaded to the blockchain, similar to the public key in the PKI system. At the same time, the data matrix is distributed to n channels; when the receiver obtains the data, it obtains the transfer matrix from the blockchain, forms a decoding matrix, and restores the file. In the decentralized storage file directory system, the data owner owns the copyright of the data file it uploads and can select the physical channel for data transmission. The target user collects the file data according to the physical channel for transmission and aggregates and synthesizes the complete data file.

[0083] In one embodiment, referring to Figure 2 , step 100 includes:

[0084] Step 101: Determine the length of the file to be sent according to the total number of the decentralized storage nodes, the number of the centralized storage nodes selected during the distribution process, and the number of the decentralized storage nodes used for data repair;

[0085] Step 102: Determine the data matrix space according to the length;

[0086] Step 103: Fill the file to be sent in the data matrix after the space is determined according to the encoding matrix to generate the data matrix corresponding to the file to be sent.

[0087] In steps 101 to 103, execute the upload processing function:

[0088] |F| = Transfer(k, n, d)

[0089] Among them, the output parameter |F| represents the data length of the uploaded file F, the input parameter k represents the number of nodes connected to the DSS, n represents the total number of DSSs in the decentralized storage system, and d represents the number of nodes participating in data repair during the repair process. |F| is decomposed into S q-ary vectors, that is: u = (u1, u2,..., u S ), and u is inserted into the message matrix M composed of the original file data and redundant data.

[0090] In step 103, according to the file chunking strategy, the file is processed for physical channel chunking. Specifically, let the file length of F be |F|. At the sending end, F is decomposed into chunks of length S and encoded with the transfer matrix C. It is expressed as: u = (u1, u1,..., u S ).

[0091] Among them, S = kα, indicating that the chunks can be sent through different k physical channels, and:

[0092] α = d - k + 1, d = n - 1

[0093] The message matrix u = (u1, u1,..., u S ) is filled with the message matrix M of size d×α. The general form of the message matrix is formalized as follows:

[0094]

[0095] Select the encoding matrix ψ of size k×d, that is, the Cauchy matrix. The Cauchy matrix satisfies the condition that for each matrix element ψ i,j , it has the property ψ i,j = 1 / (x i - y j ), and for any i = 1,..., k, j = 1,.., d, x i ≠ y j . Formally, ψ is invertible and is expressed as follows:

[0096]

[0097] The DSCC construction matrix is the product of the encoding matrix and the information matrix, with a size of k×α. Formally, it is expressed as follows:

[0098] C(n, k, d) = ψ × M

[0099]

[0100] The data blocks transmitted through the physical channels are the row data of the DSCC matrix, and are formally expressed as:

[0101]

[0102] In one embodiment, referring to Figure 3 , step 200 specifically includes:

[0103] Step 201: Multiply the data matrix by the encoding matrix to generate the transfer matrix.

[0104] Similar to the public key in the PKI system, using the transfer matrix as the public key of each node in the block, making full use of the characteristics of multi-party sharing and trusted evidence storage in the blockchain, which is convenient for secure data transmission and provides the ability of consistent consensus synchronization.

[0105] In one embodiment, referring to Figure 4 , step 300 specifically includes:

[0106] Step 301: Divide the data matrix into multiple data segments;

[0107] Step 302: Transmit each data segment through multiple physical channels to the corresponding decentralized storage nodes.

[0108] It can be understood that in a blockchain network, a decentralized storage system is a storage system composed of a large number of network nodes, and the damage of potential nodes poses high requirements for data reliability. Therefore, the data in the decentralized storage system should have a certain degree of redundancy to ensure that when a node is damaged, the corresponding data copy can be obtained from other nodes to ensure the integrity of the file data. When implementing step 301 and step 302, specifically: using a decentralized file storage method, decomposing the file F into a model DSS[n,k,d] of S q-ary vectors, and the file F can be expressed as a sequence of q-ary symbols:

[0109] u={u1u2...u S}

[0110] where |u| is the length of the file. Assuming that the file is stored in n storage nodes, for simplicity of processing, the file length |u| is expressed as an integer multiple of the parameter S. That is: |u| = LS, let L = 1, and S is decomposed into k segments of length α and stored in n nodes respectively.

[0111] An embodiment of the present invention provides a specific implementation manner of a blockchain-based file transmission method applicable to a file recipient. Referring to Figure 5 , this method specifically includes the following content:

[0112] Step 700: Generate a decoding matrix according to the transfer matrix sent in the blockchain and the encoding matrix pre-stored in the blockchain;

[0113] The receiver (target user) obtains the encoding matrix from the blockchain and generates the encoding matrix, i.e., the decryption data matrix; specifically, the file data collection function is executed

[0114] F = Construct(k, n, d)

[0115] Among them, the input parameter k represents the number of nodes connected to the DSS, n represents the total number of DSSs in the decentralized storage system, and d represents the number of nodes participating in data repair during the repair process.

[0116] Step 800: Receive the data matrix fragments sent by multiple decentralized storage nodes respectively;

[0117] Specifically, the target user sends a decentralized data file query request to the DSS node; the transaction processing module of the DSS node accepts the file data upload request and assembles the transaction execution message;

[0118] Step 900: Generate the file to be received according to the decoding matrix and the multiple data matrix fragments.

[0119] Obtain the encoding matrix ψ from the blockchain and generate the encoding matrix, i.e., the decryption data matrix; the receiver decrypts the message matrix and outputs the length |F| of the received file data.

[0120] In one embodiment, see Figure 6 , Step 900 includes:

[0121] Step 901: Determine the length of the file to be received according to the total number of decentralized storage nodes, the number of corresponding decentralized storage nodes during the process of receiving the matrix fragments, and the number of decentralized storage nodes used for data repair;

[0122] Step 902: Reconstruct the multiple data matrix fragments according to the length through the decoding matrix to generate the file to be received.

[0123] In Step 901 and Step 902, first execute the file data collection function

[0124] F = Construct(k, n, d)

[0125] Among them, the input parameter k represents the number of nodes connected to the DSS, n represents the total number of DSSs in the decentralized storage system, and d represents the number of nodes participating in data repair during the repair process.

[0126] On the other hand, when a node fails and there is data loss or damage, download data from other nodes for patching. Introduce a reversible encoding matrix ψ(n×d) for regularly performing the reconstruction and repair processes. The constructed matrix C is expressed as the product of the encoding matrix ψ and the message matrix M, i.e.:

[0127] C = ψ × M

[0128] The method for file reconstruction is as follows:

[0129] Input: (F, n, k, d)

[0130] Output: The length of the received file |F|

[0131] The sender encodes F to generate the code matrix C; the sender sends the encoding matrix ψ to the blockchain and stores the evidence in the blockchain, similar to storing the public key in the blockchain infrastructure; the sender randomly selects k physical channels from n physical channels; the sender sends the data block Block through the physical channels C ; The receiver (target user) obtains the encoding matrix ψ from the blockchain and generates the encoding matrix, that is, the decryption data matrix; the receiver decrypts the message matrix and outputs the length of the received file data |F|.

[0132] In one embodiment, the file transmission method based on the blockchain further includes:

[0133] Step 1000: Determine the file visitor permissions according to the access tree.

[0134] Let the access tree be T, and the non-leaf nodes of T are represented as threshold gates, and their values are determined by the child nodes and the threshold. Formally, the non-leaf node nonLeaf is represented as:

[0135] nonLeaf(x) = {v x , Children x , Gate x , λ x}

[0136] where v x is the threshold of the non-leaf node x, Children x are the children of x, Gate x is the threshold gate, λ x = num(x) is the threshold of x. When Gate x = OR, that is, the OR gate, λ x = 1; when Gate x = AND, that is, the AND gate, λ x = num(x) represents the number of children of x.

[0137] The leaf node leaf is represented as:

[0138] leaf(x) = {Did x , λ x}

[0139] where Didx is the digital identity identifier of x, λ x is the threshold for setting different access permissions, defined as:

[0140]

[0141] Let T x represent the query result of the access tree at node x, T x (Did A ) represents the query result of the file directory permissions of user A's digital identity identifier Did A .

[0142] User identity key generation:

[0143] Execute the key generation algorithm to output the key, allowing the decryption of the encrypted ciphertext. If the access directory tree T(u) ≥ 1, it indicates that the target user meets the authentication conditions for accessing the tree data file.

[0144] The steps of the key generation algorithm are as follows:

[0145] Input: (u, M k )

[0146] Output: User identity private key D

[0147] For each node x of the directory tree T, select a polynomial q x ; for each node x, set the order d x of the polynomial q x such that d x = k x -1, where k x represents the threshold T of node x of the directory tree T x , where 0 ≤ k x ≤ num x , num x represents the number of child nodes of node x; for the root node r of T, combine the values of other child nodes and set q r (0) = y and d r ; for other nodes x, set q x (0) = q parent(x) (index(x)), select d x other random nodes to complete the definition of q x . Query the public key matrix ψ and set a unified secret parameter value for the target user:

[0148]

[0149] Finally, output the user identity private key D = D x × ψ.

[0150] Query and update the access tree, update the leaf node and non-leaf node function settings, broadcast the access tree and public key to other blockchain nodes to achieve consistent synchronization.

[0151] In a specific embodiment, the present invention also provides a specific embodiment of a blockchain-based file transfer method, which specifically includes the following contents.

[0152] Brief introduction to terminology:

[0153] Digital Identity: refers to the use of digital information to depict an individual's identifiable identity, condensing real identity information into public / private keys in the form of digital codes, so that the individual's behavioral information can be bound, queried, and verified.

[0154] Blockchain: A shared accounting solution that uses cryptography to ensure access security, P2P communication technology to achieve peer-to-peer communication, a consensus mechanism to ensure the legitimacy of accounting, and a chain structure to store data to achieve tamper-proof common accounting.

[0155] Decentralized storage: refers to the storage of data on multiple independent devices in a decentralized, untrusted network environment, breaking the monopoly of centralized storage, solving the problem of a single storage server becoming a bottleneck for system performance, and meeting the needs of more secure, reliable, and controllable storage.

[0156] The InterPlanetary File System (IPFS) is a peer-to-peer distributed file system designed to connect all computer devices with the same file system, similar to the web, but unlike the centralized web, IPFS is a single decentralized file storage cluster.

[0157] See also Figure 7 The specific application implementation of the present invention also provides a secure and reliable blockchain distributed channel system, which includes: 1. DSS node 2, blockchain node 3, and eavesdropping client 4.

[0158] Client 1: Responsible for providing file upload services for senders and file download services for receivers. It is responsible for initiating smart contract deployment requests, decentralized storage transaction requests, decentralized storage query requests, etc. A, B, and C in the figure are connected to DSS nodes and are all clients.

[0159] DSS Node 2: This is a decentralized storage node responsible for receiving file read and write requests from Client 1, performing distributed file read and write operations, and storing transaction information on the blockchain node. Client A and Client B in the present invention each access a DSS node, issuing file read requests through the DSS node and receiving file read results.

[0160] Blockchain Node 3: A node that completes functions such as transaction execution, transaction verification, transaction broadcasting, consensus, and storage. It has the general characteristics of a blockchain. A file reading instruction is initiated through the client, and the transaction records after the execution of the smart contract for file reading, writing, and storage will also be saved on the blockchain.

[0161] Eavesdropping Client 4: Connects to the DSS node and provides a message listening channel for eavesdroppers to detect the security of data transmission.

[0162] Based on the above blockchain distributed channel system, the file upload and distribution processes in the blockchain-based file transfer method provided by the specific application implementation manner of the present invention are specifically as follows:

[0163] The file data is divided into k data fragments and transmitted through k physical channels respectively. The upload processing function is mainly executed:

[0164] |F| = Transfer(k, n, d)

[0165] Among them, the output parameter |F| represents the data length of the uploaded file F, the input parameter k represents the number of nodes connected to the DSS, the input parameter n represents the total number of DSSs in the decentralized storage system, and the input parameter d represents the number of nodes participating in data repair during the repair process. |F| is decomposed into S q-ary vectors, that is: u = (u1, u2,..., u S ), and u is inserted into the message matrix M composed of the original file data and redundant data.

[0166] A data security channel (DSCC) is introduced. The sender randomly selects k physical channels from n physical channels and transmits the data to k nodes. The DSCC provides a blockchain-based infrastructure and shares the encapsulation matrix as the public key among the DSS nodes.

[0167] Correspondingly, the file download and reconstruction process is: execute the file data collection function

[0168] F = Construct(k, n, d)

[0169] Among them, the input parameter k represents the number of nodes connected to the DSS, the input parameter n represents the total number of DSSs in the decentralized storage system, and the input parameter d represents the number of nodes participating in data repair during the repair process.

[0170] When there is data loss or damage, data is downloaded from other nodes for patching. A reversible coding matrix ψ(n×d) is introduced for periodically performing the reconstruction and repair processes. The constructed matrix C is expressed as the product of the coding matrix ψ and the message matrix M, that is:

[0171] C = ψ × M

[0172] In addition, when there is a request for adding file chunks, the hash aggregation function is called to aggregate the file chunk hashes of each child node and the multi-subject digital identities to generate a hash value:

[0173] Let Block c represent the data format of file chunks. Formally:

[0174] Block C =(H c , C k , Did, ψ,..., chksum)

[0175] where H C is the encrypted form of the content hash link, C k is the sharded data according to the physical channel, Did is the digital identity id of the target user, and ψ is the encoding matrix (public key) stored in the blockchain. See Table 1 for the data format of file chunks:

[0176] Table 1 Data Format of File Chunks

[0177]

[0178] Furthermore, the target user B sends a decentralized data file query request to the DSS node through the client; the transaction processing module of the DSS node accepts the file data upload request and assembles the transaction execution message; looks up the distributed hash address Hc according to the target user Did, organizes the digital identity Did and the threshold Deta, and uploads them to the blockchain; executes the smart contract, and according to the access tree T and Did, outputs the judgment result of whether it conforms to the access tree. If the output result is non-zero, it outputs the decrypted file directory link H, otherwise it rejects; executes the file data collection function:

[0179] F = Construct(k, n, d)

[0180] where the input parameter k represents the number of nodes connected to the DSS, n represents the total number of DSSs in the decentralized storage system, and d represents the number of nodes participating in data repair during the repair process.

[0181] In addition, the specific application example of the present invention also provides a decentralized storage node (DSS) structure of a secure and reliable blockchain distributed channel. See Figure 8 , including a communication module 21, a file reconstruction module 22, a file repair module 23, and a content sharding module 24. Specifically:

[0182] The communication module 21: is responsible for establishing a secure physical channel for the DSS node 2 and realizing the message sending and receiving of decentralized file storage.

[0183] File Upload and Reconstruction Module 22: Responsible for providing services for retrieving and collecting file data for target users, establishing connections with DSS nodes storing data files, and downloading and collecting file data from DSS nodes distributed in different physical locations to obtain all file data.

[0184] File Patching Module 23: Responsible for file data repair. When a node fails and there is data loss or corruption, it downloads data from other nodes for patching. A reversible coding matrix ψ(n×d) is introduced for periodically performing reconstruction and repair processes. The constructed matrix C is expressed as the product of the coding matrix ψ and the message matrix M, i.e.:

[0185] C = ψ × M

[0186] The File Sharding Module 24 is responsible for, according to the request for increasing file chunks, calling the hash aggregation function to hash the file chunks of each sub-node and aggregate the multi-subject digital identities to generate a hash value:

[0187] See Figure 9 , the blockchain provided by the specific application example of the present invention includes:

[0188] Communication Module 31, Contract Processing Module 32, Access Control Module 33, Consensus Verification Module 34.

[0189] Communication Module 31: Responsible for communication interaction between nodes, and completing general blockchain node communication information, including sending and receiving contract transaction information, consensus information, block synchronization information, network status information, etc.

[0190] Contract Processing Module 32: Responsible for receiving contract transaction information from Communication Module 31, generating a unique contract identifier, assembling the unique contract identifier, input parameters, etc. into a smart contract transaction, calling the smart contract and executing it.

[0191] Access Control Module 33: Responsible for querying and updating the access tree according to the user's digital identity, obtaining the user's access rights through the access tree; at the same time, combining the digital identity and access rights to generate the user's identity key.

[0192] Consensus Verification Module 34: Responsible for performing consensus processing on the received transaction requests. If consensus is reached, it calls the Smart Contract Module 23, executes the smart contract, and finally forms a record for future audit traceability or verification.

[0193] See Figure 10 , the distributed storage system provided by the specific application example of the present invention includes: Customer Access Layer 41, File Distributed Storage Network 42, Blockchain Network 43.

[0194] Client Access Layer 41: Responsible for providing client software for operator access, facilitating the initiation of decentralized storage requests and receiving decentralized storage results. The client can publish chain codes on the blockchain platform. After the client generates upload or download behavior data, it can call the chain code to initiate a transaction request, upload the behavior data to the chain, and submit it to the physical channels corresponding to each scenario according to the client's usage scenario (the client can directly send the client behavior data without processing, and the specific data processing logic can be executed by the scenario provider). The provider can also publish chain codes, query data belonging to its own physical channel, and process and analyze the data on its own physical channel.

[0195] File Decentralized Storage Network 42: Responsible for, according to the upload (download), query, etc. requests submitted by the client, configuring parameters, data, business logic, etc. through decentralized storage logic, and at the same time encrypting to form file block data, and broadcasting its hash value to the Blockchain Network 43. The scenario provider can also publish a joint operation chain code, and call the DSS node service through the chain code. Each blockchain node has a corresponding DSS node service, and the chain code can specify which DSS services are required for joint calculation. The scenario provider initiates a joint calculation request through the chain code. Originally, the data of providers on other physical channels cannot be accessed by each other. Through DSS, decentralized data storage can be carried out without leaking their respective data.

[0196] Blockchain Network 43: Responsible for receiving and decrypting the file decentralized storage message, triggering the preset smart contract logic, and forming the log result of decentralized storage. The blockchain network can provide hosted nodes, and for providers with capabilities, it can also provide local node deployment. Each scenario provider has its own physical channel on the blockchain, and the scenario provider cannot obtain the data information of other physical channels, that is, the data of other providers.

[0197] See Figure 11 , based on the above secure and reliable blockchain distributed channel system, decentralized storage system, blockchain, and decentralized storage node (DSS) structure, the blockchain-based file transfer method provided by the present invention includes:

[0198] Uploading and Distributing File Data:

[0199] Step S501: The data owner initiates a file data upload request through the client.

[0200] Step S502: After the transaction processing module of the DSS node receives the file data upload request, it generates a transaction processing request message.

[0201] Step S503: Execute the file upload process Transfer: Divide the file data into k data fragments and transmit them on k physical channels respectively.

[0202] Step S504: Query and update the access tree based on the user's digital identity, obtain the user's access rights through the access tree; meanwhile, generate a user identity key by combining the digital identity and the access rights.

[0203] Step S505: Query and update the access tree, update the function settings of the leaf nodes and non-leaf nodes, and broadcast the access tree and the public key to other blockchain nodes to achieve consistent synchronization.

[0204] Step S506: Process the physical channel chunking of the file according to the file chunking strategy. The file chunking algorithm is as follows:

[0205] Step S507: Return the successful status of the uploaded file data to the client of the data owner.

[0206] Downloading and collecting file data:

[0207] Step S601: The target user B sends a decentralized data file query request to the DSS node through the client.

[0208] Step S602: The transaction processing module of the DSS node accepts the file data upload request and assembles the transaction execution message.

[0209] Step S603: Find the distributed hash address Hc according to the target user's Did, organize the digital identity Did and the threshold Deta, and upload them to the blockchain.

[0210] Step S604: Execute the smart contract, and output the judgment result of whether it conforms to the access tree according to the access tree T and Did. If the output result is non-zero, output the decrypted file directory link H, otherwise reject.

[0211] Step S605: Execute the file data collection function.

[0212] Step S606: According to the verification result, perform decryption and return to the target user client to complete the transaction.

[0213] Step S607: The client receives the returned result.

[0214] As can be seen from the above description, the embodiments of the present invention provide a blockchain-based file transmission method and device. The corresponding method includes: first, generating a data matrix corresponding to the file to be sent according to the encoding matrix of the pre-stored certificate in the blockchain and the file to be sent; then, generating a transfer matrix according to the data matrix and the encoding matrix, and uploading the transfer matrix to the blockchain; finally, distributing the data matrix to multiple decentralized storage nodes. Specifically, the present invention has the following beneficial effects:

[0215] 1. A secure and reliable blockchain distributed channel system framework is proposed. This framework combines a blockchain network, introduces a data security channel (DSCC), and supports fragmenting data and distributing it to physical channels for transmission and data collection.

[0216] 2. A secure and reliable blockchain distributed file data upload and distribution algorithm is proposed. By introducing a message matrix and a coding matrix, the file data is divided into k data fragments and transmitted on k physical channels respectively.

[0217] 3. A secure and reliable blockchain distributed channel download and collection algorithm is proposed, which is responsible for file data repair. When a node fails and there is data loss or damage, it downloads data from other nodes for patching. A reversible coding matrix ψ(n×d) is introduced to periodically perform the reconstruction and repair process, and the constructed matrix C is expressed as the product of the coding matrix ψ and the message matrix M.

[0218] 4. A message format based on a secure and reliable blockchain distributed channel is proposed to achieve decentralized storage node information sharing, blockchain node directory access permission update, etc.

[0219] Based on the same inventive concept, the embodiments of the present application also provide a blockchain-based file transmission device, which can be used to implement the methods described in the above embodiments, as in the following embodiments. Since the principle of the blockchain-based file transmission device for solving problems is similar to that of the blockchain-based file transmission method, the implementation of the blockchain-based file transmission device can refer to the implementation of the blockchain-based file transmission method, and the repeated parts will not be elaborated. Hereinafter, the term "unit" or "module" can be a combination of software and / or hardware that can achieve a predetermined function. Although the systems described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.

[0220] The embodiments of the present invention provide a specific implementation manner of a blockchain-based file transmission device capable of implementing a blockchain-based file transmission method. Refer to Figure 12 , and the blockchain-based file transmission device applicable to the file sender specifically includes the following:

[0221] A data matrix generation module 10, configured to generate a data matrix corresponding to the file to be sent according to the coding matrix pre-stored in the blockchain and the file to be sent;

[0222] A transfer matrix generation module 20, configured to generate a transfer matrix according to the data matrix and the coding matrix, and upload the transfer matrix to the blockchain;

[0223] A data matrix distribution module 30, configured to distribute the data matrix to a plurality of decentralized storage nodes.

[0224] In one embodiment, referring to Figure 13 , the data matrix generation module 10 includes:

[0225] The length determination first unit 101 is configured to determine the length of the file to be sent according to the total number of decentralized storage nodes, the number of centralized storage nodes selected during the distribution process, and the number of decentralized storage nodes for repairing data;

[0226] The matrix space determination unit 102 is configured to determine the data matrix space according to the length;

[0227] The data matrix generation unit 103 is configured to fill the file to be sent in the data matrix after the space is determined according to the encoding matrix to generate the data matrix corresponding to the file to be sent.

[0228] In one embodiment, referring to Figure 14 , the transfer matrix generation module 20 includes:

[0229] The transfer matrix generation unit 201 is configured to multiply the data matrix by the encoding matrix to generate the transfer matrix.

[0230] In one embodiment, referring to Figure 15 , the data matrix distribution module 30 includes: [[ID=2y]]

[0231] The data segment generation unit 301 is configured to divide the data matrix into multiple data segments;

[0232] The data segment transmission unit 302 is configured to transmit each data segment to the corresponding decentralized storage node through multiple physical channels.

[0233] In one embodiment, referring to Figure 16 , the present invention further provides a blockchain-based file transmission device applicable to a file recipient, and the device includes:

[0234] The decoding matrix generation module 70 is configured to generate a decoding matrix according to the transfer matrix sent in the blockchain and the encoding matrix pre-stored in the blockchain;

[0235] The data matrix segment receiving module 80 is configured to receive data matrix segments sent by multiple decentralized storage nodes respectively;

[0236] The file generation module 90 is configured to generate a file to be received according to the decoding matrix and the multiple data matrix segments.

[0237] In one embodiment, referring to Figure 17 , the file generation module 90 includes:

[0238] The length determination second unit 901 is configured to determine the length of the file to be received according to the total number of the decentralized storage nodes, the number of the corresponding decentralized storage nodes in the process of receiving the matrix segments, and the number of the decentralized storage nodes for data repair;

[0239] The received file generation unit 902 is configured to reconstruct a plurality of data matrix segments according to the length through the decoding matrix to generate the file to be received.

[0240] As can be seen from the above description, the embodiment of the present invention provides a blockchain-based file transmission device, including: first determining the expected value and variance value of the execution time of the task to be executed according to the preset execution times and the historical execution time of the task to be executed; then, determining the weight of the execution time required for the task to be executed on the heterogeneous processors according to the expected value and variance value; and finally allocating the task to be executed to the corresponding heterogeneous processors according to the energy consumption configuration parameters of the heterogeneous processors, the latest acceptable execution completion time of the task to be executed, the current execution times of the task to be executed on the heterogeneous processors, and the weight. The present invention can reasonably allocate the task to be executed on the premise of meeting the time limit specified by the task, so as to minimize the energy consumption of the system.

[0241] The embodiment of the present application further provides a specific implementation manner of an electronic device capable of implementing all steps in the above-mentioned blockchain-based file transmission method. Refer to Figure 18 , and the electronic device specifically includes the following contents:

[0242] A processor 1201, a memory 1202, a communication interface 1203, and a bus 1204;

[0243] Among them, the processor 1201, the memory 1202, and the communication interface 1203 complete mutual communication through the bus 1204; the communication interface 1203 is used to implement information transmission between related devices such as a server-side device and a client-side device;

[0244] The processor 1201 is configured to call a computer program in the memory 1202. When the processor executes the computer program, all steps in the above-mentioned blockchain-based file transmission method are implemented. For example, when the processor executes the computer program, the following steps are implemented:

[0245] Step 100: Generating a data matrix corresponding to the file to be sent according to the encoding matrix of the pre-stored certificate in the blockchain and the file to be sent;

[0246] Step 200: Generate a transfer matrix based on the data matrix and the encoding matrix, and upload the transfer matrix to the blockchain;

[0247] Step 300: Distribute the data matrix to multiple decentralized storage nodes.

[0248] An embodiment of the present application also provides a computer-readable storage medium capable of implementing all steps in the above-mentioned blockchain-based file transfer method. A computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, all steps of the above-mentioned blockchain-based file transfer method are implemented. For example, when the processor executes the computer program, the following steps are implemented:

[0249] Step 100: Generate a data matrix corresponding to the file to be sent according to the encoding matrix of the pre-stored certificate in the blockchain and the file to be sent;

[0250] Step 200: Generate a transfer matrix based on the data matrix and the encoding matrix, and upload the transfer matrix to the blockchain;

[0251] Step 300: Distribute the data matrix to multiple decentralized storage nodes.

[0252] Each embodiment in this specification is described in a progressive manner. The same or similar parts among the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the hardware + program type embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0253] The above describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve the desired result. Additionally, the processes depicted in the drawings do not necessarily require the specific order or sequential order shown to achieve the desired result. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0254] Although this application provides method operation steps such as in the embodiments or flowcharts, based on routine or non-creative labor, there can be more or fewer operation steps. The step order listed in the embodiments is only one way among many step execution orders and does not represent the only execution order. When an actual device or client product is executed, it can be executed in the order shown in the embodiments or the drawings or in parallel (such as in an environment of parallel processors or multithreaded processing).

[0255] For the convenience of description, when describing the above device, it is divided into various modules according to functions and described separately. Of course, when implementing the embodiments of this specification, the functions of each module can be implemented in the same or multiple software and / or hardware, or the modules implementing the same function can be implemented by a combination of multiple sub-modules or sub-units, etc. The device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the couplings or direct couplings or communication connections shown or discussed with each other can be through some interfaces, and the indirect couplings or communication connections of the devices or units can be in electrical, mechanical or other forms.

[0256] Those skilled in the art also know that in addition to implementing the controller in the form of pure computer-readable program code, the method steps can be logically programmed to enable the controller to be implemented in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. to achieve the same function. Therefore, such a controller can be regarded as a hardware component, and the devices included therein for implementing various functions can also be regarded as the structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and the structures within the hardware component.

[0257] In a typical configuration, a computing device includes one or more processors (CPUs), an input / output interface, a network interface, and a memory.

[0258] The memory may include non-permanent memory in the form of computer-readable media, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). The memory is an example of computer-readable media.

[0259] The embodiments of this specification can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The embodiments of this specification can also be practiced in a distributed computing environment, where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0260] Each embodiment in this specification is described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other, and the key point of each embodiment is to illustrate the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for the relevant parts, reference can be made to the description of the method embodiment. In the description of this specification, the description with reference to terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the embodiments of this specification. In this specification, the schematic expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments or examples. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0261] The above is only the embodiment of the embodiments of this specification and is not used to limit the embodiments of this specification. For those skilled in the art, various changes and modifications can be made to the embodiments of this specification. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the embodiments of this specification shall be included within the scope of the claims of the embodiments of this specification.

Claims

1. A blockchain-based file transfer method, characterized in that, including: determining the length of the file to be sent according to the total number of decentralized storage nodes, the number of centralized storage nodes selected during the distribution process, and the number of decentralized storage nodes used for data repair; determining the data matrix space according to the length; filling the file to be sent into the data matrix after the space is determined according to the encoding matrix of the pre-stored certificate in the blockchain to generate the data matrix corresponding to the file to be sent; generating a transfer matrix according to the data matrix and the encoding matrix, and uploading the transfer matrix to the blockchain; distributing the data matrix to multiple decentralized storage nodes.

2. The blockchain-based file transfer method according to claim 1, wherein, The generating the transfer matrix according to the data matrix and the encoding matrix includes: multiplying the data matrix by the encoding matrix to generate the transfer matrix.

3. The blockchain-based file transmission method according to claim 1, characterized in that The distributing the data matrix to multiple decentralized storage nodes includes: dividing the data matrix into multiple data segments; transmitting each data segment to the corresponding decentralized storage node through multiple physical channels.

4. A file transmission method based on blockchain, characterized in that, including: generating a decoding matrix according to the transfer matrix sent in the blockchain and the encoding matrix of the pre-stored certificate in the blockchain; receiving the data matrix segments sent by multiple decentralized storage nodes respectively; determining the length of the file to be received according to the total number of decentralized storage nodes, the number of corresponding decentralized storage nodes during the process of receiving the matrix segments, and the number of decentralized storage nodes used for data repair; reconstructing multiple data matrix segments according to the length through the decoding matrix to generate the file to be received.

5. A blockchain-based file transfer device, characterized in that, including: a data matrix generation module, configured to determine the length of the file to be sent according to the total number of decentralized storage nodes, the number of centralized storage nodes selected during the distribution process, and the number of decentralized storage nodes used for data repair; determining the data matrix space according to the length; filling the file to be sent into the data matrix after the space is determined according to the encoding matrix of the pre-stored certificate in the blockchain to generate the data matrix corresponding to the file to be sent; a transfer matrix generation module, configured to generate a transfer matrix according to the data matrix and the encoding matrix, and upload the transfer matrix to the blockchain; a data matrix distribution module, configured to distribute the data matrix to multiple decentralized storage nodes.

6. A blockchain-based file transfer device, characterized in that, including: a decoding matrix generation module, configured to generate a decoding matrix according to the transfer matrix sent in the blockchain and the encoding matrix of the pre-stored certificate in the blockchain; a data matrix segment receiving module, configured to receive the data matrix segments sent by multiple decentralized storage nodes respectively; a file generation module, configured to determine the length of the file to be received according to the total number of decentralized storage nodes, the number of corresponding decentralized storage nodes during the process of receiving the matrix segments, and the number of decentralized storage nodes used for data repair; reconstructing multiple data matrix segments according to the length through the decoding matrix to generate the file to be received.

7. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the blockchain-based file transmission method according to any one of claims 1 to 4.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, the steps of the blockchain-based file transmission method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • User behavior privacy protection method based on block chain in Internet of Things scene

    CN114666034A

  • Data storage method and device, computer readable storage medium and electronic equipment

    CN114826720A