Federal learning distributed resource management method based on price discrimination game

By introducing a resource management method of price discrimination game in federated learning, the federated learning model has been solved in the existing technology, with low accuracy, long training time and high cost, and more efficient resource utilization and better model performance.

CN120066769APending Publication Date: 2025-05-30NANJING UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510111227.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-23
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

In federated learning, existing resource management methods have low model accuracy, long model training time, high training cost, and it is difficult to effectively motivate clients to participate in federated learning.

Method used

A federated learning distributed resource management method based on price discrimination game is proposed. By building the optimization problem between server and client, the price discrimination game algorithm is used to dynamically adjust the server's pricing strategy and client's resource allocation strategy to improve the overall performance of federated learning.

Benefits of technology

An effective balance between model accuracy, training time and resource cost is achieved, the fairness and resource utilization efficiency of the federated learning system are improved, and client participation is encouraged.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120066769A_ABST
    Figure CN120066769A_ABST
Patent Text Reader

Abstract

The invention discloses a federated learning distributed resource management method based on a price discrimination game, and the method comprises the steps: constructing and training a federated learning model, and enabling a server to select a client subset from a client set, the clients in the client subset are used for receiving the global model obtained by training and then distributing CPU frequency according to the global model to complete training of the local model; constructing a communication and calculation model according to the trained federal learning model; respectively constructing a server utility function and a client utility function according to the federated learning model and the communication and calculation model; constructing a server and client optimization problem; and solving a server and client optimization problem based on a price discrimination game algorithm to obtain an optimal resource allocation strategy. Only the overall performance of federated learning is improved, effective balance among model precision, training time and resource cost is also realized, and the fairness and resource utilization efficiency of a federated learning system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of resource management, and particularly to a federated learning distributed resource management method based on price discrimination game. Background Art

[0002] With the rapid development of artificial intelligence technology, data-driven machine learning has become an important tool for promoting the digital transformation of society. However, in many practical scenarios, the dispersion of data and the need for privacy protection pose severe challenges to traditional centralized machine learning methods. For example, in the medical and financial fields, data is usually distributed among multiple devices or institutions, and due to privacy protection or policy regulations, it is difficult to centralize it for processing at a single center. Federated learning coordinates multiple clients to independently train models using local data and aggregates and updates the global model on the server side. This method avoids the centralized storage and transmission of data, effectively protects data privacy, and at the same time alleviates the problem of data silos.

[0003] In the resource management method based on federated learning, the client uses local data to train the model and uploads the model parameters to the server, while the server is responsible for aggregating and updating the global model. Since the client's participation in federated learning incurs computational energy consumption and communication energy consumption, without rewards, it may be unwilling to cooperate with the server for federated learning. Therefore, the server faces the problem of being unable to effectively motivate the client to participate in federated learning. In addition, the client's data resources, computing capabilities, and channel conditions are different from each other, which results in different contributions of each client to the federated learning task. Therefore, it is also a problem that the server needs to solve to select appropriate clients to participate in federated learning to improve the model accuracy of federated learning while reducing the training time and cost. For the client, it needs to solve the problem of whether to participate in federated learning and how much computing resource to provide. Generally speaking, the existing resource management methods have low model accuracy, long model training time, and high training cost.

[0004] Therefore, the applicant has developed a federated learning distributed resource management method based on price discrimination game to solve the above problems. Summary of the Invention

[0005] The present invention proposes a federated learning distributed resource management method based on price discrimination game to solve the problems of low model accuracy, long model training time, and high training cost of the existing resource management methods.

[0006] The present invention realizes the above object through the following technical solutions:

[0007] The present invention provides a federated learning distributed resource management method based on price discrimination game, including:

[0008] Build and train a federated learning model, where the federated learning model includes a server and a set of clients. The server is used to select a subset of clients from the set of clients, and the clients in the subset of clients are used to complete the training of the local model by allocating the CPU frequency according to the globally trained model.

[0009] Build a communication and computing model according to the trained federated learning model. The communication and computing model is used to calculate the time for the clients in the subset of clients to complete local training, the computing energy consumption, and the communication energy consumption with the server.

