Cloud side-end collaborative task scheduling method and device and computer equipment
By calculating the processing time of local, edge and cloud servers and determining priority, tasks are flexibly scheduled, which solves the problem that real-time task processing requirements cannot be met in traditional cloud edge-end collaborative scheduling, and achieves the satisfaction of task processing time.
Patent Information
- Application Number
- CN202411073499.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-06
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-08-06
AI Technical Summary
The traditional cloud edge collaborative scheduling algorithm performs task scheduling in a fixed order, which cannot meet the real-time system's requirements for task processing time.
By obtaining the number of local devices and edge servers and the amount of data of tasks to be scheduled, the processing time of local, edge and cloud servers is calculated, and the priority of each server is determined based on these durations, and tasks are flexibly scheduled to meet processing requirements.
It realizes measurement and flexible adjustment of processing priority of local devices, edge servers and cloud servers, meets the requirements of task processing time, and solves the problem that traditional methods cannot meet task requirements.
Smart Images

Figure CN119011681A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of cloud-edge-end collaborative scheduling, and in particular to a method, device and computer equipment for cloud-edge-end collaborative task scheduling. Background Art
[0002] Edge computing refers to providing edge intelligent services at the edge of the network close to the source of objects or data through a distributed open platform that integrates network, computing, storage, and application core capabilities. In a real-time system, there are several real-time processes or tasks that are used to respond to or control certain events, and they often have a certain degree of urgency. Therefore, these real-time processes or tasks put forward certain task processing time requirements for task scheduling in cloud-edge-end collaboration. Traditional cloud-edge-end collaborative scheduling algorithms schedule tasks in a fixed order, which cannot meet the requirements of real-time systems for task scheduling.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] Embodiments of the present invention provide a cloud-edge-end collaborative task scheduling method, apparatus, and computer device to at least solve the technical problem that traditional methods perform task scheduling in a fixed order and thus fail to meet task requirements.
[0005] According to one aspect of an embodiment of the present invention, a task scheduling method for cloud-edge-end collaboration is provided, including: obtaining the number of edge servers of the cloud-edge-end collaborative network where a local device is located and the data volume of a target task to be scheduled; determining, based on the data volume of the target task to be scheduled, the expected local processing time for the target task to be scheduled to be processed on the local device; determining, based on the number of edge servers and the data volume of the target task to be scheduled, the expected edge processing time for the target task to be scheduled to be processed on the edge server; determining, based on the data volume of the target task to be scheduled, the expected cloud processing time for the target task to be scheduled to be processed on the cloud server; determining, based on the local processing time, the edge processing time and the cloud processing time, a first processing priority corresponding to the local device, a second processing priority corresponding to the edge server, and a third processing priority corresponding to the cloud server; scheduling the target task to be scheduled according to the first processing priority, the second processing priority and the third processing priority.
[0006] Optionally, in the case where there are multiple target tasks to be scheduled, the expected local processing time for processing the target tasks to be scheduled on the local device is determined according to the data volume of the target tasks to be scheduled, including: obtaining the number of target tasks to be scheduled; determining the local single task processing time corresponding to any one of the target tasks to be scheduled according to the number of target tasks to be scheduled and the data volume of the target tasks to be scheduled, wherein the local single task processing time is the time required for the corresponding task to be processed on the mobile terminal; and obtaining the local processing time according to the local single task processing time of each target task to be scheduled.
[0007] Optionally, based on the number of edge servers and the data volume of the target tasks to be scheduled, the expected edge processing time for processing the target tasks to be scheduled on the edge servers is determined, including: constructing an edge directed acyclic graph based on the number of target tasks to be scheduled, the number of edge servers and the data volume of the target tasks to be scheduled, wherein the edge directed acyclic graph includes edge request nodes, edge processing nodes, edge response nodes, and directed edges between edge request nodes, edge processing nodes and edge response nodes, as well as directed edges between edge request nodes, directed edges between edge processing nodes and directed edges between edge response nodes; in the edge directed acyclic graph, determining multiple first paths; determining a first critical path among the multiple first paths based on the number of directed edges included in the multiple first paths; determining the edge processing time based on the directed edges included in the first critical path.
[0008] Optionally, based on the data volume of the target tasks to be scheduled, the expected cloud processing time for processing the target tasks to be scheduled on the cloud server is determined, including: constructing a cloud directed acyclic graph based on the number of target tasks to be scheduled and the data volume of the target tasks to be scheduled, wherein the cloud directed acyclic graph includes cloud request nodes, cloud processing nodes, cloud response nodes, and directed edges between cloud request nodes, cloud processing nodes and cloud response nodes, as well as directed edges between cloud request nodes, directed edges between cloud processing nodes and directed edges between cloud response nodes; in the cloud directed acyclic graph, determining multiple second paths; determining a second critical path among the multiple second paths based on the number of directed edges included in the multiple second paths; determining the cloud processing time based on the directed edges included in the second critical path.
[0009] Optionally, based on the local processing time, edge processing time and cloud processing time, a first processing priority corresponding to the local device, a second processing priority corresponding to the edge server, and a third processing priority corresponding to the cloud server are determined, including: sorting the local processing time, edge processing time and cloud processing time to obtain a sorting result; based on the sorting result, determining the first processing priority, the second processing priority, and the third processing priority.
[0010] Optionally, the target task to be scheduled is scheduled according to the first processing priority, the second processing priority and the third processing priority, including: adding local devices, edge servers and cloud servers to an alternative set; adding the target device with the highest corresponding processing priority in the alternative set to a scheduling set, and deleting the target devices in the alternative set; determining whether the devices in the scheduling set meet the requirements of the target task to be scheduled; if the devices in the scheduling set do not meet the requirements of the target task to be scheduled, selecting other devices in the alternative set to join the scheduling set until the devices in the scheduling set meet the requirements of the target task to be scheduled, or when all devices in the alternative set are added to the scheduling set, the target task to be scheduled is scheduled based on the devices in the scheduling set.
[0011] According to another aspect of an embodiment of the present invention, a non-volatile storage medium is also provided, and the non-volatile storage medium includes a stored program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute any one of the above-mentioned cloud-edge-terminal collaborative task scheduling methods.
[0012] According to another aspect of an embodiment of the present invention, a computer device is provided, comprising a processor for running a program, wherein the program executes any one of the above-mentioned cloud-edge-terminal collaborative task scheduling methods when the program is running.
[0013] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program, which, when executed by a processor, implements any one of the above-mentioned cloud-edge-terminal collaborative task scheduling methods.
[0014] In an embodiment of the present invention, the number of edge servers of the cloud-edge-end collaborative network where the local device is located and the data volume of the target task to be scheduled are obtained; based on the data volume of the target task to be scheduled, the expected local processing time for the target task to be scheduled to be processed on the local device is determined; based on the number of edge servers and the data volume of the target task to be scheduled, the expected edge processing time for the target task to be scheduled to be processed on the edge server is determined; based on the data volume of the target task to be scheduled, the expected cloud processing time for the target task to be scheduled to be processed on the cloud server is determined; based on the local processing time, the edge processing time and the cloud processing time, the first processing priority corresponding to the local device, the second processing priority corresponding to the edge server, and the third processing priority corresponding to the cloud server are determined; based on the first processing priority, the second processing priority and the third processing priority, the target task to be scheduled is scheduled, thereby achieving the purpose of measuring the processing priorities of the local device, the edge server and the cloud server, thereby realizing the technical effect of flexibly adjusting the task scheduling in cloud-edge-end collaboration, and further solving the technical problem that the traditional method of scheduling tasks in a fixed order cannot meet the task requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0016] Figure 1 A hardware structure block diagram of a computer terminal for implementing a task scheduling method for cloud-edge-end collaboration is shown;
[0017] Figure 2 It is a flowchart of a task scheduling method for cloud-edge-device collaboration provided according to an embodiment of the present invention;
[0018] Figure 3 is an edge directed acyclic graph provided according to an optional embodiment of the present invention;
[0019] Figure 4 It is a schematic diagram of a task scheduling device for cloud-edge-end collaboration provided according to an optional embodiment of the present invention. DETAILED DESCRIPTION
[0020] 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.
[0021] 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.
[0022] According to an embodiment of the present invention, a method embodiment of cloud-edge-end collaborative task scheduling is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0023] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 The hardware structure block diagram of a computer terminal for implementing a task scheduling method for cloud-edge-end collaboration is shown. Figure 1 As shown, the computer terminal 10 may include one or more (102a, 102b, ..., 102n are used to illustrate) processors (the processor may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0024] It should be noted that the one or more processors and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10. As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0025] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the cloud-edge-end collaborative task scheduling method in the embodiment of the present invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, the cloud-edge-end collaborative task scheduling method of the above-mentioned application is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0026] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 .
[0027] Figure 2 is a flow chart of a task scheduling method for cloud-edge-device collaboration provided according to an embodiment of the present invention. Figure 2 As shown, the method comprises the following steps:
[0028] Step S202, obtain the number of edge servers in the cloud-edge collaborative network where the local device is located and the data volume of the target task to be scheduled.
[0029] In this step, local devices refer to devices that directly interact with users, have certain task processing capabilities, and can perform some basic data processing tasks. They can be smart phones, laptops, etc.; cloud-edge-end collaborative network is a communication network architecture that includes local devices, edge servers, cloud servers and other devices. It closely integrates cloud computing, edge computing and local devices to achieve efficient task processing; scheduling refers to the process of allocating tasks generated by local devices to local devices or edge servers or cloud servers for processing according to the cloud-edge-end collaborative network resources and task requirements; tasks refer to computing requirements or service requirements generated by local devices that need to be processed; data volume refers to the total amount of data required to complete the task.
[0030] Step S204, determining the expected local processing time of the target task to be scheduled for processing on the local device according to the data volume of the target task to be scheduled.
[0031] In this step, the local device has a certain task processing capability, and the target task can be dispatched to the local device to achieve the processing of the target task. Local devices are usually limited by size, battery capacity, etc., and have limited computing resources. Therefore, it is considered that the local device processes the target tasks one by one. When the target task is processed on the local device, the communication duration is usually ignored and only the computing duration is considered.
[0032] Step S206: determining the expected edge processing time of the target task to be scheduled for processing on the edge server according to the number of edge servers and the data volume of the target task to be scheduled.
[0033] In this step, the edge server refers to a type of dedicated server with task processing capabilities that is close to the task source or user. In a cloud-edge collaborative network, the number of edge servers can be one or more. When there are multiple edge servers in a cloud-edge collaborative network, parallel processing of target tasks can be achieved, that is, multiple target tasks can be processed at the same time. The computing resources of edge servers are usually more abundant than those of local devices. When processing tasks with the same amount of data, the computing time of edge servers is usually shorter than that of local devices; since the edge server is a certain distance away from the task source or user, when the target task is processed on the edge server, the communication time cannot be ignored.
[0034] Step S208, determining the expected cloud processing time of the target task to be scheduled for processing on the cloud server according to the data volume of the target task to be scheduled.
[0035] In this step, cloud servers refer to a type of virtual server with task processing capabilities that is far away from the task source or user. Cloud servers can achieve parallel processing of target tasks, that is, they can process multiple target tasks at the same time. Cloud servers have abundant computing resources. When processing tasks with the same amount of data, the computing time of cloud servers is usually much shorter than that of local devices or edge servers. Since cloud servers are far away from task sources or users, their communication time is usually longer than that of edge servers.
[0036] Step S210, determining a first processing priority corresponding to the local device, a second processing priority corresponding to the edge server, and a third processing priority corresponding to the cloud server according to the local processing time, the edge processing time, and the cloud processing time.
[0037] In this step, the first processing priority, the second processing priority, and the third processing priority refer to the preference for scheduling the target task to the local device, the edge server, and the cloud server for processing, respectively, and can be measured in numbers or words. The shorter the processing time of the device, the higher its corresponding priority.
[0038] Step S212, scheduling the target task to be scheduled according to the first processing priority, the second processing priority and the third processing priority.
[0039] In this step, the priorities of scheduling the target tasks to local devices, edge servers, and cloud servers are different, and the target tasks to be scheduled are preferentially scheduled to the devices with higher priorities for processing. If a single type of device cannot meet the timeliness requirements of the task, the target tasks to be scheduled can be scheduled to multiple types of devices for simultaneous processing.
[0040] Through the above steps, the purpose of measuring the processing priorities of local devices, edge servers and cloud servers is achieved, thereby realizing the technical effect of flexibly adjusting task scheduling in cloud-edge-end collaboration, and further solving the technical problem that the traditional method of scheduling tasks in a fixed order cannot meet the task requirements.
[0041] As an optional embodiment, when there are multiple target tasks to be scheduled, the expected local processing time for processing the target tasks to be scheduled on the local device is determined according to the data volume of the target tasks to be scheduled, including: obtaining the number of target tasks to be scheduled; determining the local single task processing time corresponding to any one of the target tasks to be scheduled according to the number of target tasks to be scheduled and the data volume of the target tasks to be scheduled, wherein the local single task processing time is the time required for the corresponding task to be processed on the mobile terminal; and obtaining the local processing time according to the local single task processing time of each target task to be scheduled.
[0042] Optionally, the target task to be scheduled may be one or more, and the number can be determined by the task source. Since the computing resources of the local device are limited, it is impossible to process multiple target tasks in parallel at the same time. Therefore, the local device processes the target tasks one by one. The local single task processing time corresponding to any task in the target task is related to the data volume of this task, and is linearly related. The larger the data volume of this task, the longer the corresponding local single task processing time. The local processing time can be obtained by adding up all the local single task processing times corresponding to the target task.
[0043] As an optional embodiment, the expected edge processing time for processing the target task to be scheduled on the edge server is determined according to the number of edge servers and the data volume of the target task to be scheduled, including: constructing an edge directed acyclic graph according to the number of target tasks to be scheduled, the number of edge servers and the data volume of the target task to be scheduled, wherein the edge directed acyclic graph includes edge request nodes, edge processing nodes, edge response nodes, and directed edges between edge request nodes, edge processing nodes and edge response nodes, as well as directed edges between edge request nodes, directed edges between edge processing nodes and directed edges between edge response nodes; in the edge directed acyclic graph, determining multiple first paths; determining a first critical path among the multiple first paths according to the number of directed edges included in the multiple first paths; determining the edge processing time according to the directed edges included in the first critical path.
[0044] Optionally, a directed acyclic graph is a graphical structure composed of nodes and directed edges, wherein the edge has a direction, from one node to another node, and the acyclic graph does not contain any ring structure. For edge servers, it involves parallel processing of target tasks, and the processing process of any task includes three stages of request-processing-response. The edge directed acyclic graph contains three types of nodes, namely edge request nodes, edge processing nodes, and edge response nodes, which represent the request stage, processing stage, and response stage of target task processing, respectively. The edge directed acyclic graph contains six types of directed edges, namely directed edges between edge request nodes, directed edges between edge processing nodes, directed edges between edge response nodes, directed edges from edge request nodes to edge processing nodes, directed edges from edge request nodes to edge response nodes, and directed edges from edge processing nodes to edge response nodes. Directed edges represent the order of implementation of each stage in the processing of the target task. The first path consists of multiple directed edges that are connected to each other. In the edge directed acyclic graph, there are multiple first paths from edge request nodes to edge response nodes. The first critical path refers to the first path with the largest number of directed edges. Each directed edge has a weight, which represents the processing time required from the source node of this directed edge to the destination node of this directed edge. The edge processing time is obtained by adding the weights of all directed edges in the first critical path.
[0045] Specifically, all target tasks are sent to the edge server first, so as to start computing the target tasks as early as possible. After the target tasks are sent to the edge server, once the computing unit of the edge server is idle, the target tasks are processed immediately. After all target tasks are sent to the edge server, once a target task is processed by the edge server, the response phase is immediately entered.
[0046] As an optional embodiment, determining the expected cloud processing time for processing the target tasks to be scheduled on the cloud server based on the data volume of the target tasks to be scheduled, including: constructing a cloud directed acyclic graph based on the number of target tasks to be scheduled and the data volume of the target tasks to be scheduled, wherein the cloud directed acyclic graph includes cloud request nodes, cloud processing nodes, cloud response nodes, and directed edges between the cloud request nodes, the cloud processing nodes and the cloud response nodes, as well as directed edges between the cloud request nodes, the cloud processing nodes and the cloud response nodes; in the cloud directed acyclic graph, determining multiple second paths; determining a second critical path among the multiple second paths based on the number of directed edges included in the multiple second paths; determining the cloud processing time based on the directed edges included in the second critical path.
[0047] Optionally, for a cloud server, it involves parallel processing of target tasks, and the processing process of any task includes three stages: request-processing-response. The cloud directed acyclic graph contains three types of nodes, namely, cloud request nodes, cloud processing nodes, and cloud response nodes, which represent the request stage, processing stage, and response stage of target task processing, respectively. The cloud directed acyclic graph contains six types of directed edges, namely, directed edges between cloud request nodes, directed edges between cloud processing nodes, directed edges between cloud response nodes, directed edges from cloud request nodes to cloud processing nodes, directed edges from cloud request nodes to cloud response nodes, and directed edges from cloud processing nodes to cloud response nodes. Directed edges represent the order of implementation of each stage in the processing of the target task. The second path consists of multiple directed edges connected to each other. In the cloud directed acyclic graph, there are multiple second paths from the cloud request node to the cloud response node. The second critical path refers to the second path with the largest number of directed edges. Any directed edge has a weight, which represents the processing time required from the source node of this directed edge to the destination node of this directed edge. The cloud processing time is obtained by adding the weights of all directed edges in the second critical path.
[0048] Specifically, all target tasks are sent to the cloud server first, so as to start computing the target tasks as early as possible. After the target tasks are sent to the cloud server, once the computing unit of the cloud server is idle, the target tasks are processed immediately. After all target tasks are sent to the cloud server, once a target task is processed by the cloud server, the response phase is immediately entered.
[0049] As an optional embodiment, a first processing priority corresponding to the local device, a second processing priority corresponding to the edge server, and a third processing priority corresponding to the cloud server are determined according to the local processing time, the edge processing time, and the cloud processing time, including: sorting the local processing time, the edge processing time, and the cloud processing time to obtain a sorting result; and determining the first processing priority, the second processing priority, and the third processing priority according to the sorting result.
[0050] Optionally, the local processing time, edge processing time, and cloud processing time are sorted, and there are six sorting results, including: local processing time < edge processing time < cloud processing time, local processing time < cloud processing time < edge processing time, edge processing time < local processing time < cloud processing time, edge processing time < cloud processing time < local processing time, cloud processing time < edge processing time < local processing time, and cloud processing time < local processing time < edge processing time. The shorter the processing time of a device, the higher its corresponding priority.
[0051] Specifically, if the sorting result is local processing time < edge processing time < cloud processing time, the first processing priority corresponding to the local device can be set to 3, the second processing priority corresponding to the edge server can be set to 2, and the third processing priority corresponding to the cloud server can be set to 1.
[0052] As an optional embodiment, the target task to be scheduled is scheduled according to the first processing priority, the second processing priority and the third processing priority, including: adding local devices, edge servers and cloud servers to an alternative set; adding the target device with the highest corresponding processing priority in the alternative set to a scheduling set, and deleting the target devices in the alternative set; determining whether the devices in the scheduling set meet the requirements of the target task to be scheduled; if the devices in the scheduling set do not meet the requirements of the target task to be scheduled, selecting other devices in the alternative set to join the scheduling set until the devices in the scheduling set meet the requirements of the target task to be scheduled, or when all devices in the alternative set are added to the scheduling set, the target task to be scheduled is scheduled based on the devices in the scheduling set.
[0053] Optionally, the candidate set refers to a set of devices currently selectable for processing the target task. The scheduling set refers to a set of devices selected for processing the target task. Local devices, edge servers, and cloud servers can be selected at the same time for processing the target task. The type of device selected for processing the target task is determined by the priority of the device. The requirement of the target task refers to the requirement of the target task for the processing time.
[0054] Figure 3 is an edge directed acyclic graph provided according to an optional embodiment of the present invention. Figure 3As shown in the figure, the edge directed acyclic graph is a graph structure composed of nodes and directed edges, where the edge has a direction, from one node to another node, and the acyclic graph does not contain any ring structure. The edge directed acyclic graph contains three types of nodes, namely edge request nodes, edge processing nodes, and edge response nodes, which represent the request stage, processing stage, and response stage of target task processing, respectively. The edge directed acyclic graph contains six types of directed edges, namely directed edges between edge request nodes, directed edges between edge processing nodes, directed edges between edge response nodes, directed edges from edge request nodes to edge processing nodes, directed edges from edge request nodes to edge response nodes, and directed edges from edge processing nodes to edge response nodes. Directed edges represent the order of implementation of each stage in target task processing.
[0055] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0056] Through the description of the above implementation methods, those skilled in the art can clearly understand that the task scheduling method for cloud-edge-end collaboration according to the above embodiment can be implemented by means of software plus a 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. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product is stored in a storage medium (such as ROM / RAM, disk, or optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0057] According to an embodiment of the present invention, a cloud-edge-device collaborative task scheduling device for implementing the above-mentioned cloud-edge-device collaborative task scheduling method is also provided. Figure 4 is a structural block diagram of a task scheduling device for cloud-edge-end collaboration provided according to an embodiment of the present invention, such as Figure 4 As shown, the cloud-edge-end collaborative task scheduling device includes: an acquisition module 41, a first processing module 42, a second processing module 43, a third processing module 44, a sorting module 45, and a scheduling module 46. The cloud-edge-end collaborative task scheduling device is described below.
[0058] An acquisition module 41 is used to obtain the number of edge servers in the cloud-edge collaborative network where the local device is located and the data volume of the target task to be scheduled;
[0059] A first processing module 42, connected to the acquisition module 41, is used to determine the expected local processing time of the target task to be scheduled for processing in the local device according to the data volume of the target task to be scheduled;
[0060] The second processing module 43 is connected to the first processing module 42, and is used to determine the expected edge processing time of the target task to be scheduled for processing on the edge server according to the number of edge servers and the data volume of the target task to be scheduled;
[0061] The third processing module 44 is connected to the second processing module 43 and is used to determine the expected cloud processing time of the target task to be scheduled for processing in the cloud server according to the data volume of the target task to be scheduled;
[0062] a sorting module 45, connected to the third processing module 44, for determining a first processing priority corresponding to the local device, a second processing priority corresponding to the edge server, and a third processing priority corresponding to the cloud server according to the local processing duration, the edge processing duration, and the cloud processing duration;
[0063] The scheduling module 46 is connected to the sorting module 45, and is used to schedule the target task to be scheduled according to the first processing priority, the second processing priority and the third processing priority.
[0064] It should be noted that the acquisition module 41, the first processing module 42, the second processing module 43, the third processing module 44, the sorting module 45, and the scheduling module 46 correspond to steps S202 to S212 in the embodiment, and the examples and application scenarios implemented by the multiple modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above embodiment. It should be noted that the above modules, as part of the device, can be run in the computer terminal 10 provided in the embodiment.
[0065] An embodiment of the present invention may provide a computer device. Optionally, in this embodiment, the computer device may be located in at least one network device among multiple network devices of a computer network. The computer device includes a memory and a processor.
[0066] Among them, the memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the cloud-edge-end collaborative task scheduling method and device in the embodiment of the present invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned cloud-edge-end collaborative task scheduling method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0067] The processor can call the information and application programs stored in the memory through the transmission device to execute the following steps: obtain the number of edge servers of the cloud-edge collaborative network where the local device is located, and the data volume of the target task to be scheduled; determine the expected local processing time for the target task to be scheduled to be processed on the local device based on the data volume of the target task to be scheduled; determine the expected edge processing time for the target task to be scheduled to be processed on the edge server based on the number of edge servers and the data volume of the target task to be scheduled; determine the expected cloud processing time for the target task to be scheduled to be processed on the cloud server based on the data volume of the target task to be scheduled; determine the first processing priority corresponding to the local device, the second processing priority corresponding to the edge server, and the third processing priority corresponding to the cloud server based on the local processing time, the edge processing time and the cloud processing time; schedule the target task to be scheduled according to the first processing priority, the second processing priority and the third processing priority.
[0068] Optionally, in the case where there are multiple target tasks to be scheduled, the expected local processing time for processing the target tasks to be scheduled on the local device is determined according to the data volume of the target tasks to be scheduled, including: obtaining the number of target tasks to be scheduled; determining the local single task processing time corresponding to any one of the target tasks to be scheduled according to the number of target tasks to be scheduled and the data volume of the target tasks to be scheduled, wherein the local single task processing time is the time required for the corresponding task to be processed on the mobile terminal; and obtaining the local processing time according to the local single task processing time of each target task to be scheduled.
[0069] Optionally, based on the number of edge servers and the data volume of the target tasks to be scheduled, the expected edge processing time for processing the target tasks to be scheduled on the edge servers is determined, including: constructing an edge directed acyclic graph based on the number of target tasks to be scheduled, the number of edge servers and the data volume of the target tasks to be scheduled, wherein the edge directed acyclic graph includes edge request nodes, edge processing nodes, edge response nodes, and directed edges between edge request nodes, edge processing nodes and edge response nodes, as well as directed edges between edge request nodes, directed edges between edge processing nodes and directed edges between edge response nodes; in the edge directed acyclic graph, determining multiple first paths; determining a first critical path among the multiple first paths based on the number of directed edges included in the multiple first paths; determining the edge processing time based on the directed edges included in the first critical path.
[0070] Optionally, based on the data volume of the target tasks to be scheduled, the expected cloud processing time for processing the target tasks to be scheduled on the cloud server is determined, including: constructing a cloud directed acyclic graph based on the number of target tasks to be scheduled and the data volume of the target tasks to be scheduled, wherein the cloud directed acyclic graph includes cloud request nodes, cloud processing nodes, cloud response nodes, and directed edges between cloud request nodes, cloud processing nodes and cloud response nodes, as well as directed edges between cloud request nodes, directed edges between cloud processing nodes and directed edges between cloud response nodes; in the cloud directed acyclic graph, determining multiple second paths; determining a second critical path among the multiple second paths based on the number of directed edges included in the multiple second paths; determining the cloud processing time based on the directed edges included in the second critical path.
[0071] Optionally, based on the local processing time, edge processing time and cloud processing time, a first processing priority corresponding to the local device, a second processing priority corresponding to the edge server, and a third processing priority corresponding to the cloud server are determined, including: sorting the local processing time, edge processing time and cloud processing time to obtain a sorting result; based on the sorting result, determining the first processing priority, the second processing priority, and the third processing priority.
[0072] Optionally, the target task to be scheduled is scheduled according to the first processing priority, the second processing priority and the third processing priority, including: adding local devices, edge servers and cloud servers to an alternative set; adding the target device with the highest corresponding processing priority in the alternative set to a scheduling set, and deleting the target devices in the alternative set; determining whether the devices in the scheduling set meet the requirements of the target task to be scheduled; if the devices in the scheduling set do not meet the requirements of the target task to be scheduled, selecting other devices in the alternative set to join the scheduling set until the devices in the scheduling set meet the requirements of the target task to be scheduled, or when all devices in the alternative set are added to the scheduling set, the target task to be scheduled is scheduled based on the devices in the scheduling set.
[0073] By adopting the embodiments of the present invention, a solution for task scheduling of cloud-edge-end collaboration is provided, which achieves the purpose of accurately calculating the edge processing time and the cloud processing time, thereby realizing the technical effect of effectively determining the scheduling priority of the cloud-edge-end, and further solves the technical problem that the traditional method of scheduling tasks in a fixed order cannot meet the task requirements.
[0074] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a non-volatile storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0075] The embodiment of the present invention further provides a non-volatile storage medium. Optionally, in this embodiment, the non-volatile storage medium can be used to store the program code executed by the cloud-edge-device collaborative task scheduling method provided in the above embodiment.
[0076] Optionally, in this embodiment, the non-volatile storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.
[0077] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: obtaining the number of edge servers of the cloud-edge collaborative network where the local device is located and the data volume of the target task to be scheduled; determining the expected local processing time for the target task to be scheduled to be processed on the local device based on the data volume of the target task to be scheduled; determining the expected edge processing time for the target task to be scheduled to be processed on the edge server based on the number of edge servers and the data volume of the target task to be scheduled; determining the expected cloud processing time for the target task to be scheduled to be processed on the cloud server based on the data volume of the target task to be scheduled; determining a first processing priority corresponding to the local device, a second processing priority corresponding to the edge server, and a third processing priority corresponding to the cloud server based on the local processing time, the edge processing time and the cloud processing time; scheduling the target task to be scheduled according to the first processing priority, the second processing priority and the third processing priority.
[0078] Optionally, in the case where there are multiple target tasks to be scheduled, the expected local processing time for processing the target tasks to be scheduled on the local device is determined according to the data volume of the target tasks to be scheduled, including: obtaining the number of target tasks to be scheduled; determining the local single task processing time corresponding to any one of the target tasks to be scheduled according to the number of target tasks to be scheduled and the data volume of the target tasks to be scheduled, wherein the local single task processing time is the time required for the corresponding task to be processed on the mobile terminal; and obtaining the local processing time according to the local single task processing time of each target task to be scheduled.
[0079] Optionally, based on the number of edge servers and the data volume of the target tasks to be scheduled, the expected edge processing time for processing the target tasks to be scheduled on the edge servers is determined, including: constructing an edge directed acyclic graph based on the number of target tasks to be scheduled, the number of edge servers and the data volume of the target tasks to be scheduled, wherein the edge directed acyclic graph includes edge request nodes, edge processing nodes, edge response nodes, and directed edges between edge request nodes, edge processing nodes and edge response nodes, as well as directed edges between edge request nodes, directed edges between edge processing nodes and directed edges between edge response nodes; in the edge directed acyclic graph, determining multiple first paths; determining a first critical path among the multiple first paths based on the number of directed edges included in the multiple first paths; determining the edge processing time based on the directed edges included in the first critical path.
[0080] Optionally, based on the data volume of the target tasks to be scheduled, the expected cloud processing time for processing the target tasks to be scheduled on the cloud server is determined, including: constructing a cloud directed acyclic graph based on the number of target tasks to be scheduled and the data volume of the target tasks to be scheduled, wherein the cloud directed acyclic graph includes cloud request nodes, cloud processing nodes, cloud response nodes, and directed edges between cloud request nodes, cloud processing nodes and cloud response nodes, as well as directed edges between cloud request nodes, directed edges between cloud processing nodes and directed edges between cloud response nodes; in the cloud directed acyclic graph, determining multiple second paths; determining a second critical path among the multiple second paths based on the number of directed edges included in the multiple second paths; determining the cloud processing time based on the directed edges included in the second critical path.
[0081] Optionally, based on the local processing time, edge processing time and cloud processing time, a first processing priority corresponding to the local device, a second processing priority corresponding to the edge server, and a third processing priority corresponding to the cloud server are determined, including: sorting the local processing time, edge processing time and cloud processing time to obtain a sorting result; based on the sorting result, determining the first processing priority, the second processing priority, and the third processing priority.
[0082] Optionally, the target task to be scheduled is scheduled according to the first processing priority, the second processing priority and the third processing priority, including: adding local devices, edge servers and cloud servers to an alternative set; adding the target device with the highest corresponding processing priority in the alternative set to a scheduling set, and deleting the target devices in the alternative set; determining whether the devices in the scheduling set meet the requirements of the target task to be scheduled; if the devices in the scheduling set do not meet the requirements of the target task to be scheduled, selecting other devices in the alternative set to join the scheduling set until the devices in the scheduling set meet the requirements of the target task to be scheduled, or when all devices in the alternative set are added to the scheduling set, the target task to be scheduled is scheduled based on the devices in the scheduling set.
[0083] An embodiment of the present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the task scheduling method for cloud-edge-end collaboration in each embodiment of the present application.
[0084] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0085] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0086] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0087] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0088] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0089] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0090] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A cloud-edge-device collaborative task scheduling method, characterized in that: include: Obtain the number of edge servers in the cloud-edge collaborative network where the local device is located and the data volume of the target task to be scheduled; Determining, according to the data volume of the target task to be scheduled, the expected local processing time of the target task to be scheduled for processing on the local device; Determining an expected edge processing time for processing the target task to be scheduled on the edge server according to the number of edge servers and the data volume of the target task to be scheduled; Determine the expected cloud processing time of the target task to be scheduled for processing on the cloud server according to the data volume of the target task to be scheduled; Determine, according to the local processing duration, the edge processing duration, and the cloud processing duration, a first processing priority corresponding to the local device, a second processing priority corresponding to the edge server, and a third processing priority corresponding to the cloud server; The target task to be scheduled is scheduled according to the first processing priority, the second processing priority and the third processing priority.
2. The method according to claim 1, characterized in that In the case that the target task to be scheduled includes multiple ones, determining the expected local processing time of the target task to be scheduled for processing in the local device according to the data volume of the target task to be scheduled includes: Obtaining the number of target tasks to be scheduled; Determine the local single task processing duration corresponding to any one of the target tasks to be scheduled according to the number of the target tasks to be scheduled and the data volume of the target tasks to be scheduled, wherein the local single task processing duration is the time required for the corresponding task to be processed on the mobile terminal; The local processing duration is obtained according to the local single-task processing duration of each of the target tasks to be scheduled.
3. The method according to claim 1, characterized in that: The determining, according to the number of edge servers and the data volume of the target task to be scheduled, an expected edge processing time for processing the target task to be scheduled on the edge server includes: According to the number of the target tasks to be scheduled, the number of edge servers and the data volume of the target tasks to be scheduled, an edge directed acyclic graph is constructed, wherein the edge directed acyclic graph includes edge request nodes, edge processing nodes, edge response nodes, and directed edges between the edge request nodes, the edge processing nodes and the edge response nodes, and directed edges between the edge request nodes, the edge processing nodes and the edge response nodes; In the edge directed acyclic graph, determining a plurality of first paths; Determining a first critical path among the plurality of first paths according to the number of directed edges included in the plurality of first paths; The edge processing duration is determined according to the directed edges included in the first critical path.
4. The method according to claim 1, characterized in that The determining, according to the data volume of the target task to be scheduled, the expected cloud processing time of the target task to be scheduled on the cloud server includes: According to the number of the target tasks to be scheduled and the data volume of the target tasks to be scheduled, a cloud directed acyclic graph is constructed, wherein the cloud directed acyclic graph includes a cloud request node, a cloud processing node, a cloud response node, and directed edges between the cloud request node, the cloud processing node and the cloud response node, as well as directed edges between the cloud request nodes, directed edges between the cloud processing nodes and directed edges between the cloud response nodes; In the cloud directed acyclic graph, determining a plurality of second paths; determining a second critical path among the plurality of second paths according to the number of directed edges included in the plurality of second paths; The cloud processing duration is determined according to the directed edges included in the second critical path.
5. The method according to claim 1, characterized in that The determining, according to the local processing duration, the edge processing duration, and the cloud processing duration, a first processing priority corresponding to the local device, a second processing priority corresponding to the edge server, and a third processing priority corresponding to the cloud server, comprises: Sorting the local processing time, the edge processing time, and the cloud processing time to obtain a sorting result; According to the sorting result, the first processing priority, the second processing priority, and the third processing priority are determined.
6. The method according to claim 1, characterized in that The scheduling of the target task to be scheduled according to the first processing priority, the second processing priority, and the third processing priority includes: Adding the local device, the edge server, and the cloud server to a candidate set; Adding the target device with the highest corresponding processing priority in the candidate set to a scheduling set, and deleting the target device in the candidate set; Determine whether the devices in the scheduling set meet the requirements of the target task to be scheduled; If the devices in the scheduling set do not meet the requirements of the target task to be scheduled, other devices are selected from the alternative set to join the scheduling set until the devices in the scheduling set meet the requirements of the target task to be scheduled, or if all devices in the alternative set are added to the scheduling set, the target task to be scheduled is scheduled based on the devices in the scheduling set.
7. A cloud-edge-device collaborative task scheduling device, characterized in that: include: An acquisition module is used to obtain the number of edge servers in the cloud-edge collaborative network where the local device is located and the data volume of the target task to be scheduled; A first processing module, used to determine the expected local processing time of the target task to be scheduled for processing on the local device according to the data volume of the target task to be scheduled; A second processing module is used to determine the expected edge processing time of the target task to be scheduled for processing on the edge server according to the number of edge servers and the data volume of the target task to be scheduled; A third processing module is used to determine the expected cloud processing time of the target task to be scheduled for processing on the cloud server according to the data volume of the target task to be scheduled; a sorting module, configured to determine a first processing priority corresponding to the local device, a second processing priority corresponding to the edge server, and a third processing priority corresponding to the cloud server according to the local processing time, the edge processing time, and the cloud processing time; A scheduling module is used to schedule the target task to be scheduled according to the first processing priority, the second processing priority and the third processing priority.
8. A non-volatile storage medium, characterized in that: The non-volatile storage medium includes a stored program, wherein, when the program is running, the device where the non-volatile storage medium is located is controlled to execute the cloud-edge-end collaborative task scheduling method described in any one of claims 1 to 6.
9. A computer device, characterized in that: include: Memory and processor, The memory stores a computer program; The processor is used to execute the computer program stored in the memory, and when the computer program is running, the processor executes the cloud-edge-end collaborative task scheduling method described in any one of claims 1 to 6.
10. A computer program product comprising computer instructions, characterized in that: The computer instructions are executed by the processor to implement the cloud-edge-terminal collaborative task scheduling method described in any one of claims 1 to 6.
Citation Information
Patent Citations
Service system and data processing method
CN110300191A
Rail transit video monitoring method and system based on cloud-side cooperation
CN111343436A
Heuristic task scheduling method and system for cloud side end cooperative computing
CN113590324A
Internet of Things cross-domain subtask combination cooperative computing method and system
CN113821318A
Task scheduling method, electronic equipment and storage medium
CN115033355A
