Computational task scheduling methods, devices, electronic devices, storage media and products

By determining the latest parameters and dependencies of computing tasks and combining them with the usage of equipment resources, the scheduling of computing tasks is dynamically adjusted. This solves the problem of slow response speed and overheating caused by a single factor in computing task scheduling in the existing technology, optimizes the computing performance of the client, and reduces the cost of the server.

CN116302416BActive Publication Date: 2026-03-13BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-28
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

In existing technologies, the scheduling of computing tasks relies on a single factor, which makes it impossible to adjust dynamically and effectively isolate the mutual influence between operators, resulting in problems such as slow client response speed and overheating, especially under CPU-intensive tasks.

Method used

By determining the latest parameters and dependencies of the operators required for the computing task, and combining this with the usage of device resources, the scheduling of computing tasks is adjusted in real time, client logic and I/O operations are rationally scheduled, the operator library is dynamically updated, and the execution of computing tasks is optimized.

Benefits of technology

It enables the rational scheduling of computing tasks in a multi-process environment, improves the client's response speed, reduces the risk of overheating, and shares the client's computing power to reduce the server's computing costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116302416B_ABST
    Figure CN116302416B_ABST
Patent Text Reader

Abstract

This disclosure provides a computing task scheduling method, apparatus, electronic device, storage medium, and product, relating to the field of computer computing technology, particularly to cloud computing and task scheduling. The specific implementation scheme includes: determining the latest parameters of the operators required by the computing task and determining the dependencies of the computing task; initiating a device resource polling query to determine the usage status of device resources; and scheduling the computing task according to the device resource usage status, the latest parameters, and the dependencies. This disclosure allows for the collection and monitoring of client resource usage, reasonable scheduling of client logic and I / O operations, and a balance between application performance and computation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer computing technology, and in particular to the fields of cloud computing and task scheduling, specifically to a computing task scheduling method, apparatus, electronic device, storage medium, and product. Background Technology

[0002] With the rapid development of the Internet of Things, big data, and large-scale video, the transmission, analysis, and storage of massive amounts of data pose enormous challenges to traditional networks and cloud computing. Due to the surge in business functions and tasks, computing tasks have also increased. Computing tasks are a type of background task, and a multi-process approach is adopted to isolate the mutual interference between operators.

[0003] Furthermore, the further revocation of developer privileges by the client system has led to a lack of guarantee in the response speed of real-time task processing within the client. In particular, with the increasing number of heavy tasks such as CPU-intensive tasks, stuttering and overheating may occur during runtime. Summary of the Invention

[0004] This disclosure provides a computing task scheduling method, apparatus, electronic device, storage medium, and product.

[0005] According to a first aspect of this disclosure, a computational task scheduling method is provided, the method comprising:

[0006] Determine the latest parameters of the operators required for the computation task and determine the dependencies of the computation task; initiate a device resource polling query to determine the usage status of device resources; schedule the computation task according to the usage status of device resources, the latest parameters, and the dependencies.

[0007] According to a second aspect of this disclosure, a computing task scheduling apparatus is provided, the apparatus comprising:

[0008] The determination module is used to determine the latest parameters of the operators required for the computing task and to determine the dependencies of the computing task; the startup module is used to initiate a polling query of device resources to determine the usage status of device resources; and the scheduling module is used to schedule the computing task according to the usage status of device resources, the latest parameters, and the dependencies.

[0009] According to a third aspect of this disclosure, an electronic device is provided, comprising:

[0010] At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of the first aspect or the second aspect.

[0011] According to a fourth aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are configured to cause the computer to perform the method according to the first or second aspect.

[0012] According to a fifth aspect of this disclosure, a computer product is provided, including a computer program that, when executed by a processor, implements the method according to the first or second aspect.

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

[0014] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:

[0015] Figure 1 A flowchart illustrating a computing task scheduling method provided in an embodiment of this disclosure is shown.

[0016] Figure 2 This illustration shows a schematic diagram of an application programming interface (API) for offline web page execution provided in an embodiment of this disclosure;

[0017] Figure 3 A flowchart illustrating an operator dependency determination method provided in an embodiment of this disclosure is shown.

[0018] Figure 4 A schematic diagram of a general operator provided in an embodiment of this disclosure is shown, such as... Figure 4 As shown;

[0019] Figure 5 A schematic diagram illustrating a method for finding the out-degree and in-degree of a vertex according to an embodiment of this disclosure is shown;

[0020] Figure 6 This illustration shows a resource management diagram provided by an embodiment of the present disclosure;

