Task unloading method and related equipment

Through the improved collaborative cache algorithm and deep Q network (DQN) algorithm, the problem of increased computing and communication tasks in the distribution network is solved, efficient task offloading and resource scheduling is achieved, and the overall efficiency of the system and the reliability and timeliness of task processing are significantly improved.

CN120075895APending Publication Date: 2025-05-30FIBRLINK NETWORKS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510022084.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-07
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

The demand for computing and communication tasks in the distribution network has increased significantly. Traditional computing architectures are difficult to meet the high-precision and real-time task processing needs. Edge computing is prone to computing and communication bottlenecks in multi-tasking and high-load scenarios. How to coordinate resource scheduling and task offload decisions between cloud, edge and terminal devices is also a key issue.

Method used

A task offload method is proposed, through an improved collaborative caching algorithm, the local cache of terminal devices is extended to the collaborative caching network, dynamically adjust cache priority, clean up redundant data and terminal collaboration, and predict high-frequency task requirements in advance in combination with historical data analysis. At the same time, a task offloading algorithm based on Deep Q Network (DQN) is introduced to sense the dynamic state of the cloud, edge and terminal in real time, and flexibly adjust the offloading strategy.

Benefits of technology

It significantly improves the cache hit rate, reduces task response delay, maximizes resource utilization, continuously reduces computing delay and resource overhead, effectively allocates cloud, edge and end resources, avoids resource waste and node overload, and improves the overall system efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120075895A_ABST
    Figure CN120075895A_ABST
Patent Text Reader

Abstract

The invention provides a task unloading method and related equipment. The method comprises the following steps: determining whether a target task exists in a cache network or not; in response to the fact that the target task does not exist in the cache network, generating a first action by an intelligent agent according to the target task, and determining an unloading position of the target task according to the first action; and unloading the target task according to a first strategy at the unloading position. According to the embodiment of the invention, by dynamically adjusting the cache priority, cleaning redundant data and cooperating with the terminal, the cache hit rate is remarkably increased, and the task response delay is reduced. And in combination with historical data analysis, high-frequency task requirements are predicted in advance, and maximum utilization of resources is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of task offloading, and in particular to a task offloading method and related equipment. Background Art

[0002] With the development of new power systems, distribution networks are moving towards an open, intelligent, flexible and clean operation mode, gradually realizing the deep integration of information flow, power flow and energy flow. The large-scale access of renewable energy, energy storage devices and controllable loads has significantly increased the demand for computing and communication tasks in distribution networks, and the complexity of load control has also increased significantly. The randomness and volatility of distributed renewable energy have posed severe challenges to the safety and stability of power systems, which may cause large fluctuations in node voltage and even safety risks. Traditional computing architectures are difficult to meet the needs of high-precision, real-time task processing.

[0003] In order to solve the problem of increasing computing and communication tasks in the distribution network, edge computing has been introduced as a new computing architecture. Through the cloud-edge-end collaborative architecture, some computing tasks are shared to the distribution station area, significantly reducing the burden on the main station. Edge computing uses localized resources to perform preliminary processing on large-scale monitoring data, reduce communication overhead, and improve system response speed and overall efficiency. For tasks with high real-time requirements (such as transformer protection and fault detection), edge computing can achieve accurate monitoring, intelligent analysis and policy control through localized processing, overcoming the problem of high latency in traditional architectures. However, edge computing is limited by bandwidth, computing power and storage resources in multi-task and high-load scenarios, and is prone to computing and communication bottlenecks. In addition, how to coordinate resource scheduling and task offloading decisions between cloud, edge and terminal devices is also a key issue that needs to be solved for the efficient operation of the distribution system. Summary of the invention

[0004] In view of this, the purpose of this application is to provide a task offloading method and related equipment.

[0005] Based on the above purpose, the present application provides a task offloading method, including:

[0006] Confirm whether the target task exists in the cache network;

[0007] In response to the target task not existing in the cache network, the agent generates a first action according to the target task, and determines an unloading location of the target task according to the first action;

[0008] At the unloading location, the target task is unloaded according to a first strategy.

