A federated learning edge model aggregation negotiation method and device, equipment and medium

By performing multi-dimensional verification and contract binding in edge federated learning, the inconsistency problem of model aggregation caused by edge node state changes is solved, and the standardization and reliability of model aggregation are improved.

CN123034973APending Publication Date: 2026-11-03GUANGZHOU POWER SUPPLY BUREAU GUANGDONG POWER GRID CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611064464.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-17
Publication Date
2026-11-03

AI Technical Summary

Technical Problem

Existing technologies lack a pre-aggregation constraint mechanism in edge federated learning that can be jointly confirmed by all participating nodes, resulting in poor standardization and reliability of the model aggregation process and an inability to adapt to real-time changes in the state of edge nodes.

Method used

The edge negotiation node issues negotiation tasks to the edge training node, performs multi-dimensional verification to screen candidate nodes, and sends an aggregation contract to be confirmed. After the preset contract locking conditions are met, a locking contract identifier is generated to ensure that the model update binding of the participating nodes is performed and the edge model aggregation is carried out.

Benefits of technology

It improves the standardization and data validity of the aggregation process in the edge federation model, enhances the overall execution reliability, and avoids inconsistency issues caused by changes in node state.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123034973A_ABST
    Figure CN123034973A_ABST
Patent Text Reader

Abstract

The application discloses an edge model aggregation negotiation method of federated learning, comprising the following steps: an edge negotiation node issues a negotiation task to a plurality of edge training nodes, and receives a feedback negotiation offer message; the negotiation offer message is checked, and the nodes passing the check are added to a candidate node set; a target edge training node is screened out, a to-be-confirmed aggregation contract is sent to each node, and a confirmation share returned by the node is received; when the confirmation share meets a contract locking condition, the to-be-confirmed aggregation contract is determined as a locked aggregation contract, and a locked contract identifier is issued to each target edge training node, so that each node returns a generated contract binding model update to the edge negotiation node; and the edge model aggregation is further performed based on the contract binding model, and a global update model is obtained. The application can guarantee that all data sources participating in aggregation are subjected to pre-checking and contract consensus, and can improve the standardization, data legality and overall execution reliability of the edge federated model aggregation process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of federated learning technology, and in particular to a method, apparatus, device, and medium for edge model aggregation negotiation in federated learning. Background Technology

[0002] Federated learning is a distributed collaborative modeling machine learning technique that ensures that the original data of each participant does not leave the domain locally. The conventional execution process is that the coordinating node distributes the global model to each training node, each node completes model training based on local samples and then sends back the local model update. The coordinating node then aggregates all local model updates to iteratively generate a new global model. With the development of edge computing, federated learning has been gradually applied to edge training scenarios. In this scenario, multiple edge training nodes are distributed in different network locations with different data distributions, computing capabilities, link latency, online time windows, and model version statuses. Therefore, the model aggregation process of edge federated learning not only needs to consider the model update itself, but also the participation of participating nodes in the current aggregation round, model version consistency, data distribution differences, and the timeliness of model update uploads.

[0003] Existing technologies have attempted to improve the credibility of federated learning processes through blockchain, smart contracts, or trusted execution environments. However, these solutions only focus on preventing tampering of training results and ensuring process credibility, failing to address the pain point of aggregation consistency caused by real-time changes in the state of edge nodes. The network connectivity status, available training periods, local model version, training progress, and data distribution characteristics of edge training nodes can all dynamically change within a single aggregation negotiation cycle. Existing technologies lack a pre-aggregation constraint mechanism that can be jointly confirmed and locked by all participating nodes. When coordinating nodes execute aggregation operations, they often receive local model updates that do not match the previously negotiated and agreed-upon states, resulting in poor standardization of the model aggregation process, data legality, and overall execution reliability. Summary of the Invention

[0004] This invention provides a method for edge model aggregation negotiation in federated learning, which can ensure that all data sources participating in the aggregation have undergone prior verification and contract consensus, thereby improving the standardization, data legality, and overall execution reliability of the edge federated model aggregation process.

[0005] In a first aspect, embodiments of the present invention provide a method for aggregation negotiation of edge models in federated learning, comprising: The edge negotiation node issues the negotiation task for the current aggregation round to multiple edge training nodes and receives negotiation offer messages from each edge training node; wherein, the negotiation offer message is a message generated by the edge training node based on the negotiation task and used to apply to participate in the current aggregation round. The negotiation offer message is validated in multiple dimensions, and the edge training nodes that pass the validation are added to the candidate node set as candidate nodes. Select target edge training nodes from the candidate node set, send the unconfirmed aggregation contract to each target edge training node, and receive the confirmation share returned by each target edge training node. When the confirmed share meets the preset contract locking conditions, the aggregate contract to be confirmed is determined as the locked aggregate contract, and the locked contract identifier is sent to each target edge training node so that each target edge training node binds the locked contract identifier with the local model update, generates a contract-bound model update, and sends the contract-bound model update back to the edge negotiation node. Based on the received contract binding model update, edge model aggregation is performed to obtain the global update model for the current aggregation round.

[0006] Furthermore, the negotiation task includes at least the current global model, the current global model version number, the negotiation round identifier, the negotiation time limit, the commitment value generation rule, and the aggregation contract template. The negotiation offer message includes at least the local data distribution description, the local training status description, the local training model version number, the negotiation commitment value, the node identity signature, and the node's participation time window.

[0007] Further, the step of selecting target edge training nodes from the candidate node set and sending unconfirmed aggregation contracts to each target edge training node includes: Based on the local data distribution description, node participation time window, current global model version number, local training model version number, and local training state description of each candidate node in the candidate node set, a distribution conflict matrix, a latency hierarchy table, and a version span table are generated; wherein, the latency hierarchy table is used to characterize the aggregateable arrival time of each candidate node, and the version span table is used to characterize the degree of version difference of each candidate node. Based on the distribution conflict matrix, the latency hierarchy table, and the version span table, the list of target edge training nodes participating in this round of aggregation, aggregation grouping, node aggregation weight, version compensation parameters, and contract validity time window are determined, and an aggregation contract to be confirmed is generated. Send the unconfirmed aggregation contract to each target edge training node.

