A distributed ledger remote data synchronization method and system
By building a distributed storage architecture and a two-layer communication architecture, combined with technologies such as parallel compression coding, digital signature and deep reinforcement learning, the problems of delay and imbalance in the traditional distributed ledger data synchronization method are solved, efficient, secure and reliable data synchronization is achieved, and the system's adaptability and data consistency are enhanced.
Patent Information
- Application Number
- CN202510045311.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-13
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2045-01-13
AI Technical Summary
Traditional distributed ledger data synchronization methods are prone to data synchronization delay, network congestion and node load imbalance in large-scale node networks, and lack in-depth analysis of network transmission delay and node processing delay, so it is impossible to accurately identify system performance bottlenecks.
By building a distributed storage architecture and a two-layer communication architecture, the reasonable partitioning of nodes and efficient utilization of network resources are achieved, parallel compression coding and digital signature processing mechanisms are adopted, and timing correlation analysis and causal analysis algorithms are combined to accurately identify performance bottlenecks. Through the combination of deep reinforcement learning models and adaptive genetic algorithms, dynamic optimization of synchronization strategies and intelligent scheduling of resources are realized.
It reduces the system's network overhead, improves the efficiency of data synchronization, ensures the security and reliability of the data transmission process, accurately identifys the system's performance bottlenecks, improves the targetedness of system performance optimization, and enhances the system's adaptability, ensuring the consistency and traceability of distributed ledger data.
Smart Images

