Scheduling optimization processing method and device, edge computing system and storage medium
By merging metadata of the same task in the edge computing system, the problems of resource waste and load increase are solved, and efficient resource utilization and load reduction are achieved.
Patent Information
- Application Number
- CN202510486960.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-17
- Publication Date
- 2025-08-08
AI Technical Summary
The prior art has problems of resource waste and load increase in edge computing systems, and the expansion cost and effect are difficult to balance, resulting in idle resources when the task is small, and load increases when the task is large.
By obtaining task metadata in the edge computing task pool, determine whether the scheduling optimization strategy is triggered, and merge the same tasks to execute once to obtain the execution results of all the same tasks, avoiding repeated calculations and resource consumption.
The scheduling optimization of edge computing systems is realized to avoid resource waste, reduce system load, and improve resource utilization efficiency.
Smart Images

Figure CN120448059A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of edge computing technology, and in particular to a scheduling optimization processing method, device, edge computing system and storage medium. Background Art
[0002] With the development of mobile internet and the Internet of Things (IoT), the amount of terminal devices and data has increased dramatically. Traditional cloud computing is unable to meet computing needs. Edge computing has emerged, extending computing from cloud servers to edge computing systems. Compared to cloud servers, edge computing systems have relatively scarce resources. Therefore, scheduling optimization is needed to rationally allocate resources in edge computing systems.
[0003] Currently, related technologies use capacity expansion to rationally allocate edge computing system resources. However, this approach requires a balance between expansion costs and effectiveness. Larger expansions can lead to idle resources when the workload is low, resulting in wasted resources. Smaller expansions can lead to queues of tasks waiting to be executed when the workload is high, increasing the load on the edge computing system. Summary of the Invention
[0004] The present application provides a scheduling optimization processing method, device, edge computing system and storage medium to at least solve the problems of resource waste and increased load on the edge computing system in related technologies.
[0005] This application provides a scheduling optimization processing method, including:
[0006] Get multiple tasks in the edge computing task pool; where multiple tasks are sent to the edge computing task pool by different user terminals, and each task carries a user identifier and metadata;
[0007] Determine whether to trigger the scheduling optimization strategy based on the metadata of each task;
[0008] If it is determined that the scheduling optimization strategy is triggered, multiple tasks to be merged are obtained from multiple tasks;
[0009] Merge multiple identical tasks among multiple tasks to be merged according to the metadata to obtain at least one merged task;
[0010] Execute each merge task and obtain the execution result of each merge task;
[0011] Update the metadata of multiple identical tasks and distribute the execution results of each merged task to the user end of the user ID corresponding to each identical task based on the latest metadata of each identical task
[0012] The present application also provides a scheduling optimization processing device, comprising:
[0013] The first acquisition module is used to obtain multiple tasks in the edge computing task pool; wherein the multiple tasks are sent to the edge computing task pool by different user terminals, and each task carries a user identifier and metadata;
[0014] The judgment module is used to determine whether to trigger the scheduling optimization strategy based on the metadata of each task;
[0015] A second acquisition module is used to acquire multiple tasks to be merged from multiple tasks if it is determined that the scheduling optimization strategy is triggered;
[0016] A merging module, configured to merge multiple identical tasks among multiple tasks to be merged according to metadata to obtain at least one merged task;
[0017] An execution module, used to execute each merging task and obtain the execution result of each merging task;
[0018] The distribution module is used to update metadata of multiple identical tasks and distribute the execution results of each merged task to the user terminals of the user identifiers corresponding to the identical tasks according to the latest metadata of each identical task.
[0019] The present application also provides an edge computing system, including: a memory for storing computer programs; and a processor for implementing the steps of any of the above-mentioned scheduling optimization processing methods when executing the computer programs.
[0020] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned scheduling optimization processing methods are implemented.
[0021] The present application also provides a computer program product, including a computer program, which implements the steps of any of the above-mentioned scheduling optimization processing methods when executed by a processor.
[0022] Through this application, based on the metadata of each task in the edge computing task pool, it is determined whether the conditions for triggering the scheduling optimization strategy are met, and whether the scheduling optimization strategy is triggered. If the scheduling optimization strategy is triggered, tasks that are allowed to be merged and executed are obtained from multiple tasks, that is, multiple tasks to be merged. The same tasks in multiple tasks to be merged are merged to obtain at least one merged task. It is only necessary to execute the merge task once to obtain the execution results of all the same tasks corresponding to the merged task, thereby realizing the scheduling optimization of the edge computing system, avoiding repeated calculations and resource occupation of the same tasks, avoiding resource waste, and reducing the load on the edge computing system. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0024] Figure 1 A schematic diagram of the system structure of the edge computing system provided in an embodiment of the present application;
[0025] Figure 2 A flowchart of a scheduling optimization processing method provided in an embodiment of the present application;
[0026] Figure 3 A schematic diagram of task merging and execution provided in an embodiment of the present application;
[0027] Figure 4 A schematic diagram of the structure of a scheduling optimization processing device provided in an embodiment of the present application;
[0028] Figure 5 A schematic diagram of the structure of the edge computing system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0029] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0030] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.
[0031] In order to solve the problems of resource waste and increased load on edge computing systems in related technologies, the embodiments of the present application propose the following technical concepts: Considering that the same task will be executed multiple times by multiple users within a very short time interval, although they are submitted by different users, the tasks are essentially the same. The inventors thought of merging the same tasks submitted by different users to avoid repeated calculations and resource occupation of the same tasks, and reduce the load on the edge computing system. Specifically, multiple tasks in the edge computing task pool are obtained, and whether the scheduling optimization strategy is triggered is determined based on the metadata of each task. If the scheduling optimization strategy is triggered, tasks that can be allowed to be merged and executed are obtained from multiple tasks, that is, multiple tasks to be merged. The same task is obtained from multiple tasks to be merged, and the same tasks are merged to obtain a merged task. It is only necessary to execute the merged task once to obtain the execution result of the same task, thereby realizing scheduling optimization of the edge computing system, avoiding repeated calculations and resource occupation of the same task, avoiding resource waste, and reducing the load on the edge computing system.
[0032] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0033] In conjunction with the specific application environment architecture or specific hardware architecture on which the execution of the scheduling optimization processing method depends, the specific application environment architecture or specific hardware architecture is described here.
[0034] refer to Figure 1 , Figure 1 This is a schematic diagram of the system structure of the edge computing system provided in the embodiment of the present application. Figure 1 As shown, the edge computing system includes: a receiving device 101, a processor 102 and a display device 103.
[0035] It is understood that the structure illustrated in the embodiments of this application does not constitute a specific limitation on the scheduling optimization processing method. In other feasible implementations of this application, the above architecture may include more or fewer components than shown in the figure, or combine or split certain components, or arrange the components differently. The specific configuration can be determined according to the actual application scenario and is not limited here. Figure 1 The components shown can be implemented in hardware, software, or a combination of software and hardware.
[0036] In the specific implementation process, the receiving device 101 can be an input / output interface or a communication interface, and can obtain multiple tasks in the edge computing task pool.
[0037] The processor 102 can obtain the execution results of each task.
[0038] The display device 103 can be used to display the execution results of the above tasks.
[0039] The display device may also be a touch screen display, which is used to receive user instructions while displaying the above-mentioned content to achieve operational interaction with the user.
[0040] It should be understood that the above-mentioned processor can be implemented by the processor reading instructions in the memory and executing the instructions, or it can be implemented by a circuit.
[0041] In addition, the network architecture and business scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Ordinary technicians in this field can know that with the evolution of network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0042] Figure 2 A flow chart of the scheduling optimization processing method provided in the embodiment of the present application is shown as follows: Figure 2 As shown, the embodiment of the present application provides a scheduling optimization processing method, which is described in detail as follows:
[0043] S201: Acquire multiple tasks in the edge computing task pool; wherein the multiple tasks are sent to the edge computing task pool by different user terminals, and each task carries a user identifier and metadata.
[0044] For example, let's take Job type tasks as an example. Jobs represent one-time tasks. After being scheduled to run and completing the corresponding computing goals, they will immediately exit and release the various system resources occupied so that these resources can be used by other tasks.
[0045] S202: Determine whether to trigger a scheduling optimization strategy based on the metadata of each task.
[0046] In this embodiment, when a user submits a task to the edge computing system, it also submits metadata. The edge computing system processes the task based on the metadata.
[0047] In this embodiment, the metadata includes information required to execute each task. Specific information is shown in Table 1, which shows the fields of the Job data model.
[0048] "id" is the task identifier, a globally unique identifier for a job. Jobs are distinguished throughout the system by their unique IDs. "jobName" is the job's name, a descriptive identifier for the job. "Offline" is the offline flag, used to indicate whether the task can be processed offline. In scenarios with high concurrency and multiple users, allowing offline processing provides a prerequisite for scheduling optimization. Once a task is determined to allow offline processing, the system triggers a scheduling optimization strategy.
[0049] Among them, images are container image parameters that identify the container image parameters required for task execution. Specifically, they contain the address of the private image repository and the image version number. args are startup parameters that identify the startup parameters used to start the container image. These parameters are set by the user when building the container and control how the task runs within the container image environment. For example, you can set the input data path and processing algorithm parameters. volumeMount is a key-value pair, set by the user, that specifies the storage volume to be mounted within the container image. The key is the volume name, and the value is the path to mount it within the container. Storage volume types can include network file systems, distributed storage systems, and host hard disk directories. Mounting storage volumes is primarily used to implement persistent storage of container runtime data and to read raw data from edge node hosts, ensuring appropriate storage and data retrieval methods during task execution. nodeSelectionFactor is an execution environment parameter, set by the user, that specifies the execution environment parameters required by the node executing the task.
[0050] Among them, finish is modified by the edge computing system. When this field is true, it indicates that the Job task has been completed. At this time, the edge computing system will set the execution result of the task to the result field so that the user end or other system components can obtain the execution result of the task; result is used to store the execution result of the Job. When the task execution is completed and the finish field is true, the result field will be filled with the corresponding execution result; cache is set by the user to indicate whether the execution result of this task is allowed to be reused. If set to true, it means that the execution result of the task is allowed to be reused by other identical or related tasks. At the same time, the cacheTime field can also be used to set the reuse time, that is, how long this result is valid and allowed to be reused.
[0051] Optimized is the merge flag, set by the edge computing system. During task execution, the system merges tasks that can be processed offline. If a task is merged, the system sets the optimized field to true. OptimizeTargetJob is the merged task flag, indicating that when a task is optimized and merged, this field records the task into which it is merged. OptimizeSourceJobs is the merged task flag, indicating that during actual task execution, this field records all merged tasks. After task execution is completed, the system updates the status of these merged tasks based on this field.
[0052] Table 1 Fields of the Job data model
[0053]
[0054] In this embodiment, the metadata includes an offline identifier.
[0055] Specifically, according to the offline identifier, it is determined whether there is a task that allows offline processing among the multiple tasks; if it is determined whether there is a task that allows offline processing among the multiple tasks, the scheduling optimization strategy is triggered.
[0056] In this embodiment, offline task processing is a prerequisite for scheduling optimization in multi-user, high-concurrency scenarios. The offline flags of multiple tasks are obtained. If there is a task with an offline flag of true, it means that the task can be processed offline, and the scheduling optimization strategy is triggered.
[0057] S203: If it is determined that the scheduling optimization strategy is triggered, multiple tasks to be merged are obtained from the multiple tasks.
[0058] Specifically, tasks that are allowed to be processed offline among the multiple tasks are determined as tasks to be merged; and multiple tasks to be merged are obtained from the multiple tasks.
[0059] In this embodiment, tasks with an offline flag of true among the multiple tasks are determined to be tasks to be merged. Therefore, all tasks determined to be tasks to be merged among the multiple tasks are acquired to obtain multiple tasks to be merged.
[0060] For example, the multiple tasks are T1, T2, T3, T4, T5, T6 and T7, where the offline flag of T1, T2, T3, T4 and T5 is true, which means that T1, T2, T3, T4 and T5 allow offline processing, and T1, T2, T3, T4 and T5 are determined to be multiple tasks to be merged.
[0061] S204: Merge multiple identical tasks among the multiple tasks to be merged according to the metadata to obtain at least one merged task.
[0062] Specifically, according to the metadata, triple data of each task to be merged is obtained; according to the triple data, multiple identical tasks are obtained from multiple tasks to be merged; and multiple identical tasks in the multiple tasks to be merged are merged to obtain at least one group of merged tasks.
[0063] In this embodiment, each task corresponds to a triplet, that is, each task to be merged corresponds to a triplet.
[0064] In this embodiment, the triplet data includes container image parameters, startup parameters, and execution environment parameters.
[0065] Specifically, among the multiple tasks to be merged, tasks to be merged that have the same container image parameters, startup parameters, and execution environment parameters are determined to be the same tasks; and multiple identical tasks are obtained from the multiple tasks to be merged.
[0066] In this embodiment, task scheduling is based on container images. A schedulable task consists of container image parameters and startup parameters. Container image parameters are a packaged runtime environment that includes the software and configuration required to run the task. Startup parameters configure the specific execution mode of the task when the container image is started, such as specifying the input data path and processing algorithm parameters. These two parameters together form a complete task that can be scheduled for execution.
[0067] In this embodiment, whether tasks are identical is primarily determined based on the container image parameters and startup parameters used. If two tasks use the same container image parameters and have identical startup parameters, they are considered identical. For example, if two data processing tasks both use a container image containing the same data processing algorithm and related dependencies, and have the same parameters set at startup, such as the input data path and processing rules, then the two tasks meet the same criteria. However, in actual edge computing system scenarios, in addition to container image and startup parameters, regional factors must also be considered. Even if the same task is run in different regions, the execution results may be inconsistent due to differences in local environments, data sources, and other factors. To control and manage this situation, the nodeSelectionFactor (Table 1) is introduced. This execution environment parameter represents the execution environment conditions of the task. By setting this parameter, identical tasks are ensured to run in a common environment, reducing the problem of inconsistent results due to regional differences. Therefore, tasks to be merged that have the same container image parameters, startup parameters, and execution environment parameters are considered identical.
[0068] For example, if the triple data of the task to be merged T1 is {A1, C2, S1} and the triple data of the task to be merged T3 is {A1, C2, S1}, and the triple data of the tasks to be merged T1 and T3 are completely consistent, then the tasks to be merged T1 and T3 are determined to be the same task. The tasks to be merged T1 and T3 are merged to obtain a merged task.
[0069] For example, refer to Figure 3 , Figure 3 This is a schematic diagram of task merging execution provided in the embodiment of the present application. Figure 3 As shown, T1 and T2 are tasks sent from the user terminal with user ID U1 to the edge computing task pool, T3, T4 and T5 are tasks sent from the user terminal with user ID U2 to the edge computing task pool, and T1, T2, T3, T4 and T5 are multiple tasks to be merged. T1 and T3 are the same tasks, T4 and T5 are the same tasks, and T1 and T3 are merged to obtain the merged task T r1 , T4 and T5 are merged to obtain the merged task T r3 There is no task identical to T2, so T2 is not merged and treated as a separate task T. r2 .
[0070] Alternatively, in an edge computing system where multiple users submit tasks concurrently, different tasks may have varying degrees of importance and urgency. Task priority is a metric used to measure this importance and urgency. For example, if there are multiple data processing tasks that use the same container image, startup parameters, and consistent execution environment screening criteria, these tasks will be merged. However, if some of these data processing tasks are business-critical and have been assigned higher priorities, while others have lower priorities, merging high-priority and low-priority tasks may delay the execution of the high-priority tasks, impacting critical parts of the overall business. Therefore, it is advisable to prioritize merging tasks with the same priority. This allows high-priority tasks to be processed more quickly and resources to be allocated to them, ensuring efficient business operations. It also optimizes system resource allocation to a certain extent, preventing low-priority tasks from occupying excessive resources and impacting the execution of high-priority tasks.
[0071] S205: Execute each merge task and obtain the execution result of each merge task.
[0072] S206: updating metadata of multiple identical tasks, and distributing the execution results of each merged task to the user terminals of the user identifiers corresponding to the identical tasks according to the latest metadata of each identical task.
[0073] In this embodiment, the metadata also includes a task identifier, a merge identifier, a merged task identifier, a merged task identifier, and an execution result;
[0074] Specifically, step S206 includes S2061 to S2063:
[0075] S2061: Determine the merging type of each identical task; wherein the merging type includes the merged task type and the actual execution task type; multiple identical tasks include one actual execution task type and at least one merged task type; when multiple identical tasks are merged, one of the tasks is selected as the final merged task, and the merging type is the actual execution task type, and the remaining identical tasks are merged tasks, and the merging type is the merged task type.
[0076] For example, T1 and T3 are the same task. When merging T1 and T3, one of them is selected as the merged task T r1 , if T1 is used as T r1 , then T1 is the actual execution task type, indicating that T1 is actually executed, and T3 is the merged task type, indicating that T3 is merged by T1.
[0077] Optionally, the task to be actually executed may be selected based on the submission time of T1 and T3. If T1 is submitted earlier, the combined type of T1 is selected as the actually executed task type.
[0078] S2062: If the merge type of the same tasks is a merged task, then the following steps are executed. Specifically, step S2062 includes Sa~Sc:
[0079] Sa: Update the merge identifier of each identical task to the first character.
[0080] For example, if the task type of T3 is a merged task type, the merge flag optimized of T3 is updated to true, indicating that T3 is merged.
[0081] Sb: Updates the merged task identifier to the task identifier of the actual execution task type corresponding to each identical task.
[0082] For example, T3 is merged with T1, T3 is the merged task type, and T1 is the actual execution task type, indicating that the actual execution task type corresponding to T3 is T1, and the merged task identifier optimizeTargetJob of T3 is updated to the task identifier of T1.
[0083] Sc: Update the merged task ID and execution result to empty.
[0084] For example, the merged task identifier records all merged tasks. Since T3's task type is a merged task type, there are no tasks merged by T3. Furthermore, only tasks of the actual execution task type are executed and result is obtained. Since T3's task type is a merged task type, there is no execution result for T3. Update T3's merged task identifier, optimizeSourceJobs, and execution result, result, to null.
[0085] S2063: If the combined type of the same tasks is the actual execution task type, the following steps are executed. Specifically, step S2063 includes Sd~Sh:
[0086] Sd: Update the merge identifier of each identical task to the second character.
[0087] Exemplarily, if the task type of T1 is the actual execution task type, the merge flag optimized of T1 is updated to false, indicating that T1 is not merged.
[0088] Se: Update the merged task ID to the task ID of the merged task type corresponding to each identical task.
[0089] For example, T1 merges with T3. T1 is the actual execution task type, and T3 is the merged task type, indicating that the merged task type corresponding to T1 is T3. The merged task identifier optimizeSourceJobs of T1 is updated to the task identifier of T3.
[0090] Sf: Update the merged task ID to empty.
[0091] For example, the merged task identifier indicates that when a task is optimized and merged, this field will record which task the task is merged into. Since the task type of T1 is the actual execution task type, there is no merged task for T1. Therefore, the merged task identifier optimizeSourceJobs of T1 is updated to empty.
[0092] Sg: Update the execution results of each merged task to the execution result.
[0093] For example, the merge task T r1 The actual result is T1, so the execution result of T1 is updated to the execution result of the merged task. r1 If the execution result of T1 is R1, the execution result of T1 is updated to R1.
[0094] Sh: Obtain the task identifier in the merged task identifiers of the same tasks, and distribute the execution result to the user end of the user identifier corresponding to the task identifier.
[0095] For example, the merged task ID of T1 is T3. If T1 and T3 are the same task, then the execution results of T1 and T3 are also the same, that is, the execution result R3 of T3 is also the same as R1. R1 is sent as R3 to the user ID corresponding to T3. Figure 3 , the user identifier corresponding to T3 is U1, then R3 is sent to the user end of U1.
[0096] refer to Figure 3 , T2 is not merged and is treated as a separate task T r2 , execute T r2 And send the execution result R2 to the user end of the user identifier corresponding to task T2.
[0097] In summary, multiple tasks in the edge computing task pool are retrieved. Based on each task's metadata, the conditions for triggering a scheduling optimization policy are determined, and the decision is made whether to trigger the scheduling optimization policy. If the scheduling optimization policy is triggered, tasks that can be merged are retrieved from the multiple tasks, i.e., multiple pending tasks. Identical tasks in the multiple pending tasks are merged to produce at least one merged task. By executing the merge task once, the execution results of all identical tasks corresponding to the merged task are obtained, achieving scheduling optimization for the edge computing system, avoiding repeated computation of identical tasks and resource usage, minimizing resource waste, and reducing the load on the edge computing system.
[0098] Based on the above embodiment, in this embodiment, the metadata also includes a reuse identifier and a reuse time; the method also includes: judging whether the execution results of each task are allowed to be reused according to the reuse identifier; if it is determined that the execution results of each task are allowed to be reused, then the execution results are reused within the reuse time.
[0099] In this embodiment, a reuse flag is set to identify whether the execution result of the task can be reused. If the execution result can be reused, when a new identical task is submitted, the edge computing system does not need to execute the task again and directly uses the previously cached execution result.
[0100] In this embodiment, the reuse period allows users to set the duration of result reuse based on business needs. For tasks with lower timeliness requirements, a longer reuse period can be set to fully utilize cached results; for tasks with higher timeliness requirements, a shorter reuse period can be set to ensure that the results used are the latest.
[0101] In summary, in edge computing systems, the same task may be submitted for execution multiple times by multiple users within a short period of time. By setting a reuse flag and reuse time, we can identify whether the execution result can be reused. If so, when a new identical task is submitted, the system does not need to execute it again. Instead, it directly uses the previously cached result within the valid reuse time, avoiding repeated calculations of the same task, further reducing resource waste and reducing the load on the edge computing system. Furthermore, by setting the result reuse time based on business needs, the edge computing system can better adapt to the needs of different business scenarios, increasing its flexibility.
[0102] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.
[0103] Figure 4 This is a schematic diagram of the structure of the scheduling optimization processing device provided in the embodiment of the present application. Figure 4 As shown, an embodiment of the present application further provides a scheduling optimization processing device, including: a first acquisition module 401, a judgment module 402, a second acquisition module 403, a merging module 404, an execution module 405 and a distribution module 406.
[0104] The first acquisition module 401 is used to acquire multiple tasks in the edge computing task pool; wherein the multiple tasks are sent to the edge computing task pool by different user terminals, and each task carries a user identifier and metadata;
[0105] The judgment module 402 is used to judge whether to trigger the scheduling optimization strategy based on the metadata of each task;
[0106] The second acquisition module 403 is configured to acquire multiple tasks to be merged from multiple tasks if it is determined that the scheduling optimization strategy is triggered;
[0107] A merging module 404 is configured to merge multiple identical tasks among the multiple tasks to be merged according to the metadata to obtain at least one merged task;
[0108] The execution module 405 is used to execute each merging task and obtain the execution result of each merging task;
[0109] The distribution module 406 is configured to update metadata of multiple identical tasks and distribute the execution results of each merged task to the user terminals corresponding to the user identifiers of each identical task according to the latest metadata of each identical task.
[0110] In a possible implementation, the determination module 402 includes:
[0111] A first judging unit is configured to judge, based on the offline identifier, whether there is a task that allows offline processing among the multiple tasks;
[0112] The triggering unit is used to trigger the scheduling optimization strategy if it is determined whether there is a task that allows offline processing among multiple tasks.
[0113] In a possible implementation, the second acquisition module 403 includes:
[0114] a first determining unit, configured to determine tasks that are allowed to be processed offline among the multiple tasks as tasks to be merged;
[0115] The first acquiring unit is configured to acquire a plurality of tasks to be merged from a plurality of tasks.
[0116] In a possible implementation, the metadata further includes a task identifier, a merge identifier, a merged task identifier, a merged task identifier, and an execution result; accordingly, the distribution module 406 includes:
[0117] A second judgment unit is configured to judge the merging type of each identical task; wherein the merging type includes the type of the task being merged and the type of the task actually executed; multiple identical tasks include one actually executed task type and at least one merging task type; when multiple identical tasks are merged, one of the tasks is selected as the final merged task, with the merging type being the type of the task actually executed, and the remaining identical tasks are the merged tasks, with the merging type being the type of the task being merged;
[0118] The second determination unit is configured to execute the following steps if the merge type of the identical tasks is a merged task. Specifically, the second determination unit includes:
[0119] A first updating subunit, configured to update the merge identifier of each identical task to the first character;
[0120] The second updating subunit is used to update the merged task identifiers to task identifiers of actually executed task types corresponding to the same tasks;
[0121] The third updating subunit is used to update the merged task identifier and execution result to null;
[0122] The third determination unit is configured to execute the following steps if the combined type of the identical tasks is the actual execution task type. Specifically, the third determination unit includes:
[0123] a fourth updating subunit, configured to update the merge identifier of each identical task to a second character;
[0124] A fifth updating subunit is configured to update the merged task identifier to a task identifier of the merged task type corresponding to each identical task;
[0125] A sixth updating subunit, configured to update the merged task identifier to be empty;
[0126] a seventh updating subunit, configured to update the execution results of each merged task to the execution result;
[0127] The distribution subunit is used to obtain the task identifier in the combined task identifiers of the same tasks, and distribute the execution result to the user end of the user identifier corresponding to the task identifier.
[0128] In a possible implementation, the merging module 404 includes:
[0129] A second acquiring unit is used to acquire triple data of each task to be merged according to the metadata;
[0130] A third acquiring unit is configured to acquire a plurality of identical tasks from a plurality of tasks to be merged according to the triple data;
[0131] The merging unit is used to merge multiple identical tasks among multiple tasks to be merged to obtain at least one group of merged tasks.
[0132] In one possible implementation, the triplet data includes container image parameters, startup parameters, and execution environment parameters; accordingly, the third acquisition unit includes:
[0133] A determination subunit is configured to determine, among multiple tasks to be merged, tasks to be merged that have the same container image parameters, startup parameters, and execution environment parameters as the same tasks;
[0134] The acquisition subunit is used to obtain multiple identical tasks from multiple tasks to be merged.
[0135] In a possible implementation, the metadata further includes a reuse identifier and a reuse time. The scheduling optimization processing device further includes a reuse module, which includes:
[0136] The judgment subunit is used to judge whether the execution result of each task is allowed to be reused according to the reuse identifier;
[0137] The multiplexing subunit is used to reuse the execution results within the reuse time if it is determined that the execution results of each task are allowed to be reused.
[0138] For the description of the features in the embodiment corresponding to the scheduling optimization processing device, please refer to the relevant description of the embodiment corresponding to the scheduling optimization processing method, and no further details will be given here.
[0139] Figure 5This is a schematic diagram of the structure of the edge computing system provided in the embodiment of the present application. Figure 5 As shown, the edge computing system provided in this embodiment includes: at least one processor 501 and a memory 502. Optionally, the edge computing system also includes a communication component 503. The processor 501, the memory 502, and the communication component 503 are connected via a bus.
[0140] During the specific implementation process, at least one processor 501 executes the computer-executable instructions stored in the memory 502, so that the at least one processor 501 executes the above-mentioned scheduling optimization processing method embodiment.
[0141] The specific implementation process of the processor 501 can be found in the above method embodiment. Its implementation principle and technical effects are similar and will not be repeated here in this embodiment.
[0142] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the application may be directly executed by a hardware processor or by a combination of hardware and software modules within the processor.
[0143] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage.
[0144] A bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be categorized as address buses, data buses, and control buses. For ease of illustration, the buses in the drawings of this application are not limited to just one bus or just one type of bus.
[0145] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above-mentioned scheduling optimization processing method embodiments when running.
[0146] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0147] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above-mentioned scheduling optimization processing method embodiments are implemented.
[0148] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps in any of the above-mentioned scheduling optimization processing method embodiments.
[0149] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0150] The above is a detailed introduction to a scheduling optimization processing method, device, edge computing system and storage medium provided by this application. This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method of this application and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of this application, several improvements and modifications can be made to this application, and these improvements and modifications also fall within the scope of protection of the claims of this application.
Claims
1. A scheduling optimization processing method, characterized in that: include: Get multiple tasks from the edge computing task pool; The multiple tasks are sent to the edge computing task pool by different user terminals, and each task carries a user identifier and metadata; Determine whether to trigger a scheduling optimization strategy based on the metadata of each task; If it is determined that the scheduling optimization strategy is triggered, a plurality of tasks to be merged are obtained from the plurality of tasks; Merging, according to the metadata, a plurality of identical tasks among the plurality of tasks to be merged to obtain at least one merged task; Execute each merge task and obtain the execution result of each merge task; The metadata of the plurality of identical tasks are updated, and based on the latest metadata of each identical task, the execution results of each merged task are distributed to the user terminals of the user identifiers corresponding to each identical task.
2. The method according to claim 1, characterized in that The metadata includes an offline identifier; Accordingly, judging whether to trigger a scheduling optimization strategy based on the metadata of each task includes: According to the offline identifier, determining whether there is a task that allows offline processing among the multiple tasks; If it is determined whether there is a task that allows offline processing among the multiple tasks, a scheduling optimization strategy is triggered.
3. The method according to claim 2, characterized in that The acquiring a plurality of tasks to be merged from the plurality of tasks includes: Determining tasks that are allowed to be processed offline among the multiple tasks as tasks to be merged; A plurality of tasks to be merged is obtained from the plurality of tasks.
4. The method according to claim 1, wherein The metadata also includes a task identifier, a merge identifier, a merged task identifier, a merged task identifier, and an execution result; Accordingly, updating metadata of the plurality of identical tasks and distributing the execution results of the merged tasks to the user terminals of the user identifiers corresponding to the identical tasks according to the latest metadata of the identical tasks includes: Determining a merging type for each of the identical tasks; wherein the merging type includes a merged task type and an actually executed task type; wherein the plurality of identical tasks include one actually executed task type and at least one merged task type; and when merging the plurality of identical tasks, selecting one of the tasks as a final merged task, the merged type of which is the actually executed task type, and the remaining identical tasks as merged tasks, the merged type of which is the merged task type; If the merge type of the same tasks is the merged task, perform the following steps: Updating the merge identifier of each identical task to the first character; Updating the merged task identifiers to task identifiers of actual execution task types corresponding to the identical tasks; Update the merged task identifier and the execution result to empty; If the combined type of the same tasks is the actual execution task type, perform the following steps: Updating the merge identifier of each identical task to the second character; Updating the merged task identifier to the task identifier of the merged task type corresponding to each of the identical tasks; Update the merged task identifier to empty; Updating the execution results of the merged tasks to the execution results; The task identifier in the combined task identifiers of the identical tasks is obtained, and the execution result is distributed to a user terminal of a user identifier corresponding to the task identifier.
5. The method according to claim 1, characterized in that Merging a plurality of identical tasks among the plurality of tasks to be merged according to the metadata to obtain at least one merged task includes: According to the metadata, triple data of each task to be merged is obtained; Acquire a plurality of identical tasks from the plurality of tasks to be merged according to the triple data; Merge the multiple identical tasks among the multiple tasks to be merged to obtain at least one group of merged tasks.
6. The method according to claim 5, characterized in that The triplet data includes container image parameters, startup parameters and execution environment parameters; Accordingly, the acquiring of a plurality of identical tasks from the plurality of tasks to be merged according to the triple data includes: Among the multiple tasks to be merged, tasks to be merged that have the same container image parameters, the same startup parameters, and the same execution environment parameters are determined to be the same tasks; The multiple identical tasks are obtained from the multiple tasks to be merged.
7. The method according to any one of claims 1 to 6, characterized in that The metadata also includes a multiplexing identifier and a multiplexing time; The method further comprises: According to the reuse identifier, determining whether the execution results of the tasks are allowed to be reused; If it is determined that the execution results of the tasks are allowed to be reused, the execution results are reused within the reuse time.
8. A scheduling optimization processing device, characterized in that: include: The first acquisition module is used to obtain multiple tasks in the edge computing task pool; The multiple tasks are sent to the edge computing task pool by different user terminals, and each task carries a user identifier and metadata; A judgment module, used to judge whether to trigger a scheduling optimization strategy based on the metadata of each task; A second acquisition module is configured to acquire a plurality of tasks to be merged from the plurality of tasks if it is determined that the scheduling optimization strategy is triggered; a merging module, configured to merge, according to the metadata, a plurality of identical tasks among the plurality of tasks to be merged, to obtain at least one merged task; An execution module, used to execute each merging task and obtain the execution result of each merging task; The distribution module is configured to update metadata of the plurality of identical tasks and distribute the execution results of the merged tasks to user terminals of user identifiers corresponding to the identical tasks according to the latest metadata of the identical tasks.
9. An edge computing system, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the scheduling optimization processing method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the scheduling optimization processing method according to any one of claims 1 to 7 are implemented.