Search

CN-122001893-A - Block chain data synchronization method, device, equipment, storage medium and product

CN122001893ACN 122001893 ACN122001893 ACN 122001893ACN-122001893-A

Abstract

The application relates to a block chain data synchronization method, a device, equipment, a storage medium and a product, and relates to the technical field of block chains. The method comprises the steps of obtaining prediction data related to a network state of a blockchain network, predicting network loads of the blockchain network based on the prediction data through a mixed prediction model to obtain a network load prediction value, constructing the mixed prediction model based on a time sequence model and a graph neural network model, performing preliminary slicing on data to be synchronized based on the network load prediction value and network topological structure information to obtain a preliminary slicing result, performing resource consumption evaluation and synchronization risk evaluation on each blockchain node to obtain resource consumption scores and synchronization risk scores of each blockchain node, and generating a data synchronization strategy based on the resource consumption scores and the synchronization risk scores of each blockchain node and the preliminary slicing result to perform blockchain data synchronization based on the data synchronization strategy.

Inventors

  • LIU LIJUN
  • BAI HONGTAO
  • JIANG WENXUE
  • JIN ZHONG
  • JIANG YULIANG
  • ZHANG ZHIHAO

Assignees

  • 中移物联网有限公司
  • 中国移动通信集团有限公司

Dates

Publication Date
20260508
Application Date
20251216