[0021] Figure 7 This illustration shows a schematic diagram of determining the usage of device resources according to an embodiment of the present disclosure;

[0022] Figure 8A schematic diagram of the operator management section provided in an embodiment of this disclosure is shown;

[0023] Figure 9 A schematic diagram of the operator management section provided in an embodiment of this disclosure is shown;

[0024] Figure 10 A schematic diagram of the operator scheduling section provided in an embodiment of this disclosure is shown;

[0025] Figure 11 A schematic diagram of the operator scheduling process provided in an embodiment of this disclosure is shown;

[0026] Figure 12 A schematic diagram of operator scheduling provided in an embodiment of this disclosure is shown;

[0027] Figure 13 A schematic diagram of the scheduling and execution of computing tasks provided in an embodiment of this disclosure is shown;

[0028] Figure 14 This illustration shows a comprehensive technical overview of the embodiments provided in this disclosure;

[0029] Figure 15 This diagram illustrates the overall process of computing task scheduling provided in an embodiment of the present disclosure.

[0030] Figure 16 A schematic diagram of a computing task scheduling device provided in an embodiment of this disclosure is shown.

[0031] Figure 17 A schematic block diagram of an example electronic device that can be used to implement embodiments of the present disclosure is shown. Detailed Implementation

[0032] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0033] With the rapid development of the Internet of Things, big data, and large-scale video, the transmission, analysis, and storage of massive amounts of data pose enormous challenges to traditional networks and cloud computing. Due to the surge in business functions and tasks, computing tasks have also increased. Computing tasks are a type of background task, and a multi-process approach is adopted to isolate the mutual interference between operators.

[0034] Furthermore, the further revocation of developer privileges by the client system has led to a lack of guarantee for the response speed of timely task processing within the client. In particular, with the increasing number of heavy tasks such as CPU-intensive tasks, stuttering and overheating may occur during runtime.

[0035] In related technologies, scheduling computational tasks based on a single factor results in unadjustable algorithms that lack dynamic practicality. This single factor can be factors such as temperature or scene (e.g., CPU-intensive scenes).

[0036] Based on this, this disclosure provides a computing task scheduling method and apparatus. By leveraging the dependencies between operators, periodically updating operator parameters, and considering device resources, computing tasks are adjusted in real time, client logic and I / O operations are rationally scheduled, application performance and computation are balanced, and the execution of computing tasks is optimized. The server can also share the client's computing power, thereby reducing server-side computing costs.

[0037] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure 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 this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0038] Figure 1 A flowchart illustrating a computing task scheduling method provided in an embodiment of this disclosure is shown, as follows: Figure 1 As shown, the method may include:

[0039] In step S110, the latest parameters of the operators required for the computation task are determined, and the dependencies of the computation task are determined.

[0040] In this embodiment of the disclosure, each computation task consists of multiple operators, and the required operators can be determined according to the target computation task. The operators can be stored in an operator pool.

[0041] By using offline tasks, the client's computation tasks are executed periodically to determine the latest parameters of the operators required for the computation tasks. These latest parameters are then sent to the client, allowing the client to adjust the number of operators that each operator process can execute concurrently based on the latest parameters of the operators required for the computation tasks.

[0042] In this disclosure, there are logical relationships between operators, and there are dependencies between operators in these logical relationships. For example, operator B can only be executed after operator A has been completed, which can be understood as operator B depending on operator A.

[0043] In step S120, a device resource polling query is initiated to determine the usage status of device resources.

[0044] In this embodiment of the disclosure, device resources may be resources of the client performing the computing task, and this disclosure does not specifically limit them.

[0045] This disclosure allows for the monitoring and collection of equipment resources. By monitoring the equipment resources, the collection of equipment resource data can be achieved, thereby determining the usage status of equipment resources.

[0046] Device resource usage can be monitored for the available device resources during the current application's (APP) runtime. Resource dimensions include CPU, GPU, and memory. Specific resource metrics include: CPU temperature, GPU availability, GPU temperature, available system memory, and available memory for the current process. Device status includes basic device information such as CPU model, total memory, and system version.

[0047] In step S130, the computing tasks are scheduled based on the usage of equipment resources, the latest parameters, and dependencies.

[0048] In this embodiment of the disclosure, the allocation of computing tasks can be further adjusted according to the available device resources (i.e., the usage of device resources). By adjusting the number of operators that each operator process can execute concurrently according to the latest parameters of the operators required by the computing tasks, the computing tasks can also be scheduled and reordered according to the dependencies between operators, thus realizing task scheduling from multiple dimensions.

