A federated learning method and system for a weakly linked sensor network

By dynamically adjusting the waiting time and differentiating the aggregation weights based on client latency information in weakly linked sensor networks, the problem of low training efficiency in weakly linked sensor networks is solved, and more efficient and stable model training is achieved.

CN122247879APending Publication Date: 2026-06-19HUAZHONG UNIV OF SCI & TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUAZHONG UNIV OF SCI & TECH
Filing Date
2026-03-16
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing federated learning methods are inefficient in training weakly linked sensor networks, struggle to adapt to dynamic communication conditions, and result in prolonged training cycles and poor convergence stability.

Method used

By determining the maximum waiting time on the server side based on the client's historical latency information, dynamically adjusting the waiting time during the iteration process, and using a differentiated aggregation weight strategy to handle changes in model parameters, a maximum waiting time selection mechanism based on the upper confidence bound algorithm is constructed to optimize the reception and aggregation of model parameters.

Benefits of technology

It improves the training efficiency of weakly linked sensor networks, reduces invalid waiting time, enhances model accuracy and training stability, and adapts to dynamic communication changes in weak network environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122247879A_ABST
    Figure CN122247879A_ABST
Patent Text Reader

Abstract

This invention discloses a federated learning method and system for weakly linked sensor networks, belonging to the field of federated learning technology. Considering that the network links of weakly linked sensor networks are often characterized by bandwidth constraints, high packet loss rates, and significant latency fluctuations, in each iteration, the maximum waiting time of the server is determined based on the historical latency information of each client in the weakly linked sensor network system. After broadcasting the first parameter to each client, the server only continuously receives the second parameter returned by the client within the maximum waiting time. After the maximum waiting time is exceeded, it stops receiving the second parameter returned by the client. This method has strong flexibility and adaptability, and can receive and process the client's training results within a reasonable time range, thereby avoiding training blockage caused by waiting for all nodes to complete uploading or over-reliance on the results returned by individual nodes, thus improving the training efficiency for weakly linked sensor networks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of federated learning technology, and more specifically, relates to a federated learning method and system for weakly linked sensor networks. Background Technology

[0002] Wireless sensor networks play a crucial role in environmental monitoring, smart agriculture, and smart cities. As data volumes continue to expand, traditional centralized data collection and training methods not only incur high communication overhead but also pose data leakage risks. Federated learning, which trains models locally on each client side, only uploading model parameters or gradient information for aggregation, achieves global model collaborative optimization without transmitting raw data. This effectively improves data security and reduces communication burden, thus becoming an important technological direction for the intelligent application of wireless sensor networks.

[0003] However, in actual deployments, some wireless sensor networks operate in environments with insufficient signal coverage and severe interference, such as oceans, farmland, mountains, or complex urban environments. These networks often experience bandwidth limitations, high packet loss rates, and significant latency fluctuations, forming weak-link sensor networks, or weak networks. In such networks, communication conditions vary significantly between nodes, and upload latency exhibits strong uncertainty and dynamic changes. Existing federated learning methods often rely on stable communication conditions. For example, synchronous federated learning requires the server to wait for all participating nodes to complete their local updates before performing global aggregation in each training round. While this approach ensures good convergence consistency in stable communication environments, it can significantly extend the overall training cycle in weak network environments due to delays in individual nodes. Asynchronous federated learning allows the server to aggregate immediately upon receiving an update from any node. Although this reduces waiting time, the different upload times of each node result in varying degrees of staleness in the model parameters, potentially leading to inconsistent aggregation directions and affecting convergence stability, resulting in relatively low training efficiency. Semi-asynchronous federated learning balances the contradiction between synchronous and asynchronous to some extent by setting update quantity thresholds or caching mechanisms. However, existing methods mostly use fixed thresholds or triggering rules, which are difficult to adaptively adjust according to the dynamic communication conditions in weak network environments.

[0004] Therefore, existing federated learning methods are often difficult to apply to weakly connected sensor network scenarios. Researching a federated learning method with high training efficiency for weakly connected sensor networks is an urgent technical problem to be solved. Summary of the Invention

[0005] In view of the above-mentioned defects or improvement needs of the existing technology, the present invention provides a federated learning method and system for weakly linked sensor networks, so as to solve the technical problem of low training efficiency in the context of weakly linked sensor network scenarios.

