A data sharing system based on blockchain and cloud computing
By adopting blockchain and cloud computing technology in the data sharing system, it solves the problem of data storage security, realizes efficient and reliable data sharing and processing, and enhances the user experience.
Patent Information
- Application Number
- CN202411017734.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-07-29
AI Technical Summary
In the prior art, due to the security problems of data storage, the upload and reading efficiency of data sharing is low.
A data sharing system based on blockchain and cloud computing is adopted to ensure the security and reliability of data through distributed storage and blockchain technology. The system includes user terminal modules, cloud computing modules, and blockchains. It uses task scheduling nodes, data processing nodes, and data storage nodes to perform data cutting, parallel transmission and hash collision detection to ensure the safe storage and fast access of data.
Through distributed storage and blockchain technology, the reliability and security of data are improved, load balancing and efficient data processing are achieved, user waiting time is shortened, and user experience is improved.
Smart Images

Figure CN119046252B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data sharing technology, and in particular to a data sharing system based on blockchain and cloud computing. Background Art
[0002] Cloud computing is a type of distributed computing, which means breaking down a huge data computing program into countless small programs through the network "cloud", and then processing and analyzing these small programs through a system composed of multiple servers, and returning the results to the user. Its core concept is resource pooling and on-demand allocation, which makes the use of computing resources more flexible and efficient. Through cloud computing technology, users can complete the processing of tens of thousands of data in a very short time, thereby achieving powerful network services.
[0003] Blockchain is a decentralized distributed ledger technology. In essence, it is a shared database, and the data or information stored in it has broad application prospects. Blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithm. Big data refers to a collection of data that cannot be captured, managed, and processed by conventional software tools within a certain time frame. It is a massive, high-growth, and diversified information asset that requires new processing models to have stronger decision-making power, insight discovery, and process optimization capabilities.
[0004] Data sharing technology aims to achieve data exchange and sharing between multiple systems, applications or organizations, and improve the availability and value of data. With the development of technologies such as big data, cloud computing and blockchain, data sharing technology has become more complex and diversified. Existing data sharing technologies have security issues such as data leakage and tampering, resulting in a low degree of data sharing, making it difficult to establish reliable sharing and cooperation relationships, resulting in data islands, and low efficiency in uploading and reading shared data. Summary of the invention
[0005] To this end, the technical problem to be solved by the present invention is to overcome the problem in the prior art of low efficiency of uploading and reading data sharing due to security issues in data storage.
[0006] In order to solve the above technical problems, the present invention provides a data sharing system based on blockchain and cloud computing, comprising:
[0007] A user terminal module, including a plurality of data sharing user terminals, for initiating a data upload request or a data download request;
[0008] A cloud computing module, connected to the user terminal module, includes multiple task scheduling nodes, data processing nodes, and data storage nodes;
[0009] The task scheduling node is connected to the data sharing user terminal in the user terminal module, and is used to determine an upload data processing node or a download data processing node among multiple data processing nodes based on a data upload request or a data download request;
[0010] The data processing nodes are connected to the task scheduling nodes and the data storage nodes respectively, wherein the upload data processing node is used to perform data segmentation on the target shared data, and transmit the segmented target shared data in parallel to at least two of the multiple data storage nodes for storage based on the balance principle according to the remaining storage space of each data storage node, and generate a storage path of the target shared data and a hash value of the storage path, and perform hash value collision detection; when the hash value collision detection passes, the storage path of the target shared data is uploaded to the blockchain for storage;
[0011] The download data processing node is used to obtain the storage path of the target shared data from the blockchain based on the hash value of the target shared data, and then read the target shared data from multiple data storage nodes in parallel according to the storage path of the target shared data;
[0012] Blockchain, connected to the task processing node in the cloud computing module, is used to store the storage path of shared data.
[0013] Preferably, the task scheduling node determines an upload data processing node or a download data processing node among a plurality of data processing nodes based on a data upload request or a data download request, including:
[0014] The task scheduling node obtains the operation parameter information and task scheduling information of each data processing node at multiple time points, and determines the abnormal operation parameters of the data processing node based on the operation parameter information and task scheduling information of each data processing node at multiple time points;
[0015] Based on the abnormal operation parameters of each data processing node, a target data processing node is determined from multiple data processing nodes according to a load balancing principle.
[0016] Preferably, the operating parameter information of the data processing node includes the CPU usage rate, the ratio of used memory to total memory, the number of data packets sent, the number of data packets received, the number of data bytes sent, and the number of data bytes received; the task scheduling information of the data processing node includes the number of allocated data upload requests, the amount of data corresponding to each data upload request, the number of allocated data download requests, and the amount of data corresponding to each data download request.
[0017] Preferably, the task scheduling node determines the operation abnormality parameters of the data processing node through an abnormality confirmation model based on the operation parameter information and task scheduling information of each data processing node at multiple time points, and the abnormality confirmation model includes a long short-term memory network model.
[0018] Preferably, the uploaded data processing node performs data segmentation on the target shared data, including:
[0019] The upload data processing node obtains the historical download times of the shared data uploaded by the data sharing user terminal where the target shared data is located;
[0020] Calculate the download frequency fluctuation parameter of the data sharing terminal based on the historical download frequency of the shared data uploaded by the data sharing user terminal where the target shared data is located and the average download frequency of the data sharing user terminal;
[0021] Determine the data segmentation size of the target shared data based on a download count fluctuation parameter of the data sharing user terminal where the target shared data is located;
[0022] The target shared data is segmented according to the data segmentation size of the target shared data.
[0023] Preferably, the upload data processing node performs hash value collision detection, including:
[0024] All data storage nodes used to store target shared data are obtained as target data storage nodes; task coordination parameters between any two target data storage nodes are calculated, and the average value is taken to obtain the mean value of the task coordination parameters of the target shared data;
[0025] The calculation method of the task coordination parameter between any two target data storage nodes is as follows: if at least a part of an uploaded shared data is stored using the two target data storage nodes, the uploaded shared data is recorded as the target uploaded shared data; the ratio between the total number of the target uploaded shared data and the total number of the uploaded shared data is used as the task coordination parameter between the two data storage nodes;
[0026] Based on the task coordination parameter between any two target data storage nodes and the average value of the task coordination parameter of the target shared data, a task coordination parameter fluctuation parameter of the target shared data is calculated;
[0027] Calculate the collision risk parameter of the target shared data based on the task coordination parameter mean value of the target shared data and the task coordination parameter fluctuation parameter of the target shared data;
[0028] When the collision risk parameter of the target shared data is less than a preset collision risk parameter threshold, a first collision detection method is used to perform hash value collision detection;
[0029] When the collision risk parameter of the target shared data is greater than or equal to the preset collision risk parameter threshold, a second collision detection method is used to perform hash value collision detection;
[0030] If the hash value collision detection of the target shared data fails, an anti-collision hash value of the target shared data is generated, the hash value of the storage path of the target shared data is updated, and the hash value collision detection is performed again until the target shared data passes the hash value collision detection.
[0031] Preferably, the task coordination parameter fluctuation parameter of the target shared data is calculated based on the task coordination parameter between any two target data storage nodes and the task coordination parameter mean of the target shared data, and the formula is:
[0032]
[0033] Among them, W (e,2) is the task collaboration parameter fluctuation parameter for the target shared data, P (g,h) is the task coordination parameter between the g-th target data storage node and the h-th target data storage node, P (e,mean) is the mean value of task coordination parameters for target shared data, G is the total number of target data storage nodes;
[0034] The collision risk parameter of the target shared data is calculated based on the task coordination parameter mean of the target shared data and the task coordination parameter fluctuation parameter of the target shared data. The formula is:
[0035]
[0036] Among them, R e is the collision risk parameter of the target shared data, a3 and a4 are both weight parameters, P0 is the mean of the preset task coordination parameter, W1 is the fluctuation parameter of the preset task coordination parameter, and R0 is the preset collision risk parameter.
[0037] Preferably, the adopting the first collision detection method to perform hash value collision detection includes:
[0038] Sampling the hash value of the storage path of each uploaded shared data at multiple random locations to generate a sampled hash value of the uploaded shared data;
[0039] Sampling the hash value of the storage path of the target shared data at the same location to generate a sampled hash value of the target shared data;
[0040] If the sampled hash value of the target shared data at the same position is the same as the sampled hash value of any uploaded shared data, it is determined that there is a hash collision and the target shared data does not pass the hash value collision detection.
[0041] Preferably, the adopting the second collision detection method to perform hash value collision detection includes:
[0042] The K-means clustering algorithm is used to cluster the hash values of the storage paths of all uploaded shared data to determine multiple storage path clusters;
[0043] Calculate the hash value similarity between the hash value of the storage path of the target shared data and the cluster center of each storage path cluster, and take the storage path cluster with the largest hash value similarity as the target storage path cluster;
[0044] If there is a storage path of uploaded shared data in the target storage path cluster whose hash value is consistent with the storage path of the target shared data, it is determined that there is a hash collision and the target shared data does not pass the hash value collision detection.
[0045] Preferably, the method for generating the anti-collision hash value of the target shared data includes: extracting a random segment from the hash value of the storage path of the target shared data as the anti-collision hash value.
[0046] The above technical solution of the present invention has the following beneficial effects compared with the prior art:
[0047] The data sharing system based on blockchain and cloud computing described in the present invention is based on distributed storage of cloud computing, i.e., multiple data storage nodes, and blockchain technology to construct a data sharing system, wherein distributed storage can store shared data in multiple computers or servers in a dispersed manner, thereby increasing the reliability of data, and blockchain technology, with its decentralized and tamper-proof characteristics, can ensure the integrity and authenticity of the distributed storage path, further enhancing the reliability of data. In the data sharing system constructed by the present invention, the task scheduling node fully utilizes the processing power of each data processing node, adaptively selects the data processing node to process the target shared data, thereby achieving load balancing and improving the processing efficiency of shared data.
[0048] The upload data processing node splits the target shared data and transmits it in parallel to multiple data storage nodes, which speeds up the storage speed of shared data and reduces the waiting time for data upload; similarly, the download data processing node quickly obtains the storage path of the target shared data through the blockchain, reduces data search time, and improves the response speed of data access. The download data processing node reads the target shared data from multiple data storage nodes in parallel, which speeds up data aggregation and transmission, improves the reading efficiency of shared data, shortens user waiting time, and improves user experience.
[0049] In addition, the upload data processing node performs hash value collision detection on the target shared data, further ensuring the uniqueness and security of the storage path, and preventing potential hash value conflicts and errors in the storage path. In addition, the present invention sets two collision detection methods for hash value collision detection, and selects a suitable collision detection method according to the collision risk parameter and the preset collision risk parameter threshold, thereby improving the efficiency of collision detection and further improving the efficiency and security of target shared data storage. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to make the content of the present invention more clearly understood, the present invention is further described in detail below according to specific embodiments of the present invention in conjunction with the accompanying drawings, wherein:
[0051] Figure 1 It is a module diagram of a data sharing system based on blockchain and cloud computing in the present invention;
[0052] Figure 2 It is a flowchart of hash value collision detection performed by the upload data processing node;
[0053] Figure 3 It is a flow chart of users sharing data using the data sharing system proposed by the present invention. DETAILED DESCRIPTION
[0054] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it, but the embodiments are not intended to limit the present invention.
[0055] Reference Figure 1 As shown, the present invention provides a data sharing system based on blockchain and cloud computing, including a user terminal module, a cloud computing module and a blockchain.
[0056] The user terminal module includes a plurality of data sharing user terminals, which are used to initiate a data upload request or a data download request.
[0057] The cloud computing module is connected to the user terminal module and includes a plurality of task scheduling nodes, data processing nodes and data storage nodes.
[0058] The task scheduling node is connected to the data sharing user terminal in the user terminal module, and is used to determine an upload data processing node or a download data processing node among multiple data processing nodes based on a data upload request or a data download request.
[0059] The data processing node is connected to the task scheduling node and the data storage node, wherein the upload data processing node is used to split the target shared data, and transmit the split target shared data in parallel to at least two of the multiple data storage nodes for storage based on the balance principle according to the remaining storage space of each data storage node, and generate a storage path of the target shared data and a hash value of the storage path, and perform hash value collision detection; when the hash value collision detection passes, the storage path of the target shared data is uploaded to the blockchain for storage.
[0060] The download data processing node is used to obtain the storage path of the target shared data from the blockchain based on the hash value of the target shared data, and then read the target shared data from multiple data storage nodes in parallel according to the storage path of the target shared data.
[0061] The blockchain is connected to the task processing node in the cloud computing module and is used to store the storage path of the shared data.
[0062] Among them, the download data processing node quickly obtains the storage path of the target shared data through the blockchain, which reduces the data search time and improves the response speed of data access.
[0063] The following is a detailed introduction to the data operations of each node.
[0064] The task scheduling node determines an upload data processing node or a download data processing node from a plurality of data processing nodes based on a data upload request or a data download request, the steps comprising:
[0065] The task scheduling node obtains the operation parameter information and task scheduling information of each data processing node at multiple time points; the operation parameter information includes the CPU usage rate, the ratio of used memory to total memory, the number of data packets sent, the number of data packets received, the number of data bytes sent, and the number of data bytes received; the task scheduling information includes the number of allocated data upload requests, the amount of data corresponding to each data upload request, the number of allocated data download requests, and the amount of data corresponding to each data download request;
[0066] Based on the operating parameter information and task scheduling information of each data processing node at multiple time points, determining the operating abnormality parameters of the data processing node; in some embodiments, the task scheduling node determines the operating abnormality parameters of the data processing node through an abnormality confirmation model based on the operating parameter information and task scheduling information of each data processing node at multiple time points, wherein the abnormality determination model may be a Long Short-Term Memory network (LSTM) model;
[0067] Based on the abnormal operation parameters of each data processing node, a target data processing node is determined from multiple data processing nodes according to a load balancing principle.
[0068] For example, the task scheduling node may take a data processing node whose operation abnormality parameter is less than a preset operation abnormality parameter threshold as a candidate data processing node, and then determine a target data processing node from the candidate data processing nodes based on a load balancing principle.
[0069] The uploaded data processing node performs data segmentation on the target shared data, and the steps include:
[0070] The upload data processing node obtains the historical download times of the shared data uploaded by the data sharing user terminal where the target shared data is located;
[0071] Calculate the download frequency fluctuation parameter of the data sharing terminal based on the historical download frequency of the shared data uploaded by the data sharing user terminal where the target shared data is located and the average download frequency of the data sharing user terminal;
[0072] Determine the data segmentation size of the target shared data based on a download count fluctuation parameter of the data sharing user terminal where the target shared data is located;
[0073] The target shared data is segmented according to the data segmentation size of the target shared data.
[0074] Specifically, assuming that the data sharing user terminal where the target shared data is located is the i-th data sharing user terminal, the calculation formula for the download count fluctuation parameter of the i-th data sharing user terminal is:
[0075]
[0076] Among them, W (i,1) is the download frequency fluctuation parameter of the i-th data sharing user terminal, N (i,j) is the number of downloads of the jth uploaded shared data by the i-th data sharing user terminal, N (i,mean) is the average number of downloads of the i-th data sharing user terminal, and J is the total number of uploaded shared data of the i-th data sharing user terminal.
[0077] The calculation formula for the data segmentation size of the target shared data is:
[0078]
[0079] Among them, V iis the data segmentation size corresponding to the i-th data sharing user terminal, that is, the data segmentation size of the target shared data; a1 and a2 are both weight parameters, a1 and a2 are both greater than 0, a1+a2=1; N0 is the average number of downloads of the preset data sharing user terminal, W0 is the preset download number fluctuation parameter, and V0 is the preset data segmentation size.
[0080] After the upload data processing node divides the target shared data according to the data segmentation size, it transmits the divided target shared data in parallel to at least two of the multiple data storage nodes for storage based on the balance principle according to the remaining storage space of each data storage node, and generates a storage path of the target shared data and a hash value of the storage path. The storage path may include the storage locations of multiple data segments obtained by dividing the target shared data.
[0081] The upload data processing node splits the target shared data and transmits it in parallel to multiple data storage nodes, which speeds up the storage of shared data and reduces the waiting time for data uploading; similarly, the download data processing node reads the target shared data from multiple data storage nodes in parallel, which speeds up data aggregation and transmission, improves the reading efficiency of shared data, shortens user waiting time, and enhances user experience.
[0082] The process reference for hash value collision detection of uploaded data processing nodes Figure 2 As shown, the steps include:
[0083] All data storage nodes used to store target shared data are obtained as target data storage nodes; task coordination parameters between any two target data storage nodes are calculated, and the average value is taken to obtain the mean value of the task coordination parameters of the target shared data;
[0084] Based on the task coordination parameter between any two target data storage nodes and the average value of the task coordination parameter of the target shared data, a task coordination parameter fluctuation parameter of the target shared data is calculated;
[0085] Calculate the collision risk parameter of the target shared data based on the task coordination parameter mean value of the target shared data and the task coordination parameter fluctuation parameter of the target shared data;
[0086] When the collision risk parameter of the target shared data is less than a preset collision risk parameter threshold, a first collision detection method is used to perform hash value collision detection;
[0087] When the collision risk parameter of the target shared data is greater than or equal to the preset collision risk parameter threshold, a second collision detection method is used to perform hash value collision detection;
[0088] If the hash value collision detection of the target shared data fails, an anti-collision hash value of the target shared data is generated, the hash value of the storage path of the target shared data is updated, and the hash value collision detection is performed again until the target shared data passes the hash value collision detection.
[0089] If the task coordination parameter between the two target data storage nodes is large, it means that the two target data storage nodes are more likely to cooperate in storing the same uploaded shared data, and the possibility of a hash collision is greater. Therefore, in order to improve the efficiency of hash collision detection and thus improve the efficiency of data upload, this embodiment sets two collision detection methods. It is used when the collision risk parameter of the target shared data is less than the preset collision risk parameter threshold, indicating that the possibility of a hash collision is small. The first collision detection method is used to perform rough hash collision detection relatively quickly. When the collision risk parameter of the target shared data is greater than or equal to the preset collision risk parameter threshold, indicating that the possibility of a hash collision is large, the second collision detection method is used to achieve more refined collision detection.
[0090] Specifically, the calculation method of the task coordination parameter between any two target data storage nodes is: if at least a part of an uploaded shared data is stored using these two target data storage nodes, the uploaded shared data is recorded as the target uploaded shared data; the ratio between the total number of target uploaded shared data and the total number of uploaded shared data is used as the task coordination parameter between the two data storage nodes.
[0091] The task coordination parameter fluctuation parameter of the target shared data is calculated based on the task coordination parameter between any two target data storage nodes and the average value of the task coordination parameter of the target shared data. The formula is:
[0092]
[0093] Among them, W (e,2) is the task collaboration parameter fluctuation parameter for the target shared data, P (g,h) is the task coordination parameter between the g-th target data storage node and the h-th target data storage node, P (e,mean) is the mean value of task coordination parameters of target shared data, and G is the total number of target data storage nodes.
[0094] The collision risk parameter of the target shared data is calculated based on the task coordination parameter mean of the target shared data and the task coordination parameter fluctuation parameter of the target shared data. The formula is:
[0095]
[0096] Among them, R eis the collision risk parameter of the target shared data, a3 and a4 are both weight parameters, P0 is the mean of the preset task coordination parameter, W1 is the fluctuation parameter of the preset task coordination parameter, and R0 is the preset collision risk parameter.
[0097] The method of performing hash value collision detection by adopting the first collision detection method includes:
[0098] Sampling the hash value of the storage path of each uploaded shared data at multiple random locations to generate a sampled hash value of the uploaded shared data;
[0099] Sampling the hash value of the storage path of the target shared data at the same location to generate a sampled hash value of the target shared data;
[0100] If the sampled hash value of the target shared data at the same position is the same as the sampled hash value of any uploaded shared data, it is determined that there is a hash collision and the target shared data does not pass the hash value collision detection.
[0101] For example, the hash values at the 5th, 7th and 11th positions of the hash value of the storage path of each uploaded shared data are extracted, and the hash values at the 5th, 7th and 11th positions of the hash value of the storage path of the target shared data are correspondingly extracted; if the sampled hash value of the target shared data located at the same position is the same as the sampled hash value of any uploaded shared data, it is determined that a hash collision exists, and the target shared data fails the hash value collision detection.
[0102] The method of performing hash value collision detection by adopting the second collision detection method includes:
[0103] The K-means clustering algorithm is used to cluster the hash values of the storage paths of all uploaded shared data to determine multiple storage path clusters;
[0104] Calculate the hash value similarity between the hash value of the storage path of the target shared data and the cluster center of each storage path cluster, and take the storage path cluster with the largest hash value similarity as the target storage path cluster;
[0105] If there is a storage path of uploaded shared data in the target storage path cluster whose hash value is consistent with the storage path of the target shared data, it is determined that there is a hash collision and the target shared data does not pass the hash value collision detection.
[0106] Specifically, the K-means clustering algorithm is used to cluster the hash values of the storage paths of all uploaded shared data to determine multiple storage path clusters, including:
[0107] The hash values of the storage paths of all uploaded shared data are used as data points, and K data points are randomly selected as initial clustering centers;
[0108] Calculate the hash value similarity between each data point and each cluster center, and assign it to the cluster center with the largest hash value similarity, to obtain multiple candidate storage path clusters;
[0109] For each cluster, the mean of all data points in the cluster is used as the new cluster center;
[0110] Recalculate the hash value similarity between each data point and each cluster center, and update the candidate storage path clusters and cluster centers until the cluster centers no longer change significantly or reach a predetermined number of iterations, and output the storage path clusters at this time as the target storage path clusters.
[0111] For example, the Hamming distance between the hash values of two storage paths may be calculated as the hash value similarity.
[0112] If the target shared data hash value collision detection fails, an anti-collision hash value of the target shared data is generated to improve the security of data storage. The method for generating the anti-collision hash value of the target shared data includes: extracting a random segment of the hash value of the storage path of the target shared data as the anti-collision hash value.
[0113] In summary, the upload data processing node performs hash value collision detection on the target shared data, further ensuring the uniqueness and security of the storage path, and preventing potential hash value conflicts and errors in the storage path. In addition, the present invention sets two collision detection methods for hash value collision detection, and selects a suitable collision detection method according to the collision risk parameter and the preset collision risk parameter threshold, thereby improving the efficiency of collision detection and further improving the efficiency and security of target shared data storage.
[0114] Based on the data sharing system based on blockchain and cloud computing proposed by the present invention, refer to Figure 3 As shown in the figure, the process of user data sharing includes:
[0115] The data sharing user terminal initiates a data upload request;
[0116] The task scheduling node determines an upload data processing node from among multiple data processing nodes based on the data upload request;
[0117] The upload data processing node transmits the segmented target shared data in parallel to at least two of the multiple data storage nodes for storage;
[0118] The upload data processing node generates a storage path for the target shared data;
[0119] The uploaded data processing node generates a hash value of the storage path of the target shared data and performs a hash value collision detection. When the hash value collision detection passes, the storage path of the target shared data is uploaded to the blockchain for storage.
[0120] The data sharing user terminal initiates a data download request;
[0121] The task scheduling node determines a download data processing node from among a plurality of data processing nodes based on the data download request;
[0122] The download data processing node obtains the storage path of the target shared data from the blockchain based on the hash value of the target shared data;
[0123] The download data processing node reads the target shared data from multiple data storage nodes in parallel according to the storage path of the target shared data;
[0124] The download data processing node feeds back the target shared data to the data sharing user terminal.
[0125] In summary, the data sharing system based on blockchain and cloud computing proposed by the present invention is a distributed storage based on cloud computing, i.e., multiple data storage nodes, and a data sharing system constructed by blockchain technology, wherein distributed storage can store shared data in multiple computers or servers in a dispersed manner, thereby increasing the reliability of data, and blockchain technology, with its decentralized and tamper-proof characteristics, can ensure the integrity and authenticity of the distributed storage path, further enhancing the reliability of data. In the data sharing system constructed by the present invention, the task scheduling node makes full use of the processing power of each data processing node, adaptively selects the data processing node to process the target shared data, realizes load balancing, and improves data processing efficiency.
[0126] Obviously, the above embodiments are merely examples for the purpose of clear explanation and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived therefrom are still within the scope of protection of the present invention.
Claims
1. A data sharing system based on blockchain and cloud computing, characterized in that: include: A user terminal module, including a plurality of data sharing user terminals, for initiating a data upload request or a data download request; A cloud computing module, connected to the user terminal module, includes multiple task scheduling nodes, data processing nodes, and data storage nodes; The task scheduling node is connected to the data sharing user terminal in the user terminal module, and is used to determine an upload data processing node or a download data processing node among multiple data processing nodes based on a data upload request or a data download request; The data processing nodes are connected to the task scheduling nodes and the data storage nodes respectively, wherein the upload data processing node is used to perform data segmentation on the target shared data, and transmit the segmented target shared data in parallel to at least two of the multiple data storage nodes for storage based on the balance principle according to the remaining storage space of each data storage node, and generate a storage path of the target shared data and a hash value of the storage path, and perform hash value collision detection; When the hash value collision detection passes, the storage path of the target shared data is uploaded to the blockchain for storage; The uploaded data processing node performs hash value collision detection, including: All data storage nodes used to store target shared data are obtained as target data storage nodes; task coordination parameters between any two target data storage nodes are calculated, and the average value is taken to obtain the mean value of the task coordination parameters of the target shared data; The calculation method of the task coordination parameter between any two target data storage nodes is as follows: if at least a part of an uploaded shared data is stored using the two target data storage nodes, the uploaded shared data is recorded as the target uploaded shared data; the ratio between the total number of the target uploaded shared data and the total number of the uploaded shared data is used as the task coordination parameter between the two data storage nodes; Based on the task coordination parameter between any two target data storage nodes and the average value of the task coordination parameter of the target shared data, a task coordination parameter fluctuation parameter of the target shared data is calculated; Calculate the collision risk parameter of the target shared data based on the task coordination parameter mean value of the target shared data and the task coordination parameter fluctuation parameter of the target shared data; When the collision risk parameter of the target shared data is less than a preset collision risk parameter threshold, a first collision detection method is used to perform hash value collision detection; When the collision risk parameter of the target shared data is greater than or equal to the preset collision risk parameter threshold, a second collision detection method is used to perform hash value collision detection; If the hash value collision detection of the target shared data fails, an anti-collision hash value of the target shared data is generated, the hash value of the storage path of the target shared data is updated, and the hash value collision detection is performed again until the target shared data passes the hash value collision detection; The download data processing node is used to obtain the storage path of the target shared data from the blockchain based on the hash value of the target shared data, and then read the target shared data from multiple data storage nodes in parallel according to the storage path of the target shared data; Blockchain, connected to the task processing node in the cloud computing module, is used to store the storage path of shared data.
2. According to claim 1, a data sharing system based on blockchain and cloud computing is characterized in that: The task scheduling node determines an upload data processing node or a download data processing node from multiple data processing nodes based on a data upload request or a data download request, including: The task scheduling node obtains the operation parameter information and task scheduling information of each data processing node at multiple time points, and determines the abnormal operation parameters of the data processing node based on the operation parameter information and task scheduling information of each data processing node at multiple time points; Based on the abnormal operation parameters of each data processing node, a target data processing node is determined from multiple data processing nodes according to a load balancing principle.
3. According to claim 2, a data sharing system based on blockchain and cloud computing is characterized in that: The operating parameter information of the data processing node includes the CPU usage rate, the ratio of used memory to total memory, the number of data packets sent, the number of data packets received, the number of data bytes sent, and the number of data bytes received; the task scheduling information of the data processing node includes the number of allocated data upload requests, the amount of data corresponding to each data upload request, the number of allocated data download requests, and the amount of data corresponding to each data download request.
4. According to claim 2, a data sharing system based on blockchain and cloud computing is characterized in that: The task scheduling node determines the operation abnormality parameters of the data processing node through an abnormality confirmation model based on the operation parameter information and task scheduling information of each data processing node at multiple time points, and the abnormality confirmation model includes a long short-term memory network model.
5. According to claim 1, a data sharing system based on blockchain and cloud computing is characterized in that: The uploaded data processing node performs data segmentation on the target shared data, including: The upload data processing node obtains the historical download times of the shared data uploaded by the data sharing user terminal where the target shared data is located; Calculate the download frequency fluctuation parameter of the data sharing user terminal based on the historical download frequency of the shared data uploaded by the data sharing user terminal where the target shared data is located and the average download frequency of the data sharing user terminal; Determine the data segmentation size of the target shared data based on a download count fluctuation parameter of the data sharing user terminal where the target shared data is located; The target shared data is segmented according to the data segmentation size of the target shared data.
6. According to claim 1, a data sharing system based on blockchain and cloud computing is characterized in that: The task coordination parameter fluctuation parameter of the target shared data is calculated based on the task coordination parameter between any two target data storage nodes and the average value of the task coordination parameter of the target shared data. The formula is: ; in, Task coordination parameters for target shared data fluctuation parameters, For the The task coordination parameter between the target data storage node and the hth target data storage node, is the mean value of task coordination parameters for target shared data, The total number of target data storage nodes; The collision risk parameter of the target shared data is calculated based on the task coordination parameter mean of the target shared data and the task coordination parameter fluctuation parameter of the target shared data. The formula is: ; in, is the collision risk parameter for target shared data, and are weight parameters, is the mean value of the preset task coordination parameters, To preset task coordination parameter fluctuation parameters, It is the preset collision risk parameter.
7. According to claim 1, a data sharing system based on blockchain and cloud computing is characterized in that: The method of performing hash value collision detection by adopting the first collision detection method includes: Sampling the hash value of the storage path of each uploaded shared data at multiple random locations to generate a sampled hash value of the uploaded shared data; Sampling the hash value of the storage path of the target shared data at the same location to generate a sampled hash value of the target shared data; If the sampled hash value of the target shared data at the same position is the same as the sampled hash value of any uploaded shared data, it is determined that there is a hash collision and the target shared data does not pass the hash value collision detection.
8. According to claim 1, a data sharing system based on blockchain and cloud computing is characterized in that: The method of performing hash value collision detection by adopting the second collision detection method includes: The K-means clustering algorithm is used to cluster the hash values of the storage paths of all uploaded shared data to determine multiple storage path clusters; Calculate the hash value similarity between the hash value of the storage path of the target shared data and the cluster center of each storage path cluster, and take the storage path cluster with the largest hash value similarity as the target storage path cluster; If there is a storage path of uploaded shared data in the target storage path cluster whose hash value is consistent with the storage path of the target shared data, it is determined that there is a hash collision and the target shared data does not pass the hash value collision detection.
9. A data sharing system based on blockchain and cloud computing according to claim 1, characterized in that: The method for generating a collision-resistant hash value of target shared data includes: extracting a random segment from a hash value of a storage path of the target shared data as the collision-resistant hash value.
Citation Information
Patent Citations
Incomplete data synchronization method, system and device based on block chain data
CN109522362A
System for managing electronic document using ethereum and IPFS and method thereof
KR102456903B1