[0009] In a possible implementation, the method further includes:

[0010] Obtain and record the first action, the offloading location, and the next state information corresponding to the target task;

[0011] Based on the first action, the offloading location, and the next state information, determine the computing delay;

[0012] Update the agent with the goal of minimizing the computing delay.

[0013] In a possible implementation, the offloading of the target task according to the first policy at the offloading location includes:

[0014] Obtain the first cache space at the offloading location;

[0015] Calculate the fitness value of the target task;

[0016] Offload the target task according to the relationship between the fitness value and the first cache space.

[0017] In a possible implementation, the fitness value is calculated by the following formula:

[0018] fit(m,k)=(S k -Q k )·ε(F k -F avg )

[0019] where m represents the edge server number, k represents the device number, S k represents the total cost without considering caching, Q k represents the total cost spent on the task execution cache model, F k represents the occurrence frequency of the task in the last T time slots, F avg represents the average occurrence frequency of all tasks generated in the last T time slots, and ε represents the scaling factor.

[0020] In a possible implementation, the offloading of the target task according to the relationship between the fitness value and the first cache space includes:

[0021] In response to the fitness value meeting the requirements of the first cache space, offload the target task to the offloading location and update the cache status at the offloading location;

[0022] In response to the fitness value not meeting the requirements of the first cache space, obtain the priorities of all cached contents at the offloading location, clear the cached content with the lowest priority, and offload the target task to the offloading location; the priority is determined by the fitness value.

[0023] In a possible implementation, the method further includes:

[0024] Obtaining historical offloading data of the offloading location;

[0025] Determining future high-frequency tasks according to the historical offloading data;

[0026] Based on the future high-frequency tasks, reserving the cache space of the offloading location in advance.

[0027] Based on the same inventive concept, an embodiment of the present application further provides a task offloading device, including:

[0028] A confirmation module, configured to confirm whether a target task exists in the cache network;

[0029] A generation module, configured to, in response to the target task not existing in the cache network, generate a first action according to the target task by an agent, and determine the offloading location of the target task according to the first action;

[0030] An offloading module, configured to offload the target task according to a first policy at the offloading location.

[0031] Based on the same inventive concept, an embodiment of the present application further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where when the processor executes the program, it implements the task offloading method described in any one of the above.

[0032] Based on the same inventive concept, an embodiment of the present application further provides a non-transitory computer-readable storage medium, where the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to cause the computer to execute the task offloading method described in any one of the above.

[0033] Based on the same inventive concept, an embodiment of the present application further provides a computer program product, which includes computer program instructions, and the computer instructions are used to cause the computer program product to execute the task offloading method described in any one of the above.

[0034] As can be seen from the above, the task offloading method and related devices provided by this application. By using an improved collaborative caching algorithm, the local cache of the terminal device is extended to the collaborative caching network. Through dynamically adjusting the cache priority, cleaning redundant data, and terminal collaboration, the cache hit rate is significantly improved, and the task response latency is reduced. Combining historical data analysis, the high-frequency task requirements are predicted in advance to achieve the maximization of resource utilization. On this basis, a task offloading algorithm based on Deep Q Network (DQN) is introduced. By real-time sensing the dynamic states of the cloud, edge, and terminal, the offloading strategy is flexibly adjusted. The DQN algorithm continuously reduces the computing latency and resource overhead through experience replay and policy optimization, while effectively allocating the resources of the cloud, edge, and terminal to avoid resource waste and node overload. This application supports differential strategies in multi-task scenarios to improve the overall system efficiency. In addition, the overall method of this application still shows excellent performance under complex wireless communication conditions and heterogeneous terminal environments. Through the organic combination of the improved collaborative caching algorithm and deep reinforcement learning, not only the reliability and timeliness of task processing are greatly improved, but also a more intelligent and efficient solution is provided for cloud-edge-terminal collaborative computing. This joint strategy based on cache optimization and deep reinforcement learning is a breakthrough that cannot be achieved by traditional methods, opening up a new technical direction and practical value for the field of computing task offloading. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] To more clearly illustrate the technical solutions in this application or related technologies, the following will briefly introduce the drawings required for use in the embodiments or related technology descriptions. Obviously, the drawings in the following description are only the embodiments of this application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0036] Figure 1 Schematic diagram of the task offloading method process for the embodiments of this application;