[0049] This disclosure allows for the determination of the latest parameters of operators required for computational tasks through offline tasks, enabling clients to adjust the number of operators that each operator process can execute concurrently. This allows for the collection and monitoring of client resource usage, and the rational scheduling of client logic and I / O operations, thus balancing application performance and computation. Furthermore, it allows sharing client computing power with the server, reducing server-side computational costs.

[0050] In this disclosure, the operator library can also be dynamically updated through offline tasks, and the implementation method can be referred to the following embodiments.

[0051] In this embodiment of the disclosure, a time interval can be set; by setting a pre-set time interval, a crawler or application programming interface (API) is periodically executed to obtain at least one client model, update the corresponding client model library, call the cloud real machine platform corresponding to the newly added model, run the task to obtain the updated parameters of the corresponding model operator, and obtain the latest parameters corresponding to the operator required by the client to execute the computing task.

[0052] For example, Figure 2 This illustration shows a schematic diagram of an application programming interface (API) for offline web page execution provided in an embodiment of this disclosure, such as... Figure 2 As shown, taking the execution of webpage XXX as an example, according to the operator of webpage XXX in step S210, step S220 is executed, that is, the application programming interface of the webpage is executed periodically. In step S230, the types of commonly used mobile phones (i.e., the mainstream mobile phone library) can be obtained. In step S240, operator calculation can be further performed based on the calculation task of the commonly used mobile phone types. In step S250, the parameters of the operators in the operator library are updated.

[0053] This disclosure provides data support for adjusting the number of operators that can be executed concurrently by each operator process by periodically updating the operator parameters, thereby enabling reasonable scheduling of client logic and I / O operations.

[0054] Figure 3 The diagram illustrates a flowchart of an operator dependency determination method provided in an embodiment of this disclosure, as shown below. Figure 3 As shown, the method may include:

[0055] In step S310, the operators required for each computation task are obtained, and the operators are normalized and adapted to determine the number of operator processes corresponding to each operator.

[0056] In this embodiment of the disclosure, computational tasks can be normalized and adapted for different sources, and computational tasks from different sources can be adapted into tasks for scheduling. For example, if operator A is included in all three computational tasks, then operator A can be normalized.

[0057] Operator normalization enables efficient operator reuse, improving development efficiency. Furthermore, standardized input via multiple operators allows for free permutation and combination of inputs without requiring additional code.

[0058] Furthermore, without client-side version updates, tasks are directly distributed from the cloud. The cloud only needs to distribute a Directed Acyclic Graph (DAG) description file for the specified task to dynamically construct the task.

[0059] Figure 4 A schematic diagram of a general operator provided in an embodiment of this disclosure is shown, such as... Figure 4 As shown, Figure 4 Some operators are shown. For example, file P(1) is processed by operator P(1) to calculate MD5 and CPU, resulting in the corresponding string. Parameter A is processed by operator P(3) to determine network requests (I / O), and parameter B is processed by operator P(8) for database storage (I / O). Parameters A and B can be the same or different, etc. Figure 4 It also includes edge AI operators. For example, a group of image paths are processed by the P(4) operator to perform similar image recognition and obtain the grouped image paths. The image paths are processed by the P(5) operator to perform face recognition and obtain face information / files, etc. These are not listed one by one here.

[0060] In step S320, the out-degree and in-degree of each vertex in the operator process are determined.

[0061] In this embodiment of the disclosure, the out-degree and in-degree of each vertex in the operator process can be found, such as Figure 5 As shown. Figure 5 This diagram illustrates a method for finding the out-degree and in-degree of a vertex according to an embodiment of this disclosure. In step S510, vertices for each operator are searched. Then, according to step S520, it is determined whether the vertex exists. If the vertex exists, step S530 is executed to check if the number of in-degrees is less than 2. If the number of in-degrees is less than 2, step S540 is executed to perform a computation task based on the vertex's operators. If the number of in-degrees is not less than 2, step S550 is executed to perform an in-degree subscription process, and based on step S560, the process is iteratively checked until it is determined that all in-degrees exist. Then, based on step S540, the computation task begins. That is, assuming there are 3 in-degrees, the computation task begins when the operators for all 3 in-degrees exist.

[0062] Furthermore, after executing the computation task, step S570 is executed to publish the results of the computation task. Then, step S580 is used to check the out-degree of the vertex. If the out-degree is greater than or equal to 1, the vertex search restarts, i.e., step S510 is executed. If the out-degree is 0, step S590 is executed to terminate the process. This determines the out-degree and in-degree of each vertex in the operator process.

