Federal learning-based terminal Agent knowledge collaborative updating method and system, terminal, medium and product

By employing a federated learning approach, the terminal agent interacts with the central coordination layer to conduct multiple rounds of collaborative knowledge updates. This addresses the privacy leaks inherent in centralized training of terminal agents and the limitations of independent knowledge updates, thereby achieving collaborative knowledge evolution and privacy protection.

CN121902918APending Publication Date: 2026-04-21BEIJING DIANFU TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING DIANFU TECHNOLOGY CO LTD
Filing Date
2025-12-16
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

The existing centralized training mode for terminal agents poses a risk of data privacy leakage, while the independent local update mode results in a limited knowledge scope and makes it difficult to achieve effective knowledge collaboration.

Method used

Employing a federated learning approach, the terminal agent interacts with the central coordination layer through multiple rounds of knowledge collaborative updates. A secure aggregation mechanism is used to transmit and aggregate model parameters, and local model adaptation updates are performed. Combined with techniques such as mini-batch stochastic gradient descent, security masking, and aggregation weight filtering, knowledge fusion and adaptation are achieved.

Benefits of technology

It has achieved a full-process evolution of knowledge from dispersion to integration and then to adaptation, expanded the knowledge coverage of each terminal agent, improved professional accuracy, and provided strong privacy protection through a secure aggregation mechanism.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121902918A_ABST
    Figure CN121902918A_ABST
Patent Text Reader

Abstract

The invention provides a terminal Agent knowledge collaborative updating method and system based on federal learning, a terminal, a medium and a product. According to the method, by repeating expert Agent local model training, parameter fusion and local model adaptive updating for multiple times, full-process evolution of knowledge from dispersion to fusion to adaptive updating is realized, the knowledge coverage range of each terminal Agent is gradually expanded, the professional precision is improved, and finally co-evolution of multiple terminal Agents is realized. Meanwhile, strong privacy protection is realized through a security aggregation mechanism.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of artificial intelligence and privacy computing technology, and in particular to a method, system, terminal, medium and product for collaborative updating of terminal agent knowledge based on federated learning. Background Technology

[0002] With the widespread application of intelligent agent technology in fields such as healthcare, finance, and industry, the need for knowledge collaboration among multi-terminal expert agents is becoming increasingly urgent. Terminal agent knowledge updates primarily rely on two modes: integrated training or independent local updates. The centralized training mode requires uploading the private data of each terminal agent to a central server, posing a risk of data privacy leaks. In the independent local update mode, each terminal agent evolves solely based on its own data, resulting in a limited knowledge scope, the formation of knowledge silos, and difficulty in achieving effective knowledge collaboration between terminal agents. Summary of the Invention

[0003] In view of the shortcomings of the prior art described above, the purpose of this application is to provide a method, system, terminal, medium and product for collaborative knowledge updating of terminal agents based on federated learning, so as to solve the problem of privacy leakage in the existing centralized training mode of terminal agents and the problem of limited knowledge scope due to independent local updates relying only on its own data evolution.

[0004] To achieve the above and other related objectives, a first aspect of this application provides a method for collaborative knowledge update of terminal agents based on federated learning. The method is jointly executed by multiple terminal agents and a central coordination layer. The method includes: performing multiple rounds of collaborative knowledge update on the multiple terminal agents; wherein each round of collaborative knowledge update includes: the terminal agent training a local model based on a local private dataset to obtain the updated local model parameters for that round; the terminal agent interacting with the central coordination layer to transmit the updated local model parameters for that round based on a secure aggregation mechanism, so that the central coordination layer can aggregate them based on the secure aggregation mechanism to obtain the global model parameters for that round; and the terminal agent adapting and updating the local model based on the global model parameters for that round, with the adapted and updated local model used for the next round of collaborative knowledge update or as the final model.

