Side chain based federated learning optimization method, device, equipment, medium and product

By collecting and analyzing multiple performance metrics of the target layered blockchain, and constructing a sidechain to store local model update data, the system solves the problems of insufficient system stability and performance in traditional solutions, and achieves comprehensive system optimization and stability improvement.

CN122433945APending Publication Date: 2026-07-21CHINA MOBILE GRP GUANGDONG CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA MOBILE GRP GUANGDONG CO LTD
Filing Date
2026-04-03
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Traditional blockchain-fed learning solutions lack comprehensive evaluation and optimization using multi-dimensional metrics in complex and ever-changing network environments, which affects system stability and performance.

Method used

Multiple performance metrics of the target layered blockchain are collected, including cross-layer network dynamics, federated learning performance, blockchain security, and system robustness. The federated learning capability is evaluated through a comprehensive analysis model, and a sidechain is built to store the credential data for local model updates when the capability does not meet the preset requirements.

Benefits of technology

It enables comprehensive evaluation and optimization of system performance, improves system stability and performance, and stores local model update data in the form of asynchronous snapshots, adapting to rapid iteration and low-consumption transmission in complex network environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122433945A_ABST
    Figure CN122433945A_ABST
Patent Text Reader

Abstract

The application discloses a kind of federated learning optimization methods, devices, equipment, medium and product based on side chain, which comprises: collecting the multiple performance indicators of target layered block chain, including: cross-layer network dynamic indicators, federated learning performance indicators, block chain security dynamic indicators and system robustness combination indicators;Multiple performance indicators are evaluated by federated learning ability through comprehensive analysis model;In the case where the federated learning capability evaluation result indicates that the federated learning capability does not meet the preset performance requirement, a side chain is constructed for the target layered block chain as an aggregation layer of federated learning, for storing the local model update related credential data of each node participating in federated learning in the form of asynchronous snapshot;The application comprehensively considers cross-layer network dynamics, federated learning performance, block chain security and system robustness, realizes the overall evaluation and optimization of system performance, and improves the stability of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of blockchain technology, and in particular to a sidechain-based federated learning optimization method, apparatus, device, medium, and product. Background Technology

[0002] In traditional blockchain-fed learning solutions, each participating node first trains its model on its local dataset, encrypts the training results, stores them on the blockchain, and uses a consensus mechanism to ensure the legitimacy and validity of transactions. Finally, the participating nodes aggregate the received encrypted training results to obtain a global federated learning model. This global model can be used for subsequent prediction or decision-making tasks while protecting the original data of each participating node from leakage.

[0003] However, traditional solutions often focus on evaluating and optimizing data processing and transmission processes based on a single dimension or local performance, such as local optimization of parameter transmission / model training or storage optimization of consensus mechanisms. They lack comprehensive evaluation and optimization based on multi-dimensional indicators, which leads to the system's stability and performance being affected in complex and ever-changing network environments. Summary of the Invention

[0004] To address the problems existing in the prior art, embodiments of the present invention provide a sidechain-based federated learning optimization method, apparatus, device, medium, and product that can comprehensively consider cross-layer network dynamics, federated learning performance, blockchain security, and system robustness, thereby achieving a comprehensive evaluation and optimization of system performance and improving system stability.

[0005] In a first aspect, embodiments of the present invention provide a sidechain-based federated learning optimization method, comprising: Multiple performance metrics of the target layered blockchain are collected; wherein, the performance metrics include: cross-layer network dynamic metrics, federated learning performance metrics, blockchain security dynamic metrics, and system robustness combined metrics; For multiple performance indicators, federated learning capability is evaluated using a pre-built comprehensive analysis model to obtain the federated learning capability evaluation result of the target hierarchical blockchain; If the federated learning capability assessment result indicates that the federated learning capability does not meet the preset performance requirements, a sidechain is constructed for the target hierarchical blockchain as an aggregation layer for federated learning; wherein, the sidechain is configured to store the credential data related to the local model update of each node participating in federated learning in the form of asynchronous snapshots.

[0006] As an improvement to the above scheme, the cross-layer network dynamic index is obtained by dynamically scoring the inter-layer communication entropy, layer topology complexity, multi-dimensional consensus convergence index, and cross-domain propagation delay variance of the target layered blockchain through a pre-constructed first index analysis model. The inter-layer communication entropy value is determined based on the cross-layer data traffic of the target layered blockchain, the layered topology complexity is determined based on the degree distribution of nodes and the network layering structure in the target layered blockchain, the multi-dimensional consensus convergence index is determined based on the block confirmation depth and consensus rounds of the target layered blockchain, and the cross-domain propagation delay variance is determined based on the cross-layer transmission delay and network congestion.

[0007] As an improvement to the above scheme, the federated learning performance index is obtained by dynamically scoring the model based on the model convergence complexity, differential privacy loss function, distributed optimization efficiency, and model heterogeneity measurement through a pre-built second index analysis model. The model convergence complexity is determined based on the number of gradient descent iterations and the variance of model parameter updates during model training. The differential privacy loss function is determined based on the privacy budget parameters and relaxation parameters of federated learning. The distributed optimization efficiency is determined based on the parallel speedup ratio, communication overhead, computing resource utilization, and load imbalance. The model heterogeneity measure is determined based on the KL divergence of the feature distribution, the JS divergence of the label distribution, and the similarity of model parameters.

[0008] As an improvement to the above solution, the blockchain security dynamic index is obtained by dynamically scoring based on consensus security boundary, smart contract risk coefficient, cross-chain asset security and encryption algorithm strength through a pre-built third index analysis model. The consensus security boundary is determined based on the Byzantine fault tolerance threshold, equity dispersion, and voting weight entropy; the smart contract risk coefficient is determined based on code complexity cyclomatic complexity, reentrancy attack risk, state dependency depth, and resource consumption rate; the cross-chain asset security is determined based on locked option weight, multi-signature complexity, atomic swap success rate, and cross-chain verification depth; and the encryption algorithm strength is determined based on key length and algorithm time complexity.

[0009] As an improvement to the above scheme, the system robustness combination index is obtained by dynamically scoring based on the adaptive fault tolerance coefficient, resource scheduling optimization degree, state consistency score, and performance scalability index through a pre-constructed fourth index analysis model. The adaptive fault tolerance coefficient is determined based on node fault detection time; the resource scheduling optimization degree is determined based on task queuing theory indicators, scheduling algorithm complexity, and system response time; the state consistency score is determined based on state machine replication latency, data synchronization cycle, conflict resolution time, and consistency check coverage; and the performance scalability index is determined based on linear expansion coefficient, resource utilization efficiency, system bottleneck identification rate, and horizontal scaling capability.