[0006] To achieve the above objectives, in a first aspect, the present invention provides a federated learning method for weakly linked sensor networks, comprising: performing multiple rounds of iterative operations on a server side of a weakly linked sensor network system; wherein the t-th round of iterative operations includes: Determine the maximum waiting time in the t-th iteration based on the historical latency information of the client in the weakly linked sensor network system. The latency information refers to the time required for the local model in the corresponding client to complete one round of training and send the parameters back to the server. ; The first parameter is broadcast to all clients, and a timer is started. The server receives the second parameter returned by the client; the first parameter includes: the current global model parameters and version number on the server side. The second parameter includes: the change in the model parameters corresponding to the client and the version number received by the client. The model parameter change is the difference between the local model parameters after local model training and the received global model parameters. After receiving the second parameter returned by each client, the model parameter change in the second parameter is classified as normal change or outdated change according to the version number in the second parameter, and the corresponding aggregate weight is assigned to the corresponding client according to the type of model parameter change. The aggregate weight of the client corresponding to the normal change is greater than the aggregate weight of the client corresponding to the outdated change. When the timer reaches its set time... At that time, the changes in model parameters received from each client are globally aggregated based on the corresponding aggregation weights. After obtaining the total changes in model parameters, the total changes are added to the current global model parameters to update the global model. Each time the client receives the first parameter broadcast by the server, it updates the local model parameters to the global model parameters in the received first parameter, trains the local model using the local training set, calculates the change in the current model parameters, and sends it back to the server along with the version number in the received first parameter.

[0007] More preferably, ; When the version number in the second parameter When this happens, the change in the model parameter in the second parameter is classified as a normal change. When the version number in the second parameter When this happens, the change in the model parameter in the second parameter is classified as an outdated change.

[0008] More preferably, the maximum waiting time in the t-th iteration is determined based on the candidate time set. This includes: using the upper confidence bound algorithm to select a time value from the candidate time set as the maximum waiting time in the t-th iteration. The candidate time set is obtained by collecting latency information from each client in a pre-collected weakly linked sensor network system.

[0009] More preferably, the maximum waiting time in the t-th iteration is determined based on the historical latency information of the client in the weakly linked sensor network system. ,include: When each time value in the candidate time set has been selected a non-zero number of times from the first iteration to the (t-1)th iteration, the time value corresponding to the maximum upper confidence bound is taken as the maximum waiting time in the t-th iteration. ; If there are time values ​​in the candidate time set that have not been selected from the first iteration to the (t-1)th iteration, a time value is randomly selected from the unselected time values ​​in the candidate time set as the maximum waiting time for the tth iteration. ; For any time value in the candidate time set The number of times it is selected during the process from the first iteration to the (t-1)th iteration. When it is not 0, its upper confidence boundary value is:

[0010] The time values ​​from the first iteration to the (t-1)th iteration. The historical average reward value.

[0011] More preferably, the time value during the process from the first iteration to the (t-1)th iteration Historical average reward value for:

[0012] in, Time value The reward value in the k-th iteration; if the time value in the k-th iteration... If not selected, then ;otherwise, The expression for is:

[0013] and All are preset weighting coefficients; Customer engagement metrics; ; This represents the time value of the server in the k-th iteration. The number of normal changes received internally; The number of clients in a weakly linked sensor network system; The minimum time value in the candidate time set; For the time value of the server in the k-th iteration The data diversity index for normal variability received internally is as follows:

[0014] For the time value of the server in the k-th iteration The data sparseness of the i-th normal variation received internally is as follows:

[0015] For the time value of the server in the k-th iteration The difference in the direction of change between the i-th normal change and the j-th normal change received internally; ; For the time value of the server in the k-th iteration The similarity between the i-th normal variation and the j-th normal variation received internally.

[0016] More preferably, the above-mentioned allocation of corresponding aggregation weights to the corresponding clients based on the type of model parameter change includes: When the type of model parameter change is normal change, aggregate weights are assigned to the corresponding client. ; When the type of model parameter change is an outdated change, aggregate weights are assigned to the corresponding client. ; in, The data sparseness corresponding to the change in model parameters in the current iteration; The preset age decay coefficient; This is the version number in the second parameter corresponding to the change in the model parameters in the current iteration.