[0005] In some embodiments of the first aspect of this application, the terminal agent trains a local model based on a local private dataset to obtain the local model parameter update amount for the current round, including: the terminal agent obtains the initial parameters of the local model for the current round of training and preprocesses the local private dataset to obtain a training sample set; the terminal agent uses the training sample set to perform local training on the local model through mini-batch stochastic gradient descent, and obtains the final local model parameters after training is completed; the terminal agent obtains the local model parameter update amount for the current round based on the final local model parameters and the initial parameters of the current round of training.

[0006] In some embodiments of the first aspect of this application, the terminal agent transmits the local model parameter update amount for the current round based on a security aggregation mechanism, including: the terminal agent simultaneously transmits the local model parameter update amount for the current round and additional security data to the central coordination layer; wherein, the additional security data includes: a positive mask generated by the terminal agent itself and an exchanged negative mask; all the additional security data of the terminal agents cancel each other out when they are aggregated at the central coordination layer.

[0007] In some embodiments of the first aspect of this application, the specific process of the central coordination layer performing aggregation based on the secure aggregation mechanism includes: filtering the local model parameter update amounts of all acquired terminal agents in the current round based on a pre-set threshold filtering rule to obtain the filtered local model parameter update amounts; calculating the aggregation weight of each filtered local model parameter update amount, and performing weighted fusion on the filtered local model parameter update amounts based on the aggregation weight of each filtered local model parameter update amount to obtain initial aggregation parameters; performing regularization processing on the initial aggregation parameters to obtain final aggregation parameters; fusing the final aggregation parameters with the global model parameters of the previous round to obtain the initial global model parameters of the current round; and adding Laplace noise to the initial global model parameters of the current round to obtain the final global model parameters of the current round.

[0008] In some embodiments of the first aspect of this application, the central coordination layer distributes the global model parameters for this round to each terminal agent according to the priority of each terminal agent; wherein, the specific method for determining the priority of each terminal agent includes: obtaining the terminal attribute information of each terminal agent and constructing a terminal state matrix; calculating the priority score of each terminal agent based on the terminal state matrix, and sorting the terminal agents according to the priority score from high to low.

[0009] In some embodiments of the first aspect of this application, the terminal agent adapts and updates the local model based on the global model parameters of the current round, including: the terminal agent adapts and updates the local model based on the global model parameters of the current round in any of the following ways: First method: using the global model parameters of the current round as the global model of the current round, and updating the parameters of the local model by feature dimension alignment; Second method: using the global model parameters of the current round as the teacher model, and the local model as the student model, and guiding the local model to update its parameters by distillation loss; Third method: freezing the basic large model of the local model, and fusing the global model parameters of the current round into the domain adaptation layer of the local model.

[0010] To achieve the above and other related objectives, a second aspect of this application provides a terminal agent knowledge collaborative update system based on federated learning, comprising: multiple terminal agents and a central coordination layer; the multiple terminal agents and the central coordination layer jointly perform multiple rounds of knowledge collaborative update; wherein, each round of knowledge collaborative update includes: the terminal agent training a local model based on a local private dataset to obtain the local model parameter update amount for this round; the terminal agent interacting with the central coordination layer to transmit the local model parameter update amount for this round based on a secure aggregation mechanism, so that the central coordination layer can aggregate it based on the secure aggregation mechanism to obtain the global model parameters for this round;

[0011] The terminal agent adapts and updates the local model based on the global model parameters of this round. The adapted and updated local model is used for the next round of knowledge collaborative update or as the final model.

[0012] To achieve the above and other related objectives, a third aspect of this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the operations performed in the federated learning-based terminal agent knowledge collaborative update method.

[0013] To achieve the above and other related objectives, a fourth aspect of this application provides a computer program product comprising computer program code that, when executed on a computer, causes the computer to perform the operations described in the federated learning-based terminal agent knowledge collaborative update method.

[0014] To achieve the above and other related objectives, a fifth aspect of this application provides an electronic terminal, including a memory, a processor, and a computer program stored in the memory; the processor executes the computer program to implement the operations performed in the terminal agent knowledge collaborative update method based on federated learning.

