Distributed data sharing method and system based on block chain

By analyzing and encrypting the sharing requests in blockchain technology, combined with the backup of distributed storage units, the problems of waste of big data transmission resources and high time cost are solved, and efficient data sharing and storage are achieved.

CN119201872AInactive Publication Date: 2024-12-27JIAQIAO (SHENZHEN) INVESTMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411242240.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-05
Publication Date
2024-12-27
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In blockchain technology, when faced with the transmission and storage of large data volumes, the existing technology leads to waste of resources, increases operational costs, and the time cost is high in emergency sharing or large file sharing scenarios.

Method used

By analyzing the sharing requests, judging the data sharing status, performing direct encryption and volume encryption, optimizing large file transmission, and using blockchain and distributed storage units for backup, saving data sharing time.

Benefits of technology

It realizes direct encrypted transmission and distributed storage of the first shared data, alleviates the local computing power and network bandwidth usage, optimizes large file transfer capabilities, and saves data sharing time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201872A_ABST
    Figure CN119201872A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of block chains, and provides a distributed data sharing method and system based on a block chain. Comprising the steps that a sharing request is collected and analyzed, a decryption key is sent to a receiving end, an encryption key is sent to a sharing end, first-time sharing data are encrypted through the encryption key, the encrypted sharing data are uploaded to a block chain and a distributed storage unit, and the block chain and the distributed storage unit are stored. And decrypting the encrypted shared data by using the decrypted data and storing the first shared data in a local storage unit of the receiving end. According to the method, the sharing request is analyzed, so that the judgment on the data sharing state is realized; by encrypting the first shared data, direct encryption and roll-by-roll encryption are realized, the occupation of local computing power and network bandwidth is relieved, and the large file transmission capability is optimized; by directly uploading the block chain and the distributed storage unit backup, the limitation of first sharing is solved, and the data sharing time is saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of blockchain technology, and in particular to a distributed data sharing method and system based on blockchain. Background Art

[0002] With the continuous development of blockchain technology, more and more applications are being developed based on this technology. Blockchain-based applications have significant advantages such as decentralization, trustlessness and traceability. However, in the actual application development process, it is often found that in addition to the need to transmit and store simple information, business needs also involve the transmission of large-capacity files between different participants, such as customs declaration attachments in international trade. Considering the multi-redundant distributed characteristics of blockchain technology itself, when faced with the transmission and storage of large amounts of data, it may lead to a waste of resources, thereby significantly increasing the operating costs of blockchain.

[0003] In order to solve the above problems, patent CN 116743408A proposes a distributed file sharing method and system based on blockchain, which combines distributed storage with blockchain to achieve efficient and secure distributed file storage and sharing. However, this method requires the sharing party to upload and encrypt the file in advance, and uploading large files takes a lot of time and cost. Therefore, it is not applicable in emergency sharing or large file sharing scenarios. Summary of the invention

[0004] In order to overcome the shortcomings of the prior art, the purpose of the present invention is to provide a distributed data sharing method and system based on blockchain, which can determine the data sharing status by parsing the sharing request; encrypt the first shared data to achieve direct encryption and volume encryption, alleviate the occupation of local computing power and network bandwidth, and optimize the large file transmission capacity; directly upload the blockchain and distributed storage unit backup to solve the limitations of the first sharing and save data sharing time.

[0005] To achieve the above object, the present invention provides the following solutions:

[0006] A distributed data sharing method based on blockchain, comprising:

[0007] Collect sharing requests from the sharing end, and obtain sharing status by parsing the sharing requests; the sharing status includes: first sharing status and existing data sharing status;

[0008] When the sharing state is the first sharing state, using the key management unit to send a decryption key to the receiving end, and sending an encryption key to the sharing end;

[0009] The first shared data is encrypted using the encryption key to obtain encrypted shared data; the encrypted shared data includes: directly encrypted data and volume-encrypted data;

[0010] Uploading the encrypted shared data to the blockchain and distributed storage unit;

[0011] The encrypted shared data is decrypted using the decrypted data through a preset smart contract to obtain the first shared data;

[0012] The first shared data is stored in the local storage unit of the receiving end.

[0013] Preferably, before collecting the sharing request from the sharing terminal and parsing the sharing request to obtain the sharing status, the method further includes:

[0014] Collecting access requests from the sharing end;

[0015] Parsing the access request to obtain user identity credentials;

[0016] Utilize the preset token unit to authenticate the user identity credential and obtain the authentication result;

[0017] When the authentication result is failure, an access failure message is sent to the sharing terminal.

[0018] Preferably, collecting the sharing request of the sharing terminal and parsing the sharing request to obtain the sharing status includes:

[0019] Hash the data to be shared to obtain a data summary;

[0020] Using a preset summary storage unit to search the data summary to obtain a search result;

[0021] When the search result is not included, the data to be shared is determined as the first-time shared data;

[0022] The IP address, port number and search identifier of the sharing end are encapsulated into the sharing request; when the search identifier is 0, the corresponding search result is not included and the sharing status is the first sharing status.

[0023] Preferably, when the sharing state is the first sharing state, using a key management unit to send a decryption key to a receiving end and sending an encryption key to the sharing end includes:

[0024] Construct a first prime number and a second prime number according to the sharing request; the calculation formula of the first prime number is: Wherein, p is the first prime number; α is the first exponent; Prime() is the nearest neighbor prime number extraction operation; the calculation formula of the second prime number is: q is the second prime number; β is the second exponent;

[0025] Multiplying the first prime number and the second prime number to obtain a modulus;

[0026] Calculating the Euler number according to the first prime number and the second prime number; the calculation formula of the Euler number is: r=(p-1)*(q-1); wherein r is the Euler number;

[0027] Select a public key exponent according to the Euler number; the public key exponent is a prime number between 1 and the Euler number;

[0028] The private key index is calculated according to the public key index and the Euler number; the calculation formula of the private key index is: (e*d)%r=1; wherein e is the public key index; d is the private key index;

[0029] The encryption key and the decryption key are constructed according to the public key exponent, the private key exponent and the modulus; the construction formula of the encryption key is: K E =(e,n); where K E is the encryption key; n is the modulus; the construction formula of the decryption key is: K D =(d,n); where K D is the decryption key.

[0030] Preferably, the first shared data is encrypted using the encryption key to obtain encrypted shared data, including:

[0031] Detecting the file size of the first shared data to obtain a detection result;

[0032] When the detection result is a small file, the first shared data is encrypted using an RSA algorithm according to the encryption key to obtain directly encrypted data;

[0033] When the detection result is a large file, the first shared data is divided into volumes according to a preset single volume maximum capacity to obtain a plurality of volume data blocks;

[0034] A sequence header is added to all the sub-volume data blocks, and the sub-volume data blocks are encrypted using an RSA algorithm according to the encryption key to obtain a plurality of sub-volume encrypted data.

[0035] Preferably, the upload modes of uploading the encrypted shared data to the blockchain and the distributed storage unit include: synchronous upload mode, zone-first-then-divide upload mode, and customized two-end upload bandwidth mode.

[0036] Preferably, the encrypted shared data is decrypted using the decrypted data through a preset smart contract to obtain the first shared data, including:

[0037] When the sub-volume encrypted data is received, all the sub-volume encrypted data are decrypted using the decryption key to obtain a sub-volume data block with a sequence header;

[0038] The sub-volume data blocks with the sequence header are integrated according to the sequence header to obtain the first shared data.

[0039] Preferably, the maximum capacity of the single volume is 4 GB.

[0040] Preferably, a distributed data sharing system based on blockchain comprises: a sharing end, a receiving end, a blockchain unit, a key management unit, a distributed storage unit and a summary storage unit;

[0041] The sharing end is used to share data with the receiving end through the blockchain unit or to upload the shared data to the distributed storage unit; the key management unit is used to send an encryption key to the sharing end and a decryption key to the blockchain unit; the summary storage unit is used to determine whether the shared data is stored in the distributed storage unit.

[0042] The present invention discloses the following technical effects:

[0043] The present invention provides a distributed data sharing method and system based on blockchain. By parsing the sharing request, the problem of identifying the initial sharing status is solved, and the judgment of the data sharing status is realized; by encrypting the initial shared data, the problem of occupying local computing power and network bandwidth is solved, and direct encryption and volume encryption are realized; by directly uploading the blockchain and distributed storage unit backup, the limitations of the initial sharing are solved, and the direct encrypted transmission and distributed storage of the initial shared data are realized. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0045] Figure 1 A schematic diagram of a distributed data sharing process based on blockchain provided in an embodiment of the present invention;