[0017] More preferably, the above-mentioned t-th iteration operation further includes: after receiving a second parameter returned by a client, when the change in the model parameter in the second parameter is a normal change, recording the client's latency information in the current iteration; The above method uses historical latency information from clients in a weakly linked sensor network system to determine the maximum waiting time in the t-th iteration. ,include: when At that time, the maximum waiting time in the t-th iteration. Preset time; when ,and hour, ; For the first The amount of delay information recorded during each iteration; when ,and At that time, the maximum waiting time in the t-th iteration. ;in, For the first The average value of all time delay information recorded in each iteration; The preset adjustment coefficient; This represents the number of clients in a weakly linked sensor network system.

[0018] More preferably, the total change in the above-mentioned model parameters is:

[0019] in, The maximum waiting time for the server in the current iteration The number of second parameters received internally; The maximum waiting time for the server in the current iteration The change in model parameters in the r-th second parameter received internally.

[0020] In a second aspect, the present invention provides a server-side component, comprising: a memory and a processor, wherein the memory stores a computer program, and the processor executes the federated learning method provided in the first aspect of the present invention when executing the computer program.

[0021] Thirdly, the present invention provides a weakly linked sensor network system, comprising: a server and multiple clients; Both the server-side and client-side memory store computer programs, which, when executed by their respective processors, are used to implement the federated learning method provided in the first aspect of this invention.

[0022] Fourthly, the present invention also provides a computer-readable storage medium comprising a stored computer program, wherein the computer program, when executed by a processor, controls the device in which the storage medium is located to execute the federated learning method provided in the first aspect of the present invention.

[0023] Fifthly, the invention also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the federated learning method provided in the first aspect of the invention.

[0024] In summary, the above-described technical solutions conceived in this invention can achieve the following beneficial effects: 1. This invention provides a federated learning method for weakly linked sensor networks. Considering that the network links of weakly linked sensor networks are often in a state of bandwidth limitation, high packet loss rate, and significant latency fluctuation, in each iteration, the maximum waiting time of the server is determined based on the historical latency information of each client in the weakly linked sensor network system. After broadcasting the first parameter to each client, the server only continuously receives the second parameter returned by the client within the maximum waiting time. After the maximum waiting time is exceeded, it stops receiving the second parameter returned by the client. This method has strong flexibility and adaptability, and can receive and process the client's training results within a reasonable time range, thereby avoiding training blockage caused by waiting for all nodes to complete uploading or over-reliance on the results returned by individual nodes, and improving the training efficiency for weakly linked sensor networks.

[0025] 2. Furthermore, the federated learning method provided by this invention, by constructing a maximum waiting time selection mechanism based on the upper confidence bound algorithm, dynamically decides the maximum waiting time for each iteration in a weakly linked sensor network environment, which can effectively reduce invalid waiting and increase the number of effective aggregations per unit time, thereby further improving training efficiency.

[0026] 3. Furthermore, the federated learning method provided by this invention addresses the problems of large communication latency fluctuations and significant differences in node communication capabilities in weakly linked sensor networks. When using the upper confidence bound algorithm to determine the maximum waiting time for the current iteration, the maximum waiting time selection problem is transformed into a multi-armed slot machine model. Different candidate times are regarded as "arms," ​​and a reward function that comprehensively considers client participation (corresponding to the client participation index) and data diversity (corresponding to the data diversity index) is constructed to make dynamic decisions on the maximum waiting time, which can further improve the overall training efficiency.

[0027] 4. Furthermore, the federated learning method provided by this invention implements a differentiated weighting strategy during the model aggregation stage, taking into account model parameter changes with different data distribution characteristics and delayed updates caused by asynchronous communication. Specifically, to suppress potential oscillations in the global model, for model parameter changes of the normal change type, the higher the data sparseness, the lower the aggregation weight assigned to the corresponding client; while for model parameter changes of the outdated change type, the aggregation weight assigned to the corresponding client decays exponentially with the staleness. Through this strategy, this invention can not only effectively utilize various heterogeneous data features under non-independent and identically distributed data conditions, but also significantly reduce the negative impact of outdated updates on the global optimization direction, thereby improving the accuracy of the global model and enhancing the stability of the training process.

[0028] 5. Furthermore, in the federated learning method provided by this invention, when At that time, the maximum waiting time in the t-th iteration. The average of all time values ​​in the candidate time set; when At that time, the maximum waiting time in the t-th iteration. Considering that the effective client latency information observed by the server can indirectly characterize the communication status of the current network environment, determining the maximum waiting time based on this information allows the waiting constraint to be dynamically adjusted according to the real-time communication situation. Therefore, the above design can reduce invalid waiting while increasing client participation, thereby further improving the overall training efficiency. Attached Figure Description