[0037] Figure 2 Schematic diagram of the edge computing system model for the distribution network system in the embodiments of this application;

[0038] Figure 3 Schematic diagram of the structure of the DQN computing task offloading algorithm for the embodiments of this application;

[0039] Figure 4 Schematic diagram of the structure of the task offloading device for the embodiments of this application;

[0040] Figure 5 Schematic diagram of the structure of the electronic device for the embodiments of this application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0041] To make the objectives, technical solutions, and advantages of this application clearer and more understandable, the following further elaborates on this application in detail with reference to specific embodiments and the accompanying drawings.

[0042] It should be noted that unless otherwise defined, the technical terms or scientific terms used in the embodiments of this application should have the ordinary meaning understood by those with ordinary skills in the field to which this application pertains. The "first", "second", and similar terms used in the embodiments of this application do not denote any order, quantity, or importance, but are only used to distinguish different components. Words such as "including" or "comprising" mean that the elements or objects appearing before this word cover the elements or objects listed after this word and their equivalents, without excluding other elements or objects. Words such as "connected" or "linked" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right", etc. are only used to indicate relative positional relationships, and when the absolute position of the object being described changes, the relative positional relationship may also change accordingly.

[0043] It can be understood that before using the technical solutions of the various embodiments in this disclosure, the types, usage scopes, usage scenarios, etc. of the personal information involved will be informed to the user in an appropriate manner and the user's authorization will be obtained.

[0044] For example, when responding to receiving an active request from the user, a prompt message is sent to the user to clearly prompt the user that the operation requested by them will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application program, server, or storage medium that performs the operations of the technical solutions of this disclosure based on the prompt message.

[0045] As an optional but non-limiting implementation manner, the way of sending a prompt message to the user in response to receiving an active request from the user can be, for example, in the form of a pop-up window. The prompt message can be presented in text in the pop-up window. In addition, the pop-up window can also carry selection controls for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0046] It can be understood that the above process of notifying and obtaining the user's authorization is only illustrative and does not limit the implementation manner of this disclosure. Other ways that comply with relevant laws and regulations can also be applied to the implementation manner of this disclosure.

[0047] As mentioned in the background technology section, with the development of new power systems, distribution networks are moving towards an open, intelligent, flexible and clean operation mode, gradually realizing the deep integration of information flow, power flow and energy flow. The large-scale access of renewable energy, energy storage devices and controllable loads has significantly increased the demand for computing and communication tasks in distribution networks, and the complexity of load control has also increased significantly. The randomness and volatility of distributed renewable energy pose severe challenges to the safety and stability of power systems, which may cause large fluctuations in node voltage and even safety risks, while traditional computing architectures are difficult to meet the needs of high-precision, real-time task processing.

[0048] In order to solve the problem of increasing computing and communication tasks in the distribution network, edge computing has been introduced as a new computing architecture. Through the cloud-edge-end collaborative architecture, some computing tasks are shared to the distribution station area, significantly reducing the burden on the main station. Edge computing uses localized resources to perform preliminary processing on large-scale monitoring data, reduce communication overhead, and improve system response speed and overall efficiency. For tasks with high real-time requirements (such as transformer protection and fault detection), edge computing can achieve accurate monitoring, intelligent analysis and policy control through localized processing, overcoming the problem of high latency in traditional architectures. However, edge computing is limited by bandwidth, computing power and storage resources in multi-task and high-load scenarios, and is prone to computing and communication bottlenecks. In addition, how to coordinate resource scheduling and task offloading decisions between cloud, edge and terminal devices is also a key issue that needs to be solved for the efficient operation of the distribution system.