[0046] Figure 2A schematic diagram of a sharing status acquisition process provided by an embodiment of the present invention;

[0047] Figure 3 A schematic diagram of the key generation and distribution process provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0048] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0049] The purpose of the present invention is to provide a distributed data sharing method and system based on blockchain, which can determine the data sharing status by parsing the sharing request; realize direct encryption and volume encryption by encrypting the first shared data, alleviate the occupation of local computing power and network bandwidth, and optimize the large file transmission capacity; solve the limitations of the first sharing and save data sharing time by directly uploading blockchain and distributed storage unit backup.

[0050] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0051] Figure 1 A schematic diagram of a distributed data sharing process based on blockchain provided by an embodiment of the present invention is shown in FIG. Figure 1 As shown, the present invention provides a distributed data sharing method based on blockchain, comprising:

[0052] Step 100: Collect sharing requests from the sharing end, and obtain sharing status by parsing the sharing requests; the sharing status includes: first sharing status and existing data sharing status;

[0053] Step 200: When the sharing state is the first sharing state, a decryption key is sent to a receiving end by using a key management unit, and an encryption key is sent to the sharing end;

[0054] Step 300: Encrypt the first shared data using the encryption key to obtain encrypted shared data; the encrypted shared data includes: directly encrypted data and volume encrypted data;

[0055] Step 400: Upload the encrypted shared data to the blockchain and the distributed storage unit;

[0056] Step 500: Decrypting the encrypted shared data using the decrypted data through a preset smart contract to obtain the first shared data;

[0057] Step 600: Storing the first shared data in the local storage unit of the receiving end.

[0058] Preferably, the distributed storage unit of this embodiment is HDFS. HDFS (Hadoop Distributed File System) is a file system used to store files and locate files through a directory tree; secondly, it is distributed and is implemented by many servers working together to realize its functions, and the servers in the cluster have their own roles. HDFS usage scenarios: suitable for scenarios where write once and read multiple times. A file does not need to be changed after it is created, written and closed. The main architecture of HDFS includes: HDFS Client: obtains the location information of the file from the NameNode, and then reads or writes data from the DataNode. In addition, the client is responsible for file segmentation when storing data; NameNode (metadata node): manages the namespace, data block (Block) mapping information, configures replica strategies, and processes client read and write requests; DataNode (storage node): responsible for performing actual read and write operations, storing actual data blocks, and the same data block will be stored on multiple DataNodes; SecondaryNameNode: regularly merges metadata and pushes it to the NameNode. In an emergency, it can assist the HA recovery of the NameNode.

[0059] Optionally, before collecting the sharing request from the sharing end and parsing the sharing request to obtain the sharing status, the method further includes:

[0060] Collecting access requests from the sharing end;

[0061] Parsing the access request to obtain user identity credentials;

[0062] Utilize a preset token unit to authenticate the user identity credential and obtain an authentication result;

[0063] When the authentication result is failure, an access failure message is sent to the sharing terminal.

[0064] refer to Figure 2 , collect the sharing request of the sharing end, and obtain the sharing status by parsing the sharing request, including:

[0065] Step 101: Perform hash processing on the data to be shared to obtain a data summary;

[0066] Step 102: using a preset summary storage unit to search the data summary and obtain a search result;

[0067] Step 103: when the search result is not included, determining the data to be shared as the first-time shared data;

[0068] Step 104: Encapsulate the IP address, port number and search identifier of the sharing end into the sharing request; when the search identifier is 0, the corresponding search result is not included and the sharing status is the first sharing status.

[0069] refer to Figure 3 , when the sharing state is the first sharing state, using the key management unit to send a decryption key to the receiving end, and sending an encryption key to the sharing end, including:

[0070] Step 201: construct a first prime number and a second prime number according to the sharing request; the calculation formula of the first prime number is: Wherein, p is the first prime number; α is the first exponent; Prime() is the nearest neighbor prime number extraction operation; the calculation formula of the second prime number is: q is the second prime number; β is the second exponent;

[0071] Step 202: multiplying the first prime number and the second prime number to obtain a modulus;

