Mining power shunting method and system based on double-layer privacy protection client sampling, terminal and storage medium

CN122601367APending Publication Date: 2026-08-18SHENZHEN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611020290.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-09
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

[0005]本发明的主要目的在于提供一种基于双层隐私保护客户端采样的算力分流方法、系统、终端及计算机可读存储介质,旨在解决现有技术中对客户端进行采样时可能出现数据泄露的问题

Benefits of technology

[0016] In this invention, the number of times each server client executing the target task is selected is counted. Based on each selection count, a corresponding exploration item is constructed to calculate the corresponding utility value. A two-step noise mechanism is used to add noise to the local model and utility value of each server client to obtain the corresponding current local model and current utility value. All current utility values ​​are used to filter or update the current sampling weights for each server client to meet preset requirements. Multiple current server clients are selected from all server clients using all current sampling weights. An aggregate weight is calculated for each current server client based on each local dataset. Edge servers are used to aggregate the current local model and current utility value of each current server client according to each aggregate weight to obtain the edge model for the current round. All edge models are then aggregated according to the utility weight of each edge model to obtain the global model for the current round. The global model is used to train all local models for the next round until a global cloud model that meets the requirements of the target task is obtained. The global cloud model is then used to predict the computing power budget for the target task to obtain the computing power allocation result for each server client. This invention employs a dual perturbation mechanism to apply noise to both the communication model and sampling utility uploaded by the client for perturbation protection. It also identifies a suitable set of clients through an online probabilistic client sampling strategy, thereby improving the security of the sampling process and the accuracy of task prediction results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122601367A_ABST
    Figure CN122601367A_ABST
Patent Text Reader

Abstract

This invention relates to the field of sampling prediction technology, and discloses a computing power distribution method, system, terminal, and storage medium based on dual-layer privacy-protected client sampling. The method includes: adding noise to the local model and utility value of each server client and uploading them to an edge server to filter out multiple current server clients; aggregating the current local model and current utility value of the current server clients based on aggregation weights to obtain the edge model for the current round; aggregating the edge models to obtain the global model for the current round; iterating multiple times to obtain a global cloud model; and using the global cloud model to predict the computing power distribution results for the target area. This invention uses a dual perturbation mechanism to apply noise to the communication model and sampling utility uploaded by the client for perturbation protection, and uses an online probabilistic client sampling strategy to identify a suitable client set, thereby improving the security of the sampling process and the accuracy of the task prediction results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of sampling prediction technology, and in particular to a computing power offloading method, system, terminal, and computer-readable storage medium based on dual-layer privacy-protected client sampling. Background Technology

[0002] In traditional federated learning (FL), there is too much model interaction between the cloud server and various clients, which has limitations in terms of communication overhead and latency, and this will significantly reduce the training performance of FL.

[0003] To address this limitation, existing technologies propose Differential Privacy (DP), a practical method for protecting FL privacy. However, DP mainly focuses on perturbing only the client's communication model or the sampling process, without simultaneously applying any protective measures to the client's sampling process, which may lead to potential vulnerabilities.

[0004] Therefore, existing technologies still need to be improved and developed. Summary of the Invention

[0005] The main objective of this invention is to provide a computing power distribution method, system, terminal, and computer-readable storage medium based on dual-layer privacy-protected client sampling, aiming to solve the problem of data leakage that may occur when sampling clients in the prior art.

[0006] To achieve the above objectives, the present invention provides a computing power distribution method based on dual-layer privacy-preserving client sampling, the computing power distribution method based on dual-layer privacy-preserving client sampling comprising the following steps: The number of times each server client selected the target task is counted. Based on each number of selections, a corresponding exploration item is constructed to calculate the corresponding utility value. After adding noise to the local model and utility value of each server client using a two-step noise mechanism, the corresponding current local model and current utility value are obtained. Use all the current utility values ​​to filter or update the current sampling weights that meet the preset requirements for each server client, and use all the current sampling weights to select multiple current server clients from all the server clients; The aggregation weight of each current server client is calculated based on each local dataset. The current local model and current utility value of each current server client are aggregated using the edge server according to each aggregation weight to obtain the edge model of the current round. All edge models are aggregated according to the utility weight of each edge model to obtain the global model of the current round. The global model is used to train all the local models in the next round until a global cloud model that meets the requirements of the target task is obtained. The global cloud model is then used to predict the computing power budget of the target task to obtain the computing power distribution results for each server client.

[0007] Optionally, the computing power distribution method based on two-layer privacy-preserving client sampling, wherein the step of counting the number of times each server client executing the target task is selected, and constructing a corresponding exploration item based on each selection count to calculate the corresponding utility value, specifically includes: Count the number of times each server client has been selected in the previous iteration rounds, and calculate the corresponding exploration item based on each number of selections: ; in, Indicates the first In the round Exploration items for each server client, Indicates the first In the round The number of times each server client; Calculate the utility value of each server client in the current round based on each of the exploration items: ; in, Indicates the first In the round The utility value of each server client. Indicates the first In the round Privacy settings for each server client.

[0008] Optionally, in the aforementioned computing power distribution method based on two-layer privacy-preserving client sampling, the expression for the utility value is: ; in, Indicates statistical utility. Indicating privacy benefits, It represents system utility.

[0009] Optionally, the computing power distribution method based on dual-layer privacy-preserving client sampling, wherein the step of adding noise to the local model and utility value of each server client using a two-step noise mechanism to obtain the corresponding current local model and current utility value specifically includes: Using a model obfuscation mechanism, corresponding noise is added to each of the local models: ; in, This indicates a model obfuscation mechanism. Indicates the first In the round Local model for each server client, This represents the local model after adding noise. For the first The local model of the current server client. This indicates that the mean is 0 and the standard deviation is... The noise is normally distributed; For all current rounds, calculate the maximum difference in utility between the local model and any other local model: ; in, Indicates the first In the round The utility value of each server client. express and The greatest difference in utility value, Indicates the total number of iterations. Indicates the total number of server clients; A utility obfuscation mechanism is constructed based on the maximum difference in the utility values, and noise is added to each utility value using the utility obfuscation mechanism: ; in, This indicates that noise has been added to the utility value. This represents the utility value after adding noise. Indicates the first Privacy budget for each server client, Indicates the first In the round Noise from individual server clients, This indicates that the distribution follows a Laplace distribution; The noise-enhanced current local model and current utility value are uploaded to the edge server respectively.