[0049] Considering the above, the embodiments of the present application propose a task offloading method. By using an improved collaborative caching algorithm, the local cache of the terminal device is extended to the collaborative caching network. Through dynamically adjusting the cache priority, cleaning redundant data, and terminal collaboration, the cache hit rate is significantly improved, and the task response delay is reduced. Combining historical data analysis, the high-frequency task requirements are predicted in advance to achieve the maximization of resource utilization. On this basis, a task offloading algorithm based on Deep Q Network (DQN) is introduced. By real-time sensing the dynamic states of the cloud, edge, and terminal, the offloading strategy is flexibly adjusted. The DQN algorithm continuously reduces the computing delay and resource overhead through experience replay and policy optimization, while effectively allocating the resources of the cloud, edge, and terminal to avoid resource waste and node overload. The present application supports differentiated strategies in multi-task scenarios to improve the overall system efficiency. In addition, the overall method of the present application still exhibits excellent performance under complex wireless communication conditions and heterogeneous terminal environments. Through the organic combination of the improved collaborative caching algorithm and deep reinforcement learning, not only the reliability and timeliness of task processing are greatly improved, but also a more intelligent and efficient solution is provided for cloud-edge-terminal collaborative computing. This joint strategy based on cache optimization and deep reinforcement learning is a breakthrough that cannot be achieved by traditional methods, opening up a new technical direction and practical value for the field of computing task offloading.

[0050] The technical solutions of the embodiments of the present application will be described in detail below through specific embodiments.

[0051] Reference Figure 1 , the task offloading method of the embodiments of the present application includes the following steps:

[0052] Step S101, confirm whether the target task exists in the caching network;

[0053] Step S102, in response to the target task not existing in the caching network, the agent generates a first action according to the target task, and determines the offloading location of the target task according to the first action;

[0054] Step S103, at the offloading location, offload the target task according to the first strategy.

[0055] Reference Figure 2 , which is a schematic diagram of the edge computing system model for the distribution network system in the embodiments of the present application.

[0056] Reference Figure 3 , which is a schematic diagram of the structure of the DQN computing task offloading algorithm in the embodiments of the present application.

[0057] The following combines Figure 1 , Figure 2 and Figure 3Describe the embodiments of the present application.

[0058] For step S101, before confirming whether the target task exists in the cache network, it is necessary to collect the environmental dynamic factors of the Multi-Access Edge Computing (MEC) server, including bandwidth resources, channel conditions, available computing power, etc., and construct a global resource information model.

[0059] Through real-time monitoring, collect dynamic resource information such as the bandwidth resources, channel conditions, and available computing power of the edge server, and construct a unified resource information model for subsequent decision-making.

[0060] For example, in an industrial Internet of Things environment, there are multiple edge servers providing computing services. The current bandwidth of edge server A is 10 Mbps, and the available computing power is 50 GFLOPS; the bandwidth of edge server B is 20 Mbps, and the available computing power is 80 GFLOPS. The system integrates this information into the global resource model to facilitate the intelligent agent to select the task offloading path subsequently.

[0061] Furthermore, for step S101, if it has been cached, directly extract the result from the cache. For example, a drone that needs to calculate object detection has stored the processing result of the same task in the edge server cache. When the drone requests a similar task again, directly extract the result from the cache, saving the time and resources for recalculation.

[0062] If it is not cached, then proceed to the subsequent steps, use the intelligent agent to generate an action, and select a suitable computing method. For example, if the image data requested by the drone task does not exist in the cache, it is necessary to start the real-time computing process and continue to perform the subsequent operations.

[0063] For step S102, in response to the target task not existing in the cache network, according to the target task, the intelligent agent generates a first action, and according to the first action, determines the offloading location of the target task.

[0064] In this embodiment, the intelligent agent generates a task offloading action according to the task parameters (data volume, computational complexity) and the global resource information model, and selects a suitable computing method.

[0065] For example, the intelligent agent analyzes that the computational volume of a certain video stream processing task is large and difficult to bear by the local device, but the bandwidth and computing power of the edge server are relatively sufficient, so it decides to offload the task to the edge server for execution.

[0066] Furthermore, for step S103, at the offloading location, offload the target task according to the first policy.