[0008] Furthermore, the local data distribution description includes a label count vector, a feature bin count vector, and a sample time window identifier, and the steps for constructing the distribution conflict matrix include: Calculate the normalized difference of label count, the normalized difference of feature bin count, and the normalized difference of sample time window between any two candidate nodes; The three types of normalized differences are weighted and summed using preset weighting coefficients to obtain the comprehensive distribution difference between the two nodes. Traverse all candidate nodes and calculate the comprehensive distribution difference between each pair. When the comprehensive distribution difference is greater than the preset distribution conflict threshold, mark the matrix element at the corresponding row and column position in the distribution conflict matrix as a conflict state. When the overall distribution difference is less than or equal to the preset distribution conflict threshold, the matrix element at the corresponding row and column position in the distribution conflict matrix is ​​marked as non-conflict state.

[0009] Further, the step of performing edge model aggregation based on the received contract binding model update to obtain the global update model for the current aggregation round includes: A commitment value to be verified is generated based on the negotiation offer message returned by the edge training node, and the commitment value to be verified is used as a verification credential. The contract binding model updates corresponding to the target edge training nodes that have passed the verification will be included in the set to be aggregated and updated. According to the aggregation grouping agreed upon by the locking aggregation contract, the contract-bound model updates within the set to be aggregated are aggregated separately within the group, resulting in multiple grouped model updates. By combining the sum of node aggregation weights of each aggregation segment, the coverage of grouped samples, and the span of grouped versions, a weighted fusion of multiple grouped model updates is performed to generate an updated global model.

[0010] Furthermore, the node aggregation weight is used to characterize the fusion ratio of the local model update of each target edge training node in the aggregation operation, and the calculation process of the node aggregation weight includes: For each target edge training node, the node contribution score is calculated based on the normalized values ​​of sample quantity, training quality, distribution complementation, expected upload cost, and version difference. Calculate the version compensation parameters based on the normalized version difference value; The node aggregation weights of the corresponding target edge training nodes are obtained by normalizing the joint node contribution score and version compensation parameter.

[0011] Furthermore, the method also includes: After generating and updating the global model, archive the negotiation records for the current aggregation round; Based on the negotiation record, identify the defaulting abnormal nodes in this round and add them to the candidate node restriction table for the next aggregation round; wherein, the defaulting abnormal nodes include nodes that have not returned a confirmed share to the edge negotiation nodes, nodes whose unverified commitment value is inconsistent with the negotiated commitment value, and nodes that have sent contract binding model updates beyond the contract validity time window.

[0012] Secondly, embodiments of the present invention provide an edge model aggregation negotiation device for federated learning, comprising: The negotiation task distribution module is used by edge negotiation nodes to distribute negotiation tasks for the current aggregation round to multiple edge training nodes, and to receive negotiation offer messages from each edge training node; wherein, the negotiation offer message is a message generated by the edge training node based on the negotiation task, used to apply to participate in the current aggregation round. The negotiation verification module is used to perform multi-dimensional verification on the negotiation offer message and add the verified edge training nodes as candidate nodes to the candidate node set. The contract generation module is used to filter target edge training nodes from the candidate node set, send the aggregate contract to be confirmed to each target edge training node, and receive the confirmation share returned by each target edge training node. The contract locking module is used to determine the aggregate contract to be confirmed as a locked aggregate contract when the confirmed share meets the preset contract locking conditions, and to issue a locked contract identifier to each target edge training node so that each target edge training node binds the locked contract identifier with the local model update, generates a contract-bound model update, and sends the contract-bound model update back to the edge negotiation node. The global update module is used to perform edge model aggregation based on the received contract binding model update to obtain the global update model for the current aggregation round.

[0013] Thirdly, embodiments of the present invention provide an electronic device, comprising: Memory, used to store computer programs; A processor for executing the computer program; Wherein, when the processor executes the computer program, it implements the edge model aggregation negotiation method of federated learning as described in any of the first aspects above.

[0014] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program that, when executed, implements the edge model aggregation negotiation method for federated learning as described in any of the first aspects above.

[0015] Compared with existing technologies, the edge model aggregation negotiation method for federated learning provided by this invention has the following advantages: An edge negotiation node issues a negotiation task for the current aggregation round to multiple edge training nodes and receives negotiation offer messages from each edge training node; wherein, the negotiation offer message is a message generated by the edge training node based on the negotiation task, used to apply for participation in this round of aggregation; the negotiation offer message is validated in multiple dimensions, and edge training nodes that pass the validation are added to the candidate node set as candidate nodes; target edge training nodes are selected from the candidate node set, and a pending aggregation contract is sent to each target edge training node, and a confirmation share is received from each target edge training node; when the confirmation share meets a preset contract locking condition, the pending aggregation contract is determined as a locked aggregation contract, and a locked contract identifier is issued to each target edge training node, so that each target edge training node binds the locked contract identifier with its local model update, generates a contract-bound model update, and sends the contract-bound model update back to the edge negotiation node; based on the received contract-bound model update, edge model aggregation is performed to obtain the global update model for the current aggregation round. This invention ensures that all data sources participating in the aggregation process undergo prior verification and contractual consensus, thereby improving the standardization, data legality, and overall execution reliability of the edge federation model aggregation process. Attached Figure Description

[0016] To more clearly illustrate the technical features of the embodiments of the present invention, the drawings used in the embodiments of the present invention 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 illustrating an edge model aggregation negotiation method for federated learning provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of an edge model aggregation negotiation device for federated learning provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of an electronic 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 should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein is for the purpose of describing embodiments of the invention only and is not intended to limit the invention.

