Unloading calculation method, device and equipment for unmanned aerial vehicle and storage medium
By establishing a correspondence between drones and edge servers, optimizing algorithms to construct fitness functions and dynamically unloading computational tasks, the problem of low working efficiency of drones in livestock farming scenarios is solved, and the endurance and data processing efficiency are improved.
Patent Information
- Application Number
- CN202511065658.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-31
- Publication Date
- 2025-11-07
Smart Images

Figure CN120916207A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of edge computing, and in particular to a method and device for computing offloading of a UAV, and a storage medium. BACKGROUND
[0002] Banks measure the loan capacity of individual breeders or small and micro enterprises according to the breeding situation of the livestock industry, but a major challenge facing the bank loan business at present is that it is difficult to accurately assess the value of the real assets of the customer entity. The traditional assessment method relies on manual work, which is not only inefficient, but the assessment results are often not accurate enough. To solve this problem, the banking industry uses the method of unmanned aerial vehicle aerial photography to collect various types of information in the livestock industry scene, so as to measure the value of the real assets.
[0003] When facing the loan assessment business of large farms, the use of unmanned aerial vehicle aerial photography can improve the efficiency of data collection, reduce labor consumption and increase accuracy. However, the use of unmanned aerial vehicles also has some obvious problems. First, the endurance of the unmanned aerial vehicle is short, and it cannot collect complete and continuous pasture conditions, which limits the application of the unmanned aerial vehicle in large-area pastures; second, data processing is complex, and a large amount of image data collected by the unmanned aerial vehicle needs to be preprocessed and analyzed, and these processing processes are complex and time-consuming, further reducing the working efficiency of the unmanned aerial vehicle, which has a great impact on the efficiency and accuracy of loan assessment. Therefore, how to improve the working efficiency of the unmanned aerial vehicle when collecting various types of information in the livestock industry scene is a problem that needs to be solved. SUMMARY
[0004] The present application provides a method and device for computing offloading of a UAV, and a storage medium, to solve the problem of low working efficiency of the unmanned aerial vehicle when collecting various types of information in the livestock industry scene in the prior art.
[0005] According to an aspect of the present application, a method for computing offloading of a UAV is provided, the method comprising:
[0006] determining the edge server corresponding to each unmanned aerial vehicle based on the correspondence between the unmanned aerial vehicle and the edge server;
[0007] constructing a fitness function according to the task queue of each unmanned aerial vehicle and the edge server corresponding to the unmanned aerial vehicle; the fitness function aims to minimize the time delay and total energy consumption of executing the pending tasks of the unmanned aerial vehicle;
[0008] solving the fitness function based on an optimization algorithm to obtain a solution that optimizes the fitness;
[0009] performing computing offloading on the unmanned aerial vehicle based on the offloading strategy corresponding to the optimal solution.
[0010] According to another aspect of the present application, there is provided a computing offloading apparatus for UAVs, the apparatus comprising:
[0011] a server placement module configured to determine an edge server corresponding to each UAV based on a correspondence between the UAVs and the edge servers;
[0012] a data analysis module configured to construct a fitness function according to a task queue of each UAV and the edge server corresponding to the UAV; the fitness function aiming to minimize a time delay and a total energy consumption for executing tasks to be processed by the UAVs;
[0013] a decision control module configured to solve the fitness function based on an optimization algorithm to obtain a solution that optimizes the fitness;
[0014] a decision execution module configured to perform computing offloading on the UAVs based on an offloading strategy corresponding to the solution that optimizes the fitness.
[0015] According to another aspect of the present application, there is provided an electronic device, the electronic device comprising: at least one processor; and
[0016] a memory communicatively connected to the at least one processor; wherein
[0017] the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the computing offloading method for UAVs according to any one of the embodiments of the present application.
[0018] According to another aspect of the present application, there is provided a computer readable storage medium storing computer instructions for causing a processor to implement the computing offloading method for UAVs according to any one of the embodiments of the present application when executed by the processor.
[0019] The application provides a method, device and equipment for computing offloading of a UAV (Unmanned Aerial Vehicle) and a storage medium, and the method comprises the following steps: determining an edge server corresponding to each UAV based on a corresponding relationship between the UAV and the edge server; constructing an adaptive function according to a task queue of each UAV and the edge server corresponding to the UAV; the adaptive function aims to minimize the time delay and total energy consumption of executing the to-be-processed task of the UAV; solving the adaptive function based on an optimization algorithm to obtain an optimal solution of the adaptive function; and performing computing offloading on the UAV based on an offloading strategy corresponding to the optimal solution. The method can reduce the work burden of the UAV, improve the work efficiency of the UAV, and solve the problem of low work efficiency of the UAV in collecting various information in a livestock industry scene.
[0020] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the application, nor is it used to limit the scope of the application. Other features of the application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative labor.
[0022] Figure 1 A flowchart of a computing offloading method of a UAV provided by the embodiment of the application;
[0023] Figure 2 A flowchart of determining the placement position of an edge server provided by the embodiment of the application;
[0024] Figure 3 A structural diagram of a computing offloading device of a UAV provided by the second embodiment of the application;
[0025] Figure 4 A structural diagram of a computing offloading device of a UAV provided by the embodiment of the application;
[0026] Figure 5 A flowchart of a computing offloading method of a UAV provided by the embodiment of the application;
[0027] Figure 6 A structural diagram of a data parser provided by the embodiment of the application;
[0028] Figure 7 A M / M / 1 model in queuing theory provided by the embodiment of the present application is shown in the figure;
[0029] Figure 8 A structure diagram of a decision control module provided by the embodiment of the present application is shown in the figure;
[0030] Figure 9 A flow diagram of a method for solving an optimal unloading strategy provided by the embodiment of the present application is shown in the figure;
[0031] Figure 10 A structure diagram of a decision execution module provided by the embodiment of the present application is shown in the figure;
[0032] Figure 11 A structure diagram of an electronic device provided by the embodiment of the present application is shown in the figure. DETAILED DESCRIPTION
[0033] In order to make the personnel in the art better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by the person of ordinary skill in the art without creative labor should belong to the protection scope of the present application. It should be understood that each step recorded in the method embodiments of the present application can be executed in different order and / or in parallel. In addition, the method embodiments can include additional steps and / or omit the execution of the shown steps. The scope of the present application is not limited in this respect.
[0034] The term “comprising” and variations thereof as used herein are open-ended, that is, “including but not limited to”. The term “based on” is “based, at least in part, on”. The term “one embodiment” means “at least one embodiment”; the term “another embodiment” means “at least one additional embodiment”; the term “some embodiments” means “at least some embodiments”. Related definitions of other terms will be given in the following description.
[0035] It should be noted that the terms "first", "second", and the like in the description and in the claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the application described herein can be implemented in an order other than that illustrated or described herein. In addition, any variation of the terms "include", "have" and the like is intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0036] It should be noted that the modification of "one", "multiple" mentioned in the present application is illustrative but not restrictive, and those skilled in the art should understand that "one or more" should be understood unless otherwise explicitly indicated in the context.
[0037] The names of the messages or information exchanged between the devices in the embodiments of the present application are only for illustrative purposes, and are not intended to limit the scope of the messages or information.
[0038] In recent years, with the popularity of artificial intelligence and terminals such as mobile phones, tablets, and smart watches, the number of Internet of Things devices has grown exponentially. While people are getting more and more data, they have also gradually noticed the disadvantages of cloud computing in terms of distance, deployment, and energy consumption. Edge computing compensates for the disadvantages of cloud computing away from terminal devices and gradually enters people's field of vision. Edge computing pushes data processing and applications to edge devices close to data sources to reduce transmission delay, improve system performance, and reduce dependence on cloud computing resources. Computing offload is an indispensable part of edge computing, which mainly offloads computing tasks from user devices to the cloud or edge nodes for processing to reduce the burden on user devices and prolong their service life.
[0039] Based on this, the existing Chinese patent with publication number CN116170442A proposes a new cloud-edge collaborative computing offload method, which includes: modeling edge server set, cloud server set and various variables of edge server and cloud server; determining task offload variables and task and server corresponding offload matrix model; modeling task completion delay and server load indicators, and determining system total delay and load balancing indicator model therefrom; converting the multi-objective optimization problem of system total delay and load balancing indicators into a single-objective optimization problem using linear weighting; based on the task offload strategy of minimizing system delay and load balancing level, the best offload method is solved by improved coral reef algorithm.
[0040] However, the scheme still has the following problems: (1) the distance between the edge server and the terminal device is not considered, and the communication time difference caused by the distance is ignored, only the edge server and the terminal device are abstracted as two sets, the problem that the terminal device is constantly moving is ignored, and the different deployment modes of the edge server will greatly affect the communication delay between the two; (2) directly linearly add the two variables of time delay and energy consumption, but the two variables are different types, and the size after direct addition has no actual meaning, and the minimum value finally solved cannot represent that the strategy is the optimal offloading scheme; (3) only one variable is considered, but in the actual scene, two or more variables may need to be optimized at the same time.
[0041] Therefore, the present application provides an edge computing method for bank loan evaluation business, aiming to solve the problems of high computing delay and insufficient power supply of the unmanned aerial vehicle when conducting aerial photography operation in the livestock industry. A "cloud-edge-end three-level computing architecture" is constructed, and a dynamic computing offloading method is used to offload part of the computing tasks of the unmanned aerial vehicle to the edge server or the cloud server for calculation, thereby improving the data processing rate and reducing the power consumption of the unmanned aerial vehicle, and improving the working efficiency of the unmanned aerial vehicle, thereby increasing the pasture area that can be scanned by the unmanned aerial vehicle and reducing the labor consumption in the bank loan evaluation process.
[0042] Embodiment one
[0043] Figure 1 A flowchart of a computing offloading method of an unmanned aerial vehicle provided by the present application embodiment one, which can be applicable to the case of offloading the task of the unmanned aerial vehicle to other servers, and the method can be executed by a computing offloading device of the unmanned aerial vehicle, wherein the device can be realized by software and / or hardware, and is generally integrated on an electronic device, which in this embodiment includes but is not limited to: computer and other devices.
[0044] As Figure 1 shown, the computing offloading method of the unmanned aerial vehicle provided by the present application embodiment one includes the following steps:
[0045] S110, determining the corresponding edge server of each unmanned aerial vehicle based on the correspondence between the unmanned aerial vehicle and the edge server.
[0046] Among them, the unmanned aerial vehicle can be a device for conducting aerial photography operation in the livestock industry, and the unmanned aerial vehicle can shoot key information of the pasture and livestock and poultry groups. The edge server can be an edge node with computing and decision-making functions.
[0047] In this embodiment, one edge server can correspond to multiple unmanned aerial vehicles, and the corresponding edge server of each unmanned aerial vehicle can be determined based on the correspondence between the unmanned aerial vehicle and the edge server.
[0048] In an embodiment, the determination of the correspondence between each unmanned aerial vehicle and the edge server comprises: for each unmanned aerial vehicle, taking the centroid of the aerial photography area corresponding to the unmanned aerial vehicle as the position of the unmanned aerial vehicle; based on the positions of all unmanned aerial vehicles and the number of edge servers to be placed, using a clustering algorithm to solve the placement positions of the edge servers, to obtain the placement positions of the edge servers and the unmanned aerial vehicle set corresponding to each edge server; and determining the correspondence between each unmanned aerial vehicle and the edge server based on the unmanned aerial vehicle set corresponding to each edge server.
[0049] The aerial photography area can be demarcated according to breeding modes (free-range, cage), pasture scales, and management requirements. For example, the aerial photography area can include livestock and poultry activity areas, core facility areas, feed resource areas, water source and environment areas, field boundary areas, emergency and safety areas, seasonal migration paths, and ecological sensitive areas. The livestock and poultry activity areas can include grasslands, mountainous areas, forested areas, and other grazing areas in free-range mode, activity fields around breeding sheds in cage mode, and partitioned areas of intensive breeding farms. The core facility areas can include sheds, enclosures, and other habitats, feeding and watering points. The feed resource areas can include pasture planting areas, forage crop areas such as corn silage fields, and vegetation type distributions of natural grasslands. The water source and environment areas can include water storage tanks, water wells, rivers, water channels, and manure treatment areas within the pasture. The field boundary areas can include fences, wire meshes, and other isolation facilities. The emergency and safety areas can include disease isolation areas, fire safety channels, and emergency supplies storage points. The seasonal migration paths refer to the routes and rest points of livestock and poultry during the transition between pastures in the nomadic mode. The ecological sensitive areas refer to areas that have an impact on the surrounding ecology when the breeding activities are carried out near nature reserves or wetlands.
[0050] The centroid can serve as the center point of each clustering group, and the average distance between all points in the group and the centroid is the smallest. The clustering algorithm can be used to divide the data set into several groups, so that the data points in the same group have high similarity, and the data points between different groups have low similarity. Different types of clustering algorithms can be selected according to actual conditions, for example, the clustering algorithm can be K-Means algorithm. The K-Means algorithm is a type of clustering algorithm, and the desired number of groups K can be pre-set.
[0051] In this embodiment, for each unmanned aerial vehicle, the centroid of the aerial photography area corresponding to the unmanned aerial vehicle can be taken as the position of the unmanned aerial vehicle. The positions of the unmanned aerial vehicles and the number of edge servers to be placed can be taken as inputs, and a clustering algorithm can be used to cluster and solve the placement positions of the edge servers, to obtain the placement positions of the edge servers and the unmanned aerial vehicle set corresponding to each edge server. Based on the unmanned aerial vehicle set corresponding to each edge server, the correspondence between each unmanned aerial vehicle and the edge server can be determined.
[0052] For example, the K-Means algorithm can be used to group the UAVs, and each group has a centroid. The edge server can be placed near the centroid. Since the UAVs are constantly moving, but the aerial photography area of the UAV is fixed, the centroid of the moving area of a single UAV is first calculated, and the centroid is used as the position of the UAV. Then, the positions of all UAVs are used as the original data points, and the K-Means algorithm is used again to solve the placement position of the edge server. Figure 2 A flowchart for determining the placement position of an edge server is provided for an embodiment of the application, as shown in Figure 2 The number of edge servers can be limited, and the K-Means algorithm can be used to pre-set the number of groups to meet the clustering requirements. The steps for placing the edge server are as follows: select as many points as possible in each UAV flight area to ensure that the centroid position obtained later can truly represent the entire area; calculate the centroid of the points in each area as the position of the UAV; input the number of groups K (i.e., the number of edge servers); use the K-Means algorithm to solve the position of each centroid; and place the edge server at each centroid position.
[0053] S120, constructing a fitness function according to the task queue of each UAV and the edge server corresponding to the UAV; the fitness function aims to minimize the time delay and total energy consumption of executing the to-be-processed task of the UAV.
[0054] The task queue can include relevant parameters of the task executed by the UAV. The to-be-processed task can be a task that needs to be processed by the UAV, for example, the to-be-processed task can be a task of identifying and classifying the image obtained by photographing.
[0055] In this embodiment, the fitness function can be constructed according to the task queue of each UAV and the edge server corresponding to the UAV. For example, the time delay and total energy consumption of executing the to-be-processed task of the UAV can be calculated through the task queue and the edge server corresponding to the UAV, so as to construct the fitness function.
[0056] In one embodiment, the fitness function is constructed according to the task queue of each UAV and the edge server corresponding to the UAV, including: respectively determining the time delay and total energy consumption of executing the to-be-processed task of the UAV according to the task queue of each UAV and the edge server corresponding to the UAV; and constructing the fitness function based on the time delay and total energy consumption, aiming to minimize the time delay and total energy consumption.
[0057] In the embodiment, each UAV has a corresponding task queue and a corresponding edge server, and when calculating the time delay and total energy consumption, the time delay and total energy consumption when the to-be-processed tasks of the UAV are executed can be calculated respectively, so as to construct the fitness function based on the time delay and total energy consumption.
[0058] In one embodiment, the time delay and total energy consumption for executing the to-be-processed tasks of each UAV are determined according to the task queue of each UAV and the edge server corresponding to the UAV, comprising: selecting one server as a target offloading server from the edge server and the cloud server corresponding to the UAV; obtaining the task queue of each UAV; determining the time delay for executing the to-be-processed tasks of the UAV based on the offloading ratio of the UAV, the task queue and the computing capacity of the target offloading server corresponding to the UAV; and determining the total energy consumption of the UAV based on the computing energy consumption of the UAV for executing the local processing tasks and the energy consumption of the UAV for transmitting the to-be-offloaded tasks to the corresponding target offloading server.
[0059] The cloud server can be a virtual server running in a cloud computing environment and can perform cloud computing. Cloud computing refers to an Internet-based computing method, and shared software and hardware resources and information can be provided to computers and other devices for use. The target offloading server can be a server that finally executes the tasks of the UAV, and the target offloading server can be an edge server or a cloud server. The target offloading server of the UAV can be determined according to actual conditions. When the target offloading server is a cloud server, the UAV can first offload the tasks to the corresponding edge server, and then offload the tasks to the cloud server through the edge server. The offloading ratio can be the ratio of offloading the to-be-processed tasks to other servers. The local processing task can be a task processed locally by the UAV.
[0060] In the embodiment, the target offloading server of the UAV can be determined first, the task queues of all UAVs are obtained, the time delay for executing the to-be-processed tasks of the UAV is determined based on the offloading ratio of the UAV, the task queue and the computing capacity of the target offloading server corresponding to the UAV, and the total energy consumption of the UAV is determined based on the computing energy consumption of the UAV for executing the local processing tasks and the energy consumption of the UAV for transmitting the to-be-offloaded tasks to the corresponding target offloading server.
[0061] In an embodiment, the time delay for executing the task to be processed by the UAV is determined based on the offloading ratio of the UAV, the task queue, and the computing capability of the target offloading server corresponding to the UAV, including: the task queue at least including the data volume of the task to be processed by the UAV, the computing volume of the task to be offloaded, the computing capability of the UAV, the central processor cycle frequency, and the channel bandwidth; determining the local computing time of the UAV based on the offloading ratio of the UAV, the data volume of the task to be processed by the UAV, the computing capability of the UAV, the computing volume of the local processing task, and the central processor cycle frequency; determining the data transmission time of the UAV for transmitting the task to be offloaded to the target offloading server based on the offloading ratio, the data volume of the task to be processed by the UAV, and the channel bandwidth; determining the server computing time of the target offloading server for executing the task to be offloaded based on the offloading ratio, the data volume of the task to be processed by the UAV, the computing volume of the task to be offloaded, and the computing capability of the target offloading server corresponding to the UAV; and determining the time delay of the task to be offloaded based on the local computing time, the data transmission time, and the server computing time.
[0062] The data volume of the task to be processed by the UAV can refer to the size of the data to be processed generated when the UAV executes the task, the computing volume of the task to be offloaded can refer to the total computing resources required to complete the task to be offloaded, the computing capability of the UAV can be the computing volume that can be completed by the processor of the UAV per unit time, the central processor (CPU) cycle frequency can refer to the number of clock cycles that can be executed by the CPU per second, and the channel bandwidth can refer to the maximum data transmission rate of the communication channel between the UAV and the edge node / cloud. The local computing time can refer to the time required for the task executed by the UAV locally, the data transmission time can refer to the time required for the UAV to transmit the task to be offloaded to the target offloading server, and the server computing time can refer to the time required for the task to be offloaded by the UAV to be executed on the target offloading server.
[0063] In this embodiment, the task queue can at least include the data volume of the tasks to be processed by the UAV, the computing volume of the tasks to be offloaded, the computing capability of the UAV, the central processor cycle frequency and the channel bandwidth. The task volume executed locally on the UAV can be calculated by the offloading ratio of the UAV and the data volume of the tasks to be processed by the UAV, and the local computing time of the UAV can be determined in combination with the computing capability of the UAV, the computing volume of the local processing task and the central processor cycle frequency. The task volume to be offloaded by the UAV can be calculated based on the offloading ratio and the data volume of the tasks to be processed by the UAV, and the data transmission time of the UAV for transmitting the tasks to be offloaded to the target offloading server can be determined in combination with the channel bandwidth. Further, the server computing time of the target offloading server for executing the tasks to be offloaded can be determined in combination with the computing volume of the tasks to be offloaded and the computing capability of the target offloading server corresponding to the UAV. The time delay of the tasks to be offloaded can be determined based on the local computing time, the data transmission time and the server computing time.
[0064] The specific calculation methods of the local computing time, the data transmission time, the server computing time and the time delay are not limited in this embodiment, and can be determined according to actual conditions. For example, when calculating the time delay, the difference between the local computing time and the sum of the data transmission time and the server computing time can be taken as the time delay.
[0065] In one embodiment, the constructing, based on the time delay and the total energy consumption, of a fitness function with a target of minimizing the time delay and the total energy consumption includes: performing normalization on the time delay and the total energy consumption respectively based on a mapping function to obtain normalized time delay and total energy consumption; and constructing the fitness function based on a weight factor and the normalized time delay and total energy consumption; the fitness function has the target of minimizing the time delay and the total energy consumption.
[0066] The size of the weight factor can be set according to actual conditions.
[0067] In this embodiment, the mapping function can be used to normalize the time delay and the total energy consumption, and the weight factor can be set to construct the fitness function.
[0068] The computing offloading strategy based on the "cloud-edge-end three-level computing architecture" proposed in this embodiment considers both the reduction of computing time delay and the reduction of UAV energy consumption, and the weight factor is used to express the importance of the time delay and the energy consumption.
[0069] S130, solving the fitness function based on an optimization algorithm to obtain a solution that optimizes the fitness.
[0070] In the embodiment, the fitness function can be solved by an optimization algorithm to obtain a solution that optimizes the fitness. The optimization algorithm can be a heuristic optimization algorithm. The heuristic algorithm is an algorithm based on experience and intuition, which is used to solve complex optimization problems. The core idea of the heuristic algorithm is to use the specific properties of the problem and empirical rules to gradually improve the quality of the solution through iteration and optimization.
[0071] In S140, the UAV is calculated to be unloaded based on the optimal solution corresponding to the unloading strategy.
[0072] The unloading strategy can refer to the unloading ratio of the tasks to be processed by each UAV. The calculation of unloading can refer to the process of transferring a part of the computing task to the edge server to complete, which is called "unloading". The purpose of computing unloading is to reduce the computing delay or reduce the energy consumption. Dynamic computing unloading refers to the real-time calculation of the proportion of unloading to the edge server.
[0073] In the embodiment, the amount of execution that each UAV needs to unload can be determined based on the unloading strategy corresponding to the optimal solution, so as to perform the calculation of unloading.
[0074] The method for computing unloading of the UAV provided by the embodiment one comprises the following steps: determining the edge server corresponding to each UAV based on the corresponding relationship between the UAV and the edge server; constructing a fitness function according to the task queue of each UAV and the edge server corresponding to the UAV; the fitness function aims to minimize the delay and total energy consumption of executing the tasks to be processed by the UAV; solving the fitness function based on an optimization algorithm to obtain a solution that optimizes the fitness; and performing the calculation of unloading of the UAV based on the unloading strategy corresponding to the optimal solution. The method can reduce the work burden of the UAV and improve the work efficiency of the UAV by constructing the fitness function aiming to minimize the delay and total energy consumption, and by solving the fitness function to obtain the unloading strategy of unloading the tasks of the UAV, thereby solving the problem of low work efficiency of the UAV in collecting various information in the livestock industry scene in the prior art.
[0075] On the basis of the above-mentioned embodiments, variant embodiments of the above-mentioned embodiments are proposed. It should be noted that, in order to make the description brief, only the differences between the variant embodiments and the above-mentioned embodiments are described in the variant embodiments.
[0076] In an embodiment, the optimization algorithm is used to solve the fitness function to obtain an optimal solution of the fitness, including: initializing a maximum iteration number and a population size, each individual in the population size representing an offloading ratio of each UAV; determining the fitness of each individual in the current iteration based on the offloading ratio and the fitness function; performing iteration based on the camel optimization algorithm, updating the offloading ratio of each individual to obtain an updated offloading ratio; determining the new fitness of each individual based on the updated offloading ratio; when the iteration number reaches the maximum iteration number or the optimal fitness in the new fitness of each individual changes by less than a termination threshold, taking the offloading ratio corresponding to the optimal fitness as the optimal solution, and terminating iteration.
[0077] In the embodiment, the fitness function can be solved by the camel optimization algorithm. Specifically, the maximum iteration number and the population size can be initialized first, the fitness of each individual in the current iteration can be calculated based on the population size and the fitness function, and iteration can be performed based on the camel optimization algorithm, the offloading ratio of each individual can be updated to obtain an updated offloading ratio, the new fitness of each individual can be determined again based on the updated offloading ratio, and it can be judged whether the change of the fitness is less than a termination threshold or whether the iteration number reaches the maximum iteration number. If yes, the iteration can be ended, the optimal fitness can be selected, and the offloading ratio corresponding to the optimal fitness can be taken as the optimal solution. Otherwise, the iteration can be continued until the iteration number reaches the maximum iteration number or the change of the optimal fitness in the new fitness of each individual is less than the termination threshold. The size of the termination threshold can be set according to actual conditions.
[0078] Embodiment two
[0079] Figure 3 A structural schematic diagram of a computing offloading device of a UAV is provided for the second embodiment of the present application. The device can be applicable to the case of offloading the task of the UAV to other servers. The device can be realized by software and / or hardware, and is generally integrated on an electronic device.
[0080] As shown in Figure 3 , the device includes:
[0081] The server placement module 210 is configured to determine the edge server corresponding to each UAV based on the corresponding relationship between the UAV and the edge server.
[0082] The data analysis module 220 is configured to construct a fitness function according to the task queue of each UAV and the edge server corresponding to the UAV. The fitness function aims to minimize the time delay and total energy consumption of executing the to-be-processed task of the UAV.
[0083] The decision control module 230 is configured to solve the fitness function based on an optimization algorithm to obtain an optimal solution of the fitness.
[0084] a decision execution module 240, configured to perform the computation offloading on the UAV based on an offloading strategy corresponding to the optimal solution.
[0085] The embodiment provides a computation offloading device for a UAV, comprising: a server placement module, configured to determine an edge server corresponding to each UAV based on a corresponding relationship between the UAV and the edge server; a data analysis module, configured to construct an fitness function according to a task queue of each UAV and the edge server corresponding to the UAV; the fitness function aims to minimize a time delay and total energy consumption of executing a to-be-processed task of the UAV; a decision control module, configured to solve the fitness function based on an optimization algorithm to obtain a solution with optimal fitness; and a decision execution module, configured to perform the computation offloading on the UAV based on an offloading strategy corresponding to the optimal solution. By constructing the fitness function aiming to minimize the time delay and the total energy consumption, and solving the fitness function to obtain the offloading strategy of offloading the task of the UAV, the working burden of the UAV can be reduced, the working efficiency of the UAV can be improved, and the problem of low working efficiency of the UAV in collecting various information in a livestock industry scene in the prior art is solved.
[0086] Further, the server placement module 210 comprises an edge placer, configured to:
[0087] for each UAV, taking a center of mass of a aerial photography area corresponding to the UAV as a position of the UAV;
[0088] based on the positions of all the UAVs and a number of to-be-placed edge servers, using a clustering algorithm to solve a placement position of the edge servers to obtain the placement position of each edge server and a UAV set corresponding to each edge server;
[0089] based on the UAV set corresponding to each edge server, determining a corresponding relationship between each UAV and the edge server.
[0090] Further, the data analysis module 220 comprises a data analyzer, comprising:
[0091] determining a time delay and total energy consumption of executing a to-be-processed task of each UAV according to a task queue of the UAV and the edge server corresponding to the UAV, respectively;
[0092] an offloading model analyzer, configured to construct a fitness function based on the time delay and the total energy consumption, aiming to minimize the time delay and the total energy consumption.
[0093] Further, the data analyzer comprises:
[0094] selecting one server as a target offloading server from the edge server and the cloud server corresponding to the UAV;
[0095] a task parser configured to obtain a task queue of the UAV for each UAV;
[0096] a time parser configured to determine a time delay for executing a to-be-processed task of the UAV based on an offloading proportion of the UAV, the task queue, and a computing capability of the target offloading server corresponding to the UAV;
[0097] an energy consumption parser configured to determine a total energy consumption of the UAV based on a computing energy consumption of the UAV for executing a local processing task and an energy consumption of the UAV for transmitting a to-be-offloaded task to the corresponding target offloading server.
[0098] Further, the time parser comprises:
[0099] the task queue at least comprises a data amount of a to-be-processed task of the UAV, a computing amount of a to-be-offloaded task, a computing capability of the UAV, a central processing unit cycle frequency, and a channel bandwidth;
[0100] determine a local computing time of the UAV based on the offloading proportion, the data amount of the to-be-processed task of the UAV, the computing capability of the UAV, the computing amount of the local processing task, and the central processing unit cycle frequency;
[0101] determine a data transmission time of the UAV for transmitting the to-be-offloaded task to the target offloading server based on the offloading proportion, the data amount of the to-be-processed task of the UAV, and the channel bandwidth;
[0102] determine a server computing time of the target offloading server for executing the to-be-offloaded task based on the offloading proportion, the data amount of the to-be-processed task of the UAV, the computing amount of the to-be-offloaded task, and the computing capability of the target offloading server corresponding to the UAV;
[0103] determine the time delay of the to-be-offloaded task based on the local computing time, the data transmission time, and the server computing time.
[0104] Further, the offloading model parser comprises:
[0105] normalize the time delay and the total energy consumption based on a mapping function respectively to obtain normalized time delay and total energy consumption;
[0106] construct a fitness function based on a weight factor and the normalized time delay and total energy consumption; the fitness function aims to minimize the time delay and the total energy consumption.
[0107] Further, the decision control module 230 comprises:
[0108] Initialize the maximum number of iterations and the population size, each individual in the population size representing the unloading ratio of each unmanned aerial vehicle;
[0109] Based on each of the unloading ratio and the fitness function, determine the fitness of each individual in this iteration;
[0110] Based on the iteration of the camel optimization algorithm, update the unloading ratio of each individual to obtain the updated unloading ratio;
[0111] Based on the updated unloading ratio, determine the new fitness of each individual;
[0112] When the number of iterations reaches the maximum number of iterations or the optimal fitness of the new fitness of each individual is less than the termination threshold, the optimal unloading ratio corresponding to the optimal fitness is taken as the optimal solution, and the iteration is terminated.
[0113] The above-mentioned unmanned aerial vehicle computing offloading device can execute the unmanned aerial vehicle computing offloading method provided by any embodiment of the present application, and has the corresponding function modules and beneficial effects of the execution method.
[0114] The embodiments of the present application provide several specific implementation manners on the basis of the technical solutions of the above-mentioned embodiments.
[0115] As a specific implementation manner of the present embodiment, Figure 4 A structure schematic diagram of a computing offloading device for unmanned aerial vehicles provided by the embodiment of the present application is shown in the figure. Figure 4 As shown in the figure, the server placement module belongs to the front-end module, and after the edge server placement is completed, the other three modules start to work. The data analysis module includes a data buffer and a data parser, the data buffer is responsible for temporarily storing user data, the data parser is responsible for parsing various parameters required for computing offloading, and modeling the computing offloading problem as a minimum value solving problem, and then transmitting these parameters to the decision control module. After receiving the decision signal, the data buffer will send the data to the decision execution module. The decision control module includes a decision maker and a signal distributor, the decision maker is responsible for receiving the information sent by the data parser, then calculating the computing offloading strategy, and finally the signal distributor distributes the decision signal to the data analysis module and the decision execution module; the decision executor is composed of a task buffer, an application executor and a signal transmitter, the task buffer is responsible for temporarily storing the data distributed by the data acquisition module, the application executor is responsible for executing the offloading decision, and the final execution result is sent by the signal transmitter.
[0116] Figure 5 A flowchart of a computing offloading method for unmanned aerial vehicles provided by the embodiment of the present application is shown in the figure.Figure 5 As shown, the edge server can be deployed using a clustering algorithm, the data analysis module is responsible for collecting information and data caching, if an application execution signal is received, it means that the offloading decision has been calculated, and the cached data can be directly sent to the decision execution unit; if no application execution signal is received, the collected information is processed and transmitted to the decision control unit. The decision control unit calculates the offloading strategy, and then sends out the signal, which is executed by the decision execution unit.
[0117] The embodiment can first use the K-Means clustering algorithm to solve the placement position of the edge server, so that the average distance between the edge server and the user is minimized, a set of computing offloading schemes based on the "cloud-edge-end three-level computing architecture" is designed, the computing delay and energy consumption are optimized, and dynamic computing offloading strategies can be realized.
[0118] Among them, the data buffer is mainly responsible for storing data, and the data parser is responsible for converting the computing offloading problem into a mathematical problem through modeling. Figure 6 A structural diagram of a data parser provided by the embodiment of the application is shown in Figure 6 As shown, the data parser includes a task parser, a time parser, a communication parser, an energy consumption parser and an offloading model parser.
[0119] (1) Task Parser
[0120] Suppose there are N terminal devices (such as unmanned aerial vehicles) in the current scenario, each device has a corresponding task queue T i For each T i , there is T i =T(M i ,D i ,k i ,f i ,B i ). Wherein M i represents the data volume of all tasks of the i-th device; D i represents the computing volume that needs to be offloaded by the i-th device; k i represents the computing capacity of the i-th device; f i represents the CPU cycle frequency of the i-th device; B i represents the channel bandwidth in which the i-th device is located.
[0121] For each terminal device, there is r={r1, r2,..., r N}, wherein r i represents the offloading ratio of the i-th terminal device, that is, r i proportion of the task volume is offloaded to the edge device.
[0122] (2) Communication parser
[0123] Each terminal device uses a wireless sub-channel, and different channels are orthogonal to each other, and do not affect each other in the transmission process. The information transmission rate in the channel can be obtained by Shannon formula. Shannon formula can be a core formula for calculating channel capacity, that is, the maximum rate at which the channel can transmit information without error under given conditions.
[0124] (3) Time parser
[0125] The time parser of the embodiment mainly considers three aspects, local computing time, data transmission time and computing time of the edge server or cloud server. Among them, the data transmission time can be directly defaulted as the time of transmitting data from the terminal device to the edge server or cloud server, ignoring the transfer time of the decision server. At the same time, the computing time of the cloud server needs to consider the queuing delay.
[0126] That is, when the target offload server is a cloud server, the computing time of the target offload server also needs to calculate the queuing delay. The queuing delay can use the M / M / 1 model in queuing theory, which can refer to a mathematical theory for studying queuing phenomena, mainly studying the process of tasks queuing for service in the service system. The specific calculation is as follows:
[0127] Figure 7 An M / M / 1 model in queuing theory provided by the embodiment of the application is shown in FIG. 1. Figure 7 As shown in FIG. 1, it is assumed that the queue length is limited, and the calculation demand is waiting for the next sending of the calculation demand if the queue length is full when the calculation demand arrives. The arrival time and service time of the calculation demand are subject to exponential distribution, and the number of cloud servers is one. Each node in the figure represents a queue position. When a new calculation demand joins the queue, state k enters state k+1 at a rate r. When a demand leaves the queue, state k enters state k-1 at a rate u. Wherein, r represents the number of users served per unit time, and u represents the number of servers queuing per unit time. Define:
[0128] ρ=r / u;
[0129] p0=(1-ρ) / (1-ρ N+1 );
[0130] Then the probability distribution of each state is:
[0131] p k =ρ k *p0;
[0132] And:
[0133]
[0134] According to the calculation equation for the M / M / 1 queue, the waiting time for the cloud server queuing delay is:
[0135]
[0136] in, L q =L s -(1-P0).
[0137] (4) Energy consumption analyzer
[0138] This embodiment considers extending the usage time of the terminal device, so in terms of energy consumption, only the energy consumption of the terminal device needs to be considered. The energy consumption of the terminal device mainly includes two parts: computing energy consumption and the energy consumption of transmitting data to the edge server or cloud server.
[0139] (5) Unload the model parser
[0140] This embodiment comprehensively considers both computational delay and energy consumption. Since these two are measured in different units, a mapping function is defined as follows:
[0141]
[0142] The two variables can be mapped to the interval [0,1) using a mapping function. Then, a weight factor g (g∈[0,1]) is introduced to represent the degree of concern for time delay and energy consumption. Thus, the fitness function is as follows:
[0143] fitness=g*h(T)+(1-g)*h(E);
[0144] Different scenarios have varying degrees of concern regarding latency and energy consumption. Assuming the drone covers a large area, reducing the size of g can optimize energy consumption to a greater extent. By adjusting the value of g, the system can dynamically adapt to the changing needs of different scenarios.
[0145] Meanwhile, since the function h(x) is a monotonic function, the fitness value directly reflects the computational delay and energy consumption. In the above formula, the weighting factor g is a constant, and the computational delay T and energy consumption E are both r (r={r1,r2,...,r...). N Since the fitness function is a function of r, it is a function of r. Different fitness values can be obtained based on different unloading ratios of N terminals, and a smaller fitness value indicates a better unloading effect. In summary, the unloading model in this embodiment is ultimately modeled as solving for the minimum fitness, i.e., solving for the minimum value of the function.
[0146] The data parser parses the unloading task into a function to be solved, and then the data acquisition module transmits the information of this function to the decision control module, which then solves the problem.
[0147] The decision maker in the decision control module is responsible for solving the function transmitted by the data analysis module, and the signal distributor transmits the calculated decision signal to the data analysis module and the decision execution module. Figure 8 A structural schematic diagram of a decision control module provided by an embodiment of the present application is shown in Figure 8 As shown, since the data analyzer converts the calculation offloading problem into a function minimum solving problem, the function is a non-convex function, and it is difficult to quickly obtain the result using a simple solving method, so a heuristic optimization algorithm is considered to be used to solve the function. The non-convex function can refer to a function that does not satisfy the convexity condition in the definition domain. The non-convex function can have multiple peaks, and it is difficult to quickly find the maximum value using a general derivation method, so a more complex algorithm and strategy are needed when solving the maximum value of the non-convex function. Hippo optimization algorithm is a heuristic optimization algorithm based on the idea of bionics, which can quickly find the optimal solution through iteration. The algorithm includes three strategies, the exploration strategy is responsible for ensuring extensive search in the search space, the defense strategy avoids the algorithm falling into local optimum, and the escape strategy ensures that the position of the hippo individual is within a reasonable range and increases the diversity of the solution by dynamically adjusting the search range and random coefficient. With the increase of the number of iterations, the three strategies are executed in turn, and each iteration is closer to the optimal solution, until the maximum number of iterations is reached.
[0148] Figure 9 A flowchart of solving the optimal offloading strategy provided by an embodiment of the present application is shown in Figure 9 As shown, the steps of solving the optimal offloading strategy can include: initializing the maximum number of iterations T, the population size N; inputting the fitness function, that is, the function modeled by the data analysis module; randomly generating N individuals in the function definition interval, each individual corresponds to an offloading strategy; calculating the fitness of each individual and selecting the optimal solution; using the three strategies of the hippo optimization algorithm to calculate the minimum fitness; and returning the best search strategy.
[0149] Figure 10 A structural schematic diagram of a decision execution module provided by an embodiment of the present application is shown in Figure 10 As shown, the task buffer is responsible for receiving and temporarily storing data; the application executor receives the decision signal and is responsible for executing the data processing task, the application executor includes an edge server and a cloud server, for each offloaded task, it cannot be divided and can only be executed by one of the edge server or the cloud server; and the signal transmitter is responsible for returning the result after execution to the user.
[0150] The technical scheme of the embodiment of the present application uses the K-Means algorithm to solve the position of the edge server, can effectively reduce the average distance between the unmanned aerial vehicle and the edge server, reduce the average data transmission time, and further improve the calculation efficiency of the offloading strategy; when the model is constructed, the calculation delay and the energy consumption are mapped in a mapping manner, so that the size of the value after the addition of the two can intuitively reflect the offloading effect, and the calculation offloading problem is converted into a minimum value solving problem, and the good and bad of the offloading effect can be obtained through simple comparison, which is beneficial to improving the solving efficiency of the optimal offloading strategy; the weight factor is introduced to represent the attention degree of the delay and the energy consumption, and the weight can be dynamically adjusted according to the actual scene, so that the attention degree of the delay and the energy consumption can be modified by the business personnel through simple input in different scenes.
[0151] Embodiment three
[0152] Figure 11 A structural schematic diagram of an electronic device 10 that can be used to implement embodiments of the present application is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smartphones, wearable devices (e.g., headsets, glasses, watches, etc.), and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not intended to limit the implementations of the present application described and / or claimed in this document.
[0153] As Figure 11 shown, the electronic device 10 includes at least one processor 11, and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected with the at least one processor 11, wherein the memory stores a computer program that can be executed by the at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected with each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0154] A plurality of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.
[0155] The processor 11 can be various general and / or special purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs various methods and processes described above, such as the drone’s computational offloading method.
[0156] In some embodiments, the drone’s computational offloading method can be implemented as a computer program tangibly embodied in a computer readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded onto the RAM 13 and executed by the processor 11, one or more steps of the drone’s computational offloading method described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to perform the drone’s computational offloading method by any other appropriate means, such as by means of firmware.
[0157] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a programmable logic device (PLD), a computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0158] Computer programs for implementing the methods of the present application can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer program, when executed, can cause instructions defined in the flow charts and / or block diagrams to be implemented. The computer program can be executed entirely on a machine, partially on a machine, partially on a machine as a stand-alone software package, and partially on a remote machine or entirely on a remote machine or server.
[0159] In the context of the present application, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer-readable storage medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of a machine-readable storage medium will include one or more lines of a program of instructions in a transitory signal, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0160] To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0161] The systems and techniques described herein can be implemented in a computing system that includes a back end component, e.g., as a data server, or that includes a middleware component, e.g., an application server, or that includes a front end component, e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described herein, or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication, e.g., a communication network. Examples of communication networks include a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0162] The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. A server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and VPS service.
[0163] It should be understood that the various forms of flow shown above can be re-ordered, added to, or deleted from without departing from the scope of the present application. For example, the steps recited in the present application can be performed in parallel, in series, or in a different order, without departing from the desired results of the technical solutions of the present application, and this is not limited herein.
[0164] The above detailed description does not constitute a limitation on the protection scope of the present application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements, and improvements made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for computing offloading of a UAV, the method comprising: The method comprises: determining the corresponding relationship between each UAV and the edge server based on the corresponding relationship between the UAV and the edge server; constructing a fitness function according to the task queue of each UAV and the edge server corresponding to the UAV; the fitness function aims to minimize the time delay and total energy consumption of executing the to-be-processed tasks of the UAV; solving the fitness function based on an optimization algorithm to obtain an optimal solution that optimizes the fitness; performing computational offloading on the UAV based on the offloading strategy corresponding to the optimal solution.
2. The method of claim 1, wherein, The determination of the corresponding relationship between the UAV and the edge server comprises: for each UAV, taking the centroid of the aerial photography area corresponding to the UAV as the position of the UAV; based on the positions of all UAVs and the number of to-be-placed edge servers, using a clustering algorithm to solve the placement positions of the edge servers to obtain the placement positions of the edge servers and the UAV set corresponding to each edge server; based on the UAV set corresponding to each edge server, determining the corresponding relationship between each UAV and the edge server.
3. The method of claim 1, wherein, The construction of the fitness function according to the task queue of each UAV and the edge server corresponding to the UAV comprises: determining the time delay and total energy consumption of executing the to-be-processed tasks of each UAV according to the task queue of each UAV and the edge server corresponding to the UAV, respectively; based on the time delay and total energy consumption, constructing a fitness function aiming to minimize the time delay and total energy consumption.
4. The method of claim 3, wherein, The determination of the time delay and total energy consumption of executing the to-be-processed tasks of each UAV according to the task queue of each UAV and the edge server corresponding to the UAV, respectively, comprises: selecting one server from the edge server and the cloud server corresponding to the UAV as a target offloading server; for each UAV, obtaining the task queue of the UAV; based on the offloading proportion of the UAV, the task queue and the computing capacity of the target offloading server corresponding to the UAV, determining the time delay of executing the to-be-processed tasks of the UAV; based on the computing energy consumption of the UAV for executing local processing tasks and the energy consumption of transmitting to-be-offloaded tasks to the corresponding target offloading server, determining the total energy consumption of the UAV.
5. The method of claim 4, wherein, The determination of the time delay of executing the to-be-processed tasks of the UAV based on the offloading proportion of the UAV, the task queue and the computing capacity of the target offloading server corresponding to the UAV comprises: the task queue at least comprises the data volume of the to-be-processed tasks of the UAV, the computing volume of to-be-offloaded tasks, the computing capacity of the UAV, the central processor cycle frequency and the channel bandwidth; based on the offloading proportion of the UAV, the data volume of the to-be-processed tasks of the UAV, the computing capacity of the UAV, the computing volume of local processing tasks and the central processor cycle frequency, determining the local computing time of the UAV; based on the offloading proportion, the data volume of the to-be-processed tasks of the UAV and the channel bandwidth, determining the data transmission time of the UAV for transmitting to-be-offloaded tasks to the target offloading server; determine a server computing time of the target offloading server performing the to-be-offloaded task based on the offloading proportion, a data volume of a to-be-processed task of the UAV, a computing volume of the to-be-offloaded task, and a computing capability of the target offloading server corresponding to the UAV; determine a time delay of the to-be-offloaded task based on the local computing time, the data transmission time, and the server computing time.
6. The method of claim 3, wherein, the constructing of the fitness function based on the time delay and the total energy consumption and taking minimizing the time delay and the total energy consumption as a target comprises: normalizing the time delay and the total energy consumption based on a mapping function respectively to obtain normalized time delay and total energy consumption; constructing a fitness function based on a weight factor and the normalized time delay and total energy consumption; the fitness function takes minimizing the time delay and the total energy consumption as a target.
7. The method of claim 1, wherein, the solving of the fitness function based on an optimization algorithm to obtain an optimal solution of fitness comprises: initializing a maximum iteration number and a population size, each individual in the population size representing an offloading proportion of each UAV; determining a fitness of each individual in this iteration based on each offloading proportion and the fitness function; updating the offloading proportion of each individual based on the iteration based on the camel optimization algorithm to obtain an updated offloading proportion; determining a new fitness of each individual based on the updated offloading proportion; when the iteration number reaches the maximum iteration number or the optimal fitness of the new fitness of each individual changes by less than a termination threshold, taking the offloading proportion corresponding to the optimal fitness as an optimal solution and terminating the iteration.
8. A computing offloading apparatus of a drone, characterized by, the device comprises: a server placement module configured to determine an edge server corresponding to each UAV based on a corresponding relationship between the UAV and the edge server; a data analysis module configured to construct a fitness function based on a task queue of each UAV and the edge server corresponding to the UAV; the fitness function takes minimizing a time delay and total energy consumption of executing a to-be-processed task of the UAV as a target; a decision control module configured to solve the fitness function based on an optimization algorithm to obtain an optimal solution of fitness; a decision execution module configured to perform computational offloading on the UAV based on an offloading strategy corresponding to the optimal solution.
9. An electronic device, comprising: the device comprises: at least one processor; and a memory connected in communication with the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the computational offloading method of the UAV according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions for enabling the processor to execute the computational offloading method of the UAV according to any one of claims 1-7 when executed.
Citation Information
Patent Citations
Calculation unloading method based on improved coral reef algorithm in cloud-edge cooperative calculation
CN116170442A