Task processing method and storage medium
The method optimizes task processing by dynamically allocating tasks between edge and cloud systems based on resource availability, reducing latency and network load, and enhancing overall system performance.
Patent Information
- Application Number
- CN202411494042.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-01-03
AI Technical Summary
The challenge of efficiently allocating task processing resources between edge devices and cloud centers to reduce latency and network load in a distributed computing environment.
A method and system for dynamically allocating tasks based on the idle resources of edge and cloud systems, allowing edge devices to process tasks when sufficient and leveraging cloud resources when needed, with clear boundary updates to optimize resource utilization and task processing speed.
This approach reduces data transmission and network load while improving response speed and resource utilization by ensuring efficient task processing across edge and cloud systems.
Smart Images

Figure CN119248505A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer application technology, and in particular to a task processing method and a storage medium. Background Art
[0002] With the popularization of technologies such as the Internet of Things and mobile devices, more and more data and computing tasks need to be processed at the edge of the network to reduce latency and improve response speed. However, the computing power of edge devices is limited and cannot handle all tasks independently. At the same time, although the cloud center system has powerful computing power, sending all tasks to the cloud for processing will increase network load and latency. Therefore, how to reasonably allocate task processing resources between the edge and the cloud has become an urgent problem to be solved. Summary of the invention
[0003] The present invention provides a task processing method and a storage medium to solve the problem of how to reasonably allocate task processing resources according to edge idle resources and cloud center system resources.
[0004] According to one aspect of the present invention, there is provided a task processing method, which is applied to a cloud center system, comprising:
[0005] Receive a task processing request for a target task sent by an edge operating system corresponding to the cloud center system, and determine whether the edge operating system has the task processing resources based on the estimated task processing resources required to process the target task and the edge idle resources of the edge operating system;
[0006] In the case where the edge operating system has the task processing resources required to process the target task, issuing a task processing instruction to the edge operating system that the target task is processed by the edge operating system, and updating the system boundary between the cloud center system and the edge operating system to the boundary between the edge operating system and the cloud center system;
[0007] In the case where the edge operating system does not have the task processing resources required to process the target task, generating a task processing instruction according to the central idle resources of the cloud center system and the edge idle resources of the edge operating system that initiates the task processing request;
[0008] When the task processing instruction includes an instruction for the cloud center system to process at least part of the target task, the system boundary between the cloud center system and the edge operating system is updated to the boundary between the resources within the cloud center system that process the task and the resources that do not process the task.
[0009] According to another aspect of the present invention, there is provided a task processing device, which is configured in a cloud center system, and includes:
[0010] A task processing resource determination module is used to receive a task processing request for a target task sent by an edge operating system corresponding to the cloud center system, and determine whether the edge operating system has the task processing resources based on the estimated task processing resources required to process the target task and the edge idle resources of the edge operating system;
[0011] A first boundary updating module is used to issue a task processing instruction to the edge operating system that the target task is processed by the edge operating system if the edge operating system has the task processing resources required to process the target task, and update the system boundary between the cloud center system and the edge operating system to the boundary between the edge operating system and the cloud center system;
[0012] A first task processing instruction generating module is used to generate a task processing instruction according to the central idle resources of the cloud center system and the edge idle resources of the edge operating system that initiates the task processing request when the edge operating system does not have the task processing resources required to process the target task;
[0013] The second boundary update module is used to update the system boundary between the cloud center system and the edge operating system to the boundary between the resources within the cloud center system that process the task and the resources that do not process the task, when the task processing instruction includes an instruction for the cloud center system to process at least part of the target task.
[0014] According to another aspect of the present invention, there is provided an electronic device, the electronic device comprising:
[0015] at least one processor; and
[0016] a memory communicatively connected to the at least one processor; wherein,
[0017] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the task processing method described in any embodiment of the present invention.
[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the task processing method described in any embodiment of the present invention when executed.
[0019] According to another aspect of the present invention, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the task processing method described in any embodiment of the present invention is implemented.
[0020] The technical solution of the embodiment of the present invention receives a task processing request for a target task sent by an edge operating system corresponding to the cloud center system, determines whether the edge operating system has the task processing resources based on the estimated task processing resources required to process the target task and the edge idle resources of the edge operating system, can dynamically evaluate the edge idle resources of the edge operating system, and can optimize task allocation; then, in the case that the edge operating system has the task processing resources required to process the target task, issues a task processing instruction to the edge operating system that the target task is processed by the edge operating system, and updates the system boundary between the cloud center system and the edge operating system to the boundary between the edge operating system and the cloud center system. By dynamically allocating tasks, it is ensured that the edge operating system locally processes tasks when the edge idle resources are sufficient, thereby reducing data transmission and network load, improving response speed, and at the same time clarifying system boundaries and optimizing resource management. ; Then, in the case that the edge operating system does not have the task processing resources required to process the target task, a task processing instruction is generated according to the central idle resources of the cloud center system and the edge idle resources of the edge operating system that initiates the task processing request. When the edge idle resources of the edge operating system are insufficient, the central idle resources of the cloud center system can be utilized to ensure that the target task is efficiently processed and optimize the overall system performance; finally, in the case that the task processing instruction includes an instruction for the cloud center system to process at least part of the target task, the system boundary between the cloud center system and the edge operating system is updated to the boundary between the resources in the cloud center system that process the task and the resources that do not process the task. By updating the system boundary, resource allocation can be clarified to ensure that the cloud center system efficiently processes tasks, which solves the problem of how to reasonably allocate task processing resources according to edge idle resources and cloud center system resources, thereby improving resource utilization and task processing speed.
[0021] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0023] Figure 1 is a flowchart of a task processing method provided according to Embodiment 1 of the present invention;
[0024] Figure 2 is a flowchart of a task processing method provided according to Embodiment 2 of the present invention;
[0025] Figure 3 is a structural diagram of a task processing device provided according to Embodiment 3 of the present invention;
[0026] Figure 4 It is a structural schematic diagram of an electronic device for implementing the task processing method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0029] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0030] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0031] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0032] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0033] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0034] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0035] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0036] Embodiment 1
[0037] Figure 1 A flowchart of a task processing method is provided for the first embodiment of the present invention. This embodiment is applicable to the case where task processing resources are reasonably allocated according to idle resources at the edge and system resources at the cloud center. The method can be executed by a task processing device, which can be implemented in the form of hardware and / or software. Optionally, it can be implemented by an electronic device, which can be a mobile terminal, a PC or a server. Figure 1 As shown, the method may specifically include:
[0038] S110, receiving a task processing request for a target task sent by an edge operating system corresponding to the cloud center system, and determining whether the edge operating system has the task processing resources based on the estimated task processing resources required to process the target task and the edge idle resources of the edge operating system.
[0039] Among them, the cloud center system can be understood as the core part of the cloud computing environment, which is used to provide a large number of computing resources and services (such as database services and security services, etc.). The cloud center system can support a large number of users and applications, usually located in a data center, and provides services to users through the Internet. The edge can be understood as transferring the workload of data processing and analysis from a centralized cloud server to a place closer to the data source. The edge operating system can be understood as a software platform running on an edge device, which can be a dedicated hardware device or software installed on an ordinary computing device. The edge operating system is used to reduce data transmission delays and relieve pressure on the cloud. The edge operating system can perform functions such as local computing, data caching, and preliminary data analysis. The target task can be understood as a specific task or workload to be processed, etc., which is not limited here. The task processing request can be understood as a request sent from the edge operating system to the cloud center system or other management node. Exemplarily, the task processing request may include but is not limited to information such as the type of task, the amount of resources required or the priority. The task processing resources can be understood as the computing resources required to complete the target task. The task processing resources may include but are not limited to processor time, memory usage, and network bandwidth. The edge idle resources can be understood as the computing resources currently available to the edge operating system, which may include unoccupied CPU cycles or idle memory space, etc. The edge idle resources are used to determine whether the edge device is capable of undertaking the task processing request.
[0040] It is understandable that determining whether the edge operating system has the task processing resources can be based on the estimation of the resources required for the target task and the evaluation of the currently available resources of the edge operating system, and whether the edge device can complete the task independently or needs to request additional support from the cloud center. If the edge operating system has sufficient resources, it can be processed directly in the edge operating system, thereby reducing dependence on the cloud center system, reducing latency and improving efficiency.
[0041] On the basis of the above scheme, it is possible to determine whether the task processing resources required for the target task and the edge idle resources of the edge operating system meet the preset constraints based on the weight of the task processing resources, the task processing resources required to process the target task, the total types of the task processing resources required to process the target task, and the edge idle resources in the edge operating system. Specifically, determining whether the edge operating system has the task processing resources based on the estimated task processing resources required to process the target task and the edge idle resources of the edge operating system includes: if the estimated task processing resources required to process the target task and the edge idle resources of the edge operating system meet the preset constraints, determining that the edge operating system has the task processing resources; otherwise, determining that the edge operating system does not have the task processing resources; wherein the preset constraints include:
[0042]
[0043] in, represents the edge idle resources in the edge operating system, S n represents the nth type of task processing resource required to process the target task, N represents the total types of task processing resources required to process the target task, n is a positive integer, 1≤n≤N, ρ n Represents the weight of the nth task processing resource.
[0044] The preset constraint condition can be understood as a predefined condition rule used to determine whether the edge operating system has sufficient resources to process the target task. When the edge idle resources of the edge operating system meet the preset constraint condition, it is determined that the edge operating system has the task processing resources; otherwise, it is determined that the edge operating system does not have the task processing resources.
[0045] The above scheme, through a weighted approach, comprehensively considers the needs and importance of various resources, and determines whether the edge operating system has task processing resources to handle a given target task, which can help optimize resource utilization and ensure that tasks can be executed efficiently.
[0046] S120. When the edge operating system has the task processing resources required to process the target task, a task processing instruction is issued to the edge operating system, wherein the target task is processed by the edge operating system, and the system boundary between the cloud center system and the edge operating system is updated to the boundary between the edge operating system and the cloud center system.
[0047] The system boundary can be understood as an interface or connection line between the edge operating system and the cloud center system, etc. The system boundary is used to divide the work or responsibilities between the cloud center system and the edge operating system.
[0048] Exemplarily, after confirming that the edge operating system has sufficient task processing resources to process the target task, a task processing instruction will be sent to the edge operating system, instructing it to start processing the task. The task processing instruction may generally include information such as specific requirements of the task, parameter configuration, etc., so that the edge operating system can correctly execute the task. After a target task is assigned to the edge operating system for processing, it means that the processing of the target task is performed by the edge operating system. Therefore, it is necessary to update the system boundaries of the cloud center system and the edge operating system to clearly indicate which target tasks are now the responsibility of the edge operating system and which are managed by the cloud center system, which helps to maintain a clear division of labor and efficient operation of the entire system, and also facilitates subsequent detection and management.
[0049] S130. When the edge operating system does not have the task processing resources required to process the target task, generate a task processing instruction according to the central idle resources of the cloud center system and the edge idle resources of the edge operating system that initiates the task processing request.
[0050] The idle resources of the center can be understood as computing resources that are not currently used by the cloud center system, including but not limited to CPU cycles, memory space, storage capacity, etc. It is understandable that the cloud center system has powerful computing capabilities and abundant resources, which can provide support when edge device resources are insufficient.
[0051] Exemplarily, when the edge operating system does not have the task processing resources required to process the target task, that is, after evaluation, the edge operating system lacks sufficient task processing resources to complete the target task, it is necessary to generate task processing instructions, which will guide how to allocate tasks between the cloud center system and the edge operating system.
[0052] On the basis of the above scheme, optionally, the task processing instructions are generated according to the central idle resources of the cloud center system and the edge idle resources of the edge operating system that initiates the task processing request, including: when the edge idle resources of the edge operating system that initiates the task processing request reach a first resource threshold and the central idle resources of the cloud center system reach a second resource threshold, based on the edge idle resources and the central idle resources, task processing instructions are generated for the edge operating system that initiates the task processing request and the cloud center system to collaboratively process the target task.
[0053] Among them, the first resource threshold can be understood as a preset resource quantity standard, and the value of the first resource threshold is less than the task processing resources. The second resource threshold can be understood as another preset resource quantity standard, which is used to determine whether the total amount of idle resources after adding the central idle resources of the cloud center system and the edge idle resources of the edge operating system reaches the task processing resources, that is, whether the edge operating system and the cloud center system can process the target task after collaboration. The value of the second resource threshold is less than the value of the task processing resources. The sum of the first resource threshold and the second resource threshold is greater than the task processing resources. The task processing instruction can be understood as an instruction to instruct the edge operating system and / or the cloud center system to work together to process the target task.
[0054] On the basis of the above scheme, optionally, the task processing instructions are generated according to the central idle resources of the cloud center system and the edge idle resources of the edge operating system that initiates the task processing request, including: when the edge idle resources of the edge operating system that initiates the task processing request do not reach a third resource threshold and the central idle resources of the cloud center system reach a fourth resource threshold, generating a task processing instruction for the cloud center system to process the target task.
[0055] Among them, the third resource threshold can be understood as a preset resource quantity standard, and the value of the third resource threshold is less than the task processing resources. Correspondingly, the fourth resource threshold can be understood as another preset resource quantity standard, and the fourth resource threshold is greater than the task processing resources, which is used to determine whether the cloud center system has sufficient central idle resources to independently process the task. It can be understood that when the central idle resources of the cloud center system reach the fourth resource threshold, it indicates that the cloud center system can independently process the target task. The task processing instruction can be understood as generating a task processing instruction when it is determined that the edge operating system does not meet the task processing resources but the cloud center system meets the task processing resources, instructing the cloud center system to independently process the target task.
[0056] On the basis of the above scheme, optionally, the task processing instructions are generated according to the central idle resources of the cloud center system and the edge idle resources of the edge operating system that initiates the task processing request, including: when the edge idle resources of the edge operating system that initiates the task processing request do not reach the fifth resource threshold and the central idle resources of the cloud center system do not reach the sixth resource threshold, determining whether other edge operating systems connected to the cloud center system have the task processing resources; in the case that there is an edge operating system with the task processing resources, generating a task processing instruction for the edge operating system with the task processing resources to process the target task.
[0057] Among them, the fifth resource threshold is a preset resource quantity standard, and the value of the fifth resource threshold is less than the task processing resources. The sixth resource threshold can be understood as another preset resource quantity standard, which is used to determine whether the total idle resources after adding the central idle resources of the cloud center system and the edge idle resources of the edge operating system reach the task processing resources, that is, whether the edge operating system and the cloud center system can cooperate to process the target task. The task processing resources minus the fifth resource threshold is greater than the sixth resource threshold, that is, the edge operating system and the cloud center system cannot complete the target task through collaborative work. The task processing instruction can be understood as that one or more other edge operating systems have sufficient resources to process the target task, and is used to instruct other edge operating systems to process the target task.
[0058] Exemplarily, assume that the total task resources are a, the edge idle resources of the edge operating system are b, and the central idle resources of the cloud center system are c. In the case where b > a, the edge operating system can independently process the target task; in the case where b < a, c < a, and b + c > a, the edge operating system and the cloud center system can cooperate to process the target task; in the case where b a, the cloud center system can independently process the target task; in the case where b + c < a, the edge operating system and the cloud center system cannot complete the target task through collaborative work, then it is determined whether other edge operating systems connected to the cloud center system have the task processing resources. In the case where there are such resources, a task processing instruction is generated to instruct these other edge operating systems to process the target task.
[0059] S140. In the case where the task processing instruction includes an instruction for the cloud center system to process at least part of the target task, update the system boundary between the cloud center system and the edge operating system to the boundary between the resources for processing the task within the cloud center system and the resources that have not processed the task.
[0060] Among them, the instruction for part of the target task can be understood as a part of the content in the task processing instruction, which is used to instruct the cloud center system to process a certain part or all of the target task.
[0061] The technical solution of the embodiment of the present invention receives a task processing request for a target task sent by an edge operating system corresponding to the cloud center system, determines whether the edge operating system has the task processing resources based on the estimated task processing resources required to process the target task and the edge idle resources of the edge operating system, can dynamically evaluate the edge idle resources of the edge operating system, and can optimize task allocation; then, in the case that the edge operating system has the task processing resources required to process the target task, issues a task processing instruction to the edge operating system that the target task is processed by the edge operating system, and updates the system boundary between the cloud center system and the edge operating system to the boundary between the edge operating system and the cloud center system. By dynamically allocating tasks, it is ensured that the edge operating system locally processes tasks when the edge idle resources are sufficient, thereby reducing data transmission and network load, improving response speed, and at the same time clarifying system boundaries and optimizing resource management. ; Then, in the case that the edge operating system does not have the task processing resources required to process the target task, a task processing instruction is generated according to the central idle resources of the cloud center system and the edge idle resources of the edge operating system that initiates the task processing request. When the edge idle resources of the edge operating system are insufficient, the central idle resources of the cloud center system can be utilized to ensure that the target task is efficiently processed and optimize the overall system performance; finally, in the case that the task processing instruction includes an instruction for the cloud center system to process at least part of the target task, the system boundary between the cloud center system and the edge operating system is updated to the boundary between the resources in the cloud center system that process the task and the resources that do not process the task. By updating the system boundary, resource allocation can be clarified to ensure that the cloud center system efficiently processes tasks, which solves the problem of how to reasonably allocate task processing resources according to edge idle resources and cloud center system resources, thereby improving resource utilization and task processing speed.
[0062] Embodiment 2
[0063] Figure 2 A flowchart of a task processing method provided for Embodiment 2 of the present invention, this embodiment is a supplementary explanation based on the above embodiment. Optionally, after receiving the task processing request for the target task sent by the edge operating system corresponding to the cloud center system, it also includes: in the case where there are multiple task processing requests for the same target task issued by the edge operating systems, generating multiple task processing instructions for the edge operating systems to collaboratively process the target task. For specific implementation methods, please refer to the description of this embodiment. Among them, the technical features that are the same or similar to the above embodiments are not repeated here. Figure 2 As shown, the method may specifically include:
[0064] S210, receiving a task processing request for a target task sent by an edge operating system corresponding to the cloud center system, and determining whether the edge operating system has the task processing resources based on the estimated task processing resources required to process the target task and the edge idle resources of the edge operating system.
[0065] S220. In the case where there are multiple task processing requests for the same target task issued by the edge operating systems, generate task processing instructions for the multiple edge operating systems to collaboratively process the target task.
[0066] An optional implementation method detects that multiple edge operating systems have issued task processing requests for the same target task, evaluates the current idle resources of each edge operating system, and determines the processing capacity of each edge operating system; decomposes the target task into multiple subtasks, assigns each subtask to a different edge operating system for processing, and clearly specifies the current idle resources that each edge operating system will use; defines how data is transmitted between multiple edge operating systems; defines the execution steps and timing of subtasks to ensure that the processing tasks of each edge operating system can be seamlessly connected.
[0067] On the basis of the above scheme, optionally, the generating of task processing instructions for multiple edge operating systems to collaboratively process the target task includes: splitting the target task into multiple subtasks, determining the target edge operating system corresponding to the subtask from the edge operating system according to the edge idle resources of the multiple edge operating systems, and sending the subtask and the task processing instruction corresponding to the subtask to the target edge operating system corresponding to the subtask; receiving the subtask execution result of the subtask fed back by the target edge operating system, and determining the target task execution result corresponding to the target task based on the subtask execution results corresponding to the multiple subtasks, and sending the target task execution result to the edge operating system that initiated the task processing request.
[0068] Among them, the subtask can be understood as decomposing the target task into multiple smaller and independent parts, each of which can be processed by a different edge operating system. The target edge operating system can be understood as selecting an edge operating system suitable for processing a subtask from multiple edge operating systems. The target edge operating system can be determined based on the amount of idle resources at the edge and the ability to process subtasks. The subtask execution result can be understood as the result returned after the target edge operating system processes the subtask. Exemplarily, the subtask execution result may include but is not limited to processed data and analysis results. The target task execution result can be understood as the task execution result determined by summarizing the subtask execution results of all subtasks. The target task execution result may involve steps such as data integration and result merging.
[0069] An optional implementation manner, optionally, after determining the target task execution result corresponding to the target task based on the subtask execution results corresponding to the multiple subtasks, it also includes: sending the data and collaborative processing results of the collaborative processing process of the two or more edge operating systems jointly processing the target task to the cloud center system for archiving.
[0070] The above scheme can make full use of the resources of multiple edge operating systems and improve the efficiency and reliability of target task processing by splitting the target task into multiple subtasks when processing complex target tasks, selecting appropriate edge operating system devices to process the subtasks, and finally summarizing the results to determine the execution results of the target task.
[0071] Based on the above scheme, optionally, after generating a task processing instruction for multiple edge operating systems to collaboratively process the target task, it also includes: when it is detected that the edge idle resources of at least two of the edge operating systems have changed, updating the number of subtasks distributed to the edge operating system for execution according to the resource change information of the edge idle resources of the edge operating system.
[0072] The resource change information may be understood as the specific situation of the edge idle resource change of the edge operating system, and may include but is not limited to the time of the edge idle resource change, the type of resource change, and the amount of change.
[0073] An optional implementation method can detect the edge idle resource status of each edge operating system, and record resource change information when it is detected that the edge idle resources of at least two edge operating systems have changed; analyze the resource change information to determine the current processing capacity of each edge operating system; evaluate the impact of the resource change information on the current task processing, for example, if the edge idle resources of an edge operating system increase, it can take on more subtasks; if the edge idle resources of an edge operating system decrease, its task burden needs to be reduced, etc.; based on the evaluation results, reallocate subtasks to ensure that the workload of each edge operating system matches its current processing capacity.
[0074] The above scheme can ensure the effective use of resources, improve the efficiency and reliability of task processing, and better respond to resource changes and ensure the smooth execution of tasks through continuous detection and dynamic adjustment, by re-evaluating the processing capacity of each device based on the resource change information of the edge idle resources of multiple edge operating systems and adjusting the number of subtasks assigned to these edge operating systems when changes in the edge idle resources of multiple edge operating systems are detected.
[0075] On the basis of the above scheme, the number of subtasks to be executed by the edge operating system after adjustment can be determined according to the initial number of subtasks distributed to the edge operating system for execution, the edge idle resources of the edge operating system after the change, the edge idle resources of the edge operating system before the change, and the ratio of the task processing resources required by the edge operating system to process the subtasks to the total edge system resources of the edge operating system. Specifically, the number of subtasks to be executed corresponding to the edge operating system can be updated according to the resource change information of the edge idle resources of the edge operating system based on the following formula:
[0076]
[0077] Wherein, Q represents the number of the subtasks to be executed by the edge operating system after adjustment, Q represents the initial number of the subtasks distributed to the edge operating system for execution, Indicates the edge idle resources of the edge operating system before the change, represents the edge idle resources of the edge operating system after the change, and λ represents the ratio of the task processing resources required by the edge operating system to process the subtask to the total edge system resources of the edge operating system.
[0078] in, It can be understood as the absolute value of the change in edge idle resources of the edge operating system, that is, the absolute value of the difference between the edge idle resources after the change and the edge idle resources before the change.
[0079] The above scheme dynamically adjusts the number of subtasks assigned to the edge operating system by considering the absolute value of the change in the edge idle resources of the edge operating system and the ratio of resources required to process subtasks, ensuring the effective utilization of resources and efficient processing of tasks.
[0080] S230, when the edge operating system has the task processing resources required to process the target task, issuing a task processing instruction to the edge operating system that the target task is processed by the edge operating system, and updating the system boundary between the cloud center system and the edge operating system to the boundary between the edge operating system and the cloud center system;
[0081] S240, when the edge operating system does not have the task processing resources required to process the target task, generating a task processing instruction according to the central idle resources of the cloud center system and the edge idle resources of the edge operating system that initiates the task processing request;
[0082] S250. When the task processing instruction includes an instruction for the cloud center system to process at least part of the target task, the system boundary between the cloud center system and the edge operating system is updated to the boundary between the resources within the cloud center system that process the task and the resources that do not process the task.
[0083] The technical solution of the embodiment of the present invention can distribute the task to an edge operating system suitable for execution by splitting the target task into multiple sub-tasks and determining the target edge operating system corresponding to the sub-task from the edge operating system according to the edge idle resources, thereby improving the efficiency of task processing, and updating the number of sub-tasks distributed to the edge operating system for execution according to the resource change information of the edge idle resources of the edge operating system, which can further optimize resource utilization, reduce the time and cost of task processing, and improve the response speed and performance of the edge operating system.
[0084] Embodiment 3
[0085] Figure 3 This is a schematic diagram of the structure of a task processing device provided in Embodiment 3 of the present invention. The task processing device may be configured in a cloud service system. Figure 3 As shown, the task processing device includes: a task processing resource determination module 310 , a first boundary updating module 320 , a first task processing instruction generation module 330 , and a second boundary updating module 340 .
[0086] Among them, the task processing resource determination module 310 is used to receive a task processing request for a target task sent by the edge operating system corresponding to the cloud center system, and determine whether the edge operating system has the task processing resources according to the estimated task processing resources required to process the target task and the edge idle resources of the edge operating system; the first boundary update module 320 is used to issue a task processing instruction to the edge operating system that the target task is processed by the edge operating system when the edge operating system has the task processing resources required to process the target task, and update the system boundary between the cloud center system and the edge operating system to the boundary between the edge operating system and the cloud center system; the first task processing instruction generation module 330 is used to generate a task processing instruction according to the central idle resources of the cloud center system and the edge idle resources of the edge operating system that initiated the task processing request when the edge operating system does not have the task processing resources required to process the target task; the second boundary update module 340 is used to update the system boundary between the cloud center system and the edge operating system to the boundary between the resources that process the task and the resources that do not process the task in the cloud center system when the task processing instruction includes an instruction for the cloud center system to process at least part of the target task.
[0087] The technical solution of the embodiment of the present invention receives a task processing request for a target task sent by an edge operating system corresponding to the cloud center system through a task processing resource determination module 310, determines whether the edge operating system has the task processing resources based on the estimated task processing resources required to process the target task and the edge idle resources of the edge operating system, can dynamically evaluate the edge idle resources of the edge operating system, and can optimize task allocation; then, through a first boundary update module 320, when the edge operating system has the task processing resources required to process the target task, issues a task processing instruction to the edge operating system that the target task is processed by the edge operating system, and updates the system boundary between the cloud center system and the edge operating system to the boundary between the edge operating system and the cloud center system, can ensure that the edge operating system locally processes tasks when the edge idle resources are sufficient by dynamically allocating tasks, reduce data transmission and network load, improve response speed, and at the same time clarify system boundaries and optimize resource management; then Afterwards, when the edge operating system does not have the task processing resources required to process the target task, the first task processing instruction generation module 330 generates a task processing instruction based on the central idle resources of the cloud center system and the edge idle resources of the edge operating system that initiates the task processing request. When the edge idle resources of the edge operating system are insufficient, the central idle resources of the cloud center system can be used to ensure that the target task is efficiently processed and optimize the overall system performance; finally, when the task processing instruction includes an instruction for the cloud center system to process at least part of the target task, the second boundary updating module 340 updates the system boundary between the cloud center system and the edge operating system to the boundary between the resources that process the task and the resources that do not process the task within the cloud center system. By updating the system boundary, resource allocation can be clarified to ensure that the cloud center system efficiently processes tasks, thereby solving the problem of how to reasonably allocate task processing resources based on edge idle resources and cloud center system resources, thereby improving resource utilization and task processing speed.
[0088] On the basis of the above scheme, optionally, the task processing resource determination module includes: a task processing resource submodule. The task processing resource submodule is used to determine that the edge operating system has the task processing resources when the estimated task processing resources required for processing the target task and the edge idle resources of the edge operating system meet preset constraints; otherwise, determine that the edge operating system does not have the task processing resources.
[0089] The preset constraints include:
[0090]
[0091] in, represents the edge idle resources in the edge operating system, S n represents the nth type of task processing resource required to process the target task, N represents the total types of task processing resources required to process the target task, n is a positive integer, 1≤n≤N, ρ n Represents the weight of the nth task processing resource.
[0092] On the basis of the above scheme, optionally, the task processing device further includes: a second task processing instruction generation module. The second task processing instruction generation module is used to generate a task processing instruction for multiple edge operating systems to collaboratively process the target task after receiving the task processing request for the target task sent by the edge operating system corresponding to the cloud center system, in the case where there are multiple task processing requests for the same target task sent by the edge operating system.
[0093] On the basis of the above scheme, optionally, the second task processing instruction generation module includes: a task processing instruction sending submodule and a task execution result sending submodule. Among them, the task processing instruction sending submodule is used to split the target task into multiple subtasks, determine the target edge operating system corresponding to the subtask from the edge operating system according to the edge idle resources of multiple edge operating systems, and send the subtask and the task processing instruction corresponding to the subtask to the target edge operating system corresponding to the subtask; the task execution result sending submodule is used to receive the subtask execution result of the subtask fed back by the target edge operating system, and determine the target task execution result corresponding to the target task according to the subtask execution results corresponding to the multiple subtasks, and send the target task execution result to the edge operating system that initiated the task processing request.
[0094] On the basis of the above scheme, optionally, the second task processing instruction generation module further includes: a subtask quantity update module. The subtask quantity update module is used to update the number of subtasks distributed to the edge operating system for execution according to the resource change information of the edge idle resources of the edge operating system after generating the task processing instruction for the multiple edge operating systems to collaboratively process the target task, when it is detected that the edge idle resources of at least two of the edge operating systems have changed.
[0095] On the basis of the above solution, optionally, a subtask quantity updating module is used to: update the quantity of the subtasks to be executed corresponding to the edge operating system according to the resource change information of the edge idle resources of the edge operating system based on the following formula:
[0096]
[0097] Wherein, Q represents the number of the subtasks to be executed by the edge operating system after adjustment, Q represents the initial number of the subtasks distributed to the edge operating system for execution, Indicates the edge idle resources of the edge operating system before the change, represents the edge idle resources of the edge operating system after the change, and λ represents the ratio of the task processing resources required by the edge operating system to process the subtask to the total edge system resources of the edge operating system.
[0098] On the basis of the above solution, optionally, the first task processing instruction generation module includes: a third task processing instruction generation sub-module, a fourth task processing instruction generation sub-module, and a fifth task processing instruction generation sub-module. The third task processing instruction generation submodule is used to generate a task processing instruction for the edge operating system that initiates the task processing request and the cloud center system to collaboratively process the target task based on the edge idle resources and the center idle resources when the edge idle resources of the edge operating system that initiates the task processing request reach a first resource threshold and the center idle resources of the cloud center system reach a second resource threshold; the fourth task processing instruction generation submodule is used to generate a task processing instruction for the cloud center system to process the target task when the edge idle resources of the edge operating system that initiates the task processing request do not reach a third resource threshold and the center idle resources of the cloud center system reach a fourth resource threshold, wherein the fourth resource threshold is greater than the task processing resource; the fifth task processing instruction generation submodule is used to determine whether other edge operating systems connected to the cloud center system have the task processing resources when the edge idle resources of the edge operating system that initiates the task processing request do not reach a fifth resource threshold and the center idle resources of the cloud center system do not reach a sixth resource threshold; and generate a task processing instruction for the edge operating system with the task processing resources to process the target task if there is an edge operating system with the task processing resources.
[0099] The task processing device provided in the embodiment of the present invention can execute the task processing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0100] Embodiment 4
[0101] Figure 4A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0102] like Figure 4 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0103] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0104] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as a task processing method.
[0105] In some embodiments, a task processing method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of a task processing method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform a task processing method in any other appropriate manner (e.g., by means of firmware).
[0106] Various implementations 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 chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0107] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0108] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0109] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0110] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0111] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0112] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0113] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A task processing method, characterized in that: Applied to cloud center systems, including: Receive a task processing request for a target task sent by an edge operating system corresponding to the cloud center system, and determine whether the edge operating system has the task processing resources based on the estimated task processing resources required to process the target task and the edge idle resources of the edge operating system; In the case where the edge operating system has the task processing resources required to process the target task, issuing a task processing instruction to the edge operating system that the target task is processed by the edge operating system, and updating the system boundary between the cloud center system and the edge operating system to the boundary between the edge operating system and the cloud center system; In the case where the edge operating system does not have the task processing resources required to process the target task, generating a task processing instruction according to the central idle resources of the cloud center system and the edge idle resources of the edge operating system that initiates the task processing request; When the task processing instruction includes an instruction for the cloud center system to process at least part of the target task, the system boundary between the cloud center system and the edge operating system is updated to the boundary between the resources within the cloud center system that process the task and the resources that do not process the task.
2. The task processing method according to claim 1, characterized in that: The determining whether the edge operating system has the task processing resources according to the estimated task processing resources required to process the target task and the edge idle resources of the edge operating system includes: When the estimated task processing resources required to process the target task and the edge idle resources of the edge operating system meet preset constraints, it is determined that the edge operating system has the task processing resources; otherwise, it is determined that the edge operating system does not have the task processing resources; wherein the preset constraints include: in, represents the edge idle resources in the edge operating system, S n represents the nth type of task processing resource required to process the target task, N represents the total types of task processing resources required to process the target task, n is a positive integer, 1≤n≤N, ρ n Represents the weight of the nth task processing resource.
3. The task processing method according to claim 1, characterized in that: After receiving the task processing request for the target task sent by the edge operating system corresponding to the cloud center system, the method further includes: In the case where there are multiple task processing requests for the same target task issued by the edge operating systems, task processing instructions for the multiple edge operating systems to collaboratively process the target task are generated.
4. The task processing method according to claim 3, characterized in that: The generating a plurality of task processing instructions for the edge operating systems to collaboratively process the target task includes: Splitting the target task into multiple subtasks, determining a target edge operating system corresponding to the subtask from the edge operating systems according to the edge idle resources of the multiple edge operating systems, and issuing the subtask and the task processing instruction corresponding to the subtask to the target edge operating system corresponding to the subtask; Receive the subtask execution result of the subtask fed back by the target edge operating system, determine the target task execution result corresponding to the target task based on the subtask execution results corresponding to the multiple subtasks, and send the target task execution result to the edge operating system that initiated the task processing request.
5. The task processing method according to claim 3, characterized in that: After generating a plurality of task processing instructions for the edge operating systems to collaboratively process the target task, the method further includes: When it is detected that the edge idle resources of at least two of the edge operating systems change, the number of subtasks distributed to the edge operating systems for execution is updated according to the resource change information of the edge idle resources of the edge operating systems.
6. The task processing method according to claim 5, characterized in that: The number of the subtasks to be executed corresponding to the edge operating system is updated according to the resource change information of the edge idle resources of the edge operating system based on the following formula: Wherein, Q represents the number of the subtasks to be executed by the edge operating system after adjustment, Q represents the initial number of the subtasks distributed to the edge operating system for execution, Indicates the edge idle resources of the edge operating system before the change, represents the edge idle resources of the edge operating system after the change, and λ represents the ratio of the task processing resources required by the edge operating system to process the subtask to the total edge system resources of the edge operating system.
7. The task processing method according to claim 1, characterized in that: The generating of the task processing instruction according to the central idle resources of the cloud center system and the edge idle resources of the edge operating system that initiates the task processing request includes: When the edge idle resources of the edge operating system that initiates the task processing request reach a first resource threshold and the center idle resources of the cloud center system reach a second resource threshold, a task processing instruction is generated based on the edge idle resources and the center idle resources for the edge operating system that initiates the task processing request and the cloud center system to collaboratively process the target task.
8. The task processing method according to claim 1, characterized in that: The generating of the task processing instruction according to the central idle resources of the cloud center system and the edge idle resources of the edge operating system that initiates the task processing request includes: When the edge idle resources of the edge operating system that initiates the task processing request do not reach the third resource threshold and the central idle resources of the cloud center system reach the fourth resource threshold, a task processing instruction is generated for the cloud center system to process the target task, wherein the fourth resource threshold is greater than the task processing resources.
9. The task processing method according to claim 1, characterized in that: The generating of the task processing instruction according to the central idle resources of the cloud center system and the edge idle resources of the edge operating system that initiates the task processing request includes: When the edge idle resources of the edge operating system that initiates the task processing request do not reach the fifth resource threshold and the center idle resources of the cloud center system do not reach the sixth resource threshold, determine whether other edge operating systems connected to the cloud center system have the task processing resources; In a case where the edge operating system having the task processing resources exists, a task processing instruction is generated for processing the target task by the edge operating system having the task processing resources.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the task processing method according to any one of claims 1 to 9 when executed.