[0021] Firstly, embodiments of the present invention provide a method for aggregation negotiation of edge models in federated learning, see [link to relevant documentation]. Figure 1 This is a flowchart illustrating an embodiment of a federated learning edge model aggregation negotiation method provided by the present invention.

[0022] like Figure 1 As shown, the method includes the following steps: S1: The edge negotiation node issues the negotiation task for the current aggregation round to multiple edge training nodes and receives the negotiation offer message from each edge training node; wherein, the negotiation offer message is a message generated by the edge training node according to the negotiation task and used to apply to participate in the current aggregation round. Specifically, at the start of each round of edge federation aggregation, the edge negotiation node generates the negotiation task corresponding to the current aggregation round and distributes the negotiation task to all edge training nodes to participate in the training, so as to unify the training benchmark, verification rules and contract specifications of this round of aggregation. After receiving the negotiation task, each edge training node generates a negotiation offer message based on the various rules and requirements contained in the negotiation task, combined with its own local training status, data distribution characteristics, model version and network status, and feeds back the negotiation offer message to the edge negotiation node.

[0023] S2: Perform multi-dimensional verification on the negotiation offer message, and add the edge training nodes that pass the verification as candidate nodes to the candidate node set; Specifically, for each negotiation offer message, the edge negotiation node sequentially performs identity verification, version verification, and commitment value format verification. Identity verification is used to verify the legality of the node's identity signature to prevent unauthorized nodes from accessing the aggregation process. Version verification is used to check the matching specifications between the local training model version reported by the node and the benchmark version of this round of aggregation to avoid abnormal version nodes from mixing in. Commitment value format verification is used to verify whether the generation format and field specifications of the negotiation commitment value conform to the preset commitment value generation rules to ensure the validity and verifiability of the credentials reported by the node.

[0024] Edge negotiation nodes only identify edge training nodes that pass the three types of verification (identity, version, and commitment value format) as compliant nodes and include them in the candidate negotiation node set. Nodes with abnormal messages, illegal identities, non-compliant versions, or abnormal commitment credentials are removed, thus providing a reliable node candidate pool for subsequent aggregation grouping and contract negotiation.

[0025] S3: Select target edge training nodes from the candidate node set, send the unconfirmed aggregation contract to each target edge training node, and receive the confirmation share returned by each target edge training node. Specifically, the aggregation contract to be confirmed includes the negotiation round identifier, the current global model version number, the list of participating nodes, the aggregation group, the node aggregation weight, the version compensation parameter, the contract's effective time window, the group coverage constraint, the confirmation share threshold, and the weight coverage threshold. Among them, the group coverage constraint includes the minimum number of participating nodes, the maximum number of distribution conflicts, and the maximum version span within each aggregation group. The maximum version span is the upper limit of the allowed version span within the same aggregation group, and the version span is the difference between the maximum version difference and the minimum version difference within the same aggregation group.

[0026] After receiving the aggregate contract to be confirmed, each target edge training node verifies the compliance and adaptability of the contract content, generates the corresponding confirmation share based on the verification result, and sends it back to the edge negotiation node. The confirmation share includes the contract summary of the aggregate contract to be confirmed, the negotiation commitment value, the verification result of the node's participation time window, the verification result of the current global model version number, the verification result of the local training model version number, and the confirmation signature.

[0027] The edge negotiation node collects the confirmation share fed back by each target edge training node. When the contract summary, negotiation commitment value, node participation time window verification result, current global model version number verification result, local training model version number verification result, and confirmation signature all pass the verification, the node receives the confirmation share.

[0028] S4: When the confirmed share meets the preset contract locking conditions, the aggregate contract to be confirmed is determined as the locked aggregate contract, and the locked contract identifier is sent to each target edge training node so that each target edge training node binds the locked contract identifier with the local model update, generates the contract binding model update, and sends the contract binding model update back to the edge negotiation node. Specifically, after collecting the confirmation shares returned by each target edge training node, the edge negotiation node makes a compliance judgment on the consensus status of the current contract. When the collected confirmation shares meet the preset contract locking conditions, the current unconfirmed aggregate contract is officially solidified into a locked aggregate contract.

[0029] The preset contract locking conditions include confirmation quantity conditions, weight coverage conditions, and group coverage conditions. The confirmation quantity condition is that the number of confirmation shares received by the edge negotiation node reaches the confirmation share threshold. The weight coverage condition is that the sum of the node aggregate weights corresponding to the edge training nodes that return confirmation shares reaches the weight coverage threshold. The group coverage condition is that the number of edge training nodes that return confirmation shares in each aggregate group reaches the minimum number of participating nodes.

[0030] Subsequently, the edge negotiation node generates a unique corresponding locking contract identifier and distributes it to each target edge training node. This identifier is used to uniquely mark the legitimate aggregation tasks that have reached consensus in this round. After receiving the locking contract identifier, each target edge training node forcibly binds the identifier to its own local model update obtained in this round of training. This generates a contract-bound model update containing a contract validity certificate, model update data, and verification information. This ensures that each uploaded model update corresponds to a unique legitimate aggregation contract. After completing the binding and encapsulation, each target edge training node uniformly transmits the contract-bound model update back to the edge negotiation node, providing a compliant, orderly, and traceable model update data source for subsequent trusted model verification and hierarchical aggregation.

[0031] S5: Based on the received contract binding model update, perform edge model aggregation to obtain the global update model for the current aggregation round.

[0032] Specifically, the edge negotiation node performs contract consistency verification on all received model updates, retains only compliant contract-bound model updates for the aggregation process, and finally iterates to generate the updated global model for the current aggregation round.

[0033] This invention, by setting up negotiation tasks, pending aggregation contracts, confirmation shares, locking aggregation contracts, and contract-bound model updates, enables edge training nodes to negotiate and commit before officially participating in aggregation with their local model updates. This avoids edge training nodes replacing local model updates or changing negotiation states after negotiation, thus improving the reliability and consistency of the edge model aggregation process. By generating pending aggregation contracts before edge model aggregation and forming locked aggregation contracts after the confirmation shares meet the contract locking conditions, this invention avoids edge training nodes from temporarily withdrawing, having insufficient confirmations, or having insufficient group coverage, thus improving the stability of the aggregation process.