[0010] Build a server utility function and a client utility function according to the federated learning model and the communication and computing model respectively.

[0011] Build a server-client optimization problem. The objective function of the server-client optimization problem includes maximizing the client utility function and minimizing the server utility function. The constraint conditions of the server-client optimization problem include the computing power constraint of the client and the client selection constraint of the server.

[0012] Solve the server-client optimization problem based on the price discrimination game algorithm to obtain the optimal resource allocation strategy.

[0013] Specifically, building the federated learning model includes:

[0014] Build a set of clients, where the set of clients includes several clients, and each client locally stores a training data set.

[0015] Build a server, where the server is connected to each client through a wireless link. The server is used to select a subset of clients from the set of clients to participate in federated learning according to a preset rule. Each selected client is used to independently train a local model using the training data set and then output the local model parameters. The server is also used to aggregate the locally trained local models and local model parameters uploaded by all the selected clients to generate a global model, and broadcast the global model to the subset of clients.

[0016] Specifically, training the federated learning model includes:

[0017] Locally iteratively train to obtain the local model. In the local iterative training, the training objective of each selected client is to minimize the average prediction loss of the training data set, and each selected client iteratively uses the stochastic gradient descent algorithm on the training data set to reduce the average prediction loss.

[0018] Perform global iterative training based on the second iterative training result to obtain the global model. In the global iterative training, the client is used to upload the locally trained model parameters to the server for model aggregation, and the server is used to update the global model after receiving the local models uploaded by each selected client.

[0019] Specifically, construct a communication and computing model based on the trained federated learning model, including:

[0020] Construct a time calculation function for the client to complete local training. The formula of the time calculation function is as follows:

[0021]

[0022] represents the training data set, represents the number of CPU cycles required to train the model on one data sample once, represents the client at for times of training represents, represents the client the allocated CPU frequency for participating in federated learning, represents the client subset;

[0023] Construct a computing energy consumption function for the client to complete local training. The formula of the computing energy consumption function is as follows:

[0024]

[0025] represents the client at for times of training computing energy consumption, represents the effective capacitance coefficient of the client CPU;

[0026] Construct a communication energy consumption calculation function between the client and the server. The formula of the communication energy consumption calculation function is as follows:

[0027]

[0028]

[0029]

[0030] represents the client The communication energy consumption consumed by uploading model parameters to the server, denotes the client transmitting the model parameters to the server transmission power, denotes the client to the channel gain of the server, from the client to the achievable transmission rate of the server, is the client to the channel bandwidth of the server, is the noise power at the server, denotes the client uploading the model parameters to the time required by the server.

[0031] Specifically, the server utility function and the client utility function are respectively constructed according to the federated learning model and the communication and computing model, including:

[0032] Construct the client utility function, and the client utility function includes:

[0033]

[0034]

[0035] Among them, denotes the client utility function, is the price paid by the server to the client , denotes the maximum completion time of each local iteration of the client, denotes the client the time required to complete the local iteration, is the client unit energy consumption cost;

[0036] Construct the server utility function, and the server utility function includes:

[0037]

[0038]

[0039] Among them is the weight of the loss of the federated learning model, denotes and the upper bound of the expected difference, and respectively denote and The model loss, represents the optimal model parameters of federated learning, and the optimal model parameters minimize the loss function of the federated learning model. represents after the global model parameters after global iterations, , , represents the time required for each local iteration.

[0040] Specifically, constructing the optimization problem for the server and clients includes:

[0041] Constructing the objective function, which includes:

[0042]

[0043]

[0044] Constructing the constraint conditions, which include:

[0045]

[0046]

[0047]

[0048]

[0049]

[0050]

