Method, device and medium for operation time prediction of federated learning task

By obtaining the unit input description information of the data processing task in the federated learning task, and using the computation time model to predict and update the unit computation time, the problem of inaccurate computation time prediction in the prior art is solved, and accurate prediction and real-time updating of computation time are achieved.

CN116167464BActive Publication Date: 2026-01-27LINGSHU TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310224191.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-08
Publication Date
2026-01-27
Estimated Expiration
2043-03-08

AI Technical Summary

Technical Problem

Existing federated learning task platforms cannot accurately predict computation time, resulting in a significant discrepancy between the predicted computation time and the actual computation time.

Method used

By acquiring data processing tasks from federated learning tasks, determining unit input description information based on execution order, predicting target unit computation time using unit computation time models, and updating initial unit computation time in real time, the accuracy of computation time is improved.

Benefits of technology

It enables accurate prediction and real-time updating of the computation time for each data processing task in federated learning tasks, thereby improving the accuracy of computation time prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116167464B_ABST
    Figure CN116167464B_ABST
Patent Text Reader

Abstract

A method, apparatus, device and medium for predicting operation time of a federated learning task are disclosed. The method comprises: obtaining a data processing task included in the federated learning task; determining unit input description information corresponding to the data processing task according to an execution sequence of the data processing task in the federated learning task; predicting a target unit operation time of the data processing task according to the unit input description information corresponding to the data processing task; obtaining an initial unit operation time of the data processing task, and updating the initial unit operation time by using the target unit operation time, wherein the initial unit operation time is determined according to task input description information corresponding to the federated learning task. The embodiments of the present application can automatically determine and update the operation time of the federated learning task in real time, and improve the accuracy of operation time determination.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to methods, apparatus, devices and media for predicting computation time for federated learning tasks. Background Technology

[0002] In the federated learning task platform, the computation time of a user's submitted federated learning task is determined by a number of factors.

[0003] Existing federated learning task platforms can only display the running or finished status, or determine the computation time based on some rules, which deviates greatly from the actual computation time. Summary of the Invention

[0004] This invention provides a method, apparatus, device, and medium for predicting the computation time of federated learning tasks, which can automatically determine and update the computation time of federated learning tasks in real time, thereby improving the accuracy of computation time determination.

[0005] According to one aspect of the present invention, a method for predicting the computation time of a federated learning task is provided, the method comprising:

[0006] Obtain the data processing tasks included in the federated learning task;

[0007] Based on the execution order of the data processing tasks in the federated learning task, determine the unit input description information corresponding to the data processing task;

[0008] Based on the unit input description information corresponding to the data processing task, predict the target unit computation time of the data processing task.

[0009] The initial unit computation time of the data processing task is obtained, and the initial unit computation time is updated using the target unit computation time, wherein the initial unit computation time is determined based on the task input description information corresponding to the federated learning task.

[0010] According to another aspect of the present invention, a computation time prediction device for a federated learning task is provided, the device comprising:

[0011] The task acquisition module is used to acquire the data processing tasks included in the federated learning task.

[0012] The information determination module is used to determine the unit input description information corresponding to the data processing task based on the execution order of the data processing task in the federated learning task;

[0013] The time prediction module is used to predict the target unit operation time of the data processing task based on the unit input description information corresponding to the data processing task.

[0014] The time update module is used to obtain the initial unit computation time of the data processing task and update the initial unit computation time using the target unit computation time, wherein the initial unit computation time is determined according to the task input description information corresponding to the federated learning task.

[0015] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0016] At least one processor; and

[0017] A memory communicatively connected to the at least one processor; wherein,

[0018] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the computation time prediction method for the federated learning task according to any embodiment of the present invention.

[0019] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the computation time prediction method for the federated learning task according to any embodiment of the present invention.

[0020] According to another aspect of the present invention, a computer product is provided, the computer program product comprising a computer program that, when executed by a processor, implements the computation time prediction method for federated learning tasks according to any embodiment of the present invention.

[0021] The technical solution of this invention determines the unit input description information corresponding to the data processing task by determining the execution order of the data processing task in the federated learning task process, and predicts the target unit computation time of the data processing task based on the unit input description information. This realizes the prediction of the computation time of each data processing task in the federated learning task, refines the computation time prediction process of the federated learning task, updates the initial unit computation time by the target unit computation time, and updates the computation time in real time during the execution of the federated learning task, thereby improving the accuracy of the computation time prediction of the federated learning task.