[0034] In summary, this invention can ensure that all data sources participating in the aggregation have undergone prior verification and contractual consensus, thereby improving the standardization, data legality, and overall execution reliability of the edge federation model aggregation process.

[0035] In one optional implementation, the negotiation task includes at least the current global model, the current global model version number, the negotiation round identifier, the negotiation time limit, the commitment value generation rule, and the aggregation contract template. The negotiation offer message includes at least a local data distribution description, a local training status description, a local training model version number, a negotiation commitment value, a node identity signature, and a node participation time window.

[0036] Specifically, the negotiation tasks issued by the edge negotiation nodes to each edge training node carry the unified benchmark and contract generation specifications required for this round of aggregation. The negotiation tasks specifically include the current global model, the current global model version number, the negotiation round identifier, the negotiation time limit, the commitment value generation rules, and the aggregation contract template.

[0037] After receiving the negotiation task and completing local training, each edge training node assembles and generates a negotiation offer message, which is then sent back to the edge negotiation node. The negotiation offer message fully carries the local data distribution description, local training status description, local training model version number, negotiation commitment value, node identity signature, and node participation time window. Among them, the negotiation commitment value serves as an encrypted commitment credential of the edge training node for all its training, network, and version information in this round. It is calculated by the node based on the local model update summary, local data distribution description, local training status description, local training model version number, node participation time window, and node random number, following the commitment value generation rules uniformly issued by the negotiation task.

[0038] The local model update summary includes parameter block summary, update amplitude interval identifier, and update direction identifier. The parameter block summary is generated by the edge training nodes after dividing the local model update into blocks according to the model level. The update amplitude interval identifier is generated based on the interval to which the parameter change amplitude belongs within each parameter block. The update direction identifier is generated by the parameter change direction of each parameter block.

[0039] It should be noted that when the edge training node sends the negotiation offer message, it does not send the local model update, but only sends back the negotiation offer message. At the same time, the node random number is only stored locally and is not transmitted to the outside world with the negotiation offer message. After the subsequent locking aggregation contract is generated and the contract binding is completed, the node random number is submitted to the edge negotiation node along with the contract binding model update.

[0040] In one optional implementation, the step of filtering target edge training nodes from the candidate node set and sending unconfirmed aggregation contracts to each target edge training node includes: Based on the local data distribution description, node participation time window, current global model version number, local training model version number, and local training state description of each candidate node in the candidate node set, a distribution conflict matrix, a latency hierarchy table, and a version span table are generated; wherein, the latency hierarchy table is used to characterize the aggregateable arrival time of each candidate node, and the version span table is used to characterize the degree of version difference of each candidate node. Based on the distribution conflict matrix, the latency hierarchy table, and the version span table, the list of target edge training nodes participating in this round of aggregation, aggregation grouping, node aggregation weight, version compensation parameters, and contract validity time window are determined, and an aggregation contract to be confirmed is generated. Send the unconfirmed aggregation contract to each target edge training node.

[0041] Specifically, the edge negotiation node generates a distribution conflict matrix, a latency hierarchy table, and a version span table based on the local data distribution description, node participation time window, current global model version number, local training model version number, and local training status description of each candidate node in the candidate node set.

[0042] In this embodiment, the latency hierarchy table is used to characterize the aggregateable arrival time differences of model updates of each candidate node. Its specific generation logic is as follows: the edge negotiation node combines the node participation time window, uplink latency, and expected upload time of model update of each candidate node to accurately calculate the aggregateable arrival time corresponding to each candidate node. This time represents the earliest valid time when the local model update of the node can be successfully uploaded to the edge negotiation node. Subsequently, the edge negotiation node divides all candidate nodes into hierarchical levels according to the size of the aggregateable arrival time of each node, forming multiple latency hierarchy levels with distinct gradients. At the same time, grouping timing constraints are set to ensure that the latency hierarchy difference between any two participating nodes in the same aggregation group does not exceed the preset latency hierarchy difference, effectively avoiding the problem of mixed aggregation of nodes with large timing differences.

[0043] The version span table is used to characterize the degree of version difference between each candidate node. Specifically, it is generated as follows: the edge negotiation node uses the current global model version number unified in this round as the benchmark, calculates the difference between the local training model version number of each candidate negotiation node and the benchmark version number, and obtains the version difference corresponding to each node. For each aggregation group to be formed, the maximum and minimum values ​​of the version differences of all nodes in the group are counted, and the version span of the group is obtained by subtracting them. The version span of all aggregation groups is strictly limited to not exceeding the preset version span threshold. The compliance of group aggregation is constrained from the model version dimension to avoid mixed aggregation of new and old version model updates.

[0044] After constructing the distribution conflict matrix, latency hierarchy table, and version span table, the edge negotiation nodes integrate the quantitative constraint results of the three types of data tables to perform a second round of precise screening of the candidate node set, and finally determine the list of target participating nodes for this round of aggregation. At the same time, based on the heterogeneous data characteristics of each node, they match and generate an appropriate aggregation grouping scheme, node aggregation weights specific to each node, version compensation parameters, and the effective time window of the contract corresponding to this round of aggregation. Based on all the above compliant parameters, they assemble and generate a complete aggregation contract to be confirmed, and distribute the aggregation contract to each of the selected target edge training nodes one by one, completing the pre-distribution and negotiation preparation work of the aggregation contract.

[0045] This embodiment uses a distribution conflict matrix, a latency hierarchy table, and a version span table to jointly determine the list of participating nodes and aggregation groups. This allows edge negotiation nodes to simultaneously consider local data distribution differences, node aggregation arrival time, and local training model version differences. This reduces the situation where edge training nodes with excessive data distribution conflicts, excessive upload latency differences, or excessive version spans are assigned to the same aggregation group, thereby improving the aggregation quality of updating the global model.