[0067] In some embodiments, unloading the target task according to the first policy at the unloading position includes: obtaining a first cache space at the unloading position; calculating a fitness value of the target task; and unloading the target task according to the relationship between the fitness value and the first cache space.

[0068] In some embodiments, the fitness value is calculated by the following formula:

[0069] fit(m,k) = (S k -Q k )·ε(F k -F avg )

[0070] where m represents the edge server number, k represents the device number, S k represents the total cost without considering caching, Q k represents the total cost spent by the task execution cache model, F k represents the occurrence frequency of the task in the last T time slots, F avg represents the average occurrence frequency of all tasks generated in the last T time slots, and ε represents a scaling factor.

[0071] In some embodiments, unloading the target task according to the relationship between the fitness value and the first cache space includes: in response to the fitness value meeting the requirements of the first cache space, unloading the target task to the unloading position and updating the cache status of the unloading position; in response to the fitness value not meeting the requirements of the first cache space, obtaining the priorities of all cached contents in the unloading position, clearing the cached content with the lowest priority, and unloading the target task to the unloading position; the priority is determined by the fitness value.

[0072] In this embodiment, after the terminal device connects to the edge server, it first queries the local cache space and the cooperative cache network, then collects the cached contents of all MEC servers and the cached contents of the terminal device to obtain the global status information of the cooperative cache. Then it judges whether the remaining cache space of the edge server is sufficient to accommodate the results of all tasks, and finally calculates the fitness of each task, and the fitness calculation formula is as above.

[0073] The foregoing fitness can be divided into two parts: the first part represents the cost saved by the terminal device's execution cache model compared to the cacheless model, and the higher the saved cost, the greater the fitness of such tasks. The second part indicates that the higher the frequency of such tasks, the higher the fitness.

[0074] Furthermore, after evaluating the fitness of each task based on factors such as the importance, caching overhead, and frequency of the task, if the cache space of the current edge server is insufficient, the content of low-fitness tasks is cleared, and the results of high-value tasks are preferentially retained. Then, the local cache of the terminal device is used as a supplement to the collaborative cache to improve the cache hit rate and resource utilization. Finally, combined with historical data, cache space is reserved in advance for high-frequency tasks to optimize the task response time.

[0075] In this embodiment, if the result of a certain video analysis task has been stored in Edge Server A, the system will calculate its fitness value, that is, the availability of the task result for current other camera tasks. If the fitness value of the new task is higher than the cache space threshold of the edge server, the task result is directly stored in the cache and the cache status is updated. If the space is insufficient, the cache priority is dynamically adjusted. For example, redundant content with low fitness is preferentially cleared to free up space for storing the new task result. In addition, by analyzing historical data, future high-frequency tasks can be predicted. For example, the illegal detection task during the traffic peak period has a higher cache requirement, and the system can reserve cache space in advance, thereby optimizing the task response time.

[0076] Taking an actual process as an example, a video captured by a traffic camera needs to analyze vehicle violations. The system first checks whether the analysis results of similar tasks are cached. For example, cameras at adjacent intersections may have completed such analyses. If a cache hit is found, the result is directly returned and the task ends. If the cache miss occurs, the agent decides whether to process the task by a neighboring MEC server or partially offload it to the cloud according to DQN. Suppose the agent chooses to offload the task to MEC Server B, but the cache space of Server B is already insufficient. The system will start the collaborative cache algorithm to clear the old task results with low priority to free up space for the new task. At the same time, the local cache of the camera is used to collaboratively expand the edge cache range, thereby improving the overall cache hit rate. After the task is completed, the result is stored in the collaborative cache network for reuse by subsequent similar tasks.

[0077] In some embodiments, the method further includes: obtaining historical offloading data of the offloading location; determining future high-frequency tasks according to the historical offloading data; and performing a reservation process on the cache space of the offloading location in advance based on the future high-frequency tasks.

