A cloud-edge collaborative computing offloading method for smart agriculture

By optimizing task allocation through adaptive prediction of task load and particle swarm optimization, the real-time and accuracy issues of cloud-edge collaborative computing offloading in smart agriculture are solved. Dynamic adjustment of task offloading is achieved, power consumption is reduced, and the seasonality and concentration of agricultural operations are adapted to the characteristics of agricultural operations.

CN116132438BActive Publication Date: 2025-11-07JIANGSU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211434359.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-16
Publication Date
2025-11-07
Estimated Expiration
2042-11-16

AI Technical Summary

Technical Problem

Existing cloud-edge collaborative computing offloading algorithms are mainly based on static modeling, which fails to effectively consider the seasonal and concentrated characteristics of agricultural operations in smart agriculture, leading to task offloading conflicts and making it difficult to meet the requirements for real-time performance and accuracy.

Method used

An adaptive task load prediction algorithm is designed to transform the system problem into a mixed-integer nonlinear optimization problem. By using particle swarm optimization and adaptive functions, the task allocation is dynamically adjusted to avoid conflicts. Combining the advantages of cloud and edge computing, the task offloading strategy is optimized.

Benefits of technology

It improves the real-time performance and accuracy of task completion, reduces power consumption, avoids network congestion, and adapts to the dynamic needs of smart agriculture.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116132438B_ABST
    Figure CN116132438B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of wisdom agriculture, and particularly relates to a cloud-edge collaborative computing offloading method for wisdom agriculture. The present application constructs an adaptive task quantity prediction function, a response time model, a power consumption model and a load model, converts actual problems in the system into basic mathematical models, and specifically abstracts problems into optimal solution problems of mixed integer nonlinear optimization problems. Finally, the optimal computing offloading result is found by using the defined adaptive function and the particle swarm algorithm. Compared with other cloud-edge collaborative computing offloading methods applied in wisdom agriculture, the present application overcomes the error conflicts caused by traditional static modeling, improves the accuracy of the computing offloading result, and greatly improves the real-time performance and accuracy of terminal task computing.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of smart agriculture technology, and in particular to a cloud-edge collaborative computing offloading method for smart agriculture. BACKGROUND

[0002] With the development of information technology, as a national focus, the fundamental of the country, the wisdom of agriculture is an important field of national support in recent years, and is an important part of the national strategy of rural revitalization.

[0003] However, with the deepening of the wisdom of agriculture, how to analyze and process massive heterogeneous sensing information in a timely manner, and then provide real-time data support for various agricultural operation processes, is still a problem to be solved in the field of agricultural wisdom. With the development and popularization of 5G and other communication technologies, and the improvement of various cloud, edge and end computing capabilities, a cloud-edge-end collaborative computing mode provides a possibility for the timely analysis and processing of massive heterogeneous sensing information generated by various agricultural operation processes: computing tasks do not need to be uploaded to the cloud, and edge node computing can be used to greatly reduce the overall latency. Therefore, the present application proposes a smart agriculture computing offloading method based on cloud-edge collaboration.

[0004] At present, in the field of cloud-edge collaborative computing offloading algorithms, many scholars have proposed many effective methods. For example, Zhao Hongwei et al. in the document "Resource scheduling optimization strategy for cloud-edge collaboration" established an adaptability function on the cloud and edge according to economic cost, completion time and load balancing, and finally used an improved artificial bee colony algorithm to seek the optimal solution; Zhou Bowen et al. in the document "Parallel task scheduling algorithm for end-edge collaboration in unmanned aerial vehicle distribution system" improved the model based on latency using the shortest response time first algorithm, and optimized the update strategy of the expected response time according to the model; Wu Xuewen et al. in the document "Resource allocation and task offloading scheme based on game theory in cloud-edge collaborative system" considered latency, energy consumption and computing resource cost, and used convex optimization conditions to calculate the optimal solution of computing offloading; Liu Jing in the patent "Edge computing divisible task offloading decision method" uses an edge computing divisible task offloading decision method, which uses a mobile user task in edge computing to divide, establishes a task set method to realize the offloading method; Feng Wei et al. in the patent "Computing offloading method based on hybrid genetic algorithm in mobile edge computing" constructs a crossover mechanism, and uses a tabu search algorithm and a simulated annealing algorithm to find the global optimal solution.