[0022] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0024] Figure 1 This is a flowchart of a method for predicting the computation time of a federated learning task according to Embodiment 1 of the present invention;

[0025] Figure 2 This is a flowchart of a method for predicting the computation time of a federated learning task according to Embodiment 2 of the present invention;

[0026] Figure 3 This is an application diagram of a computation time prediction method for a federated learning task provided in Embodiment 3 of the present invention;

[0027] Figure 4 This is a schematic diagram of the structure of a computation time prediction device for a federated learning task according to Embodiment 4 of the present invention;

[0028] Figure 5 This is a schematic diagram of the structure of an electronic device that implements the computation time prediction method for the federated learning task according to an embodiment of the present invention. Detailed Implementation

[0029] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0030] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices. In the technical solutions of this invention, the collection, storage, use, processing, transmission, provision, and disclosure of data all comply with relevant laws and regulations and do not violate public order and good morals.

[0031] Example 1

[0032] Figure 1 This is a flowchart of a method for predicting the computation time of a federated learning task according to Embodiment 1 of the present invention. This embodiment is applicable to predicting the computation time required for a federated learning task from start to finish. This method can be executed by a computation time prediction device for a federated learning task, which can be implemented in hardware and / or software and can be configured in an electronic device. Figure 1 As shown, the method includes:

[0033] S110. Obtain the data processing tasks included in the federated learning task.

[0034] Federated learning is a distributed machine learning technique. Its core idea is to train models across multiple data sources with local data without exchanging local data. Instead, it builds a global model based on virtual fused data by exchanging model parameters or intermediate results, thus achieving a balance between data privacy protection and shared computation. A federated learning task describes a model that needs to be built using federated learning technology. In this invention, users can build federated learning tasks through a federated learning task platform. The platform automatically executes the tasks, training the model described by the task. Upon completion, the trained model is obtained.

[0035] Data processing tasks are used to process the data input to the federated learning task. It is understood that a federated learning task consists of at least one data processing task, arranged in a specific order. In this invention, the data processing tasks can be modularized and named, allowing them to be reused in different or the same federated learning task. For example, in the three data processing tasks constituting the federated learning task, the first task is logistic regression, the second is linear regression, and the third is logistic regression.

[0036] Specifically, based on the federated learning task created by the user, one of the data processing tasks is obtained from at least one data processing task included in the federated learning task.

[0037] S120. Determine the unit input description information corresponding to the data processing task according to the execution order of the data processing task in the federated learning task.

[0038] Execution order refers to the sequential order in which data processing tasks are executed. In federated learning, data processing tasks are arranged in a specific order, meaning they are executed sequentially according to their execution order. In this invention, the execution order of data processing tasks can be the same or different. If at least two data processing tasks have the same execution order, these two tasks can be executed simultaneously. After all at least two tasks with the same execution order have been completed, the next data processing task is executed according to the execution order. Unit input description information describes the input data of a data processing task. Following the execution order of data processing tasks, the input data of the next data processing task is the output data of the previous data processing task. The input data of the first data processing task is the input data of the federated learning task. In this invention, the unit input description information can be determined based on the output data of the previous data processing task, or it can be pre-set for the data processing tasks, or it can be adjusted in real time according to the actual situation of executing the federated learning task. For example, the unit input description information includes at least one of the following: number of samples, number of features, data type, parameter configuration, network communication method, encryption algorithm, encryption time, hardware configuration, software configuration, number of nodes, and historical unit operation time. Here, the number of samples refers to the number of data points input to the data processing task; the number of features refers to the number of data points used to describe the features of the data input to the data processing task; the data type refers to the data type of the data input to the data processing task, such as numbers or characters; the parameter configuration refers to the parameters that constitute the data processing task; the network communication method refers to the communication method between different nodes when executing the same data processing task, such as one-way latency, where the nodes are used to execute the data processing task; the encryption algorithm refers to the algorithm used to encrypt the transmitted data when the nodes communicate over the network; the encryption time refers to the time required for the nodes to encrypt the transmission time; the hardware configuration refers to the configuration of the hardware devices used by the nodes to execute the data processing task, including at least the number of CPUs (Central Processing Units), memory size, and distributed storage information; the software configuration refers to the configuration of the software used by the nodes to execute the data processing task, including at least software version information; the number of nodes refers to the number of nodes used to execute the data processing task; and the historical unit computation time refers to the time required for the data processing task to be executed in the previous execution.