[0015] As described above, the method, system, terminal, medium, and product for collaborative knowledge updating of terminal agents based on federated learning in this application have the following beneficial effects: This application achieves a full-process evolution of knowledge from dispersion to fusion and then to adaptive updating by repeatedly training local models of expert agents, fusing parameters, and updating local models. The knowledge coverage of each terminal agent gradually expands and its professional accuracy improves, ultimately achieving collaborative evolution of multiple terminal agents. Simultaneously, this application achieves strong privacy protection through a secure aggregation mechanism. Attached Figure Description

[0016] Figure 1 This diagram illustrates the connection relationship between the terminal agent, the secure communication layer, and the central coordination layer in one embodiment of this application.

[0017] Figure 2 The diagram shown is a schematic representation of a knowledge collaborative update process in one embodiment of this application.

[0018] Figure 3 The diagram shown is a schematic block diagram of a terminal agent knowledge collaborative update system based on federated learning, according to one embodiment of this application.

[0019] Figure 4 The diagram shown is a structural schematic of an electronic terminal according to an embodiment of this application. Detailed Implementation

[0020] The following specific examples illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. This application can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be noted that, unless otherwise specified, the following embodiments and features in the embodiments can be combined with each other.

[0021] In the embodiments of this application, the terms "first" and "second" are used to distinguish identical or similar items with essentially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and that the terms "first" and "second" do not necessarily imply that they are different.

[0022] It should be noted that, in the embodiments of this application, the words "exemplary" or "for example" indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0023] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.

[0024] To facilitate understanding of the embodiments of this application, firstly, in conjunction with Figure 1 Detailed Description. This invention employs a hierarchical federated learning architecture, comprising: multiple terminal agents, a central coordination layer, and a secure communication layer. The multiple terminal agents interact with the central coordination layer through the secure communication layer. Each terminal agent deploys a local model. The local model includes a base model and a domain adaptation layer. The base model is used for general feature extraction, while the domain adaptation layer fine-tunes the model using a small amount of domain-specific data to achieve specialized capabilities for the terminal agents. Different terminal agents can select base models of different sizes based on the hardware resources of their deployed terminals. For example, edge terminals use MobileBERT, and server terminals use BERT-Large. The secure communication layer, based on the TLS 1.3 protocol and encrypted tunneling technology, enables encrypted data transmission between each terminal agent and the central coordination layer, preventing parameters from being stolen or tampered with during transmission.

[0025] Based on the aforementioned hierarchical federated learning architecture, this embodiment describes a terminal agent knowledge collaborative update method based on federated learning. This method is jointly executed by multiple terminal agents and a central coordination layer, and includes: performing multiple rounds of knowledge collaborative updates on multiple terminal agents.

[0026] Each round of knowledge collaborative update is like Figure 2As shown, the main steps include the following:

[0027] Step S201: The terminal Agent trains the local model based on the local private dataset to obtain the local model parameter update amount for this round.

[0028] Specifically, assuming the number of terminal agents is N, where N is a positive integer, the training process of the i-th terminal agent in each round of knowledge collaborative update is as follows ( ):

[0029] If this round of knowledge collaborative update is the first round, then the i-th terminal agent will receive the initial global parameters θ issued by the central coordination layer. init θ is the initial parameter for this round of training. local0 θ local0 =θ init .

[0030] If this round of knowledge collaborative update is not the first round, then the i-th terminal agent will use the local model parameters obtained after the previous round (i.e., the global model parameters θ obtained in the previous round). global θ is used as the initial parameter for this round of training. local0 θ local0 =θ global .

[0031] The local private dataset of the i-th terminal agent mainly includes: domain-specific data (such as medical record texts for medical agents and transaction records for financial agents), interaction logs of terminal agents (such as user queries and corresponding response history), and fragments of domain knowledge graphs (structured knowledge).