[0078] In this embodiment, in the intelligent transportation system, multiple cameras monitor the traffic conditions at intersections in real time and send the captured video images to a nearby edge computing server for analysis. By analyzing historical data, it is found that during the morning and evening rush hours (such as 7:00 - 9:00 in the morning and 17:00 - 19:00 in the evening), the vehicle flow statistics tasks received by the system increase significantly, accounting for more than 70% of the total task volume. During the noon period (such as 12:00 - 14:00), the request frequency of pedestrian behavior analysis tasks is relatively high. In addition, the traffic monitoring task volume on Monday during the peak period is generally 20% higher than that on other working days.

[0079] Based on these historical data, the improved collaborative caching algorithm predicts the distribution law of future high-frequency tasks. For example, at 6:30 before the morning rush hour, the system will automatically reserve a certain amount of edge server cache space to store models and historical data related to vehicle flow statistics. In this way, when the task request arrives, the processing process can be more efficient without reloading the model or processing data from a remote end. Similarly, at 11:30 before the noon period, the system will adjust the caching policy, release some space, and pre-load relevant models and data for pedestrian behavior analysis to ensure that the task response time during the noon period is minimized.

[0080] Such a prediction mechanism makes the allocation of cache resources more accurate and avoids waste of cache space. For example, if an edge server originally stores a large amount of low-priority night vehicle trajectory data models, but the task traffic at night is low, the system will clean up these data before the peak period arrives to reserve enough cache space for the upcoming high-frequency tasks. This dynamic adjustment mechanism significantly improves the task response speed and optimizes the overall performance of the system.

[0081] In some embodiments, the method further includes: obtaining and recording the first action, the offloading location, and the next state information corresponding to the target task; determining the computing delay based on the first action, the offloading location, and the next state information; and updating the agent with the goal of minimizing the computing delay.

[0082] In this embodiment, the DQN algorithm is used to update the agent. Specifically, first, the state space is defined, including the parameters of the task (size, computational complexity) and the resource state of the system (bandwidth, computing power, etc.). The action space is defined, which contains options for the task to be selected for offloading to local computing, edge servers, or cloud servers. The reward function is defined to evaluate the effect of the task offloading strategy, and the goal is to minimize the system computing delay. Then, the DQN model is trained based on episodes. In each episode, starting from the initial state, the agent selects an action according to the policy, makes a decision on task offloading, calculates the immediate reward based on the offloading result, and stores the state, action, reward, and new state in the experience replay pool. Samples are randomly drawn from the experience replay pool to update the parameters of the deep neural network, continuously optimizing the task offloading strategy. Then, the parameters of the DQN algorithm are continuously optimized through the feedback mechanism, enabling the model to gradually converge to the optimal offloading strategy. Based on the training results, the optimized offloading strategy model is output as an offloading decision-making tool for actual deployment, which is applied to task allocation and resource scheduling in real time. During the deployment process, the execution effect of the task is continuously monitored, new data is dynamically added to the experience replay pool, and the DQN model is retrained regularly to adapt to environmental changes, and the training results are output, and it ends.

[0083] In this embodiment, during the reinforcement learning process of task offloading, the agent will continuously optimize the strategy through the DQN algorithm. For example, in the initial stage, the agent may select an MEC server with overloaded computing resources due to insufficient estimation, resulting in a high task delay. After recording the state, action, and reward of task offloading in the replay pool, the agent will retrain the deep Q-network and gradually learn a more reasonable offloading strategy. When the system processes a new camera task, it will quickly make a decision on the best offloading plan according to the updated strategy. Eventually, after multiple episodes of training and optimization, DQN will learn an efficient task offloading strategy, significantly reducing the system computing delay and improving the overall resource utilization rate.

