System Parameter Processing Method, Device, Equipment and Storage Medium
By building and federated training system parameter prediction model, the parameters of the federated learning underlying distributed system are automatically adjusted, which solves the problems of complex system parameter configuration and time-consuming manual debugging, and improves debugging efficiency and effect.
Patent Information
- Application Number
- CN202011625722.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-30
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2040-12-30
AI Technical Summary
The parameter configuration of the underlying distributed system of federated learning is complex, manual debugging is time-consuming and inefficient, making it difficult to ensure debugging results.
A model is built for predicting system performance information based on system parameters, and through federal training, multiple participants are allowed to jointly adjust system parameters to realize the automation of system parameter debugging.
It improves the efficiency of system parameter debugging, reduces the time and cost of manual debugging, and ensures the optimal configuration of system parameters.
Smart Images

Figure CN114692888B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and particularly to a system parameter processing method, device, equipment, and storage medium. Background Art
[0002] With the continuous development of computer technology and big data processing technology, the application of federated learning is becoming more and more extensive. There are many design difficulties not only in the algorithm design of federated learning, but also many problems to be solved from the perspective of computer engineering.
[0003] Since federated learning involves distributed computing, distributed storage, and cross-site transmission at the system architecture level, the system complexity is relatively large. The underlying distributed framework of federated learning (hereinafter referred to as the framework) is an offline training distributed system. In order to adapt to the different hardware environments of different users, the framework itself is designed as a parameterized system, providing a large number of configurable parameters. During use, users can adjust the framework parameters according to the configuration of the user's machine to obtain optimal performance or maximize stability.
[0004] Currently, the configuration of the parameters of the underlying distributed system of federated learning is generally manually adjusted by users according to experience. However, due to the high system complexity and the large number of configurable parameters, the method of manually debugging parameters is time-consuming, and it is difficult to guarantee the debugging effect, resulting in low debugging efficiency. Summary of the Invention
[0005] The main purpose of the present invention is to provide a system parameter processing method, device, equipment, and storage medium, aiming to construct a model for system parameter debugging, automate the system parameter debugging, and improve the system parameter debugging efficiency.
[0006] To achieve the above object, the present invention provides a system parameter processing method, which is applied to a first participant among multiple participants participating in multi-party secure computing. The method includes:
[0007] Determine at least one training sample, where each training sample includes system parameters and corresponding system performance information when calculating under the system parameters;
[0008] Construct a model for predicting system performance information according to system parameters;
[0009] According to the at least one training sample, jointly perform federated training on the model with at least some of the other participants among the multiple participants, where the trained model is used for any one of the multiple participants to adjust system parameters.
[0010] In a possible implementation, based on the at least one training sample, jointly training the model with at least some of the other parties among the multiple parties includes:
[0011] Based on the at least one training sample, jointly training the model with at least some of the other parties among the multiple parties;
[0012] Repeatedly perform the following operations until the training end condition is met:
[0013] According to the trained model, adjust the system parameters of the first party;
[0014] Determine whether the system performance information corresponding to the adjusted system parameters is better than that corresponding to before adjustment;
[0015] If so, jointly continue to train the model with at least some of the other parties among the multiple parties;
[0016] If not, determine that the training end condition is met.
[0017] In a possible implementation, according to the trained model, adjusting the system parameters of the first party includes:
[0018] Randomly generate multiple parameter adjustment schemes, each parameter scheme including system parameters for input to the model;
[0019] According to the model, determine the system performance information corresponding to each parameter adjustment scheme;
[0020] According to the system performance information corresponding to each parameter adjustment scheme, select a parameter adjustment scheme from the multiple parameter adjustment schemes;
[0021] Adjust the system parameters of the first party according to the selected parameter adjustment scheme.
[0022] In a possible implementation, according to the system performance information corresponding to each parameter adjustment scheme, selecting a parameter adjustment scheme from the multiple parameter adjustment schemes includes:
[0023] According to the system performance information corresponding to each parameter adjustment scheme, select the parameter adjustment schemes whose system performance information meets the preset conditions from the multiple parameter adjustment schemes as alternative schemes;
[0024] If there are multiple alternative schemes, for each alternative scheme, calculate on a preset data set based on the system parameters of the alternative scheme, and detect the corresponding system performance information during the calculation;
[0025] According to the detected system performance information corresponding to each alternative scheme, select a parameter adjustment scheme from the multiple alternative schemes.
[0026] In a possible implementation, jointly training the model federally with at least some of the other participants among the multiple participants includes:
[0027] Constructing new training samples according to the detected system performance information;
[0028] Jointly training the model federally with at least some of the other participants among the multiple participants according to the new training samples.
[0029] In a possible implementation, the model is a linear regression model; the system parameters corresponding to the model include environmental parameters and distributed parameters;
[0030] Wherein, the environmental parameters include at least one of the following: CPU information, memory information, and hard disk information;
[0031] The distributed parameters include at least one of the following: thread pool information, network packet information, and retry waiting time.
[0032] In a possible implementation, the method further includes:
[0033] Obtaining a model constructed and trained by at least some of the other participants for predicting system performance information according to system parameters;
[0034] Aggregating the obtained model and the model constructed and trained by the first participant to obtain an aggregated model;
[0035] Wherein, the model for any one of the multiple participants to adjust system parameters is the aggregated model.
[0036] The present invention also provides a method for processing system parameters, including:
[0037] Obtaining a model for predicting system performance information according to system parameters, wherein the model is obtained by the method according to any one of the above;
[0038] Generating at least one parameter adjustment scheme, and each parameter scheme includes system parameters for input to the model;
[0039] According to the model, obtaining the system performance information corresponding to each parameter adjustment scheme, and adjusting the system parameters according to the system performance information of each parameter adjustment scheme.
[0040] The present invention also provides a device for processing system parameters, including:
[0041] A training sample determination module for determining at least one training sample, where each training sample includes system parameters and corresponding system performance information when calculations are performed under these system parameters;
[0042] A model construction module for constructing a model for predicting system performance information based on system parameters;
[0043] A model training module for federated training of the model according to the at least one training sample, in conjunction with at least some of the other participants among the multiple participants, where the trained model is used by any one of the multiple participants to adjust system parameters.
[0044] The present invention also provides a system parameter processing device, including:
[0045] An acquisition module for acquiring a model for predicting system performance information based on system parameters, where the model is a model obtained based on the device described in any one of the foregoing;
[0046] A tuning parameter scheme generation module for generating at least one tuning parameter scheme, where each parameter scheme includes system parameters for input to the model;
[0047] A parameter adjustment module for obtaining the system performance information corresponding to each tuning parameter scheme according to the model, and adjusting the system parameters according to the system performance information of each tuning parameter scheme.
[0048] The present invention also provides a system parameter processing device, where the system parameter processing device includes: a memory, a processor, and a system parameter processing program stored on the memory and executable on the processor, and when the system parameter processing program is executed by the processor, the steps of the system parameter processing method described in any one of the foregoing are implemented.
[0049] The present invention also provides a computer-readable storage medium, on which a system parameter processing program is stored, and when the system parameter processing program is executed by a processor, the steps of the system parameter processing method described in any one of the foregoing are implemented.
[0050] The present invention also provides a computer program product, including a computer program, and when the computer program is executed by a processor, the system parameter processing method described in any one of the foregoing is implemented.
[0051] The present invention provides a system parameter processing method, apparatus, device, and storage medium. The method is applied to a first participant among multiple participants participating in multi-party secure computing. The method includes: determining at least one training sample, where each training sample includes system parameters and corresponding system performance information when computing under the system parameters; constructing a model for predicting system performance information based on system parameters; and jointly performing federated training on the model with at least some of the other participants among the multiple participants according to the at least one training sample, where the trained model is used for any one of the multiple participants to adjust system parameters. By constructing a model for predicting system performance information based on system parameters, the present invention performs multi-party secure computing jointly by multiple participants, trains the model, and the trained model can be used to adjust system parameters for any one of the participants. Thus, the debugging of system parameters is automated to improve the efficiency of system parameter debugging. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 FIG. is a schematic diagram of an application scenario provided by an embodiment of the present invention;
[0053] Figure 2 FIG. is a schematic flowchart of a system parameter processing method provided by an embodiment of the present invention;
[0054] Figure 3 FIG. is a schematic diagram of the principle of horizontal federated learning provided by an embodiment of the present invention;
[0055] Figure 4 FIG. is a schematic flowchart of another system parameter processing method provided by an embodiment of the present invention;
[0056] Figure 5 FIG. is a schematic flowchart of a method for model training provided by an embodiment of the present invention;
[0057] Figure 6 FIG. is a schematic flowchart of a system parameter adjustment method provided by an embodiment of the present invention;
[0058] Figure 7 FIG. is a schematic structural diagram of a system parameter processing apparatus provided by an embodiment of the present invention;
[0059] Figure 8 FIG. is a schematic structural diagram of another system parameter processing apparatus provided by an embodiment of the present invention;
[0060] Figure 9 FIG. is a schematic structural diagram of a system parameter processing device provided by an embodiment of the present invention.
[0061] The implementation, functional features, and advantages of the object of the present invention will be further described with reference to the embodiments and the accompanying drawings. Detailed Implementation Modes
[0062] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided so that the present disclosure can be more thoroughly understood and the scope of the present disclosure can be fully conveyed to those skilled in the art.
[0063] The distributed system at the underlying layer of federated learning is relatively complex and has many configurable parameters. Manual debugging requires users to invest a large amount of learning costs and debugging costs to possibly obtain the optimal system parameters. This process is time-consuming, laborious, and inefficient.
[0064] To solve this problem, an embodiment of the present invention provides a method that can adjust system parameters based on a machine learning model. However, the amount of system parameter data of a single user is too small to meet the data volume requirements for optimizing the machine learning model. Federated learning is exactly a process participated by multiple parties, which makes up for the problem of insufficient data volume of a single user. The federated learning framework is an offline system that needs to be installed by users on their own hardware environments. Multiple users can train a system tuning model with stronger system tuning capabilities through federated learning, and thus use this model to effectively adjust system parameters.
[0065] In view of this, an embodiment of the present invention provides a system parameter processing method, device, equipment, and storage medium, which constructs a model for system parameter debugging and automates system parameter debugging to improve the efficiency of system parameter debugging.
[0066] Figure 1 A schematic diagram of an application scenario provided by an embodiment of the present invention. As Figure 1 shown, multiple participants participating in multi-party secure computing cooperate to process data. To improve the efficiency of data processing, it is necessary to adjust the system parameters of each party. Each participant has system parameters and corresponding system performance information. Through federated learning, multiple participants jointly train a model (hereinafter referred to as a system tuning model) for predicting system performance information based on system parameters. Each party can use the trained system tuning model to determine its local system parameters. Then, based on the determined system parameters, multi-party secure computing is performed.
[0067] The following will describe in detail some embodiments of the present invention with reference to the accompanying drawings. Without conflict between the embodiments, the following embodiments and the features in the embodiments can be combined with each other.
[0068] Figure 2The flowchart of a system parameter processing method provided by an embodiment of the present invention. The execution subject of the method provided by this embodiment can be any participant in multi-party secure computing. The participant can specifically be a server, a terminal device, a device cluster, etc. As Figure 2 shown, the system parameter processing method of this embodiment may include:
[0069] Step 201, determine at least one training sample, where each training sample includes system parameters and corresponding system performance information when calculating under these system parameters.
[0070] Among them, the system parameters refer to the parameters of the system architecture of the participant, which may include hardware parameters and software parameters. The hardware parameters refer to the parameters of the hardware device, and the software parameters refer to the parameters of the software configuration. The system performance information refers to the information that can characterize the system operation performance under the corresponding system parameters. For example, information such as the system performance score, etc., can be specifically determined by the processing speed, response time, etc. of the system.
[0071] The system parameters affect the system performance. Therefore, the system parameters can be used as feature variables, and the system performance can be used as the target variable (i.e., label) to jointly form a training sample.
[0072] For each participant, historical system parameter data and corresponding system performance data can be obtained locally as the training samples of this party.
[0073] Step 202, construct a model for predicting system performance information based on system parameters.
[0074] Determine the functional relationship between the system parameters and the system performance information, and construct a model based on this relationship. This model is the above-mentioned system tuning model.
[0075] Specifically, the model can adopt a linear regression model, a logistic regression model, a neural network model, etc., which are not limited here. In actual applications, the model type can be selected according to the characteristics of different models.
[0076] Step 203, based on at least one training sample, jointly perform federated training on the model with at least some of the other participants among multiple participants, where the trained model is used for any one of the multiple participants to adjust the system parameters.
[0077] Specifically, the training sample volume can be expanded by obtaining the training samples of other participants to improve the accuracy of model training. To ensure data privacy, the sample data can be encrypted before transmission, and encrypted computing is also used during the model training process of the participants.
[0078] Send the parameters of the trained model to other participating parties to achieve sharing of model parameters, so that each party can use the trained model to adjust the system parameters of its own party.
[0079] The system parameter processing method provided in this embodiment is applied to the first participating party among multiple participating parties participating in multi-party secure computing. The method includes: determining at least one training sample, where each training sample includes system parameters and corresponding system performance information when computing under these system parameters; constructing a model for predicting system performance information based on system parameters; and jointly performing federated training on the model with at least some of the other participating parties among the multiple participating parties according to at least one training sample, where the trained model is used for any one of the multiple participating parties to adjust system parameters. The present invention constructs a model for predicting system performance information based on system parameters, jointly performs multi-party secure computing by multiple participating parties, trains the model, and the trained model can be used to adjust the system parameters of any one of the participating parties. Thus, the debugging of system parameters is automated to improve the efficiency of system parameter debugging.
[0080] Before the system tuning model is finally determined, multiple model trainings may be required. Optionally, during the model training process, a preset number of training rounds can be set, and training ends when the training rounds are reached; or, training ends when the model converges. For example, a preset loss tolerance value can be set, the loss value is calculated during the training process, and it is determined that the result of the loss function converges when the loss value reaches the preset loss tolerance value, and training ends.
[0081] In addition, the number of model trainings and the final model parameters can also be determined by checking the model effect.
[0082] Correspondingly, step 203 of jointly performing federated training on the model with at least some of the other participating parties among the multiple participating parties according to at least one training sample may specifically include: jointly performing federated training on the model with at least some of the other participating parties among the multiple participating parties according to at least one training sample; repeatedly performing the following operations until the training end condition is met: adjusting the system parameters of the first participating party according to the trained model; determining whether the system performance information corresponding to the adjusted system parameters is better than that corresponding before the adjustment; if so, jointly performing federated training on the model with at least some of the other participating parties among the multiple participating parties; if not, determining that the training end condition is met.
[0083] According to at least one training sample, at least some of the other participants among multiple participants jointly perform at least one round of federated training on the model, and use the trained model to adjust the system parameters of the first participant, and determine whether the system performance of the adjusted system has improved compared with that before adjustment. If the system performance has improved, it indicates that the model trained this time has been optimized compared with the previous time, that is, the model still has the possibility of optimization, and then the next round of model training can be continued; if the system performance has not improved, it indicates that this training has not improved the performance of the model, that is, the model may have reached the best degree, and there is no need to perform the next round of model training, and the training can be ended.
[0084] In this embodiment, by directly using the trained model to perform actual system parameter adjustment and analyzing the system performance after adjustment, the degree of model training can be determined, which can be used as a guiding indicator for the model training process, and can efficiently monitor the model training process, avoiding poor model usage effects caused by too few model training times, or wasting time and resources caused by too many model training times, and improving the efficiency of model training.
[0085] In a possible implementation manner, the method for adjusting the system parameters of the first participant according to the trained model may specifically include: randomly generating multiple parameter adjustment schemes, and each parameter scheme includes system parameters to be input into the model; determining the system performance information corresponding to each parameter adjustment scheme according to the model; selecting a parameter adjustment scheme from multiple parameter adjustment schemes according to the system performance information corresponding to each parameter adjustment scheme; and adjusting the system parameters of the first participant according to the selected parameter adjustment scheme.
[0086] First, randomly generate multiple parameter adjustment schemes, and each parameter adjustment scheme corresponds to a set of system parameters; input each set of system parameters into the model, and the corresponding system performance information (i.e., label) can be determined; use the system performance information corresponding to each set of system parameters as the basis for screening, select the system parameters corresponding to a parameter adjustment scheme as the new system parameters, and adjust the original system parameters of the first participant to the new system parameters.
[0087] The method for adjusting system parameters using the model provided in this embodiment is applicable not only to the process of detecting the model performance to determine whether to continue model training, but also to the process of actually adjusting system parameters using the finally trained model. By randomly generating parameter adjustment schemes and performing system performance analysis for each parameter adjustment scheme, the probability of generating the optimal system parameters can be increased, that is, the accuracy of model performance judgment can be improved, and the efficiency of system parameter adjustment can also be improved.
[0088] One way to select a tuning parameter scheme from multiple tuning parameter schemes according to the system performance information corresponding to each tuning parameter scheme is to select the tuning parameter scheme with the optimal system performance information from multiple tuning parameter schemes and use the corresponding system parameters as the new system parameters.
[0089] Another way to select a tuning parameter scheme from multiple tuning parameter schemes according to the system performance information corresponding to each tuning parameter scheme specifically may include: selecting, according to the system performance information corresponding to each tuning parameter scheme, the tuning parameter schemes whose system performance information meets the preset conditions from multiple tuning parameter schemes as alternative schemes; if there are multiple alternative schemes, for each alternative scheme, calculate the preset data set based on the system parameters of the alternative scheme and detect the corresponding system performance information during the calculation; select a tuning parameter scheme from multiple alternative schemes according to the detected system performance information corresponding to each alternative scheme.
[0090] Among them, the preset condition may be that the system performance information is greater than or equal to a certain threshold; or, the system performance information is arranged in order of superiority and inferiority, and several of the best are selected, and so on. Correspondingly, select the alternative schemes that meet the preset conditions from multiple tuning parameter schemes; use the alternative schemes to perform actual calculations on the preset data set and detect the corresponding actual system performance information, and accordingly, select the optimal tuning parameter scheme from the alternative schemes and use the corresponding system parameters as the new system parameters.
[0091] Among them, the system performance information may be the calculation speed or calculation duration of the preset data set. Scoring can be based on the calculation speed. For example, if it is greater than or equal to a certain speed value, the corresponding system performance is 80 points, etc. Scoring can also be based on the calculation duration. For example, if it is less than or equal to a certain duration value, the corresponding system performance is 80 points, etc.
[0092] In this embodiment, by screening alternative schemes and analyzing the actual system performance information corresponding to the alternative schemes based on the actual calculation process, the error of the system tuning model analysis can be excluded, and the effect of system parameter adjustment can be further improved.
[0093] In a possible implementation manner, jointly performing federated training on the continuous model with at least some of the other participating parties among multiple participating parties includes: constructing new training samples according to the detected system performance information; jointly performing federated training on the model with at least some of the other participating parties among multiple participating parties according to the new training samples.
[0094] During the model training process, it may involve using alternative solutions to perform actual calculations on a preset dataset; during the process of using the model to actually adjust system parameters, it will involve using the tuning parameter solution to calculate on the actual dataset. In these processes, new data pairs of "system parameters - system performance information" will be generated, which can be used as new sample data. Using the new sample data to update the training samples and then performing federated training can expand the number of samples, improve the model accuracy at the same time, and maximize the data value mining.
[0095] In a possible implementation, the model can be a linear regression model; the system parameters corresponding to the model include environmental parameters and distributed parameters; among them, the environmental parameters can include at least one of the following: CPU information, memory information, and hard disk information; the distributed parameters can include at least one of the following: thread pool information, network packet information, and retry waiting time.
[0096] Among them, the environmental parameters are equivalent to the hardware parameters mentioned in step 201 and are the basic parameters of the hardware device. The distributed parameters are equivalent to software parameters and are the parameters of the distributed system software configuration. The environmental parameters are generally fixed and cannot be adjusted, but the system parameters composed of different combinations of distributed parameters will result in different system performances, so they are also used as training samples to train the model.
[0097] Among the distributed parameters, the thread pool information can be the size of the thread pool in the multi-threaded processing mode; the network packet information can be the size of the network packet when transmitting data with other participants; the retry waiting time can refer to that after sending information to other participants, if no response is received from the participant within this time, the information will be resent.
[0098] Taking each system parameter as a feature variable, setting a weight value for each feature variable, and taking the system performance information as the target variable to construct a linear regression function.
[0099] As described in the above embodiments, the model can also be of other types, such as a logistic regression model, a neural network model, etc.
[0100] What each of the above embodiments illustrates is the model training process of any single participant. After each party completes the training, a model with more optimized parameters can also be obtained through model aggregation. Specifically, it can include: obtaining models constructed and trained by at least some other participants for predicting system performance information based on system parameters; aggregating the obtained models and the model constructed and trained by the first participant to obtain an aggregated model; among them, the model used for any participant among multiple participants to adjust system parameters is the aggregated model.
[0101] The parties participating in model training can be some or all of the parties participating in multi-party secure computation. Therefore, the parties participating in the execution entity of this method can jointly perform federated training with other parties participating in model training.
[0102] Specifically, for each party participating in model training, steps 201 to 203 are also executed to provide their respective local training samples, construct a system parameter tuning model, and jointly perform federated training with each other.
[0103] Since each party can provide target variable data, which conforms to the characteristics of horizontal federated learning, horizontal federated learning can be used for model training. Each party uses its local sample data to calculate model parameters, and the model parameters of each party are merged to obtain the model parameters. During the model training process, data transmission is involved, and encrypted calculation can be performed on the data. The encryption algorithm can use homomorphic encryption or semi-homomorphic encryption.
[0104] Figure 3 It is a schematic diagram of the principle of horizontal federated learning provided by an embodiment of the present invention. As Figure 3 shown, the parties participating in horizontal federated learning are client terminal 1, client terminal 2... client terminal k. Each client terminal uses its local sample data to calculate the model parameters of its own party, and sends the calculated model parameters of its own party to the server (i.e., the coordinator of horizontal federated learning). The server aggregates the model parameters of all parties to obtain the finally determined model parameters, and distributes them to each party to complete the model training process. The data during the sending process is encrypted data.
[0105] Figure 4 It is a schematic flowchart of another system parameter processing method provided by an embodiment of the present invention. The method of this embodiment can be applied to adjusting system parameters using a system parameter tuning model. The method includes:
[0106] Step 401, obtain a model for predicting system performance information according to system parameters.
[0107] Among them, this model is a system parameter tuning model obtained by the method of the above embodiment.
[0108] Step 402, generate at least one parameter tuning scheme, and each parameter scheme includes system parameters for input to the model.
[0109] Similar to the parameter tuning scheme in the above embodiment, each parameter tuning scheme corresponds to a set of system parameters, and each set of system parameters may include environmental parameters and distributed parameters.
[0110] Among them, the environmental parameters can be directly obtained from the device, and the distributed parameters can be randomly generated.
[0111] Step 403: Obtain the system performance information corresponding to each parameter adjustment scheme according to the model, and adjust the system parameters based on the system performance information of each parameter adjustment scheme.
[0112] Input the system parameters corresponding to each parameter adjustment scheme into the model, and the predicted values of the system performance information can be output correspondingly. Then, the system parameters can be adjusted according to the system performance information corresponding to each parameter adjustment scheme.
[0113] The trained model can accurately predict the system performance information corresponding to a set of system parameters, which is relatively close to the actual system performance information. Therefore, the method of this embodiment can quickly and accurately compare multiple sets of parameter adjustment schemes, and determine the optimal parameter adjustment scheme from them to adjust the system parameters. Compared with the prior art, the overall efficiency is greatly improved.
[0114] Among them, the specific implementation of some similar technical features can refer to the description in the above embodiments.
[0115] Figure 5 This is a flowchart of a method for model training provided by an embodiment of the present invention. Both Institution A and Institution B have deployed a federated learning distributed framework. First, collect the initial parameters of the framework and initialize the system parameter adjustment model accordingly. Then, train the model parameters through the method of federated modeling to obtain a new model. After each modeling, use the new model to optimize the system parameters. If the system performance improves compared to the previous time, it means that the federated modeling this time has successfully optimized the system parameters. Repeat this process until the system performance no longer improves, and then the federated optimization modeling of this time is completed.
[0116] The system parameter adjustment model in this embodiment uses a multi-feature linear regression model for fitting. In this model, the current Institution A has the following characteristics:
[0117]
[0118] Institution B also has similar parameters and scoring data.
[0119] Among the above data, it includes environmental parameters and distributed system parameters. The former refers to the server environmental parameters of users, such as the number of CPU cores, memory size, and hard disk size, etc.; the latter is the distributed system parameter. The performance score is the federated learning performance score (score range is 0 - 100) under the corresponding environmental parameters and distributed system parameters. Substitute the above parameters into the model:
[0120] h θ = θ0 + θ1 * x1 + θ2 * x2 + θ3 * x3 + θ4 * x4 + … + θ n * x n
[0121] Where x represents the above-mentioned environmental parameters and distributed system parameters (x is the feature), h θ (x) is the model mentioned in this embodiment, and each organization can provide the same x (each organization has its own environmental parameters and distributed system parameters). Therefore, this problem can be converted into a multi-feature linear regression modeling of federated learning (all the above parameters are features, and the model h is obtained by training). θ (x)). By jointly conducting federated learning and multi-feature linear regression modeling among multiple institutions, the data of multiple institutions (different environmental parameters and distributed system parameters and their corresponding performance scores) can be aggregated, thereby greatly increasing the amount of training data and obtaining a better model h θ (x).
[0122] After completing the above-mentioned federated learning multi-feature linear regression modeling, the model h can be obtained. θ (x). The present invention uses enumeration to perform parameter regression. For example, the model h θ After (x), the newly joined organization C inputs its own environmental parameters (for a specific organization, these parameters are often fixed) and randomly generates a large number of distributed system parameters. The process is as follows: Figure 6 As shown. The distributed system parameters generated by random generation and / or enumeration are combined with the environment parameters of the server to form a variety of system parameter combinations. When input into the model, the system performance prediction score of each parameter combination can be obtained, and then the parameter combination with the highest performance can be selected as the new system parameter. The more parameter combinations there are, the better the final result will be, thus saving the time that the organization needs to use real algorithms to obtain performance scores, greatly reducing costs.
[0123] In the original federated learning system, the system parameters of each user are isolated. In the process of system tuning, users can only rely on personal experience and repeated experiments to obtain the optimal parameters. However, the present invention solves this problem by combining the parameters of multiple users for federated learning to obtain a better system model. This eliminates the need for users to repeatedly adjust parameters when using the federated learning system, and at the same time concentrates more parameter data to obtain a better parameter model to achieve a better system tuning effect.
[0124] Figure 7 FIG. 1 is a schematic diagram of the structure of a system parameter processing device provided by an embodiment of the present invention. Figure 7 As shown, the system parameter processing device 700 may include: a training sample determination module 701, a model construction module 702, and a model training module 703.
[0125] A training sample determination module 701, which determines at least one training sample, where each training sample includes system parameters and corresponding system performance information when calculations are performed under these system parameters;
[0126] A model construction module 702, which is used to construct a model for predicting system performance information based on system parameters;
[0127] A model training module 703, which is used to perform federated training on the model according to at least one training sample, jointly with at least some of the other participants among multiple participants, where the trained model is used for any one of the multiple participants to adjust system parameters.
[0128] In a possible implementation, the model training module 703 is specifically used for:
[0129] Performing federated training on the model according to at least one training sample, jointly with at least some of the other participants among multiple participants;
[0130] Repeatedly execute the following operations until the training end condition is satisfied:
[0131] Adjusting the system parameters of the first participant according to the trained model;
[0132] Judging whether the system performance information corresponding to the adjusted system parameters is better than the system performance corresponding before adjustment;
[0133] If so, jointly perform federated training on the continued model with at least some of the other participants among multiple participants;
[0134] If not, determine that the training end condition is satisfied.
[0135] In a possible implementation, when the model training module 703 adjusts the system parameters of the first participant according to the trained model, it is specifically used for:
[0136] Randomly generating multiple parameter adjustment schemes, where each parameter scheme includes system parameters for input to the model;
[0137] Determining the system performance information corresponding to each parameter adjustment scheme according to the model;
[0138] Selecting a parameter adjustment scheme from multiple parameter adjustment schemes according to the system performance information corresponding to each parameter adjustment scheme;
[0139] Adjusting the system parameters of the first participant according to the selected parameter adjustment scheme.
[0140] In a possible implementation, when the model training module 703 selects a parameter adjustment scheme from multiple parameter adjustment schemes according to the system performance information corresponding to each parameter adjustment scheme, it is specifically used for:
[0141] Select a tuning parameter scheme whose system performance information meets the preset conditions from multiple tuning parameter schemes as an alternative scheme according to the system performance information corresponding to each tuning parameter scheme;
[0142] If there are multiple alternative schemes, for each alternative scheme, calculate on a preset data set based on the system parameters of the alternative scheme, and detect the system performance information corresponding when the calculation is performed;
[0143] Select a tuning parameter scheme from multiple alternative schemes according to the detected system performance information corresponding to each alternative scheme.
[0144] In a possible implementation manner, when the model training module 703 performs federated training on the continued model by combining at least some of the other participating parties among multiple participating parties, it is specifically used for:
[0145] Construct a new training sample according to the detected system performance information;
[0146] Perform federated training on the model by combining at least some of the other participating parties among multiple participating parties according to the new training sample.
[0147] In a possible implementation manner, the model is a linear regression model; the system parameters corresponding to the model include environmental parameters and distributed parameters;
[0148] Among them, the environmental parameters include at least one of the following: CPU information, memory information, and hard disk information;
[0149] The distributed parameters include at least one of the following: thread pool information, network packet information, and retry waiting time.
[0150] In a possible implementation manner, the device 700 further includes:
[0151] An acquisition module 704, configured to acquire a model for predicting system performance information constructed and trained by at least some of the other participating parties;
[0152] A model aggregation module 705, configured to aggregate the acquired model and the model constructed and trained by the first participating party to obtain an aggregated model;
[0153] Among them, the model for any participating party among multiple participating parties to adjust system parameters is the aggregated model.
[0154] The system parameter processing device provided in this embodiment can be used to execute the technical solutions provided in any of the foregoing method embodiments, and its implementation principles and technical effects are similar, and will not be elaborated here.
[0155] Figure 8This is a schematic structural diagram of another system parameter processing device provided by an embodiment of the present invention. As Figure 8 shown, the system parameter processing device 800 may include: an acquisition module 801, a tuning parameter scheme generation module 802, and a parameter adjustment module 803.
[0156] The acquisition module 801 is configured to acquire a model for predicting system performance information according to system parameters, where the model is a model obtained based on the device described in any one of the foregoing items;
[0157] The tuning parameter scheme generation module 802 is configured to generate at least one tuning parameter scheme, and each parameter scheme includes system parameters for input to the model;
[0158] The parameter adjustment module 803 is configured to obtain the system performance information corresponding to each tuning parameter scheme according to the model, and perform system parameter adjustment according to the system performance information of each tuning parameter scheme.
[0159] The system parameter processing device provided in this embodiment can be used to execute the technical solutions provided in any one of the foregoing method embodiments, and its implementation principle and technical effects are similar, which will not be elaborated here.
[0160] Figure 9 This is a schematic structural diagram of a system parameter processing device provided by an embodiment of the present invention. As Figure 9 shown, the system parameter processing device may include: a memory 901, a processor 902, and a data processing program stored on the memory 901 and executable on the processor 902. When the data processing program is executed by the processor 902, the steps of the system parameter processing method in any one of the foregoing embodiments are implemented.
[0161] Optionally, the memory 901 may be either independent or integrated with the processor 902.
[0162] The implementation principle and technical effects of the device provided in this embodiment can be referred to in the foregoing embodiments, which will not be elaborated here.
[0163] An embodiment of the present invention further provides a computer-readable storage medium, on which a data processing program is stored. When the data processing program is executed by a processor, the steps of the system parameter processing method in any one of the foregoing embodiments are implemented.
[0164] An embodiment of the present invention further provides a computer program product, including a computer program. When the computer program is executed by a processor, the system parameter processing method in any one of the foregoing embodiments is implemented.
[0165] In several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules is only a logical function division. In actual implementation, there may be other division methods. For example, multiple modules can be combined or integrated into another system, or some features can be ignored or not executed.
[0166] The integrated modules implemented in the form of software function modules can be stored in a computer-readable storage medium. The above software function modules are stored in a storage medium, including several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute some steps of the methods in various embodiments of the present invention.
[0167] It should be understood that the above processor can be a Central Processing Unit (CPU for short), and can also be other general-purpose processors, Digital Signal Processors (DSP for short), Application Specific Integrated Circuits (ASIC for short), etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in combination with the invention can be directly implemented by the execution of the hardware processor, or can be implemented by the combination of the hardware and software modules in the processor.
[0168] The memory may include high-speed RAM memory, and may also include non-volatile storage NVM, such as at least one disk memory, and can also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk or an optical disc, etc.
[0169] The above storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic memory, flash memory, magnetic disk or optical disc. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0170] An exemplary storage medium is coupled to a processor, enabling the processor to read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an Application Specific Integrated Circuits (ASIC). Of course, the processor and the storage medium can also exist as discrete components in an electronic device or a master device.
[0171] It should be noted that in this article, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising a..." does not exclude the presence of additional identical elements in the process, method, article or device comprising such element.
[0172] The serial numbers of the above embodiments of the present invention are only for description and do not represent the superiority or inferiority of the embodiments.
[0173] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions for causing a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods of the various embodiments of the present invention.
[0174] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention accordingly. Any equivalent structure or equivalent process transformation made by using the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present invention.
Claims
1. A method for processing system parameters, characterized in that, Applied to a first participant among multiple participants participating in multi-party secure computing, the method includes: Determine at least one training sample, where each training sample includes system parameters and corresponding system performance information when computing under the system parameters; the system parameters include hardware parameters and software parameters; the system performance information refers to the information characterizing the system operation performance under the corresponding system parameters; Construct a model for predicting system performance information based on system parameters; According to the at least one training sample, jointly perform federated training on the model with at least some of the other participants among the multiple participants, specifically: According to the at least one training sample, jointly perform federated training on the model with at least some of the other participants among the multiple participants; Repeat the following operations until the training end condition is met: According to the trained model, adjust the system parameters of the first participant, specifically: randomly generate multiple parameter adjustment schemes, and each parameter scheme includes system parameters to be input into the model; according to the model, determine the system performance information corresponding to each parameter adjustment scheme; according to the system performance information corresponding to each parameter adjustment scheme, select a parameter adjustment scheme from the multiple parameter adjustment schemes; adjust the system parameters of the first participant according to the selected parameter adjustment scheme; Judge whether the system performance information corresponding to the adjusted system parameters is better than that corresponding to before adjustment; If so, jointly perform federated training on the model with at least some of the other participants among the multiple participants; If not, determine that the training end condition is met; Among them, the trained model is used for any participant among the multiple participants to adjust system parameters.
2. The method according to claim 1, characterized in that, Select a parameter adjustment scheme from the multiple parameter adjustment schemes according to the system performance information corresponding to each parameter adjustment scheme, including: Select the parameter adjustment schemes whose system performance information meets the preset conditions from the multiple parameter adjustment schemes according to the system performance information corresponding to each parameter adjustment scheme as alternative schemes; If there are multiple alternative schemes, for each alternative scheme, calculate on a preset data set based on the system parameters of the alternative scheme, and detect the corresponding system performance information when calculating; Select a parameter adjustment scheme from the multiple alternative schemes according to the system performance information corresponding to each detected alternative scheme.
3. The method according to claim 2, characterized in that, Jointly perform federated training on the model with at least some of the other participants among the multiple participants, including: Construct a new training sample according to the detected system performance information; According to the new training sample, jointly perform federated training on the model with at least some of the other participants among the multiple participants.
4. The method according to claim 1, characterized in that, The model is a linear regression model; the system parameters corresponding to the model include environmental parameters and distributed parameters; Among them, the environmental parameters include at least one of the following: CPU information, memory information, and hard disk information; The distributed parameters include at least one of the following: thread pool information, network packet information, and retry waiting time.
5. The method according to any one of claims 1-4, characterized in that, It also includes: Obtain the model constructed and trained by at least some of the other participants for predicting system performance information based on system parameters; Aggregate the obtained model and the model constructed and trained by the first participant to obtain an aggregated model; Among them, the model for any participant among the multiple participants to adjust system parameters is the aggregated model.
6. A system parameter processing method, characterized in that, It includes: Obtain a model for predicting system performance information according to system parameters, where the model is a model obtained by the method according to any one of claims 1-5; Generate at least one parameter adjustment plan, and each parameter plan includes system parameters for input to the model; According to the model, obtain the system performance information corresponding to each parameter adjustment plan, and adjust the system parameters according to the system performance information of each parameter adjustment plan.
7. A system parameter processing device, characterized in that It includes: A training sample determination module, which determines at least one training sample, where each training sample includes system parameters and the system performance information corresponding to the calculation under the system parameters; the system parameters include hardware parameters and software parameters; the system performance information refers to the information characterizing the system operation performance under the corresponding system parameters; A model construction module, which is used to construct a model for predicting system performance information according to system parameters; A model training module, which is used to perform federated training on the model according to the at least one training sample and in conjunction with at least some of the other participants among the multiple participants. Specifically: According to the at least one training sample, perform federated training on the model in conjunction with at least some of the other participants among the multiple participants; Repeat the following operations until the training end condition is met: According to the trained model, adjust the system parameters of the first participant. Specifically: randomly generate multiple parameter adjustment plans, and each parameter plan includes system parameters for input to the model; according to the model, determine the system performance information corresponding to each parameter adjustment plan; according to the system performance information corresponding to each parameter adjustment plan, select a parameter adjustment plan from the multiple parameter adjustment plans; adjust the system parameters of the first participant according to the selected parameter adjustment plan; Judge whether the system performance information corresponding to the adjusted system parameters is better than the system performance corresponding to before adjustment; If so, continue to perform federated training on the model in conjunction with at least some of the other participants among the multiple participants; If not, determine that the training end condition is met; Among them, the trained model is used for any participant among the multiple participants to adjust system parameters.
8. A system parameter processing device, characterized in that It includes: An acquisition module, which is used to acquire a model for predicting system performance information according to system parameters, where the model is a model obtained by the device according to claim 7; A parameter adjustment plan generation module, which is used to generate at least one parameter adjustment plan, and each parameter plan includes system parameters for input to the model; A parameter adjustment module, which is used to obtain the system performance information corresponding to each parameter adjustment plan according to the model, and adjust the system parameters according to the system performance information of each parameter adjustment plan.
9. A system parameter processing device, characterized in that, The system parameter processing device includes: a memory, a processor, and a system parameter processing program stored on the memory and executable on the processor. When the system parameter processing program is executed by the processor, it implements the steps of the system parameter processing method according to any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that, A system parameter processing program is stored on the computer-readable storage medium. When the system parameter processing program is executed by a processor, it implements the steps of the system parameter processing method according to any one of claims 1 to 6.
11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the system parameter processing method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Model hyper-parameter adjustment control method and device, computer device and storage medium
CN110443126A
Method and device for determining contribution degree of participant
CN110717671A