[0032] Furthermore, the dataset used in this round of training undergoes preprocessing such as cleaning and labeling to obtain the training sample set S for this round. i ={(x1,y1),(x2,y2),…,(x m ,y m It should be understood that feature engineering is the process of transforming raw data into features that enable the model to learn effectively.

[0033] Using the training sample set from this round, the local model is locally trained using Mini-batch Stochastic Gradient Descent (SGD). The number of training iterations, K, is set according to the hardware resources of the terminal agent deployed on the i-th terminal. For example, K is set to 5 for CPU terminals and 20 for GPU terminals. The loss function shown in Equation 1 is used during training:

[0034] ;(Formula 1)

[0035] in, This is the task loss (e.g., cross-entropy loss). This refers to distillation losses (e.g., KL losses). Weighting coefficients ( The consistency between the local model and the global model is constrained by distillation loss.

[0036] After training is complete, the final local model parameters are obtained, namely the local model parameters θ after the Kth (final) iteration. localK The local model parameters θ after the Kth iteration localK With the initial parameters θ of this training round local0 The difference is used as the local model parameter update amount Δθ for the i-th terminal agent in this round. i , Δθ i =θ localK - θ local0 The local model parameter updates in this round include fine-tuning the weights of the base model and the full weights of the domain adaptation layer.

[0037] Step S202: The terminal agent interacts with the central coordination layer and transmits the local model parameter update amount for this round based on the secure aggregation mechanism, so that the central coordination layer can aggregate the data based on the secure aggregation mechanism to obtain the global model parameters for this round.

[0038] Specifically, still assuming the number of terminal agents is N, where N is a positive integer, the data transmission process of the i-th terminal agent in each round of knowledge collaborative update is as follows ( Before transmitting the local model parameter update amount for this round to the central coordination layer, the i-th terminal agent generates a pair of positive and negative masks (r). i -r i The i-th terminal agent exchanges negative masks with the other terminal agents to obtain additional security data. The additional security data for the i-th terminal agent includes: its own generated positive mask r. i And the negative mask obtained after the exchange. Next, the i-th terminal agent simultaneously transmits its local model parameter update for this round and additional security data to the central coordination layer.

[0039] When the local model parameter updates and additional security data of N terminal agents are aggregated in the central coordination layer, the additional security data of the N terminal agents cancel each other out, retaining only the local model parameter updates of the N terminal agents in this round. For example, N equals 3. The first terminal agent generates a pair of positive and negative masks (r1, -r1), the second terminal agent generates a pair of positive and negative masks (r2, -r2), and the third terminal agent generates a pair of positive and negative masks (r3, -r3). After exchange, the additional security data of the first terminal agent includes the positive mask r1 and the exchanged negative mask -r3; the additional security data of the second terminal agent includes the positive mask r2 and the exchanged negative mask -r1; and the additional security data of the first terminal agent includes the positive mask r3 and the exchanged negative mask -r2. When these three additional security data are aggregated, r1 and -r1 cancel each other out, r2 and -r2 cancel each other out, and r3 and -r3 cancel each other out.

[0040] Next, the central coordination layer filters the local model parameter updates received from the N terminal agents in this round according to pre-set threshold filtering rules. This process is called Byzantine fault tolerance, designed to defend against malicious terminals' spoofed parameter attacks. For example, the threshold filtering rule can be set to remove local model parameter updates whose absolute value exceeds three times the average.

[0041] Furthermore, the central coordination layer obtains the data size n of the training sample sets of the M terminal agents corresponding to the remaining M (M≤N, M is a positive integer) local model parameter update amounts in this round after filtering. j With model training accuracy j Referring to Formula 2 below, calculate the aggregation weight corresponding to the local model parameter update amount of the j-th terminal Agent during aggregation. :

[0042] ;(Formula 2)

[0043] Furthermore, referring to Formula 3 below, the initial aggregate parameters are calculated based on the local model parameter update amounts of the M terminal agents and the aggregate weight of the local model parameter update amounts of the M terminal agents. :

[0044] ;(Formula 3)

[0045] Where, Δθ j Let $\mathbf{j}$ be the amount of local model parameter updates for the $j$-th terminal Agent. This represents the aggregate weight of the local model parameter updates for the j-th terminal agent. Compared to the equal-weighted aggregation of traditional FedAvg, this method can increase the contribution weight of high-quality data terminals.

[0046] Next, the initial aggregation parameters are subjected to L2 regularization according to Formula 4 below to obtain the final aggregation parameters. :

[0047] ;(Formula 4)

[0048] Where λ is the regularization coefficient (λ=0.01), which reduces the risk of overfitting.

[0049] Furthermore, referring to Formula 5 below, the final aggregation parameters are... Compared with the global model parameters in the previous round The fusion process generates the global model parameters θ for this round. new :

[0050] ;(Formula 5)

[0051] Global model parameters θ new This includes common and complementary knowledge across multiple terminal agents. Through this global fusion, a leap from decentralization and personalization to integration has been achieved.

[0052] Furthermore, θ is validated using a virtual test set (domain pseudo-data generated by GAN). new If the accuracy is improved by ≥1%, the distribution process will proceed; otherwise, the aggregation process will be retried.

[0053] Finally, the global model parameters for this round... The Lap(ε) noise is filled in, where ε is the privacy budget (which can be dynamically adjusted, with a default value of 1.0) to ensure that attackers cannot infer the parameter information of a single terminal agent through multiple aggregation results.

[0054] Step S203: The terminal Agent adapts and updates the local model based on the global model parameters of this round. The adapted and updated local model is used for the next round of knowledge collaborative update or as the final model.

[0055] Specifically, the central coordination layer collects terminal attribute information from each terminal agent through a heartbeat mechanism. The heartbeat mechanism is primarily used to detect the connectivity of communication links, maintain connection status, and synchronize state information between systems. The terminal attribute information for each terminal agent includes: hardware resource utilization, network bandwidth, and model version information. Based on this terminal attribute information, a terminal state matrix is ​​constructed. The columns of the terminal state matrix are, in order, the terminal agent, hardware resource utilization, network bandwidth, and model version information.

[0056] Next, based on P i =α×(1-resource utilization) +β×bandwidth +γ(version obsolescence), calculate the priority score P for each terminal agent. i ;in, α, β, and γ are weighting coefficients that can be set according to requirements. Terminal agents are prioritized according to their priority scores from highest to lowest. The central coordination layer prioritizes distributing the global model parameters for this round to high-priority terminal agents (such as idle, high-bandwidth, and older version terminals). Incremental transmission is used, meaning only the differences between the global model parameters and the local model are transmitted (using Huffman coding compression), reducing communication volume by 70%-90% compared to transmitting all parameters. Simultaneously, the update packet is divided into multiple fragments, each 1MB in size, but other sizes are not limited here. A checksum mechanism enables breakpoint resumption, avoiding duplicate transmissions caused by network interruptions.

[0057] The i-th terminal Agent ( After receiving the global model parameters for this round, the global model parameters for this round are used as the global model for this round. Based on the characteristics of its local model, the local model is updated using one of the following three adaptation update methods:

[0058] The first approach involves aligning the feature dimensions of the global and local models (e.g., MobileBERT and BERT-Base) with different scales within the same architecture. Specifically, the global model features h_global and the local model features are extracted. Using a weight mapping matrix W∈R^(d1×d2), the global model features h_global are mapped to the feature space of the local model, where h_local' = W×h_global, and h_local' represents the aligned local features. The aligned local features are then fused with the local model features, and the parameters of the local model are updated using the fused features.

[0059] The second approach targets global and local models (such as CNNs and Transformers) in heterogeneous architectures. The parameters of the global model in this round are used as the teacher model, and the local model as the student model. Distillation loss guides the local model to learn global knowledge, while retaining the personalized parameters of the local model's domain adaptation layer. Specific training methods can refer to existing teacher and local model approaches, which will not be elaborated upon here.

[0060] The third approach: Freeze the base model of the local model and only transfer the incremental portion Δθ of the global model parameters in this round. global_adapt Integrate into the domain adaptation layer, refer to the formula θ adapt_new =θ adapt_local +δ×Δθ global_adapt δ is the fusion coefficient. .

[0061] After the adaptation update, test the accuracy and response time of the local model on the local validation set. If the accuracy improves by ≥0.5% and the response time increases by ≤100ms, retain the update; otherwise, roll back to the state before adaptation.

[0062] The adaptation update method in this embodiment improves the adaptation accuracy by 15%-25% compared to the traditional hard parameter replacement, while retaining the characteristics of local domain knowledge.

[0063] If the iteration count or accuracy requirements are met, the knowledge collaborative update stops, and the last round of terminal agents is used as the final model. If another round of knowledge collaborative update is needed, the local models of each terminal agent in this round are used for the next round of knowledge collaborative update.

[0064] With each iteration, the knowledge coverage and professional accuracy of each terminal agent expand, ultimately achieving the collaborative evolution of knowledge across multiple agents. For example, in a collaborative scenario in the medical field: Terminal Agent 1 (internal medicine agent) accumulates internal medicine diagnostic knowledge through local medical records, while Terminal Agent 2 (surgical agent) accumulates surgical plan knowledge; after secure aggregation, the global model integrates complementary knowledge from internal and surgical fields; after adaptation, Terminal Agent 1 gains surgical auxiliary diagnostic capabilities, and Terminal Agent 2 gains preoperative assessment capabilities in internal medicine, while retaining their respective core advantages, thus achieving collaborative knowledge upgrades.

[0065] Figure 3 This is a schematic block diagram of a terminal agent knowledge collaborative update system based on federated learning provided in an embodiment of this application. Figure 3 As shown, the terminal agent knowledge collaborative update system 300 based on federated learning includes:

[0066] Multiple terminal agents 301 and a central coordination layer 302; multiple terminal agents 301 and the central coordination layer 302 jointly perform multiple rounds of knowledge collaborative updates for multiple terminal agents 301;

[0067] Each round of collaborative knowledge updates includes:

[0068] Terminal Agent301 trains the local model based on the local private dataset to obtain the local model parameter update amount for this round;

[0069] Terminal Agent 301 interacts with the central coordination layer 302 and transmits the local model parameter update amount for this round based on the secure aggregation mechanism, so that the central coordination layer 302 can aggregate it based on the secure aggregation mechanism to obtain the global model parameters for this round.

[0070] The terminal Agent301 adapts and updates the local model based on the global model parameters of this round. The adapted and updated local model is used for the next round of knowledge collaborative update, or as the final model.

[0071] It should be understood that the specific process of multiple terminal agents and the central coordination layer performing the above-mentioned corresponding steps has been described in detail in the above method embodiments, and will not be repeated here for the sake of brevity.

[0072] Figure 4 This is a schematic block diagram of the electronic terminal provided in an embodiment of this application. Figure 4 As shown, the electronic terminal includes at least one processor 401, a memory 402, at least one network interface 403, and a user interface 405. The various components in the device are coupled together via a bus system 404. It is understood that the bus system 404 is used to implement communication between these components. In addition to a data bus, the bus system 404 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in… Figure 4 The general will label all buses as bus systems.

[0073] The user interface 405 may include a monitor, keyboard, mouse, trackball, clicker, button, touchpad, or touch screen.

[0074] It is understood that memory 402 can be volatile memory or non-volatile memory, or both. Non-volatile memory can be read-only memory (ROM) or programmable read-only memory (PROM), used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM) and synchronous static random access memory (SSRAM). The memories described in the embodiments of this invention are intended to include, but are not limited to, these and any other suitable categories of memory.

[0075] In this embodiment of the invention, the memory 402 is used to store various types of data to support the operation of the electronic terminal 400. Examples of this data include: any executable program for operation on the electronic terminal 400, such as the operating system 4021 and application programs 4022; the operating system 4021 contains various system programs, such as the framework layer, core library layer, driver layer, etc., for implementing various basic services and handling hardware-based tasks. The application program 4022 may contain various applications, such as media players, browsers, etc., for implementing various application services. The operations performed in the terminal agent knowledge collaborative update method based on federated learning provided in this embodiment of the invention can be included in the application program 4022.

[0076] The methods disclosed in the above embodiments of the present invention can be applied to processor 401, or implemented by processor 401. Processor 401 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in processor 401 or by instructions in the form of software. The processor 401 may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Processor 401 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. General-purpose processor 401 may be a microprocessor or any conventional processor, etc. The steps of the accessory optimization method provided in the embodiments of the present invention can be directly reflected as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium, which is located in a memory. The processor reads the information in the memory and combines it with its hardware to complete the steps of the aforementioned method.

[0077] In an exemplary embodiment, the electronic terminal 400 may be used by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), or complex programmable logic devices (CPLDs) to execute the aforementioned method.

[0078] According to the method provided in the embodiments of this application, this application also provides a computer program product, which includes: computer program code, which, when run on a computer, causes the computer to execute... Figure 2 The operations performed in the terminal agent knowledge collaborative update method based on federated learning in the illustrated embodiment.

[0079] According to the method provided in the embodiments of this application, this application also provides a computer-readable storage medium storing program code, which, when executed on a computer, causes the computer to perform... Figure 2 The operations performed in the terminal agent knowledge collaborative update method based on federated learning in the illustrated embodiment.

[0080] As used in this specification, the terms "component," "module," "system," etc., are used to refer to computer-related entities, hardware, firmware, combinations of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program, and / or a computer. As illustrated, applications running on computing devices and computing devices can both be components. One or more components may reside in a process and / or an execution thread, and components may be located on a single computer and / or distributed among two or more computers. Furthermore, these components can be executed from various computer-readable media on which various data structures are stored. Components can communicate, for example, via local and / or remote processes based on signals having one or more data packets (e.g., data from two components interacting with another component between a local system, a distributed system, and / or a network, such as the Internet interacting with other systems via signals).

[0081] Those skilled in the art will recognize that the various illustrative logical blocks and steps described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.

[0082] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0083] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0084] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0085] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0086] In the above embodiments, the functions of each functional unit can be implemented entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. A computer program product includes one or more computer instructions (programs). When the computer program instructions (programs) are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., high-density digital video discs, DVDs), or semiconductor media (e.g., solid-state disks, SSDs, etc.).

