Task allocation method and device, electronic equipment and storage medium

By introducing an edge computing layer into the cloud-edge computing network and combining it with the Fireworks algorithm to optimize task allocation, the problems of long latency, high energy consumption, and poor data security in traditional cloud computing architectures are solved, achieving efficient and secure task allocation and resource utilization.

CN119966997BActive Publication Date: 2025-11-21CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202412000427.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-11-21
Estimated Expiration
2044-12-31

AI Technical Summary

Technical Problem

Traditional single-center cloud computing architecture suffers from problems such as extended processing time, high energy consumption, network congestion, and poor data security when facing distributed computing scenarios, resulting in low accuracy of task allocation and high operating costs.

Method used

By introducing an edge computing layer into the cloud-edge computing network, combining the Fireworks algorithm to optimize task allocation, and comprehensively considering processing latency and energy consumption, the task allocation strategy is dynamically adjusted. This allows edge computing nodes to process real-time tasks, reducing cloud computing pressure and improving data security.

Benefits of technology

It reduced the overall cost of task processing, improved the accuracy of task allocation and resource utilization efficiency, reduced network latency and energy consumption, enhanced data security, and optimized system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119966997B_ABST
    Figure CN119966997B_ABST
Patent Text Reader

Abstract

The application discloses a task allocation method and device, electronic equipment and a computer readable storage medium. The method comprises the following steps: obtaining a plurality of to-be-allocated tasks, and determining a processing delay when the plurality of to-be-allocated tasks are executed through a task processing network based on the plurality of to-be-allocated tasks; determining a total energy consumption when the plurality of to-be-allocated tasks are executed through the task processing network based on the plurality of to-be-allocated tasks; performing task allocation on the plurality of to-be-allocated tasks based on the total energy consumption and the processing delay, and obtaining a task group corresponding to each task processing network; the number of to-be-allocated tasks in the task group is at least zero, and the task processing network executes the task processing for the to-be-allocated tasks according to the task group, and the overall task cost determined by the total energy consumption and the processing delay is minimum.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a task allocation method, apparatus, electronic device, and storage medium. Background Technology

[0002] The Internet of Things (IoT) is a development trend of the information age. With a large number of different devices connecting to cloud computing networks, the demand for processing massive amounts of data brings new challenges to core computing modules. Traditional single-center cloud computing architectures are insufficient when facing new distributed computing scenarios. For some large-scale distributed computing networks, uploading all data to the central processor in the cloud will take a lot of time, and considering network congestion, this will ultimately result in significant processing latency.

[0003] In related technologies, task allocation usually only considers the transmission latency of the task, which leads to low accuracy in task allocation and high task operation costs. Summary of the Invention

[0004] To address the technical problems existing in related technologies, embodiments of this application provide a task allocation method, apparatus, electronic device, and computer-readable storage medium.

[0005] To achieve the above objectives, the technical solution of this application embodiment is implemented as follows:

[0006] In a first aspect, embodiments of this application provide a task allocation method applied to a task allocation node in a cloud-edge computing network, wherein the cloud-edge computing network includes multiple task processing networks and the task allocation node, and the method includes:

[0007] Obtain multiple tasks to be assigned, and based on the multiple tasks to be assigned, determine the processing latency when executing the multiple tasks to be assigned through the task processing network;

[0008] Based on the multiple tasks to be assigned, determine the total energy consumption when executing the multiple tasks to be assigned through the task processing network;

[0009] Based on the total energy consumption and the processing latency, the multiple tasks to be assigned are allocated to obtain task groups corresponding to each task processing network.

[0010] The number of tasks to be assigned in the task group is at least zero. When the task processing network performs task processing for the tasks to be assigned according to the task group, the overall task cost determined by the total energy consumption and the processing delay is minimized.

[0011] Secondly, embodiments of this application provide a task allocation device applied to a task allocation node in a cloud-edge computing network, wherein the cloud-edge computing network includes multiple task processing networks and the task allocation node, comprising:

[0012] An acquisition module is used to acquire multiple tasks to be assigned, and based on the multiple tasks to be assigned, determine the processing latency when executing the multiple tasks to be assigned through the task processing network;

[0013] The energy consumption module is used to determine the total energy consumption when executing the multiple tasks to be assigned through the task processing network, based on the multiple tasks to be assigned.

[0014] The task allocation module is used to allocate tasks to the plurality of tasks to be allocated based on the total energy consumption and the processing latency, so as to obtain task groups corresponding to each task processing network; the number of tasks to be allocated in the task group is at least zero, and when the task processing network performs task processing for the tasks to be allocated according to the task group, the overall task cost determined by the total energy consumption and the processing latency is minimized.

[0015] Thirdly, embodiments of this application provide an electronic device, including: a processor and a first memory for storing a computer program capable of running on the processor;

[0016] When the processor runs the computer program, it executes the steps of the task allocation method on the electronic device side as described in the embodiments of this application.

[0017] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the task allocation method provided in embodiments of this application.

[0018] The task allocation method, apparatus, electronic device, and computer-readable storage medium provided in this application determine the processing latency of executing multiple tasks through a task processing network based on multiple tasks to be allocated, determine the total energy consumption of executing multiple tasks through the task processing network based on multiple tasks to be allocated, and allocate tasks based on the total energy consumption and processing latency to obtain task groups corresponding to each task processing network. Thus, by recording the processing results of each task, network performance can be monitored and adjusted and optimized according to actual results. By comprehensively considering total energy consumption and processing latency, task allocation can minimize the overall task cost, and tasks are allocated to networks that can complete them at the lowest cost (including energy consumption and processing time). This helps reduce operating costs and improve resource utilization efficiency. By comprehensively considering total energy consumption and processing latency, the efficiency and reliability of task processing can be effectively improved, thereby effectively improving the accuracy of task allocation and effectively reducing task operating costs. Attached Figure Description

[0019] Figure 1 A flowchart illustrating the task allocation method in an embodiment of this application. Figure 1 ;

[0020] Figure 2 A flowchart illustrating the task allocation method in an embodiment of this application. Figure 2 ;

[0021] Figure 3 A schematic diagram of the task allocation method in this application embodiment. Figure 1 ;

[0022] Figure 4 A schematic diagram of the task allocation method in this application embodiment. Figure 2 ;

[0023] Figure 5 A schematic diagram of the task allocation method in this application embodiment. Figure 3 ;

[0024] Figure 6 This is a schematic diagram illustrating the trend of the number of evaluations provided in the embodiments of this application;

[0025] Figure 7 This is a schematic diagram of the task allocation method provided in the embodiments of this application. Figure 4 ;

[0026] Figure 8 This is a schematic diagram of the composition structure of the task allocation device according to an embodiment of this application;

[0027] Figure 9 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of this application. Detailed Implementation

[0028] The present application will now be described in further detail with reference to the accompanying drawings and embodiments.

[0029] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.

[0030] The Internet of Things (IoT) is a development trend of the information age. With a large number of different devices connecting to cloud computing networks, the demand for processing massive amounts of data brings new challenges to core computing modules. Traditional single-center cloud computing architectures are insufficient when facing new distributed computing scenarios. For some large-scale distributed computing networks, uploading all data to the central processor in the cloud will take a long time, and considering network congestion, this will ultimately result in significant processing latency.

[0031] For data with high real-time requirements, such as real-time monitoring data, such latency will severely impact the overall system performance. Furthermore, for certain sensitive business data, the traditional cloud-based control architecture, which requires centralized uploading to the cloud, carries a high risk of data leakage and theft. It also fails to adequately meet privacy and information security requirements.

[0032] Disadvantages of existing technology:

[0033] Because cloud computing servers are far from terminal devices, data transmission latency and communication resource consumption are significant. When a large number of terminal devices access the central cloud computing server, the cloud server becomes overloaded, the overall anti-interference capability of the cloud computing network is poor, and the network failure rate is high. As a high-energy-consuming industry, cloud computing requires extensive computation at terminal nodes, edge computing networks, and the cloud computing layer, consuming substantial amounts of electricity. This proposal modifies the existing architecture by introducing small photovoltaic-storage power stations at the edge to participate in power supply, achieving the goals of reducing energy consumption, saving energy and reducing emissions, and lowering costs. Existing algorithms, when solving related problems, often fail to achieve satisfactory results due to the inherently constrained optimization scheduling problem. Swarm intelligence algorithms are prone to getting trapped in local optima and experiencing slow convergence. This proposal combines the powerful Fireworks algorithm from swarm intelligence algorithms for optimization, resulting in a faster and more accurate solution for cloud-edge computing resource scheduling problems. The cloud-edge computing network consists of a cloud computing layer and an edge computing layer. Cloud computing servers are generally composed of high-performance computer terminals with powerful data processing and storage capabilities. The collected data is centralized at the cloud computing layer, where data processing and mining are used to make decisions. The edge computing layer utilizes a fog computing network formed by connections between computing nodes to plan and divide tasks for processing while prioritizing load balancing with minimal processing time. Devices at the terminal device layer transmit information and data wirelessly or via wired connections, connecting to the sensing network.

[0034] In practical applications, when terminal devices upload real-time data, for data requiring real-time processing, the system utilizes the computing power of the computing nodes at the edge computing layer to process this data. This not only reduces the computational burden on cloud servers but also avoids time delays caused by network congestion and transmission to distant cloud environments. Furthermore, performing computation on sensitive data at the edge prevents network attacks and information leaks during transmission, thus improving data security.

[0035] Based on this, embodiments of this application provide a task allocation method, which is applied to electronic devices. Figure 1 A flowchart illustrating the task allocation method in an embodiment of this application. Figure 1 This is applied to task allocation nodes in a cloud-edge computing network, which includes multiple task processing networks and the task allocation nodes, such as... Figure 1 As shown, the task allocation method provided in this application embodiment can be used... Figure 1 Steps 101 to 103 shown are implemented.

[0036] In step 101, multiple tasks to be assigned are obtained, and based on the multiple tasks to be assigned, the processing latency when executing the multiple tasks to be assigned through the task processing network is determined.

[0037] In some embodiments, the task processing network includes an edge task processing network, a cloud task processing network, and a terminal task processing network.

[0038] In some embodiments, retrieving multiple tasks to be assigned and determining the processing latency of these tasks during execution is a complex optimization problem. Processing latency depends on various factors, including task characteristics, network conditions, and the distribution of computing resources. The task allocation system first needs to retrieve multiple tasks to be assigned from the task queue. These tasks may have different priorities, resource requirements, execution times, and other characteristics. Network edge nodes, located close to the data source, handle tasks with high real-time and low-latency requirements. Server clusters located in the central data center handle computationally intensive and high-bandwidth tasks. User devices, such as smartphones or IoT devices, are typically used to handle lightweight, latency-insensitive tasks.

[0039] As an example, see Figure 3 , Figure 3 This is a schematic diagram of the task allocation method provided in the embodiments of this application. Figure 1 , Figure 3 The task processing network shown includes an edge task processing network (edge ​​computing node layer), a cloud task processing network (cloud computing layer), and a terminal task processing network (terminal device layer).