Figure CN119449829B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data synchronization technology, and in particular to a distributed ledger remote data synchronization method and system. Background Art
[0002] Traditional distributed ledger data synchronization methods usually adopt a single centralized synchronization mechanism. When faced with large-scale node networks, problems such as data synchronization delays, network congestion, and unbalanced node loads are prone to occur.
[0003] Existing data synchronization solutions lack in-depth analysis of network transmission delays and node processing delays, and are unable to accurately identify system performance bottlenecks, resulting in poor synchronization strategy optimization results. At the same time, during the data synchronization process, due to the dynamic changes in network status and differences in node performance, it is difficult to ensure the real-time and consistency of data, which increases the complexity of system maintenance. In addition, when dealing with cross-regional data synchronization, traditional synchronization methods do not fully consider the differences in network delays caused by geographical distribution, lack targeted resource scheduling strategies, and affect the overall performance and scalability of the system. Especially in high-concurrency scenarios, the serial processing methods of operations such as data compression, signature verification, and consistency verification significantly reduce the system's data processing capabilities. Summary of the invention
[0004] The present invention provides a distributed ledger remote data synchronization method and system, which ensures the consistency and traceability of distributed ledger data.
[0005] In a first aspect, the present invention provides a distributed ledger remote data synchronization method, the distributed ledger remote data synchronization method comprising:
[0006] Perform hash mapping calculations on all nodes of the distributed ledger system to obtain a distributed storage architecture;
[0007] According to the distributed storage architecture, a hierarchical network of nodes is constructed, and inter-regional remote synchronization links and intra-regional local synchronization links are set to obtain a two-layer communication architecture;
[0008] Based on the two-layer communication architecture, parallel compression encoding, digital signature generation, transmission scheduling and consistency verification are performed on the data blocks to obtain a node synchronization data set;
[0009] According to the network transmission parameters in the node synchronization data set, the correlation coefficient between the node processing delay and the network transmission delay is calculated to obtain a synchronization delay analysis model;
[0010] Adding a timing identifier to the data block corresponding to the synchronization delay analysis model and calculating an integrity check code to generate a synchronization reliability assurance mechanism;
[0011] Based on the synchronization reliability guarantee mechanism, node grouping planning and resource scheduling allocation are performed to obtain a synchronization management and control strategy, which includes a node synchronization timing schedule and network resource allocation rules.
[0012] In a second aspect, the present invention provides a distributed ledger remote data synchronization system, the distributed ledger remote data synchronization system comprising:
[0013] A mapping module is used to perform hash mapping calculations on all nodes of the distributed ledger system to obtain a distributed storage architecture;
[0014] A construction module is used to construct a hierarchical network of nodes according to the distributed storage architecture, set up inter-regional remote synchronization links and intra-regional local synchronization links, and obtain a two-layer communication architecture;
[0015] A processing module, configured to perform parallel compression encoding, digital signature generation, transmission scheduling and consistency verification processing on the data block based on the two-layer communication architecture to obtain a node synchronization data set;
[0016] A calculation module, used to calculate the correlation coefficient between the node processing delay and the network transmission delay according to the network transmission parameters in the node synchronization data set, and obtain a synchronization delay analysis model;
[0017] A generation module, used to add a timing identifier and calculate an integrity check code based on the data block corresponding to the synchronization delay analysis model, so as to generate a synchronization reliability guarantee mechanism;
[0018] The allocation module is used to perform node grouping planning and resource scheduling allocation based on the synchronization reliability guarantee mechanism to obtain a synchronization management and control strategy, which includes a node synchronization timing schedule and network resource allocation rules.
[0019] A third aspect of the present invention provides a distributed ledger remote data synchronization device, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory so that the distributed ledger remote data synchronization device executes the above-mentioned distributed ledger remote data synchronization method.
[0020] A fourth aspect of the present invention provides a computer-readable storage medium, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is executed on a computer, the computer executes the above-mentioned distributed ledger remote data synchronization method.
[0021] In the technical solution provided by the present invention, by constructing a distributed storage architecture and a two-layer communication architecture, reasonable partitioning of nodes and efficient utilization of network resources are achieved, the network overhead of the system is reduced, and the efficiency of data synchronization is improved; parallel compression coding and digital signature processing mechanisms are adopted, combined with multiple verification algorithms, to ensure the security and reliability of the data transmission process, and effectively reduce the error probability in the data synchronization process; timing correlation analysis and causal relationship analysis algorithms are introduced to accurately identify performance bottlenecks in the system, providing a scientific basis for optimizing synchronization strategies; based on Shapley value calculation and multidimensional sorting algorithms, accurate quantification and hierarchical classification of delay factors are achieved, and the pertinence of system performance optimization is improved; through the combination of deep reinforcement learning models and adaptive genetic algorithms, dynamic optimization of synchronization strategies and intelligent scheduling of resources are achieved, and the adaptive ability of the system is enhanced; a complete data block version management and integrity verification mechanism is established, combined with data repair strategies, to ensure the consistency and traceability of distributed ledger data.
[0022] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.
[0023] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 A schematic diagram of an embodiment of a distributed ledger remote data synchronization method in an embodiment of the present invention;
[0025] Figure 2 A schematic diagram of an embodiment of a distributed ledger remote data synchronization system in an embodiment of the present invention;
[0026] Figure 3 Schematic diagram of an embodiment of a distributed ledger remote data synchronization device in an embodiment of the present invention. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. 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.
[0028] The terms "including" and "having" and any variations thereof mentioned in the embodiments of the present invention are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or device end including a series of steps or units is not limited to the listed steps or units, but may optionally include other steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products, or device ends.
[0029] To facilitate understanding of this embodiment, a distributed ledger remote data synchronization method disclosed in an embodiment of the present invention is first described in detail. Figure 1 As shown, the method comprises the following steps:
[0030] 101. Perform hash mapping calculation on all nodes of the distributed ledger system to obtain a distributed storage architecture;
[0031] It is understandable that the execution subject of the present invention may be a distributed ledger remote data synchronization system, or a terminal or a server, which is not specifically limited here. The embodiment of the present invention is described by taking a server as the execution subject as an example.
[0032] Specifically, the N nodes in the system are hierarchically divided according to their geographical locations. By analyzing the physical distribution characteristics of the nodes, these nodes are divided into M regional groups, each of which contains K nodes, satisfying the relationship N=M×K. This division method can effectively reduce the complexity of cross-regional communication and provide a hierarchical network foundation for subsequent data routing and storage optimization. A data index table is established for each node. The index table uses the unique identification code of each data block as the retrieval key and the data content as the storage value to clarify the mapping relationship between the data block and the node. In this way, a complete node data mapping relationship is constructed, and the hash feature value of each data block is calculated based on it to achieve efficient node allocation of the data block. The data routing scheme generated by this process can directly determine the storage node of the data block in the network according to the hash value of the data block, ensuring the uniformity and consistency of data distribution. The node storage capacity calculation is performed based on the data routing scheme to ensure that the storage resources of each node are reasonably utilized. By performing dynamic balancing operations on the node load, a node balanced distribution matrix is obtained, which reflects the load distribution of each node in the entire network. At the same time, a data block location table is constructed for each node. The location table records the physical location information of all data blocks stored in the node, so that the data location relationship matrix can fully describe the data distribution status in the entire network. Based on the data block hash feature values in the data location relationship matrix, a data block topology connection diagram is established to generate a data block distribution structure. The data block topology connection diagram shows the organization of data blocks in the network through the logical connection relationship between nodes, and provides a visual representation method for subsequent operations. According to the shard data link topology diagram, the storage priority is calculated for each data block. The calculation of storage priority mainly considers the access frequency of data blocks, network latency and node load conditions to obtain the data block storage allocation strategy. According to the node balanced distribution matrix and data block storage allocation strategy, data block dynamic migration is performed to reallocate node resources to maximize the utilization efficiency of network storage and computing resources. During the migration process, the node's data index table and data location relationship matrix are updated in real time to ensure that the state of the distributed ledger system always remains consistent. After the migration is completed, a distributed storage architecture is finally generated.
[0033] 102. Construct a hierarchical network of nodes according to the distributed storage architecture, set up inter-regional remote synchronization links and intra-regional local synchronization links, and obtain a two-layer communication architecture;
[0034] Specifically, according to the node performance indicators in the node balanced distribution matrix, the master nodes of the M regional groups divided in the distributed storage architecture are screened. The performance of the K nodes in each regional group is evaluated, focusing on the analysis of indicators such as the node's computing power, storage capacity and network throughput, and the node with the strongest data processing capability is selected as the regional master node to generate the regional master node topology map. According to the regional master node topology map, the inter-regional remote communication link is constructed. In order to optimize the communication efficiency between different regions, the network topology optimization calculation is performed on the master nodes of the M regional groups. By analyzing the parameters such as the physical distance between the master nodes, network delay, link bandwidth and data synchronization frequency, the optimized topology structure of the remote synchronization link is obtained. The remote synchronization link topology structure can minimize the delay of cross-regional data transmission and ensure that important data can be synchronized quickly and securely. The bandwidth demand analysis of the links in the remote synchronization link topology structure is performed. By evaluating the data synchronization amount and transmission frequency between each region, the bandwidth demand of each remote link is accurately estimated, and the network resource dynamic allocation calculation is performed to obtain the remote link bandwidth allocation matrix, and the bandwidth resource allocation of each link in the remote communication link is defined to ensure that data transmission can be carried out efficiently under the premise of link load balancing. At the same time, in the region, based on the data positioning relationship matrix, local communication connections are established for the K nodes in each regional group. The network topology optimization design is performed according to the data distribution between nodes, the physical distance of the link, and the network delay, and the topology structure of the local synchronization link is generated. The main purpose of the topology structure of the local synchronization link is to maximize the communication efficiency of the nodes within the region and ensure that the data synchronization within the region can reach a consensus quickly. The bandwidth requirements of the links in the local synchronization link topology are calculated. By analyzing the communication frequency of the nodes in the region, the amount of data exchange, and the network resource usage, the network resource optimization allocation operation is performed to generate the local link bandwidth allocation matrix. The local link bandwidth allocation matrix defines the bandwidth allocation scheme for each link within the region to maximize the use of network resources and improve data synchronization efficiency. After the bandwidth allocation is completed, the network status monitoring program is deployed according to the remote link bandwidth allocation matrix and the local link bandwidth allocation matrix. Through the network status monitoring program, link performance parameters such as link delay, packet loss rate, actual bandwidth utilization, etc. are collected in real time to generate a network link performance matrix. Based on the network link performance matrix, the network resource dynamic adjustment algorithm is executed to optimize the bandwidth configuration of the link in real time. The dynamic adjustment algorithm combines the current link load, delay changes, and bandwidth usage to dynamically calculate the optimal resource allocation plan and obtain the bandwidth dynamic optimization strategy. Through this strategy, resource allocation is flexibly adjusted according to changes in network operation status to avoid resource waste or link overload. According to the bandwidth dynamic optimization strategy, network resource reallocation is performed. Through this process, the bandwidth configuration of remote links and local links is updated in real time to ensure the optimal utilization of network resources.The update of remote links and local links can improve the overall performance of the two-layer communication architecture, adapt to the dynamic changes of network load, and improve the reliability and efficiency of the distributed ledger system. After the above steps, a two-layer communication architecture is finally generated, which supports the data synchronization requirements within and between regions and provides efficient and dynamic communication guarantees in complex network environments.
[0035] 103. Based on the two-layer communication architecture, parallel compression encoding, digital signature generation, transmission scheduling and consistency verification are performed on the data blocks to obtain the node synchronization data set;
[0036] Specifically, according to the regional master node topology map and the remote link bandwidth allocation matrix, a lossless compression algorithm is used to perform parallel compression processing on the data blocks. The compression efficiency is improved through parallel design, while ensuring that the size of the data block before transmission is effectively reduced. Combined with coding optimization calculation, a data block compression coding sequence is generated, which aims to minimize the network load and improve the transmission efficiency while ensuring data integrity. Based on the data block compression coding sequence, a digital signature generation algorithm is executed. By calculating the unique signature feature of each data block, a one-to-one mapping relationship between the data block and the signature is established, and a data block signature mapping sequence is generated. The signature features in the data block signature mapping sequence are verified, and by executing multiple verification algorithms, the integrity of the data block is ensured to be intact. The data block integrity check matrix is obtained, and the status of each data block during the verification process is recorded. Combined with the bandwidth dynamic optimization strategy, a data block transmission priority model is constructed. The model analyzes the importance of the data block, the distribution of bandwidth resources, and the link status, and executes the transmission sequence sorting algorithm to generate a data block transmission priority queue. The priority of the data block directly determines its scheduling order during the network transmission process, ensuring that key data blocks can be transmitted first and reducing the impact of delay on synchronization consistency. Based on the data block transmission priority queue and the network link performance matrix, the resource allocation optimization algorithm is executed to calculate the optimal transmission time for each data block. This step combines the bandwidth allocation matrix, link delay and node processing capacity to generate a data block transmission timing schedule. During the transmission process, the data blocks are grouped according to the data block transmission timing schedule, and multiple transmission status monitoring points are set to achieve real-time monitoring. By monitoring the state changes of the data blocks during the transmission process, the data block transmission status matrix is dynamically updated. The matrix records the delays, packet loss and other problems encountered by each data block during the transmission process. After the transmission is completed, the consistency verification algorithm is executed on the data blocks to calculate the data consistency index across nodes. By comparing the data status between different nodes, the data block consistency verification result is generated, and the data synchronization quality is evaluated based on this result. For inconsistent data blocks found during the verification process, the retransmission mechanism is immediately triggered to ensure that these data blocks can be retransmitted and the consistency problems are repaired. After the entire process is completed, all transmission and verification results are combined to generate a node synchronization data set, which records the transmission and verification status of the data blocks.
[0037] 104. According to the network transmission parameters in the node synchronization data set, the correlation coefficient between the node processing delay and the network transmission delay is calculated to obtain a synchronization delay analysis model;
[0038] Specifically, the key time nodes in the data transmission process are extracted based on the data block transmission state matrix, including data block sending, transmission, reception, verification and other links. The network transmission delay vector is obtained by calculating the difference between these time points. This vector represents the transmission delay characteristics of each link in the network in the form of a time series, thereby revealing the dynamic changes in the performance of the transmission link. At the same time, the time-consuming information of data processing is extracted from the data block compression coding sequence and the data block signature mapping sequence. By calculating the time overhead of each node in the compression, signature generation, verification and other processing steps, the node processing delay vector is generated to reflect the performance of each node in processing data blocks. The network transmission delay vector and the node processing delay vector are subjected to time series correlation analysis to capture the variation law between transmission and processing delays. The delay variation law modeling method is adopted, and the interactive characteristics of the time series are combined to construct the system delay feature map. The map shows the spatiotemporal distribution characteristics and dynamic variation law of the delay in a visual way, revealing the impact path of the delay factor on the overall system performance. Based on the system delay feature map, the delay factor association network is constructed through the causal relationship analysis algorithm to explore the causal relationship between the delay factors. Through this network, the key factors affecting delay are identified, and the delay causal network model is formed by calculating the influence intensity between factors. This model reveals the complex reasons for delay and clarifies the dependencies between factors. Based on the delay causal network model, the Shapley value calculation method is used to accurately quantify the contribution weights of delay factors and obtain the delay factor influence matrix. Shapley value is a distribution method based on game theory, which can reasonably quantify the contribution of each factor to the overall delay of the system, thereby providing scientific decision-making support for delay optimization. On this basis, the delay factors in the influence matrix are graded and classified, and a sequence of key delay factors is generated by combining a multidimensional sorting algorithm. According to the sequence of key delay factors, multivariate correlation analysis is performed to construct a delay factor interaction model. This model generates a delay correlation evaluation matrix by analyzing the synergistic effects between key delay factors, and the matrix quantifies the interaction intensity and correlation pattern between factors. Based on the evaluation matrix, the system delay bottleneck is accurately located, thereby clarifying the core problem that causes delay. On this basis, a delay optimization strategy is formulated to eliminate bottleneck problems by optimizing resource allocation, adjusting processing logic, and enhancing transmission links. A synchronous delay analysis model is generated.
[0039] 105. Add a timing identifier to the data block corresponding to the synchronization delay analysis model and calculate the integrity check code to generate a synchronization reliability guarantee mechanism;
[0040] Specifically, according to the delayed causal network model, a data block timing encoding rule is constructed. By executing the timestamp generation algorithm, a monotonically increasing timing identifier is added to each data block to generate a data block timing identifier sequence. Based on the data block timing identifier sequence, a data block version management system is constructed. By executing the version number allocation algorithm, a unique version number is assigned to each data block, and based on this, a version dependency relationship between data blocks is established to form a data block version dependency graph, which describes the version evolution process of the data block, and helps the system to trace the data source and version changes in a complex network environment, thereby ensuring version consistency. For each node in the data block version dependency graph, a hash calculation and a checksum generation algorithm are executed to generate unique checksum information corresponding to each data block. Through these checksum information, a data integrity verification chain is constructed, which can connect the integrity information of all data blocks in series to ensure the non-tamperability of data during transmission and storage. On this basis, a cross-node data consistency comparison algorithm is executed based on the data integrity verification chain. By comparing and calculating the data block status between different nodes, the degree of data deviation is obtained, and a data block consistency measurement table is formed to record the consistency of each data block between different nodes. At the same time, the time window calculation algorithm is executed based on the delay correlation evaluation matrix to build a set of synchronization time constraint rules. Based on the delay analysis results, the rule clarifies the time limit of data synchronization operations and generates a data synchronization time constraint model. The model ensures that the synchronization operation of data blocks can be completed within the specified time by reasonably dividing the time window, thereby reducing the impact of delay on synchronization performance. According to the delay factor influence matrix, the data priority calculation is performed, and the data block classification rules are constructed in combination with the importance and access frequency of the data blocks to generate a data block priority classification strategy. This strategy ensures that key data blocks can get higher synchronization priority by hierarchical management of data blocks, thereby optimizing the overall synchronization efficiency. After completing the above steps, based on the data block consistency measurement table and the data synchronization time constraint model, the repair strategy generation algorithm is executed to build a data recovery mechanism. Through the formulation of the repair strategy, the inconsistency that occurs during the data synchronization process is effectively dealt with, and a data block repair execution plan is generated. The repair execution plan clarifies the repair steps and priorities for inconsistent data blocks, and optimizes the repair process in combination with the data block priority classification strategy. On this basis, the data synchronization quality control algorithm is executed to comprehensively consider factors such as data integrity, consistency and priority to ensure the high-quality completion of the synchronization process. Through the above continuous process, a synchronization reliability guarantee mechanism is generated.
[0041] 106. Based on the synchronization reliability guarantee mechanism, node grouping planning and resource scheduling allocation are carried out to obtain a synchronization management and control strategy, which includes a node synchronization timing schedule and network resource allocation rules.
[0042] Specifically, based on the data block priority classification strategy, the node clustering algorithm is executed. By analyzing the task distribution, processing capacity and network performance of each node in the data synchronization process, the correlation strength between nodes is calculated and the node organization structure is constructed. Through the results of node clustering, a node clustering relationship diagram is generated to show the closeness between nodes. According to the node clustering relationship diagram and the data block version dependency diagram. The synchronization sequence optimization algorithm is executed to construct the data transmission order between nodes. The synchronization sequence optimization algorithm takes the correlation strength and version dependency between nodes as constraints, and calculates the optimal data transmission path and transmission order to ensure that the synchronization of data blocks in the entire system can be completed with the lowest delay and the highest efficiency. The optimized node synchronization timing planning table clarifies the transmission order and priority between each node. The node synchronization timing planning table is input into the adaptive genetic algorithm, and a candidate scheme evaluation system is generated through iterative optimization calculation. The adaptive genetic algorithm continuously iterates and optimizes the synchronization scheme by simulating the process of biological genetic evolution, selects the synchronization path and strategy with the best performance from multiple candidate schemes, and forms an iterative optimization matrix for the synchronization scheme. Based on the iterative optimization matrix of the synchronization scheme, the network resource allocation algorithm is executed, and the bandwidth allocation required for data transmission between each node is calculated through the bandwidth dynamic scheduling model to generate a network resource dynamic allocation table. After the resource allocation is completed, the allocation result is constrained and verified. Through the resource constraint verification algorithm, a resource usage evaluation system is constructed to generate a resource configuration rationality evaluation matrix. The evaluation matrix conducts a comprehensive rationality evaluation of the use of network resources to ensure that the allocation of key parameters such as bandwidth and computing resources will not cause resource waste or conflict problems while meeting task requirements. Based on the resource configuration rationality evaluation matrix, combined with the data block repair execution plan, the synchronization strategy correction algorithm is executed, a correction rule set is constructed, and a synchronization strategy correction plan is generated. The correction plan optimizes potential problems in the synchronization process by adjusting the transmission order, priority or resource allocation. The synchronization strategy correction plan is input into the deep reinforcement learning model, and the optimal control strategy is constructed by performing parameter optimization training. In the deep reinforcement learning model, through continuous simulation and training, the control parameters in the synchronization process are learned and optimized with dynamic network conditions as input, and a control parameter optimization model is generated. The model dynamically adjusts the synchronization strategy according to the real-time network status and resource allocation to improve synchronization efficiency and resource utilization. Based on the control parameter optimization model, the real-time scheduling control algorithm is executed to build a dynamic control mechanism. The dynamic control mechanism can monitor the synchronization status of nodes and the usage of network resources in real time, and dynamically adjust the synchronization strategy according to changes in network load and task priority to ensure that the entire system always maintains efficient operation.
[0043] In the embodiment of the present invention, by constructing a distributed storage architecture and a two-layer communication architecture, reasonable partitioning of nodes and efficient utilization of network resources are achieved, the network overhead of the system is reduced, and the efficiency of data synchronization is improved; parallel compression coding and digital signature processing mechanisms are adopted, combined with multiple verification algorithms, to ensure the security and reliability of the data transmission process, and effectively reduce the error probability in the data synchronization process; timing correlation analysis and causal analysis algorithms are introduced to accurately identify performance bottlenecks in the system, providing a scientific basis for optimizing synchronization strategies; based on Shapley value calculation and multidimensional sorting algorithms, accurate quantification and hierarchical classification of delay factors are achieved, and the pertinence of system performance optimization is improved; through the combination of deep reinforcement learning models and adaptive genetic algorithms, dynamic optimization of synchronization strategies and intelligent scheduling of resources are achieved, and the adaptive ability of the system is enhanced; a complete data block version management and integrity verification mechanism is established, combined with data repair strategies, to ensure the consistency and traceability of distributed ledger data.
[0044] In a specific embodiment, the process of executing step 101 may specifically include the following steps:
[0045] The N nodes in the distributed ledger system are hierarchically divided according to their geographical locations to obtain M regional groups, each of which contains K nodes, where N = M × K;
[0046] Establish a data index table for each node, use the unique identification code of the data block as the search key, and the data content as the storage value to obtain the node data mapping relationship. According to the node data mapping relationship, calculate the hash feature value of each data block, assign nodes to the data blocks, and obtain the data routing plan;
[0047] Based on the data routing scheme, the node storage capacity calculation is performed, the node load dynamic balancing operation is performed, and the node balanced distribution matrix is obtained. A data block location table is constructed for each node, and the physical location information of all data blocks stored in the node is recorded to obtain the data location relationship matrix.
[0048] Based on the data block hash feature values in the data location relationship matrix, a data block topology connection diagram is established to generate a data block distribution structure, and a shard data link topology diagram is obtained. According to the shard data link topology diagram, the storage priority is calculated for each data block to obtain a data block storage allocation strategy.
[0049] According to the node balanced distribution matrix and data block storage allocation strategy, data blocks are dynamically migrated, node resources are reallocated, and a distributed storage architecture is generated.
[0050] Specifically, for distributed ledger systems The nodes are divided into different levels according to their geographical locations. By analyzing the geographical location coordinates and network topology characteristics of the nodes, they are divided into Each zone group contains nodes, where the relationship satisfies In this division process, it is assumed that the geographical coordinates of the nodes are , using clustering algorithms (such as K-means clustering) to divide the nodes into groups, so that the geographical distance of the nodes in the group is minimized. The specific formula is:
[0051] ;
[0052] in Indicates The node set of a group, Representation Group This process ensures that the divided regional groups have good geographical aggregation, thereby reducing communication delays within the region. After completing the hierarchical division of the nodes, a data index table is established for each node. The data index table uses the unique identification code of the data block As the search key, the corresponding data content As a storage value. Node The data index table is represented as Stored on the node Based on these index tables, the node data mapping relationship is constructed and the hash feature value of each data block is calculated. The calculation of hash feature value adopts consistent hashing algorithm, and its formula is:
[0053] ;
[0054] Hash is the hash value of the data block identification code, is the total number of nodes. According to the hash value result, the data block is assigned to a specific node to form a data routing plan. After the data routing plan is generated, the storage capacity of each node is calculated and the node load is dynamically balanced. Assume that the size of each data block is ,node The storage capacity is , then the storage load of the node is expressed as:
[0055] ;
[0056] in Indicates allocation to a node In order to achieve dynamic balance of node load, the distribution of data blocks is iteratively adjusted so that the load of all nodes is close to the mean. ,Right now:
[0057] ;
[0058] and minimize load differences The generated node balanced distribution matrix Represents a data block Is it stored in the node ,in Represents a data block Exists at the node . Based on the data routing scheme and the balanced distribution matrix, a data block location table is constructed for each node. Assume that the node The stored data block set is , then the data block location table is expressed as ,in Representation Node The data block location tables of all nodes are merged to form a data location relationship matrix , whose entries Represents a data block Physical location After completing the construction of the data location relationship matrix, a data block topology connection diagram is constructed based on the hash feature value of the data block. Assuming that there is a dependency relationship between data blocks (such as the previous and next blocks in the blockchain), the diagram Indicates that is a collection of data blocks, is the dependency relationship. According to the data block topology connection diagram, the data block distribution structure is generated, and the shard data link topology diagram is obtained. The storage priority is calculated for each data block. Assume that the access frequency of the data block is , the storage importance weight is , then the storage priority of the data block is expressed as:
[0059] ;
[0060] in and is a tuning parameter. Based on the sorting results of storage priorities, a data block storage allocation strategy is generated. Dynamic migration of data blocks is performed by combining the node balance distribution matrix and the data block storage allocation strategy. During the migration process, the system dynamically adjusts the data block allocation scheme with the goal of minimizing the migration cost. Assuming that the data block Slave Node Migrate to Node The migration cost is , then the total migration cost is expressed as:
[0061] ;
[0062] in Represents a data block Whether to use the slave node Migrate to Node By optimizing the migration strategy, a distributed storage architecture is finally generated to achieve efficient allocation of node resources and load balancing.
[0063] In a specific embodiment, the process of executing step 102 may specifically include the following steps:
[0064] According to the node performance indicators in the node balanced distribution matrix, the master nodes of the M regional groups are screened, and the nodes with the strongest data processing capabilities are selected as the regional master nodes to obtain the regional master node topology map;
[0065] According to the regional master node topology map, the inter-regional remote communication link is constructed, and the network topology optimization calculation is performed on the master nodes of the M regional groups to obtain the remote synchronization link topology structure;
[0066] Perform bandwidth demand analysis on links in the remote synchronous link topology, perform dynamic network resource allocation calculation, and obtain a remote link bandwidth allocation matrix;
[0067] Based on the data location relationship matrix, local communication connections are established for K nodes in each area, and network topology optimization design is performed to obtain the local synchronization link topology structure;
[0068] Calculate the bandwidth requirements of the links in the local synchronous link topology, perform network resource optimization allocation operations, and obtain a local link bandwidth allocation matrix;
[0069] According to the remote link bandwidth allocation matrix and the local link bandwidth allocation matrix, a network status monitoring program is deployed to collect link performance parameters and obtain a network link performance matrix;
[0070] According to the network link performance matrix, the network resource dynamic adjustment algorithm is executed to optimize the link bandwidth in real time and obtain the bandwidth dynamic optimization strategy;
[0071] The network resources are reallocated according to the dynamic bandwidth optimization strategy, the bandwidth configuration of the remote and local links is updated, and a two-layer communication architecture is generated.
[0072] Specifically, according to the node performance indicators in the node balanced distribution matrix The regional groups are screened for master nodes, the nodes with the strongest data processing capabilities are selected as regional master nodes, and a regional master node topology is constructed. The performance index is determined by its computing power , Storage Capacity and network bandwidth The comprehensive performance of the node is expressed by the following formula:
[0073] ;
[0074] in is the adjustment coefficient, which is used to adjust the weight of computing power, storage capacity and bandwidth on comprehensive performance. , select The largest node is the master node of the area. The regional groups get master nodes, and build a regional master node topology map based on the geographical location and network characteristics between the master nodes. After completing the regional master node screening, build inter-regional remote communication links based on the regional master node topology map, and The master nodes of the regional groups perform network topology optimization calculations. Assume that the connection delay between the master nodes is , the data transmission rate is , the link bandwidth is , then the optimization goal is to minimize the communication overhead of the entire network. The specific formula is:
[0075] ;
[0076] in Indicates the master node and Through this optimization process, the optimal topology of the remote synchronization link is obtained, forming an efficient inter-regional communication framework. After the remote synchronization link topology is generated, the bandwidth demand of the link is analyzed. Assume that the communication demand between the master nodes is , then the required minimum bandwidth is expressed by the formula:
[0077] ;
[0078] in Represents the time window for data transmission. , and combined with the actual bandwidth resources of the current network, execute the network resource dynamic allocation algorithm to generate the remote link bandwidth allocation matrix This matrix defines the bandwidth resources allocated to each link in remote communication, thereby ensuring that data synchronization between regions can be completed efficiently. At the same time, based on the data location relationship matrix, The nodes establish local communication connections and perform topology optimization design on the local network. Assume that the connection delay between nodes in the region is , the data synchronization requirement is , then the optimization goal is to minimize the transmission delay and link load within the area:
[0079] ;
[0080] The optimized local synchronization link topology can significantly reduce the data synchronization overhead within the region. The bandwidth requirements in the local synchronization link are calculated in a similar way to the remote link. The local link bandwidth allocation matrix is obtained through bandwidth requirement calculation and resource allocation algorithm. , ensuring that the data synchronization process in the region can be completed with minimal delay. After completing the optimization of remote and local links, deploy a network status monitoring program to collect link performance parameters in real time, including delay , Packet loss rate , Actual bandwidth utilization etc., generate the network link performance matrix Based on the performance matrix, the bandwidth allocation of the link is optimized in real time by executing the network resource dynamic adjustment algorithm. Assume that the bandwidth utilization threshold of the link is , the dynamic adjustment goal is to maintain the actual utilization of all links satisfy:
[0081] ;
[0082] Through iterative optimization, a bandwidth dynamic optimization strategy is generated and the dynamic adjustment rules of link resources are defined. According to the bandwidth dynamic optimization strategy, network resources are reallocated and the remote link bandwidth allocation matrix is and the local link bandwidth allocation matrix Update to the latest status to ensure that network resource allocation always meets the current synchronization requirements. In this process, the system combines remote and local communication requirements, dynamically optimizes the scheduling and allocation of network resources, and generates a two-layer communication architecture.
[0083] In a specific embodiment, the process of executing step 103 may specifically include the following steps:
[0084] According to the regional master node topology map and the remote link bandwidth allocation matrix, a lossless compression algorithm is used to perform parallel compression processing on the data blocks, and coding optimization calculations are performed to obtain a data block compression coding sequence;
[0085] Based on the data block compression coding sequence, execute the digital signature generation algorithm, calculate the unique signature feature of each data block, establish the mapping relationship between the data block and the signature, and obtain the data block signature mapping sequence;
[0086] Perform digital signature verification calculation on the signature features in the data block signature mapping sequence, execute multiple verification algorithms, and obtain the data block integrity check matrix;
[0087] Based on the bandwidth dynamic optimization strategy, a data block transmission priority model is constructed, and a transmission sequence sorting algorithm is executed to obtain a data block transmission priority queue;
[0088] According to the data block transmission priority queue and the network link performance matrix, the resource allocation optimization algorithm is executed to calculate the optimal transmission time of each data block and obtain the data block transmission timing schedule;
[0089] Based on the data block transmission timing schedule, the data block is subjected to group transmission control, and the transmission status monitoring point is set to monitor the transmission process in real time to obtain the data block transmission status matrix;
[0090] Execute the consistency verification algorithm on the data blocks that have completed the transmission, calculate the cross-node data consistency index, and obtain the data block consistency verification result;
[0091] Data synchronization quality assessment is performed based on the data block consistency verification results, a retransmission mechanism is triggered for inconsistent data blocks, and a node synchronization data set is generated.
[0092] Specifically, based on the regional master node topology map and the remote link bandwidth allocation matrix, the data blocks are compressed in parallel using a lossless compression algorithm. The original size is , the compression rate of the lossless compression algorithm is , then the size of the compressed data block is The selection of compression algorithm needs to consider the dynamic allocation of link bandwidth and the transmission priority of data blocks, so as to perform coding optimization calculation. Through parallel processing, multiple data blocks At the same time, it is compressed , forming a data block compression code sequence After generating the compressed code sequence, the digital signature generation algorithm is executed on each data block. Assume that the compressed code of each data block is , the signature generation algorithm is based on the hash value of the data block and the node private key Calculate the digital signature :
[0093] ;
[0094] in Represents the hash characteristic value of the data block. The purpose of signature generation is to ensure the integrity and non-tamperability of the data block. All signatures constitute a data block signature mapping sequence , and establish a mapping relationship between the data block and the signature. Perform digital signature verification calculation on the signature features in the data block signature mapping sequence. The verification algorithm checks whether each data block signature matches its hash value through a multiple verification mechanism. The specific formula is:
[0095] ;
[0096] in is the corresponding public key. Through this process, the data block integrity check matrix is generated , whose elements Indicates The data block is in The verification result on each node (0 means failure, 1 means success). After completing the data block verification, a data block transmission priority model is constructed based on the bandwidth dynamic optimization strategy. Assume that the transmission demand of each data block is proportional to its access frequency. , Importance Weight and link bandwidth If relevant, the data block transmission priority is defined as:
[0097] ;
[0098] in To adjust the parameters and balance the weights of each item in the priority model, a data block transmission priority queue is generated through priority model calculation. , arrange the transmission priority of each data block from high to low. According to the priority queue and Network Link Performance Matrix , execute the resource allocation optimization algorithm to calculate the optimal transmission time of each data block. The bandwidth is , data block The size is , then the transmission time for:
[0099] ;
[0100] Combine the data block transmission priority and bandwidth dynamic adjustment strategy to generate a data block transmission timing schedule , define the transmission time window for each data block. During the transmission process, according to the data block transmission timing schedule, the data block is grouped and transmitted. The transmission group is dynamically adjusted according to the data block size and priority, and multiple transmission status monitoring points are set to collect transmission status parameters in real time, including packet loss rate. ,Delay and bandwidth utilization . Transmission status monitoring forms a data block transmission status matrix , whose elements Represents a data block In the link For the data blocks that have been transmitted, the consistency verification algorithm is executed to calculate the cross-node data consistency index. Assume that the node and The hash value of the data block on and , consistency index Defined as:
[0101] ;
[0102] Through this process, the data block consistency verification result is generated , whose elements Indicates the consistency status between nodes. Based on the consistency verification results, perform data synchronization quality assessment. If some data blocks fail the consistency verification (i.e. ), the retransmission mechanism is triggered, link resources are reallocated and the transmission strategy is adjusted until the consistency of all data blocks among all nodes is guaranteed. All data blocks that pass the consistency verification will be integrated into the node synchronization data set , complete the data synchronization task.
[0103] In a specific embodiment, the process of executing step 104 may specifically include the following steps:
[0104] Based on the data block transmission state matrix, the key time nodes of data transmission are extracted, and the transmission delay calculation is performed to obtain the network transmission delay vector;
[0105] Extract the data processing time-consuming information from the data block compression coding sequence and the data block signature mapping sequence, perform processing delay calculation, and obtain the node processing delay vector;
[0106] Perform timing correlation analysis on network transmission delay vectors and node processing delay vectors, establish a delay variation law model, and obtain a system delay feature map;
[0107] According to the system delay feature map, the causal relationship analysis algorithm is executed to build a delay factor association network, calculate the influence intensity between factors, and obtain the delay causal network model;
[0108] Based on the delay causal network model, Shapley value calculation is performed to quantify the contribution weight of each delay factor, and the delay factor influence matrix is obtained. The factors in the delay factor influence matrix are graded and classified, and a multi-dimensional sorting algorithm is performed to obtain the key delay factor sequence;
[0109] According to the sequence of key delay factors, multivariate correlation analysis is performed, a delay factor interaction model is constructed, and a delay correlation evaluation matrix is obtained. Based on the delay correlation evaluation matrix, the system delay bottleneck is located and analyzed, a delay optimization strategy is formulated, and a synchronization delay analysis model is generated.
[0110] Specifically, based on the data block transmission state matrix , extract the key time nodes of each data block in the transmission process. Assume that the data block In the link The transmission start time on , the transmission end time is , then the transmission delay It is expressed as:
[0111] ;
[0112] Summarize the delays of all links to obtain the network transmission delay vector , where each element Represents a data block In the link At the same time, the time-consuming information of data processing is extracted from the data block compression coding sequence and the data block signature mapping sequence. Assuming that the data block The compression time is , the signature generation time is , the signature verification takes time , then the node pair Processing delay for:
[0113] ;
[0114] By calculating the processing delay of all data blocks, we can get the node processing delay vector , where each element Indicates node processing The total delay of the network transmission delay vector and node processing delay vector Perform timing correlation analysis by calculating the Pearson correlation coefficient between the delay vectors To quantify their correlation, the formula is:
[0115] ;
[0116] Among them, Cov express and The covariance of and They are and The standard deviation of . Through timing correlation analysis, the law between transmission delay and processing delay is found, and then the delay change law model is established, and the system delay characteristic map is generated to show the evolution trend of delay over time and the relationship between various factors. Based on the delay characteristic map, the causal relationship analysis algorithm is executed to build a delay factor association network. Assume that the set of factors affecting system delay is , each factor The influence strength is calculated through the causal weight matrix Indicates that express right The causal relationship is quantified by Granger causality test or structured causal model, and finally a delay causal network model is generated. Based on the delay causal network model, the contribution weight of each delay factor is calculated. The independent contribution of each delay factor to the total system delay is quantified by Shapley value calculation. Representation factor subset Total contribution to latency, a factor Shapley value for:
[0117] ;
[0118] in is the total number of factors, For subset By calculating the Shapley value for all factors, we can get the delay factor influence matrix , whose entries Indication factors The factors in the influence matrix are classified and classified, and a multidimensional sorting algorithm is performed to obtain a sequence of key delay factors. The sorting algorithm is based on the influence weights and the correlation between factors, and the factors are divided into three categories: high priority, medium priority, and low priority, forming an ordered list of key delay factors. According to the sequence of key delay factors, multivariate correlation analysis is performed to construct a delay factor interaction model. Assuming that two factors and The interaction strength is measured by the correlation coefficient Represents that the delay correlation evaluation matrix Describes the correlation between all factors. By analyzing the matrix , find the location of the delay bottleneck, such as which factors have strong correlations that cause delay problems. Based on this result, formulate corresponding delay optimization strategies, such as prioritizing high-correlation, high-priority factors. By locating the delay bottleneck and implementing the optimization strategy, a synchronization delay analysis model is generated.
[0119] In a specific embodiment, the process of executing step 105 may specifically include the following steps:
[0120] According to the delayed causal network model, the data block timing encoding rules are constructed, the timestamp generation algorithm is executed, and the monotonically increasing timing identifier is added to the data block to obtain the data block timing identifier sequence;
[0121] Based on the data block time sequence identification sequence, a data block version management system is constructed, a version number allocation algorithm is executed, a version dependency relationship of the data block is established, and a data block version dependency graph is obtained;
[0122] For each node in the data block version dependency graph, perform hash calculation and checksum generation algorithm, build a data integrity verification chain, obtain a data block integrity verification chain, and execute a cross-node data consistency comparison algorithm based on the data block integrity verification chain to calculate the degree of data deviation and obtain a data block consistency measurement table;
[0123] Based on the delay correlation evaluation matrix, the time window calculation algorithm is executed to build the synchronization time constraint rules to obtain the data synchronization time constraint model. According to the delay factor influence matrix, the data priority calculation is performed to build the data block classification rules to obtain the data block priority classification strategy.
[0124] Based on the data block consistency measurement table and the data synchronization time constraint model, the repair strategy generation algorithm is executed, the data recovery mechanism is constructed, and the data block repair execution plan is obtained. According to the data block repair execution plan and the data block priority classification strategy, the data synchronization quality control algorithm is executed to generate a synchronization reliability guarantee mechanism.
[0125] Specifically, according to the delay causal network model, the data block timing encoding rules are constructed. Based on the delay causal network model, the impact of delay factors on the system synchronization order is quantified, and a timestamp generation algorithm is designed. Assuming that the data block The arrival time is , whose delayed causal weight is , then the timestamp of the data block Defined as:
[0126] ;
[0127] in is the actual arrival time, Represents the delayed causal network with The timestamp ensures that data blocks are sorted according to latency dependencies and avoids out-of-order problems caused by network delays or processing delays. A sequence of data block timing identifiers is generated by adding monotonically increasing timing identifiers to all data blocks. ,in For data blocks After generating the data block timing identification sequence, a data block version management system is built based on the timing identification. Each data block is assigned a version number. , through the version number allocation algorithm, the version dependency between data blocks is established. Assume The version number depends on the data block set ,but The formula for generating is:
[0128] ;
[0129] in express The set of directly dependent data blocks. Through recursive calculation, a data block version dependency graph is formed. ,in is a collection of data blocks, is the version dependency edge set. After the version management is completed, the hash calculation and checksum generation algorithm are performed on each node in the data block version dependency graph to build a data integrity verification chain. Assume that the data block The content is , whose hash value and integrity check code Defined as:
[0130] ;
[0131] The integrity verification chain connects the content, version number and checksum of the data block in series to ensure the consistency and integrity of the data. Based on this verification chain, a cross-node data consistency comparison algorithm is executed. Assuming that the node and The data block on The check code is and , then the consistency index for:
[0132] ;
[0133] By comparing all data blocks and nodes, a data block consistency measurement table is generated. , whose elements Indicates the data consistency status between nodes. Based on the delay correlation evaluation matrix , execute the time window calculation algorithm and construct the synchronization time constraint rules. Assume that the maximum allowable delay of a data block is , then the synchronization time constraint model is defined as:
[0134] ;
[0135] in It is a data block The synchronization deadline. Combined with the delay factor influence matrix , perform priority calculation on data blocks. The priority rule is based on the access frequency of data blocks , version importance weight and latency correlation weights :
[0136] ;
[0137] in The result of the priority calculation generates the data block classification rules and forms the data block priority classification strategy. Based on the data block consistency metric table and synchronization time constraint model, the repair strategy generation algorithm is executed to build a data recovery mechanism. The goal of the repair strategy is to resynchronize the deviated data blocks found in the consistency metric table. Assuming that the data block The degree of deviation is The repair cost is , then the optimization goal of the repair strategy is to minimize the total repair cost:
[0138] ;
[0139] After the repair strategy is generated, a data block repair execution plan is formed ,in Indicates The repair plan for each data block is generated. Combined with the data block priority classification strategy, the data synchronization quality control algorithm is executed to dynamically adjust the priority of the repair process. The synchronization reliability guarantee mechanism is generated through synchronization quality control to ensure the consistency and integrity of data blocks among multiple nodes, and the synchronization process is optimized in real time to improve the reliability of data transmission.
[0140] In a specific embodiment, the process of executing step 106 may specifically include the following steps:
[0141] Based on the data block priority classification strategy, the node clustering algorithm is executed to build the node organization structure, calculate the association strength between nodes, and obtain the node clustering relationship diagram;
[0142] According to the node clustering relationship graph and the data block version dependency graph, the synchronization sequence optimization algorithm is executed to build the data transmission sequence between nodes and obtain the node synchronization timing planning table;
[0143] Input the node synchronization timing planning table into the adaptive genetic algorithm, perform iterative optimization calculation, build a candidate solution evaluation system, obtain the synchronization solution iterative optimization matrix, and execute the network resource allocation algorithm on the synchronization solution iterative optimization matrix, build a bandwidth dynamic scheduling model, and obtain the network resource dynamic allocation table;
[0144] According to the network resource dynamic allocation table, the resource constraint verification algorithm is executed, the resource use evaluation system is constructed, and the resource configuration rationality evaluation matrix is obtained. Based on the data block repair execution plan and the resource configuration rationality evaluation matrix, the synchronization strategy correction algorithm is executed, the correction rule set is constructed, and the synchronization strategy correction plan is obtained;
[0145] The synchronization strategy correction plan is input into the deep reinforcement learning model, parameter optimization training is performed, the optimal control strategy is constructed, and the control parameter optimization model is obtained. Based on the control parameter optimization model, the real-time scheduling control algorithm is executed, a dynamic control mechanism is constructed, and a synchronization control strategy is generated.
[0146] Specifically, based on the data block priority classification strategy, the node organization structure is constructed using the node clustering algorithm, and the correlation strength between nodes is calculated to obtain the node clustering relationship diagram. Assume that the node set in the distributed ledger system is , the set of data blocks processed by each node is , where the priority of the data block is determined by the priority classification strategy. The strength of the association between nodes Calculated by the similarity formula:
[0147] ;
[0148] in Representation Node and The number of data blocks shared between Represents the total number of data blocks involved in the two nodes. According to the association strength matrix , use clustering algorithms (such as K-means or hierarchical clustering) to divide the nodes into several groups, each with a high internal correlation strength, and generate a node clustering relationship diagram , where each node group is represented by a subgraph. After obtaining the node clustering relationship graph, combined with the data block version dependency graph , execute the synchronization sequence optimization algorithm to construct the data transmission order between nodes. Assume It is a directed acyclic graph whose vertices represent data blocks and edges Represents a data block and The goal of synchronization sequence optimization is to minimize the total delay of data transmission based on data block dependencies and node clustering results. Synchronous data block The delay is , the total delay optimization formula is:
[0149] ;
[0150] in It is a set of data block transmission paths. Through topological sorting and priority scheduling, a node synchronization timing planning table is generated. , which records which data blocks each node synchronizes at which time. The node synchronization timing planning table is used as input to enter the adaptive genetic algorithm for further optimization. The initial population of the genetic algorithm consists of different synchronization schemes, and the fitness function of each individual is the synchronization delay and bandwidth utilization The weighted sum of:
[0151] ;
[0152] in and is the weight parameter, Represents a synchronization scheme. The genetic algorithm performs multiple iterative optimizations through operations such as selection, crossover, and mutation to form an iterative optimization matrix for the synchronization scheme. , where each Represents a synchronization scheme. Based on the optimized synchronization scheme, the network resource allocation algorithm is executed to build a bandwidth dynamic scheduling model. Assume that link The bandwidth requirement is , the available bandwidth is , then the bandwidth allocation model objective is:
[0153] ;
[0154] ;
[0155] Generate a dynamic allocation table of network resources through linear programming solution , allocate appropriate bandwidth resources to each link. According to the network resource dynamic allocation table, execute the resource constraint verification algorithm to build a resource utilization evaluation system. Assume that the link utilization threshold is , then the resource rationality evaluation matrix The entries are:
[0156] ;
[0157] Combined with the data block repair execution plan R, the synchronization strategy correction algorithm is executed to generate a correction rule set g for unreasonable resource allocation. The corrected synchronization strategy achieves a balance between performance and resource utilization, forming a synchronization strategy correction plan . Synchronize the policy revision plan Input the deep reinforcement learning model, and build the optimal control strategy through parameter optimization training. The reinforcement learning model uses link status (such as bandwidth utilization and latency) as state input and resource allocation decision as action output. The optimization goal is to minimize synchronization delay and resource waste:
[0158] ;
[0159] in is the actual bandwidth usage. After training, the control parameter optimization model is obtained, which can dynamically adjust the synchronization strategy. Based on the control parameter optimization model, the real-time scheduling control algorithm is executed to build a dynamic control mechanism. The dynamic control mechanism can monitor the link performance and node status in real time, dynamically adjust the synchronization strategy according to the current network conditions, and generate the final synchronization control strategy.
[0160] The above describes the distributed ledger remote data synchronization method in the embodiment of the present invention. The following describes the distributed ledger remote data synchronization system in the embodiment of the present invention. Figure 2 , an embodiment of a distributed ledger remote data synchronization system in an embodiment of the present invention includes:
[0161] A mapping module 201 is used to perform hash mapping calculations on all nodes of the distributed ledger system to obtain a distributed storage architecture;
[0162] Construction module 202, used to construct a hierarchical network of nodes according to the distributed storage architecture, set up inter-region remote synchronization links and intra-region local synchronization links, and obtain a two-layer communication architecture;
[0163] The processing module 203 is used to perform parallel compression encoding, digital signature generation, transmission scheduling and consistency verification processing on the data block based on the two-layer communication architecture to obtain a node synchronization data set;
[0164] A calculation module 204 is used to calculate the correlation coefficient between the node processing delay and the network transmission delay according to the network transmission parameters in the node synchronization data set, and obtain a synchronization delay analysis model;
[0165] A generation module 205 is used to add a timing identifier and calculate an integrity check code based on the data block corresponding to the synchronization delay analysis model to generate a synchronization reliability guarantee mechanism;
[0166] The allocation module 206 is used to perform node grouping planning and resource scheduling allocation based on the synchronization reliability guarantee mechanism to obtain a synchronization management and control strategy, which includes a node synchronization timing schedule and network resource allocation rules.
[0167] Through the coordinated cooperation of the above components, by building a distributed storage architecture and a two-layer communication architecture, reasonable partitioning of nodes and efficient use of network resources are achieved, the system's network overhead is reduced, and the efficiency of data synchronization is improved; the parallel compression encoding and digital signature processing mechanism are adopted, combined with multiple verification algorithms, to ensure the security and reliability of the data transmission process, and effectively reduce the error probability in the data synchronization process; the timing correlation analysis and causal analysis algorithms are introduced to accurately identify the performance bottlenecks in the system, providing a scientific basis for optimizing the synchronization strategy; based on Shapley value calculation and multi-dimensional sorting algorithm, accurate quantification and hierarchical classification of delay factors are achieved, improving the pertinence of system performance optimization; through the combination of deep reinforcement learning model and adaptive genetic algorithm, dynamic optimization of synchronization strategy and intelligent scheduling of resources are achieved, enhancing the system's adaptability; a complete data block version management and integrity verification mechanism is established, combined with data repair strategy, to ensure the consistency and traceability of distributed ledger data.
[0168] above Figure 2 The distributed ledger remote data synchronization system in the embodiment of the present invention is described in detail from the perspective of modular functional entities. The distributed ledger remote data synchronization device in the embodiment of the present invention is described in detail from the perspective of hardware processing.
[0169] Figure 3 3 is a schematic diagram of the structure of a distributed ledger remote data synchronization device provided by an embodiment of the present invention. The distributed ledger remote data synchronization device 300 may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 310 (for example, one or more processors) and a memory 320, and one or more storage media 330 (for example, one or more mass storage device terminals) storing application programs 333 or data 332. Among them, the memory 320 and the storage medium 330 may be short-term storage or persistent storage. The program stored in the storage medium 330 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the distributed ledger remote data synchronization device 300. Furthermore, the processor 310 may be configured to communicate with the storage medium 330, and execute a series of instruction operations in the storage medium 330 on the distributed ledger remote data synchronization device 300 to implement the steps of the above-mentioned distributed ledger remote data synchronization method.
[0170] The distributed ledger remote data synchronization device 300 may also include one or more power supplies 340, one or more wired or wireless network interfaces 350, one or more input and output interfaces 360, and / or one or more operating systems 331, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, etc. It will be understood by those skilled in the art that Figure 3 The structure of the distributed ledger remote data synchronization device shown does not constitute a limitation on the distributed ledger remote data synchronization device provided by the present invention, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0171] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the distributed ledger remote data synchronization method.
[0172] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, systems and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0173] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.
[0174] As described above, 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 thereof 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 distributed ledger remote data synchronization method, characterized in that: The method comprises: Hash mapping calculation is performed on all nodes of the distributed ledger system to obtain a distributed storage architecture; specifically, the following steps are performed: N nodes in the distributed ledger system are hierarchically divided according to geographical locations to obtain M regional groups, each regional group contains K nodes, where N=M×K; a data index table for each node is established, a unique identification code of a data block is used as a search key, and data content is used as a storage value to obtain a node data mapping relationship, and a hash feature value of each data block is calculated according to the node data mapping relationship, and the data blocks are assigned to nodes to obtain a data routing scheme; based on the data routing scheme, node storage capacity calculation is performed to perform node The load is dynamically balanced to obtain a node balanced distribution matrix, and a data block location table is constructed for each node to record the physical location information of all data blocks stored in the node to obtain a data location relationship matrix; based on the data block hash feature values in the data location relationship matrix, a data block topology connection diagram is established to generate a data block distribution structure to obtain a shard data link topology diagram, and based on the shard data link topology diagram, the storage priority is calculated for each data block to obtain a data block storage allocation strategy; data block dynamic migration is performed according to the node balanced distribution matrix and the data block storage allocation strategy, and node resources are reallocated to generate a distributed storage architecture; According to the distributed storage architecture, a hierarchical network of nodes is constructed, and inter-regional remote synchronization links and intra-regional local synchronization links are set to obtain a two-layer communication architecture; Based on the two-layer communication architecture, parallel compression encoding, digital signature generation, transmission scheduling and consistency verification are performed on the data blocks to obtain a node synchronization data set; According to the network transmission parameters in the node synchronization data set, the correlation coefficient between the node processing delay and the network transmission delay is calculated to obtain a synchronization delay analysis model; Adding a timing identifier to the data block corresponding to the synchronization delay analysis model and calculating an integrity check code to generate a synchronization reliability assurance mechanism; Based on the synchronization reliability guarantee mechanism, node grouping planning and resource scheduling allocation are performed to obtain a synchronization management and control strategy, which includes a node synchronization timing schedule and network resource allocation rules.
2. The distributed ledger remote data synchronization method according to claim 1, characterized in that: The node hierarchical network is constructed according to the distributed storage architecture, and inter-regional remote synchronization links and intra-regional local synchronization links are set to obtain a two-layer communication architecture, including: According to the node performance indicators in the node balanced distribution matrix, the master nodes of the M regional groups are screened, and the nodes with the strongest data processing capabilities are selected as regional master nodes to obtain a regional master node topology map; According to the regional master node topology map, construct an inter-regional remote communication link, perform network topology optimization calculation on the master nodes of the M regional groups, and obtain a remote synchronization link topology structure; Performing bandwidth demand analysis on the links in the remote synchronous link topology structure, executing dynamic network resource allocation calculation, and obtaining a remote link bandwidth allocation matrix; Based on the data positioning relationship matrix, local communication connections are established for K nodes in each area, network topology optimization design is performed, and a local synchronization link topology structure is obtained; Calculating bandwidth requirements for links in the local synchronous link topology structure, performing network resource optimization allocation operations, and obtaining a local link bandwidth allocation matrix; According to the remote link bandwidth allocation matrix and the local link bandwidth allocation matrix, a network status monitoring program is deployed to collect link performance parameters to obtain a network link performance matrix; According to the network link performance matrix, a network resource dynamic adjustment algorithm is executed to optimize the link bandwidth in real time to obtain a bandwidth dynamic optimization strategy; The network resources are reallocated according to the bandwidth dynamic optimization strategy, the bandwidth configuration of the remote and local links is updated, and a two-layer communication architecture is generated.
3. The distributed ledger remote data synchronization method according to claim 2, characterized in that: Based on the two-layer communication architecture, parallel compression encoding, digital signature generation, transmission scheduling and consistency verification processing are performed on the data block to obtain a node synchronization data set, including: According to the regional master node topology map and the remote link bandwidth allocation matrix, a lossless compression algorithm is used to perform parallel compression processing on the data blocks, and coding optimization calculation is performed to obtain a data block compression coding sequence; Based on the data block compression coding sequence, a digital signature generation algorithm is executed to calculate the unique signature feature of each data block, a mapping relationship between the data block and the signature is established, and a data block signature mapping sequence is obtained; Performing digital signature verification calculation on the signature features in the data block signature mapping sequence, executing multiple verification algorithms, and obtaining a data block integrity check matrix; Based on the bandwidth dynamic optimization strategy, a data block transmission priority model is constructed, and a transmission sequence sorting algorithm is executed to obtain a data block transmission priority queue; Execute a resource allocation optimization algorithm according to the data block transmission priority queue and the network link performance matrix, calculate the optimal transmission time of each data block, and obtain a data block transmission timing schedule; Based on the data block transmission timing schedule, performing group transmission control on the data blocks, setting transmission status monitoring points, and monitoring the transmission process in real time to obtain a data block transmission status matrix; Execute the consistency verification algorithm on the data blocks that have completed the transmission, calculate the cross-node data consistency index, and obtain the data block consistency verification result; Data synchronization quality assessment is performed according to the data block consistency verification result, a retransmission mechanism is triggered for inconsistent data blocks, and a node synchronization data set is generated.
4. The distributed ledger remote data synchronization method according to claim 3, characterized in that: The step of calculating the correlation coefficient between the node processing delay and the network transmission delay according to the network transmission parameters in the node synchronization data set to obtain a synchronization delay analysis model includes: Based on the data block transmission state matrix, extract the key time nodes of data transmission, perform transmission delay calculation, and obtain the network transmission delay vector; Extracting data processing time-consuming information from the data block compression coding sequence and the data block signature mapping sequence, performing processing delay calculation, and obtaining a node processing delay vector; Performing timing correlation analysis on the network transmission delay vector and the node processing delay vector, establishing a delay variation law model, and obtaining a system delay feature map; According to the system delay characteristic map, a causal relationship analysis algorithm is executed to construct a delay factor association network, calculate the influence intensity between factors, and obtain a delay causal network model; Based on the delay causal network model, Shapley value calculation is performed to quantify the contribution weight of each delay factor, and a delay factor influence matrix is obtained. The factors in the delay factor influence matrix are graded and classified, and a multidimensional sorting algorithm is performed to obtain a key delay factor sequence. According to the key delay factor sequence, multivariate correlation analysis is performed, a delay factor interaction model is constructed, and a delay correlation evaluation matrix is obtained. Based on the delay correlation evaluation matrix, the system delay bottleneck is located and analyzed, a delay optimization strategy is formulated, and a synchronization delay analysis model is generated.
5. The distributed ledger remote data synchronization method according to claim 4, characterized in that: The adding of timing identifiers to the data blocks corresponding to the synchronization delay analysis model and calculating integrity check codes to generate a synchronization reliability assurance mechanism includes: According to the delayed causal network model, a data block timing coding rule is constructed, a timestamp generation algorithm is executed, and a monotonically increasing timing identifier is added to the data block to obtain a data block timing identifier sequence; Based on the data block time sequence identification sequence, a data block version management system is constructed, a version number allocation algorithm is executed, a version dependency relationship of the data block is established, and a data block version dependency graph is obtained; For each node in the data block version dependency graph, a hash calculation and a check code generation algorithm are executed to build a data integrity verification chain to obtain a data block integrity check chain, and based on the data block integrity check chain, a cross-node data consistency comparison algorithm is executed to calculate the degree of data deviation to obtain a data block consistency measurement table; Based on the delay correlation evaluation matrix, a time window calculation algorithm is executed to construct a synchronization time constraint rule to obtain a data synchronization time constraint model, and according to the delay factor influence matrix, a data priority calculation is executed to construct a data block classification rule to obtain a data block priority classification strategy; Based on the data block consistency measurement table and the data synchronization time constraint model, a repair strategy generation algorithm is executed to build a data recovery mechanism to obtain a data block repair execution plan. Based on the data block repair execution plan and the data block priority grading strategy, a data synchronization quality control algorithm is executed to generate a synchronization reliability guarantee mechanism.
6. The distributed ledger remote data synchronization method according to claim 5, characterized in that: The node grouping planning and resource scheduling allocation are performed based on the synchronization reliability guarantee mechanism to obtain a synchronization management and control strategy, including: Based on the data block priority classification strategy, a node clustering algorithm is executed to construct a node organization structure, calculate the association strength between nodes, and obtain a node clustering relationship diagram; According to the node clustering relationship graph and the data block version dependency graph, a synchronization sequence optimization algorithm is executed to construct a data transmission sequence between nodes and obtain a node synchronization timing planning table; Input the node synchronization timing planning table into an adaptive genetic algorithm, perform iterative optimization calculations, build a candidate solution evaluation system, obtain a synchronization solution iterative optimization matrix, and execute a network resource allocation algorithm on the synchronization solution iterative optimization matrix to build a bandwidth dynamic scheduling model and obtain a network resource dynamic allocation table; According to the network resource dynamic allocation table, a resource constraint verification algorithm is executed to build a resource usage evaluation system to obtain a resource configuration rationality evaluation matrix, and based on the data block repair execution plan and the resource configuration rationality evaluation matrix, a synchronization strategy correction algorithm is executed to build a correction rule set to obtain a synchronization strategy correction plan; The synchronization strategy correction plan is input into the deep reinforcement learning model, parameter optimization training is performed, the optimal control strategy is constructed, and a control parameter optimization model is obtained. According to the control parameter optimization model, a real-time scheduling control algorithm is executed, a dynamic control mechanism is constructed, and a synchronization control strategy is generated.
7. A distributed ledger remote data synchronization system, characterized in that: The system is used to execute the distributed ledger remote data synchronization method according to any one of claims 1 to 6, comprising: A mapping module is used to perform hash mapping calculations on all nodes of the distributed ledger system to obtain a distributed storage architecture; A construction module is used to construct a hierarchical network of nodes according to the distributed storage architecture, set up inter-regional remote synchronization links and intra-regional local synchronization links, and obtain a two-layer communication architecture; A processing module, configured to perform parallel compression encoding, digital signature generation, transmission scheduling and consistency verification processing on the data block based on the two-layer communication architecture to obtain a node synchronization data set; A calculation module, used to calculate the correlation coefficient between the node processing delay and the network transmission delay according to the network transmission parameters in the node synchronization data set, and obtain a synchronization delay analysis model; A generation module, used to add a timing identifier and calculate an integrity check code based on the data block corresponding to the synchronization delay analysis model, so as to generate a synchronization reliability guarantee mechanism; The allocation module is used to perform node grouping planning and resource scheduling allocation based on the synchronization reliability guarantee mechanism to obtain a synchronization management and control strategy, which includes a node synchronization timing schedule and network resource allocation rules.
8. A distributed ledger remote data synchronization device, characterized in that: The distributed ledger remote data synchronization device comprises: a memory and at least one processor, wherein instructions are stored in the memory; The at least one processor calls the instruction in the memory to enable the distributed ledger remote data synchronization device to execute the distributed ledger remote data synchronization method according to any one of claims 1 to 6.
9. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by the processor, the distributed ledger remote data synchronization method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
High-throughput distributed account book system based on DAG
CN116846674A
Internet of Things gateway and gateway control method
CN119172051A