[0010] As an improvement to the above scheme, the federated learning capability is evaluated for multiple performance indicators using a pre-built comprehensive analysis model, resulting in the federated learning capability evaluation results of the target hierarchical blockchain, including: Based on multiple performance indicators, a comprehensive score is obtained by using the comprehensive analysis model to score the indicators and thus obtain a federated learning capability score. The federated learning ability score is compared and analyzed with a preset comprehensive score threshold; If the federated learning ability score is less than the comprehensive score threshold, it is determined that the federated learning ability of the target hierarchical blockchain does not meet the preset performance requirements, and this is taken as the federated learning ability evaluation result. If the federated learning capability score is not less than the comprehensive score threshold, the federated learning capability of the target hierarchical blockchain is determined to meet the preset performance requirements, and this is taken as the federated learning capability evaluation result.

[0011] Secondly, embodiments of the present invention provide a sidechain-based federated learning optimization device, comprising: The data acquisition module is used to collect multiple performance indicators of the target layered blockchain; wherein, the performance indicators include: cross-layer network dynamic indicators, federated learning performance indicators, blockchain security dynamic indicators, and system robustness combination indicators. The capability assessment module is used to assess the federated learning capability of the target hierarchical blockchain by using a pre-built comprehensive analysis model to evaluate multiple performance indicators. A sidechain construction module is used to construct a sidechain for the target hierarchical blockchain as an aggregation layer for federated learning when the federated learning capability assessment result indicates that the federated learning capability does not meet the preset performance requirements; wherein, the sidechain is configured to store relevant data of local model updates of each node participating in federated learning in the form of asynchronous snapshots.

[0012] Thirdly, embodiments of the present invention provide a sidechain-based federated learning optimization device, comprising: a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement the sidechain-based federated learning optimization method as described in any one of the first aspects.

[0013] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform the sidechain-based federated learning optimization method as described in any one of the first aspects.

[0014] Fifthly, embodiments of the present invention provide a computer program product, including a computer program or instructions, which, when executed by a processor, implement the sidechain-based federated learning optimization method as described in any one of the first aspects.

[0015] Compared to existing technologies, this invention provides a sidechain-based federated learning optimization method, apparatus, device, medium, and product. This involves collecting multiple performance metrics of a target layered blockchain, including cross-layer network dynamics, federated learning performance metrics, blockchain security dynamics, and a combined system robustness metric. Then, a pre-built comprehensive analysis model is used to evaluate the federated learning capability of the target layered blockchain, yielding an evaluation result. If the evaluation result indicates that the federated learning capability does not meet preset performance requirements, a sidechain is constructed on the target layered blockchain as an aggregation layer for federated learning. The sidechain is configured to store credential data related to local model updates of each participating node in the federated learning process in asynchronous snapshot form. This invention comprehensively considers cross-layer network dynamics, federated learning performance, blockchain security, and system robustness to achieve a comprehensive evaluation and optimization of system performance, thereby improving system stability. Attached Figure Description

[0016] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is a flowchart of a sidechain-based federated learning optimization method provided in an embodiment of the present invention; Figure 2 This is a structural block diagram of a sidechain-based federated learning optimization device provided in an embodiment of the present invention; Figure 3 This is a structural block diagram of a sidechain-based federated learning optimization device provided in an embodiment of the present invention. Detailed Implementation

[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0019] It is understood that the various numerical designations used in the embodiments of this invention are merely for descriptive convenience and are not intended to limit the scope of this application. The order of the process numbers does not imply the order of execution; the execution order of each process should be determined by its function and internal logic.

[0020] In embodiments of the invention, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, without necessarily requiring or implying any such actual relationship or order between these entities or operations. The terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising" does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element. The term "a plurality or several" refers to two or more.

[0021] See Figure 1 , Figure 1 This is a flowchart illustrating a sidechain-based federated learning optimization method provided in an embodiment of the present invention. The sidechain-based federated learning optimization method specifically includes: S11: Collect multiple performance metrics of the target layered blockchain; wherein, the performance metrics include: cross-layer network dynamic metrics, federated learning performance metrics, blockchain security dynamic metrics, and system robustness combined metrics; Among them, the cross-layer network dynamic index is used to indicate the data transmission performance between layers of the target hierarchical blockchain, the federated learning performance index is used to indicate the training performance of the federated learning model under the target hierarchical blockchain, the blockchain security dynamic index is used to indicate the security performance of the target hierarchical blockchain, and the system robustness composite index is used to indicate the robustness of the node system under the target hierarchical blockchain.

[0022] S12: For multiple performance indicators, the federated learning capability is evaluated using a pre-built comprehensive analysis model to obtain the federated learning capability evaluation result of the target hierarchical blockchain; S13: If the federated learning capability assessment result indicates that the federated learning capability does not meet the preset performance requirements, a sidechain is constructed for the target hierarchical blockchain as an aggregation layer for federated learning; wherein, the sidechain is configured to store the local model update related credential data of each node participating in federated learning in the form of asynchronous snapshots.

[0023] For multiple nodes participating in federated learning model training, model sharing training is performed through the target hierarchical blockchain. These nodes form a node system, which can be terminal devices such as servers or computing devices; specific limitations are not imposed in this embodiment. In this embodiment, performance indicators such as cross-layer network dynamics, federated learning performance indicators, blockchain security indicators, and system robustness indicators of the target hierarchical blockchain are collected. Then, a pre-built comprehensive analysis model is used to evaluate the federated learning capability of these indicators, yielding the evaluation result. If the evaluation result indicates that the federated learning capability does not meet preset performance requirements, a sidechain is constructed on the target hierarchical blockchain as an aggregation layer for federated learning. This sidechain stores local model update-related credential data for each participating node in the federated learning process, such as the state and training metadata related to the model training process, in an asynchronous snapshot format, without needing to record the model parameters of the local model. By achieving comprehensive evaluation and optimization of system performance, system stability is improved. Further adjustments to the aggregation frequency and model compression strategy can be made to achieve rapid iteration and low-consumption transmission.

[0024] It is understandable that a local model refers to a model block obtained after the global federated learning model is partitioned and distributed to various nodes for model training. State and training metadata are used to indicate the state metadata of the model training, such as node participation status (submitted, not submitted, verified, not verified, etc.), process status (such as initialization, ready, training, completed, etc.), resource and queue status (such as the count of models to be updated), time synchronization status, etc., as well as the metadata of the model training, such as local model identifier, training round, node identifier, etc.

