Self-adaptive task unloading method and system based on online and offline two-stage joint matching

Through the online and offline two-stage joint matching adaptive task offloading method, the problem of decreased task processing efficiency caused by changes in task arrival density is solved, and efficient resource utilization and delay reduction are achieved in the edge computing environment.

CN120704880APending Publication Date: 2025-09-26NANJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510818001.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-18
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

Existing technologies cannot effectively address the problem of decreased task processing efficiency and increased latency caused by changes in task arrival density over time. Especially in edge computing environments, relying solely on edge servers may lead to server overload and task processing failure.

Method used

An adaptive task offloading method based on online and offline two-stage joint matching is constructed. By obtaining the edge server communication parameters and task characteristic parameters, the pre-established cloud-edge-end collaborative architecture model and the two-stage joint matching strategy model are used to dynamically adjust the task offloading strategy, including the online matching and offline matching stages, combined with the global buffer and adjustable threshold to achieve intelligent adaptation of tasks.

Benefits of technology

It achieves efficient resource utilization in both sparse and dense task scenarios, dynamically adjusts policy parameters through real-time monitoring of performance indicators, optimizes the task offloading process, reduces delays and improves task processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120704880A_ABST
    Figure CN120704880A_ABST
Patent Text Reader

Abstract

The invention discloses a self-adaptive task unloading method and system based on online and offline two-stage joint matching, and relates to the technical field of mobile communication and computers, and the method comprises the steps: obtaining edge server communication parameters, inputting the edge server communication parameters into a pre-established cloud edge-end collaborative architecture model for parameter initialization, the method comprises the following steps: initializing an edge server to obtain initialized edge server communication parameters, pre-defining task characteristic parameters based on the initialized edge server communication parameters, inputting the task characteristic parameters into a pre-established dual-stage joint matching strategy model, and determining a matching mode based on task types of the task characteristic parameters to obtain a global task set and a preference list; and inputting the global task set and the preference list into a pre-established task unloading execution and resource management model, outputting an execution result based on a matching strategy, and performing adaptive strategy optimization based on the execution result and a preset dynamic threshold value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of mobile communications and computer technology, and in particular to a method and system for adaptive task offloading based on online and offline dual-stage joint matching. Background Art

[0002] In recent years, with the rapid development and iteration of 5G, the Internet of Things, and cloud computing technologies, the number of internet applications and smart devices has experienced explosive growth. In traditional cloud computing architectures, central cloud clusters possess resource pools far exceeding those of mobile devices, with greater energy reserves, computing resources, and the ability to withstand greater computational loads. Mobile devices can connect to remote cloud servers within the central cloud cluster, and tasks that cannot be processed locally are typically offloaded to the remote cloud servers. However, the central cloud cluster is far away from local mobile devices, and the long-distance communication between the two results in significant bandwidth usage and long transmission delays. In intensive computing environments, this can lead to high latency and network congestion, making it difficult to meet the demands of real-time computing tasks.

[0003] To alleviate this problem, one of the more effective approaches is to offload all complex computing tasks from local devices to nearby edge servers with relatively abundant resources. If a large number of tasks are simultaneously offloaded to edge servers, relying solely on the edge computing paradigm to serve user tasks can overload the servers in the edge cloud cluster, resulting in reduced task processing efficiency and even task processing failure, making it impossible to meet complex application requirements. Summary of the Invention

[0004] In order to address the deficiencies mentioned in the above background technology, the purpose of the present invention is to provide an adaptive task offloading method and system based on online and offline dual-stage joint matching to solve the technical problem that the existing technology cannot cope with the change of task arrival density over time.

[0005] In a first aspect, the purpose of the present invention can be achieved by the following technical solution: based on an online and offline two-stage joint matching adaptive task offloading method, the method comprises the following steps:

[0006] Obtain edge server communication parameters, input the edge server communication parameters into a pre-established cloud-edge-device collaborative architecture model for parameter initialization, and obtain initialized edge server communication parameters, wherein the edge server communication parameters include CPU operation speed, memory capacity, signal transmission rate, and channel bandwidth;

[0007] Predefine task characteristic parameters based on the initialized edge server communication parameters, input the task characteristic parameters into the pre-established two-stage joint matching strategy model, determine the matching method based on the task type of the task characteristic parameters, and obtain the global task set and preference list;