[0005] However, the modeling method in the above research is static modeling, only considering the current task quantity, without considering the task quantity that may be generated in the future, that is, the conflict influence brought by dynamic problems is not considered, and it is difficult to meet the computing demand of smart agriculture. Various agricultural operations are often seasonal activities, but within the short time limit of the operation process, they are continuous activities, that is, they have strong periodicity in years (such as sowing, fertilizing, and harvesting every year) and concentration in seasons (such as sowing and harvesting, which are concentrated in time). Because the traditional static modeling does not consider the above factors, it is difficult to avoid conflicts in the coordination process. For example, in the sowing season, the sowing machine temporarily stops for 10 minutes due to some reasons during the operation process. In this case, if it is static modeling, other agricultural machinery for agricultural operations will offload the task of the sowing machine, thereby causing the computing resources of the sowing machine to be occupied by other computing tasks, thereby affecting the subsequent tasks. Therefore, how to design a cloud-edge collaborative computing offloading method with high real-time performance, high accuracy and good adaptation to the application demand of smart agriculture is still a problem to be solved. SUMMARY

[0006] In view of the above problems, the present application provides a cloud-edge collaborative computing offloading method for smart agriculture, which overcomes the shortcomings of the current cloud-edge collaborative computing offloading algorithm, and provides a cloud-edge collaborative computing offloading algorithm with good real-time performance, high accuracy and good adaptation to the application demand of smart agriculture. The present application converts the actual problem in the system into a basic mathematical model by fully considering the real-time performance, accuracy, dynamics, power consumption and task quantity of the whole system, and designs an adaptive prediction task quantity algorithm. The abstract problem is concretized as the optimal solution problem of mixed integer nonlinear optimization problem, and the error conflict caused by traditional static modeling is overcome. Finally, the optimal solution is found by using the defined adaptive function and particle swarm algorithm, so as to dynamically reduce the time and power consumption, and enhance the real-time performance and accuracy of the task calculation of the agricultural machinery end.

[0007] In order to achieve the above object, the technical scheme adopted by the present application is as follows: a cloud-edge collaborative computing offloading method for smart agriculture, comprising the following steps:

[0008] 1) initializing the computing parameters of each computing node, wherein the computing parameters of the computing node are denoted as Cal{M, F, Me}, M represents the total memory of the computing node, F represents the main frequency of the computing node, and Me represents the used memory of the computing node;

[0009] 2) inputting the respective tasks of a plurality of terminal nodes, wherein the task is denoted as Ta{Da, C, S}, Da represents the data size of the task, C represents the number of CPU cycles required by the task, and S represents the sensitivity of the task;

[0010] 3) Each terminal node of the input task determines whether the current task meets local calculation. If it meets local calculation, go to step 13), otherwise upload the input task parameters Ta{Da, C, S} to the connected edge node, and go to step 4);

[0011] 4) Each edge node obtaining the task passes the obtained task parameters Ta{Da, C, S} and the calculation parameters Cal{M, F, Me} of the edge node to the cloud;

[0012] 5) Build a response time model of all tasks in the cloud, and calculate the overall response time model Qk of all tasks;

[0013] 6) Build a system overall power consumption model in the cloud, and calculate the system overall power consumption time E k , the calculation formula is as follows:

[0014]

[0015] Wherein, k is the chip coefficient, F represents the main frequency of the computing node, m is the number of computing nodes allocated to the task, C i is the number of CPU cycles required by the current task;

[0016] 7) Build a load model of each computing node in the cloud, and calculate the load Lo j of the computing node j, the calculation formula is as follows:

[0017] Lo j =Me j / M j *100%

[0018] 8) Build the target function Target of the overall model in the cloud:

[0019] Target=Q k +E k

[0020] 9) Calculate the target function Target in the cloud by using the particle swarm algorithm, and obtain the common optimal solution set gbest of the overall model and the adaptive value gbest result corresponding to gbest;

[0021] 10) The cloud distributes tasks to each edge node or the cloud according to the gbest set;

[0022] 11) The edge node and the cloud execute the task;