[0025] Here, aggregation frequency refers to the frequency at which the model update credential data of the collection nodes is sent to the sidechain for global aggregation, and model compression strategy refers to a compression algorithm that reduces the amount of data that needs to be transmitted across the network and stored on the chain (i.e., the number of model parameters). The coordinated scheduling of aggregation frequency and compression strategy can solve the system performance limitations of traditional fixed strategies in complex and ever-changing network environments, and achieve rapid iteration and low-cost transmission.

[0026] In an optional embodiment, the cross-layer network dynamic index is obtained by dynamically scoring the inter-layer communication entropy, layer topology complexity, multidimensional consensus convergence index, and cross-domain propagation delay variance of the target layered blockchain through a pre-constructed first index analysis model. The inter-layer communication entropy value is determined based on the cross-layer data traffic of the target layered blockchain, the layered topology complexity is determined based on the degree distribution of nodes and the network layering structure in the target layered blockchain, the multi-dimensional consensus convergence index is determined based on the block confirmation depth and consensus rounds of the target layered blockchain, and the cross-domain propagation delay variance is determined based on the cross-layer transmission delay and network congestion.

[0027] For example, the inter-layer communication entropy value is calculated based on cross-layer data traffic, total data traffic, Shannon entropy, inter-layer coupling, and routing hop count. The specific calculation formula is as follows: Inter-layer communication entropy = (cross-layer data traffic / total data traffic) × Shannon entropy × inter-layer coupling × log (routing hop count); Cross-layer data traffic is obtained by monitoring the data packet traffic of cross-layer communication between nodes, with a statistical granularity of seconds. For example, it can be obtained by calculating the average data packet traffic of cross-layer communication between nodes monitored per second. Total data traffic is obtained by the network traffic monitoring module by statistically analyzing the traffic of the entire network, with a statistical granularity of seconds. Specifically, it refers to the sum of data packet traffic of all monitored nodes per second. Shannon entropy is calculated using the probability distribution of cross-layer data traffic (i.e., the probability of cross-layer communication events occurring). For example, Shannon entropy = , This represents the probability of the i-th type of cross-layer communication event occurring; inter-layer coupling is calculated by analyzing the edge density of cross-layer dependencies (i.e., the proportion of the number of dependent edges between nodes at different levels to the theoretical maximum number of edges) and the coupling weight between nodes (used to indicate the coupling strength between nodes at different levels), for example, inter-layer coupling = coupling weight between nodes / number of dependent edges; the routing hop count is obtained by capturing the routing information of cross-layer data packets, for example, by extracting the number of intermediate routers (or nodes) that cross-layer data packets pass through from the source node to the destination node (hop count) using network tracing tools.

[0028] The hierarchical topology complexity is calculated based on the power-law exponent of node degree distribution, clustering coefficient, standard deviation of network diameter, and layer depth. The specific calculation formula is as follows: Hierarchical topology complexity = (power-law exponent of node degree distribution × clustering coefficient) × standard deviation of network diameter × hierarchy depth; Among them, the power-law exponent of node degree distribution is obtained by analyzing the degree distribution of nodes using a topology scanning tool. The degree distribution of nodes follows a power-law distribution, and the power-law exponent of the power-law distribution can be extracted. The clustering coefficient is obtained by calculating the local clustering coefficient of each node using a network analysis algorithm. The standard deviation of network diameter is obtained by calculating the variance of the longest path distribution of the target hierarchical blockchain using a graph analysis tool. The level depth is obtained by traversing the hierarchical structure of the target hierarchical blockchain (such as DFS (Depth-First Search) / BFS (Breadth-First Search)) to count the level depth.

[0029] The multidimensional consensus convergence index is calculated based on the block confirmation depth, the number of PBFT (Practical Byzantine Fault Tolerance) consensus rounds, the DAG (Directed Acyclic Graph) confirmation weight, and the reciprocal of the fork rate. The specific calculation formula is as follows: Multidimensional consensus convergence index = (Block confirmation depth × PBFT consensus rounds × DAG confirmation weight) × reciprocal of fork rate; Among them, the block confirmation depth is obtained by querying the block confirmation depth of the target hierarchical blockchain through API, which is the number of new blocks subsequently generated for a certain block; the PBFT consensus rounds are obtained by monitoring the execution rounds of the consensus algorithm in the target hierarchical blockchain; the DAG confirmation weight is obtained by calculating the confirmation weight value of the child node to the parent node in the DAG topology graph of the node system, and then calculating the weighted average of all confirmation weight values; the fork rate is obtained by calculating the frequency of fork events in the target hierarchical blockchain.

[0030] The cross-domain propagation delay variance is calculated based on the cross-layer transmission delay, node geographical distribution coefficient, and network congestion. The specific calculation formula is as follows: Cross-domain propagation delay variance = Σ(cross-layer transmission delay² × node geographical distribution coefficient × network congestion); Cross-layer transmission delay is obtained by recording the delay times between nodes using network delay monitoring tools and calculating the average value; the node geographic distribution coefficient is obtained by calculating the uniformity of distribution based on the geographical location of the nodes, for example, equal to , The probability of cross-layer communication events is represented by the ratio of the number of nodes in the i-th region to the total number of nodes in the target hierarchical blockchain, and M represents the number of regions. The network congestion degree is calculated using network bandwidth utilization and packet loss rate, for example, by weighted summation of network bandwidth utilization and packet loss rate.

[0031] Based on the collected inter-layer communication entropy, hierarchical topology complexity, multidimensional consensus convergence index, and cross-domain propagation delay variance, dynamic scoring is performed using the first indicator analysis model (also known as the cross-layer network dynamic indicator analysis model) to obtain the cross-layer network dynamic indicators. The first indicator analysis model is specifically represented as follows: (1); Wherein, IND represents the cross-layer network dynamics indicator, and LCE... i represents the inter-layer communication entropy value of the i-th layer, HTC represents the layer topology complexity, MCCI represents the multidimensional consensus convergence index, and CPDV represents the cross-domain propagation delay variance. This represents the sum of the entropy of all inter-layer communication, used to normalize the entropy value of the current layer. This indicates the complexity of the network topology of the target hierarchical blockchain; a higher value indicates greater complexity and a more difficult-to-manage network. It combines the uncertainty of consensus convergence and propagation delay to highlight the impact of multidimensional consensus.