[0040] In some embodiments, determining the processing latency when executing the plurality of tasks to be assigned through the task processing network based on the plurality of tasks to be assigned can be achieved in the following manner: determining a first processing latency when executing the plurality of tasks to be assigned through the edge task processing network based on the plurality of tasks to be assigned; determining a second processing latency when executing the plurality of tasks to be assigned through the cloud task processing network based on the plurality of tasks to be assigned; determining a third processing latency when executing the plurality of tasks to be assigned through the terminal task processing network based on the plurality of tasks to be assigned; and weighting and summing the first processing latency, the second processing latency, and the third processing latency according to the first weight variables corresponding to the edge task processing network, the cloud task processing network, and the terminal task processing network respectively to obtain the processing latency.

[0041] In some embodiments, determining and weighting the processing latency of multiple tasks to be assigned across different task processing networks is a complex process that comprehensively considers network characteristics, task requirements, and resource allocation. This includes the estimated processing latency when executing multiple tasks through an edge task processing network. Edge networks are typically located near the data source, have low latency, and are suitable for handling tasks with high real-time requirements. The estimated processing latency when executing multiple tasks through a cloud task processing network is also included. Cloud networks have powerful computing and storage capabilities, making them suitable for handling computationally intensive tasks, but may result in higher latency due to network transmission distance and bandwidth limitations. Finally, the estimated processing latency when executing multiple tasks through a terminal task processing network is also included. Terminal networks are typically located on user devices, have limited processing capabilities, but can handle some lightweight tasks, and may have lower latency. Each task processing network has a corresponding weight variable, which reflects the relative importance of each network in task processing. The determination of the weight variable can be based on factors such as network performance, task requirements, and cost-effectiveness. Based on the weight variables of each task processing network, the first, second, and third processing delays are weighted and summed. The total processing delay obtained by this weighted sum can be used as an indicator to evaluate the efficiency of different task processing networks. The task allocation strategy can be optimized based on the total processing delay, such as adjusting the weight variables or reallocating tasks to different networks.

[0042] As an example, consider a processing scenario with three tasks, processed through three different networks: edge, cloud, and terminal. The weighted total processing latency is calculated. First processing latency (edge ​​network): Assume three tasks A, B, and C, with processing latencies of 10ms, 20ms, and 15ms respectively via the edge network. Second processing latency (cloud network): Similarly, tasks A, B, and C have processing latencies of 50ms, 60ms, and 55ms respectively via the cloud network. Third processing latency (terminal network): Tasks A, B, and C have processing latencies of 5ms, 10ms, and 7ms respectively via the terminal network. Assume the weight variables set for the edge, cloud, and terminal networks are (w_1 = 0.4), (w_2 = 0.3), and (w_3 = 0.3), respectively. This means the edge network's processing latency accounts for 40% of the total processing latency, while the cloud network and terminal network each account for 30%. The aforementioned weighted variables can be used to calculate the weighted total processing latency, which is 73.1 ms. This value reflects the relative importance of different networks in processing latency. Developers can use this total processing latency to evaluate and optimize task allocation strategies.

[0043] Thus, by analyzing the execution latency of multiple tasks to be assigned across edge, cloud, and terminal task processing networks, and then performing a weighted summation according to their respective weight variables, precise control over task processing latency can be effectively achieved. Task allocation can be dynamically adjusted based on different network characteristics, task requirements, and environmental conditions, thereby optimizing the overall system performance. Through weighted summation, the relative importance of each network can be comprehensively considered, ensuring that task processing latency matches network performance and task requirements, improving resource utilization and task execution efficiency. Furthermore, this method can be dynamically adjusted based on real-time network conditions and task execution status to adapt to constantly changing environments and needs, thus providing a more flexible and scalable system design.

[0044] In some embodiments, determining a first processing latency when executing the plurality of tasks to be assigned through the edge task processing network based on the plurality of tasks to be assigned can be achieved as follows: determining a first task processing latency of the edge task processing network based on the task volume of the plurality of tasks to be assigned and the task execution performance of the edge task processing network; determining a first task transmission latency of the edge task processing network based on the task volume of the plurality of tasks to be assigned and the task transmission speed between the edge task processing network and the terminal task processing network; and adding the first task processing latency of the edge task processing network and the first task transmission latency of the edge task processing network to obtain the first processing latency.

[0045] In some embodiments, determining the total processing latency of a task on an edge task processing network requires considering two main factors: task processing latency and task transmission latency. Based on the workload of multiple tasks to be assigned, the task execution performance of the edge task processing network needs to be analyzed. This includes the processing capacity of network nodes, the current workload, and the computational complexity of the tasks. The processing latency of each task can be estimated by analyzing the network's processing capacity. In a distributed system, tasks need to be transmitted over the network. Task transmission latency depends on network bandwidth, transmission distance, network congestion, etc. The task transmission speed between the edge task processing network and the terminal task processing network needs to be considered to determine the transmission latency of the task from the terminal to the edge network. The first processing latency is the total processing latency of the task on the edge network, which is equal to the sum of the task processing latency and the task transmission latency. By adding these two latencies, the total processing time of the task on the edge network is obtained. Influencing factors include task processing performance, the computing power of the edge network, the current workload, and the computational complexity of the task, all of which affect processing latency. Network bandwidth: higher bandwidth generally results in lower transmission latency. Transmission distance: shorter transmission distances result in lower signal propagation latency. Network congestion can lead to increased transmission latency.

[0046] As an example, assume there are three tasks A, B, and C to be assigned to an edge task processing network, and the execution performance and task transmission speed of the edge network are known. The first processing latency will be calculated using the following steps: Task Processing Latency: Assume the edge network's computing power is 100 task units per second. Task A needs to process 10 task units, Task B needs to process 20 task units, and Task C needs to process 30 task units. Processing latency of Task A = 10 task units / 100 task units / second = 0.1 seconds = 100ms. Processing latency of Task B = 20 task units / 100 task units / second = 0.2 seconds = 200ms. Processing latency of Task C = 30 task units / 100 task units / second = 0.3 seconds = 300ms. Task Transmission Latency: Assume the transmission speed between the edge network and the terminal network is 200MB of data per second. The data size of Task A is 2MB, the data size of Task B is 4MB, and the data size of Task C is 6MB. Transmission latency of Task A = 2MB / 200MB / s = 0.01s = 10ms. Transmission latency of Task B = 4MB / 200MB / s = 0.02s = 20ms. Transmission latency of Task C = 6MB / 200MB / s = 0.03s = 30ms. Total processing latency: Total processing latency of Task A = Processing latency of Task A + Transmission latency of Task A = 100ms + 10ms = 110ms. Total processing latency of Task B = Processing latency of Task B + Transmission latency of Task B = 200ms + 20ms = 220ms. Total processing latency of Task C = Processing latency of Task C + Transmission latency of Task C = 300ms + 30ms = 330ms.

[0047] Thus, by analyzing the workload of multiple tasks to be assigned, the task execution performance of the edge task processing network, and the task transmission speed, the first task processing latency and the first task transmission latency of the edge task processing network can be accurately determined. This analysis helps optimize task allocation strategies, ensuring that tasks can be executed and transmitted efficiently. By adding the processing latency and transmission latency, the first processing latency on the edge network is obtained, providing a key performance indicator. This helps identify and address potential performance bottlenecks, thereby improving the efficiency and response speed of the entire system. Simultaneously, it also helps to better understand the execution status of different tasks on the network, providing data support for task allocation and resource optimization, ensuring that the edge task processing network can provide high-quality services, meet user needs, and improve user experience.

[0048] In some embodiments, determining the second processing latency when executing the plurality of tasks to be assigned through the cloud task processing network based on the plurality of tasks to be assigned can be achieved as follows: determining the second task processing latency of the cloud task processing network based on the task volume of the plurality of tasks to be assigned and the task execution performance of the cloud task processing network; determining the second task transmission latency of the cloud task processing network based on the task volume of the plurality of tasks to be assigned and the task transmission speed between the cloud task processing network and the terminal task processing network; and adding the second task processing latency of the cloud task processing network and the second task transmission latency of the cloud task processing network to obtain the second processing latency.

[0049] In some embodiments, in a distributed computing environment, to determine the second task processing latency and the second task transmission latency of the cloud task processing network, and to obtain the second processing latency by weighted summation, it is necessary to analyze the task execution performance of the cloud task processing network based on the workload of multiple tasks to be assigned. This includes the processing capacity of the cloud server cluster, the current workload, the computational complexity of the tasks, etc. The processing latency of each task can be estimated by analyzing the computing resources of the cloud network. In a distributed system, tasks need to be transmitted over the network. The task transmission latency depends on network bandwidth, transmission distance, network congestion, etc. The task transmission speed between the cloud task processing network and the terminal task processing network needs to be considered to determine the transmission latency of the task from the terminal to the cloud network. The second processing latency is the total processing latency of the task on the cloud task processing network, which is equal to the sum of the task processing latency and the task transmission latency. By adding these two latencies, the total processing time of the task on the cloud network is obtained.

[0050] As an example, assume there are three tasks A, B, and C to be assigned to the cloud task processing network, and the execution performance and task transmission speed of the cloud network are known. The second processing latency will be calculated using the following steps: Task Processing Latency: Assume the cloud network's computing power is 1000 task units per second. Task A needs to process 50 task units, Task B needs to process 150 task units, and Task C needs to process 250 task units. Processing latency of Task A = 50 task units / 1000 task units / second = 0.05 seconds = 50ms. Processing latency of Task B = 150 task units / 1000 task units / second = 0.15 seconds = 150ms. Processing latency of Task C = 250 task units / 1000 task units / second = 0.25 seconds = 250ms. Task Transmission Latency: Assume the transmission speed between the cloud network and the terminal network is 500MB of data per second. Task A has 5MB of data, Task B has 15MB of data, and Task C has 25MB of data. The transmission latency of Task A = 5MB / 500MB / second = 0.01 seconds = 10ms. The transmission latency of Task B = 15MB / 500MB / second = 0.03 seconds = 30ms. The transmission latency of Task C = 25MB / 500MB / second = 0.05 seconds = 50ms. The total processing latency: Total processing latency of Task A = Processing latency of Task A + Transmission latency of Task A = 50ms + 10ms = 60ms. Total processing latency of Task B = Processing latency of Task B + Transmission latency of Task B = 150ms + 30ms = 180ms. Total processing latency of Task C = Processing latency of Task C + Transmission latency of Task C = 250ms + 50ms = 300ms. In this example, the processing latency and transmission latency of each task on the cloud network were calculated separately, and then they were added together to obtain the total processing latency of each task.

