Block chain storage method and system based on social network
By using social relations to divide communities in the blockchain network and applying multiple ant colony algorithms, the storage and query cost are optimized, and the storage burden and query cost are balanced.
Patent Information
- Application Number
- CN202411141255.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2044-08-20
AI Technical Summary
In the prior art, blockchain nodes have high storage burden, low storage and query efficiency, and low storage cost balance.
Through the blockchain storage method based on social networks, node transaction data is collected to build network transaction graphs, social distance between nodes is mined, communities are divided, and multiple ant colony algorithms are used to optimize storage and query costs to achieve node allocation to specific communities to balance nodes Storage cost and query cost.
It realizes the balance between storage cost and query cost of blockchain system, reduces the storage burden of nodes, and improves storage and query efficiency.
Smart Images

Figure CN119149635A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain data processing, and in particular to a blockchain storage method and system based on a social network. Background Art
[0002] Blockchain is a distributed ledger technology that enables decentralized, tamper-proof and trusted data storage and transaction verification. It is used in areas such as cryptocurrency, supply chain management, and financial services. Blockchain has changed the way traditional data is managed, providing secure, efficient and reliable data exchange, giving individuals and organizations greater control, and improving the transparency and traceability of transactions. As a revolutionary technology, blockchain is expected to promote further social and economic development.
[0003] With the increase in blockchain users and the expansion of application areas, the scalability of blockchain has become a bottleneck in its development. Among them, data storage plays an integral and important role in the scalability of blockchain. Nodes in the blockchain network need to save a complete data ledger. The increase in user transactions will inevitably increase the overhead of node data storage. When users need to retrieve a certain part of the data, the query cost will also increase. According to statistics, as of May 2023, the data storage capacity of Bitcoin has exceeded 460GB, while that of Ethereum has exceeded 610GB. This prevents some devices with fewer resources (such as mobile phones, tablets, etc.) from joining the blockchain network. In addition, with the increase in the throughput of the blockchain network, the requirements for storage capacity of devices become more important, which increases the burden of blockchain nodes on the storage and query of massive data. In extreme cases, the number of nodes in the blockchain network that are capable of bearing the storage and query overhead will gradually decrease, which will cause the blockchain to develop from a distributed to a centralized network, which obviously violates the decentralized characteristics of the blockchain.
[0004] In order to improve the scalability of blockchain systems in terms of data storage, current work is mainly divided into on-chain storage and off-chain storage. For example, in the existing public document "Research on Scalable Blockchain Storage Technology and Its Applications", a storage expansion scheme based on application data pruning is proposed. This scheme expands storage from the perspective of pruning unspent transaction outputs (UTXO) that have a small probability of being spent in the future. By statistically analyzing a large amount of UTXO set data in different block height ranges in the real Bitcoin system history, the corresponding lifespan distribution is obtained, and a pruning strategy for UTXO type application data sets is proposed. First, in order to record the distribution state of all UTXO lifespans spent during the pruning cycle, a UTXO distribution dynamic update algorithm is proposed. During the block generation process, the algorithm calculates the UTXO lifespan referenced by the on-chain transaction based on the distribution state inherited from the previous block and the pruning limit parameters and updates the corresponding distribution, and packs it into the block to achieve verifiable continuous transmission of the distribution state at each block height during the pruning cycle. In addition, in order to achieve the stability of the pruning results and comply with the transaction rules, a UTXO set dynamic pruning algorithm is proposed. According to the lifespan distribution state of UTXO, the algorithm prunes the UTXO with a small probability of being spent in the future based on the periodic pruning limit parameter, and completes the update of the pruning limit parameter at the same time. This paper conducts a security analysis on the proposed storage expansion scheme, proving that the pruned data still has integrity and verifiability. At the same time, the experimental results show that the expansion scheme ensures the stability and accuracy of the pruned data while performing high-intensity pruning on the complete UTXO set. Among them, on-chain storage mainly processes data by adopting light nodes / full nodes, pruning, encoding, sharding, etc. Off-chain storage is the process of moving data outside the blockchain (such as a third-party server) for processing to realize off-chain processing and on-chain verification, or integrating the blockchain into an existing distributed database to realize access control and data management of a hybrid distributed database. However, most of the work is based on the assumption of trust or will cause excessive load on network bandwidth and computing resources. For example, the existing invention patent application document "A distributed storage device based on blockchain" with publication number CN115547369A, the existing device includes: a PC, a server unit, a storage unit, a detection module, a control module and an environmental parameter adjustment module; a blockchain distributed storage network is set in the server unit; the blockchain distributed storage network is used to store the data uploaded by the PC in the storage unit; the detection module is set within a preset range of the storage unit, and the detection module is used to detect the parameters of the environment where the storage unit is located; the control module is connected to the environmental parameter adjustment module; the control module is used to control the environmental parameter adjustment module according to the parameters of the environment where the storage unit is located; the environmental parameter adjustment module is used to adjust the parameters of the environment where the storage unit is located.The EBSF in the aforementioned prior art divides nodes into committees. The nodes in a committee jointly store the complete blockchain ledger data, and the amount of data shared by each node will be reduced. However, the nodes in the committee need to be based on the assumption of mutual trust, which is actually difficult to achieve in reality. Moreover, the article does not point out how to divide the nodes to improve the trust between the nodes in the committee; some strategies achieve data compression by encoding blocks, and nodes can restore the original block data by decoding the encoded data. This process consumes the computing resources of the network; in addition, since off-chain storage processes transactions outside the blockchain, it generally requires a third-party guarantor to verify the correctness of the transaction. In this scenario, the trust of the on-chain node in the guarantor is particularly important. In order to avoid the limitation of trust on data storage, Jidar allows nodes to only store transactions of interest and related Merkle branches. For example, the existing invention patent application document "Distributed Storage Method Based on Blockchain" with publication number CN116303329A includes: S1. The front end slices the file to obtain the content identifier of each byte slice; S2. The content identifiers of all byte slices are constructed into a Merkle tree, and the root of the tree is obtained, which is the entire file; S3. Obtain the online storage node information, perform XOR calculation on the node address hash and the file, and obtain the distance between each node and the file; S4. According to the distance, select the nearest one or more nodes for storage. However, the article does not indicate how to determine the transaction of interest, but simply stores the transactions involved in the node.
[0005] In summary, the existing technology has technical problems such as heavy node storage burden, low storage and query efficiency, and low storage cost balance. Summary of the invention
[0006] The technical problem to be solved by the present invention is: how to solve the technical problems existing in the prior art of heavy node storage burden, low storage and query efficiency, and low storage cost balance.
[0007] The present invention adopts the following technical solutions to solve the above technical problems: The blockchain storage method based on social network includes:
[0008] S1. Collect node transaction data, build a network transaction graph based on the node transaction data, mine the social distance between nodes from the network transaction graph to obtain social relationship data and transaction probability, and build a multi-objective optimization problem for node allocation;
[0009] S2. Divide the nodes in the network transaction graph according to social relationships to obtain different communities, so that the nodes store related transactions of the same community nodes and solve the multi-objective optimization problem;
[0010] S3. Based on the single-node storage cost and the single-node query cost, the overall network storage cost and the overall network query cost in the network transaction graph are modeled into a multi-objective optimization model to minimize the overall network storage cost and the overall network query cost in the network transaction graph;
[0011] S4. Use multiple ant colony algorithms to solve the overall network storage cost and the overall network query cost, and allocate transaction storage locations to balance the storage cost and query cost of the network transaction graph.
[0012] The present invention designs blockchain data storage technology based on social networks, allocates nodes to specific communities according to their social relationships, and constructs a node allocation optimization problem by modeling storage cost and query cost, thereby realizing data storage optimization and achieving the goal of balancing storage cost and query cost.
[0013] The present invention realizes blockchain storage based on social networks. The present invention combines the social relationships of users in the blockchain network, jointly models the storage cost and query cost of the network, and uses a multi-population genetic ant colony algorithm to solve the multi-objective optimization problem, thereby ensuring that the query cost is within the tolerance range and achieving the goal of minimizing the overall storage cost.
[0014] In a more specific technical solution, S1 includes:
[0015] S11. The amount of data stored by all nodes in the network transaction graph is set as the overall storage cost of the network, so as to minimize the overall storage cost of the processing network;
[0016] S12, define the query cost as the consumption parameter generated when the acquisition node obtains transaction data from other nodes in the network transaction graph, set it as the overall network query cost, and minimize the overall query cost of the processing network;
[0017] S13. Set restrictions on the amount of data stored by the node and the affiliation within the same slot.
[0018] The present invention proposes a blockchain data storage technology based on social networks, which improves the storage and query efficiency of the blockchain system by mining the social relationships between users in the blockchain network.
[0019] In a more specific technical solution, in S11, the following logic is used to minimize the overall storage cost of the processing network:
[0020]
[0021] In the formula, m is the number of communities, n is the number of nodes, and s i For node n i The amount of data related to the variable x ik Represents node ni Whether in the community k In the example, the variable x ik Represents node n i With the community k affiliation.
[0022] In a more specific technical solution, in S12, the consumption parameters include: network consumption and consumption of nodes processing query requests.
[0023] In a more specific technical solution, in S12, the following logic is used to minimize the overall query cost of the processing network:
[0024]
[0025] Where n is the number of nodes, V i Represents node n i The access probability set of visiting other nodes, any v ij ∈V i , represents the probability of node i visiting node j, s j For node n j The amount of relevant data, c ij For slave node n i To node n j The communication cost per unit data volume, σ ij Indicates whether two nodes are in the same community.
[0026] The present invention defines that transactions that users are interested in include transactions in which they participate and transactions with objects with which they may have relationships in the future, and innovatively applies social relationships to blockchain storage research to predict users' future transaction objects, thereby better dividing users in the network into communities.
[0027] In a more specific technical solution, S2 includes:
[0028] S21, creating an ant population for the multi-objective optimization problem of the overall network storage cost and the overall network query cost;
[0029] S22, setting a storage saving rate and a query cost growth rate, and obtaining threshold limiting conditions for the overall network storage cost and the overall network query cost;
[0030] S23, making the storage population ANT s , query population ANT q , perform solution search operations in their respective search spaces to obtain stored population solutions;
[0031] S24, calculating and storing population solution X;
[0032] Specifically, the aforementioned X is a matrix of n rows and m columns consisting of 0 or 1, n is the number of nodes in the network, m is the number of communities, and records the community to which the node belongs. Based on the solution X, the storage cost can be calculated by the following formula:
[0033]
[0034] In the formula, m is the number of communities, n is the number of nodes, and s i For node n i The amount of data related to the variable x ik Represents node n i Whether in the community k In the example, the variable x ik Represents node n i With the community k membership, and the variable x ik The value of the i-th row and k-th column of matrix X. Similarly, the query cost can be calculated:
[0035]
[0036] Where n is the number of nodes, V i Represents node n i The access probability set of visiting other nodes, any v ij ∈V i , represents the probability of node i visiting node j, s j For node n j The amount of relevant data, c ij For slave node n i To node n j The communication cost per unit data volume, σ ij Indicates whether two nodes are in the same community, that is, whether the i-th row and the j-th row of the matrix X have the same column value of 1. Thus, the corresponding storage cost and the corresponding query cost of the storage population solution are obtained, and the corresponding storage cost and the corresponding query cost are compared with the restriction condition;
[0037] S25, obtain and process the storage population ANT according to the comparison result s The pheromone data maintained.
[0038] The user in the present invention is regarded as a node in the blockchain network, and each node will select the data of interest to store. The data of interest here mainly refers to the transaction data in which the user participates and the transaction data that may be used in the future. This method reduces the burden of the node to store the entire ledger and also takes into account the willingness of the node to store data.
[0039] In a more specific technical solution, in S21, the ant population includes: storage population ANT s, query population ANT q .
[0040] In a more specific technical solution, in S25, the pheromone data is updated, discounted, mutated, and crossover operated.
[0041] The present invention jointly models and solves the storage cost and query cost of network nodes, and proves that the multi-objective optimization problem is NP-hard. By setting the storage saving rate and the query cost growth rate, the range value of the community size and the community distribution of network nodes can be obtained, thereby achieving the goal of minimizing the overall storage cost while ensuring that the query cost is within the tolerable range.
[0042] In a more specific technical solution, in S4, the storage saving rate and the query cost tolerance rate are adjusted to allocate transaction storage locations.
[0043] In a more specific technical solution, the blockchain storage system based on social networks includes:
[0044] The node social relationship mining module is used to collect node transaction data, build a network transaction graph based on the node transaction data, and mine the social distance between nodes from the network transaction graph to obtain social relationship data and transaction probability, and construct a multi-objective optimization problem for node allocation;
[0045] The multi-objective optimization problem solving module is used to divide the nodes in the network transaction graph according to social relationships, obtain different communities, and solve the multi-objective optimization problem by storing related transactions of nodes in the same community. The multi-objective optimization problem solving module is connected with the node social relationship mining module;
[0046] The storage query cost optimization module is used to model the overall network storage cost and overall network query cost in the network transaction graph into a multi-objective optimization model based on the single-node storage cost and the single-node query cost, so as to minimize the overall network storage cost and the overall network query cost in the network transaction graph. The storage query cost optimization module is connected with the multi-objective optimization problem solving module;
[0047] The cost balancing module is used to adopt multiple ant colony algorithms to solve the overall network storage cost and the overall network query cost, allocate transaction storage locations, and balance the storage cost and query cost of the network transaction graph. The cost balancing module is connected to the storage query cost optimization module.
[0048] Compared with the prior art, the present invention has the following advantages:
[0049] The present invention designs blockchain data storage technology based on social networks, allocates nodes to specific communities according to their social relationships, and constructs a node allocation optimization problem by modeling storage cost and query cost, thereby realizing data storage optimization and achieving the goal of balancing storage cost and query cost.
[0050] The present invention realizes blockchain storage based on social networks. The present invention combines the social relationships of users in the blockchain network, jointly models the storage cost and query cost of the network, and uses a multi-population genetic ant colony algorithm to solve the multi-objective optimization problem, thereby ensuring that the query cost is within the tolerance range and achieving the goal of minimizing the overall storage cost.
[0051] The present invention proposes a blockchain data storage technology based on social networks, which improves the storage and query efficiency of the blockchain system by mining the social relationships between users in the blockchain network.
[0052] The present invention defines that transactions that users are interested in include transactions in which they participate and transactions with objects with which they may have relationships in the future, and innovatively applies social relationships to blockchain storage research to predict users' future transaction objects, thereby better dividing users in the network into communities.
[0053] The user in the present invention is regarded as a node in the blockchain network, and each node will select the data of interest to store. The data of interest here mainly refers to the transaction data in which the user participates and the transaction data that may be used in the future. This method reduces the burden of the node to store the entire ledger and also takes into account the willingness of the node to store data.
[0054] The present invention jointly models and solves the storage cost and query cost of network nodes, and proves that the multi-objective optimization problem is NP-hard. By setting the storage saving rate and the query cost growth rate, the range value of the community size and the community distribution of network nodes can be obtained, thereby achieving the goal of minimizing the overall storage cost while ensuring that the query cost is within the tolerable range.
[0055] The present invention solves the technical problems existing in the prior art of heavy node storage burden, low storage and query efficiency, and low storage cost balance. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 This is a schematic diagram of the basic steps of the blockchain storage method based on a social network according to Embodiment 1 of the present invention;
[0057] Figure 2 This is a data flow diagram of a blockchain storage method based on a social network according to Embodiment 1 of the present invention;
[0058] Figure 3A schematic diagram of specific steps for constructing a node allocation optimization problem in Example 1 of the present invention;
[0059] Figure 4 This is a schematic diagram of specific steps for solving a multi-objective optimization problem according to Embodiment 1 of the present invention;
[0060] Figure 5 Schematic diagram of the multi-objective optimization solution principle of Example 1 of the present invention. DETAILED DESCRIPTION
[0061] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in combination with the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0062] Example 1
[0063] like Figure 1 As shown, the blockchain storage method based on social network provided by the present invention includes the following basic steps:
[0064] Step S1: construct a network transaction graph based on node transaction data, and mine the social distance between nodes from the graph;
[0065] like Figure 2 As shown, in this embodiment, the aforementioned social distance in the social network is the social relationship, and the social relationship represents the probability of a transaction that may occur in the future.
[0066] like Figure 3 As shown, in this embodiment, the operation of constructing the node allocation optimization problem also includes the following specific steps:
[0067] Step S11, define the storage cost as the amount of data stored by all nodes in the network;
[0068] In this embodiment, since the data stored by a node includes transactions in which it participates and related transactions of other nodes in the same community, the storage cost of the entire network is related to the number of communities and the composition of nodes in the community. The formula for minimizing the storage cost of the entire network is expressed as:
[0069]
[0070] Among them, m is the number of communities, n is the number of nodes, and s i For node n i The amount of data related to the variable x ik Represents node n iWhether in the community k Variable x ik =1 indicates node n i Belong to community c k , and when x ik =0, indicating that node n i Not part of the community k .
[0071] Step S12: define the query cost as the network consumption generated when the node obtains transaction data from other nodes and the consumption of the node processing the query request;
[0072] In this embodiment, minimizing the query cost of the entire network is expressed as follows:
[0073]
[0074] Where n is the number of nodes, V i Represents node n i The access probability set of visiting other nodes, any v ij ∈V i , represents the probability of node i visiting node j, s j For node n j The amount of relevant data, c ij For slave node n i To node n j The communication cost per unit data volume, σ ij Indicates whether two nodes are in the same community. If node n i and node n j Located in the same community, then σ ij =0, otherwise, σ ij =1.
[0075] Step S13: Establish restriction conditions.
[0076] In this embodiment, the aforementioned restriction conditions include but are not limited to: the amount of data stored in each node does not exceed the maximum capacity of the node, and each node can only belong to one community in the same time slot.
[0077] Step S2: Divide the nodes in the network into different communities according to the social relationships of the nodes, and store the related transactions of the nodes in the same community;
[0078] In this embodiment, the nodes in the same community are more closely related, which means that they are more likely to intersect in the future. The nodes only need to store the relevant transactions of the nodes in the same community, avoiding the burden of storing the entire blockchain ledger.
[0079] like Figure 4 and Figure 5As shown, in this embodiment, the operation of solving the multi-objective optimization problem also includes the following specific steps:
[0080] Step S21: Create a storage population ANT for the two optimization problems of storage cost and query cost s AND query population q Two ant populations;
[0081] Step S22: setting the storage saving rate and the query cost growth rate, and calculating the threshold limiting conditions of the storage cost and the query cost;
[0082] Step S23: allowing the storage population and the query population to search for solutions in their respective search spaces;
[0083] Step S24: For the solution searched by the storage population, the storage cost and query cost corresponding to the solution are calculated and compared with the restriction conditions, and the pheromone data maintained by the storage population are updated, discounted, mutated and crossed according to the comparison results.
[0084] Step S3: Based on the storage and query costs of a single node, the total storage and query costs in the entire network are modeled into a multi-objective optimization model to minimize the storage cost and query cost in the network;
[0085] Step S4: Use a variety of ant colony algorithms to solve the storage cost and query cost, allocate the storage location of the transaction, and balance the storage cost and query cost in the network.
[0086] In this embodiment, since the aforementioned problem is an NP-hard problem, a variety of ant colony algorithms can be used to solve the problem. By adjusting the storage saving rate and the query cost tolerance rate, the storage location of the transaction can be effectively allocated, thereby achieving a balance between the storage cost and the query cost in the network.
[0087] In summary, the present invention designs blockchain data storage technology based on social networks, allocates nodes to specific communities according to their social relationships, and constructs a node allocation optimization problem by modeling storage cost and query cost, thereby realizing data storage optimization and achieving the goal of balancing storage cost and query cost.
[0088] The present invention realizes blockchain storage based on social networks. The present invention combines the social relationships of users in the blockchain network, jointly models the storage cost and query cost of the network, and uses a multi-population genetic ant colony algorithm to solve the multi-objective optimization problem, thereby ensuring that the query cost is within the tolerance range and achieving the goal of minimizing the overall storage cost.
[0089] The present invention proposes a blockchain data storage technology based on social networks, which improves the storage and query efficiency of the blockchain system by mining the social relationships between users in the blockchain network.
[0090] The present invention defines that transactions that users are interested in include transactions in which they participate and transactions with objects with which they may have relationships in the future, and innovatively applies social relationships to blockchain storage research to predict users' future transaction objects, thereby better dividing users in the network into communities.
[0091] The user in the present invention is regarded as a node in the blockchain network, and each node will select the data of interest to store. The data of interest here mainly refers to the transaction data in which the user participates and the transaction data that may be used in the future. This method reduces the burden of the node to store the entire ledger and also takes into account the willingness of the node to store data.
[0092] The present invention jointly models and solves the storage cost and query cost of network nodes, and proves that the multi-objective optimization problem is NP-hard. By setting the storage saving rate and the query cost growth rate, the range value of the community size and the community distribution of network nodes can be obtained, thereby achieving the goal of minimizing the overall storage cost while ensuring that the query cost is within the tolerable range.
[0093] The present invention solves the technical problems existing in the prior art of heavy node storage burden, low storage and query efficiency, and low storage cost balance.
[0094] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A blockchain storage method based on social networks, characterized in that: The method comprises: S1. Collect node transaction data, build a network transaction graph based on the node transaction data, mine the social distance between nodes from the network transaction graph to obtain social relationship data and transaction probability, and build a multi-objective optimization problem for node allocation; S2. Divide the nodes in the network transaction graph according to the social relationships to obtain different communities, so that the nodes store related transactions of nodes in the same community and solve the multi-objective optimization problem; S3. According to the single-node storage cost and the single-node query cost, the overall network storage cost and the overall network query cost in the network transaction graph are modeled into a multi-objective optimization model to minimize the overall network storage cost and the overall network query cost in the network transaction graph; S4. Using a variety of ant colony algorithms, solve the overall storage cost of the network and the overall query cost of the network, and allocate transaction storage locations to balance the storage cost and query cost of the network transaction graph.
2. The blockchain storage method based on social network according to claim 1, characterized in that: The S1 includes: S11, setting the amount of data stored by all nodes in the network transaction graph as the overall storage cost of the network, and minimizing the overall storage cost of the network; S12, defining the query cost as the consumption parameter generated when the acquisition node acquires transaction data from other nodes in the network transaction graph, setting it as the overall network query cost, and minimizing the overall network query cost; S13. Establish restriction conditions for the amount of data stored in the node and the affiliation within the same slot.
3. The blockchain storage method based on social network according to claim 2 is characterized in that: In S11, the following logic is used to minimize the overall storage cost of the network: In the formula, m is the number of communities, n is the number of nodes, and s i For node n i The amount of data related to the variable x ik Represents node n i Whether in the community k In the example, the variable x ik Represents node n i With the community k affiliation.
4. The blockchain storage method based on social network according to claim 2, characterized in that: In S12, the consumption parameters include: network consumption and consumption of a node processing a query request.
5. The blockchain storage method based on social network according to claim 2, characterized in that: In S12, the following logic is used to minimize the overall query cost of the network: Where n is the number of nodes, V i Represents node n i The access probability set of visiting other nodes, any v ij ∈V i , represents the probability of node i visiting node j, s j For node n j The amount of relevant data, c ij For slave node n i To node n j The communication cost per unit data volume, σ ij Indicates whether two nodes are in the same community.
6. The blockchain storage method based on social network according to claim 1, characterized in that: The S2 includes: S21, creating an ant population for the multi-objective optimization problem of the overall network storage cost and the overall network query cost; S22, setting a storage saving rate and a query cost growth rate, and obtaining threshold limiting conditions of the overall storage cost of the network and the overall query cost of the network; S23, making the storage population ANT s 、The query population ANT q , perform solution search operations in their respective search spaces to obtain stored population solutions; S24, calculating a storage population solution, obtaining a corresponding storage cost and a corresponding query cost of the storage population solution, and comparing the corresponding storage cost and the corresponding query cost with the restriction condition; S25, obtaining and processing the stored population ANT according to the comparison result s The pheromone data maintained.
7. The blockchain storage method based on social network according to claim 6 is characterized in that: In S21, the ant population includes: a storage population ANT s , query population ANT q .
8. The blockchain storage method based on social network according to claim 6 is characterized in that: In S25, the pheromone data is updated, discounted, mutated and crossed.
9. The blockchain storage method based on social network according to claim 1, characterized in that: In S4, the storage saving rate and the query cost tolerance rate are adjusted to allocate the transaction storage location.
10. A blockchain storage system based on social networks, characterized in that: The system comprises: A node social relationship mining module is used to collect node transaction data, build a network transaction graph based on the node transaction data, and mine the social distance between nodes from the network transaction graph to obtain social relationship data and transaction probability, and build a multi-objective optimization problem for node allocation; A multi-objective optimization problem solving module, used to divide the nodes in the network transaction graph according to the social relationship to obtain different communities, so that the related transactions of the nodes in the same community stored in the nodes are solved for the multi-objective optimization problem, and the multi-objective optimization problem solving module is connected with the node social relationship mining module; A storage query cost optimization module, used to model the overall network storage cost and the overall network query cost in the network transaction graph into a multi-objective optimization model according to the single-node storage cost and the single-node query cost, so as to minimize the overall network storage cost and the overall network query cost in the network transaction graph, and the storage query cost optimization module is connected to the multi-objective optimization problem solving module; The cost balancing module is used to adopt a variety of ant colony algorithms to solve the overall storage cost of the network and the overall query cost of the network, and allocate transaction storage locations to balance the storage cost and query cost of the network transaction graph. The cost balancing module is connected to the storage query cost optimization module.
Citation Information
Patent Citations
Distributed storage device based on block chain
CN115547369A
Distributed storage method based on block chain
CN116303329A
Block chain multi-copy distribution and storage method based on genetic algorithm
CN113934374A
Block chain network deployment method and system based on ant colony algorithm
CN116016543A
Block chain storage capacity optimization method, device and system
CN116582434A
Cited By
Distributed storage electronic data processing system
CN119668529A
A distributed storage electronic data processing system
CN119668529B
Supply traceability management platform for order traceability linkage
CN122288843A
Supply traceability management platform facing order traceability linkage
CN122288843B