[0029] Figure 1 A flowchart of the t-th iteration operation provided in an embodiment of the present invention; Figure 2 The figure shows the experimental results of the model accuracy versus time curve obtained by using the federated learning method for weakly linked sensor networks provided in the embodiments of the present invention. Detailed Implementation

[0030] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.

[0031] Example 1 A federated learning method for weakly linked sensor networks is a semi-asynchronous federated learning method, comprising: performing multiple rounds of iterative operations on the server side of the weakly linked sensor network system; wherein, as... Figure 1As shown, the iteration operations in round t include: Determine the maximum waiting time in the t-th iteration based on the historical latency information of the client in the weakly linked sensor network system. The latency information refers to the time required for the local model in the corresponding client to complete one round of training and return parameters (in this embodiment, the returned parameters can be the local model parameters after training, the difference between the local model parameters after training and before training, or the subsequent second parameters, which are not limited here) to the server. ; The first parameter is broadcast to all clients, and a timer is started. Continuously receive the second parameter returned by the client within a specified time. The server then stops receiving the second parameter returned by the client; the first parameter includes: the server's current global model parameters and version number. The second parameter includes: the change in the model parameters corresponding to the client and the version number received by the client. The model parameter change is the difference between the local model parameters after local model training and the received global model parameters. After receiving the second parameter returned by each client, the model parameter change in the second parameter is classified as normal change or outdated change according to the version number in the second parameter, and the corresponding aggregate weight is assigned to the corresponding client according to the type of model parameter change. The aggregate weight of the client corresponding to the normal change is greater than the aggregate weight of the client corresponding to the outdated change. When the timer reaches its set time... At that time, the changes in model parameters received from each client are globally aggregated based on the corresponding aggregation weights. After obtaining the total changes in model parameters, the total changes are added to the current global model parameters to update the global model. Each time the client receives the first parameter broadcast by the server, it updates the local model parameters to the global model parameters in the received first parameter, trains the local model using the local training set, calculates the change in the current model parameters, and sends it back to the server along with the version number in the received first parameter.

[0032] In this embodiment, the global model on the server side and the local models in each client have the same structure. They can be selected according to the specific weakly linked sensor network task (such as classification task, recognition task, etc.). Any machine learning model can be used, with deep learning mode preferred, such as CNN model, Transformer model, MLP model, etc. There is no limitation here.

[0033] In this embodiment, each client performs local model training on its local dataset. Let the... The local dataset for each client is:

[0034] in, Indicates the first The first client dataset The feature vector of each sample, which is also the model input; This represents the label of the sample, which is also the expected output. Represents the dataset size.

[0035] The local optimization objective is to minimize the difference loss between the local model's output for the input sample and its corresponding label; the objective function in this embodiment is:

[0036] in, The cross-entropy loss function; For local models for samples The output of .

[0037] The client uses the gradient descent algorithm. Local updates:

[0038] in, This is the learning rate.

[0039] In this embodiment, the local model is a classification model; each sensor constructs a local dataset based on the signals it senses; wherein, the samples in the local dataset are signal samples collected by the sensors, and the sample labels indicate the signal type, which are usually determined based on manual annotation results or system-preset category identifiers.

[0040] After completing local training, the updated local model parameters are obtained. And calculate the local model parameters. The difference between the received global model parameters and the actual model parameters, i.e., the change in model parameters:

[0041] Client model parameter changes The received version number is then sent back to the server.

[0042] It should be noted that there are multiple methods for obtaining the candidate time set. For example, it can be obtained by deduplicating the latency information of each client in a pre-collected weak-link sensor network system, or by sampling from the latency information of each client in the pre-collected weak-link sensor network system. This is not limited here. Preferably, this embodiment chooses the latter; the specific process is as follows: In the pre-collection stage, the server does not perform actual global model parameter updates, but instead records the latency information of each client. Based on the collected latency information, a set of candidate times is generated using the quantile method. Specifically, the quantile set used... .

[0043] By sorting all time delay information (in ascending or descending order), from the quantile set The corresponding time delay information is extracted from each quantile position in the time delay distribution and used as a candidate time. This design preserves the representative characteristics of the time delay distribution while ensuring the diversity of the candidate set.