[0051] Therefore, by analyzing the workload of multiple tasks to be assigned, the task execution performance of the cloud task processing network, and the task transmission speed, the second task processing latency and the second task transmission latency of the cloud task processing network can be accurately determined. This analysis helps optimize task allocation strategies, ensuring that tasks can be executed and transmitted efficiently. By adding the processing latency and transmission latency, the second processing latency on the cloud network is obtained, providing a key performance indicator. This helps identify and address potential performance bottlenecks, thereby improving the efficiency and responsiveness of the entire system. Simultaneously, it helps to better understand the execution status of different tasks on the network, providing data support for task allocation and resource optimization. This ensures that the cloud task processing network can provide high-quality services, meet user needs, and improve user experience.

[0052] In some embodiments, determining a third processing latency when executing the plurality of tasks to be assigned through the terminal task processing network based on the plurality of tasks to be assigned can be achieved in the following manner: determining the third processing latency when executing the plurality of tasks to be assigned through the terminal task processing network based on the task volume of the plurality of tasks to be assigned and the task execution performance of the terminal task processing network.

[0053] In some embodiments, the processing capacity of a terminal device needs to be evaluated based on the workload of multiple tasks to be assigned. This includes the hardware resources of the terminal device, such as CPU, memory, and storage, as well as the efficiency of the operating system and applications. The processing latency of each task can be estimated by analyzing the performance of the terminal device. The complexity, data volume, and real-time requirements of each task will affect the processing latency. For example, a lightweight image processing task may only take a few milliseconds, while a complex video editing task may take several seconds. If the task needs to interact with an external network, such as downloading or uploading data, network conditions will also affect the processing latency. Network bandwidth, signal strength, and latency will all affect the execution time of the task. The terminal device may run multiple tasks simultaneously, which may lead to resource contention and performance degradation. Task priority and scheduling strategies need to be considered to ensure that critical tasks receive sufficient resources. By optimizing tasks, such as using multithreading, asynchronous processing, and data caching, the processing efficiency of the terminal device can be improved and the processing latency reduced.

[0054] In step 102, based on the plurality of tasks to be assigned, the total energy consumption when executing the plurality of tasks to be assigned through the task processing network is determined.

[0055] In some embodiments, the task processing network includes an edge task processing network, a cloud task processing network, and a terminal task processing network.

[0056] In some embodiments, step 102 above can be implemented as follows: based on the plurality of tasks to be assigned, determine a first energy consumption when executing the plurality of tasks to be assigned through the edge task processing network; based on the plurality of tasks to be assigned, determine a second energy consumption when executing the plurality of tasks to be assigned through the cloud task processing network; based on the plurality of tasks to be assigned, determine a third energy consumption when executing the plurality of tasks to be assigned through the terminal task processing network; and perform a weighted summation of the first energy consumption, the second energy consumption, and the third energy consumption according to the second weight variables corresponding to the edge task processing network, the cloud task processing network, and the terminal task processing network, respectively, to obtain the total energy consumption.

[0057] In some embodiments, energy consumption of the task processing network is a crucial consideration in a distributed computing environment. To determine the energy consumption when executing multiple assigned tasks across different networks, it is necessary to evaluate the energy consumption of edge task processing networks, cloud task processing networks, and endpoint task processing networks, and then sum them using their respective weighted variables. The energy consumption of the edge network depends on the power consumption of network nodes, task processing latency, and the efficiency of the network architecture. Energy consumption can be estimated by monitoring node power consumption and using energy consumption simulation tools. The energy consumption of the cloud network is affected by factors such as the size of the data center, the number of servers, cooling systems, and power infrastructure. Energy consumption can be estimated using the power efficiency ratio (PUE) of the data center and the power consumption of IT equipment. The energy consumption of the endpoint network is related to the type of equipment, task processing time, and the equipment's power efficiency ratio. Energy consumption can be estimated using the power consumption of the equipment and using energy consumption simulation tools. The energy consumption weighted variables for each task processing network reflect the relative importance of that network in the total energy consumption. The weighted variables can be determined based on factors such as network usage frequency, task importance, and energy costs. Based on their respective weighted variables, the first, second, and third energy consumptions are weighted and summed to obtain the total energy consumption. By analyzing the total energy consumption, optimization measures can be taken, such as using more efficient equipment, improving task scheduling algorithms, and optimizing data processing flows, to reduce the total energy consumption.

[0058] In some embodiments, when the plurality of tasks to be assigned are executed through the edge task processing network, the first energy consumption is the energy consumption of the terminal task processing network when the plurality of tasks to be assigned are executed through the edge task processing network.

[0059] In some embodiments, determining the first energy consumption when executing the plurality of tasks to be assigned through the edge task processing network based on the plurality of tasks to be assigned can be achieved as follows: determining the first task transmission latency of the edge task processing network based on the task volume of the plurality of tasks to be assigned and the task transmission speed between the edge task processing network and the terminal task processing network; determining the first task processing latency of the edge task processing network based on the task volume of the plurality of tasks to be assigned and the task execution performance of the edge task processing network; determining the first transmission energy consumption of the terminal task processing network based on the first task transmission latency and the unit consumption of the terminal task processing network when transmitting tasks between the edge task processing network and the terminal task processing network; determining the first processing energy consumption of the terminal task processing network based on the first task processing latency and the unit energy consumption of the terminal task processing network when executing task processing on the edge task processing network; and adding the first transmission energy consumption and the first processing energy consumption to obtain the first energy consumption.

[0060] In some embodiments, the first energy consumption refers to the energy consumption of the terminal task processing network when multiple tasks to be assigned are executed through the edge task processing network. This energy consumption is due to the transmission of tasks from the terminal to the edge network. The first task transmission latency refers to the time it takes for a task to be transmitted from the terminal to the edge network. It depends on the data volume of the task, network bandwidth, transmission protocol, and network congestion. The first task processing latency refers to the time required for the edge network to process a task. It depends on the computing power of the edge network, the current workload, and the complexity of the task. The first transmission energy consumption refers to the energy consumption of the terminal task processing network during the transmission of tasks from the terminal to the edge network. This energy consumption can be estimated by the power consumption of the terminal device, transmission time, transmission distance, and transmission protocol. The first processing energy consumption refers to the energy consumption of the edge network when processing tasks. This energy consumption can be estimated by the power consumption of the edge network, processing time, and the complexity of the processed task. The first energy consumption is calculated by adding the first transmission energy consumption and the first processing energy consumption. Assuming the data volume of the task is D MB, the network bandwidth is B MB / s, and the transmission speed between the edge network and the terminal network is V MB / s, the first task transmission latency = D / V. Assume the edge network's computing power is C task units / second, and the computational load of each task is T task units. The first task processing latency = T / C. Assume the terminal device's power consumption is PW, and the transmission time is the transmission latency. The first transmission energy consumption = P * the first task transmission latency. Assume the edge network's power consumption is EW, and the processing time is the processing latency. The first processing energy consumption = E * the first task processing latency.

[0061] As an example, suppose there is a task A to be assigned to an edge task processing network, and the performance parameters of the edge network and the terminal network are known. The first energy consumption will be calculated through the following steps: Task transmission latency: Assume the data size of task A is 10MB, and the transmission speed between the edge network and the terminal network is 100MB / s. First task transmission latency = 10MB / 100MB / s = 0.1 seconds = 100 milliseconds. Task processing latency: Assume the computing power of the edge network is 100 task units per second, and task A needs to process 20 task units. First task processing latency = 20 task units / 100 task units / second = 0.2 seconds = 200 milliseconds. Transmission energy consumption: Assume the power consumption of the terminal device is 5W, and the transmission time is 100 milliseconds. First transmission energy consumption = 5W * 100 milliseconds = 500 milliwatt-hours. Processing energy consumption: Assume the power consumption of the edge network is 20W, and the processing time is 200 milliseconds. First processing energy consumption = 20W * 200 milliseconds = 4000 milliwatt-hours. Calculate the first energy consumption: First energy consumption = First transmission energy consumption + First processing energy consumption = 500 milliwatt-hours + 4000 milliwatt-hours = 4500 milliwatt-hours.

[0062] This helps identify the energy consumption of tasks within the terminal network and optimize task allocation strategies to ensure efficient task execution and transmission. Simultaneously, it aids in a better understanding of the energy consumption of different tasks on the network, providing data support for energy optimization and resource management. This approach ensures that edge task processing networks can provide high-quality services, meet user needs, and improve user experience. Furthermore, this analysis can help identify and address potential energy bottlenecks, thereby improving the overall system efficiency and responsiveness. Reducing energy consumption can decrease environmental impact and potentially lower operating costs, enhancing system sustainability. Analyzing task energy consumption allows for the optimization of task allocation strategies, improving system performance, and reducing environmental impact.

[0063] In some embodiments, when the plurality of tasks to be assigned are executed through the cloud task processing network, the first energy consumption is the energy consumption of the terminal task processing network when the plurality of tasks to be assigned are executed through the cloud task processing network.

[0064] In some embodiments, determining the second energy consumption when executing the plurality of tasks to be assigned through the cloud task processing network based on the plurality of tasks to be assigned can be achieved in the following manner: determining the second task processing latency of the cloud task processing network based on the task volume of the plurality of tasks to be assigned and the task execution performance of the cloud task processing network; determining the second task transmission latency of the cloud task processing network based on the task volume of the plurality of tasks to be assigned and the task transmission speed between the cloud task processing network and the terminal task processing network; determining the second transmission energy consumption of the terminal task processing network based on the second task transmission latency and the unit consumption of the terminal task processing network when transmitting tasks between the cloud task processing network and the terminal task processing network; determining the second processing energy consumption of the terminal task processing network based on the second task processing latency and the unit energy consumption of the terminal task processing network when executing task processing on the cloud task processing network; and adding the second transmission energy consumption and the second processing energy consumption to obtain the second energy consumption.

[0065] In some embodiments, when multiple tasks are assigned via a cloud task processing network, the energy consumption of the tasks during transmission and processing can be analyzed. The first energy consumption refers to the energy consumed by the terminal task processing network when transmitting tasks to the cloud task processing network. This energy consumption can be estimated using the power consumption of the terminal device, transmission time, transmission distance, and transmission protocol. The second task processing latency refers to the time required for the cloud task processing network to process the task. It depends on the computing power of the cloud network, the current workload, and the complexity of the task. The second task transmission latency refers to the time it takes for the task to be transmitted from the terminal to the cloud network. It depends on the data volume of the task, network bandwidth, transmission protocol, and network congestion. The second transmission energy consumption refers to the energy consumed by the terminal task processing network during the transmission of the task from the terminal to the cloud network. This energy consumption can be estimated using the power consumption of the terminal device, transmission time, transmission distance, and transmission protocol. The second processing energy consumption refers to the energy consumed by the cloud network when processing the task. This energy consumption can be estimated using the power consumption of the cloud network, processing time, and the complexity of the processed task. The second energy consumption is calculated by adding the second transmission energy consumption and the second processing energy consumption.

