Internet federal learning data quality evaluation method and system based on block chain
By optimizing the smart contract configuration on the blockchain and dynamically balancing the data quality assessment results and execution costs of federated learning tasks, the problem of rigid smart contract rules is solved and the system's adaptability and evaluation efficiency are improved.
Patent Information
- Application Number
- CN202510955035.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-11
- Publication Date
- 2025-10-21
AI Technical Summary
In existing federated learning systems, the rigid configuration of smart contract rules makes it impossible to dynamically balance the cost of task execution and the guiding value of data quality assessment results, affecting the adaptability and sustainability of the system.
Optimize the configuration of smart contracts on the blockchain so that when receiving data to be evaluated, it can dynamically balance the guiding value of data quality assessment results for federated learning tasks and the execution cost, use machine learning models to predict cost reduction utility, and generate node behavior optimization guidance strategies.
It achieves dynamic adaptation to task changes in the federated learning system, improves evaluation efficiency and system sustainability, and improves the accuracy of data quality assessment and the efficiency of node behavior optimization.
Smart Images

Figure CN120821718A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of federated learning technology, and in particular to a blockchain-based Internet federated learning data quality assessment method and system. Background Art
[0002] In a federated learning system, participating nodes are distributed in the Internet environment, and the quality of their uploaded data directly affects the performance of the global model. Therefore, it is crucial to evaluate the quality of node data.
[0003] While existing evaluation strategies utilize smart contracts, they suffer from the drawback of rigid rule configuration. Due to the heterogeneous nature of federated learning tasks, the execution costs (e.g., the amount of resources required for data collection and data confidence verification) and the guiding value of data quality assessment results (e.g., the value of guiding the optimized execution of federated learning tasks, such as the degree to which data meets the data collection requirements of different federated learning tasks and the level of data confidence) vary across different periods. Smart contracts with fixed rule configurations cannot dynamically balance multiple factors, such as task execution costs and the guiding value of assessment results. This makes evaluation strategies difficult to adapt to the dynamic evolution of federated learning tasks, reducing evaluation effectiveness and impacting system sustainability.
[0004] Therefore, there is an urgent need for an optimization solution that can dynamically adapt to task changes. Summary of the Invention
[0005] One of the purposes of the present invention is to provide a blockchain-based Internet federated learning data quality assessment method to solve the problems in the background technology.
[0006] The blockchain-based Internet federated learning data quality assessment method provided by the embodiment of the present invention includes: Optimize the configuration of smart contracts on the blockchain with the closest configuration conditions as the optimization goal; When the blockchain receives data to be evaluated uploaded by any federated learning node on the Internet, it triggers the smart contract to perform quality assessment of the data to be evaluated; The configuration conditions include: For each federated learning task within a preset time in the future, the optimal balance is achieved between the guiding value of the federated learning task and the execution cost of the federated learning task by using the configured smart contract to perform data quality assessment.
[0007] Optionally, the step of quantifying the guiding value of the result of the data quality assessment using the configured smart contract to the federated learning task includes: The result of data quality assessment using the configured smart contract is used as the first evaluation result under each first indicator in the preset guiding value evaluation indicator set corresponding to the federated learning task as the guiding value.
[0008] Optionally, the step of quantifying the execution cost of the federated learning task includes: The second evaluation result of the federated learning task under each second indicator in the preset execution cost evaluation indicator set is used as the execution cost.
[0009] Optionally, achieving an optimal balance between the guiding value of the result of the data quality assessment using the configured smart contract for the federated learning task and the execution cost of the federated learning task includes: The overlap between the preset upper and lower threshold intervals corresponding to the execution order of the federated learning task and the utility upper and lower limit intervals of the predicted guidance value that can reduce the execution cost is equal to the preset overlap threshold corresponding to the execution order; among them, the earlier the execution order, the larger the corresponding upper and lower threshold intervals, the larger the boundary value of the corresponding upper and lower threshold intervals, and the larger the corresponding overlap threshold.
[0010] Optionally, the step of predicting the upper and lower limits of the utility of the guiding value capable of reducing the execution cost includes: Based on the pre-trained cost reduction utility prediction model, the utility upper limit and utility lower limit of the execution cost can be predicted by the guidance value; Based on the utility upper limit and utility lower limit, construct the utility upper and lower limit intervals; The pre-training steps of the cost reduction utility prediction model include: A large number of historical guidance values and historical execution costs of annotated utility lower limit labels and utility upper limit labels are used as training samples for machine learning training to obtain a cost reduction utility prediction model.
[0011] Optionally, when the blockchain receives the data to be evaluated uploaded by any federated learning node on the Internet, after triggering the smart contract to perform the quality evaluation of the data to be evaluated, the process further includes: When it is detected that the same federated learning node has multiple quality defects in the results of multiple consecutive rounds of quality assessment, the node behavior of the federated learning node will be optimized based on the smart contract and the quality defects. For the new data to be evaluated uploaded by the federated learning node after receiving the node behavior optimization guidance, a new round of quality evaluation is triggered to verify the effectiveness of the guidance.
[0012] Optionally, based on the smart contract, the node behavior optimization guidance of the federated learning node is performed according to each quality defect, including: For each quality defect, predict the natural repair ability of the quality defect in the next N rounds of optimizing the smart contract configuration; where N is a positive integer; for quality defects whose natural repair ability is lower than the preset threshold, sort them according to their respective natural repair abilities from small to large to obtain a quality defect sequence; Taking the closest division condition as the optimization goal, the quality defect sequence is divided into multiple target local sequences; For each target local sequence, determine the data quality assessment rule set corresponding to the target local sequence from the smart contract, and generate the node behavior optimization guidance strategy corresponding to the target local sequence based on the data quality assessment rule set; According to the order of each target local sequence in the quality defect sequence, the corresponding node behavior optimization guidance strategy is executed on the federated learning node in turn; The division conditions include: When the quality defects contained in the same target local sequence are not unique, the multiple quality defects contained therein are consecutively adjacent in the quality defect sequence, and any two quality defects contained therein have the same preset joint optimization guidance value relationship; Each quality defect in the quality defect sequence is included in a different target local sequence.
[0013] Optionally, the prediction of the natural repair capability of the quality defect in the next N rounds of optimizing the smart contract configuration includes: Analyze the frequency of non-recurrence of the quality defect during the next N rounds of smart contract optimization and configuration, when the newly configured smart contract performs quality assessment on the data to be assessed that has the quality defect; Count the frequency with which the quality defect falls within the preset problem tolerance range corresponding to the federated learning tasks executed in the next N rounds of optimizing the smart contract configuration; The weighted calculation result of the non-recurrence frequency and the compliance frequency is used as the natural restoration capacity; the calculation formula is: ,in, For natural repair ability, The frequency of non-recurrence, is the preset first weight corresponding to the non-recurrence frequency, To meet the frequency, It is the preset second weight corresponding to the frequency.
[0014] Optionally, generating a node behavior optimization guidance strategy corresponding to the target local sequence based on the data quality assessment rule set includes: Based on the preset strategy generation template corresponding to the data quality assessment rule set, a node behavior optimization guidance strategy corresponding to the target local sequence is generated.
[0015] The blockchain-based Internet federated learning data quality assessment system provided by the embodiment of the present invention includes: Smart contract configuration module, which is used to optimize the configuration of smart contracts on the blockchain with the closest configuration conditions as the optimization goal; The data quality assessment module is used to trigger the smart contract to perform quality assessment of the data to be evaluated when the blockchain receives the data to be evaluated uploaded by any federated learning node on the Internet; The configuration conditions include: For each federated learning task within a preset time in the future, the optimal balance is achieved between the guiding value of the federated learning task and the execution cost of the federated learning task by using the configured smart contract to perform data quality assessment.
[0016] The present invention has achieved the following beneficial effects: The results of data quality assessment using the configured smart contract are set as configuration conditions to achieve the optimal balance between the guiding value of the federated learning task and the execution cost of the federated learning task. The optimization target is the closest to this condition, and the smart contract is optimized on the blockchain. The optimized smart contract is used to perform quality assessment on the data to be evaluated uploaded by the federated learning node. This allows the evaluation process to dynamically weigh multi-dimensional factors such as the task execution cost and the guiding value of the evaluation results, and can adapt to the dynamic evolution of the federated learning task, thereby significantly improving the system evaluation efficiency and sustainability.
[0017] Other features and advantages of the present invention will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description and the accompanying drawings.
[0018] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings: Figure 1 Schematic diagram of a blockchain-based Internet federated learning data quality assessment method in an embodiment of the present invention; Figure 2 Schematic diagram of a blockchain-based Internet federated learning data quality assessment system in an embodiment of the present invention; Figure 3 The figure is a schematic diagram of the workflow of the blockchain-based Internet federated learning data quality assessment system in an embodiment of the present invention. DETAILED DESCRIPTION
[0020] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention. Example 1
[0021] The embodiment of the present invention provides a blockchain-based Internet federated learning data quality assessment method, such as Figure 1 Shown, including: S1. Optimize the configuration of smart contracts on the blockchain, with the goal of achieving the closest match to the configuration conditions. During the configuration process, select rules from the pre-set data quality assessment rules. These rules are used to assess data quality. Different rules have different quality assessment dimensions. The selected rules are combined to form a smart contract that best matches the configuration conditions.
[0022] S2. When the blockchain receives data to be evaluated from any federated learning node on the internet, it triggers the smart contract to perform a quality assessment on the data. The data to be evaluated includes at least: the node's local model training data and model output results.
[0023] The configuration conditions include: For each federated learning task within a preset timeframe, the data quality assessment results from the configured smart contract are used to achieve an optimal balance between the guiding value of the federated learning task and the execution cost of the federated learning task. The preset timeframe can be flexibly set in advance as needed. For example, if the system is expected to take more into account, a longer preset timeframe can be set. The steps for quantifying the guiding value include: S211. The data quality assessment results from the configured smart contract are used as the first evaluation results for each first indicator in the pre-set guiding value evaluation indicator set corresponding to the federated learning task. The first indicators include at least the degree to which the data meets the data collection requirements of the respective federated learning tasks and the data confidence level. Each first indicator is pre-set with an evaluation method to complete the corresponding evaluation process. For example, the degree of conformity can be directly analyzed to determine the degree to which the data meets the data collection requirements. For another example, the data confidence level can be determined by pre-setting a confidence table containing data from different sources and types, and querying the table to determine the confidence level.
[0024] The steps to quantify execution costs include: S221. The second evaluation result of the federated learning task under each second indicator in the preset execution cost evaluation indicator set is used as the execution cost. The second indicators include at least the amount of resources required for data collection and the amount of resources required for data confidence verification. Each second indicator is pre-set with an evaluation method to complete the corresponding evaluation process. For example, for the amount of resources required for data collection, a resource table containing system resource consumption amounts for different data collection requirements can be pre-set. The resource cost can be obtained by querying the table based on the data collection requirements of the federated learning task. For another example, for the amount of resources required for data confidence verification, a resource table containing system resource consumption amounts for different data confidence verification methods can be pre-set. The resource cost can be obtained by querying the table based on the data confidence verification method corresponding to the data collected during the execution of the federated learning task.
[0025] Achieving an optimal balance between guidance value and execution costs, including: S231. The overlap between the preset upper and lower threshold intervals corresponding to the execution order of the federated learning task and the predicted upper and lower bounds of the utility of the guidance value that can reduce execution cost is equal to the preset overlap threshold corresponding to the execution order. The higher the execution order, the larger the corresponding upper and lower threshold intervals, the larger the boundary value of the corresponding upper and lower threshold intervals, and the larger the corresponding overlap threshold. Guidance value may have the effect of reducing execution cost. For example, guidance value is the degree to which data meets the data collection requirements of different federated learning tasks, and execution cost is the amount of resources required for data collection. That is, the greater the degree of compliance, the more data the federated learning node provides when executing the federated learning task, and the less data the system needs to collect on its own, thereby reducing execution cost. The predicted upper and lower bounds of the utility represent the upper and lower bounds of the utility of the guidance value that may reduce execution cost. The higher the execution order, the higher the priority of the corresponding federated learning task, and the greater the need for its execution cost to be reduced due to the guidance value, which results in a larger corresponding upper and lower threshold interval, a larger boundary value of the corresponding upper and lower threshold intervals, and a larger corresponding overlap threshold. The upper and lower threshold intervals and the overlap threshold can be flexibly set in advance as needed. For example, if you want the system to focus on the first two federated learning tasks to be executed in the future, then set the upper and lower threshold intervals, the boundary values of the upper and lower threshold intervals, and the overlap threshold of these two federated learning tasks to be significantly larger than those of other federated learning tasks.
[0026] In the embodiment of the present invention, the result of data quality assessment using the configured smart contract is set as a configuration condition to achieve the optimal balance between the guiding value of the federated learning task and the execution cost of the federated learning task, and the optimization target is the closest to this condition. The smart contract is optimized on the blockchain, and the quality of the data to be evaluated uploaded by the federated learning node is evaluated using the optimized smart contract. This allows the evaluation process to dynamically weigh multi-dimensional factors such as the task execution cost and the guiding value of the evaluation results, and can adapt to the dynamic evolution of the federated learning task, thereby significantly improving the system evaluation efficiency and sustainability.
[0027] The introduction of a set of guidance value evaluation indicators and an execution cost evaluation indicator set effectively improves the accuracy of guidance value and execution cost quantification. Following the correlation that the higher the execution order, the larger the corresponding upper and lower threshold intervals, the larger the boundary value of the upper and lower threshold intervals, and the larger the corresponding overlap threshold, the corresponding upper and lower threshold intervals and overlap thresholds are set according to the execution order of federated learning tasks. This ensures that the higher the priority of the execution task, the higher the requirement for balancing guidance value and execution cost. This prioritizes these key tasks in the optimization configuration of smart contracts, significantly improving the applicability of the configured smart contracts. Example 2
[0028] Based on Example 1, in this embodiment of the present invention, the step of predicting the upper and lower limits of the utility of the guidance value that can reduce the execution cost includes: Based on the pre-trained cost reduction utility prediction model, the utility upper limit and utility lower limit of the execution cost can be predicted by the guidance value; Based on the utility upper limit and utility lower limit, construct the utility upper and lower limit intervals; The pre-training steps of the cost reduction utility prediction model include: Machine learning training utilizes a large number of historical guidance values and historical execution costs labeled with lower and upper utility limits as training samples to develop a cost-reduction utility prediction model. The historical guidance values of various data quality assessment results, as well as the historical execution costs of various federated learning tasks, are collected in advance. The historical guidance values and historical execution costs are then paired. Experts analyze the minimum utility level (e.g., the minimum percentage cost reduction) and maximum utility level (e.g., the maximum percentage cost reduction) at which the historical guidance value can reduce the historical execution cost in each pairing. The minimum utility level is used as the lower utility limit label, and the maximum utility level as the upper utility limit label. The corresponding historical guidance values and historical execution costs are labeled to generate training samples. Machine learning training is performed using these training samples, enabling the trained cost-reduction utility prediction model to predict the upper and lower utility limits at which the guidance value can reduce the execution cost. During use, the guidance value and execution cost are input into the cost reduction utility prediction model. The model outputs the utility upper and lower bounds, with the upper bound serving as the right boundary and the lower bound serving as the left boundary, to construct the upper and lower bound intervals. Training begins by setting up a machine learning training environment, using Python version 3.10 and scikit-learn version 1.4.0 (a widely used library for regression tasks). Using Anaconda to manage virtual environments and VS Code as development tools, a model architecture based on random forest regression (due to its expertise in interval prediction) is selected for training. Using the obtained training samples, the guidance value and execution cost are used as input features, and the lower and upper bounds are used as output labels to train the model parameters. During training, 10-fold cross-validation is used to optimize hyperparameters to ensure the model's ability to predict the upper and lower bounds of utility when the guidance value reduces the execution cost. After training is complete, the optimal model parameter file is exported.
[0029] The embodiment of the present invention is based on a pre-trained cost-reduction utility prediction model to predict the utility upper and lower limits of the execution cost that the guiding value can reduce, and then constructs the utility upper and lower limit intervals based on the upper and lower limits. This improves the accuracy, comprehensiveness and efficiency of the utility upper and lower limit interval construction, and improves its applicability for use in configuration condition settings, thereby improving the optimization configuration effect of optimizing smart contracts on the blockchain. Example 3
[0030] Based on Example 1, in this embodiment of the present invention, after the step S2, when the blockchain receives the data to be evaluated uploaded by any federated learning node on the Internet, triggering the smart contract to perform the quality evaluation of the data to be evaluated, further includes: S3. When it is detected that the same federated learning node has the same multiple quality defects in the results of multiple consecutive rounds of quality assessment, based on the smart contract, the node behavior optimization guidance of the federated learning node is carried out according to each quality defect. The continuous multiple rounds of quality assessment refer to the process in which the same federated learning node uploads data multiple times in a row, and the system also performs quality assessment on its uploaded data multiple times accordingly, that is, each assessment is a round. Quality defects include at least: insufficient compliance of data with the respective data collection requirements of different federated learning tasks, insufficient data confidence, etc. When the same federated learning node has the same multiple quality defects in the results of multiple consecutive rounds of quality assessment, it means that the behavior of the federated learning node in providing data needs to be optimized, and its node behavior optimization guidance is carried out. S3 includes: S31. For each quality defect, predict the natural repair capability of the quality defect within the next N rounds of optimizing the smart contract configuration; where N is a positive integer. The interval between each round of optimizing the smart contract configuration can be pre-set as needed. It can also be set so that a new round of optimizing the smart contract configuration is performed when a federated learning task changes within a preset time period (typically, a new federated task is executed or a federated learning task is completed). N can be pre-set as needed. For example, the greater the degree to which the system is expected to optimize the behavior of federated learning nodes, the smaller N can be set. This increases the probability that the natural repair capability will fall below a preset threshold, allowing the system to optimize node behavior based on more quality defects.
[0031] S32. For quality defects whose natural repair capabilities are lower than a preset threshold, sort them in ascending order based on their respective natural repair capabilities to obtain a quality defect sequence. The preset threshold can be set in advance as needed. For example, the higher the degree to which the system is expected to optimize the behavior of federated learning nodes, the higher the preset threshold is set, thereby increasing the probability that the natural repair capabilities are lower than the preset threshold, allowing the system to optimize the behavior of more quality defects.
[0032] S33. Taking the closest division condition as the optimization target, the quality defect sequence is optimized and divided into multiple target local sequences. The division conditions include: when the quality defects contained in the same target local sequence are not unique, the multiple quality defects contained therein are continuously adjacent in the quality defect sequence, and there is the same preset joint optimization guidance value relationship between any two quality defects contained therein; each quality defect in the quality defect sequence is contained in different target local sequences. Pre-analyze whether there is joint optimization guidance value between two different quality defects. This value refers to the value of additional guidance effect that can be generated when the two quality defects are used as a basis for optimizing the node behavior of the federated learning node. For example, if the two quality defects are insufficient compliance with the data collection requirements of different federated learning tasks and insufficient data confidence, indicating that the corresponding federated learning result behavior performance is poor, then when the two quality defects are used as a basis for optimizing the node behavior of the federated learning node, it can be guided to switch tasks or migrate to other federated task groups, automatically downgrade or suspend its participation, and prevent low-quality data from contaminating the global model, that is, generate the value of additional guidance effect such as preventing low-quality data from contaminating the global model. For another example, two quality defects are insufficient compliance of the data with the data collection requirements of different federated learning tasks and large differences between the output results of the node local model and the global model output results. This indicates that the root cause of the two quality defects is that the federated learning node does not have enough understanding of the training objectives of the global model. When these two quality defects are used as a basis to optimize the node behavior of the federated learning node, it can be guided to understand the training objectives of the global model, that is, to generate a guidance method to solve multiple quality defects, such as the value of an additional guidance effect; when the joint optimization guidance value is analyzed, a joint optimization guidance value relationship is set between the corresponding two quality defects.
[0033] S34. For each target local sequence, determine the data quality assessment rule set corresponding to the target local sequence from the smart contract, and generate a node behavior optimization guidance strategy corresponding to the target local sequence based on the data quality assessment rule set. The data quality assessment rule set corresponding to the target local sequence includes data quality assessment rules used to derive different quality defects in the target local sequence. S33 includes: S341. Based on a preset policy generation template corresponding to the data quality assessment rule set, generate a node behavior optimization guidance policy corresponding to the target local sequence. Policy generation templates are pre-set for different data quality assessment rule sets. The policy generation template is a template for generating a policy for optimizing the behavior of federated learning nodes based on different quality defects in the target local sequence. For example, if the target local sequence contains two quality defects, namely, insufficient data conformance to the data collection requirements of different federated learning tasks and a significant difference between the node local model output and the global model output, the policy generation template is set to generate a policy for guiding the federated learning node to understand the training objectives of the global model.
[0034] S35. Execute the corresponding node behavior optimization guidance strategy for each federated learning node in the order of the target local sequences in the quality defect sequence. The higher the order of the target local sequence in the quality defect sequence, the lower the natural repair capability of the quality defects contained therein, and the higher the priority for executing the corresponding node behavior optimization guidance strategy.
[0035] S4. A new round of quality assessment is triggered for the newly uploaded data to be evaluated by the federated learning node after receiving the node behavior optimization guidance to verify the effectiveness of the guidance. After receiving the node behavior optimization guidance, the federated learning node uploads the new data to be evaluated and performs another quality assessment using the smart contract. The effectiveness of the guidance is verified based on whether the new assessment results contain the same quality defects that occurred historically.
[0036] When an embodiment of the present invention detects that the same federated learning node has the same multiple quality defects in the results of multiple consecutive rounds of quality assessment, it promptly performs node behavior optimization guidance on the corresponding federated learning node, and triggers a new round of quality assessment for the new data to be assessed uploaded by the federated learning node after receiving the node behavior optimization guidance to verify the effectiveness of the guidance, significantly improving the efficiency gain of the data quality assessment mechanism for the federated learning system.
[0037] For each quality defect, the natural repair capability of the quality defect in the next N rounds of optimizing the configuration of smart contracts is predicted. If the natural repair capability is not lower than the preset threshold, the corresponding quality defect will not be used as the basis for optimizing the node behavior of the federated learning node, thus avoiding misguidance of the node, reducing the system's guidance resource usage, and improving guidance efficiency.
[0038] The division conditions are set by including the same preset joint optimization guidance value relationship between any two quality defects, and the optimization target is the closest to the division condition. The quality defect sequence is optimized and divided into multiple target local sequences. The corresponding node behavior optimization guidance strategy is generated based on the target local sequence, which improves the fusion ability of the node behavior optimization guidance strategy generation, reduces the system's strategy generation resources, and improves the strategy generation efficiency.
[0039] According to the order of each target local sequence in the quality defect sequence, the corresponding node behavior optimization guidance strategy is executed on the federated learning node in turn, ensuring that the node behavior optimization guidance strategy corresponding to the quality defect that needs to be considered more is executed first, thereby improving the guidance effect of node behavior optimization guidance on the federated learning node. Example 4
[0040] Based on Example 3, in this embodiment of the present invention, in S31, predicting the natural repair capability of the quality defect in the next N rounds of optimizing the configuration of the smart contract includes: S311. Analyze the frequency of non-recurrence of the quality defect during N future rounds of optimized smart contract configuration, when the newly configured smart contract performs quality assessment on the data to be assessed that exhibits the quality defect. Multiple smart contracts for the next N future rounds of optimized configuration can be identified, and these contracts can be used to re-evaluate the data to be assessed that exhibits the quality defect, obtaining multiple assessment results. The non-recurrence frequency is calculated as the ratio of the number of times the quality defect does not appear in these assessment results (i.e., the number of assessment results that do not exhibit the quality defect) to the total number of these assessment results.
[0041] S312. Count the frequency with which the quality defect meets the preset problem tolerance range for the federated learning tasks executed during the next N rounds of optimizing the smart contract configuration. The federated learning tasks to be executed during the next N rounds of optimizing the smart contract configuration can be determined in advance. These tasks are pre-set with a problem tolerance range. This range refers to the range of problems (which are allowable) that may arise due to the federated learning nodes providing relevant data focused solely on the task objectives of a single federated learning task. For example, if the federated learning task aims to improve the accuracy of disease risk prediction for the global model, its problem tolerance range is the quality defect of providing a single type of data, and the data provided is historical disease risk data. The compliance frequency is calculated as the ratio of the number of times the quality defect meets the different problem tolerance ranges (i.e., the number of times it falls within the problem tolerance range) to the total number of different problem tolerance ranges.
[0042] S313. The weighted calculation result of the non-recurrence frequency and the compliance frequency is used as the natural restoration capacity; wherein the calculation formula is: ,in, For natural repair ability, The frequency of non-recurrence, is the preset first weight corresponding to the non-recurrence frequency, To meet the frequency, The second weight is the preset value corresponding to the compliance frequency. A higher non-reproduction frequency indicates a higher probability of future quality defects not occurring, and a higher natural repair capability. Therefore, there is a positive correlation between the non-reproduction frequency and the natural repair capability. A higher compliance frequency indicates a higher probability of future quality defects being utilized in other federated learning tasks, and a higher natural repair capability. Therefore, there is a positive correlation between the compliance frequency and the natural repair capability. The first and second weights can be set as needed. For example, if you want the system to place greater emphasis on the non-reproduction frequency when predicting natural repair capability, set the first weight to be greater than the second weight.
[0043] The embodiment of the present invention analyzes the frequency of non-recurrence of the quality defect when the newly configured smart contract performs quality assessment on the data to be evaluated in which the quality defect occurs in the process of optimizing the configuration of the smart contract in the future N rounds, and counts the frequency of compliance of the quality defect with the preset problem tolerance range corresponding to the federated learning task executed in the process of optimizing the configuration of the smart contract in the future N rounds. The weighted calculation result of the non-recurrence frequency and the compliance frequency is used as the natural repair capability, so as to achieve the comprehensive determination of the natural repair capability from both the future recurrence degree and the future fault tolerance degree, thereby improving the accuracy, comprehensiveness and applicability of the natural repair capability prediction, and improving its ability to be used for screening quality defects that need to be used as a basis for guiding the node behavior optimization of the federated learning nodes. Example 5
[0044] The embodiment of the present invention provides a blockchain-based Internet federated learning data quality assessment system. Figure 2 and Figure 3 Shown, including: Smart contract configuration module 1 is used to optimize the configuration of smart contracts on the blockchain with the closest configuration conditions as the optimization target; Data quality assessment module 2 is used to trigger the smart contract to perform quality assessment of the data to be assessed when the blockchain receives the data to be assessed uploaded by any federated learning node on the Internet; The configuration conditions include: For each federated learning task within a preset time in the future, the optimal balance is achieved between the guiding value of the federated learning task and the execution cost of the federated learning task by using the configured smart contract to perform data quality assessment.
[0045] Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if such changes and modifications fall within the scope of the claims and their equivalents, the present invention is intended to include such changes and modifications.
Claims
1. A blockchain-based Internet federated learning data quality assessment method, characterized by: include: Optimize the configuration of smart contracts on the blockchain with the closest configuration conditions as the optimization goal; When the blockchain receives data to be evaluated uploaded by any federated learning node on the Internet, it triggers the smart contract to perform quality assessment of the data to be evaluated; The configuration conditions include: For each federated learning task within a preset time in the future, the optimal balance is achieved between the guiding value of the federated learning task and the execution cost of the federated learning task by using the configured smart contract to perform data quality assessment.
2. The blockchain-based Internet federated learning data quality assessment method according to claim 1, characterized in that: The steps for quantifying the guiding value of the results of the data quality assessment using the configured smart contract to the federated learning task include: The result of data quality assessment using the configured smart contract is used as the first evaluation result under each first indicator in the preset guiding value evaluation indicator set corresponding to the federated learning task as the guiding value.
3. The blockchain-based Internet federated learning data quality assessment method according to claim 1, characterized in that: The steps for quantifying the execution cost of the federated learning task include: The second evaluation result of the federated learning task under each second indicator in the preset execution cost evaluation indicator set is used as the execution cost.
4. The blockchain-based Internet federated learning data quality assessment method according to claim 1, characterized in that: The result of the data quality assessment using the configured smart contract achieves an optimal balance between the guiding value of the federated learning task and the execution cost of the federated learning task, including: The overlap between the preset upper and lower threshold intervals corresponding to the execution order of the federated learning task and the utility upper and lower limit intervals of the predicted guidance value that can reduce the execution cost is equal to the preset overlap threshold corresponding to the execution order; among them, the earlier the execution order, the larger the corresponding upper and lower threshold intervals, the larger the boundary value of the corresponding upper and lower threshold intervals, and the larger the corresponding overlap threshold.
5. The blockchain-based Internet federated learning data quality assessment method according to claim 4, characterized in that: The steps of predicting the upper and lower limits of the utility range within which the guiding value can reduce the execution cost include: Based on the pre-trained cost reduction utility prediction model, the utility upper limit and utility lower limit of the execution cost can be predicted by the guidance value; Based on the utility upper limit and utility lower limit, construct the utility upper and lower limit intervals; The pre-training steps of the cost reduction utility prediction model include: A large number of historical guidance values and historical execution costs of annotated utility lower limit labels and utility upper limit labels are used as training samples for machine learning training to obtain a cost reduction utility prediction model.
6. The blockchain-based Internet federated learning data quality assessment method according to claim 1, characterized in that: When the blockchain receives the data to be evaluated uploaded by any federated learning node on the Internet, after triggering the smart contract to perform the quality evaluation of the data to be evaluated, it also includes: When it is detected that the same federated learning node has multiple quality defects in the results of multiple consecutive rounds of quality assessment, the node behavior of the federated learning node will be optimized based on the smart contract and the quality defects. For the new data to be evaluated uploaded by the federated learning node after receiving the node behavior optimization guidance, a new round of quality evaluation is triggered to verify the effectiveness of the guidance.
7. The blockchain-based Internet federated learning data quality assessment method according to claim 6, characterized in that: Based on the smart contract, the federated learning node is guided to optimize its behavior according to various quality defects, including: For each quality defect, predict the natural repair ability of the quality defect in the next N rounds of optimizing the smart contract configuration; where N is a positive integer; for quality defects whose natural repair ability is lower than the preset threshold, sort them according to their respective natural repair abilities from small to large to obtain a quality defect sequence; Taking the closest division condition as the optimization goal, the quality defect sequence is divided into multiple target local sequences; For each target local sequence, determine the data quality assessment rule set corresponding to the target local sequence from the smart contract, and generate the node behavior optimization guidance strategy corresponding to the target local sequence based on the data quality assessment rule set; According to the order of each target local sequence in the quality defect sequence, the corresponding node behavior optimization guidance strategy is executed on the federated learning node in turn; The division conditions include: When the quality defects contained in the same target local sequence are not unique, the multiple quality defects contained therein are consecutively adjacent in the quality defect sequence, and any two quality defects contained therein have the same preset joint optimization guidance value relationship; Each quality defect in the quality defect sequence is included in a different target local sequence.
8. The blockchain-based Internet federated learning data quality assessment method according to claim 7, characterized in that: The ability to predict the natural repair of the quality defect in the next N rounds of optimizing the configuration of the smart contract includes: Analyze the frequency of non-recurrence of the quality defect during the next N rounds of smart contract optimization and configuration, when the newly configured smart contract performs quality assessment on the data to be assessed that has the quality defect; Count the frequency with which the quality defect falls within the preset problem tolerance range corresponding to the federated learning tasks executed in the next N rounds of optimizing the smart contract configuration; The weighted calculation result of the non-recurrence frequency and the compliance frequency is used as the natural restoration capacity; the calculation formula is: ,in, For natural repair ability, The frequency of non-recurrence, is the preset first weight corresponding to the non-recurrence frequency, To meet the frequency, It is the preset second weight corresponding to the frequency.
9. The blockchain-based Internet federated learning data quality assessment method according to claim 7, characterized in that: The step of generating a node behavior optimization guidance strategy corresponding to the target local sequence based on the data quality assessment rule set includes: Based on the preset strategy generation template corresponding to the data quality assessment rule set, a node behavior optimization guidance strategy corresponding to the target local sequence is generated.
10. A blockchain-based Internet federated learning data quality assessment system, characterized by: include: Smart contract configuration module, which is used to optimize the configuration of smart contracts on the blockchain with the closest configuration conditions as the optimization goal; The data quality assessment module is used to trigger the smart contract to perform quality assessment of the data to be evaluated when the blockchain receives the data to be evaluated uploaded by any federated learning node on the Internet; The configuration conditions include: For each federated learning task within a preset time in the future, the optimal balance is achieved between the guiding value of the federated learning task and the execution cost of the federated learning task by using the configured smart contract to perform data quality assessment.