[0063] In this disclosure, each computational task starts from the entry point, finds the vertex operator of the graph, executes it, and then passes the result to the vertex connected by the next edge. The in-degree of each vertex operator is synchronized using a publish / subscribe mechanism.

[0064] The computation task is an entity class that describes the computational tasks at the end, encapsulating all information about the computation tasks. A computation task is completed collaboratively by a series of operators.

[0065] In step S330, the dependencies of the operators are determined based on the out-degree and in-degree.

[0066] In this embodiment of the disclosure, the dependency relationship between operators can be determined based on the out-degree and in-degree of each vertex. In one embodiment of the disclosure, in response to the out-degree of the first vertex being greater than 1, the operator process of the first vertex is executed concurrently. In another embodiment of the disclosure, in response to the in-degree of the first vertex being greater than 1, the operator processes of all second vertices that the first vertex depends on are executed synchronously, and then the operator process of the first vertex is executed.

[0067] In this disclosure, operators at each vertex are obtained from an operator pool. If the pool is insufficient, it must wait for other computation tasks to release operators. When a computation task is sent from the cloud, it is provided with the exact same data structure as the computation task. If the client receives an operator that is not available, it ignores the entire computation task. The maximum value of operator p(n) in the computation task is the minimum concurrency of the operator process.

[0068] This disclosure also includes a resource management section. Figure 6 A schematic diagram of resource management provided in an embodiment of this disclosure is shown, wherein the resource management section is mainly responsible for aggregating current system resources. The resource management module mainly includes a resource monitor, which monitors resource usage. The implementation method is as follows. Figure 6 As shown, the resource management section includes a resource pool 601, Android system 602, iOS system 603, platform adaptation 604, and memory 605, CPU 606, and GPU 607. Specifically, the platform adaptation section writes the resource usage of systems such as Android 602 and iOS 603, as well as the usage of memory 605, CPU 606, and GPU 607, into the resource pool, and monitors resource usage in real time through a resource monitor.

[0069] In this embodiment of the disclosure, the implementation method of starting the resource monitor to monitor the resource usage in real time can be referred to the following embodiment.

[0070] Figure 7 This illustration shows a diagram illustrating the determination of device resource usage according to an embodiment of this disclosure, such as... Figure 7 As shown, in step S710, in response to detecting the launch of the application, steps S720 and S760 are executed, namely, starting the device resource polling query and resource monitor; wherein, the resource monitor is used to monitor the usage of available device resources in real time.

[0071] According to step S730, system resources are queried, and based on the results of the device resource polling query, the currently available device resources are determined in step S740, and based on step S750, the available device resources are written into the resource pool.

[0072] In this embodiment of the disclosure, the polling can be performed once per second, and the calculation can be described by the following formula.

[0073] T 用户平均使用时长 =T 算子执行 +T 算子等待

[0074] T 用户平均使用时长 =t1(C 起始 C 挂起 )+(t2(C 挂起 C 恢复 )+t1(C 恢复 C 挂起 ))×n1

[0075] T 用户平均使用时长 =f(g(p,n) 并发 ), n3)+t2(C 挂起 C 恢复 )+f(g(p,n 并发 ), n4)×n1

[0076] Among them, C 挂起 Indicates fever; n 并发 ×n3+n 并发 ×n4×n1 represents efficiency;

[0077] p(n 并发 ) represents energy (a rational number); g() represents the energy p-temperature C function; f() represents the temperature C-time t function; t() represents time.

[0078] In this embodiment of the disclosure, the temperature rise of the mobile phone each time the user uses it is used to measure the consumption of one operator. The number of concurrent operations when each operator rises to the same temperature represents the computing power of the operator.

[0079] As can be seen from the above embodiments, the operators of this application can be obtained from the operator pool, and the acquisition of operators can be performed through the operator management section.

[0080] Figure 8 A schematic diagram of the operator management section provided in an embodiment of this disclosure is shown. The operator management section (module) is responsible for summarizing and managing the local computing power in the current client and obtaining operators and models from the cloud. Figure 8 As shown, the operator management module includes an operator pool 801, a loader 802, operator A 803, operator B 804, and a downloader 805.

[0081] For example, initialization is triggered during system initialization or application startup, and the system registers all available operators. Each type of operator runs in an independent process. Based on the required operators, the operators to be downloaded are determined in the operator pool 801. The operators and / or models are downloaded via the downloader 805, resulting in download numbers for operators A803 and B804, which are then added to the operator pool 801 via the loader 802.