[0044] In one alternative implementation, ; When the version number in the second parameter When this happens, the change in the model parameter in the second parameter is classified as a normal change. When the version number in the second parameter When this happens, the change in the model parameter in the second parameter is classified as an outdated change.

[0045] It should be noted that the maximum waiting time in the t-th iteration is determined based on the historical latency information of the client in the weakly linked sensor network system. There are several methods. For example, in one alternative implementation, the upper confidence bound algorithm is used to select a time value from the candidate time set as the maximum waiting time in the t-th iteration. The candidate time set is obtained by collecting latency information from clients in a pre-collected weakly linked sensor network system. Specifically, the method includes: When each time value in the candidate time set has been selected a non-zero number of times from the first iteration to the (t-1)th iteration, the time value corresponding to the maximum upper confidence bound is taken as the maximum waiting time in the t-th iteration. ; If there are time values ​​in the candidate time set that have not been selected from the first iteration to the (t-1)th iteration, a time value is randomly selected from the unselected time values ​​in the candidate time set as the maximum waiting time for the tth iteration. ; For any time value in the candidate time set The number of times it is selected during the process from the first iteration to the (t-1)th iteration. When it is not 0, its upper confidence boundary value is:

[0046] The time values ​​from the first iteration to the (t-1)th iteration. The historical average reward value.

[0047] In another optional implementation, the above-mentioned t-th iteration operation further includes: after receiving a second parameter returned by a client, when the change in the model parameter in the second parameter is a normal change, recording the client's latency information in the current iteration (i.e., the time required for the local model in the client to complete one round of training and return the parameters to the server during the t-th iteration). The above method uses historical latency information from clients in a weakly linked sensor network system to determine the maximum waiting time in the t-th iteration. ,include: when At that time, the maximum waiting time in the t-th iteration. The preset time is preferably the average of all time values ​​in the candidate time set; when ,and hour, ; For the first The amount of delay information recorded during each iteration; when ,and At that time, the maximum waiting time in the t-th iteration. ;in, For the first The average value of all time delay information recorded in each iteration; The preset adjustment coefficient; This represents the number of clients in a weakly linked sensor network system.

[0048] In one alternative implementation, the time value during the process from the first iteration to the (t-1)th iteration... Historical average reward value for:

[0049] in, Time value The reward value in the k-th iteration; if the time value in the k-th iteration... If not selected, then ;otherwise, The expression for is:

[0050] and All of these are preset weighting coefficients. In one optional implementation method... The value is 0.5. The value is 0.5; Customer engagement metrics; ; This represents the time value of the server in the k-th iteration. The number of normal changes received internally; The number of clients in a weakly linked sensor network system; The minimum time value in the candidate time set; For the time value of the server in the k-th iteration The data diversity index for normal variability received internally is as follows:

[0051] For the time value of the server in the k-th iteration The data sparseness of the i-th normal variation received internally is as follows:

[0052] For the time value of the server in the k-th iteration The difference in the direction of change between the i-th normal change and the j-th normal change received internally; ; For the time value of the server in the k-th iteration The similarity between the i-th normal variation and the j-th normal variation received internally.

[0053] It should be noted that similarity can be measured using methods such as cosine similarity or Euclidean distance, and no particular method is specified here. Preferably, this embodiment uses cosine similarity for measurement.

[0054] In one optional implementation, the above-mentioned allocation of corresponding aggregation weights to the corresponding clients based on the type of model parameter change includes: When the type of model parameter change is normal change, aggregate weights are assigned to the corresponding client. ; When the type of model parameter change is an outdated change, aggregate weights are assigned to the corresponding client. ; in, The data sparseness corresponding to the change in model parameters in the current iteration; To preset the age decay coefficient, in one optional implementation, The value is 0.3; This is the version number in the second parameter corresponding to the change in the model parameters in the current iteration.

[0055] It's important to note that data scarcity measures the scarcity of data distribution. To suppress potential oscillations in the global model, for model parameter changes of the normal variation type, the higher the data scarcity, the lower the aggregation weight assigned to the corresponding client. However, for model parameter changes of the outdated variation type, the aggregation weight assigned to the corresponding client increases with the degree of obsolescence. It decays exponentially, and through the decay coefficient Control the decay rate.

[0056] In one optional implementation, the total change in the above-mentioned model parameters is:

[0057] in, The maximum waiting time for the server in the current iteration The number of second parameters received internally; The maximum waiting time for the server in the current iteration The change in model parameters in the r-th second parameter received internally.

[0058] In this embodiment, after each iteration, the server determines whether a preset convergence condition is met. In one optional implementation, the server determines whether the model has converged by judging whether the relative rate of change of the global model parameters after the current iteration is less than a preset threshold (0.5% in this optional implementation). If it is less, the preset convergence condition is met, and the iteration stops; otherwise, the next iteration continues.

[0059] Specifically, in this embodiment, the number is recorded as follows: The global model parameters obtained after the round of iterations are , No. The global model parameters obtained after the round of iterations are The server then uses the difference in global model parameters between two adjacent rounds. The norm represents the amount of change in model parameters, i.e. The server calculates the relative rate of change of global model parameters between adjacent rounds using the following formula:

[0060] In another optional implementation, the server determines whether to stop training by judging whether the number of iterations exceeds the preset maximum number of iterations (in this optional implementation, the value is 100). If so, the preset convergence condition is met and the iteration stops; otherwise, the next iteration operation continues.

[0061] To further illustrate the performance of the federated learning method for weakly linked sensor networks proposed in this embodiment, the following performance verification was performed: The experiment used the MNIST standard dataset, containing 20 clients, with each client exhibiting a non-independent and identically distributed data distribution. To realistically simulate communication conditions in a weak network environment, the experiment controlled the corresponding processes to enter a sleep state after local model training, thus simulating communication latency. In the experiment, the industry-leading FedAvg, FedAsync, and FedBuff algorithms were selected for horizontal comparison, representing synchronous, asynchronous, and semi-asynchronous federated learning architectures, respectively. A timestamp was recorded for each model accuracy test. (Refer to...) Figure 2 The experimental results show that the federated learning method proposed in this embodiment requires significantly less training time to achieve the same model accuracy than other existing federated learning algorithms. The experimental results also confirm that the federated learning method for weakly linked sensor networks proposed in this embodiment has higher training efficiency in weak network environments.

[0062] Example 2 A server-side component includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the federated learning method provided in Embodiment 1 of the present invention.

[0063] The relevant technical solutions are the same as the federated learning method provided in Embodiment 1 of this invention, and will not be repeated here.

[0064] Example 3 A weakly linked sensor network system includes: a server and multiple clients; Both the server-side and client-side memory store computer programs, which, when executed by their respective processors, are used to implement the federated learning method provided in Embodiment 1 of this invention.

[0065] The relevant technical solutions are the same as the federated learning method provided in Embodiment 1 of this invention, and will not be repeated here.

[0066] Example 4 A computer-readable storage medium includes a stored computer program, wherein the computer program, when executed by a processor, controls the device where the storage medium is located to execute the federated learning method provided in Embodiment 1 of the present invention.

[0067] The relevant technical solutions are the same as the federated learning method provided in Embodiment 1 of this invention, and will not be repeated here.

[0068] Example 5 A computer program product includes a computer program / instructions that, when executed by a processor, implement the federated learning method provided in Embodiment 1 of the present invention.

[0069] The relevant technical solutions are the same as the federated learning method provided in Embodiment 1 of this invention, and will not be repeated here.

[0070] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A federated learning method for a weakly linked sensor network, characterized in that, include: Perform multiple rounds of iterative operations on the server side of the weakly linked sensor network system; wherein the t-th round of iterative operations includes: Determining maximum waiting time in the tth round of iteration based on historical latency information of clients in a weak link sensor network system ; the latency information is a time length required for a local model in a corresponding client to complete a round of training and return parameters to a server; ; The first parameter is broadcast to all clients, and a timer is started. The server receives the second parameter returned by the client; the first parameter includes: the current global model parameters and version number on the server side. The second parameter includes: the change in model parameters corresponding to the client and the version number received by the client. The model parameter change is the difference between the local model parameters after local model training and the received global model parameters. After receiving the second parameter returned by each client, the model parameter change in the second parameter is classified as normal change or outdated change according to the version number in the second parameter, and the corresponding aggregate weight is assigned to the corresponding client according to the type of model parameter change. The aggregate weight of the client corresponding to the normal change is greater than the aggregate weight of the client corresponding to the outdated change. When the timer reaches its set time... At that time, the changes in model parameters received from each client are globally aggregated based on the corresponding aggregation weights. After obtaining the total changes in model parameters, the total changes are added to the current global model parameters to update the global model. Each time the client receives the first parameter broadcast by the server, it updates the local model parameters to the global model parameters in the received first parameter, trains the local model using the local training set, calculates the change in the current model parameters, and sends them back to the server along with the version number in the received first parameter.