[0039] Specifically, in the process of processing federated learning tasks, the input data of the data processing tasks is determined according to the execution order of the data processing tasks, thereby obtaining the unit input description information corresponding to the data processing tasks.

[0040] In another possible implementation, determining the unit input description information corresponding to the data processing task based on the execution order of the data processing task in the process of processing the federated learning task includes: when the data processing task is the first data processing task in the execution order, using the task input description information corresponding to the federated learning task as the unit input description information corresponding to the data processing task; when the data processing task is another data processing task in the execution order besides the first data processing task, obtaining the unit output description information of the previous data processing task of the data processing task and using it as the unit input description information corresponding to the data processing task.

[0041] The unit output description information is used to describe the output data of the data processing task, and the content of the unit output description information is the same as that of the unit input description information.

[0042] Specifically, when processing federated learning tasks, the first data processing task executed is designated as the first data processing task, and its unit input description information is the same as the task input description information for the federated learning task. All other data processing tasks are designated as other data processing tasks, and their unit input description information is the same as the unit output description information for the previous data processing task.

[0043] S130. Based on the unit input description information corresponding to the data processing task, predict the target unit computation time of the data processing task.

[0044] Unit computation time refers to the time required to execute a data processing task. Target unit computation time refers to the unit computation time of the data processing task currently being executed. The target unit computation time can be determined based on empirical values; alternatively, a model predicting the target unit computation time can be pre-set. The unit input description information is input into the selected model, and the model predicts the target unit computation time of the data processing task, thereby improving the accuracy of the target unit computation time.

[0045] Specifically, the target unit computation time of the data processing task can be predicted at the same time as the data processing task begins to be executed, or the target unit computation time of the data processing task can be predicted before the data processing task is executed.

[0046] S140. Obtain the initial unit computation time of the data processing task, and update the initial unit computation time using the target unit computation time, wherein the initial unit computation time is determined based on the task input description information corresponding to the federated learning task.

[0047] The initial unit computation time refers to the predicted unit computation time before the federated learning task is executed. Task input description information describes the data input to the federated learning task. Task input description information includes at least one of the following: number of samples, number of features, data type, parameter configuration, network communication method, encryption algorithm, encryption time, hardware configuration, software configuration, and number of nodes. The content of the task input description information can be the same as the content of the unit input description information. A model for predicting the initial unit computation time can be pre-set, using the task input description information as input data to predict the initial unit computation time of the data processing task.

[0048] Specifically, before the federated learning task is executed, the task input description information is fed into the model that predicts the initial unit computation time. The output result is the initial unit computation time of each data processing task in the federated learning task. After the federated learning task starts, the initial unit computation time of the data processing task is updated to the target unit computation time of the data processing task to improve the accuracy of the unit computation time.

[0049] For example, a federated learning task includes three data processing tasks, arranged in execution order: Data Processing Task 1, Data Processing Task 2, and Data Processing Task 3. Before executing the federated learning task, the task input description information is input into the model predicting the initial unit computation time, resulting in the initial unit computation time 1 for Data Processing Task 1, the initial unit computation time 2 for Data Processing Task 2, and the initial unit computation time 3 for Data Processing Task 3. During the processing of the federated learning task, if the data processing task obtained from the federated learning task is Data Processing Task 1, the target unit computation time 1 for Data Processing Task 1 is predicted according to the execution order of Data Processing Task 1 and the corresponding unit input description information, and the initial unit computation time 1 is updated to the target unit computation time 1. If the data processing task obtained from the federated learning task is Data Processing Task 2, the target unit computation time 2 for Data Processing Task 2 is predicted according to the execution order of Data Processing Task 2 and the corresponding unit input description information, and the initial unit computation time 2 is updated to the target unit computation time 2. If the data processing task obtained from the federated learning task is data processing task 3, according to the execution order of data processing task 3, based on the unit input description information corresponding to data processing task 3, predict the target unit computation time 3 of data processing task 3, and update the initial unit computation time 3 to the target unit computation time 3.

[0050] It is understood that in this invention, during the processing of federated learning tasks, each data processing task can be obtained sequentially according to the execution order of the data processing tasks, and the initial unit computation time of each data processing task can be updated to the target unit computation time, thereby improving the accuracy of the computation time prediction for federated learning tasks.