[0072] Step 203: Calculate the Euler number according to the first prime number and the second prime number; the calculation formula of the Euler number is: r=(p-1)*(q-1); wherein r is the Euler number;

[0073] Step 204: selecting a public key exponent according to the Euler number; the public key exponent is a prime number between 1 and the Euler number;

[0074] Step 205: Calculate the private key index according to the public key index and the Euler number; the calculation formula of the private key index is: (e*d)%r=1; wherein e is the public key index; d is the private key index; the calculation formula of the private key index in this embodiment is solved by the extended Euclidean algorithm;

[0075] Step 206: Construct the encryption key and the decryption key according to the public key exponent, the private key exponent and the modulus; the construction formula of the encryption key is: K E =(e,n); where K E is the encryption key; n is the modulus; the construction formula of the decryption key is: K D =(d,n); where K D is the decryption key.

[0076] Optionally, the present embodiment proposes two kinds of realization ideas about the realization of Prime(): the first idea is: extract the minimum prime number greater than number to be detected, extract the maximum prime number less than number to be detected and both distance judgments; the second idea is: detect equidistantly to two, and the prime number first detected is the nearest prime number.

[0077] Furthermore, the Extended Euclidean Algorithm is an algorithm for solving the greatest common divisor (GCD) of two integers and their linear combinations. The algorithm can also be used to solve linear congruential equations in one variable. Assume that there are two non-zero integers c and b, and the goal is to find their greatest common divisor m, as well as two integers x and y, so that the Bézout equation is satisfied: cx+by=m. The steps of the Extended Euclidean Algorithm are as follows: First, use the Euclidean algorithm to find the remainder u of c divided by b, and update c to the original b, b to the original u, and repeat this step until the remainder u is 0. Once the remainder u is 0, m, that is, the greatest common divisor of c and b, is found. Next, go back and perform recursive calculations. Initially, there are two coefficients x and y that are 1, and then through iteration, their values ​​are updated until the base case (b=0) is reached. In each iteration, the current quotient is subtracted from the previous coefficient and multiplied by the previous coefficient to keep the Bézout equation valid. When the recursion ends, the two coefficients x and y obtained are the integer solutions that satisfy the Bézout equation.

[0078] Specifically, the first shared data is encrypted using the encryption key to obtain encrypted shared data, including:

[0079] Detecting the file size of the first shared data to obtain a detection result;

[0080] When the detection result is a small file, the first shared data is encrypted using an RSA algorithm according to the encryption key to obtain directly encrypted data;

[0081] When the detection result is a large file, the first shared data is divided into volumes according to a preset single volume maximum capacity to obtain a plurality of volume data blocks;

[0082] A sequence header is added to all the sub-volume data blocks, and the sub-volume data blocks are encrypted using an RSA algorithm according to the encryption key to obtain a plurality of sub-volume encrypted data.

[0083] Preferably, the upload modes of uploading the encrypted shared data to the blockchain and the distributed storage unit include: synchronous upload mode, zone-first-then-divide upload mode, and customized two-end upload bandwidth mode.

[0084] Furthermore, the encrypted shared data is decrypted using the decrypted data through a preset smart contract to obtain the first shared data, including:

[0085] When the sub-volume encrypted data is received, all the sub-volume encrypted data are decrypted using the decryption key to obtain a sub-volume data block with a sequence header;

[0086] The sub-volume data blocks with the sequence header are integrated according to the sequence header to obtain the first shared data.

[0087] Specifically, symmetric encryption is an encryption method that uses the same key for encryption and decryption. The encrypted information is encrypted with a pre-negotiated key before transmission, and the receiver uses the same key to decrypt. The advantages of this method are high encryption efficiency and fast encryption and decryption speed, but the disadvantage is that the key needs to be shared in advance. If the key is leaked, the encryption is invalid. Common symmetric encryption algorithms include DES, 3DES, AES, etc. Asymmetric encryption is an encryption method that uses different keys for encryption and decryption. The sender uses the public key for encryption, and the receiver uses the private key for decryption. Because the public key can be made public, only the encrypted information known by the private key can be decrypted. The advantage of this method is high security, and the disadvantage is that the encryption speed is slower than that of symmetric encryption. In summary, in order to achieve safer data transmission and sharing, this implementation chooses an asymmetric encryption method to encrypt data.