[0010] Optionally, the computing power distribution method based on dual-layer privacy-preserving client sampling, wherein the step of using all the current utility values ​​to filter or update the current sampling weights that meet preset requirements for each server client, and using all the current sampling weights to select multiple current server clients from all the server clients, specifically includes: The utility value of each server client in all rounds is calculated to obtain the utility sequence of each server client: ; in, Indicates up to the number The utility sequence of rounds, Indicates up to the number In the round A sequence of server client utility. Indicates the number of server clients; For the current round, compare each sampling weight with a preset sampling threshold, and assign all sampling weights exceeding the sampling threshold to the current sampling threshold to obtain the current sampling weight: ; ; in, Indicates privacy parameters, This indicates the number of current server clients selected in the current round. Indicates the total number of clients. express and The greatest difference in utility value, Indicates the first In the round The utility value of each server client. This indicates the aggregated privacy requirements obtained by considering the individual privacy needs of each server client. Indicates the first Privacy budget for each server client, Indicates the total number of iterations. Represents a constant; Based on the sampling threshold and the current sampling weight, calculate the sampling probability for each client: ; in, Indicates the first The sampling probability of each server client. Indicates the first In the round The current sampling weights of each server client; Based on each of the sampling probabilities, select all current server clients in the current round from all the server clients.

[0011] Optionally, the computing power distribution method based on two-layer privacy-preserving client sampling, wherein selecting all current server clients in the current round from all server clients according to each sampling probability, further includes: Construct inequalities relating each of the sampling weights, the number of all server clients, the number of all current server clients, and the privacy parameter, and determine the sampling threshold based on these inequalities: ; in, Indicates the sampling threshold. Indicates the first In the round The sampling weight of the current server client.

[0012] Optionally, the computing power distribution method based on dual-layer privacy-preserving client sampling, wherein the step of calculating the aggregation weight of each current server client based on each local dataset, aggregating the current local model and current utility value of each current server client using edge servers according to each aggregation weight to obtain the edge model of the current round, and aggregating all edge models according to the utility weight of each edge model to obtain the global model of the current round, specifically includes: Based on the local dataset of each current server client, construct the aggregate weight for each current server client: ; in, Indicates the first The aggregate weight of each current server client. Indicates the first The current set of server clients in each round. Indicates the first A local dataset, Indicates the first A local dataset; Based on the aggregate weight of each current server client, all current local models are aggregated to obtain the edge model for the current round: ; ; in, Indicates the first Edge model of rounds, Indicates the first The current local model of the current server client; Each edge model is aggregated according to its utility weight to obtain the global model for the current round; For each of the server clients, calculate the loss representation for all specific samples on the server client, and construct the average loss representation on the local dataset of the server client based on all the loss representations: ; in, Indicates the first In the round The average loss for each current server client is represented as follows: Indicates the first A local dataset, Indicates the first In the round The current local model of the current server client. Indicates a specific sample The loss is represented; Based on the global model, the current local model is trained with the goal of finding the minimum average loss representation to obtain a local model for the next round of training.

[0013] Furthermore, to achieve the above objectives, the present invention also provides a computing power distribution system based on dual-layer privacy-preserving client sampling, wherein the computing power distribution system based on dual-layer privacy-preserving client sampling includes: The pre-data calculation module is used to count the number of times each server client is selected in executing the target task, construct a corresponding exploration item based on each number of selections, calculate the corresponding utility value, and use a two-step noise mechanism to add noise to the local model and utility value of each server client to obtain the corresponding current local model and current utility value. The client sampling module is used to filter or update the current sampling weight that meets the preset requirements for each of the server clients using all the current utility values, and to select multiple current server clients from all the server clients using all the current sampling weights. The aggregation module is used to calculate the aggregation weight of each current server client based on each local dataset, and to aggregate the current local model and current utility value of each current server client according to each aggregation weight using the edge server to obtain the edge model of the current round. Then, it aggregates all the edge models according to the utility weight of each edge model to obtain the global model of the current round. The prediction and distribution module is used to train all the local models in the next round using the global model until a global cloud model that meets the requirements of the target task is obtained, and to use the global cloud model to predict the computing power budget of the target task to obtain the computing power distribution result under each server client.

[0014] Furthermore, to achieve the above objectives, the present invention also provides a terminal, wherein the terminal includes: a memory, a processor, and a computing power distribution program based on dual-layer privacy-preserving client sampling stored in the memory and executable on the processor, wherein when the computing power distribution program based on dual-layer privacy-preserving client sampling is executed by the processor, it implements the steps of the computing power distribution method based on dual-layer privacy-preserving client sampling as described above.

[0015] Furthermore, to achieve the above objectives, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computing power distribution program based on two-layer privacy-preserving client sampling, and when the computing power distribution program based on two-layer privacy-preserving client sampling is executed by a processor, it implements the steps of the computing power distribution method based on two-layer privacy-preserving client sampling as described above.

[0016] In this invention, the number of times each server client executing the target task is selected is counted. Based on each selection count, a corresponding exploration item is constructed to calculate the corresponding utility value. A two-step noise mechanism is used to add noise to the local model and utility value of each server client to obtain the corresponding current local model and current utility value. All current utility values ​​are used to filter or update the current sampling weights for each server client to meet preset requirements. Multiple current server clients are selected from all server clients using all current sampling weights. An aggregate weight is calculated for each current server client based on each local dataset. Edge servers are used to aggregate the current local model and current utility value of each current server client according to each aggregate weight to obtain the edge model for the current round. All edge models are then aggregated according to the utility weight of each edge model to obtain the global model for the current round. The global model is used to train all local models for the next round until a global cloud model that meets the requirements of the target task is obtained. The global cloud model is then used to predict the computing power budget for the target task to obtain the computing power allocation result for each server client. This invention employs a dual perturbation mechanism to apply noise to both the communication model and sampling utility uploaded by the client for perturbation protection. It also identifies a suitable set of clients through an online probabilistic client sampling strategy, thereby improving the security of the sampling process and the accuracy of task prediction results. Attached Figure Description

[0017] Figure 1 This is a flowchart of a preferred embodiment of the computing power distribution method based on dual-layer privacy protection client sampling of the present invention; Figure 2 This is a preferred embodiment of the TPPS-RHL computing power offloading method based on dual-layer privacy protection client sampling of the present invention. Figure 3 This is a flowchart of the HFL cloud-edge-client interaction protocol, representing a preferred embodiment of the computing power offloading method based on dual-layer privacy-preserving client sampling according to the present invention. Figure 4 This is a schematic diagram of the dual perturbation mechanism of a preferred embodiment of the computing power distribution method based on dual-layer privacy protection client sampling of the present invention; Figure 5 This is a schematic diagram of the online probabilistic client sampling strategy of a preferred embodiment of the computing power distribution method based on dual-layer privacy-preserving client sampling of the present invention; Figure 6 This is a flowchart illustrating the collaborative workflow of the task scheduler and agent in a preferred embodiment of the computing power distribution method based on dual-layer privacy protection client sampling of the present invention. Figure 7 This is a schematic diagram illustrating the test accuracy of different benchmark methods on the first dataset of a preferred embodiment of the computing power distribution method based on dual-layer privacy protection client sampling of the present invention under various data distributions and perturbation distributions. Figure 8 This is a schematic diagram illustrating the test accuracy of different benchmark methods on a second dataset under various data distributions and perturbation distributions for a preferred embodiment of the computing power distribution method based on dual-layer privacy-preserving client sampling of the present invention. Figure 9 This is a comparison chart of test accuracy under different Dirichlet parameters for a preferred embodiment of the computing power distribution method based on dual-layer privacy protection client sampling of the present invention; Figure 10 This is a perturbation model of a preferred embodiment of the computing power distribution method based on dual-layer privacy protection client sampling of the present invention under attack, and its performance results are shown in the figure. Figure 11 This is a structural diagram of a preferred embodiment of the computing power distribution system based on dual-layer privacy protection client sampling of the present invention; Figure 12 This is a structural diagram of a preferred embodiment of the terminal of the present invention. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this invention clearer and more explicit, 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 of the invention and are not intended to limit the invention.