[0051] The technical solution of this invention determines the unit input description information corresponding to the data processing task and predicts the target unit computation time of the data processing task based on the unit input description information. It can predict the target unit computation time for the specific input data of each data processing task, thereby improving the accuracy of the target unit computation time prediction. By updating the initial unit computation time through the target unit computation time, it realizes the real-time update of the computation time during the execution of the federated learning task, thus improving the accuracy of the computation time prediction for the federated learning task.

[0052] Optionally, predicting the target unit computation time of the data processing task based on the unit input description information corresponding to the data processing task includes: obtaining a unit computation time model corresponding to the data processing task; inputting the unit input description information corresponding to the data processing task into the unit computation time model to obtain the target unit computation time of the data processing task.

[0053] Unit computation time models are used to predict the target unit computation time for data processing tasks. There must be at least one unit computation time model, and different models have different structures. For example, a unit computation time model can be a linear regression model, a generalized linear regression model, a sample-weighted linear regression model, a piecewise linear regression model, and a Kalman filter model, etc. A data processing task can be predicted by a corresponding unit computation time model.

[0054] Specifically, the unit computation time model corresponding to the data processing task can be obtained through table lookup or other methods. The unit input description information corresponding to the data processing task is used as the input data for the unit computation time model to obtain the output data of the unit computation time model, which is the target unit computation time of the data processing task.

[0055] By determining the target unit's computation time using a unit computation time model, the accuracy of the target unit's transportation time is improved.

[0056] In another possible implementation, obtaining the unit computation time model corresponding to the data processing task includes: obtaining node information from the unit input description information; the node information includes the number of nodes and the interaction attributes between nodes, the nodes being used to execute the data processing task; and determining the unit computation time model corresponding to the data processing task based on the node information.

[0057] Nodes are used to execute data processing tasks within a federated learning task. A data processing task can be executed simultaneously by at least one node. Node information describes the nodes executing the data processing task. Specifically, node information includes the number of nodes and the interaction attributes between nodes. The interaction attributes describe whether nodes executing the same data processing task need to communicate over the network. For example, the interaction attributes can be "interactive" or "non-interactive," where "interactive" means that nodes executing the same data processing task need to communicate over the network, and "non-interactive" means that nodes executing the same data processing task do not need to communicate over the network.

[0058] Specifically, the correspondence rules between node information and unit operation time models can be pre-set. Node information can be obtained from the unit input description information. Based on the number of nodes in the node information and the interaction attributes between nodes, a unit operation time model that conforms to the corresponding rules can be selected from at least one unit operation time model as the unit operation time model corresponding to the data processing task.

[0059] For example, the corresponding rule can be: if the number of nodes is 1, it corresponds to unit operation time model 1, where t = wx, t is the target unit operation time, w is the model parameter, and x is the node information of a node; if the number of nodes is greater than 1 and the interaction attribute between nodes is interactive, it corresponds to unit operation time model 2, where t = wX, t is the target unit operation time, w is the model parameter, and x is the node information of all nodes; if the number of nodes is greater than 1 and the interaction attribute between nodes is non-interactive, it corresponds to unit operation time model 3, where t = max(t1, t2, t3, ...), t is the target unit operation time, representing the maximum value of the time for each node to execute the data processing task, t1 is the time for node 1 to execute the data processing task, t2 is the time for node 2 to execute the data processing task, t3 is the time for node 3 to execute the data processing task, and so on. The method for determining the execution time of each node is the same as the principle of unit operation time model 1.

[0060] By setting at least one unit operation time model, the unit operation time model corresponding to the data processing task is determined based on the node information in the unit input description information, which increases the flexibility of the target unit operation time prediction and provides a basis for determining the accuracy of the target unit operation time.

[0061] Example 2

[0062] Figure 2This is a flowchart of a method for predicting the computation time of a federated learning task according to Embodiment 2 of the present invention. Based on the above embodiments, this embodiment specifies the acquisition of data processing tasks included in the federated learning task as follows: acquiring selection operation data of the task initiator on the federated learning task platform for the data processing task list; determining at least one data processing task to process the federated learning task based on the selection operation data; and selecting one data processing task from among the data processing tasks. For example... Figure 2 As shown, the method includes:

[0063] S210. Obtain the selection operation data of the data processing task list by the task initiator on the federated learning task platform.