[0046] In one optional implementation, the local data distribution description includes a label count vector, a feature bin count vector, and a sample time window identifier, and the steps for constructing the distribution conflict matrix include: Calculate the normalized difference of label count, the normalized difference of feature bin count, and the normalized difference of sample time window between any two candidate nodes; The three types of normalized differences are weighted and summed using preset weighting coefficients to obtain the comprehensive distribution difference between the two nodes. Traverse all candidate nodes and calculate the comprehensive distribution difference between each pair. When the comprehensive distribution difference is greater than the preset distribution conflict threshold, mark the matrix element at the corresponding row and column position in the distribution conflict matrix as a conflict state. When the overall distribution difference is less than or equal to the preset distribution conflict threshold, the matrix element at the corresponding row and column position in the distribution conflict matrix is ​​marked as non-conflict state.

[0047] Specifically, the local data distribution description includes label count vectors, feature bin count vectors, and sample time window identifiers. The edge negotiation node generates a distribution difference based on the local data distribution descriptions of any two candidate negotiation nodes. The formula for calculating the distribution difference is: ; in, Let be the distribution difference between the a-th candidate negotiation node and the b-th candidate negotiation node. Let be the normalized difference in label counts between the a-th candidate negotiation node and the b-th candidate negotiation node. Let be the normalized difference in feature bin counts between the a-th candidate negotiation node and the b-th candidate negotiation node. Let be the normalized difference of the sample time window between the a-th candidate negotiation node and the b-th candidate negotiation node. , and These are the preset distribution weight coefficients.

[0048] After calculating the comprehensive distribution difference between all pairs of nodes, the edge negotiation node traverses all node pairings and fills the distribution conflict matrix according to the preset distribution conflict threshold: if the comprehensive distribution difference between a pair of nodes is greater than the preset distribution conflict threshold, it means that the local data heterogeneity of the two groups of nodes is too high and they are not suitable to be included in the same aggregation group. In this case, the matrix element corresponding to row a and column b in the distribution conflict matrix is ​​marked as conflicting. If the comprehensive distribution difference is less than or equal to the preset distribution conflict threshold, it means that the data distribution matching degree of the two groups of nodes is high and they can be included in the same aggregation group. In this case, the corresponding element in the matrix is ​​marked as non-conflicting. The finally generated distribution conflict matrix completely records the data matching relationship between all pairs of candidate nodes, which serves as the core judgment basis for subsequent aggregation group division.

[0049] This embodiment generates a standardized distribution conflict matrix, which transforms abstract data distribution differences into directly readable conflict identifiers. This enables the early identification of node combinations with data distribution conflicts, avoiding the mixing and aggregation of nodes with excessively large heterogeneous data differences, thereby improving the rationality of aggregation and grouping.

[0050] In one optional implementation, the step of performing edge model aggregation based on the received contract binding model update to obtain the global update model for the current aggregation round includes: A commitment value to be verified is generated based on the negotiation offer message returned by the edge training node, and the commitment value to be verified is used as a verification credential. The contract binding model updates corresponding to the target edge training nodes that have passed the verification will be included in the set to be aggregated and updated. According to the aggregation grouping agreed upon by the locking aggregation contract, the contract-bound model updates within the set to be aggregated are aggregated separately within the group, resulting in multiple grouped model updates. By combining the sum of node aggregation weights, group sample coverage, and group version span of each aggregation group, a weighted fusion of multiple group model updates is performed to generate an updated global model.

[0051] Specifically, the edge negotiation node retrieves the local data distribution description, local training status description, local training model version number, and node participation time window recorded in the negotiation offer message. Combined with the local model update summary carried by the contract-bound model update and the node random number, it strictly follows the commitment value generation rules issued by the negotiation task to recalculate the commitment value to be verified. This commitment value to be verified is used as the core verification credential to verify whether the node has tampered with the training status and data information. The edge negotiation node compares the recalculated commitment value to be verified with the negotiation commitment value previously reported by the edge training node. Only when the two match completely is the contract-bound model update uploaded by the target edge training node determined to be genuine and credible, and it is included in the set of updates to be aggregated.

[0052] Next, the edge negotiation node performs intra-group aggregation operations in batches on all compliant contract-bound model updates within the set, according to the pre-aggregation grouping rules agreed upon in the locking aggregation contract. After each group is processed independently, the corresponding group model update is output. After completing the intra-group aggregation of all groups, the edge negotiation node combines the sum of node aggregation weights of each aggregation group, group sample coverage, and group version span to perform inter-group weighted fusion on multiple group model updates to generate an updated global model. Among them, the group sample coverage is the sum of the number of local samples of the edge training nodes that have been added to the set to be aggregated and updated within the same aggregation group, and the group version span is the difference between the maximum version difference and the minimum version difference within the same aggregation group. The version difference is the difference between the current global model version number and the local training model version number of the corresponding edge training node.

[0053] This embodiment employs a two-level aggregation approach, involving intra-group aggregation and inter-group aggregation. This approach allows local model updates within the same aggregation group to be fused first within a range of data distribution, upload latency, and version status. Then, inter-group fusion is performed based on the sum of node aggregation weights, group sample coverage, and group version span, thereby reducing the impact of edge node heterogeneity on the global aggregation results.

[0054] In one optional implementation, the node aggregation weight is used to characterize the fusion ratio of the local model update of each target edge training node in the aggregation operation, and the calculation process of the node aggregation weight includes: For each target edge training node, the node contribution score is calculated based on the normalized values ​​of sample quantity, training quality, distribution complementation, expected upload cost, and version difference. Calculate the version compensation parameters based on the normalized version difference value; The node aggregation weights of the corresponding target edge training nodes are obtained by normalizing the joint node contribution score and version compensation parameter.

[0055] Specifically, node aggregation weights are used to accurately represent the proportion of local model updates of a single target edge training node in the overall aggregation operation. They are the core parameters for achieving differentiated weighted aggregation and optimizing the global model training effect.