[0082] In this embodiment of the disclosure, the logic execution implementation method of operator management is as follows: Figure 9 As shown, Figure 9 This diagram illustrates a flowchart of the operator management section provided in an embodiment of this disclosure. The system calls the required operators based on the computational task, and determines whether it needs to acquire operators, download models, or mount operators, so that the system can register operators. Further, according to step S910, the system registers all available operators, and simultaneously, in step S920, it calls other required operators not in the operator pool. In step S930, based on the operator retrieval process, it is determined whether it needs to acquire operators. If it needs to acquire operators, step S940 is executed to download operators, and step S960 is executed to register operators. If it does not need to acquire operators, step S950 is executed to further determine whether it needs to download models. If it needs to download models, step S970 is executed to download models. After the model is downloaded, step S980 is executed to mount operators. If it does not need to download models, step S980 is executed directly to mount operators.

[0083] In this embodiment, the operator scheduling section is the core module of the overall framework, responsible for summarizing resource information, dynamically adjusting task priorities, and scheduling computational tasks. It comprises two parts: a process scheduler and a thread scheduler. The process scheduler selects operators according to type and determines the concurrency of each operator. Inter-process communication uses the Android Interface Definition Language (AIDL). The thread scheduler controls operator concurrency within each operator.

[0084] For example, Figure 10 A schematic diagram of the operator scheduling part provided in an embodiment of this disclosure is shown, such as... Figure 10As shown, the scheduler 1002 interacts with the task scheduler 1001, and the task scheduler 1002 determines the order of computation tasks in the task schedule. The task scheduler 1002, based on the resources and operators required by the computation tasks, consults with the resource monitor 1003 and the operator manager 1004 to determine the executable computation tasks and adds them to the task queue 1005. The executor 1006 executes the computation tasks in the task queue 1005 sequentially and sends the execution results to the result pool 1007.

[0085] In this disclosure, computation tasks are added to the task schedule table in the order they were added. Figure 11 A schematic diagram of the operator scheduling process provided in an embodiment of this disclosure is shown, such as... Figure 11 As shown, in step S1110, operators are obtained according to the computation task, and the number of concurrent executions of each operator process is determined based on the latest parameters of each operator. In step S1120, a task schedule table is obtained, and the task schedule table is monitored according to step S1130 to determine the dependencies between computation tasks in the task schedule table. Step S1140 is executed to start the scheduler and schedule the computation tasks in the task schedule table. At the same time, in step S1190, the system starts the resource monitor to monitor the resources. The resource usage is determined according to step S11100. In step S1150, based on the device resource usage, the computation tasks in the scheduled task schedule table are allocated and executed in sequence. In step S1160, it can be determined whether the conditions required for each computation task are met. If the conditions are met, step S1180 is executed, that is, the computation task is executed. If the conditions are not met, step S1170 is executed to wait, and after the conditions are determined to be met, step S1180 is executed.

[0086] In one embodiment of this disclosure, after a task is completed, the process scheduler adds tasks based on the operator p(n). Each operator occupies 1 / n of the resources, and the total resources are 1. Tasks are sequentially removed from the queue until the remaining resources cannot be allocated further.

[0087] In another embodiment of this disclosure, the priority of each operator is determined based on dependencies; and computational tasks in the task schedule are scheduled according to the priorities.

[0088] In another embodiment of this disclosure, during the execution of a computation task, the power consumption for computing the same operator is determined; in response to the power consumption being greater than the historical average power consumption, the operator process executing concurrent operators is adjusted to execute a single operator process.

[0089] For example, combined with local statistical monitoring, if the battery level drops by 1% during a user's usage, the power consumption for that usage session is calculated. If it exceeds the historical average power consumption by 10%, then all operators in all processes become single-task scheduling within that process. If all operators are singletons, then all operators in all processes become unified single-task scheduling.

[0090] Figure 12 A schematic diagram of operator scheduling provided in an embodiment of this disclosure is shown, such as... Figure 12 As shown, the operator p(5) in the operator stack includes two processes. The process executing p(5) has ID = 1 and can execute two p(5) operators concurrently. The process executing p(4) has ID = 3 and can execute one p(4) operator concurrently. If the power consumption is high, the process executing multiple operators concurrently can be adjusted to execute only one operator.

[0091] In this embodiment, the power consumption formula is: e = (b_start - b_end) x 100 / n. Where e is the power consumption, b_start is the starting power consumption of the execution operator process, b_end is the ending power consumption of the execution operator process, and n is the number of operators.

[0092] It should be noted in this disclosure that power consumption is not calculated if the client is charging.