[0064] The task initiator refers to the user who creates the federated learning task. Users can be individuals, organizations, or groups. The data processing task list describes the data processing tasks set up in the federated learning task platform. It is understood that at least one data processing task is pre-set in the federated learning task platform and is described through the data processing task list. The selected operation data describes the data processing tasks that the task initiator selects to constitute the federated learning task on the federated learning task platform.

[0065] Specifically, the task initiator can view the data processing task list on the federated learning task processing platform, perform operations on the data list, and generate selection operation data. The federated learning task processing platform then retrieves this selection operation data. For example, the task initiator can select data processing tasks in the data processing task list to generate selection operation data, or they can drag and drop data processing tasks in the list to generate selection operation data.

[0066] For example, you can select Data Processing Task 1, Data Processing Task 3, and Data Processing Task 4 from the data processing task list to generate selection operation data.

[0067] S220. Based on the selected operation data, determine at least one data processing task to process the federated learning task.

[0068] Based on the selected operation data, at least one data processing task selected by the task initiator can be determined, and the selected at least one data processing task can be used as the data processing task for the federated learning task.

[0069] S230. Select one data processing task from the data processing tasks described.

[0070] Specifically, you can choose any data processing task from the data processing tasks; or you can choose a data processing task in the order of execution of the data processing tasks.

[0071] S240. Determine the unit input description information corresponding to the data processing task according to the execution order of the data processing task in the federated learning task.

[0072] S250. Based on the unit input description information corresponding to the data processing task, predict the target unit computation time of the data processing task.

[0073] S260. Obtain the initial unit computation time of the data processing task, and update the initial unit computation time using the target unit computation time, wherein the initial unit computation time is determined based on the task input description information corresponding to the federated learning task.

[0074] The technical solution of this invention determines at least one data processing task for processing a federated learning task by selecting data from the list of data processing tasks on the federated learning task platform. This allows the task initiator to directly determine the data processing task from the federated learning task platform, reducing the workload of the task initiator and improving the efficiency and convenience of constructing federated learning tasks.

[0075] Optionally, before determining the unit input description information corresponding to the data processing task based on the execution order of the data processing task in the process of processing the federated learning task, the method further includes: determining and displaying the initial task computation time of the federated learning task based on the initial unit computation time of the data processing task.

[0076] Task computation time refers to the time required to execute a federated learning task, or the total time required to execute all data processing tasks included in the federated learning task. Initial task computation time refers to the predicted time required for the federated learning task before execution. Specifically, the initial task computation time can be predicted using a pre-set task computation time model, or by weighted summing of the initial unit computation times of each data processing task included in the federated learning task. For example, a linear regression model can be pre-set as the task computation time model to predict the initial task computation time.

[0077] Specifically, before starting to execute a federated learning task, the federated learning task platform determines the initial task computation time through a task computation time model and displays this initial computation time on the display interface. This display interface can be the interface of the electronic device used by the task initiator when creating the federated learning task.

[0078] By determining and displaying the initial task computation time of a federated learning task, a data foundation is provided for the task initiator to optimize the federated learning task, thereby improving the convenience for the task initiator when using the federated learning task.

[0079] Optionally, after updating the initial unit computation time using the target unit computation time, the method further includes: obtaining the current task computation time, which is determined based on the initial task computation time and the target unit computation time of the completed data processing task; modifying and displaying the current task computation time based on the target unit computation time, so that the task initiator can optimize the processing method of the federated learning task.

[0080] The current task computation time refers to the time required from the current moment until the federated learning task is completed. Specifically, the current task computation time can be determined by subtracting the target unit computation time of the completed data processing task from the initial task computation time. Based on the target unit computation time, the initial task computation time is updated. That is, the target unit computation time and the initial unit computation time of the incomplete data processing tasks are input into the task computation time model to obtain the model's output, which is then used as the updated initial task computation time. The current task computation time is then modified using the updated initial task computation time and the target unit computation time of the completed data processing tasks. This involves subtracting the target unit computation time of the completed data processing tasks from the updated initial task computation time to obtain the modified current task computation time, which is then displayed on the interface. The task initiator can optimize the processing method of the federated learning task based on the modified current task computation time. For example, the task initiator can adjust the number of samples, the number of features, the data type, the parameter configuration, the network communication method, the encryption algorithm, the encryption time, the hardware configuration, the software configuration, and the number of nodes to optimize the processing of federated learning tasks and reduce task computation time.