[0023] 12) The cloud calculates the storage prediction value T and saves it for the next task execution;

[0024] 13) When the terminal node, edge node and cloud all task computing ends, go to step 2) to start a new round of iteration.

[0025] Further, the above-mentioned smart agriculture cloud-edge collaborative framework includes a cloud, an edge node and a terminal node; the cloud, the edge node and the terminal node are distributed in a tree structure, a plurality of terminal nodes are connected to one edge node, and a plurality of edge nodes are connected to one cloud; the cloud, the edge node and the terminal node all have computing power and can all become computing nodes.

[0026] Further, in step 3) above, the terminal node determines whether the task meets the local computing requirement by simultaneously meeting the following judgment rules:

[0027]

[0028] wherein P is the memory used by the computing task, S lo is the load value threshold, S lc is the local response time threshold, LA is the local task accuracy, and S ac is the local accuracy threshold.

[0029] Further, in step 5) above, the response time model of all tasks is constructed in the cloud, including the following steps:

[0030] 5.1) For each task modeling, respectively calculate the distance coefficient D, the response time R i , the longitudinal predicted value Pre 1 , the transverse predicted value Pre 2 and the predicted task quantity Static of each task.

[0031] 5.2) Calculate the overall response time model Q k of all tasks, and the calculation formula is as follows:

[0032]

[0033] h1 and h2 are the proportional coefficients of the response time and the predicted data quantity respectively, h1+h2=1, and n is the total number of tasks.

[0034] Further, step 9) above includes the following steps:

[0035] 9.1) Initialize the particle swarm algorithm parameters: wherein the particle swarm algorithm parameters include the number of particles n, the number of algorithm iterations k, the position of each particle , the speed of each particle V p , the historical best position of each particle pbest p and the global best position gbest.

[0036] 9.2) Calculate the current fitness value of each particle: respectively put the position X p (0≤p≤n) of each particle into the Target function, calculate the current fitness value set of all particles, recorded as X p result = (X1 result , X2 result , …, X n result )(0≤p≤n);

[0037] 9.3) Update the historical best position of each particle: compare the fitness value X p result of the current position of each particle with the fitness value pbest p corresponding to the historical best position pbest i result of each particle, if the fitness value of the current position is higher, update the historical best position with the current position;

[0038] 9.4) Update the global best position: perform boundary threshold judgment on each particle, if the boundary threshold condition is met, update the global best position with the current position; the boundary threshold condition is as follows

[0039]

[0040] Wherein, gbest result is the fitness value corresponding to the global best position, P i is the computing task memory of task i, S lo is the load value threshold;

[0041] 9.5) Update the speed V p and position X p of each particle; wherein, the speed V p of the particle is calculated as follows:

[0042] V p = w*V p + c1r1(pbest p - X p ) + c2r2(gbest- X p )

[0043] The position X p of the particle is calculated as follows:

[0044] X p = X p + V p

[0045] r1 and r2 are 0 or 1 random numbers subject to Bernoulli distribution, w is called inertia or weight variable, and c1 and c2 are acceleration factors or learning variables;

[0046] 9.6) Determine whether the algorithm reaches the set iteration number k, if not, go to step 9.2); otherwise, go to step 10).

[0047] Further, the above step 12) includes the following steps:

[0048] 12.1) Cloud statistical calculation result feedback value: the cloud statistics the actual response time RT of each task i And the actual load value RL of the node itself i ;

[0049] 12.2) Cloud computing stores the predicted value T and saves, and the calculation formula is as follows:

[0050]

[0051] Further, in the above step 5.1), the distance coefficient D is calculated according to the following formula:

[0052]

[0053] B is the channel bandwidth, w is the noise power, h is the channel gain between the user equipment and the broadband channel, p is the user uplink transmission power, and g is the interference caused by other tasks in the channel to task i;

[0054] The response time R i is calculated according to the following formula:

[0055]

[0056] When there is data transmission to the edge computing node, u1 is 1, otherwise 0; When there is data transmission to the cloud, u2 is 1, otherwise 0; D k e is the distance coefficient of the terminal node to the edge node, D k c is the distance coefficient of the terminal node to the cloud;