[0066] As an example, consider a task B to be assigned to a cloud task processing network. The performance parameters of the cloud network and the terminal network are known. First, the energy consumption is the energy consumed by the terminal device when transmitting the task to the cloud network. Assume the cloud network's computing power is 200 task units per second, and task B needs to process 40 task units. Second, the task processing latency = 40 task units / 200 task units / second = 0.2 seconds = 200 milliseconds. Assume the data size of task B is 15MB, and the network bandwidth is 100MB / s. Second, the task transmission latency = 15MB / 100MB / s = 0.15 seconds = 150 milliseconds. Assume the terminal device's power consumption is 4W, and the transmission time is 150 milliseconds. Second, the transmission energy consumption = 4W * 150 milliseconds = 600 milliwatt-hours. Assume the cloud network's power consumption is 25W, and the processing time is 200 milliseconds. Second, the processing energy consumption = 25W * 200 milliseconds = 5000 milliwatt-hours. Secondary energy consumption = Secondary transmission energy consumption + Secondary processing energy consumption = 600 mWh + 5000 mWh = 5600 mWh. This calculates the energy consumption of task B during transmission to the cloud network and processing. Secondary energy consumption reflects the total energy consumption of the terminal device during task transmission and processing. This analysis helps understand the energy consumption of tasks in the cloud network, providing a basis for energy optimization and resource management. Simultaneously, it can help identify and address potential energy bottlenecks, thereby improving the efficiency and responsiveness of the entire system. Reducing energy consumption can decrease environmental impact and potentially lower operating costs.

[0067] In some embodiments, determining a third energy consumption when executing the plurality of tasks to be assigned through the terminal task processing network, based on the plurality of tasks to be assigned, can be achieved as follows: determining a reference energy consumption of the terminal task processing network based on the task volume of the plurality of tasks to be assigned and the task execution performance of the terminal task processing network; multiplying the reference energy consumption of the terminal task processing network by the energy consumption parameter of the terminal task processing network to obtain the third energy consumption.

[0068] In some embodiments, the processing capacity of a terminal device needs to be evaluated based on the workload of multiple tasks to be assigned. This includes the hardware resources of the terminal device, such as CPU, memory, and storage, as well as the efficiency of the operating system and applications. The processing energy consumption of each task can be estimated by analyzing the performance of the terminal device. Assuming the average processing energy consumption of each task on the terminal device is E_r (unit: watt-hours / task), the reference energy consumption = E_r * number of tasks to be assigned. Energy consumption parameters may include factors such as the power consumption of the terminal device, task execution time, and task complexity. The energy consumption parameter can be a fixed multiple or a dynamically changing coefficient, depending on the usage and workload of the terminal device. Third energy consumption = reference energy consumption * energy consumption parameter. Here, the energy consumption parameter may be a global parameter or different parameters for different types of tasks. The third energy consumption when executing multiple tasks to be assigned through the terminal task processing network can be obtained. This process helps developers and administrators optimize the energy consumption of terminal devices, improve the user's application experience, and ensure system stability and responsiveness.

[0069] In step 103, based on the total energy consumption and the processing latency, the multiple tasks to be assigned are allocated to obtain task groups corresponding to each task processing network.

[0070] In some embodiments, see Figure 2 , Figure 2 A flowchart illustrating the task allocation method in an embodiment of this application. Figure 2 , Figure 1 Step 103 shown can be achieved through Figure 2 Steps 1031 to 1033 shown are implemented.

[0071] In step 1031, based on the total energy consumption and the processing latency, the allocation weights of each task processing network are predicted to obtain the predicted allocation weights of each task processing network.

[0072] In some embodiments, energy consumption weight: Based on total energy consumption, an energy consumption weight index can be defined; for example, the lower the energy consumption, the greater the weight. Latency weight: Based on processing latency, a latency weight index can be defined; for example, the shorter the processing latency, the greater the weight. Collect total energy consumption and processing latency data for each task processing network under different workloads. To compare the performance of each network, the energy consumption and processing latency data need to be normalized. This can be achieved by dividing the energy consumption and processing latency of each network by the maximum energy consumption and maximum processing latency of all networks. For energy consumption weight, the weight index can be defined as 1 / normalized energy consumption. For latency weight, the weight index can be defined as 1 / normalized processing latency. According to business requirements and network performance, different weight factors (α and β) can be set for energy consumption weight and latency weight, where α + β = 1. Overall weight = α * energy consumption weight index + β * latency weight index.

[0073] In some embodiments, the predicted weights of each network relative to other networks can be obtained by calculating the overall weight of each network. Predicted weight = Overall weight / Sum of overall weights of all networks.

[0074] In step 1032, the number of the plurality of tasks to be assigned is multiplied by the predicted assignment weight of each task processing network to obtain the number of tasks assigned by each task processing network.

[0075] In some embodiments, multiplication to calculate the number of tasks assigned to each task processing network is an intuitive method, but it relies on the accuracy of the predicted allocation weights. The predicted allocation weights for each task processing network are calculated based on total energy consumption, processing latency, and other relevant factors. These weights represent the relative efficiency of each network in executing tasks. To ensure fair task allocation, the predicted allocation weights need to be normalized so that their sum equals 1. This allows each network's weight to be represented as its proportion in the overall task processing. Multiplying the normalized predicted allocation weights of each network by the total number of tasks yields the number of tasks each network should be allocated, ensuring that the task allocation matches the network's predicted efficiency. In practical applications, the number of tasks allocated may need to be adjusted based on actual circumstances. For example, if a network is unable to handle its predicted task allocation for some reason (such as maintenance or failure), other networks will need to take on additional tasks. After task allocation, network performance and energy consumption need to be evaluated, and the predicted allocation weights adjusted and optimized based on actual results. This helps improve the accuracy and efficiency of task allocation.

[0076] As an example, suppose there are 3 tasks to be assigned, 3 task processing networks, and predicted assignment weights of 0.5, 0.3, and 0.2 (already normalized). The total number of tasks = 3. Network A is assigned 0.5 * 3 = 1.5 tasks, rounded to 1 or 2. Network B is assigned 0.3 * 3 = 0.9 tasks, rounded to 1. Network C is assigned 0.2 * 3 = 0.6 tasks, rounded to 1. Network A may assign 1 or 2 tasks, Network B 1 task, and Network C 1 task. The actual task allocation may need to be adjusted based on specific circumstances (e.g., whether Network A's processing capacity allows for 2 tasks).

[0077] In step 1033, for each task processing network, the number of tasks to be assigned by the task processing network is determined as the task group corresponding to the task processing network.

[0078] In some embodiments, the above-mentioned prediction of the allocation weights of each task processing network based on the total energy consumption and the processing delay to obtain the predicted allocation weights of each task processing network can be implemented in the following manner: traversing i, the following processing is performed: according to the i-th explosion radius, based on the total energy consumption and the processing delay, the allocation weights of each task processing network are predicted for the i-th time to obtain the i-th candidate allocation weights of each task processing network; according to the differential mutation rule, the i-th candidate allocation weights of each task processing network are mutated to obtain the i-th predicted allocation weight; and the N-th predicted allocation weight is determined as the predicted allocation weight.

[0079] In some embodiments, i is not less than 1 and not greater than N, where N indicates the maximum number of predictions for the assigned weights, and the i-th explosion radius is less than the (i+1)-th explosion radius.

[0080] In some embodiments, Differential Evolution (DE) is a population-based random search algorithm. The explosion radius refers to the range of possible values ​​for the assigned weights. In DE, each individual in the population (in this case, the assigned weight of the task processing network) is updated based on information from other individuals in the current population. This process is repeated multiple times, each time called a generation or iteration. DE uses differential mutation to generate new individuals. This operation typically involves three steps: selection, crossover, and mutation. The selection operation randomly selects individuals from the current population; the crossover operation mixes these selected individuals to generate new individuals; and the mutation operation increases the diversity of the population by introducing randomness. After the i-th iteration, the assigned weights of each task processing network are updated according to the differential mutation rule, forming the i-th candidate assigned weight. After N iterations, the algorithm stops, and the result of the last iteration (the N-th predicted assigned weight) is determined as the final predicted assigned weight. In each iteration, the algorithm evaluates the performance of each candidate assigned weight according to a fitness function. This fitness function is typically related to total energy consumption and processing latency. Based on the fitness function, the algorithm selects the best-performing candidate weights as part of the next generation, while introducing new candidate weights through mutation. The differential evolution algorithm can progressively optimize the weights over multiple iterations, ultimately obtaining a well-performing predicted weight set.

[0081] As an example, consider a task processing network assignment problem with three task processing networks (A, B, C) and three tasks to be assigned. A differential evolution algorithm will be used to predict the assignment weights for each network. Population Initialization: Randomly initialize a population containing multiple candidate assignment weight vectors. For example, each vector could be the assignment weights for the three task processing networks A, B, and C. Iteration i: For the i-th candidate assignment weight: Evaluate each assignment weight vector in the current population based on total energy consumption and processing latency. Select the best-performing individual in the population as a reference individual. For each individual, perform a differential operation on three distinct individuals to generate a differential vector. Cross the differential vector with the reference individual to generate new candidate assignment weight vectors. Differential Mutation: Mutate the candidate assignment weight vectors, for example, by adding a small random vector to increase diversity. Evaluation and Selection: Evaluate the fitness of the newly generated candidate assignment weight vectors. Select the vector with the best fitness as part of the next generation population. Final Assignment Weights: After several iterations, the algorithm stops. The best-performing individual in the final generation (the Nth predicted weight) will be determined as the final predicted weight. For example, if 5 iterations are performed, the final weights might be: Network A weight: 0.45 - Network B weight: 0.35, Network C weight: 0.20. These weights represent the relative efficiency of each network in processing the task, and tasks can be assigned based on these weights to ensure optimal overall performance.

[0082] In some embodiments, after allocating the plurality of tasks to be assigned based on the total energy consumption and the processing latency to obtain task groups corresponding to each task processing network, the following processing can also be performed: Perform the following processing for each task processing network: When there are tasks to be assigned in the task group corresponding to the task processing network, process the tasks to be assigned in the task group corresponding to the task processing network through the task processing network to obtain the task processing result corresponding to the task group.

[0083] In some embodiments, the performance of each task processing network is evaluated, including its processing capacity and energy efficiency. Based on total energy consumption and processing latency data, the processing cost (including energy consumption and processing time) of each network is determined. An allocation strategy is developed to allocate tasks according to the processing cost of each network. The strategy can be a simple round-robin method or a more complex cost- or performance-based dynamic allocation strategy. According to the allocation strategy, the tasks to be assigned are distributed to the appropriate task processing networks. This may involve grouping tasks, with each group assigned to a network. For each task processing network, the following processes are performed: When the network receives the task group assigned to it, it begins processing these tasks. Using the network's processing resources, tasks are processed according to their priority and order. The processing results for each task are recorded, including success or failure status, processing time, energy consumption, etc. The results of each network are aggregated to evaluate the performance and efficiency of the entire system. The processing results are analyzed to identify potential problems and optimization space; for example, some networks may require more resources or more efficient algorithms. This ensures that tasks are processed efficiently, while optimizing total energy consumption and processing latency, which helps improve the overall performance and responsiveness of the system, and reduces operating costs.

[0084] In some embodiments, the number of tasks to be assigned in the task group is at least zero, and when the task processing network performs task processing for the tasks to be assigned according to the task group, the overall task cost determined by the total energy consumption and the processing latency is minimized.

[0085] This approach helps improve task processing efficiency because tasks are assigned to the networks best suited to perform them, thus reducing overall processing time and energy consumption. It also helps optimize resource utilization, as task allocation strategies can be customized based on the processing capacity and energy efficiency of each network, avoiding resource waste. By recording the processing results of each task, system performance can be monitored, and problems can be quickly identified and resolved, thereby improving system stability and reliability. Finally, this performance- and cost-based allocation method can also reduce operating costs, as reduced energy consumption and processing time lead to lower energy consumption and maintenance costs.

[0086] Thus, by determining the processing latency of executing multiple tasks through the task processing network based on multiple tasks to be assigned, and by determining the total energy consumption of executing multiple tasks through the task processing network, the multiple tasks to be assigned are allocated based on the total energy consumption and processing latency, resulting in task groups corresponding to each task processing network. By recording the processing results of each task, network performance can be monitored, and adjustments and optimizations can be made based on actual results. By comprehensively considering total energy consumption and processing latency, task allocation can minimize the overall task cost, and tasks are assigned to networks that can complete them at the lowest cost (including energy consumption and processing time). This helps reduce operating costs and improve resource utilization efficiency. By comprehensively considering total energy consumption and processing latency, the efficiency and reliability of task processing can be effectively improved, thereby effectively improving the accuracy of task allocation and effectively reducing task operating costs.

[0087] The present application will be described below with reference to application examples.

[0088] Cloud-edge computing networks consist of a cloud computing layer and an edge computing layer. Cloud computing servers are typically composed of high-performance computer terminals with powerful data processing and storage capabilities. Collected data is centralized at the cloud computing layer, where data processing and mining are used for decision-making. The edge computing layer utilizes a fog computing network formed by connections between computing nodes to plan and divide tasks for processing while prioritizing load balancing with minimal processing time. Devices at the terminal device layer transmit information and data wirelessly or via wired connections, connecting to the sensing network.

[0089] In practical applications, when terminal devices upload real-time data, for data requiring real-time processing, the system utilizes the computing power of the computing nodes at the edge computing layer to process this data. This not only reduces the computational burden on cloud servers but also avoids time delays caused by network congestion and transmission to distant cloud environments. Furthermore, performing computation on sensitive data at the edge prevents network attacks and information leaks during transmission, thus improving data security.

[0090] In some embodiments, see Figure 3 The total latency of data in the network is the sum of transmission latency, processing latency, and queuing latency. V = {A1, A2, A3, A4, A5, ..., A...} n Let A be a set of n computation nodes. i This represents a single computing node. Any two computing nodes can communicate via wired or wireless means. Each computing node A... i Its computing power is C i Set T = {Y} 1,2 D 1,2,...Y i,j D i,j Each element in ,...} represents the transmission delay between two computing nodes. Y indicates the communication relationship between the two computing nodes; a value of 1 indicates data transmission between the two nodes, while a value of 0 indicates no data transmission between them. D represents the communication delay between the two computing nodes. i,j It consists of data transmission delay and some other fixed delays. D i,j =d i,j +L / R i,j L represents the data frame length, R i,j This represents the network bandwidth between the two computing nodes. i,j This indicates certain fixed delays, including storage and propagation delays.