[0081] In another implementation, after obtaining the current task computation time, the initial unit computation time of the unfinished data processing tasks is updated; based on the target unit computation time and the updated initial unit computation time of the unfinished data processing tasks, the current task computation time is modified and displayed so that the task initiator can optimize the processing method of the federated learning task.

[0082] Specifically, for at least one data processing task included in a federated learning task, data processing tasks other than those that have been completed can be considered as incomplete data processing tasks. Among the completed data processing tasks, the unit output description information of the last completed data processing task can be used as the unit input description information of the incomplete data processing tasks and input into the unit computation time model corresponding to the data processing task. Alternatively, based on the actual situation of executing the federated learning task, the unit input description information corresponding to the incomplete data processing tasks can be adjusted, and the adjusted unit input description information can be input into the unit computation time model corresponding to the data processing task. The resulting output is used as the updated initial unit computation time for the incomplete data processing tasks. The target unit computation time and the updated initial unit computation time for the incomplete data processing tasks are input into the task computation time model to obtain the output of the task computation time model, which is then determined as the updated initial task computation time. The current task computation time is modified by subtracting the target unit computation time of the completed data processing task from the updated initial task computation time, and then displayed on the display interface.

[0083] By obtaining the current task computation time and modifying it according to the target unit computation time, the current task computation time is updated in real time, which facilitates the task initiator to optimize the processing method of federated learning tasks.

[0084] Example 3

[0085] Figure 3 This is a schematic diagram illustrating the application of a computation time prediction method for a federated learning task according to Embodiment 3 of the present invention. Figure 3 As shown, the method includes:

[0086] S310. Obtain the data processing tasks included in the federated learning task.

[0087] For example, a federated learning task includes three data processing tasks, arranged in execution order: Data Processing Task 1, Data Processing Task 2, and Data Processing Task 3. The input data of the federated learning task serves as the input data for Data Processing Task 1, the output data of Data Processing Task 1 serves as the input data for Data Processing Task 2, and the output data of Data Processing Task 2 serves as the input data for Data Processing Task 3. The same data processing task can be executed by at least one node. Nodes executing the same data processing task can interact with each other or execute independently.

[0088] S320. Determine and display the initial task computation time of the federated learning task based on the initial unit computation time of the data processing task.

[0089] Specifically, based on the node information in the unit input description information of the data processing task, the unit computation time model corresponding to the data processing task is determined. The task input description information is then input into the unit computation time model corresponding to the data processing task to obtain the initial unit computation time of the data processing task. The node information can be pre-set by the task initiator when constructing the federated learning task. The initial unit computation times of the data processing tasks are added together to obtain the initial task computation time. Alternatively, the initial unit computation times can be input into the initial task computation time model by training the task computation time model to obtain the initial task computation time. Based on the previous example, the initial task computation time model is y = f(y1, y2, y3), where y is the initial task computation time, y1 is the initial task computation time of data processing task 1, y2 is the initial task computation time of data processing task 2, and y3 is the initial task computation time of data processing task 3.

[0090] S330. Determine the unit input description information corresponding to the data processing task according to the execution order of the data processing task in the federated learning task.

[0091] Building upon the previous example, the execution order of data processing task 1 is 1, and the unit input description information corresponding to data processing task 1 is the same as the task input description information. The execution order of data processing task 2 is 2, and the unit input description information corresponding to data processing task 2 is the same as the unit output description information corresponding to data processing task 1. The execution order of data processing task 3 is 3, and the unit input description information corresponding to data processing task 3 is the same as the unit output description information corresponding to data processing task 2.

[0092] S340. Based on the unit input description information corresponding to the data processing task, predict the target unit computation time of the data processing task.

[0093] Specifically, the unit input description information corresponding to the data processing task is input into the unit operation time model corresponding to the data processing task to obtain the target unit operation time of the data processing task.

[0094] S350. Obtain the initial unit computation time of the data processing task, and update the initial unit computation time using the target unit computation time.

[0095] S360. Obtain the current task computation time, which is determined based on the initial task computation time and the target unit computation time of the completed data processing task.

[0096] S370. Based on the target unit's computation time, modify and display the current task's computation time so that the task initiator can optimize the processing method of the federated learning task.