[0084] As can be seen from the above embodiments, the task offloading method described in the embodiments of the present application extends the local cache of the terminal device to the collaborative cache network by using an improved collaborative caching algorithm. By dynamically adjusting the cache priority, cleaning redundant data, and terminal collaboration, the cache hit rate is significantly improved, and the task response delay is reduced. Combining historical data analysis, predicting high-frequency task requirements in advance, and realizing the maximization of resource utilization. On this basis, a task offloading algorithm based on Deep Q Network (DQN) is introduced. By real-time perceiving the dynamic states of the cloud, edge, and terminal, the offloading strategy is flexibly adjusted. The DQN algorithm continuously reduces the computing delay and resource overhead through experience replay and policy optimization, while effectively allocating the resources of the cloud, edge, and terminal, avoiding resource waste and node overload. The present application supports differential strategies in multi-task scenarios, improving the overall efficiency of the system. In addition, the overall method of the present application still exhibits excellent performance under complex wireless communication conditions and heterogeneous terminal environments. Through the organic combination of the improved collaborative caching algorithm and deep reinforcement learning, not only the reliability and timeliness of task processing are greatly improved, but also a more intelligent and efficient solution is provided for cloud-edge-terminal collaborative computing. This joint strategy based on cache optimization and deep reinforcement learning is a breakthrough that cannot be achieved by traditional methods

[0085] It should be noted that the method of the embodiments of the present application can be executed by a single device, such as a computer or a server. The method of this embodiment can also be applied to a distributed scenario, and completed by multiple devices cooperating with each other. In this case of a distributed scenario, one of the multiple devices can only execute one or more steps of the method of the embodiments of the present application, and these multiple devices will interact with each other to complete the described method

[0086] It should be noted that some embodiments of the present application have been described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be executed in a different order than in the above embodiments and still achieve the desired results. Additionally, the processes depicted in the figures do not necessarily require the particular order or sequential order shown to achieve the desired results. In certain embodiments, multi-tasking and parallel processing are also possible or may be advantageous

[0087] Based on the same inventive concept, corresponding to the method of any of the above embodiments, the present application also provides a task offloading device

[0088] Referring to Figure 4 , the task offloading device includes:

[0089] A confirmation module 41, configured to confirm whether a target task exists in the cache network

[0090] A generation module 42, configured to, in response to the target task not existing in the cache network, generate a first action according to the target task, and determine an offloading location of the target task according to the first action;

[0091] An offloading module 43, configured to offload the target task according to a first policy at the offloading location.

[0092] For the convenience of description, when describing the above device, various modules are described separately according to their functions. Of course, when implementing the present application, the functions of each module can be implemented in one or more software and / or hardware.

[0093] The device in the above embodiment is used to implement the corresponding task offloading method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be elaborated herein.

[0094] Based on the same inventive concept, corresponding to the method in any of the above embodiments, the present application further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor, when executing the program, implements the task offloading method in any of the above embodiments.

[0095] Figure 5 FIG. shows a more specific schematic diagram of the hardware structure of the electronic device provided in this embodiment. The device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. Among them, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are communicatively connected to each other inside the device through the bus 1050.

[0096] The processor 1010 may be implemented in a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, etc., and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0097] The memory 1020 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage devices, dynamic storage devices, etc. The memory 1020 can store the operating system and other application programs. When implementing the technical solutions provided in the embodiments of this specification through software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.

[0098] The input / output interface 1030 is used to connect to the input / output module to achieve information input and output. The input / output module can be configured as a component in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Among them, the input device can include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device can include a display, a speaker, a vibrator, an indicator light, etc.

[0099] The communication interface 1040 is used to connect to the communication module (not shown in the figure) to achieve communication interaction between this device and other devices. Among them, the communication module can achieve communication through wired means (such as USB, network cable, etc.) or through wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0100] The bus 1050 includes a path for transmitting information between various components of the device (such as the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).

[0101] It should be noted that although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040, and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, those skilled in the art can understand that the above device may also only include the components necessary to implement the solutions of the embodiments of this specification and do not have to include all the components shown in the figure.

[0102] The electronic device in the above embodiments is used to implement the corresponding task offloading method in any of the foregoing embodiments and has the beneficial effects of the corresponding method embodiments, which will not be elaborated here.

[0103] Based on the same inventive concept, corresponding to the method in any of the above embodiments, the present application also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the task offloading method as described in any of the above embodiments.

[0104] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tapes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device.

[0105] The computer instructions stored in the storage medium of the above embodiment are used to cause the computer to execute the task offloading method described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be elaborated here.