[0088] Optionally, the maximum capacity of the single volume is 4 GB.

[0089] Specifically, the advantages of the large file partitioning selected in this embodiment are: Managing large files: When dealing with large files or data sets, volume compression makes file transmission, storage and management more convenient. By dividing the file into multiple smaller parts, the size and complexity of a single file can be reduced. Fault recovery and transmission interruption: If an unexpected interruption or failure occurs during the file transmission process, volume compression can provide better recovery capabilities. If a volume file is damaged, only the volume file needs to be downloaded or transmitted again, rather than the entire file. This can save time and bandwidth and reduce the risk of data loss. Storage space utilization: For environments with limited storage, volume compression can help save storage space. Since each volume file is compressed, the required storage space can be reduced as a whole. In addition, volume compression can also help organize and manage files more efficiently on the storage medium. Transmission efficiency: Volume compression can improve the efficiency of file transmission. Smaller volume files can be transmitted faster during network transmission, and if an error occurs during transmission, only the corresponding volume file needs to be retransmitted instead of the entire file. Maintenance and backup: For situations where large files or data sets need to be maintained and backed up, volume compression can be more convenient to manage. It is easier to back up and restore volume files, and more flexible to perform partial recovery or updates.

[0090] Further, a distributed data sharing system based on blockchain includes: a sharing end, a receiving end, a blockchain unit, a key management unit, a distributed storage unit, and a summary storage unit;

[0091] The sharing end is used to share data with the receiving end through the blockchain unit or to upload the shared data to the distributed storage unit; the key management unit is used to send an encryption key to the sharing end and a decryption key to the blockchain unit; the summary storage unit is used to determine whether the shared data is stored in the distributed storage unit.

[0092] Optionally, this embodiment provides a distributed data sharing method based on blockchain for non-first sharing, which is as follows: first, the sharing end sends an access request to the authentication module of the server and performs authentication to obtain an authentication result; when the authentication result is an abnormal request, an access interruption message is sent to the sharing end, and when the authentication result is a normal request, an access port is opened to the sharing end; the key management unit sends an encryption key to the sharing end; the sharing end uses the encryption key to encrypt the data to be uploaded, and when the data to be uploaded is larger than the preset single volume maximum capacity, the data is encrypted using a volume encryption method; the encrypted data is uploaded to the distributed storage unit for storage; when a data download request from the receiving end is received, after authenticating the receiving end, the basic information of the data to be downloaded is obtained based on the parsed data of the download request, and downloaded to the receiving end through the blockchain; the receiving end decrypts the received data to obtain the target requested data.

[0093] Preferably, this embodiment uses Token for authentication. Token is a token. When the client accesses the server, the server will issue a token for it after verification. After that, the client can carry the token to access the server, and the server only needs to verify the validity of the token. The composition of a simple token: uid (user's unique identity), time (timestamp of the current time), sign (signature, the first few bits of the token are compressed into a hexadecimal string of a certain length using a hash algorithm. To prevent token leakage). Its basic authentication process is as follows: the client uses the username and password to request login. The server receives the request and verifies the username and password; after successful verification, the server will generate a token and then send the token to the client; after receiving the token, the client stores it, which can be placed in a cookie or Local Storage; each time the client sends a request to the server, it needs to carry the token sent by the server; the server receives the request, and then verifies that the client request contains the token. If the verification is successful, it returns the requested data to the client.

[0094] The beneficial effects of the present invention are as follows:

[0095] The present invention determines the data sharing status by parsing the sharing request; realizes direct encryption and volume encryption by encrypting the first shared data, alleviates the occupation of local computing power and network bandwidth, and optimizes the large file transmission capacity; solves the limitation of the first sharing by directly uploading the blockchain and distributed storage unit backup, and saves the time of data sharing.

[0096] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0097] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of ​​the present invention. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A distributed data sharing method based on blockchain, characterized in that: include: Collect sharing requests from the sharing end, and obtain sharing status by parsing the sharing requests; The sharing status includes: first sharing status and existing data sharing status; When the sharing state is the first sharing state, using the key management unit to send a decryption key to the receiving end, and sending an encryption key to the sharing end; The first shared data is encrypted using the encryption key to obtain encrypted shared data; the encrypted shared data includes: directly encrypted data and volume-encrypted data; Uploading the encrypted shared data to the blockchain and distributed storage unit; The encrypted shared data is decrypted using the decrypted data through a preset smart contract to obtain the first shared data; The first shared data is stored in the local storage unit of the receiving end.