[0051] Among them, the first constraint means that the utility of all clients not selected to participate in the federated learning task is all 0, the second constraint stipulates that the utility of all clients participating in the federated learning is greater than 0, the third constraint represents the frequency assigned to the client to participate in the federated learning is non - negative and cannot exceed its own maximum CPU frequency , the fourth constraint stipulates that the server needs to select a subset from the client set to participate in the federated learning, the fifth constraint stipulates that in the server's price strategy , if the client is not selected by the server, then there is , the sixth constraint stipulates that in the server's price strategy , if the client is selected to participate in the federated learning, then it needs to satisfy , represents the pricing strategy of the server, ( ) represents the minimum price received by the client When, it is guaranteed that the second constraint holds.

[0052] Specifically, solving the optimization problem of the server and the client based on the price discrimination game algorithm includes solving the optimal strategy of the client. The steps of solving the optimal strategy of the client include:

[0053] For each client selected to participate in federated learning , substitute the training time expression and the computing energy consumption expression into the formula to obtain:

[0054]

[0055] Substitute with respect to and take the first derivative to obtain:

[0056]

[0057] The CPU frequency at the maximum point can be obtained as:

[0058]

[0059] The client 's optimal CPU frequency strategy is:

[0060]

[0061] Solving the function can obtain:

[0062] .

[0063] Specifically, solving the optimization problem of the server and the client based on the price discrimination game algorithm includes analyzing the server utility function according to the optimal strategy of the client;

[0064] Without considering the maximum CPU frequency constraint and the minimum price constraint, the optimal time for the client to complete local iteration satisfies:

[0065]

[0066] By substituting into the formula , it is deduced that the client uses the strategy The corresponding pricing strategy is as follows:

[0067]

[0068] By solving the function , the minimum price and the longest local iteration time of the client at are obtained. Substituting into the formula , the shortest local iteration time corresponding to the client using the maximum CPU frequency can be obtained ; ;

[0069] The range of the local iteration time of the client is given by the following formula:

[0070]

[0071] The local iteration time of the client is:

[0072]

[0073] The corresponding pricing strategy of the server regarding the client is as follows:

[0074]

[0075] Rewrite the server utility function as

[0076]

[0077] where

[0078]

[0079] is the income that the client can obtain from the server;

[0080] When , the value range of is and the first derivative of

[0081]

[0082] where:

[0083]

[0084] When , and , which means when , with respect to is monotonically increasing. When time , since when time with respect to is monotonically increasing. Based on the above analysis, it can be proved that the value is always negative or first negative and then positive as increases. Therefore, when time is with respect to monotonic or first decreasing and then increasing.

[0085] Specifically, solving the optimization problem of the server and the client based on the price discrimination game algorithm includes solving the optimal price strategy of the server according to the optimal strategy of the client and the analysis result of analyzing the server utility function:

[0086] For each client in , calculate and , and upload and to the server;

[0087] Initialize and in the server, calculate the initial , initialize and , calculate the initial ;

[0088] Enter the first loop. The first loop includes: increasing the pricing of the client with the largest in the server, and feedbacking the updated to the client , using the updated , updating and respectively according to the optimal strategy in each client and , uploading to the server, and updating in the server;

[0089] Repeat the first loop until starts to increase or .

[0090] Specifically, solving the optimization problem of the server and the client based on the price discrimination game algorithm includes solving the client selection problem based on the greedy algorithm. Solving the client selection problem based on the greedy algorithm includes:

[0091] Input the set of candidate clients of the server and initialize ;

[0092] By performing the step of "solving the optimal price strategy of the server" on the set , obtain ;

[0093] Enter the second loop. The second loop includes, for each client in , let . By performing the step of "solving the optimal price strategy of the server" on the set , obtain . Let , and update and ;

[0094] Repeat the second loop until starts to increase or the number of selected clients satisfies .

[0095] The beneficial effects of the present invention are as follows:

[0096] A federated learning distributed resource management method based on price discrimination game proposed by the present invention can dynamically adjust the pricing strategy of the server and the resource allocation strategy of the client by introducing the price discrimination game, which not only improves the overall performance of federated learning, but also achieves an effective balance among model accuracy, training time, and resource cost. At the same time, the heterogeneity of the client is actually considered in the client selection and incentive mechanism design, thereby improving the fairness and resource utilization efficiency of the federated learning system. BRIEF DESCRIPTION OF THE DRAWINGS