[0057] The longitudinal predicted value Pre 1 is calculated according to the following formula:

[0058]

[0059] Where, β1 is the proportional coefficient, is the value of the offset k in the wth year, and t is the number of stored data;

[0060] The transverse predicted value Pre2 The calculation formula is as follows:

[0061]

[0062] β² is the proportionality constant, T v It is the value calculated at time v, and t is the number of data stored;

[0063] The static formula for calculating the predicted task volume is as follows:

[0064] Static = a1 * Pre 1 +ɑ2*Pre 2

[0065] a1 and a2 are proportionality constants, a1 + a2 = 1, and a2 is greater than a1.

[0066] Compared with existing technologies, the present invention has the following technical effects: The present invention integrates cloud computing and edge computing into smart agriculture. Based on the established mathematical model, a custom adaptive function and boundary threshold are added to suit the characteristics of smart agriculture. By utilizing the strong computing power of the cloud and the fast response speed of the edge, the present invention avoids local network congestion caused by uneven tasks in the smart agriculture system, solves the error conflict caused by static modeling, minimizes task completion time, improves model accuracy, and avoids excessive power consumption. Attached Figure Description

[0067] Figure 1 This is a diagram of a cloud-edge collaborative architecture.

[0068] Figure 2 This is the overall flowchart. Detailed Implementation

[0069] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. It should be noted that the technical solution and design principle of the present invention will be described in detail below with reference to only one optimized technical solution, but the protection scope of the present invention is not limited thereto.

[0070] The embodiments described above are preferred embodiments of the present invention, but the present invention is not limited to the above embodiments. Any obvious improvements, substitutions or modifications that can be made by those skilled in the art without departing from the essence of the present invention shall fall within the protection scope of the present invention.

[0071] like Figure 1 As shown, the smart agriculture cloud-edge collaboration framework consists of three parts: cloud, edge nodes, and terminal nodes. These are distributed in a tree structure, with multiple terminal nodes connecting to one edge node, and multiple edge nodes connecting to one cloud. Since all three have computing capabilities, they can all serve as computing nodes.

[0072] As Figure 2 shown, the application provides a cloud-edge collaborative computing offloading method for smart agriculture, comprising the following steps:

[0073] 1) Initialize the computing parameters of each computing node, wherein the computing parameters of the computing node are denoted as Cal{M, F, Me}, M represents the total memory of the computing node, F represents the main frequency of the computing node, and Me represents the used memory of the computing node;

[0074] 2) A plurality of terminal nodes input respective tasks, wherein the task is denoted as Ta{Da, C, S}, Da represents the data size of the task, C represents the number of CPU cycles required by the task, and S represents the sensitivity of the task;

[0075] 3) Each terminal node of the input task judges whether the current task meets the local calculation, if the local calculation is met, step 13) is turned, otherwise the input task parameter Ta{Da, C, S} is uploaded to the connected edge node, and step 4) is turned; as a preferred embodiment of the application, the terminal node judges whether the task meets the local calculation and needs to meet the following judgment rules at the same time:

[0076]

[0077] Wherein, P is the memory used for computing task, S lo is the load value threshold, S lc is the local response time threshold, LA is the local task accuracy, S ac is the local accuracy threshold;

[0078] 4) Each edge node obtaining the task transmits the obtained task parameter Ta{Da, C, S} and the computing parameter Cal{M, F, Me} of the edge node to the cloud;

[0079] 5) Construct a response time model of all tasks in the cloud: after the cloud statistics the computing parameter Cal{M, F, Me} of each edge node and the task parameter Ta{Da, C, S} of each task, the response time needs to be modeled. In order to make our model avoid conflict in computing offloading, thereby causing the problem of occupied computing resources, we use the seasonality and concentration of agricultural operations to design the task prediction function Static (see formula 5.1.5) and the model adaptive method (borrowing the actual feedback mechanism of QL algorithm to design a dynamic T value), which enhances the accuracy of model prediction and reserves the basis for the next model calculation, thereby avoiding the conflict problem.

[0080] As a preferred embodiment of the application, step 5) comprises the following steps:

[0081] 5.1) Modeling for each task, as a preferred embodiment of the present application, modeling task i includes the following steps:

[0082] 5.1.1) Calculate the distance coefficient D, the calculation formula is as follows:

[0083]

[0084] Where B is the channel bandwidth, w is the noise power, h is the channel gain between the user equipment and the broadband channel, p is the user uplink transmission power, g is the interference caused by other tasks in the channel to task i;

[0085] 5.1.2) Calculate the response time R i , the calculation formula is as follows:

[0086]

[0087] When there is data transmission to the edge computing node, u1 is 1, otherwise 0; When there is data transmission to the cloud, u2 is 1, otherwise 0; D k e D is the distance coefficient from the terminal node to the edge node, D k c is the distance coefficient from the terminal node to the cloud;

[0088] 5.1.3) Calculate the vertical prediction value Pre 1 , the calculation formula is as follows:

[0089]

[0090] Where, β1 is the proportion coefficient, is the value of the offset k in the w year, t is the number of stored data; In the specific embodiment of the present application, β1 = 0.4;

[0091] 5.1.4) Calculate the horizontal prediction value Pre 2 , the calculation formula is as follows:

[0092]

[0093] Where, β2 is the proportion coefficient, T v is the value calculated at the v time, t is the number of stored data; In the specific embodiment of the present application, β2 = 0.6;

[0094] 5.1.5) Calculate the predicted task amount Static; The calculation formula is as follows:

[0095] Static = α1*Pre 1 + α2*Pre 2

[0096] Wherein, a1 and a2 are proportional coefficients, a1+a2=1, in order to improve the weight of the recent calculation performance, a2 needs to be greater than a1; in the specific embodiment of the application, a1=0.4, a2=0.6;

[0097] 5.2) Calculate the overall response time model Q of all tasks k : The calculation formula is as follows:

[0098]

[0099] Wherein, h1 and h2 are proportional coefficients of response time and predicted data volume respectively, h1+h2=1, and n is the total number of tasks;

[0100] 6) Build a system overall power consumption model on the cloud to calculate the system overall power consumption time E k , the calculation formula is as follows:

[0101]

[0102] Wherein, k is a chip coefficient, F represents the main frequency of the computing node, and m is the number of computing nodes allocated to the task;

[0103] 7) Build a load model of each computing node j on the cloud: define the load Lo of the computing node j , the calculation formula is as follows:

[0104] Lo j = Me j / M j *100%

[0105] 8) Build a target function Target of the overall model on the cloud: the formula is as follows:

[0106] Target=Q k +E k

[0107] 9) Calculate the target function Target on the cloud by using the particle swarm algorithm to obtain the common optimal solution set gbest of the overall model and the adaptive value gbest corresponding to gbest result : Wherein, p represents a particle in the particle swarm algorithm. The Target function is an n*2 function about u1 and u2, wherein u1 and u2 represent whether the task is unloaded on the cloud or unloaded on the edge node (see step 6.2 for detailed formula), and the position concept of the particle swarm algorithm is equivalent to a solution set. The optimal solution of the computing task allocation can be obtained by the particle swarm algorithm, i.e., whether the task that each terminal node cannot process is allocated to the edge node or the cloud for calculation.

[0108] As a preferred embodiment of the present application, as shown in Figure 2 Step 9) includes the following steps:

[0109] 9.1) Initialize particle swarm algorithm parameters: wherein the particle swarm algorithm parameters include the number of particles n, the number of algorithm iterations k, the position of each particle X (As Target is an n*2 function, X p is an n*2 dimensional set, and V p , pbest p and gbest are also the same), the velocity of each particle V p , the historical best position of each particle pbest p and the global best position gbest; in a specific embodiment of the present application, the number of particles is 100, the number of algorithm iterations is 500, the position of each particle X p is a random value, the velocity of each particle V p is a random value, the historical best position of each particle pbest p is a set of all 0s (for the convenience of the first comparison) and the global best position gbest is a set of all 0s (for the convenience of the first comparison);

[0110] 9.2) Calculate the current fitness value of each particle: respectively substitute the position X p of each particle (0≤p≤n) into the Target function (i.e. substitute each element of the set into the Target function to solve), calculate the current fitness value set of all particles, denoted as X p result =(X1 result , X2 result , …, X n result )(0≤p≤n)