[0056] First, calculate the node contribution score for each target edge training node participating in this round of aggregation. This score quantifies the overall effective contribution of the node in this round of training. For the i-th edge training node, the node contribution score is calculated as follows: The calculation formula is: ; in, The preset lower limit for contribution scores greater than 0. Let be the normalized value of the number of samples in the i-th participating node. Let be the normalized training quality value of the i-th participating node. Let be the normalized value of the distribution complement of the i-th participating node relative to the aggregation group. For the i-th participating node, the normalized value of the expected upload cost generated based on the uplink latency and the model update expected upload duration is used. Let be the normalized version difference value of the i-th participating node. , , , and These are the preset contribution weight coefficients.

[0057] Further calculate the version compensation parameters and perform smoothing correction on the model version lag nodes. The version compensation parameters for the i-th edge training node are... The calculation formula is: ; in, This is the normalized version difference value for the i-th participating node.

[0058] Understandably, a larger version difference normalization value indicates a greater deviation between the local training model version of that node and the current global model baseline version. The corresponding version compensation parameter should be smaller, thus achieving a moderate reduction in the weights of lagging nodes; while nodes with highly matched versions... Approaching 0, version compensation parameter Approaching 1 ensures that the training contribution advantage is fully preserved, avoiding training disturbances caused by the mixing of old and new model updates.

[0059] Finally, by combining the node contribution score and the version compensation parameter, the final node aggregation weight is obtained through global normalization. The specific calculation method is as follows: ; in, Let be the version compensation parameter for the i-th participating node. Let be the normalized version difference value of the i-th participating node, n be the number of participating nodes in the list of participating nodes, and j be the sequence number of the participating node. Contribute a score to the j-th participating node. This is the version compensation parameter for the j-th participating node.

[0060] The final node aggregation weights can be directly used for weighted calculation of intra-group and inter-group aggregations, completing the adaptive fusion of multi-node model updates.

[0061] This embodiment differentiates the weighting of participating nodes by using node contribution scores, version compensation parameters, and node aggregation weights. This allows the node aggregation weights to comprehensively reflect the local sample quantity, training quality, distribution complementarity, expected upload cost, and version difference, avoiding edge model aggregation based solely on sample quantity or simple averaging, thereby improving the rationality of edge model aggregation results.

[0062] In one optional implementation, the method further includes: After generating and updating the global model, archive the negotiation records for the current aggregation round; Based on the negotiation record, identify the defaulting abnormal nodes in this round and add them to the candidate node restriction table for the next aggregation round; wherein, the defaulting abnormal nodes include nodes that have not returned a confirmed share to the edge negotiation nodes, nodes whose unverified commitment value is inconsistent with the negotiated commitment value, and nodes that have sent contract binding model updates beyond the contract validity time window.

[0063] Specifically, after completing the current round of model aggregation and generating an updated global model, the edge negotiation node summarizes the core interaction data, contract parameters, and aggregation result information of the entire aggregation process, and uniformly archives the negotiation records corresponding to the current aggregation round, forming standardized evidence data for each round of aggregation, providing complete data support for subsequent node performance verification, anomaly tracing, and round iteration management.

[0064] In this embodiment, the negotiation record specifically includes negotiation round identifier, locked contract identifier, list of participating nodes, aggregation group configuration, aggregation weight of each node, negotiation commitment value of each node, confirmed share summary, summary of the set to be aggregated and updated, and global model update identifier.

[0065] Based on the archived negotiation records of this round, abnormal nodes in the current aggregation process are screened out. Specifically, these include nodes that did not return a confirmed share to the edge negotiation nodes, nodes whose unverified commitment value is inconsistent with the negotiated commitment value, and nodes that sent contract binding model updates beyond the contract's effective time window. All abnormal nodes are uniformly collected and entered into the candidate node restriction table corresponding to the next aggregation round. The node admission restriction mechanism completes the closed-loop management of abnormal nodes, restricting the participation of abnormal nodes in subsequent rounds of aggregation negotiation and model training.

[0066] This embodiment generates negotiation records and forms a candidate node restriction table for the next aggregation round accordingly. This allows edge training nodes that have not returned confirmation shares, whose pending commitment values ​​are inconsistent with the negotiated commitment values, and whose contract binding model updates are sent beyond the contract's effective time window to be restricted in subsequent aggregation rounds. This improves cross-round negotiation management capabilities and the traceability of the aggregation process.

[0067] Secondly, embodiments of the present invention provide an edge model aggregation negotiation device for federated learning, see [link to relevant documentation]. Figure 2 This is a schematic diagram of an embodiment of a federated learning edge model aggregation negotiation device provided by the present invention.

[0068] like Figure 2 As shown, the device includes: The negotiation task distribution module 21 is used for edge negotiation nodes to distribute negotiation tasks for the current aggregation round to multiple edge training nodes, and to receive negotiation offer messages from each edge training node; wherein, the negotiation offer message is a message generated by the edge training node according to the negotiation task and used to apply to participate in the current aggregation round. The negotiation verification module 22 is used to perform multi-dimensional verification on the negotiation offer message and add the verified edge training nodes as candidate nodes to the candidate node set. Contract generation module 23 is used to filter target edge training nodes from the candidate node set, send unconfirmed aggregate contracts to each target edge training node, and receive the confirmation share returned by each target edge training node. The contract locking module 24 is used to determine the aggregate contract to be confirmed as a locked aggregate contract when the confirmed share meets the preset contract locking conditions, and to issue a locked contract identifier to each target edge training node so that each target edge training node binds the locked contract identifier with the local model update, generates a contract-bound model update, and sends the contract-bound model update back to the edge negotiation node. The global update module 25 is used to perform edge model aggregation based on the received contract binding model update to obtain the global update model for the current aggregation round.