[0087] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0088] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0089] In summary, this application provides a method, system, terminal, medium, and product for collaborative knowledge updating of terminal agents based on federated learning. This method achieves a full-process evolution of knowledge from dispersion to fusion and then to adaptive updating by repeatedly training local models of expert agents, fusing parameters, and updating local models. The knowledge coverage of each terminal agent gradually expands, and its professional accuracy improves, ultimately achieving collaborative evolution of multiple terminal agents. Simultaneously, this application achieves strong privacy protection through a secure aggregation mechanism. Therefore, this application effectively overcomes the various shortcomings of existing technologies and has high industrial application value.

[0090] The above embodiments are merely illustrative of the principles and effects of this application and are not intended to limit this application. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of this application. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in this application should still be covered by the claims of this application.

Claims

1. A method for collaborative knowledge updating of terminal agents based on federated learning, characterized in that, The method is jointly executed by multiple terminal agents and a central coordination layer, and the method includes: performing multiple rounds of collaborative knowledge updates on the multiple terminal agents; Each round of collaborative knowledge updates includes: The terminal agent trains the local model based on the local private dataset to obtain the local model parameter update amount for this round. The terminal agent interacts with the central coordination layer and transmits the local model parameter update amount for this round based on the secure aggregation mechanism, so that the central coordination layer can aggregate it based on the secure aggregation mechanism to obtain the global model parameters for this round. The terminal agent adapts and updates the local model based on the global model parameters of this round. The adapted and updated local model is used for the next round of knowledge collaborative update or as the final model.