[0019] The preferred embodiment of the computing power distribution method based on dual-layer privacy-preserving client sampling described in this invention, such as... Figure 1 As shown, the computing power offloading method based on dual-layer privacy-preserving client sampling includes the following steps: Step S10: Count the number of times each server client executes the target task, construct the corresponding exploration item based on each number of selections, calculate the corresponding utility value, and use a two-step noise mechanism to add noise to the local model and utility value of each server client to obtain the corresponding current local model and current utility value.

[0020] Existing federated learning frameworks generally lack native support for layered architectures, making it difficult to effectively cover the collaborative training process across cloud, edge, and device. Furthermore, actual cross-device deployments require automated batch management of training tasks, fault detection, and fault tolerance recovery, while simultaneously meeting personalized privacy, performance, and efficiency requirements under heterogeneous hardware, complex networks, and multi-task orchestration conditions. Therefore, in the embodiments disclosed in this invention, a practical layered federated learning deployment framework (RHL, RobustHeterogeneous Learning) based on PyTorch RPC (Remote Procedure Call) is designed to provide engineering support for layered federated learning that is protocol-consistent, component-complete, scalable, and maintainable. Through the RHL framework, while adhering to the standard HFL (Hierarchical FL) interaction protocol, core components such as aggregators, client selectors, local trainers, encryptors, and compressors are provided, supporting multi-layer aggregation, differential privacy and secure aggregation, and various communication compression strategies to adapt to different devices and bandwidth conditions.

[0021] At the same time, such as Figure 2 As shown, this invention also proposes a two-step privacy-preserving client sampling framework (TPPS) and a deployment framework (RHL) for hierarchical federated learning. The TPPS includes a dual perturbation mechanism and an online probabilistic client sampling strategy, and is engineered using the RHL framework. The dual perturbation mechanism applies Gaussian and Laplace noise to the communication model and sampling utility uploaded by the client, respectively, for perturbation protection. The online probabilistic client sampling strategy is based on an online decision-making method that identifies the most suitable set of clients, maintains a weight for each client, determines the client's participation probability, and updates the weight based on performance after each training round.

[0022] Furthermore, the RHL framework provides end-to-end model security protection through a security aggregation component, reduces communication overhead through a compressor component, and achieves cross-device batch automated execution and fault-tolerant retries through task scheduling and proxy modules. This work provides a theoretical analysis of the TPPS scheme regarding privacy protection, sampling quality, and regret bound, and provides corresponding upper bounds.

[0023] Specifically, the number of times each server client is selected in the previous iterations is counted, and the corresponding exploration item is calculated based on each number of selections: ; in, Indicates the first In the round Exploration items for each server client, Indicates the first In the round The number of times each server client; Calculate the utility value of each server client in the current round based on each of the exploration items: ; in, Indicates the first In the round The utility value of each server client. Indicates the first In the round Privacy settings for each server client.