[0097] Figure 1 is a flowchart of a federated learning distributed resource management method based on price discrimination game in an embodiment of the present invention.

[0098] Figure 2 is a simulation diagram of the convergence of the federated learning model accuracy in an embodiment of the present invention.

[0099] Figure 3 is a simulation diagram of the federated learning training time in an embodiment of the present invention.

[0100] Figure 4 is a simulation diagram of the server utility when using different client selection algorithms in an embodiment of the present invention.

[0101] Figure 5 This is a simulation diagram of the utility of the federated learning client when using different client selection algorithms in the embodiments of the present invention.

[0102] Figure 6 This is a simulation diagram of the utility of the federated learning server when using different pricing strategies in the embodiments of the present invention.

[0103] Figure 7 This is a simulation diagram of the utility of the federated learning client when using different pricing strategies in the embodiments of the present invention. Detailed implementation manners

[0104] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Generally, the components of the embodiments of the present invention described and illustrated in the accompanying drawings here can be arranged and designed in various different configurations.

[0105] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed present invention, but merely represents selected embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts fall within the protection scope of the present invention.

[0106] It should be noted that: similar reference numerals and letters denote similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.

[0107] In the description of the present invention, it should be understood that the orientation or positional relationship indicated by the terms "upper", "lower", "inner", "outer", "left", "right", etc. is based on the orientation or positional relationship shown in the drawings, or the orientation or positional relationship when the product of the present invention is normally placed, or the orientation or positional relationship commonly understood by those skilled in the art. It is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus cannot be construed as a limitation of the present invention.

[0108] In addition, the terms "first", "second", etc. are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance.

[0109] In the description of the present invention, it should also be noted that, unless otherwise clearly specified and limited, terms such as "set" and "connect" should be understood in a broad sense. For example, "connect" can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, and it can be the communication inside two components. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0110] The embodiments of the present invention will be further described below with reference to the accompanying drawings. As Figure 1 shown, it specifically includes the following steps:

[0111] S1: Construct and train a federated learning model;

[0112] The set contains clients, and there is a server connected to each client in through a wireless link. The server is the initiator of the federated learning, and the clients in are potential participants in the federated learning. Each client in locally stores a training data set with a size of . Each data sample is represented by a tuple , where represents the data input of the sample for the federated learning, and

[0113] The server selects a suitable subset of clients from the candidate client set to participate in the federated learning, and broadcasts the global model to the clients in . Each selected client independently uses all the local data to train a local model. Let represent the local model parameters of client obtained by training with the global model. Let represent the difference between the predicted label and the true label of the sample . The training objective of client is to minimize the following average prediction loss on the local data set:

[0114]

[0115] Each client The random gradient descent algorithm can be iteratively used on the training dataset times to reduce the average prediction loss. After that, the client will upload the trained

[0116] local model to the server for model aggregation, which completes one round of local iteration. After receiving the local models uploaded by all clients in the set

[0117]

[0118] where . This ends one round of global iteration, and such global iterations will repeat times, and then the federated learning task ends.

[0119] S2. Build communication and computing models

[0120] In each round of global iteration, when the client receives the global model, it needs to allocate the CPU frequency to complete the training of the local model. Let represent the number of CPU cycles required to train the model once on a sample . Let represent the maximum CPU frequency of the client , represent the CPU frequency allocated by the client for participating in federated learning, satisfying . In each round of local iteration, the client performs times of SGD training on , and the training time can be expressed as:

[0121]

[0122] Let represent the effective capacitance coefficient of the CPU of the client . The computing energy consumption consumed by the client to complete local training is given by the following formula:

[0123]

[0124] Let represent the transmission power of the client to transmit the model parameters , represent the channel gain from the client to the server, then the achievable transmission rate from the client to the server is:

[0125]

[0126] where is the channel bandwidth from the client to the server, and is the noise power at the server. The time required for the client to upload the model parameters to the server can be expressed as:

[0127]

[0128] where represents the size of the model parameters . The communication energy consumption consumed by the client to upload the model parameters to the server is given by:

[0129]

[0130] S3. Construct the server utility function and the client utility function

[0131] In the present invention, the following two metrics are provided to describe the performance in terms of federated learning accuracy and training time.

[0132] Model loss: Let represent the optimal model parameters of federated learning, that is, these model parameters can minimize the loss function of the federated learning model. Let represent the global model parameters after global iterations. Use and to represent the model losses of and respectively. and The upper bound of the expected difference is:

[0133]

[0134] Training time: Let represent the time required for each local iteration, which depends on the time spent by the last client in the set to complete the local iteration. The time required for the client to complete the local iteration is:

[0135]

[0136] The utility function of the client is defined as:

[0137]

[0138] wherein is the price paid by the server to the client , is the unit energy consumption cost of the client .

[0139] As the buyer in federated learning, the server aims to reduce the global iteration time of federated learning and the payment cost to incentivize clients to participate in federated learning. Its utility function is defined as

[0140]

[0141] wherein is the weight of the loss of the federated learning model is the weight of the training time

[0142] S4. Construct the optimization problems for the server and the client;

[0143] The goal of the client is to obtain as much additional profit as possible by participating in federated learning. Based on the previous system model and energy reception model, it can be modeled as the following problem:

[0144]

[0145]

[0146]

[0147]

[0148] The first constraint means that the utility of all clients not selected to participate in the federated learning task is 0. The second constraint stipulates that the utility of all clients participating in federated learning is greater than 0, which means that for each client , there exists a minimum price. Let ( ) denote the minimum price that client can receive. When , it can ensure the establishment of the second constraint . The value of will be discussed in the part of game solution. The third constraint means that the frequency allocated for the client to participate in federated learning is non - negative and cannot exceed its maximum CPU frequency

[0149] Let denote the pricing strategy of the server, including the pricing strategy of the server for each client. Before the start of federated learning, the server needs to select a subset from the client set to participate in federated learning. Therefore, in the price strategy of the server Among them, if the client is not selected by the server, then there is , if the client is selected to participate in federated learning, it needs to meet . The goal of the server is modeled as the following problem

[0150]

[0151]

[0152]

[0153]

[0154] S5. Solve the optimization problem of the server and the client based on the price discrimination game algorithm;

[0155] This step includes the following sub-steps:

[0156] S51. Solve the optimal strategy of the client;

[0157] For each client selected to participate in federated learning , substitute the training time expression and the computing energy consumption expression into the formula to get:

[0158]

[0159] Substitute with respect to to find the first derivative and get:

[0160]

[0161] When increasing from 0, the value of with respect to is a concave function, there is a maximum point, let to get the CPU frequency at the maximum point as:

[0162]

[0163] Since there is a constraint on the CPU frequency of the client, the optimal CPU frequency strategy of the client is:

[0164]

[0165] However, the optimal CPU frequency strategy does not guarantee Established, to satisfy the constraints , the condition should be satisfied , where is the minimum price acceptable to the client . Since with respect to is monotonic, solving the function yields:

[0166]

[0167] S52. When the client selection strategy is fixed, analyze the properties of the server utility function;

[0168] When the maximum CPU frequency constraint and the minimum price constraint are not considered, the optimal time for the client to complete local iteration satisfies:

[0169]

[0170] By substituting into the formula , the price strategy corresponding to the client using the strategy is:

[0171]

[0172] By solving the function , the minimum price and the longest local iteration time of the client at can be obtained . Substituting into the formula gives the shortest local iteration time corresponding to the client using the maximum CPU frequency .

[0173] The range of the client's local iteration time is given by the following formula:

[0174]

[0175] The client's local iteration time is:

[0176]

[0177] The corresponding server price strategy regarding the client is:

[0178]

[0179] Rewrite the server's utility function as:

[0180]

[0181] Among them:

[0182]

[0183] is the revenue that the client can obtain from the server.

[0184] When , the value range of . The first derivative of

[0185]

[0186] Among them:

[0187]