Claims (13)

  1. 1. A method of blockchain data synchronization, the method comprising: Acquiring prediction data related to a network state of a blockchain network, wherein the prediction data comprises historical blockchain network data, real-time state indexes and network topology structure information; predicting the network load of the blockchain network based on the prediction data through a hybrid prediction model to obtain a network load predicted value, wherein the hybrid prediction model is constructed based on a time sequence model and a graph neural network model; based on the network load predicted value and the network topology information, performing preliminary slicing on the data to be synchronized to obtain a preliminary slicing result; Respectively carrying out resource consumption evaluation and synchronous risk evaluation on each block chain node to obtain resource consumption scores and synchronous risk scores of each block chain node; and generating a data synchronization strategy based on the resource consumption score and the synchronization risk score of each blockchain node and the preliminary slicing result so as to perform blockchain data synchronization based on the data synchronization strategy.
  2. 2. The method according to claim 1, wherein predicting, by the hybrid prediction model, the network load of the blockchain network based on the prediction data to obtain a network load predicted value includes: Extracting time sequence data and network topology data in the prediction data, wherein the time sequence data is used for representing time-related performance indexes generated in the blockchain network, and the network topology data is used for representing connection structures and interaction states among nodes in the blockchain network; network load prediction is carried out on the basis of the time sequence data through the time sequence model, and a first load prediction result representing a time sequence change rule of the network load is obtained; network load prediction is carried out on the basis of the network topology data through the graph neural network model, and a second load prediction result representing the influence of node topology association on load distribution is obtained; The network load predictor of the blockchain network is determined based on the first load predictor and the second load predictor.
  3. 3. The method of claim 2, wherein the determining the network load prediction value for the blockchain network based on the first load prediction result and the second load prediction result comprises: And carrying out weighted fusion on the first load prediction result and the second load prediction result based on a trainable weight parameter to obtain the network prediction result, wherein the trainable weight parameter is dynamically adjusted based on the network state of the blockchain network.
  4. 4. The method of claim 3, wherein the step of, Under the condition that the network topology change rate of the blockchain network is higher than a preset change rate threshold, the trainable weight parameter is adjusted to be a first value, so that the weight of the graph neural network model in weighted fusion is higher than that of the time sequence model; In the event that a periodically varying load characteristic is detected, the trainable weight parameter is adjusted to a second value such that the time series model is weighted higher in a weighted fusion than the graph neural network model.
  5. 5. The method according to claim 1, wherein the performing preliminary slicing on the data to be synchronized based on the network load prediction value and the network topology information to obtain preliminary slicing results includes: Determining a slice size reference value based on a relation model and the network load predicted value, wherein the relation model is constructed based on historical data slice records and historical blockchain network data and is used for indicating the association relation between the network load value and the data slice size; and taking the slice size reference value as a capacity guide, and carrying out aggregation division on the data to be synchronized based on node data relativity indicated by the network topology structure information to obtain the preliminary slice result.
  6. 6. The method of claim 5, wherein the performing aggregate partitioning on the data to be synchronized based on the node data association indicated by the network topology information with the slice size reference value as a capacity guide to obtain the preliminary slice result includes: Determining the association degree between the node data in the data to be synchronized based on the network topology structure information; And taking the slice size reference value as a capacity guide, and carrying out aggregation and division on each node data in the data to be synchronized based on the association degree between each node data and a preset association degree threshold value to obtain the preliminary slice result, wherein the node data with the association degree exceeding the association degree threshold value are aggregated into the same data slice.
  7. 7. The method of claim 1, wherein the performing the resource consumption assessment and the synchronization risk assessment on each blockchain node to obtain the resource consumption score and the synchronization risk score of each blockchain node includes: acquiring resource consumption information and data synchronization records of each block chain node; based on the resource consumption information of each blockchain node, correspondingly carrying out resource consumption evaluation on each blockchain node to obtain a resource consumption score of each blockchain node; And based on the data synchronization record of each blockchain node, performing synchronization risk assessment on the corresponding of each blockchain node to obtain a synchronization risk score of each blockchain node.
  8. 8. The method of claim 1, wherein the generating a data synchronization policy based on the resource consumption score and the synchronization risk score for each of the blockchain nodes, and the preliminary slicing results comprises: Generating a first adjustment instruction indicating to reduce a slice size of a data slice synchronized to a first type of blockchain node if the blockchain node includes the first type of blockchain node, wherein the resource consumption score of the first type of blockchain node is greater than a resource consumption score upper threshold value in all of M consecutive evaluation periods, and the synchronization risk score is greater than a synchronization risk score upper threshold value in all of M consecutive evaluation periods; Generating a second adjustment instruction for reducing the data synchronization frequency corresponding to the second type of blockchain node when each blockchain node comprises the second type of blockchain node and the network load predicted value indicates that the load rate is smaller than the load rate threshold value, wherein the synchronization risk score of the second type of blockchain node is larger than the synchronization risk score upper threshold value in N continuous evaluation periods, and N is a positive integer; and generating the data synchronization strategy based on the first adjustment instruction and/or the second adjustment instruction and combining the preliminary slicing result.
  9. 9. The method according to claim 1, wherein the method further comprises: In the process of synchronizing based on the data synchronization strategy, detecting the synchronization process of each data slice to obtain the synchronization delay time of each data slice; determining an overall delay time based on the synchronized delay times of the respective data slices; And adjusting the data synchronization strategy under the condition that the overall delay time is higher than a preset delay time threshold value.
  10. 10. A blockchain data synchronization device, the device comprising: The system comprises a data acquisition module, a prediction module and a data processing module, wherein the data acquisition module is used for acquiring prediction data related to the network state of a blockchain network, and the prediction data comprises historical blockchain network data, real-time state indexes and network topology structure information; The load prediction module is used for predicting the network load of the blockchain network based on the data for prediction through a hybrid prediction model to obtain a network load predicted value; the data slicing module is used for carrying out preliminary slicing on the data to be synchronized based on the network load predicted value and the network topological structure information to obtain a preliminary slicing result; The evaluation module is used for respectively carrying out resource consumption evaluation and synchronous risk evaluation on each block chain node to obtain resource consumption scores and synchronous risk scores of each block chain node; And the strategy generation module is used for generating a data synchronization strategy based on the resource consumption score and the synchronization risk score of each blockchain node and the preliminary slicing result so as to perform blockchain data synchronization based on the data synchronization strategy.
  11. 11. A computer device comprising a processor and a memory storing at least one computer program loaded and executed by the processor to implement the blockchain data synchronization method of any of claims 1 to 9.
  12. 12. A computer readable storage medium having stored therein at least one computer program loaded and executed by a processor to implement the blockchain data synchronization method of any of claims 1 to 9.
  13. 13. A computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions that when executed by a computer device cause the computer device to perform the blockchain data synchronization method of any of claims 1 to 9.