[0032] This invention, through the collection of cross-layer network dynamic indicators, can assess the smoothness of model parameters and gradient transmission between different layers of the blockchain.

[0033] In one optional embodiment, the federated learning performance metrics are obtained by dynamically scoring the model based on model convergence complexity, differential privacy loss function, distributed optimization efficiency, and model heterogeneity measure through a pre-built second metric analysis model. The model convergence complexity is determined based on the number of gradient descent iterations and the variance of model parameter updates during model training. The differential privacy loss function is determined based on the privacy budget parameters and relaxation parameters of federated learning. The distributed optimization efficiency is determined based on the parallel speedup ratio, communication overhead, computing resource utilization, and load imbalance. The model heterogeneity measure is determined based on the KL divergence of the feature distribution, the JS divergence of the label distribution, and the similarity of model parameters.

[0034] For example, the model convergence complexity is calculated based on the number of gradient descent iterations, parameter update variance, model divergence rate, and learning rate adaptive coefficient. The specific calculation formula is as follows: Model convergence complexity = (number of gradient descent iterations × parameter update variance) × exp(model divergence rate) × learning rate adaptive coefficient; Specifically, the number of gradient descent iterations is obtained by recording the number of gradient updates in each training epoch; the parameter update variance is calculated by measuring the variance of model parameter updates (gradient or weight differences) in each iteration; the model divergence rate is obtained by monitoring the trend of the loss function value and statistically analyzing the ratio of convergence to divergence, for example, equal to the ratio of iterations judged as divergent during training to the total number of iterations; and the learning rate adaptation coefficient is obtained by recording the dynamically adjusted learning rate through the optimization algorithm, for example, by linearly fitting the recorded learning rate to obtain the slope as the learning rate adaptation coefficient.

[0035] The differential privacy loss function is calculated based on the ε-differential privacy budget, the δ-relaxation parameter, the noise amplitude, and the upper bound of sensitivity. The specific calculation formula is as follows: Differential privacy loss function = (ε - differential privacy budget × δ - relaxation parameter) × noise amplitude × upper bound of sensitivity; Among them, ε-differential privacy budget is a privacy budget parameter pre-set by the federated learning framework; δ-relaxation parameter (referred to as relaxation parameter) is a relaxation parameter pre-set by the system, or calculated through noise mechanism analysis. Calculating the δ-relaxation parameter through noise mechanism analysis is existing technology and will not be described in detail here; the noise amplitude is obtained by calculating the standard deviation of Gaussian / Laplace noise added during the federated learning training process to meet the differential privacy requirements; the upper bound of sensitivity is the pre-set maximum value boundary of the sensitivity of the training dataset during the federated learning training process.

[0036] Distributed optimization efficiency is calculated based on parallel speedup, communication overhead, computing resource utilization, and load imbalance. The specific calculation formula is as follows: Distributed optimization efficiency = (parallel speedup ratio × communication overhead) × computing resource utilization × load imbalance; Among them, the parallel speedup ratio is obtained by measuring the execution time ratio of federated learning tasks under single-node and multi-node conditions; the communication overhead is collected by monitoring the size and frequency of data packets transmitted between nodes, for example, equal to the sum of the amount of data transmitted between nodes in all training rounds; the computing resource utilization rate is obtained by recording the CPU / GPU utilization rate using system monitoring tools; and the load imbalance is obtained by statistically analyzing the amount of federated learning tasks allocated to each node and calculating the standard deviation of the node load.

[0037] The model heterogeneity measure is calculated based on the KL (Kullback-Leibler) divergence of the feature distribution, the JS (Jensen-Shannon) divergence of the label distribution, the similarity of model parameters, and the prediction consistency. The specific calculation formula is as follows: Model heterogeneity measure = √(feature distribution KL divergence × label distribution JS divergence) × model parameter similarity × prediction consistency.

[0038] Specifically, the feature distribution KL divergence is obtained by comparing the data feature distributions of different nodes and calculating the Kullback-Leibler divergence; the label distribution JS divergence is obtained by comparing the label distributions between nodes and calculating the Jensen-Shannon divergence; the model parameter similarity is obtained by comparing the model parameter weights of different nodes and calculating using cosine similarity or Euclidean distance; and the prediction consistency is obtained by performing consistency analysis on the prediction results of the local models of different nodes on the test dataset, for example, by calculating the similarity or consistency of the prediction results of the local models of different nodes.

[0039] Based on the model convergence complexity, differential privacy loss function, distributed optimization efficiency, and model heterogeneity measure collected above, a dynamic scoring method is used through the second indicator analysis model (also known as the federated learning performance indicator analysis model) to obtain the federated learning performance index. The second indicator analysis model is specifically represented as follows: (2); Wherein, FLP represents federated learning performance metrics, MCC represents model convergence complexity, DOE represents distributed optimization efficiency, DPLF represents differential privacy loss function, and MHM represents model heterogeneity measure. This represents the tangent of the differential privacy loss function, indicating the trade-off between privacy protection and performance. A larger tangent likely indicates a greater loss of privacy. The square root is used to reduce the sensitivity of efficiency variables to the score and to give other factors greater weight. The impact of heterogeneity on model performance is enhanced to ensure that the effects of model differences are reasonably reflected.

[0040] In one optional embodiment, the blockchain security dynamic index is obtained by dynamically scoring based on consensus security boundaries, smart contract risk coefficients, cross-chain asset security, and encryption algorithm strength through a pre-built third index analysis model. The consensus security boundary is determined based on the Byzantine fault tolerance threshold, equity dispersion, and voting weight entropy; the smart contract risk coefficient is determined based on code complexity cyclomatic complexity, reentrancy attack risk, state dependency depth, and resource consumption rate; the cross-chain asset security is determined based on locked option weight, multi-signature complexity, atomic swap success rate, and cross-chain verification depth; and the encryption algorithm strength is determined based on key length and algorithm time complexity.

[0041] For example, the consensus security boundary is calculated based on the Byzantine fault tolerance threshold, malicious node detection rate, equity dispersion, and voting weight entropy. The specific calculation formula is as follows: Consensus security boundary = (Byzantine fault tolerance threshold × malicious node detection rate) × √(equity dispersion × voting weight entropy); Among them, the Byzantine fault tolerance threshold is obtained by extracting the Byzantine fault tolerance limit parameter (i.e., the Byzantine fault tolerance threshold) from the consensus protocol; the malicious node detection rate is obtained by monitoring the behavior of nodes and statistically identifying the malicious nodes with abnormal behavior, for example, equal to the ratio of the number of correctly identified malicious nodes to the actual number of malicious nodes; the equity dispersion is obtained by calculating the uniformity of equity distribution in the PoS (Proof of Stake) network, for example, based on the equity concentration index of the Herfindahl-Hirschman index, and then calculating the inverse function or complement of the equity concentration index; the voting weight entropy is obtained by calculating the Shannon entropy by statistically analyzing the distribution probability of voting weights.