[0069] In one optional implementation, the negotiation task includes at least the current global model, the current global model version number, the negotiation round identifier, the negotiation time limit, the commitment value generation rule, and the aggregation contract template. The negotiation offer message includes at least a local data distribution description, a local training status description, a local training model version number, a negotiation commitment value, a node identity signature, and a node participation time window.

[0070] In one optional implementation, the step of filtering target edge training nodes from the candidate node set and sending unconfirmed aggregation contracts to each target edge training node includes: Based on the local data distribution description, node participation time window, current global model version number, local training model version number, and local training state description of each candidate node in the candidate node set, a distribution conflict matrix, a latency hierarchy table, and a version span table are generated; wherein, the latency hierarchy table is used to characterize the aggregateable arrival time of each candidate node, and the version span table is used to characterize the degree of version difference of each candidate node. Based on the distribution conflict matrix, the latency hierarchy table, and the version span table, the list of target edge training nodes participating in this round of aggregation, aggregation grouping, node aggregation weight, version compensation parameters, and contract validity time window are determined, and an aggregation contract to be confirmed is generated. Send the unconfirmed aggregation contract to each target edge training node.

[0071] In one optional implementation, the local data distribution description includes a label count vector, a feature bin count vector, and a sample time window identifier, and the steps for constructing the distribution conflict matrix include: Calculate the normalized difference of label count, the normalized difference of feature bin count, and the normalized difference of sample time window between any two candidate nodes; The three types of normalized differences are weighted and summed using preset weighting coefficients to obtain the comprehensive distribution difference between the two nodes. Traverse all candidate nodes and calculate the comprehensive distribution difference between each pair. When the comprehensive distribution difference is greater than the preset distribution conflict threshold, mark the matrix element at the corresponding row and column position in the distribution conflict matrix as a conflict state. When the overall distribution difference is less than or equal to the preset distribution conflict threshold, the matrix element at the corresponding row and column position in the distribution conflict matrix is ​​marked as non-conflict state.

[0072] In one optional implementation, the step of performing edge model aggregation based on the received contract binding model update to obtain the global update model for the current aggregation round includes: A commitment value to be verified is generated based on the negotiation offer message returned by the edge training node, and the commitment value to be verified is used as a verification credential. The contract binding model updates corresponding to the target edge training nodes that have passed the verification will be included in the set to be aggregated and updated. According to the aggregation grouping agreed upon by the locking aggregation contract, the contract-bound model updates within the set to be aggregated are aggregated separately within the group, resulting in multiple grouped model updates. By combining the sum of node aggregation weights of each aggregation segment, the coverage of grouped samples, and the span of grouped versions, a weighted fusion of multiple grouped model updates is performed to generate an updated global model.

[0073] In one optional implementation, the node aggregation weight is used to characterize the fusion ratio of the local model update of each target edge training node in the aggregation operation, and the calculation process of the node aggregation weight includes: For each target edge training node, the node contribution score is calculated based on the normalized values ​​of sample quantity, training quality, distribution complementation, expected upload cost, and version difference. Calculate the version compensation parameters based on the normalized version difference value; The node aggregation weights of the corresponding target edge training nodes are obtained by normalizing the joint node contribution score and version compensation parameter.

[0074] In an optional embodiment, the device is further configured to: After generating and updating the global model, archive the negotiation records for the current aggregation round; Based on the negotiation record, identify the defaulting abnormal nodes in this round and add them to the candidate node restriction table for the next aggregation round; wherein, the defaulting abnormal nodes include nodes that have not returned a confirmed share to the edge negotiation nodes, nodes whose unverified commitment value is inconsistent with the negotiated commitment value, and nodes that have sent contract binding model updates beyond the contract validity time window.

[0075] It should be noted that the edge model aggregation negotiation device for federated learning provided in this embodiment of the invention is used to execute all the process steps of the edge model aggregation negotiation method for federated learning in the above embodiment. The working principle and beneficial effect of the two are one-to-one, so they will not be described again.

[0076] Thirdly, embodiments of the present invention provide an electronic device, see [link to previous document]. Figure 3 The diagram shown is a structural schematic of an electronic device provided in an embodiment of the present invention.

[0077] like Figure 3 As shown, the device includes: Memory 31 is used to store computer programs; Processor 32 is used to execute the computer program; When the processor 32 executes the computer program, it implements the edge model aggregation negotiation method of federated learning as described in any of the above embodiments.

[0078] For example, the computer program may be divided into one or more modules / units, which are stored in the memory 31 and executed by the processor 32 to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the electronic device.

[0079] The processor 32 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.

[0080] The memory 31 can be used to store the computer programs and / or modules. The processor 32 implements various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory 31 and calling the data stored in the memory 31. The memory 31 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 31 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 card (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0081] It should be noted that the aforementioned electronic devices include, but are not limited to, processors and memory, as will be understood by those skilled in the art. Figure 3The structural diagram is merely an example of the electronic device described above and does not constitute a limitation on the electronic device. It may include more components than shown in the diagram, or combine certain components, or use different components.

[0082] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing a computer program that, when executed, implements the edge model aggregation negotiation method for federated learning described in any of the above embodiments.

[0083] It should be understood that the implementation of all or part of the processes in the above-described federated learning edge model aggregation negotiation method can also be accomplished by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium. When executed by a processor, the computer program can implement the steps of the above-described federated learning edge model aggregation negotiation method. 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.

[0084] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. It should be noted that, for those skilled in the art, several equivalent obvious modifications and / or equivalent substitutions can be made without departing from the technical principles of the present invention, and these obvious modifications and / or equivalent substitutions should also be considered within the scope of protection of the present invention.

Claims