[0008] The global task set and preference list are input into the pre-established task offloading execution and resource management model. Based on the matching strategy, the execution results are output and adaptive strategy optimization is performed based on the execution results and the preset dynamic threshold.

[0009] In combination with the first aspect, in some implementations of the first aspect, the method further includes: in the pre-established cloud-edge-end collaborative architecture model, the edge server MS set is Each MS i has a computing capacity F i , physical location Antenna height h i and communication radius r i ; Terminal equipment ED collection: Each ED j has the computing power f i and location The tasks generated by defining a terminal set are as follows:

[0010]

[0011] Among them, d j Indicates data size, unit bit, τ j represents the calculation cycle, Indicates the maximum tolerable delay;

[0012] The signal transmission rate between devices is defined as follows:

[0013]

[0014] Where: B is the channel bandwidth, P j is the transmission power, β0 is the channel gain at the reference distance of 1m, σ 2 is the noise power.

[0015] In conjunction with the first aspect, in certain implementations of the first aspect, the method further includes: predefining task characteristic parameters based on the initialized edge server communication parameters, including:

[0016] Define task characteristic parameters and buffer mechanism:

[0017] Define the local execution delay as:

[0018]

[0019] like The task is executed locally; otherwise it is stored in the global buffer;

[0020] Tasks entering the dynamic buffer need to be executed according to the threshold. The threshold needs to be defined as follows:

[0021]

[0022] Where: t is the task arrival rate, ∈ is the task departure rate, ε is the heavy task ratio, a and b are adjustment parameters, t sim is the total simulation time.

[0023] In conjunction with the first aspect, in certain implementations of the first aspect, the method further includes: determining the matching method based on the task type of the task feature parameter, including:

[0024] If the number of buffer tasks is less than δ, the online matching phase is triggered; if the number of buffer tasks is greater than or equal to δ, the offline matching phase is triggered.

[0025] In conjunction with the first aspect, in certain implementations of the first aspect, the method further includes: a process of establishing the pre-established two-stage joint matching strategy model, including:

[0026] Online matching stage:

[0027] First, candidate MSs are screened: only those meeting D j,i ≤r i MS, forming a candidate list Next, dynamic resource allocation is performed and the lead time is defined as:

[0028] in, For upload delay, To wait for delay;

[0029] Computing resources are allocated according to the following formula:

[0030]

[0031] Where: α i,j is the delay sensitivity coefficient, The computing capacity occupied by MSi;

[0032] Introducing load correction function Choose ψ(η i )·F i,j The largest MS;

[0033] Offline matching stage:

[0034] First, build the preference list:

[0035] ED preference: sort by MS computing power and transmission delay,

[0036] MS preference: sort by task computing requirements and distance,

[0037] Perform a stable matching algorithm based on the preference list: use the Gale-Shapley algorithm to iterate the matching to ensure that there is no blocking pair (i, j) so that there is no and

[0038] In conjunction with the first aspect, in certain implementations of the first aspect, the method further includes: inputting the global task set and preference list into a pre-established task offloading execution and resource management model, where the execution model is divided into local execution and remote execution, and relevant resource constraints are set; executing the task according to the matching strategy, returning the execution result to the terminal, updating the buffer state, and releasing resources, including:

[0039] Task offloading execution is divided into two modes: local execution and remote execution, which are determined by the matching relationship between task computing requirements and device capabilities;

[0040] When the local computing power of terminal device j is sufficient to complete the task within the tolerable delay, local execution is selected; the execution delay is: If the execution delay tolerance constraint is met, it is executed directly on the local device;

[0041] when When , the task needs to be offloaded to the edge server i for execution; then the total delay of remote execution is defined as:

[0042]

[0043] in, Upload delay, d j is the data size, R j,i is the transmission rate; Calculation delay, F i,j The computing power allocated to the server for the task; Waiting delay refers to the waiting time of the task in the server queue.

[0044] In conjunction with the first aspect, in certain implementations of the first aspect, the method further includes: performing adaptive strategy optimization based on the execution result and the preset dynamic threshold, including:

[0045] Monitor the average execution time (AET), timeout rate (TR), and computing resource utilization (CCU). Adjust the threshold and matching strategy parameters based on real-time data to optimize the system's adaptability to time-varying task density. The steps are as follows:

[0046] The system monitors the following performance indicators in real time, including:

[0047] Average execution time AET: in: The actual execution time for task j; Timeout rate: Calculate the computing resource utilization rate CCU: where S is the number of samplings;

[0048] Dynamically adjust the threshold parameter according to the magnitudes of AET and TR. If AET > AETth and TR > TRth, the current threshold is high, and task backlog causes the delay to exceed the standard. It is necessary to reduce δ to trigger offline matching in advance; adjustment formula: δ ← δ · (1 - γ delay )

[0049] Optimize parameters based on CCU. If CCU < CCUth: It indicates that the server resource utilization rate is insufficient. Increase the threshold δ to increase the online matching ratio; adjust the basic parameter b of δ as the maximum trigger times for offline matching: b ← b · (1 + γ ccu )

[0050] In a second aspect, to achieve the above object, the present invention discloses an online-offline two-stage joint matching adaptive task offloading system, including:

[0051] A parameter optimization module, configured to obtain edge server communication parameters, input the edge server communication parameters into a pre-established cloud-edge-end collaborative architecture model for parameter initialization, and obtain the initialized edge server communication parameters. Among them, the edge server communication parameters include CPU computing speed, memory capacity, signal transmission rate, and channel bandwidth;

[0052] A task processing module, configured to pre-define task feature parameters based on the initialized edge server communication parameters, input the task feature parameters into a pre-established two-stage joint matching strategy model, and determine the matching method based on the task type of the task feature parameters to obtain a global task set and a preference list;

[0053] A task execution module, configured to input the global task set and the preference list into a pre-established task offloading execution and resource management model, output an execution result based on the matching strategy, and perform adaptive strategy optimization based on the execution result and a preset dynamic threshold. <000所公开的内容,包括但不限于任何过程、方法、系统、算法、计算机程序或其他技术,可单独或组合地用于实现本发明的目的。In another aspect of the present invention, to achieve the above object, a terminal device is disclosed, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor. The computer program stored in the memory can run on the processor. When the processor loads and executes the computer program, the above-mentioned online-offline two-stage joint matching adaptive task offloading method is adopted.

[0055] In another aspect of the present invention, in order to achieve the above-mentioned purpose, a computer-readable storage medium is disclosed, in which a computer program is stored. When the computer program is loaded and executed by a processor, the above-mentioned online-offline two-stage joint matching-based adaptive task offloading method is adopted.

[0056] Beneficial effects of the present invention:

[0057] The present invention constructs a three-layer collaborative architecture of cloud, edge and end, and realizes intelligent adaptation in sparse and dense task scenarios through a two-stage joint matching strategy (dynamic switching between online matching and offline matching). The present invention constructs a global buffer and an adjustable threshold, and uses a global buffer with an adjustable threshold to store task information. In this way, the threshold can be adjusted according to changes in the arrival density of tasks, and different unloading stages can be executed accordingly. The present invention dynamically adjusts the matching strategy parameters and the task admission threshold based on real-time monitoring of indicators such as average execution time (AET) and timeout rate (TR), and realizes efficient resource utilization through adaptive strategy optimization. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, those skilled in the art can derive other drawings based on these drawings without inventive effort.

[0059] Figure 1 It is a schematic flow chart of the method of the present invention;

[0060] Figure 2 This is a schematic diagram of a three-layer architecture for cloud-edge-device collaborative offloading provided by an embodiment of the present invention;

[0061] Figure 3 This is a framework diagram of a task offloading method based on two-stage joint matching provided by an embodiment of the present invention;

[0062] Figure 4 It is a schematic diagram of the system structure of the present invention. DETAILED DESCRIPTION

[0063] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.

[0064] Example 1:

[0065] like Figure 1As shown, based on the online and offline two-stage joint matching adaptive task offloading method, the method includes the following steps:

[0066] S101: Acquire edge server communication parameters, input the edge server communication parameters into a pre-established cloud-edge-device collaborative architecture model for parameter initialization, and obtain initialized edge server communication parameters, wherein the edge server communication parameters include CPU operation speed, memory capacity, signal transmission rate, and channel bandwidth;

[0067] The specific steps of building a cloud-edge-end collaborative system model and initializing parameters are as follows:

[0068] The edge server (MS) set is Each MSi has a computing capacity of F i (Unit: CPU cycles / second), physical location Antenna height h i and communication radius r i . Terminal Equipment (ED) Collection: Each ED j has the computing power f i (Unit: CPU cycles / second) and location The tasks generated by defining a terminal set are as follows:

[0069]

[0070] Among them, d j Indicates data size, unit bit, τ j represents the calculation cycle, Indicates the maximum tolerable delay.

[0071] The signal transmission rate between devices is defined as follows:

[0072]

[0073] Where: B is the channel bandwidth (Hz), P j is the transmission power (W), β0 is the channel gain at the reference distance of 1m, σ 2 is the noise power.

[0074] The MS computing power, ED computing power, and communication parameters are initialized through system configuration.

[0075] S102: pre-define task characteristic parameters based on the initialized edge server communication parameters, input the task characteristic parameters into a pre-established two-stage joint matching strategy model, determine a matching method based on the task type of the task characteristic parameters, and obtain a global task set and preference list;

[0076] Define task characteristic parameters and buffer mechanisms. Each task includes data volume, computing requirements, and maximum tolerable delay. The specific steps for determining whether a task should be stored in the global buffer based on execution delay are:

[0077] Define the local execution delay as:

[0078]

[0079] like The task is executed locally; otherwise it is stored in the global buffer.

[0080] Tasks entering the dynamic buffer need to be executed according to the threshold, so the threshold needs to be defined as follows:

[0081]

[0082] Where: t : task arrival rate (number of tasks / ms), ∈: task departure rate (number of tasks / ms), ε: heavy task ratio (value range [0,1]), a, b: adjustment parameters, t sim is the total simulation time. The buffer is a priority queue, based on the task priority P j In descending order (priority is determined by the application type, such as real-time tasks have higher priority), high-priority tasks are scheduled first. If the number of tasks in the buffer is less than δ, the online matching phase is triggered. If the number of tasks in the buffer is greater than or equal to δ, the offline matching phase is triggered. The regular cleanup process needs to remove tasks that have been detained for more than The timeout task (η≥1 is the timeout coefficient) releases resources.

[0083] The process of establishing the pre-established two-stage joint matching strategy model includes:

[0084] When tasks are sparse, online matching is used to screen candidate servers and then perform real-time task matching. When tasks are dense, offline matching is used to build a global task set and preference list, and iterative matching eliminates blocking pairs to achieve the global optimal allocation of tasks and servers. The specific steps are as follows:

[0085] Online matching stage (sparse tasks)

[0086] First, candidate MSs are screened: only those meeting D j,i ≤r i MS, forming a candidate list Next, dynamic resource allocation is performed and the lead time is defined as:

[0087] in, For upload delay, Waiting for delay

[0088] Computing resources are allocated according to the following formula:

[0089]

[0090] Where: α i,j is the delay sensitivity coefficient (dynamically adjust the upload delay impact), The computing capacity occupied by MSi.

[0091] Finally, the load correction function is introduced Choose ψ(η i )·F i,j The largest MS.

[0092] The execution process of the online matching stage is as follows: Task T j Entering the buffer zone, the central controller determines whether the local execution conditions are met Otherwise, enter the candidate server screening. Select the best server MS according to the above rules * , perform an unload and update the server load After the task is completed, the result is returned to the device ED j , and remove the task from the buffer.

[0093] Offline matching stage:

[0094] First, build the preference list:

[0095] ED preference: sort by MS computing power and transmission delay,

[0096] MS preference: sort by task computing requirements and distance,

[0097] Perform a stable matching algorithm based on the preference list: use the Gale-Shapley algorithm to iteratively match and ensure that there is no blocking pair (i, j), that is, no and Initialization begins: all devices are marked as "unmatched" and the server status is "unsaturated." Next, unmatched devices send requests to the first server in their preference list that has not been rejected. The server then accepts the highest-priority task in the preference list and rejects all other requests. If the total computing capacity allocated after accepting the task is exceeded, it is marked as "temporarily matched"; otherwise, tasks exceeding capacity are rejected. Iterative corrections are then performed, with rejected devices removing the server from their preference list and moving on to the next server until all devices are matched or the buffer is cleared. Finally, a stable matching verification is performed to check for blocking pairs. If so, the process is re-executed until there are no blocking pairs.