[0097] Building upon the previous example, after completing data processing task 1, the current task computation time is T = y - t1, where y = y1 + y2 + y3, T is the current task computation time, y is the initial task computation time, t1 is the target unit computation time of data processing task 1, y1 is the initial unit computation time of data processing task 1, y2 is the initial unit computation time of data processing task 2, and y3 is the initial unit computation time of data processing task 3. Based on the target unit computation time t1, the initial unit computation time is updated to y′, which is then y′ = t1 + y2 + y3. Using y′, the current task computation time is modified to obtain the modified current task computation time T′ = y′ - t1. After completing data processing task 2, the current task computation time is T = y′ - t1 - t2, where t2 is the target unit computation time of data processing task 2. Based on the target unit computation time t2, update the initial unit computation time y′. The updated initial unit computation time is y″. Then y″ = t1 + t2 + y3. Use y″ to modify the current task computation time, and obtain the modified current task computation time T″ = y″ - t1 - t2. And so on.

[0098] The technical solution of this invention determines the unit input description information corresponding to the data processing task and predicts the target unit computation time of the data processing task based on the unit input description information. It can predict the target unit computation time for the specific input data of each data processing task, thereby improving the accuracy of the target unit computation time prediction. By updating the initial unit computation time through the target unit computation time, it realizes the real-time update of the computation time during the execution of the federated learning task, thus improving the accuracy of the computation time prediction for the federated learning task.

[0099] Example 4

[0100] Figure 4 This is a schematic diagram of a computation time prediction device for a federated learning task provided in Embodiment 4 of the present invention. Figure 4 As shown, the device includes: a task acquisition module 401, an information determination module 402, a time prediction module 403, and a time update module 404.

[0101] The task acquisition module 401 is used to acquire the data processing tasks included in the federated learning task.

[0102] The information determination module 402 is used to determine the unit input description information corresponding to the data processing task according to the execution order of the data processing task in the federated learning task;

[0103] The time prediction module 403 is used to predict the target unit operation time of the data processing task based on the unit input description information corresponding to the data processing task.

[0104] The time update module 404 is used to obtain the initial unit operation time of the data processing task and update the initial unit operation time using the target unit operation time, wherein the initial unit operation time is determined according to the task input description information corresponding to the federated learning task.

[0105] Optionally, the time prediction module 403 includes:

[0106] The model determination unit is used to obtain the unit computation time model corresponding to the data processing task.

[0107] The time prediction unit is used to input the unit input description information corresponding to the data processing task into the unit operation time model to obtain the target unit operation time of the data processing task.

[0108] Optionally, the model determination unit includes:

[0109] A node information determination subunit is used to obtain node information from the unit input description information; the node information includes the number of nodes and the interaction attributes between nodes, and the nodes are used to perform the data processing task.

[0110] The model determines the sub-unit, which is used to determine the unit operation time model corresponding to the data processing task based on the node information.

[0111] Optionally, the information determination module 402 includes:

[0112] The first information determination unit is used to, when the data processing task is the first data processing task in the execution order, use the task input description information corresponding to the federated learning task as the unit input description information corresponding to the data processing task.

[0113] The second information determination unit is used to obtain the unit output description information of the previous data processing task of the data processing task when the data processing task is another data processing task in the execution order besides the first data processing task, and use it as the unit input description information corresponding to the data processing task.

[0114] Optionally, the task acquisition module 401 includes:

[0115] The data acquisition unit is used to acquire the selection operation data of the data processing task list by the task initiator on the federated learning task platform.

[0116] The task determination unit is used to determine at least one data processing task for processing the federated learning task based on the selected operation data.

[0117] The task selection unit is used to select one data processing task from the data processing tasks.

[0118] Optionally, the device may also include:

[0119] The initial task time determination module is used to determine and display the initial task computation time of the federated learning task based on the initial unit computation time of the data processing task.

[0120] Optionally, the device may also include:

[0121] The current task computation time determination module is used to obtain the current task computation time, which is determined based on the initial task computation time and the target unit computation time of the completed data processing task.

[0122] The current task computation time update module is used to modify and display the current task computation time based on the target unit computation time, so that the task initiator can optimize the processing method of the federated learning task.

[0123] The computation time prediction device for federated learning tasks provided in this embodiment of the invention can execute the computation time prediction method for federated learning tasks provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0124] Example 5

