Business data distributed storage method and system
By combining blockchain technology, asymmetric encryption technology and digital identity technology in distributed storage systems, dual encryption and consistency protection of data is achieved, solving the problems of low data security, poor data consistency and low data storage efficiency in the existing technology, and improving the security and efficiency of data storage.
Patent Information
- Application Number
- CN202510050098.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-13
- Publication Date
- 2025-05-23
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing distributed storage systems have problems such as low data security, poor data consistency and low data storage efficiency.
By combining blockchain technology, asymmetric encryption technology and digital identity technology, dual encryption and consistency protection of data is achieved. Specific steps include key generation and identity registration of the data acquisition device, data encryption and signature, signature verification, decryption and storage to the IPFS system, and the data consistency is ensured by using an improved consensus algorithm.
It improves the security and consistency of data storage, enhances the security of data transmission, and improves storage space utilization and data storage efficiency by optimizing the blockchain on-chain storage process.
Smart Images

Figure CN120034554A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of distributed storage technology, and specifically relates to a business data distributed storage method and system. Background Art
[0002] Business data is the core data of an enterprise, which includes important information such as partners, supply chain, and trade data. As the scale of the enterprise grows, the volume of business data also increases exponentially. Existing business data is often stored in the enterprise's local database, which is prone to data loss due to hardware crashes. Distributed storage systems are widely used in various types of business data storage due to their advantages such as high availability, scalability, and fault tolerance. However, the existing distributed storage systems still have the following problems: low data security: In distributed storage systems, data may be maliciously tampered with or leaked, resulting in business interruptions and user privacy leaks; poor data consistency: In distributed storage systems, multiple nodes may have inconsistent data, affecting the normal operation of the business; low data storage efficiency: Existing distributed storage systems often use simple data sharding and replication strategies, resulting in low storage space utilization and low storage efficiency. Summary of the invention
[0003] In order to solve the problems of low data security, poor data consistency and low data storage efficiency in the prior art, the present invention aims to provide a business data distributed storage method and system.
[0004] The technical solution adopted by the present invention is:
[0005] A distributed storage method for business data comprises the following steps:
[0006] Based on the trusted institution, all data acquisition devices connected to the cloud data center are key-generated and identity-registered to obtain the corresponding public-private key pair and signature information, and the private key and signature information in the public-private key pair are returned to the corresponding data acquisition device, and the public key in the public-private key pair is published to the cloud data center;
[0007] Based on the data collection device, the collected real-time business data is encrypted and signed according to the private key and signature information to obtain the corresponding encrypted real-time business data and real-time signature data, and the encrypted real-time business data and real-time signature data are uploaded to the cloud data center;
[0008] Based on the cloud data center, a trusted institution is called to perform signature verification on the real-time signature data. After the signature verification is passed, the encrypted real-time business data is decrypted according to the public key to obtain the corresponding decrypted real-time business data, and the decrypted real-time business data is sent to the preset distributed storage network;
[0009] Based on the distributed storage network, the corresponding real-time data blocks and real-time storage requests are generated according to the decrypted real-time business data, and consensus is reached on the real-time storage requests. After the consensus is successful, the real-time data blocks are linked to the chain, and the decrypted real-time business data is stored in the IPFS system.
[0010] Furthermore, based on the trusted institution, key generation and identity registration are performed for all data acquisition devices connected to the cloud data center to obtain corresponding public-private key pairs and signature information, and the private key and signature information in the public-private key pair are returned to the corresponding data acquisition device, and the public key in the public-private key pair is published to the cloud data center, including the following steps:
[0011] Based on the cloud data center, collect attribute information and entity IDs of all data collection devices connected to the cloud data center, and send some attribute information and some entity IDs to a trusted institution;
[0012] Based on the trusted institution, key generation and identity registration are performed on the data collection device according to the attribute information and entity ID, and the corresponding public-private key pair and signature information are obtained;
[0013] The private key and signature information in the public-private key pair are sent to the corresponding data acquisition device, and the public key in the public-private key pair is published to the cloud data center.
[0014] Furthermore, the distributed storage network includes a network interface, a smart contract, an IPFS system, and a blockchain consisting of a distributed connection of several nodes.
[0015] Furthermore, based on the distributed storage network, the corresponding real-time data blocks and real-time storage requests are generated according to the decrypted real-time business data, and consensus is reached on the real-time storage request. After the consensus is successful, the real-time data blocks are linked to the chain, and the decrypted real-time business data is stored in the IPFS system, including the following steps:
[0016] Based on the distributed storage network, the network interface is used to receive the decrypted real-time business data, and the IPFS system is used to generate the real-time data hash value of the decrypted real-time business data;
[0017] Call the smart contract, convert the real-time data hash value into a real-time data block, generate the corresponding real-time storage request, and send the real-time storage request to the blockchain;
[0018] Based on blockchain, the IPBFT consensus algorithm is used to reach consensus on real-time storage requests;
[0019] After the consensus is successful, the real-time data block is linked to the chain, and the decrypted real-time business data is stored in the IPFS system.
[0020] Furthermore, by combining the AP clustering algorithm and the hybrid reputation mechanism scoring strategy, the PBFT consensus algorithm is improved to construct the IPBFT consensus algorithm.
[0021] Furthermore, based on blockchain, the IPBFT consensus algorithm is used to reach consensus on real-time storage requests, including the following steps:
[0022] Using the AP clustering algorithm and the hybrid reputation mechanism scoring strategy, several nodes in the blockchain are grouped to obtain a leadership node group and several consensus node groups; the leadership node group includes several leadership nodes, each leadership node corresponds to a consensus node group, and the consensus node group includes several consensus nodes;
[0023] The target leader node that receives the real-time storage request is used as the master node. The master node and the corresponding target consensus node group are used to perform intra-group consensus on the real-time storage request using the PBFT consensus algorithm to obtain a real-time intra-group consensus result.
[0024] Based on the leadership node group and the corresponding consensus node groups, the PBFT consensus algorithm is used to conduct inter-group consensus on the real-time intra-group consensus results to obtain the corresponding real-time inter-group consensus results.
[0025] Furthermore, using the AP clustering algorithm and the hybrid reputation mechanism scoring strategy, several nodes in the blockchain are grouped to obtain a leadership node group and several consensus node groups, including the following steps:
[0026] Use the AP clustering algorithm to initialize several nodes in the blockchain and obtain M initial cluster centers, where M is the total number of cluster centers;
[0027] According to the hybrid reputation mechanism scoring strategy, the reputation value of each node is obtained, and the nodes are sorted in descending order according to the reputation value, and bias parameters are set for the first M nodes;
[0028] Introducing an iterative attenuation coefficient, the initial attraction information and initial belonging information of all nodes are updated to obtain updated attraction information and updated belonging information;
[0029] Based on the bias parameters of the nodes, the initial cluster centers are updated according to the updated attraction information and the updated belonging information to obtain M updated cluster centers;
[0030] According to the similarity between the updated cluster center and the node, all nodes are grouped to obtain M consensus node groups;
[0031] The cluster centers corresponding to the M consensus node groups are used as the leader nodes to obtain the leader node group, and the other nodes in the consensus node group are used as consensus nodes;
[0032] If the number of iterations exceeds the clustering iteration threshold or the cluster center does not change, the final leader node group and the corresponding final consensus node groups are output.
[0033] Furthermore, the hybrid reputation mechanism scoring strategy is composed of the entropy weight method and the reputation mechanism scoring strategy.
[0034] Furthermore, after the consensus is successful, the real-time data block is linked to the chain, and the decrypted real-time business data is stored in the IPFS system, including the following steps:
[0035] If the real-time inter-group consensus result is a consensus success, a unique time slice is allocated to all consensus nodes in the target consensus node group, and the real-time data block is sent to the target consensus node group;
[0036] If any target consensus node in the target consensus node group receives the real-time data block in the correct time slice, the target consensus node is used to link the real-time data block to the chain, and a real-time chain success notification is sent to the smart contract;
[0037] Based on smart contracts, the decrypted real-time business data will be stored in the IPFS system according to the real-time chain success notification.
[0038] A business data distributed storage system is used to implement a business data distributed storage method. The system includes a cloud data center, a trusted organization and several data acquisition devices. The cloud data center and the trusted organization are respectively connected to the several data acquisition devices in communication. The cloud data center is provided with a distributed storage network, and the trusted organization is connected to the cloud data center in communication.
[0039] The beneficial effects of the present invention are:
[0040] The present invention discloses a distributed storage method and system for business data, which combines blockchain technology to achieve data encryption and consistency protection, prevent data leakage and tampering, and improve data storage security; in the data transmission process, asymmetric encryption technology and digital identity technology are combined to double encrypt business data, thereby improving data transmission security; an improved consensus algorithm is adopted to ensure that most nodes in the distributed system are honest, while achieving data consistency; the blockchain on-chain storage process is optimized, thereby improving storage space utilization and data storage efficiency.
[0041] Other beneficial effects of the present invention will be further described in the specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 It is a flowchart of the business data distributed storage method in the present invention.
[0043] Figure 2 It is a structural block diagram of the business data distributed storage system in the present invention. DETAILED DESCRIPTION
[0044] The present invention will be further explained below in conjunction with the accompanying drawings and specific embodiments.
[0045] Embodiment 1:
[0046] like Figure 1 As shown, this embodiment provides a business data distributed storage method, including the following steps:
[0047] S1: Based on a trusted institution, key generation and identity registration are performed for all data acquisition devices connected to the cloud data center, and the corresponding public-private key pair and signature information are obtained. The private key and signature information in the public-private key pair are returned to the corresponding data acquisition device, and the public key in the public-private key pair is published to the cloud data center, including the following steps:
[0048] S1-1: Based on the cloud data center, collect attribute information and entity IDs of all data collection devices connected to the cloud data center, and send some attribute information and some entity IDs to the trusted organization;
[0049] S1-2: Based on the trusted institution, according to the attribute information and entity ID, the data acquisition device is key-generated and identity-registered to obtain the corresponding public-private key pair and signature information, including the following steps:
[0050] S1-2-1: Based on the trusted institution, according to the attribute information of the data acquisition device, use the asymmetric encryption algorithm to generate keys to obtain the public parameters GP, the master key MSK and the initial key PK;
[0051] The formula is:
[0052] GP={g,g 1 ,g a ,e(g,g) a ,H 1 ,H 2 ,H 3 ,H 4 ,H 5 ,H 6}
[0053] PK={g,g 1 ,g a ,e(g,g) a ,H u}
[0054] MSK = {g a ,a}
[0055] Where GP is the public parameter; MSK is the master key; PK is the initial key; a is the integer domain Z p Random number; H 1 , H 2 , H 3 , H 4 , H 5 , H 6 , H u Both are target hash functions; g, g 1 , g a are all random numbers that are generators of the cyclic group G; e(g,g) a is a bilinear map of random numbers g;
[0056] S1-2-2: Based on the public parameter GP, the master key MSK, the initial key PK and the attribute information V of the data acquisition device u , generate the corresponding public-private key pair of the data acquisition device, the public-private key pair includes the private key SK u and public key PK u , the formula is:
[0057] SK u = {MSK,V u ,K=g a g ab ,L u =g b ,(K=H 3 (V u ) b )}
[0058]
[0059] In the formula, SK u is the private key of the data acquisition device u; b is the integer domain Z p Random number; L u , K is the private key parameter of the data acquisition device u; H 3 is the target hash function of the public parameter GP; u is the indicator of the data acquisition device; MSK is the master key; PK is the initial key; PK u is the public key of the data acquisition device u; g b , g a , g ab is the random number of the generator of the cyclic group G; V u is the attribute information of the data collection device u;
[0060] S1-2-3: Perform identity registration based on the private key in the public-private key pair and the corresponding entity ID to obtain the signature information of the corresponding data acquisition device;
[0061] The formula is:
[0062]
[0063] In the formula, k' is a random number; K u is the registration parameter of the data collection device u; KID u KID is the registration ID of the data collection device u; u and the corresponding K u The signature information {K u ,KID u}; H 1 Hash function for the target hash; ID u SK is the entity ID of the data collection device u; u is the private key of the data collection device u; is the prime order; P is the base point of the prime domain;
[0064] S1-3: Send the private key and signature information in the public-private key pair to the corresponding data acquisition device, and publish the public key in the public-private key pair to the cloud data center;
[0065] S2: Based on the data collection device, the collected real-time business data is encrypted and signed according to the private key and signature information to obtain the corresponding encrypted real-time business data and real-time signature data, and the encrypted real-time business data and real-time signature data are uploaded to the cloud data center;
[0066] The formula is:
[0067] M u =E(SK u ,m u )
[0068] Where M u is the encrypted real-time business data of the data acquisition device u; E(*) is the asymmetric encryption function; m u is the real-time business data of the data collection device u; SK u is the private key of the data acquisition device u; u is the indication value of the data acquisition device;
[0069] The formula is:
[0070]
[0071] In the formula, r' is a random number; is the prime order; P is the base point of the prime domain; H 2 is the target hash function; K u For the signature information {K u ,KID u}Registration parameters of data collection device u; KID u For the signature information {K u ,KIDu}Registration ID of data acquisition device u; ID u is the entity ID of the data acquisition device u; the signature data is {ID u ,M u ,γ'={K u ,R u ,B u}}; R u ,B u ,γ' are the signature parameters of the data acquisition device u;
[0072] S3: Based on the cloud data center, the trusted institution is called to perform signature verification on the real-time signature data. After the signature verification is passed, the encrypted real-time business data is decrypted according to the public key to obtain the corresponding decrypted real-time business data, and the decrypted real-time business data is sent to the preset distributed storage network;
[0073] The formula is:
[0074] β u B u P=β u H 2 (R u ,M u ,ID u ,K u )R u +β u K u +β u H 1 (ID u ,K u )PK u
[0075] In the formula, β u PK is the signature verification parameter of the data acquisition device u; u is the public key of the data acquisition device u; if the left formula is equal to the right formula, the signature verification is successful;
[0076] The formula is:
[0077] m' u =E - (PK u ,M u )
[0078] Where m'u is the decrypted real-time business data of data acquisition device u; E - (*) is an asymmetric decryption function; M u PK is the encrypted real-time business data of the data collection device u; u is the public key of the data collection device u;
[0079] The distributed storage network includes network interfaces, smart contracts, Inter Planetary File System (IPFS), and a blockchain consisting of distributed connections of several nodes;
[0080] S4: Based on the distributed storage network, the corresponding real-time data blocks and real-time storage requests are generated according to the decrypted real-time business data, and consensus is reached on the real-time storage request. After the consensus is successful, the real-time data blocks are linked to the chain, and the decrypted real-time business data is stored in the IPFS system, including the following steps:
[0081] S4-1: Based on the distributed storage network, use the network interface to receive the decrypted real-time business data, and use the IPFS system to generate the real-time data hash value of the decrypted real-time business data;
[0082] S4-2: Call the smart contract, convert the real-time data hash value into a real-time data block, generate a corresponding real-time storage request, and send the real-time storage request to the blockchain;
[0083] S4-3: Based on blockchain, use the Improved Byzantine Fault Tolerance (IPBFT) consensus algorithm to reach consensus on real-time storage requests;
[0084] By combining the Affinity-Propagation (AP) clustering algorithm and the hybrid reputation mechanism scoring strategy, the Byzantine Fault Tolerance (IPBFT) consensus algorithm is improved to construct the IPBFT consensus algorithm.
[0085] The steps include:
[0086] S4-3-1: Use the AP clustering algorithm and the hybrid reputation mechanism scoring strategy to group several nodes in the blockchain to obtain a leadership node group and several consensus node groups; the leadership node group includes several leadership nodes, each leadership node corresponds to a consensus node group, and the consensus node group includes several consensus nodes;
[0087] The steps include:
[0088] S4-3-1-1: Use the AP clustering algorithm to initialize several nodes in the blockchain and obtain M initial cluster centers, where M is the total number of cluster centers;
[0089] S4-3-1-2: According to the hybrid reputation mechanism scoring strategy, obtain the reputation value of each node, and sort the nodes in descending order according to the reputation value, and set bias parameters for the first M nodes;
[0090] The hybrid reputation mechanism scoring strategy consists of the entropy weight method and the reputation mechanism scoring strategy;
[0091] The steps include:
[0092] S4-3-1-2-1: Based on the hybrid reputation mechanism scoring strategy, the entropy weight method is used to obtain the honest behavior weight and malicious behavior weight of each node in the blockchain, including the following steps:
[0093] A-1: Set the first evaluation matrix of the node's honest behavior index and the second evaluation matrix of the node's malicious behavior index;
[0094] Honest behavior indicators include correct transaction review indicators, accurate identity verification indicators, and compliance with legal rules indicators; malicious behavior indicators are the opposite of honest behavior indicators, including incorrect transaction review indicators, incorrect identity verification indicators, and violation of legal rules indicators;
[0095] A-2: Normalize each column in the first evaluation matrix and the second evaluation matrix to obtain the first normalized evaluation matrix and the second normalized evaluation matrix; in detail, use the critical value method to normalize, find the maximum and minimum values of each column, subtract the minimum value from each element, and divide it by the difference between the maximum and minimum values to obtain a normalized matrix:
[0096] A-3: Obtain the information entropy of each column in the first normalized evaluation matrix and the second normalized evaluation matrix. The formula is:
[0097]
[0098] In the formula, E i' is the information entropy of the i'th indicator; i' is the indicator quantity; j' is the evaluation matrix column indicator quantity; n is the total number of indicators; p i'j' is the normalized value of the i'th indicator in the j'th column;
[0099] A-4: According to the ratio of information entropy to total information entropy, obtain the honest behavior weight of each honest behavior indicator and the malicious behavior weight of each malicious behavior indicator. The smaller the information entropy, the greater the weight. The formula is:
[0100]
[0101] In the formula, w i' is the weight of the i'th indicator;
[0102] Combining the entropy weight method with the reputation mechanism, the entropy weight method is used to quantitatively evaluate the various behaviors of nodes and determine their corresponding weights in the consensus, so as to formulate reward and punishment measures more objectively, more accurately reward nodes that abide by the rules and participate in good faith, and punish nodes that deliberately violate the rules and disrupt the transaction order;
[0103] S4-3-1-2-2: Obtain the node's reputation value based on the honest behavior weight and the malicious behavior weight, and set the node reputation value update strategy, including the following steps:
[0104] B-1: Based on the honest behavior weight of the honest behavior index, the honest behavior is graded and a corresponding reward behavior table is established. Based on the malicious behavior weight of the malicious behavior index, the malicious behavior is graded and a corresponding penalty behavior table is established.
[0105] B-2: According to the reward behavior table, obtain the reward value of the node in the current consensus stage, and according to the penalty behavior table, obtain the penalty value of the node in the current consensus stage;
[0106] B-3: According to the reward and penalty values of the node in the current consensus stage, the corresponding reputation value is obtained. The formula is:
[0107]
[0108] In the formula, is the reputation value of node i" at iteration number t; is the reward value of honest behavior level L; is the count of the integrity behavior level L; is the penalty value of malicious behavior level L'; is the count of malicious behavior level L'; i" is the node indicator; t is the iteration number indicator; L is the honest behavior level; L' is the malicious behavior level;
[0109] The honest and malicious behaviors of nodes are associated with the factors of efficient and normal operation of the blockchain. The new reputation value of the node is calculated based on the reward value and the penalty value. When the node performs well, its reputation value will be improved, thereby improving its status and weight in the system, and when the node performs poorly, its reputation value will decrease.
[0110] B-4: Introduce the hyperbolic tangent function and set the node reputation update strategy. The formula is:
[0111]
[0112] In the formula, is the updated reputation value of node i" at iteration number t+1; α is the upper limit of the reputation value; k" is the slope parameter; is the reputation value of node i" at iteration number t;
[0113] S4-3-1-2-3: Sort the nodes in descending order according to their reputation values, set bias parameters for the first M nodes, and remove nodes with reputation values lower than the minimum reputation value threshold as malicious nodes; the bias parameter indicates the tendency of a node to be selected as a cluster center, and has an important influence on which class representatives will be the final cluster center. The larger the bias parameter value, the greater the possibility that the node will be the final cluster center, which weakens the impact of the AP clustering algorithm on the initial nodes;
[0114] S4-3-1-3: introducing an iterative attenuation coefficient, updating the initial attraction information and initial belonging information of all nodes, and obtaining updated attraction information and updated belonging information;
[0115] The formula for attractiveness information is:
[0116]
[0117] In the formula, r t+1 (i, k) is the degree to which node k is suitable as the cluster center of node i at iteration number t+1, that is, the attraction information of node k to node i; a t (i, j) is the suitability of node i to select node j as its cluster center at iteration number t; r t (i, j) is the degree to which node j is suitable as the cluster center of node i when the number of iterations is t; s(i, k) is the similarity of node k as the cluster center of node i; i, j and k are all node indicators; t is the number of iterations indicator;
[0118] The formula for attribution information is:
[0119]
[0120] In the formula, r t+1 (k, k) is the degree to which node k is suitable as a cluster center when the number of iterations is t+1; ∑ j≠i,k max{r t+1 (j,k),0} is the degree to which node k is suitable to be a cluster center other than node i at the iteration number t+1; a t+1 (i, k) is the suitability of node i to select node k as its cluster center at iteration number t+1, that is, the belonging information of node k to node i;
[0121] The iterative update formula is:
[0122] r' t+1 (i,k)=λ*r t (i,k)+(1-λ)*r t+1(i,k)
[0123] a' t+1 (i,k)=λ*a t (i,k)+(1-λ)*a t+1 (i,k)
[0124] In the formula, r' t+1 (i,k), a' t+1 (i, k) is the updated attraction information and updated belonging information of node k to node i at iteration number t+1; λ is the iteration attenuation coefficient; r t (i,k),r t+1 (i,k) is the attraction information of node k to node i at iterations t and t+1; a' t+1 (i,k), a t+1 (i, k) is the ownership information of node k to node i at iterations t and t+1; λ is the iteration attenuation coefficient;
[0125] S4-3-1-4: Based on the bias parameters of the nodes, the initial cluster centers are updated according to the updated attraction information and the updated belonging information to obtain M updated cluster centers;
[0126] S4-3-1-5: Group all nodes according to the similarity between the updated cluster center and the node to obtain M consensus node groups;
[0127] S4-3-1-6: The cluster centers corresponding to the M consensus node groups are used as the leader nodes to obtain the leader node group, and the other nodes in the consensus node group are used as consensus nodes;
[0128] S4-3-1-7: If the number of iterations exceeds the clustering iteration threshold or the cluster center does not change, output the final leader node group and the corresponding final consensus node groups;
[0129] The judgment formula of cluster center is:
[0130] k=argmax{a(i,k)+r(i,k)}
[0131] In the formula, i and k are both node indicators; if i = k, then node i is the cluster center of node k; if i ≠ k, then node k is the cluster center of node i;
[0132] S4-3-2: The target leader node that receives the real-time storage request is used as the master node, and the master node and the corresponding target consensus node group are used to use the PBFT consensus algorithm to perform intra-group consensus on the real-time storage request to obtain a real-time intra-group consensus result, including the following steps:
[0133] S4-3-2-1: the target leader node that receives the real-time storage request is used as the master node, and the master node is used to send the real-time storage request to all leader nodes of the leader node group;
[0134] S4-3-2-2: Based on the PBFT consensus algorithm, the master node is used to broadcast the pre-prepared message to the corresponding target consensus node group and verify the legitimacy of the real-time storage request;
[0135] S4-3-2-3: If the legitimacy verification passes, the master node is used to broadcast a preparation message containing the master node's voting information to the corresponding target consensus node group, and the preparation message is written into the message log;
[0136] S4-3-2-4: Based on the consensus nodes in the target consensus node group, confirmation messages are exchanged. If the target consensus node receives confirmation messages exceeding the number threshold, the intra-group consensus is successful and the real-time intra-group consensus result is obtained;
[0137] S4-3-3: Based on the leader node group and the corresponding consensus node groups, use the PBFT consensus algorithm to conduct inter-group consensus on the real-time intra-group consensus result to obtain the corresponding real-time inter-group consensus result, including the following steps:
[0138] S4-3-3-1: Based on the PBFT consensus algorithm, the leader node receives the consensus results returned by the corresponding consensus node group and sends the voting results to the master node;
[0139] S4-3-3-2: Use the master node to receive the voting results sent by the leader node in the leader node group, and generate a successful on-chain message based on the voting results;
[0140] S4-3-3-3: Broadcast the successful chaining message to the leadership node group, and use the leadership node group to broadcast the successful chaining message to the corresponding consensus node groups;
[0141] S4-4: After consensus is successful, the real-time data block is linked to the chain, and the decrypted real-time business data is stored in the IPFS system, including the following steps:
[0142] S4-4-1: If the real-time inter-group consensus result is a consensus success, a unique time slice is allocated to all consensus nodes in the target consensus node group, and the real-time data block is sent to the target consensus node group;
[0143] S4-4-2: If any target consensus node in the target consensus node group receives the real-time data block in the correct time slice, the target consensus node is used to link the real-time data block to the chain, and a real-time chain success notification is sent to the smart contract;
[0144] S4-4-3: Based on smart contracts, according to the real-time chain success notification, the decrypted real-time business data is stored in the IPFS system.
[0145] Embodiment 2:
[0146] like Figure 2 As shown, this embodiment provides a distributed storage system for business data, which is used to implement a distributed storage method for business data. The system includes a cloud data center, a trusted organization, and several data acquisition devices. The cloud data center and the trusted organization are respectively connected to the several data acquisition devices in communication, and the cloud data center is provided with a distributed storage network, and the trusted organization is connected to the cloud data center in communication;
[0147] The trusted institution is used to generate keys and register identities for all data acquisition devices connected to the cloud data center, obtain corresponding public-private key pairs and signature information, return the private key and signature information in the public-private key pair to the corresponding data acquisition device, and publish the public key in the public-private key pair to the cloud data center;
[0148] The cloud data center is used to call a trusted institution to perform signature verification on the real-time signature data. After the signature verification is passed, the encrypted real-time business data is decrypted according to the public key to obtain the corresponding decrypted real-time business data, and the decrypted real-time business data is sent to a preset distributed storage network;
[0149] The data collection device is used to encrypt and sign the collected real-time business data according to the private key and the signature information, obtain the corresponding encrypted real-time business data and real-time signature data, and upload the encrypted real-time business data and real-time signature data to the cloud data center;
[0150] The distributed storage network is used to generate corresponding real-time data blocks and real-time storage requests based on the decrypted real-time business data, reach consensus on the real-time storage requests, and after successful consensus, link the real-time data blocks to the chain and store the decrypted real-time business data in the IPFS system.
[0151] The present invention discloses a distributed storage method and system for business data, which combines blockchain technology to achieve data encryption and consistency protection, prevent data leakage and tampering, and improve data storage security; in the data transmission process, asymmetric encryption technology and digital identity technology are combined to double encrypt business data, thereby improving data transmission security; an improved consensus algorithm is adopted to ensure that most nodes in the distributed system are honest, while achieving data consistency; the blockchain on-chain storage process is optimized, thereby improving storage space utilization and data storage efficiency.
[0152] The present invention is not limited to the above optional implementations, and anyone can derive other various forms of products under the enlightenment of the present invention. The above specific implementations should not be understood as limiting the scope of protection of the present invention. The scope of protection of the present invention should be based on the definition in the claims, and the description can be used to interpret the claims.
Claims
1. A distributed storage method for business data, characterized in that: The steps include: Based on the trusted institution, all data acquisition devices connected to the cloud data center are key-generated and identity-registered to obtain the corresponding public-private key pair and signature information, and the private key and signature information in the public-private key pair are returned to the corresponding data acquisition device, and the public key in the public-private key pair is published to the cloud data center; Based on the data collection device, the collected real-time business data is encrypted and signed according to the private key and signature information to obtain the corresponding encrypted real-time business data and real-time signature data, and the encrypted real-time business data and real-time signature data are uploaded to the cloud data center; Based on the cloud data center, a trusted institution is called to perform signature verification on the real-time signature data. After the signature verification is passed, the encrypted real-time business data is decrypted according to the public key to obtain the corresponding decrypted real-time business data, and the decrypted real-time business data is sent to the preset distributed storage network; Based on the distributed storage network, the corresponding real-time data blocks and real-time storage requests are generated according to the decrypted real-time business data, and consensus is reached on the real-time storage requests. After the consensus is successful, the real-time data blocks are linked to the chain, and the decrypted real-time business data is stored in the IPFS system.
2. A distributed storage method for business data according to claim 1, characterized in that: Based on a trusted institution, key generation and identity registration are performed for all data acquisition devices connected to the cloud data center to obtain corresponding public-private key pairs and signature information, and the private key and signature information in the public-private key pair are returned to the corresponding data acquisition device, and the public key in the public-private key pair is published to the cloud data center, including the following steps: Based on the cloud data center, collect attribute information and entity IDs of all data collection devices connected to the cloud data center, and send some attribute information and some entity IDs to a trusted institution; Based on the trusted institution, key generation and identity registration are performed on the data collection device according to the attribute information and entity ID, and the corresponding public-private key pair and signature information are obtained; The private key and signature information in the public-private key pair are sent to the corresponding data acquisition device, and the public key in the public-private key pair is published to the cloud data center.
3. A distributed storage method for business data according to claim 2, characterized in that: The distributed storage network includes a network interface, a smart contract, an IPFS system, and a blockchain composed of a distributed connection of several nodes.
4. A distributed storage method for business data according to claim 3, characterized in that: Based on the distributed storage network, the corresponding real-time data blocks and real-time storage requests are generated according to the decrypted real-time business data, and consensus is reached on the real-time storage request. After the consensus is successful, the real-time data blocks are linked to the chain, and the decrypted real-time business data is stored in the IPFS system, including the following steps: Based on the distributed storage network, the network interface is used to receive the decrypted real-time business data, and the IPFS system is used to generate the real-time data hash value of the decrypted real-time business data; Call the smart contract, convert the real-time data hash value into a real-time data block, generate the corresponding real-time storage request, and send the real-time storage request to the blockchain; Based on blockchain, the IPBFT consensus algorithm is used to reach consensus on real-time storage requests; After the consensus is successful, the real-time data block is linked to the chain, and the decrypted real-time business data is stored in the IPFS system.
5. A distributed storage method for business data according to claim 4, characterized in that: By combining the AP clustering algorithm and the hybrid reputation mechanism scoring strategy, the PBFT consensus algorithm is improved to construct the IPBFT consensus algorithm.
6. A distributed storage method for business data according to claim 5, characterized in that: Based on blockchain, the IPBFT consensus algorithm is used to reach consensus on real-time storage requests, including the following steps: Using the AP clustering algorithm and the hybrid reputation mechanism scoring strategy, several nodes in the blockchain are grouped to obtain a leadership node group and several consensus node groups; the leadership node group includes several leadership nodes, each of the leadership nodes corresponds to a consensus node group, and the consensus node group includes several consensus nodes; The target leader node that receives the real-time storage request is used as the master node. The master node and the corresponding target consensus node group are used to perform intra-group consensus on the real-time storage request using the PBFT consensus algorithm to obtain a real-time intra-group consensus result. Based on the leadership node group and the corresponding consensus node groups, the PBFT consensus algorithm is used to conduct inter-group consensus on the real-time intra-group consensus results to obtain the corresponding real-time inter-group consensus results.
7. A distributed storage method for business data according to claim 6, characterized in that: Using the AP clustering algorithm and the hybrid reputation mechanism scoring strategy, several nodes in the blockchain are grouped to obtain a leadership node group and several consensus node groups, including the following steps: Use the AP clustering algorithm to initialize several nodes in the blockchain and obtain M initial cluster centers, where M is the total number of cluster centers; According to the hybrid reputation mechanism scoring strategy, the reputation value of each node is obtained, and the nodes are sorted in descending order according to the reputation value, and bias parameters are set for the first M nodes; An iterative attenuation coefficient is introduced to update the initial attraction information and initial belonging information of all nodes to obtain updated attraction information and updated belonging information; Based on the bias parameters of the nodes, the initial cluster centers are updated according to the updated attraction information and the updated belonging information to obtain M updated cluster centers; According to the similarity between the updated cluster center and the node, all nodes are grouped to obtain M consensus node groups; The cluster centers corresponding to the M consensus node groups are used as the leader nodes to obtain the leader node group, and the other nodes in the consensus node group are used as consensus nodes; If the number of iterations exceeds the clustering iteration threshold or the cluster center does not change, the final leader node group and the corresponding final consensus node groups are output.
8. A distributed storage method for business data according to claim 7, characterized in that: The hybrid reputation mechanism scoring strategy is composed of the entropy weight method and the reputation mechanism scoring strategy.
9. A distributed storage method for business data according to claim 6, characterized in that: After the consensus is successful, the real-time data block is linked to the chain, and the decrypted real-time business data is stored in the IPFS system, including the following steps: If the real-time inter-group consensus result is a consensus success, a unique time slice is allocated to all consensus nodes in the target consensus node group, and the real-time data block is sent to the target consensus node group; If any target consensus node in the target consensus node group receives the real-time data block in the correct time slice, the target consensus node is used to link the real-time data block to the chain, and a real-time chain success notification is sent to the smart contract; Based on smart contracts, the decrypted real-time business data will be stored in the IPFS system according to the real-time chain success notification.
10. A distributed storage system for business data, used to implement the distributed storage method for business data as claimed in any one of claims 1 to 9, characterized in that: The system includes a cloud data center, a trusted organization and several data acquisition devices. The cloud data center and the trusted organization are respectively connected to the several data acquisition devices in communication. The cloud data center is provided with a distributed storage network. The trusted organization is connected to the cloud data center in communication.
Citation Information
Patent Citations
Spacecraft data storage and extraction system, storage method and extraction method
CN117668935A
Environment monitoring data storage method based on improved PBFT algorithm
CN118069733A
Supply chain management method based on artificial intelligence
CN118260788A
Power operation data distributed storage method and system based on Internet of Things
CN118842622A
Block chain digital asset security management method and system
CN119090431A