[0098] S103: Input the global task set and preference list into a pre-established task offloading execution and resource management model, output the execution result based on the matching strategy, and perform adaptive strategy optimization based on the execution result and the preset dynamic threshold.

[0099] The global task set and preference list are input into the pre-established task offloading execution and resource management model. The execution model is divided into local execution and remote execution, and relevant resource constraints are set. The specific steps of executing tasks according to the matching strategy, returning the execution results to the terminal, updating the buffer status and releasing resources are as follows:

[0100] Task offloading execution is divided into two modes: local execution and remote execution, which are determined by the matching relationship between task computing requirements and device capabilities.

[0101] When the local computing power of terminal device j is sufficient to complete the task within the tolerable delay, local execution is selected. The execution delay is: If the execution delay tolerance constraint is met, it is executed directly on the local device.

[0102] when When , the task needs to be offloaded to the edge server i for execution. Then the total delay of remote execution can be defined as:

[0103]

[0104] in, Upload delay, d j is the data size, R j,i is the transmission rate. Calculation delay, F i,j The computing power allocated to the server for the task. Waiting delay refers to the waiting time of the task in the server queue.

[0105] In addition, resources need to be allocated as follows:

[0106] ServerMS i The total computing power is F i (CPU cycles / s), the computing power F allocated to task j i,j Need to meet: The number of tasks processed for the current server. The total remote execution time must not exceed the maximum tolerated delay of the task:

[0107] Unmatched tasks are temporarily stored in the global buffer and sorted by priority P j Sorting (high priority tasks are scheduled first), and the queue length is controlled by a dynamic threshold δ. Each server maintains an independent task queue, using first-in-first-out (FIFO) or priority scheduling, waiting for delay Determined by the queue length and server load.

[0108] The adaptive policy optimization based on the execution result and the preset dynamic threshold includes:

[0109] Monitor the average execution time (AET), timeout rate (TR), and computing resource utilization (CCU). The specific steps to adjust the threshold and matching policy parameters according to real-time data and optimize the system's adaptability to time-varying task density are as follows:

[0110] The system monitors the following performance metrics in real time, including:

[0111] [[ID=~12]]Average execution time (AET): Where: is the actual execution time of task j (total local or remote execution delay). Timeout rate: (Number of timeout tasks / Total number of tasks). Computing resource utilization (CCU): where S is the number of sampling times.

[0112] Dynamically adjust the threshold parameters according to the magnitudes of AET and TR. If AET > AETth and TR > TRth (threshold): It indicates that the current threshold is too high, and task backlog leads to excessive delay. It is necessary to reduce δ to trigger offline matching in advance. Adjustment formula: δ ← δ · (1 - γ delay )

[0113] Optimize the parameters based on CCU. If CCU < CCUth (such as less than 60%): It indicates that the server resource utilization is insufficient, and there may be excessive offline matching. It is necessary to increase the threshold δ to increase the online matching ratio. Adjust the basic parameter b (maximum number of offline matching triggers) of δ: b ← b · (1 + γ ccu )

[0114] The buffer parameters also need to be dynamically adjusted: If TR exceeds the threshold for multiple consecutive cycles, temporarily increase the buffer capacity (such as increasing by 50%) to avoid task loss; if CCU is lower than the threshold for a long time, reduce the buffer capacity to save memory resources. According to the real-time monitored system state, increase the priority of delay-sensitive tasks (such as increasing the priority of real-time control tasks from level 4 to level 5) to ensure that they enter the matching process first.

[0115] Specifically, the present invention is further illustrated below through an example implementation. The adaptive strategy execution process is as follows: During the data acquisition phase, the central controller collects AET, TR, and CCU data at a fixed interval and calculates a sliding window average (over the most recent 100 tasks) to filter out noise. During the threshold and parameter adjustment decision phase, a preset rule engine determines the current system state and generates adjustment instructions. During the policy update and execution phase, new thresholds and parameters are issued to the matching module, triggering policy reinitialization. Finally, the adjustment history is recorded for subsequent policy effectiveness evaluation and parameter fine-tuning.

[0116] Example 2: In order to achieve the above purpose, Figure 4 As shown, based on the first embodiment, the present invention discloses an adaptive task offloading system based on online and offline dual-stage joint matching, including:

[0117] The parameter optimization module 11 is used to obtain edge server communication parameters, input the edge server communication parameters into a pre-established cloud-edge-device collaborative architecture model for parameter initialization, and obtain the initialized edge server communication parameters, wherein the edge server communication parameters include CPU operation speed, memory capacity, signal transmission rate, and channel bandwidth;

[0118] The task processing module 12 is configured to predefine task characteristic parameters based on the initialized edge server communication parameters, input the task characteristic parameters into a pre-established two-stage joint matching strategy model, determine a matching method based on the task type of the task characteristic parameters, and obtain a global task set and preference list;

[0119] The task execution module 13 is used to input the global task set and preference list into the pre-established task offloading execution and resource management model, output the execution result based on the matching strategy, and perform adaptive strategy optimization based on the execution result and the preset dynamic threshold.

[0120] Based on the same inventive concept, the present invention also provides a computer device, which includes: one or more processors and a memory for storing one or more computer programs; the program includes program instructions, and the processor is used to execute the program instructions stored in the memory. The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing core and control core of the terminal, which is used to implement one or more instructions, specifically for loading and executing one or more instructions in a computer storage medium to implement the above method.

[0121] It should be further explained that, based on the same inventive concept, the present invention also provides a computer storage medium having a computer program stored thereon, which executes the above method when executed by a processor. The storage medium can be any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electrical, magnetic, infrared, or semiconductor system, device or component, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or component.

[0122] Throughout this specification, references to terms such as "one embodiment," "example," or "specific example" indicate that a specific feature, structure, material, or characteristic described in conjunction with that embodiment or example is included in at least one embodiment or example of the present disclosure. In this specification, schematic representations of these terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.

[0123] The above shows and describes the basic principles, main features and advantages of the present disclosure. Those skilled in the art should understand that the present disclosure is not limited to the above embodiments. The above embodiments and descriptions are merely illustrative of the principles of the present disclosure. Various changes and improvements may be made to the present disclosure without departing from the spirit and scope of the present disclosure, and such changes and improvements shall fall within the scope of the present disclosure.

Claims

1. An adaptive task offloading method based on online and offline dual-stage joint matching, characterized by: The method comprises the following steps: Obtain edge server communication parameters, input the edge server communication parameters into a pre-established cloud-edge-device collaborative architecture model for parameter initialization, and obtain initialized edge server communication parameters, wherein the edge server communication parameters include CPU operation speed, memory capacity, signal transmission rate, and channel bandwidth; Predefine task characteristic parameters based on the initialized edge server communication parameters, input the task characteristic parameters into the pre-established two-stage joint matching strategy model, determine the matching method based on the task type of the task characteristic parameters, and obtain the global task set and preference list; The global task set and preference list are input into the pre-established task offloading execution and resource management model. Based on the matching strategy, the execution result is output, and the adaptive strategy optimization is performed based on the execution result and the preset dynamic threshold.

2. The adaptive task offloading method based on online and offline dual-stage joint matching according to claim 1 is characterized in that: In the pre-established cloud-edge-end collaborative architecture model, the edge server MS set is Each MSi has a computing capacity of F i , physical location Antenna height h i and communication radius r i ; Terminal equipment ED collection: Each ED j has the computing power f i and location The tasks generated by defining a terminal set are as follows: Among them, d j Indicates data size, unit bit, τ j represents the calculation cycle, Indicates the maximum tolerable delay; The signal transmission rate between devices is defined as follows: Where: B is the channel bandwidth, P j is the transmission power, β0 is the channel gain at the reference distance of 1m, σ 2 is the noise power.

3. The adaptive task offloading method based on online and offline dual-stage joint matching according to claim 1 is characterized in that: The predefined task characteristic parameters based on the initialized edge server communication parameters include: Define task characteristic parameters and buffer mechanism: Define the local execution delay as: like The task is executed locally; otherwise it is stored in the global buffer; Tasks entering the dynamic buffer need to be executed according to the threshold. The threshold needs to be defined as follows: Where: t is the task arrival rate, ∈ is the task departure rate, ε is the heavy task ratio, a and b are adjustment parameters, t sim is the total simulation time.

4. The adaptive task offloading method based on online and offline dual-stage joint matching according to claim 1 is characterized in that: The task type based on the task characteristic parameters determines the matching method, including: If the number of buffer tasks is less than δ, the online matching phase is triggered; if the number of buffer tasks is greater than or equal to δ, the offline matching phase is triggered.