[0091] Networks consume energy during computation. Since edge computing networks and cloud computing servers can be connected to the external power grid, while terminal edge devices are often powered by independent power supplies and batteries, their energy costs need to be considered. Different computing needs are analyzed and illustrated below. Regarding the task latency model, for the multi-edge node model proposed in this paper, tasks can be processed in various ways on terminal devices. For a single task i, computation can be performed on the terminal device, or on the edge server and cloud computing server.

[0092] In some embodiments, when computing is performed on a local terminal device, the computing power of terminal device i is m. i The size of task i is l i ,c i Let T be the amount of computing resources required for task i, then its latency is T. i for:

[0093]

[0094] In some embodiments, when computation is performed at the edge computing node where the terminal device is located, the total time overhead consists of computation latency and transmission latency. The computation latency can be expressed as follows:

[0095]

[0096]

[0097]

[0098] Among them, T c For the latency from the terminal device to the edge computing node, l i The size of the task file. The speed at which device i uploads data to the corresponding edge computing node. T i c To calculate the delay, n i The computing power allocated to the edge server for the corresponding task.

[0099] In some embodiments, when computation is performed on a cloud server, the computation task is first transmitted to a local edge computing node, and then transmitted to a cloud computing server. Generally, tasks with large computational loads are transmitted to the cloud computing server for computation. The latency formula can be expressed as follows:

[0100]

[0101]

[0102]

[0103] Among them, T i c It refers to the latency of computing tasks on cloud computing servers, T. i t→c It is the total latency of transmitting computing tasks from the terminal device to the cloud computing server. The computing resources allocated to each task by the cloud computing server, T i t→e T represents the latency of transmitting tasks from the device to the edge server. i e→c The latency between edge computing nodes and cloud computing servers; This refers to the transmission speed from the edge server to the cloud server.

[0104] In some embodiments, the energy consumption of the task energy consumption model can be largely ignored because the edge computing node devices and cloud servers operate connected to the power grid. The main consideration is the energy consumption of the terminal devices during the processing of computing tasks. The energy consumption E on the terminal devices... i It can be analyzed in three scenarios.

[0105] When a computational task is performed on a terminal node, the energy consumption of the terminal node device can be expressed as:

[0106]

[0107] In the formula, k is the energy consumption parameter of the edge computing node, and m i c represents the computing power of the edge nodes. i The computational resources required for task i.

[0108] In some embodiments, when a computing task is transmitted to an edge server for computation, the total energy consumption of the terminal node consists of the energy consumed by uploading the computing task and the energy consumed while waiting. The total energy consumption can be expressed as:

[0109]

[0110]

[0111] In the formula, This represents the unit energy consumption of the terminal edge node during the computation task upload process. This indicates the transmit power of the terminal edge node. T represents the device power consumption when the terminal node is idle. i w This is the waiting time after the edge node completes the upload. This indicates the power level of the terminal device in its idle state.

[0112] In some embodiments, when the computing task is performed at the cloud service layer, the energy consumption of the edge node, consisting of the transmission energy consumption during upload and the energy consumption while waiting for the processing result to return, can be expressed as follows:

[0113]

[0114]

[0115] In the formula, This refers to the power consumption of edge nodes in standby mode. T represents the power consumption of edge node i while waiting for the computation task to be completed. i w T represents the waiting time of the edge node. i e→c To calculate the time it takes for a task to be transferred from the edge server to the cloud server, T i c,c To calculate the computation time of the task on the cloud server, For the transmission speed from the edge server to the cloud server, The computing resources allocated to each task by the cloud computing server.

[0116] In some embodiments, see Figure 4 , Figure 4 A schematic diagram of the task allocation method in this application embodiment. Figure 2 Photovoltaic power plants use solar energy as their energy source to generate electricity, which is used to supply the computing needs of the edge side. Excess electricity can be stored in energy storage batteries. When the demand for electricity is insufficient, it can be met by purchasing electricity from the grid.

[0117] Energy storage power stations use energy-type battery packs as energy storage components. They store electricity during off-peak hours and discharge it during peak hours, thus achieving peak shaving and valley filling and regulating user-side demand response. This not only reduces the peak load of the power grid and is conducive to the safe operation of the power grid, but also generates huge economic benefits.

[0118] The output power P of the photovoltaic unit pv It is calculated using the following formula:

[0119] P pv =P STC G AC [1+k3(T C -T r )] / G STC (13)

[0120] T c =T amt +30G AC / 1000 (14)

[0121] Among them, P STC This represents the maximum test power under standard test conditions; G AC k is the light intensity; k3 is the power temperature coefficient T r For reference temperature, G STC The light intensity under standard testing conditions; T c This indicates the operating temperature of the solar panel.

[0122] The state of charge (SOC) of an energy storage battery represents the ratio of the battery's remaining energy to its rated energy. The charging and discharging process can be expressed by the formula:

[0123] SOC(t)=(1-δ)SOC(t-1)-P c Δtη c / E c (15)

[0124] SOC(t)=(1-δ)SOC(t-1)-P d Δt / E c η d (16)

[0125] Among them, P c It is the charging power, P d For discharge power, η c It refers to charging efficiency, η. d E represents the discharge efficiency. c This represents the overall capacity of the battery during the time period Δt, where δ is the battery's self-discharge coefficient.

[0126] Based on this, the total cost model can be expressed as the weighted sum of latency cost and energy cost. Furthermore, the coefficient parameters can be dynamically adjusted according to the different sensitivities of different tasks to latency and energy consumption. For time-sensitive computing tasks, the latency coefficient can be set larger, and for energy-sensitive tasks, the energy coefficient can be set larger. The total cost model can be expressed as:

[0127]

[0128] stα i ,β i ,χ i ∈{0,1}(18)

[0129] Where, α i β i , χ i It is a number between 0 and 1. When it is 1, it means that task i is calculated on the edge node, the edge server, and the cloud server. This indicates the unit price of electrical energy in energy storage batteries. This indicates the amount of electricity consumed by the energy storage battery at the edge. This indicates the unit cost of electricity generated by solar energy. This indicates the amount of solar power consumed at the edge. This indicates the unit price of electricity cost in the edge-side power grid. This indicates the electrical energy consumed from the power grid.

[0130] The optimization problem of computational tasks in cloud-edge networks can be transformed into a problem of minimizing total cost.

[0131]

[0132]

[0133] In the formula, It is a binary variable, taking the value of 1 when the data is unloaded to an edge server at the edge of another service area, α. i ,β i ,χ i The sum of two variables equal to 1 indicates that the task must be computed in one of the places.

[0134] Because this problem is a complex, multivariate, and multi-constraint optimization problem, it is difficult to solve, and traditional optimization solutions are ineffective. Therefore, a swarm intelligence optimization algorithm is adopted for solving it. After comparison, the Fireworks Algorithm is selected for the solution, and several improvements are made to the Fireworks Algorithm, such as introducing a non-uniform displacement spark generation strategy and a differential-Levie flight strategy mutation method, to improve its search performance.

[0135] In some embodiments, see Figure 5 , Figure 5 A schematic diagram of the task allocation method in this application embodiment. Figure 3 The Fireworks Algorithm is a swarm intelligence algorithm characterized by its fast computation speed and strong search capability, and it has wide applications in solving complex problems. In the Fireworks Algorithm, each spark is regarded as a potential solution. As the explosion progresses, the neighborhood is searched. The Fireworks Algorithm mainly includes three steps: (1) Fireworks initialization; (2) Calculating the fitness value of the fireworks and obtaining the explosion radius and the number of sparks, and performing an "explosion" search; (3) Analyzing the search results, determining whether to enter the next iteration or terminate the search and outputting the results.