[0093] Figure 13 A schematic diagram of the scheduling and execution of computing tasks provided in an embodiment of this disclosure is shown, such as... Figure 13 As shown, first, step S1301 is executed to check if the registered operator exists. If the operator exists, step S1302 is executed to obtain the IDs of all operators. Step S1303 is executed to determine if the obtained CPU temperature exists. Step S1304 is executed to query if there is a computation task with the operator ID. If so, step S1306 is executed to initialize an empty computation task queue. If the operator does not exist, or there is no computation task with the operator ID, step S1305 is executed to suspend resource monitoring.

[0094] Further, after initializing an empty operator task queue, step S1307 is executed to check if the available resources are greater than 0. If not, step S1309 is executed to return to the computation task queue. If greater than 0, step S1310 is executed to retrieve the first computation task from the queried computation task queue. If the computation task is not empty, step S1311 is executed to check if the computation task is a singleton. In one embodiment, if it is a singleton, step S1312 is executed to check if the computation task is running. If it is running, step S1309 is executed to return to the computation task queue. If it is not running, step S1313 is executed to check if the computation task queue contains operators of the same type. If it contains operators of the same type, step S1309 is executed to return to the computation task queue. If it does not contain operators of the same type, step S1311 is executed to re-check if the computation task is a singleton. In another embodiment, if the computation task is a singleton, step S1315 is executed to determine the number of resource operator processes. If it is not a singleton, then determine the available resources - work - available resources, and proceed to step 1316 to check if the available resources are greater than 0. If the available resources are greater than 0, proceed to step 1317 to add the computation task to the computation task queue; if they are not greater than 0, then re-check the available resources.

[0095] The embodiments disclosed herein are described in terms of system modules, including:

[0096] Figure 14 This illustration shows a comprehensive technical overview of the embodiments provided in this disclosure, such as... Figure 14 As shown in the figure, the present disclosure is divided into three layers from top to bottom: access layer, computing layer and resource layer, with offline tasks in the cloud.

[0097] The access layer, serving as the external interface of the overall framework, is primarily responsible for resource querying and computation task distribution adaptation for upper-layer businesses. It comprises two modules: task adaptation module 1401 and resource query module 1402. The resource layer, acting as the system-level adaptation layer for the computation framework, is responsible for resource collection, monitoring, normalization, and operator management. It includes two modules: resource management module 1403 and operator management module 1404. The computation layer, the core logic of the computation framework, is responsible for scheduling and managing computation tasks. It includes a process scheduler 1405 and a thread scheduler 1406, and may also include a schedule table, executor, and scheduling queue. Offline tasks are used to dynamically update the operator library, including mainstream crawler models 1407, scheduling cloud real machines 1408, and operator computation 1490.

[0098] Figure 15 This illustration shows a schematic diagram of the overall process of computing task scheduling provided in an embodiment of the present disclosure, such as... Figure 15As shown, in step S1501, if a computing task is detected, step S1502 is executed to begin the access layer adaptation process. In step S1503, the computing task (job) is determined, and based on step S1504, a task schedule is obtained. Step S1505 is then executed to determine if operator downloading is required. If operator downloading is required, step S1506 is executed to perform the operator download process, and based on step S1511, the operator registration process is performed. Based on step S1512, the device's computing power is obtained. Step S1507 is executed to schedule and start the process, step S1508 is executed to perform the computation, and step S1509 reports the computation results. If operator downloading is not required, step S1507 is executed directly to schedule and start the process, step S1508 is executed to perform the computation, and step S1509 reports the computation results.

[0099] In this process, upon application startup, step S1511 can be directly executed to register the operator, and step S1512 determines the device's computing power. Simultaneously, step S1513 is executed to collect resources, and step S1514 identifies available resources. Then, step S1507 schedules the startup, step S1508 performs the computation, and step S1509 reports the computation results.

[0100] This disclosure identifies the available resources of the device, thereby initiating the scheduling of computing tasks, starting computation, obtaining computation results, and providing feedback. This allows for the rational scheduling of client logic and I / O operations, balancing application performance and computation, sharing client computing power with the server, and reducing server computing costs.

[0101] Based on and Figure 1 The method shown follows the same principle. Figure 16 A schematic diagram of a computing task scheduling device provided in an embodiment of this disclosure is shown, such as... Figure 16 As shown, the computing task scheduling device 1600 may include:

[0102] The determination module 1601 is used to determine the latest parameters of the operators required for the computing task and to determine the dependencies of the computing task; the startup module 1602 is used to start a polling query of device resources to determine the usage status of device resources; the scheduling module 1603 is used to schedule the computing task according to the usage status of device resources, the latest parameters and the dependencies.

[0103] In this embodiment of the disclosure, the determining module 1601 is configured to: set a time interval; obtain at least one client model; according to the time interval, execute a calculation task according to the client model, and determine the update parameters corresponding to the operators required for different client models to execute the calculation task; and determine the update parameters as the latest parameters corresponding to the operators required for the client to execute the calculation task.

[0104] In this embodiment of the disclosure, the determining module 1601 is configured to: obtain the operators required for each computing task, and perform normalization adaptation on the operators to determine the number of operator processes corresponding to each operator; determine the out-degree and in-degree of each vertex of the operator process; and determine the dependency relationship of the operator based on the out-degree and in-degree.

[0105] In this embodiment of the disclosure, the scheduling module 1603 is configured to concurrently execute the operator process of the first vertex in response to the out-degree of the first vertex being greater than 1; and synchronously execute the operator processes of all second vertices on which the first vertex depends in response to the in-degree of the first vertex being greater than 1, and then execute the operator process of the first vertex.

[0106] In this embodiment of the disclosure, the startup module 1602 is used to start a device resource polling query and a resource monitor in response to detecting the startup of an application; determine the currently available device resources based on the results of the device resource polling query, and write the available device resources into a resource pool; and use the resource monitor to monitor the usage of the available device resources in real time.

[0107] In this embodiment of the disclosure, the scheduling module 1603 is used to obtain operators, determine the number of operators that each operator process can concurrently execute based on the latest parameters, schedule the computational tasks in the task schedule table based on the dependency relationship, and allocate and execute the computational tasks in the task schedule table after scheduling in order based on the usage of the device resources.

[0108] In this embodiment of the disclosure, the scheduling module 1603 is used to determine the priority of each operator based on the dependency relationship; and to schedule the computation tasks in the task schedule table according to the priority.

[0109] In this embodiment of the disclosure, the scheduling module 1603 is further configured to determine the power consumption of calculating the same operator during the execution of the computing task; and in response to the power consumption being greater than the historical average power consumption, to adjust the operator process that executes the operator concurrently to the operator process that executes a single operator.

[0110] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0111] In an exemplary embodiment, an electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method described in the above embodiments. The electronic device may be the computer or server described above.

[0112] In an exemplary embodiment, the readable storage medium may be a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method described in the above embodiments.

[0113] In an exemplary embodiment, the computer program product includes a computer program that, when executed by a processor, implements the method described in the above embodiments.

[0114] The acquisition, storage, and application of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0115] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0116] Figure 17 A schematic block diagram of an example electronic device 1700 that can be used to implement embodiments of the present disclosure 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 may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, 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 present disclosure described and / or claimed herein.

[0117] like Figure 17 As shown, device 1700 includes a computing unit 1701, which can perform various appropriate actions and processes according to a computer program stored in read-only memory (ROM) 1702 or a computer program loaded into random access memory (RAM) 1703 from storage unit 1708. The RAM 1703 may also store various programs and data required for the operation of device 1700. The computing unit 1701, ROM 1702, and RAM 1703 are interconnected via bus 1704. Input / output (I / O) interface 1705 is also connected to bus 1704.

[0118] Multiple components in device 1700 are connected to I / O interface 1705, including: input unit 1706, such as a keyboard, mouse, etc.; output unit 1707, such as various types of displays, speakers, etc.; storage unit 1708, such as a disk, optical disk, etc.; and communication unit 1709, such as a network card, modem, wireless transceiver, etc. Communication unit 1709 allows device 1700 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0119] The computing unit 1701 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 1701 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 computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1701 performs the various methods and processes described above, such as computing task scheduling methods. For example, in some embodiments, the computing task scheduling method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 1708. In some embodiments, part or all of the computer program may be loaded and / or installed on device 1700 via ROM 1702 and / or communication unit 1709. When the computer program is loaded into RAM 1703 and executed by the computing unit 1701, one or more steps of the computing task scheduling method described above may be performed. Alternatively, in other embodiments, computing unit 1701 may be configured to perform computing task scheduling methods by any other suitable means (e.g., by means of firmware).

[0120] 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.

[0121] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0122] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. 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 fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0123] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. 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).

[0124] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments 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., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0125] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.

[0126] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0127] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. 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 disclosure should be included within the scope of protection of this disclosure.

Claims