[0111] 9.3) Update the historical best position of each particle: compare the fitness value X p result of the current position of each particle with the corresponding fitness value pbest p of the historical best position pbest i result If the fitness value of the current position is higher, update the historical best position with the current position;

[0112] 9.4) Update the global best position: perform boundary threshold judgment on each particle, and if the boundary threshold condition is met, update the global best position with the current position; the boundary threshold condition is as follows

[0113]

[0114] gbest result is the fitness value corresponding to the global best position, P i is the computation task usage memory of task i, S lo is the load value threshold;

[0115] 9.5) Update the velocity V of each particle p and the position X p (n*2-dimensional set plus minus times); the calculation formula is as follows:

[0116] X p = X p + V p

[0117] V p = w*V p + c1r1(pbest p -X p ) + c2r2(gbest-X p )

[0118] wherein r1 and r2 are 0 or 1 random numbers subject to Bernoulli distribution, w is called an inertia or weight variable, and c1 and c2 are acceleration factors or learning variables. In the specific embodiment of the present application, the value of w is 4, the value of c1 is 1.49, and the value of c2 is 1.49.

[0119] 9.6) Determine whether the algorithm reaches the set iteration number k, if not, go to step 9.2); otherwise, end the algorithm, wherein gbest is the optimal task offloading solution set, and gbest result is the value of the Target function when the optimal task offloading is taken; go to the next step;

[0120] 10) The cloud distributes tasks to each edge node or the cloud according to the gbest set;

[0121] 11) The edge node and the cloud execute the tasks;

[0122] 12) The cloud calculates the calculation result feedback value, calculates the storage prediction value T and saves it, for the preparation of the next task execution.

[0123] As a preferred embodiment of the present application, step 12) includes the following steps:

[0124] 12.1) The cloud calculates the calculation result feedback value: the cloud calculates the actual response time RT i and the actual load value RL i of each task of the node itself;

[0125] 12.2) The cloud calculates the storage prediction value T and saves it, and the calculation formula is as follows:

[0126]

[0127] 13) When all the task computations of the end nodes, edge nodes and cloud end, go to step 2), start a new round of iteration.

Claims