[0024] In the embodiment disclosed in this invention, the computing power distribution monitoring process includes a cloud server, N server clients as distributed clients, and M edge servers. During client sampling, there are T discrete communication rounds, and each client maintains a private local dataset. and a local model Client In specific labeled samples (in, Indicates input features, The loss on the label is represented as In the local dataset The average loss over the period is expressed as: ; At this time, the client The training objective is to find a model This allows the average loss to reach an acceptablely small value.

[0025] The expression for the utility value is as follows: ; in, Indicates statistical utility. Indicating privacy benefits, It represents system utility.

[0026] During the HFL process, each edge server uploads its maintained model to the cloud server. The cloud server then aggregates these models in a similar manner and returns the updated model to each edge server. This aggregation occurs once every preset round. From the perspective of multi-objective optimization theory, when it is necessary to optimize multiple competing metrics (privacy, statistical quality, and system efficiency) simultaneously, the Weighted Product Method (WPM) is a widely used method in decision science. Compared with the weighted summation method, the product form has better scale invariance and dimensionless dimensionality, and does not require normalization of the utility of different dimensions, thus ensuring the fairness and stability of the comprehensive evaluation.

[0027] To sample a suitable set of clients, this invention uses utility to accurately reflect the real-time data quality of clients in the current round. Since a small client privacy budget can negatively impact training accuracy, this invention uses a privacy term to prioritize clients with larger privacy budgets. Limiting training to a small number of fixed clients in each round can exacerbate the impact of data heterogeneity, so this invention further introduces an exposure term to enhance the diversity of participating clients.

[0028] In this context, the quality of individual data collected by the client in each round is referred to as utility, while the client's... Up to round All published statistical utilities can be represented as a utility series: ( (Indicates the current round). After each round of iteration, the edge server will process the data for each client. Record the data and update it with each round.

[0029] By combining the utility set and the total number of server clients, a sampling strategy can be constructed to help the edge server select a suitable set of server clients in each round (i.e., sampling from all server clients to obtain the current server client). In actual deployment systems, HFL follows standard cloud-edge-client interaction protocols, such as... Figure 3 As shown, the cloud server first reads the task attributes from the configuration file and instantiates the global model. Participating clients and edge servers register with the cloud server and obtain global initial model parameters. Then, the edge server selects a subset of available clients using a predefined strategy. The selected clients perform local training according to the task specifications. Further, the clients compress or encrypt the data according to a predefined strategy and transmit the preprocessed update data to the edge server. The edge server then aggregates the client updates and periodically uploads them to the cloud server for further aggregation. Training terminates when predetermined conditions are met. The RHL framework strictly follows this protocol to ensure correct interaction between the cloud, edge, and client.

[0030] Furthermore, using a model obfuscation mechanism, corresponding noise is added to each of the local models: ; in, This indicates a model obfuscation mechanism. Indicates the first In the round Local model for each server client, This represents the local model after adding noise. For the first The local model of the current server client. This indicates that the mean is 0 and the standard deviation is... The noise is normally distributed; For all current rounds, calculate the maximum difference in utility between the local model and any other local model: ; in, Indicates the first In the round The utility value of each server client. express and The greatest difference in utility value, Indicates the total number of iterations. Indicates the total number of server clients; A utility obfuscation mechanism is constructed based on the maximum difference in the utility values, and noise is added to each utility value using the utility obfuscation mechanism: ; in, This indicates that noise has been added to the utility value. This represents the utility value after adding noise. Indicates the first Privacy budget for each server client, Indicates the first In the round Noise from individual server clients, This indicates that the distribution follows a Laplace distribution; The noise-enhanced current local model and current utility value are uploaded to the edge server respectively.

[0031] Furthermore, in implementing privacy protection, simply perturbing the uploaded model is insufficient to achieve comprehensive privacy protection, as potential attackers can infer sensitive information from the client's local data by listening to and observing the client's sampling process. Therefore, this invention discloses a two-step privacy model that simultaneously perturbs both the model and client utility, thereby providing comprehensive privacy protection. Figure 4 As shown: The first step is to add noise to the local model transmitted from the client to the edge server, where... Sensitivity, in essence, reflects the maximum absolute distance between any two models. ( This represents the global slack rate shared by all server clients, and the personalized privacy budget of each server client. A value less than 1 indicates that the noise added to the local model in this step meets the requirements; in practical applications, clients can flexibly adjust the value according to their own privacy needs. , The smaller the value, the higher the level of privacy protection, but the lower the model usability.

[0032] Furthermore, in the process of adding noise to the utility value, For all workers, the maximum difference between any pair of utility values ​​across all rounds. Reflects each client The preferred personalized privacy requirements; as can be seen from the noise-adding formula, the edge server cannot access the original utility value after adding noise to it; however, the noise added to obfuscate the original utility is sometimes negligible, and the edge server may still gain insights into the original utility. Therefore, existing utility obfuscation mechanisms are not ideal in protecting privacy against edge server attacks. However, by limiting the individual privacy leakage of each client, this mechanism can effectively defend against other attackers, unlike many noise mechanisms that assume a uniform level of privacy protection. It adapts to the personalized privacy requirements of clients.

[0033] Step S20: Use all the current utility values ​​to filter or update the current sampling weights that meet the preset requirements for each server client, and use all the current sampling weights to select multiple current server clients from all the server clients.

[0034] Among them, such as Figure 5 As shown, this invention designs an online probabilistic client sampling strategy. To address the trade-off between exploration / exploitation and privacy / efficiency, a weight is maintained for each client in each round. (in the In the round The sampling weights of each server client are used to determine the sampling probability of the client and are iteratively updated. The entire process includes all server clients, the number of clients, the time range (i.e., the number of iterations), and privacy parameters (used to adjust for performance penalties related to privacy protection). Figure 5 The first one is shown in the middle. Round and number Round, in the Sampling weights for different clients in each round , , and respectively , , and After updating, the sampling probability can be updated to obtain the probability of each client at the [number]th [time]. Sampling probability of round , , and Then, the sampling probability of the client is iteratively allocated by utilizing the sampling weights associated with utility.

[0035] Specifically, the utility value of each server client in all rounds is calculated to obtain the utility sequence of each server client: ; in, Indicates up to the number The utility sequence of rounds, Indicates up to the number In the round A sequence of server client utility. Indicates the number of server clients; For the current round, compare each sampling weight with a preset sampling threshold, and assign all sampling weights exceeding the sampling threshold to the current sampling threshold to obtain the current sampling weight: ; ; in, Indicates privacy parameters, This indicates the number of current server clients selected in the current round. Indicates the total number of clients. express and The greatest difference in utility value, Indicates the first In the round The utility value of each server client. This indicates the aggregated privacy requirements obtained by considering the individual privacy needs of each server client. Indicates the first Privacy budget for each server client, Indicates the total number of iterations. Represents a constant; Based on the sampling threshold and the current sampling weight, calculate the sampling probability for each client: ; in, Indicates the first The sampling probability of each server client. Indicates the first In the round The current sampling weights of each server client; Based on each of the sampling probabilities, select all current server clients in the current round from all the server clients.

[0036] In the client-side sampling phase, to ensure that the sampling probability of a client does not exceed 1, a sampling threshold needs to be set. This threshold divides the total client set (including current server clients not selected in the current round) into two subsets. Then, the weights of all clients exceeding this threshold are reassigned to the sampling threshold. At this point, privacy parameters can be modified. The sampling threshold is adjusted, and the sampling probability for the current round can be determined using the corrected weights.

[0037] For each server client, there may be cases where its sampling probability is less than or equal to 1. In this case, there is a problem: how to sample a client set of appropriate size from all clients while respecting these probabilities? To solve this probabilistic multi-client selection problem, this invention adopts an efficient strategy called Dependent Randomized Selection (DRS).

[0038] Based on the probabilities obtained in the previous steps, a client of size K is selected for combination using DRS. The core idea is to iteratively calculate the fractional probability of each client, which guarantees two key properties: marginal distribution (the calculated probability is the probability after ignoring other variables) and cardinality guarantee (the number of selected clients is equal to K).

[0039] Furthermore, an inequality is constructed relating each sampling weight, the number of all server clients, the number of all current server clients, and the privacy parameter. The sampling threshold is then determined based on this inequality. ; in, Indicates the sampling threshold. Indicates the first In the round The sampling weight of the current server client; The sampling threshold is the maximum value of the set of sampling weights that satisfy the inequality.

[0040] After sampling is completed, each selected server client trains its local model and calculates the latest utility value. To ensure privacy, a two-step noise mechanism is used to add noise, and the obfuscated (noisy) result is uploaded to its respective local edge server. Each client is not affected by other clients.

[0041] Furthermore, the aggregate weights of each client are updated and the local model is aggregated to prepare for the next iteration; however, the inconsistency between the original utility and the confused utility can cause unexpected deviations in the weight updates, which can lead to inaccurate sampling and aggregation results in subsequent rounds. Therefore, this invention assigns a specific value to limit the performance loss that may occur due to privacy considerations.

[0042] Step S30: Calculate the aggregation weight of each current server client based on each local dataset, and use the edge server to aggregate the current local model and current utility value of each current server client according to each aggregation weight to obtain the edge model of the current round. Then, aggregate all the edge models according to the utility weight of each edge model to obtain the global model of the current round.

[0043] Specifically, based on the local dataset of each current server client, an aggregate weight is constructed for each current server client: ; in, Indicates the first The aggregate weight of each current server client. Indicates the first The current set of server clients in each round. Indicates the first A local dataset, Indicates the first A local dataset; Based on the aggregate weight of each current server client, all current local models are aggregated to obtain the edge model for the current round: ; ; in, Indicates the first Edge model of rounds, Indicates the first The current local model of the current server client; Each edge model is aggregated according to its utility weight to obtain the global model for the current round; For each of the server clients, calculate the loss representation for all specific samples on the server client, and construct the average loss representation on the local dataset of the server client based on all the loss representations: ; in, Indicates the first In the round The average loss for each current server client is represented as follows: Indicates the first A local dataset, Indicates the first In the round The current local model of the current server client. Indicates a specific sample The loss is represented; Based on the global model, the current local model is trained with the goal of finding the minimum average loss representation to obtain a local model for the next round of training.

[0044] In each round, a client set of size K is selected. Each client in the set is trained according to its current weights and uploaded back to the edge server. The edge server aggregates these trained models into an edge model and enters the next round of iteration until the global cloud model is obtained in the final round. The global training objective of HFL is also to find .

[0045] Step S40: Use the global model to train all the local models in the next round until a global cloud model that meets the requirements of the target task is obtained, and use the global cloud model to predict the computing power budget of the target task to obtain the computing power distribution result under each server client.

[0046] In the actual deployment of hierarchical federated learning, both edge servers and cloud servers are honest but curious, that is, they perform computations in accordance with the protocol specifications, but may try to infer sensitive information from the received client updates. To defend against this threat, the cryptographic component of the RHL framework integrates a secure aggregation protocol for HFL.

[0047] The core idea of ​​the secure aggregation protocol is to utilize additive secret sharing and masking techniques to ensure that the server can only obtain the aggregated model update and cannot see the contributions of any individual client. Clients establish paired shared keys via the Elliptic Curve Diffie-Hellman (ECDH) protocol, which are then expanded into mask seeds using a pseudo-random generator, while simultaneously generating individual random seeds. They then use their individual seeds and all paired seeds to generate a mask, add the mask to their local model update, and upload the masked model to the server. The design of the paired masks ensures that all paired masks cancel out to zero after aggregation, while individual masks remain. Finally, after collecting all mask uploads from all clients, the server requests a share of the shared secret from clients that are still online and have not logged out. The server uses these shares to reconstruct the paired masks of discarded clients and the individual masks of surviving clients, subtracting these masks from all uploads to obtain the true aggregation result without being able to see any individual client's original model update.

[0048] The key to the secure aggregation protocol is that, as long as the server is honest but curious—that is, it cannot collude with the client—the protocol can ensure that the client's model updates are not leaked during the aggregation process. The protocol inherently resists replay attacks by updating the key in each round. Furthermore, the secure aggregation protocol is orthogonal to differential privacy mechanisms—the former prevents the server from viewing single-client models, and the latter prevents inference of individual information from the aggregation results. The two can be used together to provide defense-in-depth for HFL systems.

[0049] Furthermore, to be compatible with existing data compression schemes in federated learning, the RHL compressor module enables clients to compress model or gradient updates that need to be uploaded to edge servers or cloud servers after local training, based on predefined compression strategies, thereby reducing communication overhead.

[0050] Furthermore, such as Figure 6 As shown, to improve system availability and observability, the RHL framework decouples federated task orchestration and node management into two modules: a task scheduler and a task agent. The task scheduler, deployed on a cloud server, is responsible for task queue management, node role allocation, command distribution, and exception handling. The scheduler maintains a federated task queue, where each task defines the hyperparameters required for training, a list of participating nodes, privacy budget configuration, compression strategy, and security aggregation switch. The scheduler schedules tasks for execution according to a first-in-first-out (FIFO) order or priority, sending training instructions to edge servers and clients via RPC channels. When a node fails or times out, the scheduler triggers a retry mechanism or node replacement to ensure the overall progress of the training task is not affected.

[0051] The task agent resides on cloud servers, edge servers, and clients, handling the lifecycle management, heartbeat monitoring, and result reporting of training subprocesses. Running as a lightweight daemon, the agent receives instructions from the scheduler and manages the startup, monitoring, and termination of training subprocesses. The agent periodically sends heartbeat signals to the scheduler, reporting node health status, resource usage, and training progress. When an abnormal exit of a subprocess is detected, the agent automatically collects error logs and reports them to the scheduler, deciding whether to retry or skip based on the configured policy. Furthermore, the agent is responsible for saving and restoring model checkpoints, supporting interrupted training resumption, which is particularly important in long-term cross-device training. Through the collaboration of the scheduler and the agent, the RHL framework achieves automated batch execution and fault-tolerant retries across devices, significantly reducing manual maintenance costs and allowing researchers to focus on algorithm design and optimization.

[0052] Furthermore, in order to effectively analyze the effectiveness of the method disclosed in this invention, three widely used federated learning datasets were used for comprehensive evaluation. MNIST (Modified National Institute of Standards and Technology database) is a classic handwritten digit image dataset containing 70,000 28×28 pixel grayscale images representing 10 categories from 0 to 9. The dataset is divided into 60,000 training samples and 10,000 test samples. FashionMNIST (Fashion-Modified National Institute of Standards and Technology database) is a fashion and clothing image dataset with the same data format as MNIST. It contains 70,000 28×28 pixel grayscale images covering 10 fashion categories. The training set and test set contain 60,000 and 10,000 images, respectively. CIFAR-10 (Canadian Institute for Advanced Research 10-class dataset) is a color object image dataset containing 60,000 32×32 pixel RGB color images covering 10 real-world object categories. The dataset includes 50,000 training images and 10,000 test images.

[0053] To simulate the non-independent and individually distributed (IID) distribution of local data among clients, a widely used data partitioning method based on the Dirichlet distribution is adopted. In this setting, client heterogeneity is accurately simulated by the Dirichlet distribution, where a smaller concentration parameter r value indicates a higher degree of client heterogeneity and a greater difference in the distribution of local data among clients.

[0054] The experimental test platform comprises two different system architectures: a real HFL system consisting of one cloud server, two edge servers, and twenty clients; and an HFL system consisting of one cloud server and twenty clients. All experiments were physically deployed and run using the PyTorch framework. Differential privacy was implemented in the privacy experiments. Privacy level Values ​​are 2, 5, and 10; for gradient upload scenarios, the privacy level... The values ​​can be 0.01, 0.1, and 1. Higher values... The value indicates stronger privacy protection (achieved by adding noise with greater variance), and clients are evenly distributed across these three privacy levels, with each level accounting for one-third of the total.

[0055] Furthermore, this invention compares several representative methods with the TPPS method disclosed in this invention. Among them, Oort is a promising federated learning framework that employs a multi-armed slot machine-style client selection strategy to balance exploration and exploitation, indirectly increasing the diversity of participating data; rPDP-FL is a two-stage hybrid sampling federated learning framework that combines non-uniform record-level sampling to protect client data privacy; PDP (Personalized Differential Privacy) is a client selection algorithm specifically designed for client-level personalized differential privacy in federated learning; FedAvg is a classic FL aggregation algorithm that uses server-side weighted averaging of client updates; it uses random client sampling to reduce communication; it lacks inherent differential privacy and is commonly used as a baseline; HierFAVG is a framework that extends FedAvg to hierarchical federated learning.

[0056] Specifically, in both model upload and gradient upload scenarios, this invention uses the MNIST, FMNIST, and CIFAR-10 datasets to conduct a comprehensive performance comparison of various benchmark methods under IID and non-IID data distributions and different noise perturbation conditions. The noise perturbation distributions used in the experiments are Gaussian and Laplace distributions, and the results are as follows: Figure 7 and Figure 8The results are shown.

[0057] in, Figure 7 (a) shows the test accuracy under non-IID distribution using Gaussian distribution and perturbation distribution of CIFAR-10 data; Figure 7 (b) shows the test accuracy under the non-IID distribution using the Laplace distribution and the perturbation distribution of CIFAR-10 data; Figure 7 (c) shows the test accuracy under the IID distribution using the Gaussian distribution and the perturbation distribution of the CIFAR-10 data. Figure 7 (d) in the figure shows the test accuracy under the IID distribution using the Laplace distribution and the perturbation distribution of the CIFAR-10 data.

[0058] Figure 7 (a) shows the test accuracy under the non-IID distribution using the Gaussian distribution and the perturbation distribution of the MNIST data; Figure 7 (b) shows the test accuracy under the non-IID distribution using the Laplace distribution and the perturbation distribution of MNIST data; Figure 7 (c) shows the test accuracy under the IID distribution using the Gaussian distribution and the perturbation distribution of the MNIST data. Figure 7 (d) in the figure shows the test accuracy under the IID distribution using the Laplace distribution and the perturbation distribution of the MNIST data.

[0059] The experimental results show that TPPS consistently outperforms other benchmark methods across all data distributions and perturbation settings. On the CIFAR-10 dataset, TPPS achieves 5% to 20% higher accuracy than other benchmark methods; on the MNIST dataset, the advantage is even more pronounced, exceeding 18%. Meanwhile, Oort and HierFAVG fail to balance privacy with learning performance, resulting in a significant performance drop after introducing differential privacy. This is because Oort relies solely on training loss and dataset size to select clients, while HierFAVG only considers client data diversity, neglecting the impact of privacy noise, leading to decreased training performance.

[0060] Among them, rPDP-FL randomly samples an uncontrollable number of clients in each iteration, which cannot fully cover clients with the expected characteristics. The sampling scheme may select a set of clients with low quality, thus reducing the consistency of training accuracy. PDP takes into account both training loss and differential privacy constraints, but it has limitations in mitigating the decline in privacy noise and its performance remains suboptimal.

[0061] Table 1: Performance Comparison Table

[0062] Under IID conditions, TPPS performance is almost on par with other benchmark methods. Under non-IID conditions, even with different differential privacy mechanisms based on Gaussian and Laplace distributions, TPPS consistently maintains superior performance, while other benchmark methods show significant performance degradation. Overall, TPPS consistently outperforms all benchmark methods in all scenarios. For the improved TPPS based on the deployment scenario-based improved RS, this invention also comprehensively measured its efficiency (as shown in Table 1), achieving the highest test accuracy and fewer communication errors in most scenarios.

[0063] It is worth noting that while transmitting large model updates, the RHL framework can also maintain statistical utility information, and the storage space of this information is much smaller than that of the model update, thus maintaining low communication overhead. This dual advantage enables TPPS to achieve high training performance in environments with limited heterogeneous resources.

[0064] Furthermore, the skewed label distribution on the client side can also affect the efficiency of federated learning. This invention addresses this by adjusting the Dirichlet distribution concentration parameter. To control the heterogeneity of tag distribution for each client and simulate tag skew scenarios; The smaller the value, the more uneven the distribution of tag categories among clients.

[0065] Among them, such as Figure 9 The above, Figure 9 (a) shows the comparison results on the CIFAR-10 dataset. Figure 9 (b) shows the comparison results on the MNIST dataset. This invention records different... The test accuracy of each benchmark method under the given value was obtained by... Figure 9 It can be seen that the RHL framework disclosed in this invention consistently maintains the highest accuracy rate, outperforming PDP; and with As the value increases, the accuracy of Oort and HierFAVG shows a downward trend.

[0066] higher This leads to reduced diversity between clients; however, inherent local heterogeneity exists within each client, and each client also has a different privacy budget. Oort, rPDP-FL, and HierFAVG fail to take these factors into account, resulting in performance instability. In contrast, RHL can mitigate these effects by selecting the set of clients with the best training performance.

[0067] Furthermore, to verify the privacy protection effectiveness of the RHL framework disclosed in this invention in defending against attacks, a Model Inversion Attack (MIA) performed by the edge server was evaluated. The goal of MIA is to extract sensitive information from the trained model and reconstruct the client's private training data. This attack represents the potential behavior that the edge server in RHL may take and is a key benchmark for evaluating the privacy and security of the system.

[0068] In the experimental data disclosed in this invention, a subset of the dataset trained using the MNIST dataset was used as the attack dataset for the edge server. Wasserstein GAN (Wasserstein Generative Adversarial Network, WGAN) was used as the generator, and a convolutional neural network model (whose parameters were uploaded by the client using the MNIST dataset subset) was used as the attack target. The performance of the perturbation model uploaded by the client at cloud aggregation rounds 1, 40, and 80 under the attack was recorded. The values ​​were set to 2, 5, and 10 respectively, and the following results were obtained: Figure 10 The attack results are shown.

[0069] The results show that as the global aggregation rounds progress, stronger privacy protection is adopted. Clients with smaller values ​​(indicating higher levels of perturbation) consistently maintain a lower attack success rate; conversely, as the number of training rounds increases, clients without privacy protection measures become increasingly vulnerable to privacy breaches.

[0070] In all attacks, using different latent vectors as input to the generative model, with a target label of 7 (corresponding to the number 8 in MNIST), when employing a perturbation model with a high level of privacy protection, attackers could hardly extract meaningful information about the private dataset. However, without privacy protection, attackers could effectively recover and reconstruct sensitive information from the trained model, information that was difficult to distinguish from the actual dataset. This fully validates the effective privacy and security performance of the RHL framework. This invention employs a dual perturbation mechanism to apply noise to both the communication model uploaded by the client and the sampling utility for perturbation protection. By identifying a suitable client set through an online probabilistic client sampling strategy, it improves the security of the sampling process and the accuracy of task prediction results.

[0071] It is also important to note that the client sampling method disclosed in this invention can be applied not only to computing power offloading but also to various other fields. For example, in smart healthcare scenarios, multiple medical institutions (hospitals, clinics, medical imaging centers, etc.) need to jointly train high-precision disease diagnosis, image analysis, and risk prediction models while protecting patient privacy. Using the method disclosed in this invention (defined as TPPS-RHL), a layered architecture can be established where hospitals act as edge servers and departmental equipment or lower-level clinics act as clients. This architecture closely matches the organizational hierarchy of the healthcare system and effectively reduces the frequency of communication between the cloud and the client. The dual perturbation mechanism simultaneously protects the local model and sampling utility, preventing attackers from retrieving patient data from uploaded model parameters or inferring the participation and data characteristics of a specific medical institution by observing client sampling patterns across rounds.

[0072] Furthermore, smart IoT scenarios involve a massive number of heterogeneous terminal devices, ranging from industrial sensors and smart cameras to wearable devices and smart home terminals. These devices vary greatly in terms of computing power, battery life, network bandwidth, and online stability. Typical tasks in such scenarios include industrial predictive maintenance, environmental monitoring, behavior recognition, and anomaly detection. The TPPS-RHL solution provides a systematic solution to the challenges of smart IoT scenarios. In terms of privacy protection, the dual perturbation mechanism protects IoT devices when uploading model and utility information. This is particularly important for smart IoT devices deployed in public places and vulnerable to physical attacks. Even if attackers intercept device communications, they cannot effectively infer the environmental data or user behavior patterns collected by the device.

[0073] Furthermore, in autonomous driving and vehicle-to-everything (V2X) scenarios, vehicles act as mobile clients, continuously collecting driving behavior data, road condition information, and sensor data. Roadside units or regional edge servers are responsible for model aggregation and update distribution for vehicles within a local area. In this scenario, the TPPS-RHL solution uses a layered architecture to distribute the model aggregation burden from the cloud to roadside units or regional edge servers along the route, enabling vehicles to quickly acquire the aggregated model for different areas when entering them, achieving low-latency model updates. A dual perturbation mechanism prevents attackers from reconstructing vehicle trajectories and sensor data through gradient inversion at the model obfuscation level, and prevents attackers from inferring the participation patterns and driving habits of specific vehicles by observing sampling patterns at the utility obfuscation level. This is crucial for preventing malicious tracking and location privacy leaks. A personalized privacy budget mechanism allows private cars to set higher privacy protection levels, while commercial vehicles can choose lower privacy protection levels to provide richer training data, provided compliance is ensured. The RHL framework's task agent module supports saving model checkpoints and resuming training from breakpoints: when a vehicle enters a communication blind spot or goes offline briefly, training progress will not be lost, and training can be seamlessly resumed after the vehicle comes back online. The communication compression component effectively reduces the model transmission overhead between the vehicle and the roadside unit in a highly dynamic network environment.

[0074] Furthermore, such as Figure 11 As shown, based on the above-mentioned computing power distribution method based on dual-layer privacy-preserving client sampling, the present invention also provides a computing power distribution system based on dual-layer privacy-preserving client sampling, wherein the computing power distribution system based on dual-layer privacy-preserving client sampling includes: The pre-data calculation module 51 is used to count the number of times each server client is selected in executing the target task, construct a corresponding exploration item based on each number of selections, calculate the corresponding utility value, and use a two-step noise mechanism to add noise to the local model and utility value of each server client to obtain the corresponding current local model and current utility value. The client sampling module 52 is used to filter or update the current sampling weight that meets the preset requirements for each of the server clients using all the current utility values, and to select multiple current server clients from all the server clients using all the current sampling weights. The aggregation module 53 is used to calculate the aggregation weight of each current server client based on each local dataset, and to aggregate the current local model and current utility value of each current server client according to each aggregation weight using the edge server to obtain the edge model of the current round. The module also aggregates all edge models according to the utility weight of each edge model to obtain the global model of the current round. The prediction and distribution module 54 is used to train all the local models in the next round using the global model until a global cloud model that meets the requirements of the target task is obtained, and to use the global cloud model to predict the computing power budget of the target task to obtain the computing power distribution result under each server client.

[0075] Furthermore, such as Figure 12 As shown, based on the above-mentioned computing power distribution method and system based on dual-layer privacy protection client sampling, the present invention also provides a terminal, which includes a processor 10, a memory 20 and a display 30. Figure 12 Only some of the terminal components are shown; however, it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0076] In some embodiments, the memory 20 may be an internal storage unit of the terminal, such as a hard disk or memory. In other embodiments, the memory 20 may be an external storage device of the terminal, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc. Further, the memory 20 may include both internal and external storage devices. The memory 20 is used to store application software and various types of data installed on the terminal, such as program code installed on the terminal. The memory 20 can also be used to temporarily store data that has been output or will be output. In one embodiment, the memory 20 stores a computing power distribution program 40 based on dual-layer privacy-preserving client sampling. This dual-layer privacy-preserving client sampling computing power distribution program 40 can be executed by the processor 10, thereby implementing the dual-layer privacy-preserving client sampling computing power distribution method of this application.

[0077] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor, or other data processing chip, used to run program code stored in the memory 20 or process data, such as executing the computing power distribution method based on dual-layer privacy protection client sampling.

[0078] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. The display 30 is used to display information on the terminal and to display a visual user interface. The components of the terminal communicate with each other via a system bus.

[0079] In one embodiment, when the processor 10 executes the computing power offloading program 40 based on dual-layer privacy-preserving client sampling in the memory 20, it implements the steps of the computing power offloading method based on dual-layer privacy-preserving client sampling as described above.

[0080] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computing power distribution program based on two-layer privacy-preserving client sampling, and when the computing power distribution program based on two-layer privacy-preserving client sampling is executed by a processor, it implements the steps of the computing power distribution method based on two-layer privacy-preserving client sampling as described above.

[0081] In summary, this invention provides a computing power distribution method and related equipment based on dual-layer privacy-preserving client sampling. The method includes: counting the number of times each server client executing the target task is selected; constructing a corresponding exploration item based on each selection count to calculate the corresponding utility value; adding noise to the local model and utility value of each server client using a two-step noise mechanism to obtain the corresponding current local model and current utility value; using all the current utility values ​​to filter or update the current sampling weights that meet preset requirements for each server client; and using all the current sampling weights to select multiple current server clients from all the server clients. The invention employs a client-side approach. Based on each local dataset, it calculates the aggregation weight for each current server client. Using edge servers, it aggregates the current local model and current utility value of each current server client according to these aggregation weights to obtain the edge model for the current round. Then, it aggregates all edge models according to the utility weight of each edge model to obtain the global model for the current round. The global model is then used to train all local models for the next round until a global cloud model that meets the requirements of the target task is obtained. Finally, the global cloud model is used to predict the computing power budget for the target task, resulting in the computing power allocation result for each server client. This invention uses a dual perturbation mechanism to apply noise to the communication model and sampling utility uploaded by the client for perturbation protection. It also uses an online probabilistic client sampling strategy to identify a suitable client set, thereby improving the security of the sampling process and the accuracy of the task prediction results.

[0082] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal that includes that element.

[0083] Of course, those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware (such as a processor, controller, etc.). The program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The computer-readable storage medium can be a memory, magnetic disk, optical disk, etc.

[0084] It should be understood that the application of the present invention is not limited to the examples above. Those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.

Claims

1. A computing power distribution method based on dual-layer privacy-preserving client sampling, characterized in that, The computing power distribution method based on dual-layer privacy-preserving client sampling includes: The number of times each server client selected the target task is counted. Based on each number of selections, a corresponding exploration item is constructed to calculate the corresponding utility value. After adding noise to the local model and utility value of each server client using a two-step noise mechanism, the corresponding current local model and current utility value are obtained. Use all the current utility values ​​to filter or update the current sampling weights that meet the preset requirements for each server client, and use all the current sampling weights to select multiple current server clients from all the server clients; The aggregation weight of each current server client is calculated based on each local dataset. The current local model and current utility value of each current server client are aggregated using the edge server according to each aggregation weight to obtain the edge model of the current round. All edge models are aggregated according to the utility weight of each edge model to obtain the global model of the current round. The global model is used to train all the local models in the next round until a global cloud model that meets the requirements of the target task is obtained. The global cloud model is then used to predict the computing power budget of the target task to obtain the computing power distribution results for each server client.

2. The computing power distribution method based on dual-layer privacy-preserving client sampling according to claim 1, characterized in that, The method involves counting the number of times each server client selects the target task, constructing a corresponding exploration item based on each selection count, and calculating the corresponding utility value. Specifically, this includes: Count the number of times each server client has been selected in the previous iteration rounds, and calculate the corresponding exploration item based on each number of selections: ; in, Indicates the first In the round Exploration items for each server client, Indicates the first In the round The number of times each server client; Calculate the utility value of each server client in the current round based on each of the exploration items: ; in, Indicates the first In the round The utility value of each server client. Indicates the first In the round Privacy settings for each server client.

3. The computing power distribution method based on dual-layer privacy-preserving client sampling according to claim 2, characterized in that, The expression for the utility value is: ; in, Indicates statistical utility. Indicating privacy benefits, It represents system utility.

4. The computing power distribution method based on dual-layer privacy-preserving client sampling according to claim 2, characterized in that, The process of adding noise to the local model and utility value of each server client using a two-step noise mechanism to obtain the corresponding current local model and current utility value specifically includes: Using a model obfuscation mechanism, corresponding noise is added to each of the local models: ; in, This indicates a model obfuscation mechanism. Indicates the first In the round Local model for each server client, This represents the local model after adding noise. For the first The local model of the current server client. This indicates that the mean is 0 and the standard deviation is... The noise is normally distributed; For all current rounds, calculate the maximum difference in utility between the local model and any other local model: ; in, Indicates the first In the round The utility value of each server client. express and The greatest difference in utility value, Indicates the total number of iterations. Indicates the total number of server clients; A utility obfuscation mechanism is constructed based on the maximum difference in the utility values, and noise is added to each utility value using the utility obfuscation mechanism: ; in, This indicates that noise has been added to the utility value. This represents the utility value after adding noise. Indicates the first Privacy budget for each server client, Indicates the first In the round Noise from individual server clients, This indicates that the distribution follows a Laplace distribution; The noise-enhanced current local model and current utility value are uploaded to the edge server respectively.

5. The computing power distribution method based on dual-layer privacy-preserving client sampling according to claim 1, characterized in that, The step of using all the current utility values ​​to filter or update the current sampling weights that meet preset requirements for each server client, and using all the current sampling weights to select multiple current server clients from all the server clients, specifically includes: The utility value of each server client in all rounds is calculated to obtain the utility sequence of each server client: ; in, Indicates up to the number The utility sequence of rounds, Indicates up to the number In the round A sequence of server client utility. Indicates the number of server clients; For the current round, compare each sampling weight with a preset sampling threshold, and assign all sampling weights exceeding the sampling threshold to the current sampling threshold to obtain the current sampling weight: ; ; in, Indicates privacy parameters, This indicates the number of current server clients selected in the current round. Indicates the total number of clients. express and The greatest difference in utility value, Indicates the first In the round The utility value of each server client. This indicates the aggregated privacy requirements obtained by considering the individual privacy needs of each server client. Indicates the first Privacy budget for each server client, Indicates the total number of iterations. Represents a constant; Based on the sampling threshold and the current sampling weight, calculate the sampling probability for each client: ; in, Indicates the first The sampling probability of each server client. Indicates the first In the round The current sampling weights of each server client; Based on each of the sampling probabilities, select all current server clients in the current round from all the server clients.

6. The computing power distribution method based on dual-layer privacy-preserving client sampling according to claim 5, characterized in that, The step of selecting all current server clients in the current round from all server clients based on each of the sampling probabilities further includes: Construct inequalities relating each of the sampling weights, the number of all server clients, the number of all current server clients, and the privacy parameter, and determine the sampling threshold based on these inequalities: ; in, Indicates the sampling threshold. Indicates the first In the round The sampling weight of the current server client.

7. The computing power distribution method based on dual-layer privacy-preserving client sampling according to claim 1, characterized in that, The process of calculating the aggregation weight for each current server client based on each local dataset, aggregating the current local model and current utility value of each current server client using an edge server according to each aggregation weight to obtain the edge model for the current round, and aggregating all edge models according to the utility weight of each edge model to obtain the global model for the current round, specifically includes: Based on the local dataset of each current server client, construct the aggregate weight for each current server client: ; in, Indicates the first The aggregate weight of each current server client. Indicates the first The current set of server clients in each round. Indicates the first A local dataset, Indicates the first A local dataset; Based on the aggregate weight of each current server client, all current local models are aggregated to obtain the edge model for the current round: ; ; in, Indicates the first Edge model of rounds, Indicates the first The current local model of the current server client; Each edge model is aggregated according to its utility weight to obtain the global model for the current round; For each of the server clients, calculate the loss representation for all specific samples on the server client, and construct the average loss representation on the local dataset of the server client based on all the loss representations: ; in, Indicates the first In the round The average loss for each current server client is represented as follows: Indicates the first A local dataset, Indicates the first In the round The current local model of the current server client. Indicates a specific sample The loss is represented; Based on the global model, the current local model is trained with the goal of finding the minimum average loss representation to obtain a local model for the next round of training.

8. A computing power distribution system based on dual-layer privacy-preserving client sampling, characterized in that, The computing power distribution system based on dual-layer privacy-preserving client sampling is used to implement the computing power distribution method based on dual-layer privacy-preserving client sampling as described in any one of claims 1-7, wherein the computing power distribution system based on dual-layer privacy-preserving client sampling includes: The pre-data calculation module is used to count the number of times each server client is selected in executing the target task, construct a corresponding exploration item based on each number of selections, calculate the corresponding utility value, and use a two-step noise mechanism to add noise to the local model and utility value of each server client to obtain the corresponding current local model and current utility value. The client sampling module is used to filter or update the current sampling weight that meets the preset requirements for each of the server clients using all the current utility values, and to select multiple current server clients from all the server clients using all the current sampling weights. The aggregation module is used to calculate the aggregation weight of each current server client based on each local dataset, and to aggregate the current local model and current utility value of each current server client according to each aggregation weight using the edge server to obtain the edge model of the current round. Then, it aggregates all the edge models according to the utility weight of each edge model to obtain the global model of the current round. The prediction and distribution module is used to train all the local models in the next round using the global model until a global cloud model that meets the requirements of the target task is obtained, and to use the global cloud model to predict the computing power budget of the target task to obtain the computing power distribution result under each server client.

9. A terminal, characterized in that, The terminal includes: a memory, a processor, and a computing power distribution program based on dual-layer privacy-preserving client sampling stored in the memory and executable on the processor. When the computing power distribution program based on dual-layer privacy-preserving client sampling is executed by the processor, it implements the steps of the computing power distribution method based on dual-layer privacy-preserving client sampling as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computing power offloading program based on two-layer privacy-preserving client sampling, which, when executed by a processor, implements the steps of the computing power offloading method based on two-layer privacy-preserving client sampling as described in any one of claims 1-7.