[0042] The risk coefficient of smart contracts is calculated based on code complexity (cyclomatic complexity), reentrancy attack risk, state dependency depth, and resource consumption rate. The specific calculation formula is as follows: Smart contract risk coefficient = (code complexity, cyclomatic complexity × reentrancy attack risk) × state dependency depth × resource consumption rate; Among them, code complexity cyclomatic complexity is obtained by using code analysis tools to statistically analyze the cyclomatic complexity of the contract code; reentrancy attack risk is obtained by using smart contract static analysis tools to detect the degree of reentrancy attack risk; state dependency depth is obtained by statistically analyzing the dependency chain length of variables in the contract; and resource consumption rate is obtained by monitoring the proportion of gas consumption during contract execution.

[0043] The security of cross-chain assets is calculated based on the weight of locked options, the complexity of multi-signature, the success rate of atomic swaps, and the depth of cross-chain verification. The specific calculation formula is as follows: Cross-chain asset security = (locked option weight × multi-signature complexity) × atomic swap success rate × cross-chain verification depth; Specifically, the locked option weight is obtained by statistically analyzing the proportion of time spent by cross-chain assets in the locked contract to the total observation time; the multi-signature complexity is collected by recording the number of nodes and algorithm complexity for multi-signature verification in cross-chain transactions, for example, equal to the sum of the algorithm complexity of all nodes; the atomic swap success rate is obtained by statistically analyzing the number of successful and failed cross-chain transactions, for example, equal to the ratio of the number of successful cross-chain transactions to the total number of transactions; and the cross-chain verification depth is obtained by tracking the Merkle proof depth of the verification process in the cross-chain protocol.

[0044] The strength of an encryption algorithm is calculated based on the quantum resistance coefficient, key length, random number entropy, and algorithm time complexity. The specific calculation formula is as follows: Encryption algorithm strength = (quantum resistance coefficient × key length) × random number entropy value × algorithm time complexity; Among them, the quantum resistance coefficient is obtained by querying the quantum attack resistance performance index (security strength level against known quantum attacks) of the encryption algorithm based on the lattice cryptography algorithm; the key length is obtained by extracting the key length from the system settings; the random number entropy value is obtained by measuring the entropy value of the randomly generated number using the entropy value analysis tool of the random number generator; and the algorithm time complexity is obtained by testing the actual running time of the encryption algorithm under different input scales (i.e., the amount of data to be encrypted), for example, by fitting the power exponent of the time complexity function of the actual running time of the encryption algorithm under different input scales.

[0045] Based on the consensus security boundary, smart contract risk coefficient, cross-chain asset security, and encryption algorithm strength collected above, a dynamic scoring method is used through a third indicator analysis model (also known as the blockchain security dynamic indicator analysis model) to obtain the blockchain security dynamic indicator. The third indicator analysis model is specifically represented as follows: (3); Among them, BSD represents the Blockchain Security Dynamics Index, CSB represents the Consensus Security Boundary, CASD represents the cross-chain asset security level, SCRF represents the smart contract risk coefficient, and CASE represents the cryptographic algorithm strength assessment. The cosine of the square root of the smart contract risk coefficient represents the periodic impact of smart contract risk. Simultaneously considering both the security of cross-chain assets and the strength of encryption algorithms, a comprehensive assessment is formed. Adding a constant of 1 avoids the logarithmic parameter being zero, while also ensuring that the impact of the consensus security boundary is positively reflected.

[0046] In an optional embodiment, the system robustness combination index is obtained by dynamically scoring based on the adaptive fault tolerance coefficient, resource scheduling optimization degree, state consistency score, and performance scalability index through a pre-built fourth index analysis model. The adaptive fault tolerance coefficient is determined based on node fault detection time; the resource scheduling optimization degree is determined based on task queuing theory indicators, scheduling algorithm complexity, and system response time; the state consistency score is determined based on state machine replication latency, data synchronization cycle, conflict resolution time, and consistency check coverage; and the performance scalability index is determined based on linear expansion coefficient, resource utilization efficiency, system bottleneck identification rate, and horizontal scaling capability.

[0047] For example, the adaptive fault tolerance coefficient is calculated based on the node failure detection time, the recovery mechanism trigger threshold, the efficiency of the system degradation strategy, and the service quality retention rate. The specific calculation formula is as follows: Adaptive fault tolerance coefficient = (node ​​failure detection time × recovery mechanism trigger threshold) × system degradation strategy efficiency × service quality retention rate; Among them, the node failure detection time is the time difference of failure detection recorded by the log analysis tool (i.e., the difference between the actual time of failure of the node and the time of log analysis confirming and recording the failure), the recovery mechanism trigger threshold is the frequency of triggering the statistical failure recovery mechanism, the system degradation strategy efficiency is obtained by testing the service response time and availability changes of the system in degradation mode, and the service quality retention rate is the normal completion rate of the service in degradation mode.