[0136] The fireworks algorithm involves four key factors: explosion operator, mutation operator, mapping conditions, and result selection strategy.

[0137] The explosion operator consists of explosion intensity and explosion radius. Explosion intensity represents the number of sparks generated in each explosion. Sparks with higher fitness values ​​have higher explosion intensity, thus generating more offspring sparks in the vicinity, and vice versa. Explosion radius represents the displacement of a specified spark, and its calculation formula is shown in (21):

[0138]

[0139]

[0140] Among them, S i Y represents the number of sparks produced after firework i explodes, where m is a constant value used for boundary control; max This refers to the spark with the worst fitness value; f(x) i ) represents the fitness value of firework i; θ is used to avoid cases where the denominator is 0; pop represents the population size. A i This represents the blast radius of firework i. Y is a constant value representing the upper limit of the explosion radius. min This represents the fitness value of the highest quality spark in the current population.

[0141] Here, a spark generation strategy with unequal positional offsets is introduced, which can significantly enhance the diversity of the spark population and improve search capabilities. For x in a specified dimension... ik Introducing random variables to calculate position offset ΔX ik =A i ×U(-1,1); This gives the position x after displacement. ik =x ik +ΔX ikIn each iteration of the fireworks algorithm, the explosion radius and intensity of each firework's spark are adjusted based on its fitness value. However, for the optimal solution with the lowest fitness value in the fireworks population, the obtained explosion radius will be very small. This will prevent the explosion radius from playing a role in the actual optimization search process, significantly weakening the search performance of the fireworks algorithm.

[0142] To avoid this problem, a minimum explosion radius detection strategy (MEACS) is introduced, where A... min,k The detection value with the lowest explosion radius in the k-th dimension is:

[0143]

[0144] Among them, A ik Let represent the explosion radius of firework i in dimension k.

[0145] In some embodiments, regarding A min,k See Figure 6 , Figure 6 This is a schematic diagram illustrating the trend of the number of evaluations provided in the embodiments of this application. A non-linear decreasing explosion radius detection strategy is adopted, and the expression is as follows:

[0146]

[0147] In some embodiments, mutation is a crucial step in the Fireworks Algorithm, enabling the algorithm to find optimal solutions over a wider range by mutating individuals. The mutation method used in the Fireworks Algorithm is Gaussian mutation. Since difference operations can fully utilize the differences between populations, they can enhance population diversity. The Lévy flight function is a highly stochastic flight function that combines short-range search with a small amount of long-range search. Its step size follows a Lévy distribution, and its direction follows a uniform distribution. Introducing the Lévy flight function gives mutation better jump capabilities, thus avoiding early local optima and enhancing search efficiency. This paper proposes a difference-Lévy flight mutation method to replace the Gaussian distribution. This enhances information exchange between individuals in the population and strengthens the randomness of the algorithm, preventing it from getting trapped in local optima.

[0148] In some embodiments, Gaussian transformation and difference transformation are compared as follows: Figure 7 As shown, Figure 7 This is a schematic diagram of the task allocation method provided in the embodiments of this application. Figure 4 The improved fireworks algorithm calculation process is as follows:

[0149] The fireworks algorithm is initialized, generating an initial population denoted as POP1. The initial population POP1 is then exploded, producing sparks. The explosion intensity and radius are calculated using the formulas above. The newly generated population is denoted as POP2. Individuals from populations POP1 and POP2 are grouped into a set and sorted according to their fitness values ​​from highest to lowest, generating a new population, POP3. Differential mutation is applied to the individuals in POP3. The fitness values ​​of individuals before and after differential mutation are compared, and those with higher fitness values ​​are retained, while those with lower fitness values ​​are discarded, generating a new generation population. The algorithm undergoes multiple iterations. When the preset number of iterations or the output condition is met, the calculation result is output. The expression for introducing differential mutation through spark mutation is:

[0150]

[0151] in, The position of the target individual in the k-th dimension; is the position of the best individual in the current population on the k-th dimension; F is the scaling factor used to scale the difference, and its value is generally between 0 and 2. and Let be the positions of two distinct individuals in the k-th dimension.

[0152] The Lévy distribution can be described as follows:

[0153] L(s)~|s| -1-β ,0<β≤2 (26)

[0154] Where s is the random step size of Lévy's flight, which can be defined as:

[0155]

[0156]

[0157]

[0158]

[0159] Where v follows a normal distribution and β is generally 1.5, therefore, the spark mutation formula for Lévy flight can be expressed as:

[0160]

[0161] In some embodiments, the focus is on the task allocation problem in cloud-edge computing networks. To utilize computing resources and reduce network latency, the original offloading decision and resource allocation problem is transformed into a cost optimization problem that comprehensively considers minimum latency and energy consumption by weighting the time latency and energy consumption of all terminals executing tasks. An improved fireworks algorithm is then used to calculate the task allocation scheme. In cloud-edge computing networks involving small-scale photovoltaic-storage power stations, photovoltaic solar energy is used to participate in grid peak-valley regulation, reducing energy consumption. The cost of the photovoltaic-storage power station is then optimized for minimum latency and energy consumption. Since this optimization problem is non-convex, the fireworks algorithm is used to solve it, and methods such as the differential-Levie flight strategy are introduced to improve the algorithm, enhancing information exchange and randomness between individuals during iteration, enabling the algorithm to obtain a relatively good solution in a shorter time. When a computing task arrives, its nature can be classified. Tasks requiring edge computing are allocated to edge computing nodes. When tasks can be collaboratively computed within the cloud-edge network, the task allocation method proposed in this proposal is used to allocate tasks, achieving the highest computational efficiency. A cloud-edge computing network model incorporating small-scale photovoltaic-storage power stations at the edge can utilize photovoltaic solar energy to participate in grid peak-valley regulation, reducing energy consumption and achieving energy conservation and cost reduction. It shows promising application prospects for scenarios with heavy edge computing tasks. By comprehensively considering energy consumption and latency indicators to form a total cost model, dynamic adjustment of coefficients allows for adaptation to different types of computing tasks. Compared to a single latency model, incorporating energy consumption into the cost model achieves a more reasonable task allocation optimization scheme. When using swarm intelligence algorithms to solve this problem, due to the numerous constraints and variables, the algorithm is prone to premature convergence, failing to achieve good optimization results. By improving the fireworks algorithm and introducing a differential-Levie flight strategy, the algorithm's accuracy and convergence speed can be significantly improved.

[0162] To implement the task allocation method on the electronic device side of this application, this application also provides a task allocation device. Figure 8 This is a schematic diagram of the composition structure of the task allocation device according to an embodiment of this application, as shown below. Figure 8As shown, a task allocation node is applied to a cloud-edge computing network, which includes multiple task processing networks and the task allocation node. The task allocation device includes: an acquisition module 61, used to acquire multiple tasks to be allocated and determine the processing latency when executing the multiple tasks to be allocated through the task processing networks based on the multiple tasks to be allocated; an energy consumption module 62, used to determine the total energy consumption when executing the multiple tasks to be allocated through the task processing networks based on the multiple tasks to be allocated; and a task allocation module 63, used to allocate the multiple tasks to be allocated based on the total energy consumption and the processing latency, to obtain task groups corresponding to each task processing network; the number of tasks to be allocated in each task group is at least zero, and the overall task cost determined by the total energy consumption and the processing latency is minimized when the task processing network executes task processing for the tasks to be allocated according to the task groups.

[0163] In some embodiments, the task processing network includes an edge task processing network, a cloud task processing network, and a terminal task processing network; the acquisition module 61 is further configured to determine, based on the plurality of tasks to be assigned, a first processing latency when executing the plurality of tasks to be assigned through the edge task processing network; a second processing latency when executing the plurality of tasks to be assigned through the cloud task processing network; a third processing latency when executing the plurality of tasks to be assigned through the terminal task processing network; and to perform a weighted summation of the first processing latency, the second processing latency, and the third processing latency according to the first weight variables corresponding to the edge task processing network, the cloud task processing network, and the terminal task processing network, respectively, to obtain the processing latency.

[0164] In some embodiments, the acquisition module 61 is further configured to: determine a first task processing delay of the edge task processing network based on the task volume of the plurality of tasks to be assigned and the task execution performance of the edge task processing network; determine a first task transmission delay of the edge task processing network based on the task volume of the plurality of tasks to be assigned and the task transmission speed between the edge task processing network and the terminal task processing network; and add the first task processing delay of the edge task processing network and the first task transmission delay of the edge task processing network to obtain the first processing delay.

[0165] In some embodiments, the acquisition module 61 is further configured to: determine a second task processing delay of the cloud task processing network based on the task volume of the plurality of tasks to be assigned and the task execution performance of the cloud task processing network; determine a second task transmission delay of the cloud task processing network based on the task volume of the plurality of tasks to be assigned and the task transmission speed between the cloud task processing network and the terminal task processing network; and add the second task processing delay of the cloud task processing network and the second task transmission delay of the cloud task processing network to obtain the second processing delay.

[0166] In some embodiments, the acquisition module 61 is further configured to determine a third processing delay when executing the multiple tasks to be assigned through the terminal task processing network based on the task volume of the multiple tasks to be assigned and the task execution performance of the terminal task processing network.

[0167] In some embodiments, the task processing network includes an edge task processing network, a cloud task processing network, and a terminal task processing network; the energy consumption module 62 is further configured to determine, based on the plurality of tasks to be assigned, a first energy consumption when executing the plurality of tasks to be assigned through the edge task processing network; a second energy consumption when executing the plurality of tasks to be assigned through the cloud task processing network; a third energy consumption when executing the plurality of tasks to be assigned through the terminal task processing network; and to perform a weighted summation of the first energy consumption, the second energy consumption, and the third energy consumption according to the second weight variables corresponding to the edge task processing network, the cloud task processing network, and the terminal task processing network, respectively, to obtain the total energy consumption.

[0168] In some embodiments, when the plurality of tasks to be assigned are executed through the edge task processing network, the first energy consumption is the energy consumption of the terminal task processing network when the plurality of tasks to be assigned are executed through the edge task processing network; the energy consumption module 62 is further configured to: determine a first task transmission delay of the edge task processing network based on the task volume of the plurality of tasks to be assigned and the task transmission speed between the edge task processing network and the terminal task processing network; determine a first task processing delay of the edge task processing network based on the task volume of the plurality of tasks to be assigned and the task execution performance of the edge task processing network; determine a first transmission energy consumption of the terminal task processing network based on the first task transmission delay and the unit consumption of the terminal task processing network when transmitting tasks between the edge task processing network and the terminal task processing network; determine a first processing energy consumption of the terminal task processing network based on the first task processing delay and the unit energy consumption of the terminal task processing network when performing task processing on the edge task processing network; and add the first transmission energy consumption and the first processing energy consumption to obtain the first energy consumption.