2. The federated learning method according to claim 1, characterized in that, ; When the version number in the second parameter When this happens, the change in the model parameter in the second parameter is classified as a normal change. When the version number in the second parameter When this happens, the change in the model parameter in the second parameter is classified as an outdated change.

3. The federated learning method according to claim 1, characterized in that, The total change in model parameters is: in, The maximum waiting time for the server in the current iteration The number of second parameters received internally; The maximum waiting time for the server in the current iteration The change in model parameters in the r-th second parameter received internally.

4. The federated learning method according to any one of claims 1-3, characterized in that, The maximum waiting time in the t-th iteration is determined based on the historical latency information of the client in the weakly linked sensor network system. This includes: using the upper confidence bound algorithm to select a time value from the candidate time set as the maximum waiting time in the t-th iteration. The candidate time set is obtained by collecting latency information from each client in a pre-collected weakly linked sensor network system.

5. The federated learning method according to claim 4, characterized in that, The maximum waiting time in the t-th iteration is determined based on the historical latency information of the client in the weakly linked sensor network system. ,include: When each time value in the candidate time set has been selected a non-zero number of times from the first iteration to the (t-1)th iteration, the time value corresponding to the maximum upper confidence bound is taken as the maximum waiting time in the t-th iteration. ; If there are time values ​​in the candidate time set that have not been selected from the first iteration to the (t-1)th iteration, a time value is randomly selected from the unselected time values ​​in the candidate time set as the maximum waiting time for the tth iteration. ; For any time value in the candidate time set The number of times it is selected during the process from the first iteration to the (t-1)th iteration. When it is not 0, its upper confidence boundary value is: The time values ​​from the first iteration to the (t-1)th iteration. The historical average reward value.

6. The federated learning method according to claim 5, characterized in that, Time value from the first iteration to the (t-1)th iteration Historical average reward value for: in, Time value The reward value in the k-th iteration; if the time value in the k-th iteration... If not selected, then ;otherwise, The expression for is: and All are preset weighting coefficients; Customer engagement metrics; ; This represents the time value of the server in the k-th iteration. The number of normal changes received internally; The number of clients in a weakly linked sensor network system; The minimum time value in the candidate time set; For the time value of the server in the k-th iteration The data diversity index for normal variability received internally is as follows: For the time value of the server in the k-th iteration The data sparseness of the i-th normal variation received internally is as follows: For the time value of the server in the k-th iteration The difference in the direction of change between the i-th normal change and the j-th normal change received internally; ; For the time value of the server in the k-th iteration The similarity between the i-th normal variation and the j-th normal variation received internally.

7. The federated learning method according to claim 6, characterized in that, The process of assigning corresponding aggregate weights to the corresponding clients based on the type of model parameter change includes: When the type of model parameter change is normal change, aggregate weights are assigned to the corresponding client. ; When the type of model parameter change is an outdated change, aggregate weights are assigned to the corresponding client. ; in, The data sparseness corresponding to the change in model parameters in the current iteration; The preset age decay coefficient; This is the version number in the second parameter corresponding to the change in the model parameters in the current iteration.

8. The federated learning method according to any one of claims 1-3, characterized in that, The t-th iteration operation also includes: after receiving the second parameter returned by a client, when the change in the model parameter in the second parameter is a normal change, recording the client's latency information in the current iteration; The maximum waiting time in the t-th iteration is determined based on the historical latency information of the client in the weakly linked sensor network system. ,include: when At that time, the maximum waiting time in the t-th iteration. Preset time; when ,and hour, ; For the first The amount of delay information recorded during each iteration; when ,and At that time, the maximum waiting time in the t-th iteration. ;in, For the first The average value of all time delay information recorded in each iteration; The preset adjustment coefficient; This represents the number of clients in a weakly linked sensor network system.

9. A server-side component, characterized in that, include: A memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the federated learning method according to any one of claims 1-6.

10. A weakly linked sensor network system, characterized in that, include: One server and multiple clients; Both the server and the client have computer programs stored in their respective memory. When executed by their respective processors, these computer programs are used to implement the federated learning method according to any one of claims 1-6.