[0048] The resource scheduling optimization degree is calculated based on task queuing theory indicators, resource allocation fairness, scheduling algorithm complexity, and system response time. The specific calculation formula is as follows: Resource scheduling optimization degree = (task queuing theoretical index × resource allocation fairness) × scheduling algorithm complexity × system response time; Among them, the task queuing theory index is calculated by using queuing theory formulas combined with the completion time and waiting time of the tasks (referred to as model training tasks) assigned to each node to guide local model training. For example, it is obtained by calculating the sum of the completion time and waiting time of each node and averaging them. The resource allocation fairness is obtained by statistically analyzing the proportion of resources allocated to each node (such as CPU / bandwidth resources) and calculating the Theil index. The scheduling algorithm complexity is calculated by analyzing the time complexity (such as calculating the product of the single execution time and the number of executions of the scheduling algorithm in a single round of training) and space complexity (such as calculating the maximum value of the storage space required for the input scale (total number of nodes), the output scale (number of selected nodes), and the temporary extra space (fixed) during the algorithm's operation). For example, it is obtained by calculating the weighted sum of the normalized time complexity and space complexity. The system response time is obtained by monitoring the average response time of the model training tasks of each node from submission to completion.

[0049] The state consistency score is calculated based on state machine replication latency, data synchronization cycle, conflict resolution time, and consistency check coverage. The specific calculation formula is as follows: State consistency score = (state machine replication latency × data synchronization cycle) × conflict resolution time × consistency check coverage; Among them, the state machine replication latency is obtained by collecting the time delay of state synchronization between master and slave nodes (i.e., state synchronization latency). The master node refers to nodes such as parameter aggregation nodes and consensus ledger nodes, while the slave node refers to the node participating in training and verification. The data synchronization period is obtained by statistically analyzing the frequency and interval of state updates between nodes. For example, it is equal to the time interval (mean) between two consecutive successful completions of model parameter update synchronization between nodes, or equal to the reciprocal of the frequency of state updates between nodes. The conflict resolution time is obtained by measuring the average time from the occurrence to the resolution of data conflicts (such as model parameter aggregation conflicts, task state conflicts, and on-chain data content conflicts). The consistency check coverage is obtained by statistically analyzing the proportion of the operation / data range actually covered by the consistency check mechanism to the total operation / data range that needs to be checked in the system.

[0050] The performance scalability index is calculated based on the linear expansion coefficient, resource utilization efficiency, system bottleneck identification rate, and horizontal scalability. The specific calculation formula is as follows: Performance scalability index = (linear expansion coefficient × resource utilization efficiency) × system bottleneck identification rate × horizontal expansion capability; Among them, the linear scaling factor is obtained by testing the system performance when the number of nodes is increased (such as model training throughput / transaction processing throughput) to the original system performance. For example, it is obtained by calculating the ratio of the product of the system performance when the number of nodes is increased and the original system performance to the product of the original system performance and the number of nodes after the increase. Resource utilization efficiency is obtained by monitoring the resource utilization rate (CPU / bandwidth resource utilization rate) of the newly added nodes. System bottleneck identification rate refers to the accuracy of identifying system bottlenecks through performance monitoring tools. Horizontal scaling capability is obtained by testing the trend of the overall system performance after the number of nodes is increased. For example, it is obtained by calculating the ratio of the difference between the system performance when the number of nodes is increased and the original system performance to the original system performance.

[0051] Based on the above-mentioned adaptive fault tolerance coefficient, resource scheduling optimization degree, state consistency score, and performance scalability index, dynamic scoring is performed using a pre-constructed fourth indicator analysis model (also known as the system robustness combined indicator analysis model) to obtain the system robustness combined indicator. The fourth indicator analysis model is specifically represented as follows: (4); Wherein, SRC represents the system robustness composite index, AFTC represents the adaptive fault tolerance coefficient, RSOD represents the resource scheduling optimization degree, SCS represents the state consistency score, and PSI represents the performance scalability index. The square root is used to reduce the impact of the adaptive fault tolerance coefficient, ensuring its relative balance with other factors. The exponential function reduces the score when resource scheduling optimization is high, ensuring that over-optimization does not become too dominant. Combining performance scalability index and state consistency score, a comprehensive assessment of robustness is provided. Calculating the cube root is used to adjust the score and avoid the excessive influence of a single factor.

[0052] The embodiments of the present invention improve the accuracy and efficiency of data analysis by establishing specific analysis models for various performance indicators, such as inter-layer communication entropy, model convergence complexity, and consensus security boundaries.

[0053] In one optional embodiment, the federated learning capability is evaluated for multiple performance metrics using a pre-built comprehensive analysis model to obtain the federated learning capability evaluation result of the target hierarchical blockchain, including: Based on multiple performance indicators, a comprehensive score is obtained by using the comprehensive analysis model to score the indicators and thus obtain a federated learning capability score. The federated learning ability score is compared and analyzed with a preset comprehensive score threshold; If the federated learning ability score is less than the comprehensive score threshold, it is determined that the federated learning ability of the target hierarchical blockchain does not meet the preset performance requirements, and this is taken as the federated learning ability evaluation result. If the federated learning capability score is not less than the comprehensive score threshold, the federated learning capability of the target hierarchical blockchain is determined to meet the preset performance requirements, and this is taken as the federated learning capability evaluation result.

[0054] For example, for the multiple performance indicators calculated above, a comprehensive analysis model is used to perform a comprehensive analysis to obtain a federated learning ability score. The comprehensive analysis model is specifically represented as follows: (5); Here, CS represents the Federated Learning Capability Score. The geometric mean of the cross-layer network dynamics index and the federated learning performance index is used to represent the product relationship between the two. By applying a tangent function to the dynamic security indicators of the blockchain, a non-linear variation is introduced to ensure the sensitivity of the scoring. Use an exponential function to highlight the impact of the system's robustness composite index, while preventing the denominator from being zero. Perform a logarithmic calculation on the sum of all performance metrics to ensure the smoothness of the results and avoid overstating the impact of any particular score.

[0055] Then, the federated learning capability of the target hierarchical blockchain is judged by using a pre-set comprehensive scoring threshold and the federated learning capability score obtained above. Assuming the comprehensive scoring threshold is labeled CSDef, the specific judgment process is as follows: When CSDef < CS, it indicates that the federated learning ability of the target hierarchical blockchain is good, and the federated learning ability of the target hierarchical blockchain meets the preset performance requirements. When CSDef ≥ CS, it indicates that the federated learning ability of the target hierarchical blockchain is poor, and the federated learning ability of the target hierarchical blockchain does not meet the preset performance requirements.

[0056] Based on the above federated learning ability evaluation results, optimize the federated learning of the target hierarchical blockchain. The specific optimization process is as follows: When CSDef ≥ CS, that is, when the federated learning ability of the target hierarchical blockchain is poor, construct a lightweight side chain as the aggregation layer of federated learning, record the local model updates of each node with asynchronous snapshots, and the side chain only retains the necessary voucher data, such as status and training metadata; further, fast iteration and low-consumption transmission can be achieved through the scheduled aggregation frequency and model compression strategy. Otherwise, no further processing is required.

[0057] Compared with the prior art, the embodiments of the present invention comprehensively evaluate the federated learning ability of the target hierarchical blockchain by collecting multiple performance indicators (cross-layer network dynamic indicators, federated learning performance indicators, blockchain security indicators, system robustness combination indicators) of the federated learning of the target hierarchical blockchain, and obtain a federated learning ability score, realizing a comprehensive evaluation and optimization of the system performance; at the same time, using the federated learning ability score as the basis for judging the federated learning ability of the target blockchain. When it is found that the federated learning ability of the target blockchain is poor, a lightweight side chain is further constructed as the aggregation layer of federated learning. This optimization strategy can be flexibly adjusted according to the actual situation of the system, and can achieve fast iteration and low-consumption transmission, thus solving the deficiencies of the prior art in aspects such as data processing, transmission, model aggregation, and blockchain network design, improving the stability and performance of the system, and enhancing the user experience when using the blockchain-based federated learning system.

[0058] The embodiments of the present invention can improve the stability and fault tolerance of the system by collecting and analyzing system robustness combination indicators, such as adaptive fault tolerance coefficient, resource scheduling optimization degree, etc., so that the system can maintain good performance in the face of various complex environments; considering privacy protection indicators such as differential privacy loss function, and improving the data privacy protection ability in the federated learning process by optimizing these indicators; aiming at the characteristics of the blockchain network, proposing security dynamic indicators such as consensus security boundary and smart contract risk coefficient, and enhancing the performance and security of the blockchain network by optimizing these indicators; by statistically analyzing indicators such as resource scheduling and performance scalability, the resource utilization efficiency of the system can be improved and the system operation cost can be reduced.

[0059] See Figure 2 [[ID=IS=17]], Figure 2This invention provides a structural block diagram of a sidechain-based federated learning optimization device, which includes: The data acquisition module 11 is used to collect multiple performance indicators of the target layered blockchain; wherein, the performance indicators include: cross-layer network dynamic indicators, federated learning performance indicators, blockchain security dynamic indicators, and system robustness combined indicators. The capability assessment module 12 is used to assess the federated learning capability of the target hierarchical blockchain by using a pre-built comprehensive analysis model to evaluate multiple performance indicators. The sidechain construction module 13 is used to construct a sidechain for the target hierarchical blockchain as an aggregation layer for federated learning when the federated learning capability evaluation result indicates that the federated learning capability does not meet the preset performance requirements; wherein, the sidechain is configured to store relevant data of local model updates of each node participating in federated learning in the form of asynchronous snapshots.

[0060] In an optional embodiment, the cross-layer network dynamic index is obtained by dynamically scoring the inter-layer communication entropy, layer topology complexity, multidimensional consensus convergence index, and cross-domain propagation delay variance of the target layered blockchain through a pre-constructed first index analysis model. The inter-layer communication entropy value is determined based on the cross-layer data traffic of the target layered blockchain, the layered topology complexity is determined based on the degree distribution of nodes and the network layering structure in the target layered blockchain, the multi-dimensional consensus convergence index is determined based on the block confirmation depth and consensus rounds of the target layered blockchain, and the cross-domain propagation delay variance is determined based on the cross-layer transmission delay and network congestion.

[0061] In one optional embodiment, the federated learning performance metrics are obtained by dynamically scoring the model based on model convergence complexity, differential privacy loss function, distributed optimization efficiency, and model heterogeneity measure through a pre-built second metric analysis model. The model convergence complexity is determined based on the number of gradient descent iterations and the variance of model parameter updates during model training. The differential privacy loss function is determined based on the privacy budget parameters and relaxation parameters of federated learning. The distributed optimization efficiency is determined based on the parallel speedup ratio, communication overhead, computing resource utilization, and load imbalance. The model heterogeneity measure is determined based on the KL divergence of the feature distribution, the JS divergence of the label distribution, and the similarity of model parameters.

[0062] In one optional embodiment, the blockchain security dynamic index is obtained by dynamically scoring based on consensus security boundaries, smart contract risk coefficients, cross-chain asset security, and encryption algorithm strength through a pre-built third index analysis model. The consensus security boundary is determined based on the Byzantine fault tolerance threshold, equity dispersion, and voting weight entropy; the smart contract risk coefficient is determined based on code complexity cyclomatic complexity, reentrancy attack risk, state dependency depth, and resource consumption rate; the cross-chain asset security is determined based on locked option weight, multi-signature complexity, atomic swap success rate, and cross-chain verification depth; and the encryption algorithm strength is determined based on key length and algorithm time complexity.

[0063] In an optional embodiment, the system robustness combination index is obtained by dynamically scoring based on the adaptive fault tolerance coefficient, resource scheduling optimization degree, state consistency score, and performance scalability index through a pre-built fourth index analysis model. The adaptive fault tolerance coefficient is determined based on node fault detection time; the resource scheduling optimization degree is determined based on task queuing theory indicators, scheduling algorithm complexity, and system response time; the state consistency score is determined based on state machine replication latency, data synchronization cycle, conflict resolution time, and consistency check coverage; and the performance scalability index is determined based on linear expansion coefficient, resource utilization efficiency, system bottleneck identification rate, and horizontal scaling capability.

[0064] In one optional embodiment, the capability assessment module 12 includes: The capability scoring unit is used to perform a comprehensive scoring of multiple performance indicators through the comprehensive analysis model to obtain a federated learning capability score. A threshold comparison unit is used to compare and analyze the federated learning ability score with a preset comprehensive score threshold. The first capability determination unit is used to determine that the federated learning capability of the target hierarchical blockchain does not meet the preset performance requirements when the federated learning capability score is less than the comprehensive score threshold, and to take this as the federated learning capability evaluation result. The second capability determination unit is used to determine, when the federated learning capability score is not less than the comprehensive score threshold, whether the federated learning capability of the target hierarchical blockchain meets the preset performance requirements, and to use this as the federated learning capability evaluation result.

[0065] It should be noted that the working process of each module in the sidechain-based federated learning optimization device described in the embodiments of the present invention can refer to the working process of the sidechain-based federated learning optimization method described in the above embodiments, and the technical effect achieved is the same as that of the sidechain-based federated learning optimization method described in the above embodiments, so it will not be repeated here.

[0066] See Figure 3 , Figure 3This is a structural block diagram of a sidechain-based federated learning optimization device provided in an embodiment of the present invention. The sidechain-based federated learning optimization device includes a processor 21, a memory 22, and a computer program stored in the memory 22 and executable on the processor 21. When the processor 21 executes the computer program, it implements the steps in the various sidechain-based federated learning optimization method embodiments described above, such as steps S11 to S13.

[0067] For example, the computer program may be divided into one or more modules or units, which are stored in the memory 22 and executed by the processor 21 to complete the present invention. The one or more modules or units may be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program in the sidechain-based federated learning optimization device.

[0068] The sidechain-based federated learning optimization device may include, but is not limited to, a processor 21 and a memory 22. Those skilled in the art will understand that the schematic diagram is merely an example of a sidechain-based federated learning optimization device and does not constitute a limitation on the device. It may include more or fewer components than illustrated, or combine certain components, or use different components. For example, the sidechain-based federated learning optimization device may also include input / output devices, network access devices, buses, etc.

[0069] The processor 21 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor. The processor 21 is the control center of the sidechain-based federated learning optimization device, connecting various parts of the device via various interfaces and lines.

[0070] The memory 22 can be used to store the computer programs and / or modules. The processor 21 implements various functions of the sidechain-based federated learning optimization device by running or executing the computer programs and / or modules stored in the memory 22 and calling the data stored in the memory 22. The memory 22 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory 22 may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0071] Wherein, if the modules or units integrated by the sidechain-based federated learning optimization device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by the processor 21, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.