2. The terminal agent knowledge collaborative update method based on federated learning according to claim 1, characterized in that, The terminal agent trains a local model based on a local private dataset to obtain the local model parameter update amount for this round, including: The terminal agent obtains the initial parameters of the local model for this round of training and preprocesses the local private dataset to obtain the training sample set; The terminal agent uses the training sample set to perform local training on the local model through mini-batch stochastic gradient descent, and obtains the final local model parameters after training is completed. The terminal agent obtains the local model parameter update amount for this round based on the final local model parameters and the initial parameters of this round of training.

3. The terminal agent knowledge collaborative update method based on federated learning according to claim 1, characterized in that, The terminal agent transmits the local model parameter update amount for this round based on a secure aggregation mechanism, including: the terminal agent simultaneously transmits the local model parameter update amount for this round and additional security data to the central coordination layer; wherein, the additional security data includes: a positive mask generated by the terminal agent itself and an exchanged negative mask; the additional security data of all terminal agents cancel each other out when they are aggregated at the central coordination layer.

4. The terminal agent knowledge collaborative update method based on federated learning according to claim 3, characterized in that, The specific process by which the central coordination layer performs aggregation based on the secure aggregation mechanism includes: Based on the pre-set threshold filtering rules, the local model parameter update volume of all terminal agents in this round is filtered to obtain the filtered local model parameter update volume. Calculate the aggregate weight of the update volume of each local model parameter after filtering, and perform weighted fusion of the update volume of each local model parameter after filtering based on the aggregate weight of the update volume of each local model parameter after filtering to obtain the initial aggregate parameters; The initial aggregation parameters are regularized to obtain the final aggregation parameters; The final aggregated parameters are fused with the global model parameters from the previous round to obtain the initial global model parameters for this round. Add Laplacian noise to the initial global model parameters in this round to obtain the final global model parameters for this round.

