A cloud-edge collaborative task offloading method and system for field environment
By constructing a composite communication channel model in a field environment and adopting the AC-GAPSO algorithm, the problems of inaccurate channel models and difficulty in handling resource constraints in cloud-edge collaborative computing are solved, achieving efficient and reliable task offloading decisions and reducing the total system cost.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- STATE GRID FUJIAN ELECTRIC POWER CO LTD
- Filing Date
- 2026-03-25
- Publication Date
- 2026-06-19
AI Technical Summary
Existing cloud-edge collaborative computing faces challenges in unstructured outdoor environments, such as inaccurate communication channel models, difficulty in coordinating multidimensional resource constraints, and the tendency of traditional optimization algorithms to get stuck in local optima and have slow convergence speed when solving high-dimensional discrete problems.
A composite communication channel model is constructed, and the adaptive cooperative genetic particle swarm optimization algorithm (AC-GAPSO) is combined with it. Through accurate channel modeling and multi-dimensional resource constraint optimization, the AC-GAPSO algorithm is used to make task offloading decisions, thereby minimizing the total system cost.
It improves the reliability of offloading decisions in real-world communication environments, significantly reduces the total system cost, and ensures the feasibility and real-time performance of task scheduling.
Smart Images

Figure CN122248466A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of mobile edge computing and distributed resource scheduling technology, specifically relating to a cloud-edge collaborative task offloading method and system for field environments. Background Technology
[0002] With the rapid development of the Internet of Things, 5G mobile communication, and artificial intelligence technologies, a large number of smart terminal devices continuously generate high-frequency data streams in scenarios such as environmental sensing and industrial monitoring, posing a severe challenge to the real-time computing and communication capabilities of the system. The traditional cloud computing model relies on remotely transmitting massive amounts of data back to the central server for processing. However, due to the bottleneck of core network bandwidth and the high latency caused by long-distance transmission, it is difficult to meet the stringent real-time requirements of latency-sensitive applications (such as real-time video analysis and emergency early warning).
[0003] Cloud-edge collaborative computing, as an emerging computing paradigm, effectively alleviates the limitations of traditional cloud computing in terms of latency and bandwidth by deploying computing and storage resources at the network edge, close to the data source. It has already been widely applied in fields such as smart cities and intelligent manufacturing. In recent years, the application scenarios of cloud-edge collaborative computing have gradually expanded to complex field observation scenarios such as forest fire prevention, ecological monitoring, and geological disaster early warning. In these scenarios, heterogeneous terminal devices composed of drones, high-definition cameras, and multimodal sensors not only generate massive observation tasks but also place extremely high demands on the real-time performance and reliability of task processing.
[0004] However, despite the significant advantages of cloud-edge collaborative architecture, existing task offloading and resource scheduling technologies still face several severe challenges when directly applied to unstructured outdoor environments:
[0005] First, existing communication channel models have significant limitations in complex outdoor environments. Early studies focused primarily on urban or indoor scenarios with well-developed network infrastructure, employing overly simplified wireless channel models, such as considering only free-space path loss or assuming ideal Rayleigh fading. However, in outdoor environments, due to undulating terrain and dense vegetation, communication links are highly susceptible to severe multipath effects and shadowing interference, exhibiting significant spatial correlation and time-varying characteristics. Existing experimental studies have shown that without accurate modeling of this "composite channel" involving large-scale terrain occlusion combined with small-scale multipath fading, relying solely on idealized channel assumptions for offloading decisions easily leads to overestimation of channel quality, resulting in significant deviations in transmission delay estimation and consequently causing task timeouts or transmission interruptions.
[0006] Second, scheduling tasks in Directed Acyclic Graphs (DAGs) under multidimensional resource constraints is challenging. Unlike independent computational tasks, typical field monitoring tasks (such as video stream feature extraction and multi-sensor data fusion) usually consist of a set of subtasks with strict dependencies, mathematically modeled as a DAG. Meanwhile, field edge nodes are often limited by power supply and physical size, with hard limits on their computational power, storage capacity, and available bandwidth. Optimizing task offloading strategies to minimize the total system cost under multiple hard constraints, including task timing dependencies, edge storage limits, and communication bandwidth, is essentially a complex NP-hard problem. List scheduling algorithms, such as HEFT, are typically based on ideal computational and communication resource assumptions, failing to adequately consider the random fluctuations in channel quality in field environments and ignoring the strict limitations on storage capacity and bandwidth at the edge, making it difficult to guarantee the feasibility of task scheduling in unstructured field environments.
[0007] Third, existing optimization algorithms struggle to strike a balance between convergence speed and quality in finding optimal solutions. For the aforementioned high-dimensional discrete unloading decision problem, existing solutions primarily include Deep Reinforcement Learning (DRL) and metaheuristic algorithms. While DRL methods possess online decision-making capabilities, they rely on large amounts of high-quality training data and suffer from the cold-start problem, limiting their applicability in highly dynamic communication environments and challenging field scenarios where historical data is difficult to obtain. Traditional metaheuristic algorithms have inherent limitations: Particle Swarm Optimization (PSO) is prone to getting trapped in local optima in high-dimensional discrete solution spaces due to particle homogenization; Genetic Algorithms (GA), while possessing strong global search capabilities, have slow convergence speeds, making them unsuitable for real-time decision-making in the field; and simple greedy algorithms often only yield locally suboptimal solutions. Some existing hybrid algorithms (such as simple GA-PSO serial combination) lack deep population cooperation mechanisms, making it difficult to achieve an effective balance between global exploration and local development, and thus failing to meet the needs of efficient and accurate scheduling in field cloud-edge collaborative scenarios.
[0008] In summary, there is an urgent need for a cloud-edge collaborative task offloading method that can adapt to complex communication environments in the field, effectively handle multi-dimensional resources and task constraints, and has efficient optimization capabilities. Summary of the Invention
[0009] The purpose of this invention is to provide a cloud-edge collaborative task offloading method and system for field environments, in order to solve the problems of inaccurate characterization of communication models in complex field environments, difficulty in coordinating multiple resource constraints and task dependencies, and the tendency of traditional optimization algorithms to get stuck in local optima and have slow convergence speed when solving high-dimensional discrete problems.
[0010] To achieve the above objectives, the present invention adopts the following technical solution: a cloud-edge collaborative task offloading method for field environments, comprising the following steps:
[0011] Step S1: Construct a cloud-edge collaborative computing system model that includes field observation terminal equipment, edge servers, and cloud servers; obtain the set of observation tasks generated by the terminal equipment, and model the set of observation tasks as a directed acyclic graph to represent the data dependencies and temporal constraints between tasks;
[0012] Step S2: Construct a composite communication channel model for the field environment; the composite communication channel model comprehensively considers large-scale path loss, log-normal shadowing fading and small-scale Ricean fading, and calculates the channel gain and transmission rate between the terminal device and the edge server and between the edge server and the cloud server based on the composite communication channel model;
[0013] Step S3: Construct a task offloading optimization model with the goal of minimizing the total system cost; the total system cost includes computing cost, transmission cost, and storage cost; and set constraints, including the maximum tolerable latency of the task, the storage capacity of the edge server, and the communication bandwidth.
[0014] Step S4: The task unloading optimization model is solved using the adaptive cooperative genetic particle swarm optimization algorithm AC-GAPSO to obtain the optimal task unloading decision scheme. The AC-GAPSO algorithm divides the population into an elite layer and a normal layer according to the fitness. The elite layer particles are subjected to dual cross-cooperation of cognitive learning and social learning to enhance local development capabilities. The normal layer particles are subjected to adaptive mutation and global guidance to maintain population diversity and correct the search direction. At the same time, the mutation probability is dynamically adjusted during the iteration process, and the task completion time and fitness are calculated based on the task scheduling mechanism of topological sorting.
[0015] Step S5: Based on the optimal task offloading decision scheme, the observation task is assigned to the corresponding edge server or cloud server for execution.
[0016] Further, in step S2, the composite communication channel model calculates the time using the following formula. Channel gain:
[0017]
[0018] in, This represents the channel gain between terminal device i and server j at time τ. This represents large-scale path loss. This indicates small-scale Ricean decay;
[0019] The large-scale path loss The shading model, expressed as a log-normal distribution, is as follows:
[0020]
[0021] in, For transmission distance, For reference distance, Indicates the reference distance Average path loss at that location, This is the path loss index. It is a random variable that follows a normal distribution and is used to characterize shadow fading caused by undulating terrain in the field;
[0022] The small-scale Ricean fading This can be represented as the superposition of the line-of-sight component and the non-line-of-sight component:
[0023]
[0024] in, Rice factor, For the line-of-sight component, For the non-line-of-sight component that follows a Gaussian distribution.
[0025] Furthermore, in step S3, the formula for calculating the total system cost is:
[0026]
[0027] in, This represents the total system cost. , , These represent the total computation cost, total transmission cost, and total storage cost of all tasks, respectively.
[0028] The optimization objective and constraints are expressed as follows:
[0029]
[0030] In the formula, Represents a set of terminal devices. Indicates the first Terminal devices The resulting set of tasks express The first in One task; Indicates task The amount of data, Represents the j-th server Storage capacity limit, Represents the set of all servers; Indicates task Completion time, Indicates task Maximum tolerable delay; Indicates time Assigned to terminal devices bandwidth, Represents edge server Maximum bandwidth resources, Represents a set of edge servers;
[0031] The maximum tolerable delay constraint for the task is: the actual completion time of the task does not exceed its maximum tolerable delay.
[0032] The edge server storage capacity constraint is: the total amount of all task data allocated to any edge server shall not exceed the upper limit of the server's storage capacity;
[0033] The communication bandwidth constraint is that the total bandwidth allocated to terminal devices at any given time shall not exceed the maximum bandwidth resources of the edge server.
[0034] Further, in step S4, the implementation method of the AC-GAPSO algorithm is as follows:
[0035] A) Population initialization: The position vector of the particles is constructed using an integer encoding mechanism, with each dimension representing the unloading decision of a task; an initial solution is generated by introducing heuristic rules based on task attributes. For computationally intensive tasks, the initial solution is initialized as a cloud server with a first preset probability, and for latency-sensitive tasks, the initial solution is initialized as an edge server with a second preset probability.
[0036] B) Fitness evaluation: Calculate task completion time based on topology sorting task scheduling mechanism; Construct fitness function based on penalty mechanism: Use penalty mechanism to process the constraints, include solutions that violate latency, storage or bandwidth constraints in penalty term, and construct fitness function by total system cost and penalty term;
[0037] C) Population stratification: Calculate the fitness of all particles in the population and introduce a feasibility priority ranking rule to rank the population, and divide the top-ranked particles into the elite layer and the remaining particles into the ordinary layer.
[0038] D) Cooperative evolution: For elite particles, crossover operations are performed with the individual historical best solution and the global best solution respectively; for ordinary particles, random mutation is first performed with the current adaptive mutation probability, and then crossover operations are performed with the global best solution.
[0039] E) Update and Iteration: Update the adaptive mutation probability according to the preset rules; update the population and determine the termination condition. If the maximum number of iterations is reached, output the global optimal solution; otherwise, return to step C.
[0040] Furthermore, in step A), an integer encoding mechanism is used to construct the particle's position vector, the... The position vector of each particle For one dimensional vector, The total number of tasks generated by the terminal device is represented as follows:
[0041]
[0042] in, , They represent the first The first of the position vectors of the particles Dimensional components.
[0043] Furthermore, in step B), when calculating fitness, a task scheduling mechanism based on topology sorting is embedded to calculate task completion time, specifically as follows:
[0044] Construct a directed acyclic graph based on the dependencies between tasks, and count the in-degree of each task node; add tasks with an in-degree of 0 to the ready queue; when the ready queue is not empty, take out tasks in sequence, calculate their earliest start time, which is the maximum value among the completion times of all predecessor tasks and the arrival times of the data required by the task; based on the earliest start time and the calculation execution time of the task, obtain the task completion time; update the in-degree of all successor tasks of the task, and add successor tasks with an in-degree of 0 to the ready queue, until all tasks are scheduled;
[0045] A fitness function based on a penalty mechanism is constructed as follows: the fitness function is defined as the weighted sum of the total system cost and penalty terms; the penalty terms include latency penalty, storage penalty, and bandwidth penalty; when the actual task completion time exceeds the maximum tolerable latency, or the task offloading scheme violates the edge server's storage capacity limit or communication bandwidth limit, the portion exceeding the constraints is multiplied by a preset penalty coefficient and included in the fitness function, thereby guiding the population to automatically eliminate infeasible solutions and converge towards the low-cost feasible region; the fitness function is expressed as follows:
[0046]
[0047] in, Represents the fitness function. This represents the total system cost. Indicates a delay penalty. Indicates storage penalty item, This indicates a bandwidth penalty. , , This is the preset penalty coefficient.
[0048] Further, in step C), the feasibility priority ranking rule is specifically as follows: any feasible solution that satisfies all constraints is superior to any infeasible solution that violates constraints; among two feasible solutions, the one with lower total system cost is better; among two infeasible solutions, the one with lower degree of violation is better.
[0049] Further, in step D), the cooperative evolution specifically refers to:
[0050] 1) Dual collaboration of elite level: For elite level particles, firstly, based on the preset cognitive learning probability, cross-operation is performed with their individual historical best solution to preserve the individual's excellent structure; then, based on the preset social learning probability, cross-operation is performed with the global best solution to provide global guidance.
[0051] 2) Mutation and guidance in ordinary layers: For particles in ordinary layers, firstly, based on the adaptive mutation probability of the current iteration, a random mutation operation is performed on the particle position vector to enhance the ability to escape local optima; for the mutated particles, a crossover operation is performed again with the global optimal solution to move closer to the global optimum while maintaining diversity.
[0052] Further, in step E), the dynamic update formula for the adaptive mutation probability is:
[0053]
[0054] in, For adaptive mutation probability, This represents the current iteration number. The maximum number of iterations, and These are the initial and final values of the mutation probability, respectively.
[0055] The present invention also provides a cloud-edge collaborative task offloading system for field environments, characterized in that it includes a memory, a processor, and computer program instructions stored in the memory and capable of being executed by the processor. When the processor executes the computer program instructions, it can implement the above-mentioned method.
[0056] Compared with the prior art, the present invention has the following beneficial effects:
[0057] 1) Strong environmental adaptability and accurate channel modeling: This invention constructs a composite channel model that integrates path loss, shadow fading and Ricean fading for unstructured outdoor environments. It overcomes the shortcomings of traditional idealized models that cannot accurately reflect terrain occlusion and multipath effects, and significantly improves the reliability of offloading decisions in actual outdoor communication environments.
[0058] 2) Superior optimization performance and fast convergence speed: The AC-GAPSO algorithm proposed in this invention integrates the crossover and mutation mechanism of the genetic algorithm with the fast convergence characteristics of the particle swarm algorithm. Through population hierarchical strategy, dual crossover cooperation and adaptive mutation mechanism, it effectively balances global exploration and local development capabilities, and significantly reduces the total system cost.
[0059] 3) Effective handling of multidimensional constraints ensures task feasibility: This invention introduces a task scheduling mechanism based on topology sorting and a fitness function based on penalty function, which can strictly handle the complex temporal dependencies between DAG tasks and achieve optimal task scheduling under the premise of meeting the strict storage and bandwidth constraints of field edge nodes. Attached Figure Description
[0060] Figure 1 This is a flowchart of a cloud-edge collaborative task offloading method for field environments provided in an embodiment of the present invention;
[0061] Figure 2 This is a diagram of the cloud-edge collaborative architecture for field observation in this embodiment of the invention;
[0062] Figure 3 This is a flowchart of the AC-GAPSO algorithm in an embodiment of the present invention. Detailed Implementation
[0063] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0064] It should be noted that the following detailed descriptions are exemplary and intended to provide further explanation of this application. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains.
[0065] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments according to this application. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0066] This embodiment provides a cloud-edge collaborative task offloading method for field environments. Addressing the pain points of complex field communication environments, limited resources, and strong task dependencies, this method constructs a composite channel model and a multi-dimensional constrained cost optimization model, and uses the AC-GAPSO algorithm for solution. Figure 1 As shown, the specific implementation process of this method is as follows.
[0067] Step S1: Construct a cloud-edge collaborative computing system model that includes field observation terminal equipment, edge servers, and cloud servers. Its architecture is as follows: Figure 2 As shown, the set of observation tasks generated by the terminal device is obtained, and the set of observation tasks is modeled as a directed acyclic graph to represent the data dependencies and temporal constraints between tasks.
[0068] First, construct the server model: define the set of servers in the system as follows. It consists of a subset of cloud servers. With a subset of edge servers Composition, satisfaction ,and The system includes a cloud server (i.e. )and Edge servers (i.e.) For any server Define its characteristic tuple as ,in For server type identification, when When, it means For cloud servers ( );when When, it means For edge servers ( ). for CPU frequency, measured in Hz (cycles / s), characterizes a server's computing power and directly determines the processing speed of tasks. Cloud servers typically have significantly higher CPU clock frequencies than edge servers. . This constrains The maximum available storage capacity.
[0069] Secondly, construct the terminal and task model: define the set of field terminal devices as follows: ,Include One observation device; by terminal equipment The resulting task set is All tasks generated by terminal devices constitute a set. ,make For any task Indicated by terminal device The first Each task is defined with its feature tuple as... .in, This indicates the amount of input data for the task. This indicates the computational density required for task processing (in cycles / bit). This indicates the maximum tolerable latency for the task. This is a service type identifier; 0 indicates compute-intensive and 1 indicates communication-intensive. and These represent the set of predecessor tasks and the set of successor tasks for this task, respectively.
[0070] Finally, establish dependencies: model the task set as a DAG graph. To characterize the dependencies between tasks. For a set of task nodes, Let be a set of directed edges. If there exists a directed edge... This indicates the task. It is a task Precursor mission, mission Must be received Execution can only begin after the output data has been received.
[0071] Step S2: Construct a composite communication channel model for the field environment. This composite communication channel model comprehensively considers large-scale path loss, log-normal shadowing fading, and small-scale Ricean fading to accurately quantify time-varying channel quality in the field environment. Based on this composite communication channel model, calculate the channel gain and transmission rate between the terminal device and the edge server, and between the edge server and the cloud server.
[0072] The composite communication channel model calculates the time using the following formula. Channel gain:
[0073]
[0074] in, This represents the channel gain between terminal device i and server j at time τ. This represents large-scale path loss. This indicates small-scale Ricean decay.
[0075] The large-scale path loss The shading model, expressed as a log-normal distribution, is as follows:
[0076]
[0077] in, For transmission distance, For reference distance, Indicates the reference distance Average path loss at that location, This is the path loss index. It is a random variable that follows a normal distribution and is used to characterize shadow fading caused by undulating terrain in the field.
[0078] The small-scale Ricean fading This can be represented as the superposition of the line-of-sight component and the non-line-of-sight component:
[0079]
[0080] in, Rice factor, For the line-of-sight component, For the non-line-of-sight component that follows a Gaussian distribution.
[0081] According to Shannon's theorem, computational terminal devices... At any moment To edge servers Uplink transmission rate :
[0082]
[0083] in, For terminal devices The transmission power, The channel gain calculated above, which includes both large-scale shadow fading and small-scale Ricean fading, is used as an example. For noise power spectral density, Indicates time Edge server Assigned to terminal devices The channel bandwidth. To accurately describe the resource bottlenecks of field edge nodes, the bandwidth allocation matrix is defined as follows. The data transfer rate between the edge server and the cloud server is a vector. ,in Represents edge server The rate at which data is transmitted to the cloud server.
[0084] Step S3: Construct a task offloading optimization model with the goal of minimizing the total system cost; the total system cost includes computing cost, transmission cost and storage cost; and set constraints, including the maximum tolerable latency constraint for the task, the storage capacity constraint for the edge server and the communication bandwidth constraint.
[0085] The formula for calculating the total cost of the system is as follows:
[0086]
[0087] in, This represents the total system cost. , , These represent the total computation cost, total transmission cost, and total storage cost of all tasks, respectively.
[0088] The optimization objective and constraints are expressed as follows:
[0089]
[0090] In the formula, Represents a set of terminal devices. Indicates the first Terminal devices The resulting set of tasks express The first in One task; Indicates task The amount of data, Represents the j-th server Storage capacity limit, Represents the set of all servers; Indicates task Completion time, Indicates task Maximum tolerable delay; Indicates time Assigned to terminal devices bandwidth, Represents edge server Maximum bandwidth resources, This represents a set of edge servers.
[0091] The maximum tolerable delay constraint for the task is: the actual completion time of the task must not exceed its maximum tolerable delay.
[0092] The edge server storage capacity constraint is: the total amount of all task data allocated to any edge server shall not exceed the upper limit of the server's storage capacity;
[0093] The communication bandwidth constraint is that the total bandwidth allocated to terminal devices at any given time must not exceed the maximum bandwidth resources of the edge server.
[0094] Step S4: The task unloading optimization model is solved using the Adaptive Cooperative Genetic Algorithm-Particle Swarm Optimization (AC-GAPSO) algorithm to obtain the optimal task unloading decision scheme. The AC-GAPSO algorithm divides the population into an elite layer and a general layer based on fitness; it performs dual cross-cooperation of cognitive learning and social learning on the elite layer particles to enhance local exploitation capabilities; it performs adaptive mutation and global guidance on the general layer particles to maintain population diversity and correct the search direction; simultaneously, it dynamically adjusts the mutation probability during iteration and calculates the task completion time and fitness based on a topological sorting task scheduling mechanism. The specific implementation method of the AC-GAPSO algorithm is as follows.
[0095] A) Population initialization: The position vector of the particles is constructed using an integer encoding mechanism, with each dimension representing the unloading decision of a task; an initial solution is generated by introducing heuristic rules based on task attributes. For computationally intensive tasks, the initial solution is initialized as a cloud server with a first preset probability, and for latency-sensitive tasks, the initial solution is initialized as an edge server with a second preset probability.
[0096] Specifically, an integer encoding mechanism is used to construct the particle's position vector, the first... The position vector of each particle For one dimensional vector, The total number of tasks generated by the terminal device is represented as follows:
[0097]
[0098] in, , They represent the first The first of the position vectors of the particles Dimensional components.
[0099] Heuristic rules based on task attributes are introduced to generate initial solutions: For computationally intensive tasks, mainly corresponding to tasks such as corrosion defect detection based on high-definition images, characterized by large input data volume and high computational density (usually requiring convolutional neural networks for inference), the offloading position of such tasks is initialized to 0 with a first preset probability (cloud server); for latency-sensitive tasks, mainly corresponding to tasks such as environmental and state monitoring of multi-source heterogeneous sensors, characterized by small data packets, frequent transmission, and high concurrency, the offloading position of such tasks is initialized to 0 with a second preset probability. (Edge server).
[0100] B) Fitness evaluation: Calculate task completion time based on topology sorting task scheduling mechanism; construct fitness function based on penalty mechanism: use penalty mechanism to process the constraints, include solutions that violate latency, storage or bandwidth constraints in penalty term, and construct fitness function by total system cost and penalty term.
[0101] When calculating fitness, a topology-based task scheduling mechanism is embedded to calculate task completion time. Specifically, this involves: constructing a directed acyclic graph based on the dependencies between tasks and calculating the in-degree of each task node; adding tasks with an in-degree of 0 to the ready queue; when the ready queue is not empty, tasks are retrieved sequentially, and their earliest start execution time is calculated. The earliest start execution time is the maximum value among the completion times of all predecessor tasks and the arrival times of the data required by the task; the task completion time is obtained based on the earliest start execution time and the task's computation execution time; the in-degree of all successor tasks is updated, and successor tasks with an in-degree of 0 are added to the ready queue until all tasks are scheduled.
[0102] A fitness function based on a penalty mechanism is constructed as follows: the fitness function is defined as the weighted sum of the total system cost and penalty terms; the penalty terms include latency penalty, storage penalty, and bandwidth penalty; when the actual task completion time exceeds the maximum tolerable latency, or the task offloading scheme violates the edge server's storage capacity limit or communication bandwidth limit, the portion exceeding the constraints is multiplied by a preset penalty coefficient and included in the fitness function, thereby guiding the population to automatically eliminate infeasible solutions and converge towards the low-cost feasible region; the fitness function is expressed as follows:
[0103]
[0104] in, Represents the fitness function. This represents the total system cost. Indicates a delay penalty. Indicates storage penalty item, This indicates a bandwidth penalty. , , This is the preset penalty coefficient.
[0105] C) Population stratification: Calculate the fitness of all particles in the population and introduce a feasibility priority ranking rule to rank the population. Then, classify the top 20% of particles into the elite layer and the remaining particles into the normal layer.
[0106] Specifically, the feasibility priority ranking rule is as follows: any feasible solution that satisfies all constraints is superior to any infeasible solution that violates constraints; between two feasible solutions, the one with lower total system cost is better; between two infeasible solutions, the one with lower degree of violation (i.e., smaller penalty value) is better; based on this ranking rule, the top 20% of particles are designated as the elite layer, and the rest are designated as the ordinary layer.
[0107] D) Cooperative Evolution: For elite-level particles, crossover operations are performed with both the individual's historical best solution and the global best solution; for ordinary-level particles, random mutation is first performed with the current adaptive mutation probability, followed by crossover operations with the global best solution. Specifically:
[0108] 1) Dual collaboration at the elite level: For elite particles, firstly, based on the preset cognitive learning probability, and their individual historical optimal solution ( ) Perform crossover operations to preserve the best individual structures; then, based on preset social learning probabilities, compare with the global optimal solution ( Perform a crossover operation for global booting;
[0109] 2) Mutation and Guidance in Ordinary Layers: For particles in ordinary layers, firstly, based on the adaptive mutation probability of the current iteration, a random mutation operation is performed on the particle position vector to enhance its ability to escape local optima; for the mutated particles, they are then compared with the global optimal solution (…). Perform crossover operations to move toward the global optimum while maintaining diversity.
[0110] E) Update and Iteration: Update the adaptive mutation probability according to the preset rules; update the population and determine the termination condition. If the maximum number of iterations is reached, output the global optimal solution; otherwise, return to step C.
[0111] The dynamic update formula for the adaptive mutation probability is:
[0112]
[0113] in, For adaptive mutation probability, This represents the current iteration number. The maximum number of iterations, and These are the initial and final values for the mutation probability, respectively, set as... , .
[0114] Step S5: Based on the optimal task offloading decision scheme, the observation task is assigned to the corresponding edge server or cloud server for execution.
[0115] This embodiment also provides a cloud-edge collaborative task offloading system for field environments, including a memory, a processor, and computer program instructions stored in the memory and executable by the processor. When the processor executes the computer program instructions, it can implement the above-described method.
[0116] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0117] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0118] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0119] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0120] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.
Claims
1. A cloud-edge collaborative task offloading method for field environments, characterized in that, Includes the following steps: Step S1: Construct a cloud-edge collaborative computing system model that includes field observation terminal equipment, edge servers, and cloud servers; obtain the set of observation tasks generated by the terminal equipment, and model the set of observation tasks as a directed acyclic graph to represent the data dependencies and temporal constraints between tasks; Step S2: Construct a composite communication channel model for the field environment; the composite communication channel model comprehensively considers large-scale path loss, log-normal shadowing fading and small-scale Ricean fading, and calculates the channel gain and transmission rate between the terminal device and the edge server and between the edge server and the cloud server based on the composite communication channel model; Step S3: Construct a task offloading optimization model with the goal of minimizing the total system cost; the total system cost includes computing cost, transmission cost, and storage cost; and set constraints, including the maximum tolerable latency of the task, the storage capacity of the edge server, and the communication bandwidth. Step S4: The task unloading optimization model is solved using the adaptive cooperative genetic particle swarm optimization algorithm AC-GAPSO to obtain the optimal task unloading decision scheme. The AC-GAPSO algorithm divides the population into an elite layer and a normal layer according to the fitness. The elite layer particles are subjected to dual cross-cooperation of cognitive learning and social learning to enhance local development capabilities. The normal layer particles are subjected to adaptive mutation and global guidance to maintain population diversity and correct the search direction. At the same time, the mutation probability is dynamically adjusted during the iteration process, and the task completion time and fitness are calculated based on the task scheduling mechanism of topological sorting. Step S5: Based on the optimal task offloading decision scheme, the observation task is assigned to the corresponding edge server or cloud server for execution.
2. The cloud-edge collaborative task offloading method for field environments according to claim 1, characterized in that, In step S2, the composite communication channel model calculates the time using the following formula. Channel gain: in, This represents the channel gain between terminal device i and server j at time τ. This represents large-scale path loss. This indicates small-scale Ricean decay; The large-scale path loss The shading model, expressed as a log-normal distribution, is as follows: in, For transmission distance, For reference distance, Indicates the reference distance Average path loss at that location, This is the path loss index. It is a random variable that follows a normal distribution and is used to characterize shadow fading caused by undulating terrain in the field; The small-scale Ricean fading This can be represented as the superposition of the line-of-sight component and the non-line-of-sight component: in, Rice factor, For the line-of-sight component, For the non-line-of-sight component that follows a Gaussian distribution.
3. The cloud-edge collaborative task offloading method for field environments according to claim 1, characterized in that, In step S3, the formula for calculating the total system cost is: in, This represents the total system cost. , , These represent the total computation cost, total transmission cost, and total storage cost of all tasks, respectively. The optimization objective and constraints are expressed as follows: In the formula, Represents a set of terminal devices. Indicates the first Terminal devices The resulting set of tasks express The first in One task; Indicates task The amount of data, Indicates the first One server Storage capacity limit, Represents the set of all servers; Indicates task Completion time, Indicates task Maximum tolerable delay; Indicates time Assigned to terminal devices bandwidth, Represents edge server Maximum bandwidth resources, Represents a set of edge servers; The maximum tolerable delay constraint for the task is: the actual completion time of the task does not exceed its maximum tolerable delay. The edge server storage capacity constraint is: the total amount of all task data allocated to any edge server shall not exceed the upper limit of the server's storage capacity; The communication bandwidth constraint is that the total bandwidth allocated to terminal devices at any given time shall not exceed the maximum bandwidth resources of the edge server.
4. The cloud-edge collaborative task offloading method for field environments according to claim 1, characterized in that, In step S4, the AC-GAPSO algorithm is implemented as follows: A) Population initialization: The position vector of the particles is constructed using an integer encoding mechanism, with each dimension representing the unloading decision of a task; an initial solution is generated by introducing heuristic rules based on task attributes. For computationally intensive tasks, the initial solution is initialized as a cloud server with a first preset probability, and for latency-sensitive tasks, the initial solution is initialized as an edge server with a second preset probability. B) Fitness assessment: Calculate task completion time based on a task scheduling mechanism using topology sorting; Construct a fitness function based on a penalty mechanism: The constraints are processed using a penalty mechanism, and solutions that violate latency, storage, or bandwidth constraints are included in the penalty term. The fitness function is constructed by combining the total system cost with the penalty term. C) Population stratification: Calculate the fitness of all particles in the population and introduce a feasibility priority ranking rule to rank the population, and divide the top-ranked particles into the elite layer and the remaining particles into the ordinary layer. D) Cooperative evolution: For elite particles, crossover operations are performed with the individual historical best solution and the global best solution respectively; for ordinary particles, random mutation is first performed with the current adaptive mutation probability, and then crossover operations are performed with the global best solution. E) Update and Iteration: Update the adaptive mutation probability according to the preset rules; update the population and determine the termination condition. If the maximum number of iterations is reached, output the global optimal solution; otherwise, return to step C.
5. A cloud-edge collaborative task offloading method for field environments according to claim 4, characterized in that, In step A), an integer encoding mechanism is used to construct the particle's position vector. The position vector of each particle For one dimensional vector, The total number of tasks generated by the terminal device is represented as follows: in, , They represent the first The first of the position vectors of the particles Dimensional components.
6. The cloud-edge collaborative task offloading method for field environments according to claim 4, characterized in that, In step B), when calculating fitness, a task scheduling mechanism based on topology sorting is embedded to calculate task completion time, specifically as follows: Construct a directed acyclic graph based on the dependencies between tasks, and count the in-degree of each task node; add tasks with an in-degree of 0 to the ready queue; when the ready queue is not empty, take out tasks in sequence, calculate their earliest start execution time, which is the maximum value among the completion times of all predecessor tasks and the arrival times of the data required by the task; based on the earliest start execution time and the calculation execution time of the task, obtain the task completion time. Update the in-degree of all successor tasks of this task, and add successor tasks with an in-degree of 0 to the ready queue until all tasks have been scheduled. A fitness function based on a penalty mechanism is constructed as follows: the fitness function is defined as the weighted sum of the total system cost and penalty terms; the penalty terms include latency penalty, storage penalty, and bandwidth penalty; when the actual task completion time exceeds the maximum tolerable latency, or the task offloading scheme violates the edge server's storage capacity limit or communication bandwidth limit, the portion exceeding the constraints is multiplied by a preset penalty coefficient and included in the fitness function, thereby guiding the population to automatically eliminate infeasible solutions and converge towards the low-cost feasible region; the fitness function is expressed as follows: in, Represents the fitness function. This represents the total system cost. Indicates a delay penalty. Indicates storage penalty item, This indicates a bandwidth penalty. , , This is the preset penalty coefficient.
7. A cloud-edge collaborative task offloading method for field environments according to claim 4, characterized in that, In step C), the feasibility priority ranking rule is as follows: any feasible solution that satisfies all constraints is better than any infeasible solution that violates constraints; among two feasible solutions, the one with lower total system cost is better; among two infeasible solutions, the one with lower degree of violation is better.
8. A cloud-edge collaborative task offloading method for field environments according to claim 4, characterized in that, In step D), the cooperative evolution specifically refers to: 1) Dual collaboration of elite level: For elite level particles, firstly, based on the preset cognitive learning probability, cross-operation is performed with their individual historical best solution to preserve the individual's excellent structure; then, based on the preset social learning probability, cross-operation is performed with the global best solution to provide global guidance. 2) Mutation and guidance in ordinary layers: For particles in ordinary layers, firstly, based on the adaptive mutation probability of the current iteration, a random mutation operation is performed on the particle position vector to enhance the ability to escape local optima; for the mutated particles, a crossover operation is performed again with the global optimal solution to move closer to the global optimum while maintaining diversity.
9. A cloud-edge collaborative task offloading method for field environments according to claim 4, characterized in that, In step E), the dynamic update formula for the adaptive mutation probability is: in, For adaptive mutation probability, This represents the current iteration number. The maximum number of iterations, and These are the initial and final values of the mutation probability, respectively.
10. A cloud-edge collaborative task offloading system for field environments, characterized in that, It includes a memory, a processor, and computer program instructions stored in the memory and executable by the processor, wherein when the processor executes the computer program instructions, it can implement the method as described in any one of claims 1-9.