[0188] When , and . This indicates that when , with respect to is monotonically increasing. When , . Since , when with respect to is monotonically increasing. According to the above analysis, it can be proved that the value of is always negative or first negative and then positive as increases. Therefore, when is with respect to monotonic or first decreasing and then increasing.

[0189] S53. When the client selection strategy is fixed, solve the optimal price strategy of the server;

[0190] In the feasible region, has a unique minimum value, and it can be obtained by continuously increasing the client with the largest of to encourage it to reduce until and cannot be further reduced. Therefore, inspired by the water filling algorithm, design the algorithm shown in the following program steps to solve the optimal price of the server when the known client selection set is available:

[0191] For each​ each client in :

[0192] calculate , and , and upload and to the server;

[0193] The server initializes and , calculates the initial

[0194] Repeat

[0195] The server increases the pricing for the client with the largest and feeds back the updated pricing to the client ; ;

[0196] Using the updated , each client updates and respectively according to the optimal strategy, and uploads to the server;

[0197] The server updates ;

[0198] Until starts to increase or .

[0199] S54. Solve the client selection problem;

[0200] Use the greedy algorithm to solve this problem. The main idea is to allow the client to select all candidate clients in the set at the beginning to participate in federated learning. Then, the server continuously removes the client with the largest marginal utility, that is, the client that causes the utility of the server to increase more, until cannot be further reduced by removing any client or the number of selected clients reaches the threshold , and the method program steps are as follows:

[0201] Input: The set of candidate clients of the server ;

[0202] Initialization: .

[0203] By being in the set Execute the algorithm in S53 to obtain .

[0204] Repeat

[0205] For each client in :

[0206] Let .

[0207] By executing the algorithm in Table S53 on the set to obtain .

[0208] Let .

[0209] Update and .

[0210] Until starts to increase or the number of selected clients satisfies .

[0211] To verify the performance of the method of the present invention, the present invention compares the following algorithms. Given the number of clients that the server can select from the set , ordinary FedAvg randomly selects from clients to participate in federated learning. The optimized FedAvg with a client selection algorithm can select clients with the largest number of data samples to achieve the highest test accuracy (accuracy-first algorithm) or select with the shortest clients to minimize the total training time (time-first algorithm).

[0212] Figure 2 shows the convergence of the test accuracy of AlexNet trained using different algorithms under IID and Non-IID settings respectively. It can be seen from Figure 2 that as the number of global training rounds increases, the test accuracy achieved by the price discrimination game method under IID and Non-IID settings is very close to that of the accuracy-first algorithm and significantly better than other algorithms.

[0213] Figure 3 and Figure 4 compare the training time of clients and the server utility when using different algorithms under IID and Non-IID settings respectively. It can be seen from Figure 3It can be seen that under the IID and Non-IID conditions, the time consumed by the present invention is slightly more than that of the time-first algorithm, but significantly lower than that of other algorithms, verifying that the proposed price discrimination game can achieve a good balance between model accuracy and training time. This conclusion is also verified in Figure 4 the results shown, and in all cases, the method of the present invention minimizes the utility of the server.

[0214] When the server selects 10 clients from the set of potential clients to participate in federated learning, Figure 5 a comparison of the utility of each selected client when using different client selection algorithms is provided. As can be seen from Figure 5 it, the present invention minimizes the difference in utility obtained by each client.

[0215] Figure 6 Compared with Figure 7 which studied the advantages of the pricing strategy in the proposed present invention, the present invention compared the algorithm based on the uniform pricing strategy, called the uniform pricing game. The uniform pricing game only prices all its clients equally according to the local iteration time of federated learning for different clients, without considering the differences in their data resources, computing resources, and channel conditions. Under the IID setting, 10 clients are designated to participate in federated learning, and the time required for one round of global iteration is continuously increased .

[0216] As increases, Figure 6 the utility achieved by the server in the price discrimination game and the uniform pricing game of the present invention is compared. For any global iteration time , the price discrimination game of the present invention is superior to the uniform pricing game because it can always enable the server to obtain a lower utility than the uniform pricing game. Figure 7 The utility obtained by each client under different pricing strategies is compared. The training workload (i.e., the amount of training data) of all clients is sorted from small to large. It can be observed that when using the price discrimination game method of the present invention, clients with more training data can obtain higher income.