[0072] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.

[0073] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A sidechain-based federated learning optimization method, characterized in that, include: Multiple performance metrics of the target layered blockchain are collected; wherein, the performance metrics include: cross-layer network dynamic metrics, federated learning performance metrics, blockchain security dynamic metrics, and system robustness combined metrics; For multiple performance indicators, federated learning capability is evaluated using a pre-built comprehensive analysis model to obtain the federated learning capability evaluation result of the target hierarchical blockchain; If the federated learning capability assessment result indicates that the federated learning capability does not meet the preset performance requirements, a sidechain is constructed for the target hierarchical blockchain as an aggregation layer for federated learning; wherein, the sidechain is configured to store the credential data related to the local model update of each node participating in federated learning in the form of asynchronous snapshots.

2. The sidechain-based federated learning optimization method as described in claim 1, characterized in that, The cross-layer network dynamic index is obtained by dynamically scoring the inter-layer communication entropy, layer topology complexity, multi-dimensional consensus convergence index, and cross-domain propagation delay variance of the target layered blockchain through a pre-constructed first index analysis model. The inter-layer communication entropy value is determined based on the cross-layer data traffic of the target layered blockchain, the layered topology complexity is determined based on the degree distribution of nodes and the network layering structure in the target layered blockchain, the multi-dimensional consensus convergence index is determined based on the block confirmation depth and consensus rounds of the target layered blockchain, and the cross-domain propagation delay variance is determined based on the cross-layer transmission delay and network congestion.