Description

Block chain data synchronization method, device, equipment, storage medium and product Technical Field The embodiment of the application relates to the technical field of blockchain, in particular to a blockchain data synchronization method, a device, equipment, a storage medium and a product. Background With the continuous maturation and popularization of blockchain technologies, more and more application scenarios require efficient and stable data synchronization mechanisms to ensure the normal operation of blockchain networks. In a blockchain network, data synchronization is a key to ensuring information consistency among nodes. However, the current blockchain data synchronization method often cannot effectively balance the consumption of resources and the synchronization efficiency, and in some blockchain networks, the problem of too high synchronization delay exists, and the change of the network cannot be dealt with in real time, so that the data synchronization efficiency is low. Disclosure of Invention The embodiment of the application provides a block chain data synchronization method, a device, equipment, a storage medium and a product, which can realize the collaborative optimization of the block chain data synchronization efficiency and stability through intelligent prediction, dynamic slicing and resource risk linkage regulation and control. In one aspect, a blockchain data synchronization method is provided, the method comprising: Acquiring prediction data related to a network state of a blockchain network, wherein the prediction data comprises historical blockchain network data, real-time state indexes and network topology structure information; predicting the network load of the blockchain network based on the prediction data through a hybrid prediction model to obtain a network load predicted value, wherein the hybrid prediction model is constructed based on a time sequence model and a graph neural network model; based on the network load predicted value and the network topology information, performing preliminary slicing on the data to be synchronized to obtain a preliminary slicing result; Respectively carrying out resource consumption evaluation and synchronous risk evaluation on each block chain node to obtain resource consumption scores and synchronous risk scores of each block chain node; and generating a data synchronization strategy based on the resource consumption score and the synchronization risk score of each blockchain node and the preliminary slicing result so as to perform blockchain data synchronization based on the data synchronization strategy. In another aspect, there is provided a blockchain data synchronization device, the device comprising: The system comprises a data acquisition module, a prediction module and a data processing module, wherein the data acquisition module is used for acquiring prediction data related to the network state of a blockchain network, and the prediction data comprises historical blockchain network data, real-time state indexes and network topology structure information; The load prediction module is used for predicting the network load of the blockchain network based on the data for prediction through a hybrid prediction model to obtain a network load predicted value; the data slicing module is used for carrying out preliminary slicing on the data to be synchronized based on the network load predicted value and the network topological structure information to obtain a preliminary slicing result; The evaluation module is used for respectively carrying out resource consumption evaluation and synchronous risk evaluation on each block chain node to obtain resource consumption scores and synchronous risk scores of each block chain node; And the strategy generation module is used for generating a data synchronization strategy based on the resource consumption score and the synchronization risk score of each blockchain node and the preliminary slicing result so as to perform blockchain data synchronization based on the data synchronization strategy. In one possible implementation, the load prediction module includes: the data extraction sub-module is used for extracting time sequence data and network topology data in the prediction data, wherein the time sequence data is used for representing time-related performance indexes generated in the blockchain network, and the network topology data is used for representing connection structures and interaction states among nodes in the blockchain network; The first prediction submodule is used for predicting the network load based on the time sequence data through the time sequence model to obtain a first load prediction result representing the time sequence change rule of the network load; the second prediction submodule is used for predicting network load based on the network topology data through the graph neural network model to obtain a second load prediction result representing the influence of node