Task scheduling method and device based on edge computing, electronic equipment and medium
By dynamically allocating tasks according to the computing power of the equipment in the edge computing system, the problem of overload operation of edge devices is solved, system performance and stability are improved, and edge computing efficiency is improved.
Patent Information
- Application Number
- CN202411554603.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-01
- Publication Date
- 2025-02-28
AI Technical Summary
Edge devices are prone to overload operation when processing tasks, affecting the normal use of users, and the prior art is difficult to effectively schedule tasks, resulting in a decline in overall performance and stability.
Through the task scheduling method based on edge computing, the central node and edge devices are determined according to the computing power of the device, and the tasks are dynamically allocated to the appropriate edge devices according to the minimum computing power requirements of the task to avoid overload operation.
It realizes reasonable allocation of tasks and equipment, avoids overload operation, improves the overall performance and stability of edge computing systems, and maximizes the efficiency of edge computing.
Smart Images

Figure CN119536937A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, in particular to the field of edge computing technology, and specifically to a task scheduling method, device, electronic device, computer-readable storage medium, and computer program product based on edge computing. Background Art
[0002] Artificial intelligence is a discipline that studies how to use computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.). It includes both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing. Artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, as well as machine learning / deep learning, big data processing technology, knowledge graph technology, and other major directions.
[0003] With the rapid development of artificial intelligence (AI) technology, the widespread demand for AI applications has promoted the upgrading of smart devices and Internet of Things (IoT) technology. Smart manufacturing, smart home, autonomous driving and other fields have embedded AI models into application systems to achieve more complex tasks and more efficient data processing. In artificial intelligence applications, the combination of edge computing and AI algorithms provides the possibility for local reasoning and data preprocessing of complex models. For example, by running pre-trained deep learning models on edge devices, environmental information can be recognized and processed in real time on smart cameras, drones, and autonomous driving systems without relying on computing resources on cloud servers. The introduction of edge computing technology has effectively expanded the scenarios of AI applications, met the real-time and low-latency requirements, and improved the flexibility and stability of intelligent systems.
[0004] The methods described in this section are not necessarily methods that have been previously conceived or employed. Unless otherwise indicated, it should not be assumed that any method described in this section is considered to be prior art simply because it is included in this section. Similarly, unless otherwise indicated, the issues mentioned in this section should not be considered to have been recognized in any prior art. Summary of the invention
[0005] The present disclosure provides a task scheduling method, device, electronic device, computer-readable storage medium and computer program product based on edge computing.
[0006] According to one aspect of the present disclosure, a task scheduling method based on edge computing is provided, the method comprising: determining a central node and an edge device among a plurality of devices based on the computing power of each device among the plurality of devices; obtaining the minimum computing power requirement required for each of a plurality of pre-calibrated tasks; in response to receiving a task to be scheduled, determining the minimum computing power requirement of the task to be scheduled based on the minimum computing power requirement required for each task; and allocating the task to be scheduled to a target device among the edge devices using the central node based on the computing power of the edge device and the minimum computing power requirement of the task to be scheduled.
[0007] According to another aspect of the present disclosure, a task scheduling device based on edge computing is provided, including: a first determination module, configured to determine a central node and an edge device among a plurality of devices based on the computing power of each device among the plurality of devices; a first acquisition module, configured to obtain the minimum computing power requirement required for each of a plurality of pre-calibrated tasks; a second determination module, configured to determine the minimum computing power requirement of the task to be scheduled based on the minimum computing power requirement required for each task in response to receiving the task to be scheduled; and an allocation module, configured to allocate the task to be scheduled to a target device among the edge devices using the central node based on the computing power of the edge device and the minimum computing power requirement of the task to be scheduled.
[0008] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above method.
[0009] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the above method.
[0010] According to another aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein the computer program implements the above method when executed by a processor.
[0011] According to one or more embodiments of the present disclosure, a task scheduling method based on edge computing is provided, which realizes the reasonable allocation of tasks and devices according to the difference in tasks and device computing power, avoids overload operation, and improves the overall performance and stability of the edge computing system. Under the premise of ensuring the normal use of equipment, the efficiency of edge computing is maximized.
[0012] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The accompanying drawings exemplarily illustrate the embodiments and constitute a part of the specification, and together with the text description of the specification, are used to explain the exemplary implementation of the embodiments. The embodiments shown are for illustrative purposes only and do not limit the scope of the claims. In all drawings, the same reference numerals refer to similar but not necessarily identical elements.
[0014] Figure 1 is a schematic diagram illustrating an example system in which the various methods described herein may be implemented according to an exemplary embodiment.
[0015] Figure 2 A flowchart of a task scheduling method based on edge computing according to an embodiment of the present disclosure is shown;
[0016] Figure 3 A flow chart of determining the computing power of each device in a plurality of devices according to an embodiment of the present disclosure is shown;
[0017] Figure 4 A schematic diagram of a task scheduling method based on edge computing according to an embodiment of the present disclosure is shown;
[0018] Figure 5 A structural block diagram of a task scheduling device based on edge computing according to an embodiment of the present disclosure is shown; and
[0019] Figure 6 A structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0020] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0021] In the present disclosure, unless otherwise specified, the use of the terms "first", "second", etc. to describe various elements is not intended to limit the positional relationship, temporal relationship, or importance relationship of these elements, and such terms are only used to distinguish one element from another element. In some examples, the first element and the second element may refer to the same instance of the element, and in some cases, based on the description of the context, they may also refer to different instances.
[0022] The terms used in the description of various examples in this disclosure are only for the purpose of describing specific examples and are not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the element can be one or more. In addition, the term "and / or" used in this disclosure covers any one of the listed items and all possible combinations.
[0023] In related technologies, edge tasks consume a large amount of resources, which can easily cause edge devices to overload and affect users' normal use of edge devices.
[0024] To solve the above problems, the present invention provides a task scheduling method based on edge computing, which realizes the reasonable allocation of tasks and devices according to the differences in tasks and device computing power, avoids overload operation, and improves the overall performance and stability of the edge computing system. Under the premise of ensuring the normal use of equipment, the efficiency of edge computing is maximized.
[0025] In the technical solution disclosed herein, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0026] The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
[0027] Figure 1 FIG. 1 is a schematic diagram of an exemplary system 100 in which various methods and apparatuses described herein may be implemented according to an embodiment of the present disclosure. Figure 1 , the system 100 includes one or more client devices 101, 102, 103, 104, 105, and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. The client devices 101, 102, 103, 104, 105, and 106 may be configured to execute one or more applications.
[0028] In an embodiment of the present disclosure, the server 120 may run one or more services or software applications that enable execution of an edge computing-based task scheduling method.
[0029] In some embodiments, server 120 may also provide other services or software applications that may include non-virtualized environments and virtualized environments. In some embodiments, these services may be provided as web-based services or cloud services, such as provided to users of client devices 101, 102, 103, 104, 105, and / or 106 under a software as a service (SaaS) model.
[0030] exist Figure 1 In the configuration shown, the server 120 may include one or more components that implement the functions performed by the server 120. These components may include software components, hardware components, or a combination thereof that can be executed by one or more processors. Users operating client devices 101, 102, 103, 104, 105, and / or 106 may in turn utilize one or more client applications to interact with the server 120 to utilize the services provided by these components. It should be understood that a variety of different system configurations are possible, which may differ from the system 100. Therefore, Figure 1 is an example of a system for implementing the methods described herein and is not intended to be limiting.
[0031] The user may use client devices 101, 102, 103, 104, 105 and / or 106 to perform the edge computing-based task scheduling method. The client device may provide an interface that enables the user of the client device to interact with the client device. The client device may also output information to the user via the interface. Figure 1 Only six client devices are depicted, but one skilled in the art will appreciate that the present disclosure may support any number of client devices.
[0032] Client devices 101, 102, 103, 104, 105 and / or 106 may include various types of computer devices, such as portable handheld devices, general-purpose computers (such as personal computers and laptop computers), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, game systems, thin clients, various messaging devices, sensors or other sensing devices, etc. These computer devices may run various types and versions of software applications and operating systems, such as MICROSOFT Windows, APPLE iOS, UNIX-like operating systems, Linux or Linux-like operating systems (such as GOOGLE Chrome OS); or include various mobile operating systems, such as MICROSOFT Windows Mobile OS, iOS, Windows Phone, Android. Portable handheld devices may include cellular phones, smart phones, tablet computers, personal digital assistants (PDAs), etc. Wearable devices may include head-mounted displays (such as smart glasses) and other devices. Game systems may include various handheld game devices, Internet-enabled game devices, etc. Client devices are capable of executing various different applications, such as various Internet-related applications, communication applications (such as email applications), short message service (SMS) applications, and may use various communication protocols.
[0033] The network 110 may be any type of network known to those skilled in the art that may support data communications using any of a variety of available protocols, including but not limited to TCP / IP, SNA, IPX, etc. By way of example only, the one or more networks 110 may be a local area network (LAN), an Ethernet-based network, a token ring, a wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a public switched telephone network (PSTN), an infrared network, a wireless network (e.g., Bluetooth, WIFI), and / or any combination of these and / or other networks.
[0034] Server 120 may include one or more general purpose computers, dedicated server computers (e.g., PC (personal computer) servers, UNIX servers, mid-range servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and / or combination. Server 120 may include one or more virtual machines running virtual operating systems, or other computing architectures involving virtualization (e.g., one or more flexible pools of logical storage devices that may be virtualized to maintain a server's virtual storage device). In various embodiments, server 120 may run one or more services or software applications that provide the functionality described below.
[0035] The computing units in the server 120 may run one or more operating systems including any of the above operating systems and any commercially available server operating systems. The server 120 may also run any of a variety of additional server applications and / or middle-tier applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, etc.
[0036] In some implementations, server 120 may include one or more applications to analyze and consolidate data feeds and / or event updates received from users of client devices 101, 102, 103, 104, 105, and 106. Server 120 may also include one or more applications to display data feeds and / or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and 106.
[0037] In some embodiments, the server 120 may be a server of a distributed system, or a server combined with a blockchain. The server 120 may also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. A cloud server is a host product in a cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and virtual private servers (VPS) services.
[0038] The system 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data and other information. For example, one or more of the databases 130 may be used to store information such as audio files and video files. The databases 130 may reside in various locations. For example, the database used by the server 120 may be local to the server 120, or may be remote from the server 120 and may communicate with the server 120 via a network-based or dedicated connection. The databases 130 may be of different types. In some embodiments, the databases used by the server 120 may be, for example, relational databases. One or more of these databases may store, update, and retrieve data to and from the databases in response to commands.
[0039] In some embodiments, one or more of the databases 130 may also be used by applications to store application data. The databases used by the applications may be different types of databases, such as a key-value store, an object store, or a conventional store backed by a file system.
[0040] Figure 1 The system 100 may be configured and operated in various ways to enable the application of various methods and apparatuses described in the present disclosure.
[0041] Figure 2 A flowchart of a task scheduling method based on edge computing according to an embodiment of the present disclosure is shown.
[0042] like Figure 2 As shown, the task scheduling method 200 based on edge computing includes:
[0043] Step S201: determining a central node and an edge device among the multiple devices based on the computing power of each device among the multiple devices;
[0044] Step S202, obtaining the minimum computing power requirement required for each of the pre-calibrated multiple tasks;
[0045] Step S203: In response to receiving the task to be scheduled, determining the minimum computing power requirement of the task to be scheduled based on the minimum computing power requirement required by each task;
[0046] Step S204: Based on the computing power of the edge device and the minimum computing power requirement of the task to be scheduled, the central node is used to allocate the task to be scheduled to the target device in the edge device.
[0047] Exemplarily, the central node in step S201 refers to the central task management node, which is responsible for decomposing complex computing tasks (such as artificial intelligence computing tasks) into several subtasks, and distributing these subtasks to various edge devices, for example, through technologies such as NFC. The central node usually has strong computing power and processing power, and therefore plays a core role in task scheduling and resource management. Edge devices are other computing devices other than the central node. These devices have their own computing power, and are mainly responsible for executing specific tasks assigned by the central node, and completing corresponding computing operations according to the requirements of the task. In some examples, the edge device can be an NFC-enabled electronic device such as a smart phone, tablet computer, IoT device, etc., which has certain computing power and can execute tasks assigned by the central node.
[0048] Method 200 determines the central node and edge devices based on the computing power of multiple devices. When receiving a task, the minimum computing power required for the task is determined, and the central node allocates the task to the appropriate target device based on the computing power and task requirements of each edge device. Therefore, method 200 can achieve reasonable allocation of tasks and devices according to the different computing power of tasks and devices, avoid overload operation, and improve the overall performance and stability of edge computing. Under the premise of ensuring the normal use of the equipment, the efficiency of edge computing is maximized.
[0049] According to some embodiments, step S201 includes: based on the computing power of each device, the device with the highest computing power among the multiple devices is used as the central node, and the devices among the multiple devices except the central node are used as the edge devices.
[0050] The device with the highest computing power is selected as the central node, which is responsible for task scheduling and resource management, and the remaining devices are used as edge nodes to participate in computing tasks. During the task allocation process, the central node dynamically adjusts the task allocation based on the computing power, idle coefficient of the device, and the computing power requirements of the task.
[0051] The setting of the central node simplifies the task scheduling process and makes task allocation more efficient. By centrally managing resources and tasks, resources can be used more effectively, which helps reduce resource waste and task delays.
[0052] According to some embodiments, the computing power of each device among a plurality of devices is pre-calibrated by the following operations: for each device among the plurality of devices, using the device to execute a preset task multiple times; and for each device among the plurality of devices, determining a benchmark number of operators and an execution time for the device to execute the preset task each time, so as to determine the computing power of the device based on the benchmark number of operators and the execution time.
[0053] It can be understood that the number of benchmark operators refers to the number of times a certain basic computing operation (operator) is performed in a specific computing task. This physical quantity is usually used to describe the complexity of the computing task. Execution time refers to the time required to complete the execution of a task, usually in seconds. Computing power refers to the ability or efficiency of executing benchmark operators per unit time, usually in operators / second or FLOPS (floating-point operations per second), which is used to measure the ability or efficiency of edge devices to execute benchmark operators.
[0054] For example, an experimental calibration method can be used to perform preset tasks on each device multiple times, record the execution time and the number of benchmark operators each time, and thus calculate the computing power of each device. In some examples, the experimental data obtained can be stored in the cloud through offline calibration for reference in subsequent task scheduling.
[0055] Exemplarily, a representative benchmark operator or computing task may be selected as the preset task, such as matrix multiplication or convolution operation.
[0056] Therefore, by executing preset tasks multiple times to calibrate the computing power of the equipment, we can ensure that accurate computing power values are obtained, providing data support for the reasonable allocation of tasks. This can dynamically reflect the computing power level of each device, thereby avoiding improper task allocation due to computing power assessment errors, and help the equipment maintain stable operation.
[0057] According to some embodiments, for each of the multiple devices, determining a benchmark number of operators and an execution time for the device to execute the preset task each time, so as to determine the computing power of the device based on the benchmark number of operators and the execution time includes: for each of the multiple devices, determining a benchmark number of operators and an execution time for the device to execute the preset task each time; and determining the computing power of the device based on a ratio of an average benchmark number of operators for the device to execute the preset task to an average execution time.
[0058] The computing power of each device can be calculated by the following formula:
[0059] The computing power of the device = average number of benchmark operators / average execution time
[0060] The computing power of the device is determined by the average value of the benchmark operator number and execution time, thereby avoiding errors caused by abnormal execution of individual tasks, further improving the accuracy of computing power calibration, and allowing the device resources to be allocated and utilized more reasonably.
[0061] According to some embodiments, for each of the multiple devices, using the device to perform the preset task multiple times includes: for each of the multiple devices, using the device to perform the preset task under multiple temperature conditions, wherein determining a benchmark operator number and execution time for the device to perform the preset task each time, and determining the computing power of the device based on the benchmark operator number and the execution time includes: determining a benchmark operator number and execution time for the device to perform the preset task under each of the multiple temperature conditions; and determining the computing power of the device under each temperature condition based on the benchmark operator number and the execution time for the device to perform the preset task.
[0062] Figure 3 FIG. 4 is a flowchart of determining the computing power of each device in a plurality of devices according to an embodiment of the present disclosure. Figure 3 As shown, the operation 300 of determining the computing power of each device in the plurality of devices includes:
[0063] Step S301: for each of the multiple devices, use the device to perform the preset task under multiple temperature conditions;
[0064] Step S302, determining the reference operator number and execution time for the device to execute the preset task under each of the multiple temperature conditions; and
[0065] Step S303: Determine the computing power of the device under each temperature condition based on the benchmark operator number and the execution time of the device executing the preset task under each temperature condition.
[0066] Exemplarily, the multiple temperature conditions may include room temperature (25°C), high temperature (35°C), and extreme temperature (45°C). The computing power of the device is calibrated under different temperature conditions, and the impact of temperature on computing power is analyzed by the execution of the benchmark operator under different temperature environments. The calibration results are stored in the cloud database and updated regularly to ensure the applicability of method 200 in practical applications.
[0067] Taking temperature factors into consideration makes the computing power data of edge devices in different environments more authentic and practical. This not only enhances the ability to adapt to the environment, but also effectively extends the service life of the equipment by preventing the equipment from over-operating in extreme temperatures.
[0068] According to some embodiments, the minimum computing power requirement required for each of the multiple tasks is pre-calibrated by the following operations: for each of the multiple tasks, running the task on devices with different computing powers; and determining the minimum computing power requirement required for the task based on the running results of the task on devices with different computing powers.
[0069] By running multiple tasks on devices with different computing power, the minimum computing power requirement of each task is calibrated, and the data of the minimum computing power requirement is stored in the cloud database for reference when scheduling tasks. This information is synchronized and updated between different edge devices to adapt to the real-time changes in computing power.
[0070] This ensures that the tasks can meet the minimum computing power requirements when they are assigned to each edge device, thereby avoiding the inability to execute the tasks or abnormalities due to insufficient resources. By rationalizing the computing power requirements of the tasks, the adaptability and resource utilization of the method 200 under different task requirements are improved.
[0071] According to some embodiments, step S204 includes: determining the current available computing power of the edge device based on the computing power of the edge device and the idle coefficient of the edge device; and using the central node to allocate the task to be scheduled to the target device in the edge device based on the current available computing power of the edge device and the minimum computing power requirement of the task to be scheduled.
[0072] For example, the idle coefficient of the device can be calculated based on the CPU utilization and memory utilization of the device. The current available computing power of the edge device can then be calculated using the following formula:
[0073] The current available computing power of the edge device = the idle coefficient of the edge device * the computing power of the edge device
[0074] According to the computing power and idle coefficient of the edge device, the current available computing power of each device is calculated and used for task allocation. Method 200 monitors the operating status of the device in real time, and ensures that the task is reasonably allocated to the target device with sufficient computing power through dynamic update of the cloud database and scheduling of the central node.
[0075] By introducing the calculation of the idle coefficient and real-time computing power, the problem of the device taking on overloaded tasks due to insufficient computing power is effectively avoided, ensuring the long-term stable operation of the edge device. At the same time, it ensures that the device is used to perform edge tasks without affecting user use. In addition, by calculating the available computing power, method 200 can make full use of resources and avoid waste of computing power and bottlenecks in task execution.
[0076] According to some embodiments, the task to be scheduled includes priority information, and wherein, based on the current available computing power of the edge device and the minimum computing power requirement of the task to be scheduled, the task to be scheduled is allocated to the target device in the edge device using the central node, including: based on the current available computing power of the edge device, the minimum computing power requirement of the task to be scheduled and the priority information, the task to be scheduled is allocated to the target device in the edge device using the central node.
[0077] Priority information is set for different tasks, and scheduling is performed based on the available computing power of the device and the minimum computing power requirements of the task to ensure that high-priority tasks are processed first. The task scheduling strategy is dynamically adjusted according to the priority and device load to ensure that high-priority tasks are not interfered with.
[0078] Priority management enables important tasks to be processed in a timely manner, ensuring good responsiveness when dealing with high-load tasks, making method 200 more flexible in resource allocation, and improving response efficiency and user experience.
[0079] According to some embodiments, when a task is first received, the computing power of each device among multiple devices is checked, and the device currently being used by the user is excluded, so as to select the unused device with the highest computing power as the central node to manage and schedule tasks. In addition, before the edge device completes the task and waits to receive a new task, it is first determined whether the current central node needs to be updated. When the computing power of the current central node is lower than that of the device to be scheduled, the device with higher computing power can be automatically selected as the new task central node, and the task data and system environment on the old central node can be synchronized to the new central node to ensure the continuity of the task and the consistency of the data.
[0080] According to some embodiments, after receiving a new task requirement, the task scheduler of the central node will determine the allocation strategy based on the nature of the task and the computing power requirement. The task scheduler will reasonably allocate the task to the most suitable edge device based on the priority and estimated execution time of the task to ensure timely processing of the task.
[0081] Specifically, according to the computing power requirements of each task, compared with the computing power of the current device, an edge device that meets the requirements is selected to perform the task. In order to avoid wasting resources, devices with moderate computing power will be given priority to perform tasks, and tasks with high resource requirements will not be assigned to devices with insufficient computing power. In the task allocation process, tasks are preferentially assigned to edge devices that are currently idle and have sufficient computing power to maximize the utilization of system resources. When assigning tasks, the load status of the device will be detected in real time to ensure that the device performs the task without being overloaded. In addition, the scheduling strategy takes into account the availability and priority of the device to select the optimal edge device to perform the task, thereby improving the overall response efficiency.
[0082] Figure 4 A schematic diagram of a task scheduling method based on edge computing according to an embodiment of the present disclosure is shown, and the task scheduling method based on edge computing is used in an edge computing system.
[0083] like Figure 4 As shown, in step 1, multiple devices log in to the system in turn as candidate devices for edge computing. In step 2, the computing power of each of the multiple devices is obtained. It can be understood that the computing power of each device can be calibrated and stored through operation 300, so that in step 3, devices that meet the preset computing power requirements can be selected from multiple devices for networking according to the computing power of each device.
[0084] In step 4, a central node and an edge device are determined based on the computing power of each device in the multiple devices. Exemplarily, the device with the highest computing power among the multiple devices is used as the central node, and the devices other than the central node among the multiple devices are used as edge devices. In response to receiving the task to be scheduled in step 5, in step 6, the central node performs task scheduling based on the computing power of the edge device and the minimum computing power requirement of the task to be scheduled, so that the task to be scheduled can be divided into multiple subtasks and assigned to multiple target devices in the edge device for parallel execution.
[0085] In step 7, the target device in the edge device executes the corresponding subtask according to the task scheduling of the central node. At the same time, in step 8, the execution of the subtask and the load of each device are monitored, so that in step 9, a new and more suitable edge device can be reselected to execute the subtask according to the load during the execution of the task.
[0086] In steps 10-11, when a task is completed or before scheduling a new task, the system evaluates whether the computing power of the current task center node is optimal. If it is found that the computing power of other edge devices is higher than the current center node, the system determines whether the center node needs to be updated. After all subtasks are executed, the system summarizes the final results of the task on the user's operating device for the user to view or perform subsequent processing.
[0087] As a result, the function of dynamically selecting and updating central nodes in the edge computing network is realized, ensuring that tasks are always executed on the device with the best computing power, while avoiding the performance of a single device being affected by excessive load. This task scheduling and load management solution can significantly improve the efficiency of edge computing and the utilization of device resources.
[0088] According to some embodiments, method 200 further includes: monitoring the computing status and load of each edge device in real time. If the edge task cannot be executed on a device that meets the computing power, the cloud is reported and the task computing power information is updated. In addition, the task allocation strategy can be dynamically adjusted based on the monitoring results to ensure that the computing resources of each device are fully utilized and to avoid overloading or idleness of some devices.
[0089] According to some embodiments, in the process of real-time monitoring of the computing status and load conditions of each edge device, the current available computing power of the edge device can be recalculated at preset intervals and the stored data can be updated based on the recalculated results.
[0090] According to another aspect of the present disclosure, a task scheduling device based on edge computing is provided. Figure 5 As shown, the task scheduling device 500 based on edge computing includes: a first determination module 501, configured to determine the central node and edge device among the multiple devices based on the computing power of each device; a first acquisition module 502, configured to obtain the minimum computing power requirement required for each of the multiple pre-calibrated tasks; a second determination module 503, configured to determine the minimum computing power requirement of the task to be scheduled based on the minimum computing power requirement required for each task in response to receiving the task to be scheduled; and an allocation module 504, configured to allocate the task to be scheduled to the target device among the edge devices using the central node based on the computing power of the edge device and the minimum computing power requirement of the task to be scheduled.
[0091] The task scheduling device 500 based on edge computing determines the central node and edge devices according to the computing power of multiple devices. When receiving a task, the minimum computing power required for the task is determined, and the central node allocates the task to the appropriate target device based on the computing power and task requirements of each edge device. Therefore, the task scheduling device 500 based on edge computing can achieve reasonable allocation of tasks and devices according to the different computing power of tasks and devices, avoid overload operation, and improve the overall performance and stability of the device 500. Under the premise of ensuring the normal use of the equipment, the efficiency of edge computing is maximized.
[0092] According to some embodiments, the first determination module 501 is further configured to: based on the computing power of each device, use the device with the highest computing power among the multiple devices as the central node, and use the devices among the multiple devices except the central node as the edge devices.
[0093] The device with the highest computing power is selected as the central node, which is responsible for task scheduling and resource management, and the remaining devices are used as edge nodes to participate in computing tasks. During the task allocation process, the central node dynamically adjusts the task allocation based on the computing power of the device and the computing power requirements of the task.
[0094] The setting of the central node simplifies the task scheduling process and makes task allocation more efficient. By centrally managing resources and tasks, resources can be used more effectively, which helps reduce resource waste and task delays.
[0095] According to some embodiments, the computing power of each of the multiple devices is pre-calibrated using a first calibration module, and wherein the first calibration module includes: a first execution unit, configured to, for each of the multiple devices, use the device to perform a preset task multiple times; and a first determination unit, configured to determine, for each of the multiple devices, a benchmark operator number and an execution time for each device to perform the preset task each time, so as to determine the computing power of the device based on the benchmark operator number and the execution time.
[0096] For example, an experimental calibration method can be used to perform preset tasks on each device multiple times, record the execution time and the number of benchmark operators each time, and thus calculate the computing power of each device. In some examples, the experimental data obtained can be stored in the cloud through offline calibration for reference in subsequent task scheduling.
[0097] Exemplarily, a representative benchmark operator or computing task may be selected as the preset task, such as matrix multiplication or convolution operation.
[0098] Therefore, by executing preset tasks multiple times to calibrate the computing power of the equipment, we can ensure that accurate computing power values are obtained, providing data support for the reasonable allocation of tasks. This can dynamically reflect the computing power level of each device, thereby avoiding improper task allocation due to computing power assessment errors, and help the equipment maintain stable operation.
[0099] According to some embodiments, the first determination unit is further configured to: determine, for each device among the multiple devices, a benchmark number of operators and an execution time for the device to execute the preset task each time; and determine the computing power of the device based on a ratio of an average benchmark number of operators for the device to execute the preset task to an average execution time.
[0100] The computing power of each device can be calculated by the following formula:
[0101] The computing power of the device = average number of benchmark operators / average execution time
[0102] The computing power of the device is determined by the average value of the benchmark operator number and execution time, thereby avoiding errors caused by abnormal execution of individual tasks, further improving the accuracy of computing power calibration, and allowing the device resources to be allocated and utilized more reasonably.
[0103] According to some embodiments, the first execution unit is further configured to: for each device among the multiple devices, use the device to perform the preset task under multiple temperature conditions, wherein the first determination unit includes: a first determination subunit, configured to determine a benchmark operator number and execution time for the device to perform the preset task under each temperature condition among the multiple temperature conditions; and a second determination subunit, configured to determine the computing power of the device under the temperature condition based on the benchmark operator number and the execution time for the device to perform the preset task under each temperature condition.
[0104] Taking temperature factors into consideration makes the computing power data of edge devices in different environments more authentic and practical. This not only enhances the ability to adapt to the environment, but also effectively extends the service life of the equipment by preventing the equipment from over-operating in extreme temperatures.
[0105] According to some embodiments, the minimum computing power requirement required for each of the multiple tasks is pre-calibrated using a second calibration module, and wherein the second calibration module includes: a second execution unit, configured to execute each of the multiple tasks on devices with different computing powers; and a second determination unit, configured to determine the minimum computing power requirement required for the task based on the execution results of the task on devices with different computing powers.
[0106] The second calibration module runs multiple tasks on devices with different computing power, calibrates the minimum computing power requirement of each task, and stores the minimum computing power requirement data in the cloud database for reference when scheduling tasks. This information is synchronized and updated between different edge devices to adapt to real-time changes in computing power.
[0107] This ensures that the tasks can meet the minimum computing power requirements when they are assigned to each edge device, thereby avoiding the inability to execute the tasks or abnormalities due to insufficient resources. By rationalizing the computing power requirements of the tasks, the adaptability and resource utilization of the device 500 under different task requirements are improved.
[0108] According to some embodiments, the allocation module 504 includes: a third determination unit, configured to determine the current available computing power of the edge device based on the computing power of the edge device and the idle coefficient of the edge device; an allocation unit, configured to allocate the task to be scheduled to the target device in the edge device using the central node based on the current available computing power of the edge device and the minimum computing power requirement of the task to be scheduled.
[0109] For example, the idle coefficient of the device can be calculated based on the CPU utilization and memory utilization of the device. The current available computing power of the edge device can then be calculated using the following formula:
[0110] The current available computing power of the edge device = the idle coefficient of the edge device * the computing power of the edge device
[0111] According to the computing power and idle coefficient of the edge device, the current available computing power of each device is calculated and used for task allocation. The device 500 monitors the operating status of the device in real time, and ensures that the task is reasonably allocated to the target device with sufficient computing power through dynamic updates of the cloud database and scheduling of the central node.
[0112] By introducing the calculation of the idle coefficient and real-time computing power, the problem of the device taking on overloaded tasks due to insufficient computing power is effectively avoided, ensuring the long-term stable operation of the edge device. At the same time, it is ensured that the device is used to perform edge tasks without affecting user use. In addition, by calculating the available computing power, the device 500 can make full use of resources and avoid waste of computing power and bottlenecks in task execution.
[0113] According to some embodiments, the task to be scheduled includes priority information, and wherein the allocation unit is further configured to: based on the currently available computing power of the edge device, the minimum computing power requirement of the task to be scheduled and the priority information, use the central node to allocate the task to be scheduled to the target device in the edge device.
[0114] Priority information is set for different tasks, and scheduling is performed based on the available computing power of the device and the minimum computing power requirements of the task to ensure that high-priority tasks are processed first. The task scheduling strategy is dynamically adjusted according to the priority and device load to ensure that high-priority tasks are not interfered with.
[0115] Priority management enables important tasks to be processed in a timely manner, ensuring good responsiveness when dealing with high-load tasks, making device 500 more flexible in resource allocation, and improving response efficiency and user experience.
[0116] According to another aspect of the present disclosure, an electronic device is also provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the aforementioned method.
[0117] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is further provided, wherein the computer instructions are used to enable the computer to execute the aforementioned method.
[0118] According to another aspect of the present disclosure, a computer program product is also provided, including a computer program, wherein the computer program implements the aforementioned method when executed by a processor.
[0119] like Figure 6 As shown, the electronic device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 can also be stored. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0120] Multiple components in the electronic device 600 are connected to the I / O interface 605, including: an input unit 606, an output unit 607, a storage unit 608 and a communication unit 609. The input unit 606 can be any type of device that can input information to the electronic device 600. The input unit 606 can receive input digital or character information, and generate key signal input related to user settings and / or function control of the electronic device, and can include but is not limited to a mouse, a keyboard, a touch screen, a trackpad, a trackball, a joystick, a microphone and / or a remote control. The output unit 607 can be any type of device that can present information, and can include but is not limited to a display, a speaker, a video / audio output terminal, a vibrator and / or a printer. The storage unit 608 can include but is not limited to a disk, an optical disk. The communication unit 609 allows the electronic device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and can include but is not limited to a modem, a network card, an infrared communication device, a wireless communication transceiver and / or a chipset, such as Bluetooth TM devices, 802.11 devices, WiFi devices, WiMax devices, cellular communication devices, and / or the like.
[0121] The computing unit 601 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 601 performs the various methods and processes described above, such as a task scheduling method based on edge computing. For example, in some embodiments, the task scheduling method based on edge computing may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by the computing unit 601, one or more steps of the task scheduling method based on edge computing described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform a task scheduling method based on edge computing in any other appropriate manner (e.g., by means of firmware).
[0122] 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), complex 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.
[0123] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code 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.
[0124] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. 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.
[0125] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0126] The systems and techniques described herein may be implemented in a computing system that includes back-end 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 front-end 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 back-end components, middleware components, or front-end 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), and the Internet.
[0127] A computer 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 relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0128] 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 this disclosure can be performed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0129] Although the embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it should be understood that the above-mentioned methods, systems and devices are merely exemplary embodiments or examples, and the scope of the present invention is not limited by these embodiments or examples, but only by the claims after authorization and their equivalent scope. Various elements in the embodiments or examples can be omitted or replaced by their equivalent elements. In addition, each step can be performed in an order different from that described in the present disclosure. Further, the various elements in the embodiments or examples can be combined in various ways. It is important that with the evolution of technology, many elements described herein can be replaced by equivalent elements that appear after the present disclosure.
Claims
1. A task scheduling method based on edge computing, comprising: Determine a central node and an edge device among the multiple devices based on the computing power of each device among the multiple devices; Obtain the minimum computing power required for each of multiple pre-calibrated tasks; In response to receiving a task to be scheduled, determining a minimum computing power requirement of the task to be scheduled based on a minimum computing power requirement required by each task; as well as Based on the computing power of the edge device and the minimum computing power requirement of the task to be scheduled, the task to be scheduled is allocated to the target device in the edge device using the central node.
2. The method according to claim 1, wherein: The computing power of each of the plurality of devices is pre-calibrated by the following operations: For each device among the multiple devices, using the device to perform a preset task multiple times; as well as For each device among the multiple devices, a base number of operators and an execution time for the device to execute the preset task each time are determined, so as to determine the computing power of the device based on the base number of operators and the execution time.
3. The method according to claim 2, wherein: The step of determining, for each device among the plurality of devices, a benchmark operator number and an execution time for the device to execute the preset task each time, so as to determine the computing power of the device based on the benchmark operator number and the execution time includes: For each device in the plurality of devices, Determining the number of benchmark operators and execution time for the device to execute the preset task each time; and The computing power of the device is determined based on the ratio of the average number of benchmark operators to the average execution time of the device executing the preset task.
4. The method according to claim 2 or 3, wherein: The using each device among the multiple devices to perform the preset task multiple times includes: For each of the plurality of devices, using the device to perform the preset task under a plurality of temperature conditions, Wherein, determining the benchmark operator number and execution time of the device executing the preset task each time, so as to determine the computing power of the device based on the benchmark operator number and the execution time includes: determining a base number of operators and an execution time for the device to execute the preset task under each of the plurality of temperature conditions; and Based on the benchmark number of operators and the execution time of the device executing the preset task under each temperature condition, the computing power of the device under the temperature condition is determined.
5. The method according to any one of claims 1 to 4, wherein: The determining, based on the computing power of each device, a central node and an edge device among the multiple devices comprises: Based on the computing power of each device, the device with the highest computing power among the multiple devices is used as the central node, and the devices among the multiple devices except the central node are used as the edge devices.
6. The method according to any one of claims 1 to 5, wherein: The minimum computing power requirement for each of the multiple tasks is pre-calibrated by the following operations: For each of the multiple tasks, run the task on devices with different computing powers; and Based on the running results of the task on devices with different computing powers, determine the minimum computing power requirement for the task.
7. The method according to any one of claims 1 to 6, wherein: The allocating the task to be scheduled to the target device in the edge device by using the central node based on the computing power of the edge device and the minimum computing power requirement of the task to be scheduled includes: Determine the current available computing power of the edge device based on the computing power of the edge device and the idle coefficient of the edge device; Based on the currently available computing power of the edge device and the minimum computing power requirement of the task to be scheduled, the task to be scheduled is allocated to the target device in the edge device using the central node.
8. The method according to claim 7, wherein: The task to be scheduled includes priority information, and wherein, based on the currently available computing power of the edge device and the minimum computing power requirement of the task to be scheduled, allocating the task to be scheduled to the target device in the edge device using the central node includes: Based on the currently available computing power of the edge device, the minimum computing power requirement of the task to be scheduled, and the priority information, the task to be scheduled is allocated to the target device in the edge device using the central node.
9. A task scheduling device based on edge computing, comprising: A first determination module is configured to determine a central node and an edge device among the multiple devices based on the computing power of each device among the multiple devices; A first acquisition module is configured to acquire the minimum computing power requirement required for each of a plurality of pre-calibrated tasks; A second determination module is configured to determine the minimum computing power requirement of the task to be scheduled based on the minimum computing power requirement required by each task in response to receiving the task to be scheduled; as well as The allocation module is configured to allocate the task to be scheduled to the target device in the edge device using the central node based on the computing power of the edge device and the minimum computing power requirement of the task to be scheduled.
10. The method according to claim 9, wherein: The computing power of each of the plurality of devices is pre-calibrated using a first calibration module, and wherein the first calibration module comprises: A first execution unit is configured to execute a preset task multiple times using each device among the multiple devices; and The first determination unit is configured to determine, for each device among the multiple devices, a benchmark operator number and an execution time for the device to execute the preset task each time, so as to determine the computing power of the device based on the benchmark operator number and the execution time.
11. The device according to claim 10, wherein: The first determining unit is further configured to: For each device in the plurality of devices, Determining the number of benchmark operators and execution time for the device to execute the preset task each time; and The computing power of the device is determined based on the ratio of the average number of benchmark operators to the average execution time of the device executing the preset task.
12. The device according to claim 10 or 11, wherein: The first execution unit is further configured to: For each of the plurality of devices, using the device to perform the preset task under a plurality of temperature conditions, Wherein, the first determining unit includes: A first determining subunit is configured to determine a reference operator number and an execution time for the device to execute the preset task under each of the plurality of temperature conditions; and The second determination subunit is configured to determine the computing power of the device under each temperature condition based on the benchmark operator number and the execution time of the device executing the preset task under the temperature condition.
13. The device according to any one of claims 9 to 12, wherein: The first determining module is further configured to: Based on the computing power of each device, the device with the highest computing power among the multiple devices is used as the central node, and the devices among the multiple devices except the central node are used as the edge devices.
14. The device according to any one of claims 9 to 13, wherein: The minimum computing power requirement required for each of the plurality of tasks is pre-calibrated using a second calibration module, and wherein the second calibration module comprises: A second execution unit is configured to execute each of the multiple tasks on devices with different computing powers; and The second determining unit is configured to determine the minimum computing power requirement required for the task based on the execution results of the task on devices with different computing powers.
15. The device according to any one of claims 9 to 14, wherein: The allocation module comprises: A third determining unit is configured to determine a current available computing power of the edge device based on the computing power of the edge device and the idle coefficient of the edge device; The allocation unit is configured to allocate the task to be scheduled to the target device in the edge device using the central node based on the current available computing power of the edge device and the minimum computing power requirement of the task to be scheduled.
16. The device according to claim 15, wherein: The task to be scheduled includes priority information, and wherein the allocation unit is further configured to: Based on the currently available computing power of the edge device, the minimum computing power requirement of the task to be scheduled, and the priority information, the task to be scheduled is allocated to the target device in the edge device using the central node.
17. An electronic device comprising: at least one processor; as well as a memory communicatively coupled to the at least one processor; in The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 8.
18. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-8.
19. A computer program product comprising a computer program, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.