[0169] In some embodiments, when the plurality of tasks to be assigned are executed through the cloud task processing network, the first energy consumption is the energy consumption of the terminal task processing network when the plurality of tasks to be assigned are executed through the cloud task processing network; the energy consumption module 62 is further configured to: determine a second task processing latency of the cloud task processing network based on the task volume of the plurality of tasks to be assigned and the task execution performance of the cloud task processing network; determine a second task transmission latency of the cloud task processing network based on the task volume of the plurality of tasks to be assigned and the task transmission speed between the cloud task processing network and the terminal task processing network; determine a second transmission energy consumption of the terminal task processing network based on the second task transmission latency and the unit consumption of the terminal task processing network when transmitting tasks between the cloud task processing network and the terminal task processing network; determine a second processing energy consumption of the terminal task processing network based on the second task processing latency and the unit energy consumption of the terminal task processing network when executing task processing on the cloud task processing network; and add the second transmission energy consumption and the second processing energy consumption to obtain the second energy consumption.

[0170] In some embodiments, the energy consumption module 62 is further configured to determine a reference energy consumption of the terminal task processing network based on the task volume of the plurality of tasks to be assigned and the task execution performance of the terminal task processing network; and multiply the reference energy consumption of the terminal task processing network and the energy consumption parameter of the terminal task processing network to obtain the third energy consumption.

[0171] In some embodiments, the task allocation module 63 is further configured to predict the allocation weight of each task processing network based on the total energy consumption and the processing latency, to obtain the predicted allocation weight of each task processing network; multiply the number of the plurality of tasks to be allocated by each task processing network by the predicted allocation weight of each task processing network, to obtain the number of tasks allocated by each task processing network; and for each task processing network, determine the number of tasks to be allocated by the task processing network as the task group corresponding to the task processing network.

[0172] In some embodiments, the task allocation module 63 is further configured to perform the following processing on traversal i: based on the total energy consumption and the processing delay, make the i-th prediction of the allocation weight of each task processing network according to the i-th explosion radius to obtain the i-th candidate allocation weight of each task processing network; mutate the i-th candidate allocation weight of each task processing network according to the differential mutation rule to obtain the i-th predicted allocation weight; i is not less than 1 and not greater than N, N is used to indicate the maximum number of predictions of the allocation weight, and the i-th explosion radius is less than the (i+1)-th explosion radius; determine the N-th predicted allocation weight as the predicted allocation weight.

[0173] In some embodiments, the task allocation module 63 is further configured to perform the following processing for each of the task processing networks: when there is a task to be allocated in the task group corresponding to the task processing network, the task to be allocated in the task group corresponding to the task processing network is processed through the task processing network to obtain the task processing result corresponding to the task group.

[0174] It should be noted that the task allocation device provided in the above embodiments is only illustrated by the division of the above-described program modules. In practical applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device can be divided into different program modules to complete all or part of the processing described above. In addition, the task allocation device provided in the above embodiments and the task allocation method embodiments on the electronic device side belong to the same concept. For details of its specific implementation process, please refer to the task allocation method embodiments on the electronic device side, which will not be repeated here.

[0175] Based on the hardware implementation of the above program modules, and in order to implement the task allocation method on the electronic device side of this application embodiment, this application embodiment also provides an electronic device. Figure 9 This is a schematic diagram of the hardware composition structure of the electronic device according to an embodiment of this application, such as... Figure 9 As shown, the electronic device 80 includes:

[0176] The first communication interface 81 is capable of exchanging information with other devices (such as the second client);

[0177] The processor 82 is connected to the first communication interface 81 to enable information interaction with other devices (such as the second client). When running a computer program, it executes the task allocation method provided above for the electronic device side, and the computer program is stored on the first memory 83.

[0178] Specifically, the processor 82 is configured to acquire multiple tasks to be assigned, and based on the multiple tasks to be assigned, determine the processing latency when executing the multiple tasks to be assigned through the task processing network;

[0179] The first communication interface 81 is used to determine the total energy consumption when executing the multiple tasks to be assigned through the task processing network based on the multiple tasks to be assigned.

[0180] The processor 82 is further configured to allocate tasks to the plurality of tasks to be allocated based on the total energy consumption and the processing latency, thereby obtaining task groups corresponding to each task processing network; the number of tasks to be allocated in the task group is at least zero, and when the task processing network performs task processing for the tasks to be allocated according to the task group, the overall task cost determined by the total energy consumption and the processing latency is minimized.

[0181] In one embodiment, the processor 82 is further configured to: determine a first processing latency when executing the plurality of tasks to be assigned through the edge task processing network; determine a second processing latency when executing the plurality of tasks to be assigned through the cloud task processing network; determine a third processing latency when executing the plurality of tasks to be assigned through the terminal task processing network; and perform a weighted summation of the first processing latency, the second processing latency, and the third processing latency according to the first weight variables corresponding to the edge task processing network, the cloud task processing network, and the terminal task processing network, respectively, to obtain the processing latency.

[0182] In one embodiment, the processor 82 is further configured to: determine a first task processing delay of the edge task processing network based on the task volume of the plurality of tasks to be assigned and the task execution performance of the edge task processing network; determine a first task transmission delay of the edge task processing network based on the task volume of the plurality of tasks to be assigned and the task transmission speed between the edge task processing network and the terminal task processing network; and add the first task processing delay of the edge task processing network and the first task transmission delay of the edge task processing network to obtain the first processing delay.

[0183] In one embodiment, the processor 82 is further configured to: determine a second task processing delay of the cloud task processing network based on the task volume of the plurality of tasks to be assigned and the task execution performance of the cloud task processing network; determine a second task transmission delay of the cloud task processing network based on the task volume of the plurality of tasks to be assigned and the task transmission speed between the cloud task processing network and the terminal task processing network; and add the second task processing delay of the cloud task processing network and the second task transmission delay of the cloud task processing network to obtain the second processing delay.

[0184] In one embodiment, the processor 82 is further configured to determine a third processing delay when executing the plurality of tasks to be assigned through the terminal task processing network, based on the task volume of the plurality of tasks to be assigned and the task execution performance of the terminal task processing network.

[0185] In one embodiment, the first communication interface 81 is specifically used for: determining a first energy consumption when executing the multiple tasks to be assigned through the edge task processing network based on the multiple tasks to be assigned; determining a second energy consumption when executing the multiple tasks to be assigned through the cloud task processing network based on the multiple tasks to be assigned; determining a third energy consumption when executing the multiple tasks to be assigned through the terminal task processing network based on the multiple tasks to be assigned; and performing a weighted summation of the first energy consumption, the second energy consumption, and the third energy consumption according to the second weight variables corresponding to the edge task processing network, the cloud task processing network, and the terminal task processing network, respectively, to obtain the total energy consumption.

[0186] In one embodiment, the first communication interface 81 is further specifically configured to: determine a first task transmission delay of the edge task processing network based on the task volume of the plurality of tasks to be assigned and the task transmission speed between the edge task processing network and the terminal task processing network; determine a first task processing delay of the edge task processing network based on the task volume of the plurality of tasks to be assigned and the task execution performance of the edge task processing network; determine a first transmission energy consumption of the terminal task processing network based on the first task transmission delay and the unit energy consumption of the terminal task processing network when transmitting tasks between the edge task processing network and the terminal task processing network; determine a first processing energy consumption of the terminal task processing network based on the first task processing delay and the unit energy consumption of the terminal task processing network when performing task processing on the edge task processing network; and add the first transmission energy consumption and the first processing energy consumption to obtain the first energy consumption.

[0187] In one embodiment, the first communication interface 81 is further specifically configured to: determine a second task processing latency of the cloud task processing network based on the task volume of the plurality of tasks to be assigned and the task execution performance of the cloud task processing network; determine a second task transmission latency of the cloud task processing network based on the task volume of the plurality of tasks to be assigned and the task transmission speed between the cloud task processing network and the terminal task processing network; determine a second transmission energy consumption of the terminal task processing network based on the second task transmission latency and the unit energy consumption of the terminal task processing network when transmitting tasks between the cloud task processing network and the terminal task processing network; determine a second processing energy consumption of the terminal task processing network based on the second task processing latency and the unit energy consumption of the terminal task processing network when performing task processing on the cloud task processing network; and add the second transmission energy consumption and the second processing energy consumption to obtain the second energy consumption.

[0188] In one embodiment, the first communication interface 81 is further specifically used for: determining the reference energy consumption of the terminal task processing network based on the task volume of the plurality of tasks to be assigned and the task execution performance of the terminal task processing network; and multiplying the reference energy consumption of the terminal task processing network and the energy consumption parameter of the terminal task processing network to obtain the third energy consumption.

[0189] In one embodiment, the processor 82 is further configured to: predict the allocation weights of each task processing network based on the total energy consumption and the processing latency, to obtain the predicted allocation weights of each task processing network; multiply the number of the plurality of tasks to be allocated by each task processing network by the predicted allocation weights of each task processing network, to obtain the number of tasks allocated by each task processing network; and for each task processing network, determine the tasks to be allocated by the number of tasks allocated by the task processing network as the task group corresponding to the task processing network.

[0190] In one embodiment, the processor 82 is further specifically configured to: traverse i and perform the following processes: based on the total energy consumption and the processing delay, predict the allocation weights of each task processing network for the i-th time according to the i-th explosion radius, to obtain the i-th candidate allocation weights of each task processing network; mutate the i-th candidate allocation weights of each task processing network according to the differential mutation rule to obtain the i-th predicted allocation weight; i is not less than 1 and not greater than N, where N indicates the maximum number of predictions for the allocation weights, and the i-th explosion radius is less than the (i+1)-th explosion radius; and determine the N-th predicted allocation weight as the predicted allocation weight.

[0191] In one embodiment, the processor 82 is further configured to: perform the following processing for each of the task processing networks: when there is a task to be assigned in the task group corresponding to the task processing network, perform task processing on the task to be assigned in the task group corresponding to the task processing network to obtain the task processing result corresponding to the task group.

[0192] It should be noted that the specific processing procedures of the first communication interface 81 and the processor 82 can be understood by referring to the task allocation method on the electronic device side described above.

[0193] Of course, in practical applications, the various components in electronic device 80 are coupled together through a first bus system 84. It can be understood that the first bus system 84 is used to realize the connection and communication between these components. In addition to a data bus, the first bus system 84 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, in... Figure 9 The general designated all buses as the first bus system 84.

[0194] The first memory 83 in this embodiment is used to store various types of data to support the operation of the electronic device 80. Examples of such data include any computer program used to operate on the electronic device 80.

[0195] The task allocation method for the electronic device side disclosed in the above embodiments of this application can be applied to the processor 82, or implemented by the processor 82. The processor 82 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above task allocation method for the electronic device side can be completed by the integrated logic circuit of the hardware in the processor 82 or by instructions in the form of software. The processor 82 may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 82 can implement or execute the task allocation methods, steps, and logic block diagrams for the electronic device side disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the task allocation method for the electronic device side disclosed in the embodiments of this application can be directly reflected as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium, which is located in the first memory 83. The processor 82 reads the information in the first memory 83 and combines its hardware to complete the steps of the aforementioned task allocation method for the electronic device side.