1. A method for scheduling computational tasks, the method comprising: Set the time interval; Obtain the client model number for at least one model; Based on the time interval, and according to the client model, the computing tasks are executed separately to determine the update parameters corresponding to the operators required for different client models to execute the computing tasks; the update parameters are determined as the latest parameters corresponding to the operators required for the client to execute the computing tasks, and the dependencies of the computing tasks are determined. Initiate a polling query of equipment resources to determine their usage status; Obtain the operator, and based on the latest parameters, determine the number of times each operator process can concurrently execute the corresponding operator; Based on the aforementioned dependencies, the computational tasks in the task schedule are scheduled. Based on the usage of the equipment resources, the computational tasks in the task schedule table after the execution are allocated and executed in sequence.

2. The method according to claim 1, wherein, Determining the dependencies of the computational task includes: Obtain the operators required for each computation task, and normalize and adapt the operators to determine the number of operator processes corresponding to each operator; Determine the out-degree and in-degree of each vertex in the operator process; The dependencies of the operator are determined based on the out-degree and in-degree.

3. The method according to claim 2, wherein, The method further includes: In response to the out-degree of the first vertex being greater than 1, the operator process of the first vertex is executed concurrently; In response to the in-degree of the first vertex being greater than 1, the operator processes of all second vertices on which the first vertex depends are executed synchronously, and then the operator process of the first vertex is executed.

4. The method according to claim 1, wherein, The process of initiating a polling query of device resources to determine the usage status of device resources includes: In response to the detection of application startup, initiate device resource polling and resource monitoring; Based on the results of the equipment resource polling query, the currently available equipment resources are determined and written into the resource pool; The resource monitor is used to monitor the usage of available device resources in real time.

5. The method according to claim 1, wherein, The scheduling of computational tasks in the task schedule table based on the aforementioned dependencies includes: The priority of each operator is determined based on the aforementioned dependencies; The computational tasks in the task schedule are scheduled according to the priority.

6. The method according to claim 1, wherein, After sequentially allocating and executing the computational tasks in the task schedule table following the scheduling, the method further includes: During the execution of a computational task, determine the power consumption for computing the same operator; In response to the power consumption being greater than the historical average power consumption, the operator process executing concurrent operators is adjusted to execute a single operator process.

7. A computing task scheduling device, the device comprising: The module is used to set the time interval; Obtain the client model number for at least one model; Based on the time interval, and according to the client model, the computing tasks are executed separately to determine the update parameters corresponding to the operators required for different client models to execute the computing tasks; the update parameters are determined as the latest parameters corresponding to the operators required for the client to execute the computing tasks, and the dependencies of the computing tasks are determined. The startup module is used to initiate a polling query of device resources to determine the usage status of device resources; The scheduling module is used to obtain operators and, based on the latest parameters, determine the number of times each operator process can concurrently execute the corresponding operator. Based on the aforementioned dependencies, the computational tasks in the task schedule are scheduled. Based on the usage of the equipment resources, the computational tasks in the task schedule table after the execution are allocated and executed in sequence.

8. The apparatus according to claim 7, wherein, The determining module is used for: Obtain the operators required for each computation task, and normalize and adapt the operators to determine the number of operator processes corresponding to each operator; Determine the out-degree and in-degree of each vertex in the operator process; The dependencies of the operator are determined based on the out-degree and in-degree.

9. The apparatus according to claim 8, wherein, The scheduling module is used for: In response to the out-degree of the first vertex being greater than 1, the operator process of the first vertex is executed concurrently; In response to the in-degree of the first vertex being greater than 1, the operator processes of all second vertices on which the first vertex depends are executed synchronously, and then the operator process of the first vertex is executed.

10. The apparatus according to claim 7, wherein, The startup module is used for: In response to the detection of application startup, initiate device resource polling and resource monitoring; Based on the results of the equipment resource polling query, the currently available equipment resources are determined and written into the resource pool; The resource monitor is used to monitor the usage of available device resources in real time.

11. The apparatus according to claim 7, wherein, The scheduling module is used for: The priority of each operator is determined based on the aforementioned dependencies; The computational tasks in the task schedule are scheduled according to the priority.

12. The apparatus according to claim 7, wherein, The scheduling module is also used for: During the execution of a computational task, determine the power consumption for computing the same operator; In response to the power consumption being greater than the historical average power consumption, the operator process executing concurrent operators is adjusted to execute a single operator process.

13. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.

14. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-6.

15. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Task scheduling method, device and equipment and computer storage medium

    CN112948079A

  • Scheduling parameter adjusting method and device, and storage medium

    CN114064242A