[0217] The above are only the preferred embodiments of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the technical principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.

Claims

1. A method for managing distributed resources in federated learning based on price discrimination game, characterized in that: include: Constructing and training a federated learning model, wherein the federated learning model includes a server and a client set, wherein the server is used to select a client subset from the client set, and the clients in the client subset are used to complete the training of a local model after receiving a trained global model and allocating a CPU frequency according to the global model; Building a communication and computing model according to the trained federated learning model, wherein the communication and computing model is used to calculate the time for the clients in the client subset to complete local training, computing energy consumption, and communication energy consumption with the server; Constructing a server utility function and a client utility function according to the federated learning model and the communication and computing model respectively; Constructing a server-client optimization problem, wherein the objective function of the server-client optimization problem includes maximizing the client utility function and minimizing the server utility function, and the constraints of the server-client optimization problem include the computing power constraint of the client and the client selection constraint of the server; The server and client optimization problem is solved based on the price discrimination game algorithm to obtain the best resource allocation strategy.

2. According to claim 1, a method for managing distributed resources in federated learning based on price discrimination game, characterized in that: Constructing the federated learning model includes: Constructing a client set, wherein the client set includes a plurality of clients, each of which has a training data set stored locally; A server is constructed, wherein the server is connected to each of the clients via a wireless link, and the server is used to select a subset of clients from the client set to participate in federated learning according to a preset rule, and each of the selected clients is used to independently train a local model using the training data set and then output local model parameters. The server is also used to aggregate the local models and local model parameters obtained after training uploaded by all the selected clients to generate a global model, and broadcast the global model to the client subset.

3. According to claim 2, a method for managing distributed resources in federated learning based on price discrimination game, characterized in that: Training the federated learning model, including: The local model is obtained by local iterative training, wherein the training goal of each selected client in the local iterative training is to minimize the average prediction loss of the training data set, and each selected client iteratively uses a stochastic gradient descent algorithm on the training data set to reduce the average prediction loss; Global iterative training is performed according to the results of the second iterative training to obtain the global model. In the global iterative training, the client is used to upload the local model parameters obtained after training to the server for model aggregation. The server is used to update the global model after receiving the local model uploaded by each selected client.

4. According to claim 3, a method for managing distributed resources in federated learning based on price discrimination game, characterized in that: Building a communication and computing model based on the trained federated learning model, including: Construct a time calculation function for the client to complete local training. The formula of the time calculation function is as follows: , represents the training data set, Indicates training the model on a data sample The number of CPU cycles required at a time, Represents the client exist On Time of training express, Represents the client The CPU frequency allocated to participate in federated learning, Represents a subset of clients; Construct a computational energy consumption function for the client to complete local training. The formula of the computational energy consumption function is as follows: , Represents the client exist On The computational energy consumption of training times, Represents the client The effective capacitance coefficient of the CPU; A communication energy consumption calculation function between the client and the server is constructed, and the formula of the communication energy consumption calculation function is as follows: , , , Represents the client The model parameters The communication energy consumed when uploading to the server, Represents the client Transfer model parameters to the server The transmission power, Represents the client Channel gain to the server, From the client The achievable transfer rate to the server, Is the client The channel bandwidth to the server, is the noise power at the server, Represents the client The model parameters The time required to upload to the server.

5. According to claim 4, a method for managing distributed resources in federated learning based on price discrimination game, characterized in that: A server utility function and a client utility function are respectively constructed according to the federated learning model and the communication and computing model, including: Construct a client utility function, the client utility function comprising: , , in, represents the client utility function, The server pays the client The price, Indicates the maximum completion time of each round of local iteration on the client. Represents the client The time required to complete the local iteration, Is the client Unit energy cost; Constructing a server utility function, the server utility function comprising: , , in is the weight of the federated learning model loss, express and The upper bound of the expected difference is and Respectively and The model loss is represents the optimal model parameters of federated learning, and the optimal model parameters minimize the loss function of the federated learning model, Indicates passing The global model parameters after global iterations, is the weight of training time, , , Indicates the time required for each round of the local iteration.