1.A cloud-edge collaborative computing offloading method for smart agriculture, characterized in that, The method comprises the following steps: 1) initializing the computing parameters of each computing node, wherein the computing parameters of the computing node are denoted as Cal{M, F, Me}, M represents the total memory of the computing node, F represents the main frequency of the computing node, and Me represents the used memory of the computing node, and the computing node comprises a cloud, an edge node and a terminal node; 2) inputting respective tasks by a plurality of terminal nodes, wherein the task is denoted as Ta{Da, C, S}, Da represents the data size of the task, C represents the number of CPU cycles required by the task, and S represents the sensitivity of the task; 3) judging whether the current task meets local computing by each terminal node inputting the task, if the local computing is met, step 13) is performed, otherwise the task parameter Ta{Da, C, S} inputted is uploaded to a connected edge node, and step 4) is performed; 4) transmitting the task parameter Ta{Da, C, S} obtained and the computing parameter Cal{M, F, Me} of the edge node to the cloud by each edge node obtaining the task; 5) constructing a response time model of all tasks in the cloud, and calculating the overall response time model Qk of all tasks; 6) Build the system overall power consumption model in the cloud, calculate the system overall power consumption time E k , the calculation formula is as follows: where k is a chip coefficient, F represents the main frequency of the computing node, m is the number of computing nodes allocated to the task, C i is the number of CPU cycles required by the current task; 7) Build the load model of each computing node in the cloud, the load Lo j , the calculation formula is as follows: Lo j = Me j / M j * 100% 8) constructing a target function Target of the overall model in the cloud: Target = Q k + E k 9) Calculate the objective function Target in the cloud using the particle swarm algorithm to obtain the common optimal solution set gbest of the overall model and the fitness value gbest corresponding to gbest result ; 10) distributing the tasks to each edge node or the cloud according to the gbest set in the cloud; 11) performing the tasks by the edge node and the cloud; 12) calculating and feeding back the result value, calculating the storage prediction value T and saving the storage prediction value T, so as to prepare for the next task execution; 13) when the computing of all tasks of the terminal node, the edge node and the cloud is completed, step 2) is performed to start a new round of iteration. 2.The smart agriculture oriented cloud-edge collaboration computing offloading method of claim 1, wherein, In step 3), the terminal node judges whether the task meets the local computing, and the following judgment rules are met: where P is the memory used by the computing task, S lo is the load value threshold, S lc is the local response time threshold, LA is the local task accuracy, S ac is the local accuracy threshold. 3.The smart agriculture oriented cloud-edge collaboration computing offloading method of claim 1, wherein, In step 5), the response time model of all tasks in the cloud comprises the following steps: 5.1) Model for each task, respectively calculate the distance coefficient D, response time R of each task i , the longitudinal predicted value Pre 1 , the lateral predicted value Pre 2 and the predicted task amount Static; 5.2) Calculate the overall response time model Q for all tasks k The calculation formula is as follows: h1 and h2 are proportional coefficients of the response time and the predicted data size respectively, h1+h2=1, and n is the total number of tasks. 4.The smart agriculture oriented cloud-edge collaboration computing offloading method of claim 1, wherein, Step 9) comprises the following steps: 9.1) initialize particle swarm algorithm parameters: wherein the particle swarm algorithm parameters include the number of particles n, the number of iterations k of the algorithm, the position of each particle x p , the velocity of each particle V p , the historical best position of each particle pbest p , and the global best position gbest; 9.2) Calculate the current fitness value of each particle: Substitute the position X p of each particle into the Target function, and calculate the current fitness value set of all particles, denoted as X p result = (X1 result , X2 result , …, X n result ), 0≤p≤n; 9.3) Update the historical best position of each particle: replace the historical best position pbest p result with its current position X p of the corresponding fitness value pbest i result Compare, and if the fitness value of the current position is higher, update the historical best position with the current position; 9.4) updating the global best position: performing boundary threshold judgment on each particle, if the boundary threshold condition is met, updating the global best position with the current position; the boundary threshold condition is as follows: where gbest result is the fitness value corresponding to the global best position, P i is the computational task usage memory for task i, S lo is the load value threshold; 9.5) Update the velocity V of each particle p with the position X p ; where the velocity V of the particle is p The calculation formula is as follows: V p = w * V p + c1r1(pbest p - X p ) + c2r2(gbest - X p ) The position X of the particle p The calculation formula is as follows: X p = X p + V p r1 and r2 are 0 or 1 random numbers subject to Bernoulli distribution, w is called an inertia or weight variable, and c1 and c2 are acceleration factors or learning variables; 9.6) judging whether the algorithm reaches the set iteration number k, if not, step 9.2) is performed; otherwise, step 10) is performed. 5.The smart agriculture oriented cloud-edge collaboration computing offloading method of claim 1, wherein, Step 12) comprises the following steps: 12.1) Cloud statistical calculation result feedback value: the cloud statistics the actual response time RT of each task i and the actual load value RL of the node itself i ; 12.2) calculating and saving the storage prediction value T in the cloud, and the calculation formula is as follows: 6.The smart agriculture oriented cloud-edge collaboration computing offloading method of claim 3, wherein, In step 5.1), the distance coefficient D is calculated according to the following formula: B is the channel bandwidth, w is the noise power, h is the channel gain between the user equipment and the broadband channel, p is the user uplink transmission power, and g is the interference caused by other tasks in the channel to task i; The response time R i The calculation formula is as follows: u1 is 1 when there is data transfer to the edge computing node, otherwise 0; u2 is 1 when there is data transfer to the cloud, otherwise 0; D k e D is the coefficient for the end node to edge node distance; D k c D is the coefficient for the end node to cloud distance. the longitudinal predicted value Pre 1 The calculation formula is as follows: wherein β1 is a proportional coefficient, is a value of the offset at the wth year, t is the number of stored data; the lateral prediction value Pre 2 The calculation formula is as follows: β2 is a proportionality factor, T v is the value calculated at the vth time, t is the number of stored data; The calculation formula of the predicted task size Static is as follows: Static = a1 * Pre 1 + a2 * Pre 2 α1 and α2 are proportional coefficients, α1+α2=1, and α2 is greater than α1.