[0196] In an exemplary embodiment, the electronic device 80 may be implemented by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers (MCUs), microprocessors, or other electronic components to execute the aforementioned task allocation method on the electronic device side.

[0197] It is understood that the memory (including the first memory 83) in the embodiments of this application can be volatile memory or non-volatile memory, or both. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), ferromagnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM); the magnetic surface memory can be disk storage or magnetic tape storage. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), SyncLink Dynamic Random Access Memory (SLDRAM), and Direct Rambus Random Access Memory (DRRAM).The memory (including the first memory 83) described in the embodiments of this application is intended to include, but is not limited to, these and any other suitable types of memory.

[0198] In an exemplary embodiment, this application also provides a storage medium, namely a computer storage medium, specifically a computer-readable storage medium, such as a first memory 83 storing a computer program. This computer program can be executed by a processor 82 in an electronic device 80 to complete the steps of the task allocation method on the electronic device side described in the aforementioned embodiment. The computer-readable storage medium can be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface memory, optical disc, or CD-ROM.

[0199] It should be noted that terms such as "first," "second," and "third" are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0200] Furthermore, the technical solutions described in the embodiments of this application can be combined arbitrarily without conflict.

[0201] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A task allocation method, characterized in that, A task allocation node is applied to a cloud-edge computing network, wherein the cloud-edge computing network includes multiple task processing networks and the task allocation node, and the method includes: Obtain multiple tasks to be assigned, and based on the multiple tasks to be assigned, determine the processing latency when executing the multiple tasks to be assigned through the task processing network; Based on the multiple tasks to be assigned, determine the total energy consumption when executing the multiple tasks to be assigned through the task processing network; The following processing is performed on each i-th blast radius: based on the total energy consumption and the processing delay, the allocation weights of each task processing network are predicted for the i-th time to obtain the i-th candidate allocation weights of each task processing network; the i-th candidate allocation weights of each task processing network are mutated according to the differential mutation rule to obtain the i-th predicted allocation weights; i is not less than 1 and not greater than N, where N indicates the maximum number of predictions for the allocation weights, and the i-th blast radius is less than the (i+1)-th blast radius; The Nth prediction assignment weight is determined as the prediction assignment weight; The number of tasks to be assigned is multiplied by the predicted assignment weight of each task processing network to obtain the number of tasks assigned by each task processing network. For each of the task processing networks, the number of tasks to be assigned by the task processing network is determined as the task group corresponding to the task processing network. The number of tasks to be assigned in the task group is at least zero. When the task processing network performs task processing for the tasks to be assigned according to the task group, the overall task cost determined by the total energy consumption and the processing delay is minimized.

2. The method according to claim 1, characterized in that, The task processing network includes an edge task processing network, a cloud task processing network, and a terminal task processing network. The step of determining the processing latency when executing the multiple tasks to be assigned through the task processing network based on the multiple tasks to be assigned includes: Based on the plurality of tasks to be assigned, a first processing delay is determined when the plurality of tasks to be assigned are executed through the edge task processing network; Based on the plurality of tasks to be assigned, a second processing latency is determined when the plurality of tasks to be assigned are executed through the cloud task processing network; Based on the multiple tasks to be assigned, a third processing delay is determined when the multiple tasks to be assigned are executed through the terminal task processing network. The processing latency is obtained by weighting and summing the first processing latency, the second processing latency, and the third processing latency according to the first weight variables corresponding to the edge task processing network, the cloud task processing network, and the terminal task processing network, respectively.

3. The method according to claim 2, characterized in that, The step of determining the first processing latency when executing the multiple tasks to be assigned through the edge task processing network based on the multiple tasks to be assigned includes: Based on the task volume of the multiple tasks to be assigned and the task execution performance of the edge task processing network, the first task processing latency of the edge task processing network is determined. Based on the task volume of the multiple tasks to be assigned and the task transmission speed between the edge task processing network and the terminal task processing network, the first task transmission delay of the edge task processing network is determined. The first processing delay is obtained by adding the first task processing delay of the edge task processing network and the first task transmission delay of the edge task processing network.

4. The method according to claim 2, characterized in that, The step of determining the second processing latency when executing the multiple tasks to be assigned through the cloud task processing network based on the multiple tasks to be assigned includes: Based on the task volume of the multiple tasks to be assigned and the task execution performance of the cloud task processing network, the second task processing latency of the cloud task processing network is determined. Based on the task volume of the multiple tasks to be assigned and the task transmission speed between the cloud task processing network and the terminal task processing network, the second task transmission delay of the cloud task processing network is determined. The second processing delay is obtained by adding the second task processing delay of the cloud task processing network and the second task transmission delay of the cloud task processing network.

5. The method according to claim 2, characterized in that, The step of determining the third processing delay when executing the multiple tasks to be assigned through the terminal task processing network based on the multiple tasks to be assigned includes: Based on the workload of the multiple tasks to be assigned and the task execution performance of the terminal task processing network, a third processing delay is determined when the multiple tasks to be assigned are executed through the terminal task processing network.

6. The method according to claim 1, characterized in that, The task processing network includes an edge task processing network, a cloud task processing network, and a terminal task processing network. The step of determining the total energy consumption when executing the multiple tasks to be assigned through the task processing network, based on the multiple tasks to be assigned, includes: Based on the plurality of tasks to be assigned, a first energy consumption is determined when the plurality of tasks to be assigned are executed through the edge task processing network; Based on the plurality of tasks to be assigned, a second energy consumption is determined when the plurality of tasks to be assigned are executed through the cloud task processing network; Based on the multiple tasks to be assigned, a third energy consumption is determined when the multiple tasks to be assigned are executed through the terminal task processing network. The first energy consumption, the second energy consumption, and the third energy consumption are weighted and summed according to the second weight variables corresponding to the edge task processing network, the cloud task processing network, and the terminal task processing network, respectively, to obtain the total energy consumption.

7. The method according to claim 6, characterized in that, When the plurality of tasks to be assigned are executed through the edge task processing network, the first energy consumption is the energy consumption of the terminal task processing network when the plurality of tasks to be assigned are executed through the edge task processing network. The step of determining the first energy consumption when executing the multiple tasks to be assigned through the edge task processing network based on the multiple tasks to be assigned includes: Based on the task volume of the multiple tasks to be assigned and the task transmission speed between the edge task processing network and the terminal task processing network, the first task transmission delay of the edge task processing network is determined. Based on the task volume of the multiple tasks to be assigned and the task execution performance of the edge task processing network, the first task processing latency of the edge task processing network is determined. Based on the first task transmission delay and the unit consumption of the terminal task processing network when transmitting tasks between the edge task processing network and the terminal task processing network, the first transmission energy consumption of the terminal task processing network is determined. The first processing energy consumption of the terminal task processing network is determined based on the first task processing latency and the unit energy consumption of the terminal task processing network when the task is processed in the edge task processing network. The first energy consumption is obtained by adding the first transmission energy consumption and the first processing energy consumption.

8. The method according to claim 6, characterized in that, When the plurality of tasks to be assigned are executed through the cloud task processing network, the first energy consumption is the energy consumption of the terminal task processing network when the plurality of tasks to be assigned are executed through the cloud task processing network. The determination of the second energy consumption when executing the multiple tasks to be assigned through the cloud task processing network, based on the multiple tasks to be assigned, includes: Based on the task volume of the multiple tasks to be assigned and the task execution performance of the cloud task processing network, the second task processing latency of the cloud task processing network is determined. Based on the task volume of the multiple tasks to be assigned and the task transmission speed between the cloud task processing network and the terminal task processing network, the second task transmission delay of the cloud task processing network is determined. The second transmission energy consumption of the terminal task processing network is determined based on the second task transmission latency and the unit consumption of the terminal task processing network when transmitting tasks between the cloud task processing network and the terminal task processing network. The second processing energy consumption of the terminal task processing network is determined based on the second task processing latency and the unit energy consumption of the terminal task processing network when the task is processed in the cloud task processing network. The second transmission energy consumption and the second processing energy consumption are added together to obtain the second energy consumption.

9. The method according to claim 6, characterized in that, The determination of the third energy consumption when executing the multiple tasks to be assigned through the terminal task processing network based on the multiple tasks to be assigned includes: Based on the task volume of the multiple tasks to be assigned and the task execution performance of the terminal task processing network, the reference energy consumption of the terminal task processing network is determined. The third energy consumption is obtained by multiplying the reference energy consumption of the terminal task processing network and the energy consumption parameter of the terminal task processing network.

10. The method according to claim 1, characterized in that, After determining the number of tasks to be assigned by the task processing network as the task group corresponding to the task processing network, the method further includes: The following processing is performed on each of the aforementioned task processing networks: When there is a task to be assigned in the task group corresponding to the task processing network, the task to be assigned in the task group corresponding to the task processing network is processed through the task processing network to obtain the task processing result corresponding to the task group.

11. A task allocation device, applied to a task allocation node in a cloud-edge computing network, the cloud-edge computing network comprising multiple task processing networks and the task allocation node, characterized in that, include: An acquisition module is used to acquire multiple tasks to be assigned, and based on the multiple tasks to be assigned, determine the processing latency when executing the multiple tasks to be assigned through the task processing network; The energy consumption module is used to determine the total energy consumption when executing the multiple tasks to be assigned through the task processing network, based on the multiple tasks to be assigned. The task allocation module is used to traverse i and perform the following processing: according to the i-th explosion radius, based on the total energy consumption and the processing delay, perform the i-th prediction of the allocation weight of each task processing network to obtain the i-th candidate allocation weight of each task processing network. According to the differential mutation rule, the i-th candidate allocation weight of each task processing network is mutated to obtain the i-th predicted allocation weight; i is not less than 1 and not greater than N, where N is used to indicate the maximum number of predictions for the allocation weight, and the i-th explosion radius is less than the (i+1)-th explosion radius; the N-th prediction allocation weight is determined as the prediction allocation weight. The number of tasks to be assigned is multiplied by the predicted allocation weight of each task processing network to obtain the number of tasks assigned by each task processing network. For each task processing network, the number of tasks to be assigned by the task processing network is determined as the task group corresponding to the task processing network. The number of tasks to be assigned in the task group is at least zero. When the task processing network performs task processing for the tasks to be assigned according to the task group, the overall task cost determined by the total energy consumption and the processing delay is minimized.

12. An electronic device, characterized in that, include: A processor and a first memory for storing computer programs capable of running on the processor; When the processor is used to run the computer program, it performs the steps of the method according to any one of claims 1 to 10.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Multi-user resource allocation method, device and system and storage medium

    CN111511028A

  • Fog computing resource scheduling method based on improved particle swarm optimization and neural network

    CN114237889A