[0125] Figure 5 A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0126] like Figure 5As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0127] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0128] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as computation time prediction methods for federated learning tasks.

[0129] In some embodiments, the computation time prediction method for a federated learning task may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the computation time prediction method for a federated learning task described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the computation time prediction method for a federated learning task by any other suitable means (e.g., by means of firmware).

[0130] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0131] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0132] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0133] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0134] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0135] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0136] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0137] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method for predicting the computation time of a federated learning task, characterized in that, include: Obtain the data processing tasks included in the federated learning task; Based on the execution order of the data processing tasks in the federated learning task, the unit input description information corresponding to the data processing task is determined. The unit input description information refers to information describing the input data of the data processing task, including at least one of the following: number of samples, number of features, data type, parameter configuration, network communication method, encryption algorithm, encryption time, hardware configuration, software configuration, number of nodes, and historical unit operation time. Obtain node information from the unit input description information, wherein the node information includes the number of nodes and the interaction attributes between nodes, and the nodes are used to perform the data processing task; Based on the node information, determine the unit operation time model corresponding to the data processing task; The unit input description information corresponding to the data processing task is input into the unit operation time model to obtain the target unit operation time of the data processing task. The initial unit computation time of the data processing task is obtained, and the initial unit computation time is updated using the target unit computation time, wherein the initial unit computation time is determined based on the task input description information corresponding to the federated learning task.

2. The method according to claim 1, characterized in that, The step of determining the unit input description information corresponding to the data processing task based on the execution order of the data processing task in the process of processing the federated learning task includes: When the data processing task is the first data processing task in the execution order, the task input description information corresponding to the federated learning task is used as the unit input description information corresponding to the data processing task. When the data processing task is any data processing task other than the first data processing task in the execution sequence, the unit output description information of the previous data processing task is obtained and used as the unit input description information corresponding to the data processing task.

3. The method according to claim 1, characterized in that, The step of obtaining the data processing tasks included in the federated learning task includes: Obtain the selection and operation data of the data processing task list by the task initiator on the federated learning task platform; Based on the selected operation data, at least one data processing task is determined to process the federated learning task; Select one data processing task from the described data processing tasks.

4. The method according to claim 1, characterized in that, Before determining the unit input description information corresponding to the data processing task based on the execution order of the data processing task in the process of processing the federated learning task, the method further includes: Based on the initial unit computation time of the data processing task, determine and display the initial task computation time of the federated learning task.

5. The method according to claim 4, characterized in that, After updating the initial unit computation time using the target unit computation time, the method further includes: The current task computation time is obtained, and the current task computation time is determined based on the initial task computation time and the target unit computation time of the completed data processing task. Based on the target unit's computation time, the current task's computation time is modified and displayed so that the task initiator can optimize the processing method of the federated learning task.

6. A computation time prediction device for a federated learning task, characterized in that, include: The task acquisition module is used to acquire the data processing tasks included in the federated learning tasks. The information determination module is used to determine the unit input description information corresponding to the data processing task according to the execution order of the data processing task in the federated learning task. The unit input description information refers to information describing the input data of the data processing task, including at least one of the following: number of samples, number of features, data type, parameter configuration, network communication method, encryption algorithm, encryption time, hardware configuration, software configuration, number of nodes, and historical unit operation time. The time prediction module is used to predict the target unit operation time of the data processing task based on the unit input description information corresponding to the data processing task. The time update module is used to obtain the initial unit operation time of the data processing task and update the initial unit operation time using the target unit operation time, wherein the initial unit operation time is determined according to the task input description information corresponding to the federated learning task; The time prediction module includes: The model determination unit is used to obtain the unit computation time model corresponding to the data processing task. A time prediction unit is used to input the unit input description information corresponding to the data processing task into the unit operation time model to obtain the target unit operation time of the data processing task. The model determination unit includes: A node information determination subunit is used to obtain node information from the unit input description information, wherein the node information includes the number of nodes and the interaction attributes between nodes, and the nodes are used to perform the data processing task; The model determines the sub-unit, which is used to determine the unit operation time model corresponding to the data processing task based on the node information.

7. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the computation time prediction method for the federated learning task according to any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the computation time prediction method for the federated learning task according to any one of claims 1-5.

Citation Information

Patent Citations

  • Federal learning method and device, electronic equipment and storage medium

    CN113850394A

  • Federal learning-based prediction method and device

    CN115526337A