6. A method for managing distributed resources in federated learning based on price discrimination game according to claim 5, characterized in that: Build server and client optimization issues, including: Construct an objective function, wherein the objective function includes: , , Construct constraints, including: , , , , , , The first constraint represents the utility of all clients that are not selected to participate in the federated learning task. are all 0. The second constraint stipulates the utility of all clients participating in federated learning. Greater than 0, the third constraint indicates the frequency assigned to the client to participate in federated learning Non-negative and cannot exceed its own maximum CPU frequency , the fourth constraint states that the server needs to collect Select a subset of participants in federated learning , the fifth constraint stipulates the pricing policy of the server If the client Not selected by the server, then , the sixth constraint specifies the price policy for the server If the client To be selected to participate in federated learning, you need to meet , represents the pricing strategy of the server, ( ) indicates the client The minimum price received when , the second constraint is guaranteed to hold.

7. A method for managing distributed resources in federated learning based on price discrimination game according to claim 6, characterized in that: Solving the server and client optimization problem based on the price discrimination game algorithm includes solving the optimal strategy of the client. The steps of solving the optimal strategy of the client include: For each client selected to participate in federated learning , substitute the training time expression and computing energy consumption expression into the formula In, we get: , Will about Taking the first-order derivative we get: , The CPU frequency at the maximum value point is: , Client The optimal CPU frequency strategy is: , Solving function You can get: 。 8. The method for managing distributed resources in federated learning based on price discrimination game according to claim 7, characterized in that: Solving the server and client optimization problem based on a price discrimination game algorithm, including analyzing the server utility function according to the optimal strategy of the client; Without considering the maximum CPU frequency constraint and the minimum price constraint, the client The optimal time to complete a local iteration satisfies: , By Substitute into the formula , derive the client Usage strategy The corresponding pricing strategy is: , By solving the function , get the client exist The minimum price and the maximum local iteration time when ,Will Substitute into the formula In the example above, we can get the shortest local iteration time corresponding to the client using the maximum CPU frequency. ; The client's local iteration time range is given by: , The client local iteration time is: , The corresponding server about the client The pricing strategy is: , Rewrite the server utility function as , in , Is the client Income that can be earned from the server; when hour, The value range is , The first-order derivative of is , in: , when hour, and , which means that when hour, about is monotonically increasing, when hour, ,because ,when hour about is monotonically increasing. According to the above analysis, it can be proved that The value is always negative or The increase of is first negative and then positive, so when hour About It is monotonic or decreases first and then increases.

9. A method for managing distributed resources in federated learning based on price discrimination game according to claim 8, characterized in that: Solving the server and client optimization problem based on the price discrimination game algorithm includes solving the optimal price strategy of the server according to the optimal strategy of the client and the analysis result of the server utility function: For each Each client in , calculate and , and and Upload to the server; Initialize in the server and , calculate the initial ,initialization and , calculate the initial ; Entering a first loop, the first loop comprising: adding a pair with maximum Client Pricing , and the updated Feedback to the client , using the updated , on each client According to the optimal strategy, and ,Will Upload to server, update in said server ; Repeat the first cycle until Start to grow or .

10. A method for managing distributed resources in federated learning based on price discrimination game according to claim 9, characterized in that: Solving the server and client optimization problem based on the price discrimination game algorithm includes solving the client selection problem based on the greedy algorithm. Solving the client selection problem based on the greedy algorithm includes: Enter the candidate client set of the server and initialize ; By in the collection Execute the step of "solving the optimal price strategy of the server" to obtain ; Entering the second loop, the second loop includes for each Each client in ,make , by the set Execute the step of "solving the optimal price strategy for the server" described in the table to obtain ,make ,renew and ; Repeat the second cycle until Start increasing or the number of selected clients meets .

Citation Information

Cited By

  • Federal segmentation learning optimization method and device, and storage medium

    CN121638384A