5. The adaptive task offloading method based on online and offline dual-stage joint matching according to claim 1 is characterized in that: The process of establishing the pre-established two-stage joint matching strategy model includes: Online matching stage: First, candidate MSs are screened: only those meeting D j,i ≤r i MS, forming a candidate list Next, dynamic resource allocation is performed and the lead time is defined as: in, For upload delay, To wait for delay; Computing resources are allocated according to the following formula: Where: α i,j is the delay sensitivity coefficient, is the computing capacity occupied by MS i; Introducing load correction function Choose ψ(η i )·F i,j The largest MS; Offline matching stage: First, build the preference list: ED preference: sort by MS computing power and transmission delay, MS preference: sort by task computing requirements and distance, Perform a stable matching algorithm based on the preference list: Use the Gale-Shapley algorithm to iteratively match and ensure that there is a non-blocking pair (i, j) such that there is no j> i μ(i)and i> j μ(j).

6. The adaptive task offloading method based on online and offline dual-stage joint matching according to claim 1 is characterized in that: The global task set and preference list are input into a pre-established task offloading execution and resource management model, the execution model is divided into local execution and remote execution, and relevant resource constraints are set; Execute tasks according to matching policies, return execution results to the terminal, update buffer status, and release resources, including: Task offloading execution is divided into two modes: local execution and remote execution, which are determined by the matching relationship between task computing requirements and device capabilities; When the local computing power of terminal device j is sufficient to complete the task within the tolerable delay, local execution is selected; the execution delay is: If the execution delay tolerance constraint is met, it is executed directly on the local device; when When , the task needs to be offloaded to the edge server i for execution; then the total delay of remote execution is defined as: in, Upload delay, d j is the data size, R j,i is the transmission rate; Calculation delay, F i,j The computing power allocated to the server for the task; Waiting delay refers to the waiting time of the task in the server queue.

7. The adaptive task offloading method based on online and offline dual-stage joint matching according to claim 1 is characterized in that: The adaptive strategy optimization based on the execution result and the preset dynamic threshold includes: Monitor the average execution time (AET), timeout rate (TR), and computing resource utilization (CCU). Adjust the threshold and matching strategy parameters based on real-time data to optimize the system's adaptability to time-varying task density. The steps are as follows: The system monitors the following performance indicators in real time, including: Average execution time AET: in: is the actual execution time of task j; timeout rate: Computing resource utilization CCU: Where S is the number of sampling times; Dynamically adjust the threshold parameters according to the size of AET and TR. If AET>AETth and TR>TRth, the current threshold is high, the task backlog causes the delay to exceed the standard, and δ needs to be reduced to trigger offline matching in advance; the adjustment formula is: δ←δ·(1-γ delay ); Optimize parameters based on CCU. If CCU < CCUth, it indicates that the server resource utilization rate is insufficient. Increase the threshold δ to increase the online matching ratio; adjust the basic parameter b of δ as the maximum trigger times for offline matching: b ← b · (1 + γ ccu ).

8. Based on the online and offline two-stage joint matching adaptive task offloading system, it is characterized by: include: A parameter optimization module is used to obtain edge server communication parameters, input the edge server communication parameters into a pre-established cloud-edge-device collaborative architecture model for parameter initialization, and obtain initialized edge server communication parameters, wherein the edge server communication parameters include CPU operation speed, memory capacity, signal transmission rate, and channel bandwidth; The task processing module is used to predefine task characteristic parameters based on the initialized edge server communication parameters, input the task characteristic parameters into a pre-established two-stage joint matching strategy model, determine the matching method based on the task type of the task characteristic parameters, and obtain a global task set and preference list; The task execution module is used to input the global task set and preference list into the pre-established task offloading execution and resource management model, output the execution results based on the matching strategy, and perform adaptive strategy optimization based on the execution results and preset dynamic thresholds.

9. A terminal device comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that: The memory stores a computer program that can be run on the processor. When the processor loads and executes the computer program, the method for adaptive task offloading based on online and offline dual-stage joint matching according to any one of claims 1 to 7 is adopted.

10. A computer-readable storage medium storing a computer program, wherein: When the computer program is loaded and executed by the processor, the method for adaptive task offloading based on online and offline dual-stage joint matching according to any one of claims 1 to 7 is adopted.