2. According to a distributed data sharing method based on blockchain according to claim 1, it is characterized in that: Before collecting the sharing request from the sharing end and parsing the sharing request to obtain the sharing status, the following steps are also included: Collecting access requests from the sharing end; Parsing the access request to obtain user identity credentials; Utilize a preset token unit to authenticate the user identity credential and obtain an authentication result; When the authentication result is failure, an access failure message is sent to the sharing terminal.

3. According to a distributed data sharing method based on blockchain according to claim 1, it is characterized in that: Collect sharing requests from the sharing end, and obtain sharing status by parsing the sharing requests, including: Hash the data to be shared to obtain a data summary; Using a preset summary storage unit to search the data summary to obtain a search result; When the search result is not included, the data to be shared is determined as the first-time shared data; The IP address, port number and search identifier of the sharing end are encapsulated into the sharing request; when the search identifier is 0, the corresponding search result is not included and the sharing status is the first sharing status.

4. According to a distributed data sharing method based on blockchain according to claim 1, it is characterized in that: When the sharing state is the first sharing state, using the key management unit to send a decryption key to the receiving end and sending an encryption key to the sharing end, including: Construct a first prime number and a second prime number according to the sharing request; the calculation formula of the first prime number is: Wherein, p is the first prime number; α is the first exponent; Prime() is the nearest neighbor prime number extraction operation; the calculation formula of the second prime number is: q is the second prime number; β is the second exponent; Multiplying the first prime number and the second prime number to obtain a modulus; Calculating the Euler number according to the first prime number and the second prime number; the calculation formula of the Euler number is: r=(p-1)*(q-1); wherein r is the Euler number; Select a public key exponent according to the Euler number; the public key exponent is a prime number between 1 and the Euler number; The private key index is calculated according to the public key index and the Euler number; the calculation formula of the private key index is: (e*d)%r=1; wherein e is the public key index; d is the private key index; The encryption key and the decryption key are constructed according to the public key exponent, the private key exponent and the modulus; the construction formula of the encryption key is: K E =(e,n); where K E is the encryption key; n is the modulus; the construction formula of the decryption key is: K D =(d,n); where K D is the decryption key.

5. According to a distributed data sharing method based on blockchain according to claim 1, it is characterized in that: The first shared data is encrypted using the encryption key to obtain encrypted shared data, including: Detecting the file size of the first shared data to obtain a detection result; When the detection result is a small file, the first shared data is encrypted using an RSA algorithm according to the encryption key to obtain directly encrypted data; When the detection result is a large file, the first shared data is divided into volumes according to a preset single volume maximum capacity to obtain a plurality of volume data blocks; A sequence header is added to all the sub-volume data blocks, and the sub-volume data blocks are encrypted using an RSA algorithm according to the encryption key to obtain a plurality of sub-volume encrypted data.

6. A distributed data sharing method based on blockchain according to claim 1, characterized in that: The upload modes of uploading the encrypted shared data to the blockchain and the distributed storage unit include: synchronous upload mode, zone-first-then-divide upload mode, and customized two-end upload bandwidth mode.

7. A distributed data sharing method based on blockchain according to claim 5, characterized in that: The encrypted shared data is decrypted using the decrypted data through a preset smart contract to obtain the first shared data, including: When the sub-volume encrypted data is received, all the sub-volume encrypted data are decrypted using the decryption key to obtain a sub-volume data block with a sequence header; The sub-volume data blocks with the sequence header are integrated according to the sequence header to obtain the first shared data.

8. A distributed data sharing method based on blockchain according to claim 5, characterized in that: The maximum capacity of a single volume is 4 GB.

9. A distributed data sharing system based on blockchain, characterized in that: include: A sharing end, a receiving end, a blockchain unit, a key management unit, a distributed storage unit, and a summary storage unit; The sharing end is used to share data with the receiving end through the blockchain unit or upload the shared data to the distributed storage unit; The key management unit is used to send an encryption key to the sharing end and a decryption key to the blockchain unit; the summary storage unit is used to determine whether the shared data is stored in the distributed storage unit.