5. The terminal agent knowledge collaborative update method based on federated learning according to claim 1, characterized in that, The central coordination layer distributes the global model parameters for this round to each terminal agent according to their priority; wherein the specific methods for determining the priority of each terminal agent include: Obtain terminal attribute information for each terminal agent and construct a terminal state matrix; The priority score of each terminal agent is calculated based on the terminal state matrix, and the terminal agents are sorted in order of priority score from high to low.

6. The terminal agent knowledge collaborative update method based on federated learning according to claim 1, characterized in that, The terminal agent updates the local model based on the global model parameters of this round, including: the terminal agent updates the local model based on the global model parameters of this round using any of the following methods: The first approach is to use the global model parameters of this round as the global model of this round, and update the parameters of the local model by aligning the feature dimensions. The second approach is to use the global model parameters of this round as the teacher model and the local model as the student model, and guide the local model to update its parameters through distillation loss. The third approach is to freeze the base model of the local model and integrate the global model parameters of this round into the domain adaptation layer of the local model.

7. A terminal agent knowledge collaborative update system based on federated learning, characterized in that, include: Multiple terminal agents and a central coordination layer; The multiple terminal agents and the central coordination layer jointly perform multiple rounds of collaborative knowledge updates for the multiple terminal agents. Each round of collaborative knowledge updates includes: The terminal agent trains the local model based on the local private dataset to obtain the local model parameter update amount for this round. The terminal agent interacts with the central coordination layer and transmits the local model parameter update amount for this round based on the secure aggregation mechanism, so that the central coordination layer can aggregate it based on the secure aggregation mechanism to obtain the global model parameters for this round. The terminal agent adapts and updates the local model based on the global model parameters of this round. The adapted and updated local model is used for the next round of knowledge collaborative update or as the final model.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it performs the operations performed in the terminal agent knowledge collaborative update method based on federated learning as described in any one of claims 1 to 6.

9. A computer program product, characterized in that, The computer program product includes computer program code, which, when run on a computer, causes the computer to perform the operations described in any one of claims 1 to 6 of the terminal agent knowledge collaborative update method based on federated learning.

10. An electronic terminal, comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to perform the operations performed in the terminal agent knowledge collaborative update method based on federated learning as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Cross-modal knowledge fusion calculation method based on federated learning and big and small model collaboration

    CN118568666A

  • Credit risk management method based on federal learning

    CN119848925A

  • Satellite network anomaly detection method based on federated learning

    CN120321036A

  • Federal learning method combining sharpness perception training and knowledge distillation

    CN120471140A

  • Systems and methods for weighted federated learning in a hybrid operating room environment

    US20230316141A1

Cited By

  • Asynchronous federated learning aggregation method and system based on clustering cache

    CN122087484A