3. The sidechain-based federated learning optimization method as described in claim 1, characterized in that, The federated learning performance metrics are obtained by dynamically scoring the model based on its convergence complexity, differential privacy loss function, distributed optimization efficiency, and model heterogeneity measure through a pre-built second metric analysis model. The model convergence complexity is determined based on the number of gradient descent iterations and the variance of model parameter updates during model training. The differential privacy loss function is determined based on the privacy budget parameters and relaxation parameters of federated learning. The distributed optimization efficiency is determined based on the parallel speedup ratio, communication overhead, computing resource utilization, and load imbalance. The model heterogeneity measure is determined based on the KL divergence of the feature distribution, the JS divergence of the label distribution, and the similarity of model parameters.

4. The sidechain-based federated learning optimization method as described in claim 1, characterized in that, The aforementioned blockchain security dynamic indicators are obtained by dynamically scoring based on consensus security boundaries, smart contract risk coefficients, cross-chain asset security, and encryption algorithm strength through a pre-built third indicator analysis model. The consensus security boundary is determined based on the Byzantine fault tolerance threshold, equity dispersion, and voting weight entropy; the smart contract risk coefficient is determined based on code complexity cyclomatic complexity, reentrancy attack risk, state dependency depth, and resource consumption rate; the cross-chain asset security is determined based on locked option weight, multi-signature complexity, atomic swap success rate, and cross-chain verification depth; and the encryption algorithm strength is determined based on key length and algorithm time complexity.

5. The sidechain-based federated learning optimization method as described in claim 1, characterized in that, The system robustness combination index is obtained by dynamically scoring based on the adaptive fault tolerance coefficient, resource scheduling optimization degree, state consistency score, and performance scalability index through a pre-built fourth index analysis model. The adaptive fault tolerance coefficient is determined based on node fault detection time; the resource scheduling optimization degree is determined based on task queuing theory indicators, scheduling algorithm complexity, and system response time; the state consistency score is determined based on state machine replication latency, data synchronization cycle, conflict resolution time, and consistency check coverage; and the performance scalability index is determined based on linear expansion coefficient, resource utilization efficiency, system bottleneck identification rate, and horizontal scaling capability.

6. The sidechain-based federated learning optimization method as described in claim 1, characterized in that, For multiple performance metrics, a pre-built comprehensive analysis model is used to evaluate the federated learning capability of the target hierarchical blockchain, resulting in an evaluation of its federated learning capability, including: Based on multiple performance indicators, a comprehensive score is obtained by using the comprehensive analysis model to score the indicators and thus obtain a federated learning capability score. The federated learning ability score is compared and analyzed with a preset comprehensive score threshold; If the federated learning ability score is less than the comprehensive score threshold, it is determined that the federated learning ability of the target hierarchical blockchain does not meet the preset performance requirements, and this is taken as the federated learning ability evaluation result. If the federated learning capability score is not less than the comprehensive score threshold, the federated learning capability of the target hierarchical blockchain is determined to meet the preset performance requirements, and this is taken as the federated learning capability evaluation result.

7. A sidechain-based federated learning optimization device, characterized in that, include: The data acquisition module is used to collect multiple performance indicators of the target layered blockchain; wherein, the performance indicators include: cross-layer network dynamic indicators, federated learning performance indicators, blockchain security dynamic indicators, and system robustness combination indicators. The capability assessment module is used to assess the federated learning capability of the target hierarchical blockchain by using a pre-built comprehensive analysis model to evaluate multiple performance indicators. A sidechain construction module is used to construct a sidechain for the target hierarchical blockchain as an aggregation layer for federated learning when the federated learning capability assessment result indicates that the federated learning capability does not meet the preset performance requirements; wherein, the sidechain is configured to store relevant data of local model updates of each node participating in federated learning in the form of asynchronous snapshots.

8. A sidechain-based federated learning optimization device, characterized in that, include: A processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements the sidechain-based federated learning optimization method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform the sidechain-based federated learning optimization method as described in any one of claims 1 to 6.

10. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by the processor, they implement the sidechain-based federated learning optimization method as described in any one of claims 1 to 6.