[0106] Based on the same inventive concept, corresponding to the task offloading method described in any of the above embodiments, the present disclosure also provides a computer program product, which includes computer program instructions. In some embodiments, the computer program instructions can be executed by one or more processors of the computer to cause the computer and / or the processor to execute the task offloading method. Corresponding to the execution subjects corresponding to the steps in each embodiment of the task offloading method, the processor that executes the corresponding steps can belong to the corresponding execution subject.

[0107] The computer program product of the above embodiment is used to cause the computer and / or the processor to execute the task offloading method described in any of the above embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be elaborated here.

[0108] Those of ordinary skill in the art should understand that: the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of the present application (including the claims) is limited to these examples; under the concept of the present application, the technical features in the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations in different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of brevity.

[0109] In addition, for simplicity of explanation and discussion, and in order not to make the embodiments of the present application difficult to understand, well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided drawings. Further, the devices may be shown in block diagram form in order to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that details of the implementation of these block diagram devices are highly dependent on the platform on which the embodiments of the present application are to be implemented (i.e., these details should be fully within the understanding of those skilled in the art). In cases where specific details (such as circuits) are set forth to describe exemplary embodiments of the present application, it will be apparent to those skilled in the art that the embodiments of the present application may be practiced without these specific details or with variations of these specific details. Accordingly, these descriptions should be considered illustrative rather than restrictive.

[0110] Although the present application has been described in connection with specific embodiments thereof, many alternatives, modifications, and variations of these embodiments will be apparent to those of ordinary skill in the art in light of the foregoing description. For example, other memory architectures (such as dynamic RAM (DRAM)) may be used with the embodiments discussed.

[0111] Embodiments of the present application are intended to cover all such alternatives, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of the embodiments of the present application shall be included within the protection scope of the present application.

Claims

1. A task offloading method, characterized in that: include: Confirm whether the target task exists in the cache network; In response to the target task not existing in the cache network, the agent generates a first action according to the target task, and determines an unloading location of the target task according to the first action; At the unloading location, the target task is unloaded according to a first strategy.

2. The method according to claim 1, characterized in that The method further comprises: Acquire and record the first action, the unloading position and the next state information corresponding to the target task; Determining a calculation delay based on the first action, the unloading position, and the next state information; The agent is updated with the goal of minimizing the computational delay.

3. The method according to claim 1, characterized in that: The step of unloading the target task at the unloading location according to a first strategy includes: Acquire a first cache space of the unloading location; Calculating the fitness value of the target task; The target task is unloaded according to the relationship between the fitness value and the first cache space.

4. The method according to claim 3, characterized in that The fitness value is calculated by the following formula: fit(m,k)=(S k -Q k )·ε(F k -F avg ) Where m represents the edge server number, k represents the device number, S k Indicates the total cost without considering the cache, Q k represents the total cost of task execution cache model, F k represents the frequency of occurrence of tasks in the last T time slots, F avg represents the average occurrence frequency of all tasks generated in the last T time slots, and ε represents the scaling factor.

5. The method according to claim 3, characterized in that: The step of unloading the target task according to the relationship between the fitness value and the first cache space includes: In response to the fitness value satisfying the requirement of the first cache space, unloading the target task to the unloading location, and updating the cache state of the unloading location; In response to the fitness value not satisfying the requirement of the first cache space, obtaining the priority of all cache contents in the unloading location, clearing the cache contents with the lowest priority, and unloading the target task to the unloading location; the priority is determined by the fitness value.

6. The method according to claim 3, characterized in that The method further comprises: Acquire historical uninstallation data of the uninstallation location; determining future high-frequency tasks based on the historical offloading data; The unloading location cache space is reserved in advance based on the future high-frequency tasks.

7. A task offloading device, characterized in that: include: A confirmation module, configured to confirm whether the target task exists in the cache network; A generation module, configured to generate a first action by an agent according to the target task in response to the target task not existing in the cache network, and determine an unloading location of the target task according to the first action; The unloading module is configured to unload the target task at the unloading location according to a first strategy.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 6.

10. A computer program product, comprising computer program instructions, which, when executed on a computer, cause the computer to execute the method according to any one of claims 1 to 6.