1. A method for aggregation negotiation in edge models of federated learning, characterized in that, include: The edge negotiation node issues the negotiation task for the current aggregation round to multiple edge training nodes and receives negotiation offer messages from each edge training node; wherein, the negotiation offer message is a message generated by the edge training node based on the negotiation task and used to apply to participate in the current aggregation round. The negotiation offer message is validated in multiple dimensions, and the edge training nodes that pass the validation are added to the candidate node set as candidate nodes. Select target edge training nodes from the candidate node set, send the unconfirmed aggregation contract to each target edge training node, and receive the confirmation share returned by each target edge training node. When the confirmed share meets the preset contract locking conditions, the aggregate contract to be confirmed is determined as the locked aggregate contract, and the locked contract identifier is sent to each target edge training node so that each target edge training node binds the locked contract identifier with the local model update, generates a contract-bound model update, and sends the contract-bound model update back to the edge negotiation node. Based on the received contract binding model update, edge model aggregation is performed to obtain the global update model for the current aggregation round.

2. The edge model aggregation negotiation method for federated learning as described in claim 1, characterized in that, The negotiation task includes at least the current global model, the current global model version number, the negotiation round identifier, the negotiation time limit, the commitment value generation rule, and the aggregation contract template. The negotiation offer message includes at least the local data distribution description, the local training status description, the local training model version number, the negotiation commitment value, the node identity signature, and the node's participation time window.

3. The edge model aggregation negotiation method for federated learning as described in claim 1, characterized in that, The step of selecting target edge training nodes from the candidate node set and sending unconfirmed aggregation contracts to each target edge training node includes: Based on the local data distribution description, node participation time window, current global model version number, local training model version number, and local training state description of each candidate node in the candidate node set, a distribution conflict matrix, a latency hierarchy table, and a version span table are generated; wherein, the latency hierarchy table is used to characterize the aggregateable arrival time of each candidate node, and the version span table is used to characterize the degree of version difference of each candidate node. Based on the distribution conflict matrix, the latency hierarchy table, and the version span table, the list of target edge training nodes participating in this round of aggregation, aggregation grouping, node aggregation weight, version compensation parameters, and contract validity time window are determined, and an aggregation contract to be confirmed is generated. Send the unconfirmed aggregation contract to each target edge training node.

4. The edge model aggregation negotiation method for federated learning as described in claim 3, characterized in that, The local data distribution description includes a label count vector, a feature bin count vector, and a sample time window identifier. The steps for constructing the distribution conflict matrix include: Calculate the normalized difference of label count, the normalized difference of feature bin count, and the normalized difference of sample time window between any two candidate nodes; The three types of normalized differences are weighted and summed using preset weighting coefficients to obtain the comprehensive distribution difference between the two nodes. Traverse all candidate nodes and calculate the comprehensive distribution difference between each pair. When the comprehensive distribution difference is greater than the preset distribution conflict threshold, mark the matrix element at the corresponding row and column position in the distribution conflict matrix as a conflict state. When the overall distribution difference is less than or equal to the preset distribution conflict threshold, the matrix element at the corresponding row and column position in the distribution conflict matrix is ​​marked as non-conflict state.

5. The edge model aggregation negotiation method for federated learning as described in claim 1, characterized in that, The step of performing edge model aggregation based on the received contract binding model update to obtain the global update model for the current aggregation round includes: A commitment value to be verified is generated based on the negotiation offer message returned by the edge training node, and the commitment value to be verified is used as a verification credential. The contract binding model updates corresponding to the target edge training nodes that have passed the verification will be included in the set to be aggregated and updated. According to the aggregation grouping agreed upon by the locking aggregation contract, the contract-bound model updates within the set to be aggregated are aggregated separately within the group, resulting in multiple grouped model updates. By combining the sum of node aggregation weights of each aggregation segment, the coverage of grouped samples, and the span of grouped versions, a weighted fusion of multiple grouped model updates is performed to generate an updated global model.

6. The edge model aggregation negotiation method for federated learning as described in claim 5, characterized in that, The node aggregation weight is used to characterize the fusion ratio of the local model update of each target edge training node in the aggregation operation. The calculation process of the node aggregation weight includes: For each target edge training node, the node contribution score is calculated based on the normalized values ​​of sample quantity, training quality, distribution complementation, expected upload cost, and version difference. Calculate the version compensation parameters based on the normalized version difference value; The node aggregation weights of the corresponding target edge training nodes are obtained by normalizing the joint node contribution score and version compensation parameter.

7. The edge model aggregation negotiation method for federated learning as described in claim 5, characterized in that, The method further includes: After generating and updating the global model, archive the negotiation records for the current aggregation round; Based on the negotiation record, identify the defaulting abnormal nodes in this round and add them to the candidate node restriction table for the next aggregation round; wherein, the defaulting abnormal nodes include nodes that have not returned a confirmed share to the edge negotiation nodes, nodes whose unverified commitment value is inconsistent with the negotiated commitment value, and nodes that have sent contract binding model updates beyond the contract validity time window.

8. A convergence negotiation device for edge models in federated learning, characterized in that, include: The negotiation task distribution module is used by edge negotiation nodes to distribute negotiation tasks for the current aggregation round to multiple edge training nodes, and to receive negotiation offer messages from each edge training node; wherein, the negotiation offer message is a message generated by the edge training node based on the negotiation task, used to apply to participate in the current aggregation round. The negotiation verification module is used to perform multi-dimensional verification on the negotiation offer message and add the verified edge training nodes as candidate nodes to the candidate node set. The contract generation module is used to filter target edge training nodes from the candidate node set, send the aggregate contract to be confirmed to each target edge training node, and receive the confirmation share returned by each target edge training node. The contract locking module is used to determine the aggregate contract to be confirmed as a locked aggregate contract when the confirmed share meets the preset contract locking conditions, and to issue a locked contract identifier to each target edge training node so that each target edge training node binds the locked contract identifier with the local model update, generates a contract-bound model update, and sends the contract-bound model update back to the edge negotiation node. The global update module is used to perform edge model aggregation based on the received contract binding model update to obtain the global update model for the current aggregation round.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program; Wherein, when the processor executes the computer program, it implements the edge model aggregation negotiation method for federated learning as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed, implements the edge model aggregation negotiation method for federated learning as described in any one of claims 1 to 7.