A Maritime Computing Task Offloading Method and Medium Based on Resource Reservation Mechanism
By adopting the resource reservation mechanism in the marine environment monitoring system and dynamically adjusting the resource allocation strategy, the adaptability of computing resource allocation methods to task request uncertainty and dynamic changes is solved, efficient resource utilization and priority processing of critical tasks are achieved, and system performance is improved.
Patent Information
- Application Number
- CN202510383671.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2045-03-28
AI Technical Summary
In the monitoring of marine environments, the calculation resource allocation method fails to effectively respond to the uncertainty of task requests and the dynamic changes of resources, resulting in idle resources or task rejection, making it difficult to meet system performance requirements.
The offshore computing task offload method based on the resource reservation mechanism is adopted, and the task priority is calculated by initializing the marine environment monitoring system, and the resource allocation strategy is dynamically adjusted using inventory theory to maximize the computing resource utilization and minimize the resource idle rate and rejection rate.
It improves resource utilization, reduces task rejection rate, ensures priority processing of critical tasks, and improves the overall performance of the system and task processing quality.
Smart Images

Figure CN119883662B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of marine environmental monitoring, and particularly to a method and medium for offloading maritime computing tasks based on a resource reservation mechanism. Background Art
[0002] In fields such as marine environmental monitoring, surface sensing nodes are responsible for collecting environmental information on the water surface and underwater, but these nodes usually do not have sufficient computing resources. With the development of technology, it is necessary to efficiently process the computing tasks generated by them, which leads to the need for computing task offloading and scheduling. The current computing resource allocation methods have many problems when facing the uncertainty of task requests and the finiteness of resources. For example, in terms of resource utilization efficiency, there is a lack of dynamic adaptability, and the multi-dimensional characteristics of tasks are not combined, resulting in resource idleness or task rejection; the ability to cope with dynamic changes in resources and tasks is weak, and it is difficult to balance the rejection rate and the idleness rate. As a result, the system's current computing resources are insufficient to reject user requests, or the computing resources are idle, unable to meet the requirements for system performance in practical applications. Therefore, new strategies are needed to optimize the allocation of computing resources and task scheduling.
[0003] The literature research is as follows:
[0004] The literature (Wang Ting. Research on Task Offloading and Resource Allocation Strategies for Unmanned Aerial Vehicle-Assisted Maritime MEC Systems [D]. Jilin University, 2024. DOI: 10.27162 / d.cnki.gjlin.2024.002026.) aims to optimize the system energy consumption and task latency by deciding which tasks to offload for large-scale and widely distributed task types. However, in reality, the types, quantities, priorities, etc. of maritime tasks may change at any time; the maritime environment is complex, and communication resources, energy resources, etc. will change continuously over time and environmental conditions. The research in this literature focuses on specific task types and lacks an effective response mechanism for task dynamic changes, and no offloading and resource allocation strategies adapted to dynamic fluctuations of resources are established.
[0005] Although the literature (Wang Xingchen. Research on Marine Cooperative Computing Offloading Method Based on Task Priority [D]. North University of China, 2023. DOI: 10.26926 / d.cnki.gbfgu.2023.000591.) considers task priority to optimize the allocation of computing and communication resources, it does not involve resource reservation and may have deficiencies when facing sudden tasks or resource fluctuations.
[0006] The literature (Zeng H, Su Z, Xu Q, et al. Usv fleet-assisted collaborative computation offloading for smart maritime services: An energy-efficient design[J]. IEEE Transactions on Vehicular Technology, 2024.) focuses on the problem of UAV computing task offloading in smart maritime services. Under the constraint of meeting the task completion delay threshold, it minimizes the energy consumed by computing tasks. The core of the optimization lies in reasonably allocating computing subtasks and computing capabilities to achieve the goal of minimizing energy consumption. However, the task allocation and computing capacity allocation in the solution are relatively fixed after being determined and cannot sense and adapt to the dynamic changes of these computing resources in real time, which may lead to a decrease in task execution efficiency and even some tasks cannot be completed on time.
[0007] The patent application with the publication number CN114666839A proposes a multi-objective optimization method for maritime edge computing offloading. With delay and energy consumption as constraints, it comprehensively considers resource load, channel transmission, and node execution capabilities, and designs an offloading path optimization method.
[0008] The patent application with the publication number CN115665801A proposes a method for mobile edge computing task offloading and allocation. The scheduling center node is deployed between mobile user devices and each edge server, and the tasks of mobile user devices are allocated to edge servers or cloud servers, achieving a significant reduction in latency, a decrease in energy consumption, and an improvement in efficiency.
[0009] The patent application with the publication number CN117336294A proposes an energy-saving method for ocean-dependent task offloading and resource allocation, which constructs an optimization problem according to the dependency relationship and delay limit of user tasks.
[0010] However, the above patents also do not fully consider the complex dynamic changes of resources due to task completion and new task arrivals in different time slots. This may cause the system to be unable to adjust resource allocation in a timely and effective manner when facing sudden tasks or resource fluctuations, reducing the stability and reliability of the system, making it difficult to ensure the continuous and efficient execution of tasks, and unable to meet the dynamic requirements for computing task offloading and resource allocation in the ocean environment. Summary of the Invention
[0011] In view of this, the purpose of the present invention is to propose a method for maritime computing task offloading based on a resource reservation mechanism.
[0012] In order to achieve the above technical objectives, the technical solution adopted by the present invention is as follows:
[0013] The present invention provides a method for offloading maritime computing tasks based on a resource reservation mechanism, including the following steps:
[0014] Step 1, initialize the marine environment monitoring system, including base station nodes, buoy nodes, and sensing nodes, and clarify the communication coverage, computing functions, and communication capabilities of the base station nodes and buoy nodes; set system parameters, including the number of virtual machines, the number of sub-channels, and the bandwidth;
[0015] Step 2, the sensing nodes generate tasks according to the monitoring requirements and send the task information to the base station nodes or buoy nodes;
[0016] Step 3, calculate the priority of each task according to the task priority formula and arrange the task queue in descending order of priority;
[0017] Step 4, based on the priority-based task allocation scheme and inventory theory, determine the optimization goal of the marine environment monitoring system, that is, to minimize the resource idle rate and request rejection rate while meeting the task requirements;
[0018] Step 5, based on the optimization goal, calculate the amount of computing resources that need to be reserved using inventory theory according to the task status of the current time slot and the task request distribution characteristics of the next time slot;
[0019] Step 6, adjust the resource allocation strategy of the current time slot based on the amount of computing resources that need to be reserved and the actual resource usage;
[0020] Step 7, based on the resource allocation strategy, implement the scheduling of computing resources and communication resources in the current time slot to maximize the remaining computing resources in the current time slot;
[0021] Step 8, the base station nodes and buoy nodes execute tasks according to the resource allocation strategy. After the tasks are completed, release the occupied virtual machine and channel resources and update the resource pool status.
[0022] Further, step 1 specifically includes:
[0023] Step 11, there is one base station node in the marine environment monitoring system , buoy nodes and sensing nodes . The base station node and the buoy node both have computing functions for performing operations on data; the communication coverage and communication capabilities of the base station node are greater than those of the buoy node ; the sensing node real-time collects marine data and generates computing task requirements irregularly;
[0024] The marine environment monitoring system operates in a time-slot manner, and each time slot corresponds to a scheduling period. For any time slot, there corresponds a scheduling period. The previous adjacent scheduling period is the scheduling period, and the next adjacent scheduling period is the scheduling period. Among them, ;
[0025] Step 12: The computing resources of the base station and the buoy are represented in the form of virtual machines. Assuming that there is only one type of virtual machine in the marine environment monitoring system, the required computing resources it contains are represented by , then the base station is virtualized into virtual machines, and the buoy is virtualized into virtual machines. ;
[0026] Step 13: The sensing node accesses the base station node or the buoy node . Among them, the sensing node communicating with the base station node is defined as the sensing node , and the sensing node communicating with the buoy node is defined as the sensing node ; and the set of the sensing nodes and the set of the sensing nodes have no intersection, and the union of the set and the set is included in the entire sensing node set;
[0027] The communication resources to be allocated in the marine environment monitoring system are , that is, it contains sub-channels , the bandwidth of each sub-channel is , and the set of channels is represented by ;
[0028] The sensing nodes and the sensing nodes share communication resources, and the same channel is only allowed to be reused once. The channel gain from the sensing node to the base station node , and the channel gain from the sensing node to the buoy node . Among them, and is large-scale fading, and is fast fading, ;
[0029] The spectrum efficiency obtained by the sensing node is as follows: For:
[0030]
[0031] The spectrum efficiency obtained by the sensing node is as follows: For:
[0032]
[0033] wherein, is the transmission power of the sensing node , represents the transmission power of the sensing node ; represents the multiplexing situation of the sub-channel by the sensing node and the sensing node , represents the sub-channel is multiplexed by the sensing node and the sensing node , represents the sub-channel is not multiplexed by the sensing node and the sensing node ; represents the channel noise power; the corresponding sensing node to the base station node The data rate is ; the corresponding sensing node to the base station node The data rate is .
[0034] Furthermore, the specific steps of step 2 include:
[0035] Step 21. The sensing node generates tasks according to the monitoring requirements. Assuming that the generation of tasks follows a Poisson distribution with a parameter of , then:
[0036] The probability that the number of tasks is is expressed as:
[0037]
[0038] The corresponding cumulative function distribution is ;
[0039] The corresponding probability density function is ;
[0040] Step 22, denotes the task of node . denotes the task data size, denotes the required computing resources, denotes the task benefit, denotes the computing delay required for the task; the node is a sensing node or sensing node , and the tasks of sensing node or sensing node are respectively denoted as and ; ;
[0041] Step 23, the sensing node sends the task information to the base station node or the buoy node, and calculates the corresponding task delays respectively as:
[0042] The transmission delay of the task on the sensing node is:
[0043]
[0044] The computing delay of the task on the sensing node is:
[0045]
[0046] The total delay of the task on the sensing node is:
[0047]
[0048] The transmission delay of the task on the sensing node is:
[0049]
[0050] The computing delay of the task on the sensing node is:
[0051]
[0052] The sensing node Tasks on The total time delay is:
[0053]
[0054] Among them, and represent the number of virtual machines executing the corresponding tasks, and , , , .
[0055] Furthermore, step 3 specifically includes:
[0056] Step 31, for the node The priority calculation formula for the corresponding task is:
[0057]
[0058] Among them, represents the weight between the benefit and the data volume ratio, represents the weight of the importance level, and , ; is the weight value to be calculated, and the tasks on the nodes with higher values have higher priorities;
[0059] Step 32, sort the tasks in descending order of priority to obtain the task set sorted by priority for the current time slot .
[0060] Furthermore, step 4 is specifically:
[0061] Based on inventory theory, the optimization goal of the marine environmental monitoring system is expressed as:
[0062]
[0063] Let The corresponding problem is called the inventory cost generated in the th scheduling period; among them, represents the amount of computing resources that need to be reserved in the current time slot, represents the amount of computing resources lacking in the next time slot, represents the idle cost of resources, represents the cost of user rejection.
[0064] Furthermore, step 5 specifically includes:
[0065] Step 51, let the number of tasks in the current time slot be , and the number of tasks in the next time slot be , according to the task characteristics received in the current scheduling period , obtain the amount of computing resources released in the th scheduling period as . The amount of computing resources to be reserved in the current scheduling period is related to and ;
[0066] Step 52. The amount of computing resources to be reserved in the th time slot , denotes the computing resources required based on the task request in the th time slot;
[0067] Step 53. According to the distribution characteristics of the task requests, the expected value of the lack of computing resources in the next time slot is expressed as:
[0068]
[0069] where is a positive integer greater than zero, representing the increment of the actual number of arriving tasks;
[0070] Then the problem is transformed into:
[0071]
[0072] Problem relative to the problem for the variable taking the expectation, the essence of the problem is still to minimize the inventory cost;
[0073] Let
[0074]
[0075] where denotes that the amount of computing resources released in the th scheduling period is , the number of arriving tasks is , the inventory cost caused by resource reservation, denotes the expected value of the corresponding inventory cost;
[0076] Step 54. To minimize the expected inventory cost generated in the th scheduling period, the following formula is given:
[0077]
[0078] where denotes the The amount of computing resources released in the scheduling period is , and the number of arriving tasks is . When the inventory cost brought by resource reservation represents the change in the expected inventory cost when the number of arriving tasks in the scheduling period increases by 1. ; When , represents the corresponding minimum expected inventory cost;
[0079] Since , it is obtained that:
[0080]
[0081] Because and are both known quantities set, the number of tasks in the next time slot is estimated to be , and based on this, the resource scheduling of the previous scheduling period is implemented.
[0082] Further, step 6 specifically includes:
[0083] Step 61: According to the optimal number of tasks corresponding to the minimum expected inventory cost, inversely deduce the amount of computing resources required for the th scheduling period, and then based on deduce the resources of the current time slot, and further implement the resource allocation strategy;
[0084] Step 62: The goal of resource allocation is to reserve the least amount of computing resources on the premise that all task requests are satisfied, and the marine environment monitoring system will not actively reject the current task request for reservation;
[0085] Step 63: If the computing resources to be allocated in the current time slot are not enough to meet the request requirements, adopt the strategy of allocating as much as possible, that is, try to meet the resource requests of the current users; if the computing resources to be allocated in the current time slot meet the request requirements, reasonably reserve resources to cope with future tasks.
[0086] Further, step 63 specifically includes:
[0087] When the computing resources to be allocated in the current time slot are not enough to meet the request requirements, and is used to represent the computing resources that are extra in the current time slot but do not meet the minimum allocation requirements, it is divided into the following two situations:
[0088] (1) If the released computing resources are sufficient to meet the requirements, that is, , at this time, there is no need to reserve computing resources, that is, the amount of computing resources that need to be reserved currently is ;
[0089] (2) If the released computing resources are not sufficient to meet the demand, that is , the corresponding computing resource shortage , at this time, it is necessary to judge according to the size of ; if , it means that the current computing resource shortage is less than , then the amount of computing resources that need to be reserved ; if , it means that the current computing resource shortage is more than , then no reservation is made, that is ;
[0090] When the computing resources to be allocated in the current time slot meet the request requirements, use ' to represent the remaining computing resources after allocation, and there are the following two cases:
[0091] (1) If the released computing resources are sufficient to meet the demand, that is , no reservation is required, that is, the amount of computing resources that need to be reserved currently is ;
[0092] (2) If the released computing resources are not sufficient to meet the demand, that is , the corresponding computing resource shortage , at this time, it is necessary to judge according to the size of ; if , then ; if , it is divided into two cases again: when is not greater than the minimum computing resource requirement , then no reservation is made, ; when is greater than the minimum computing resource requirement , then set the amount of computing resources that need to be reserved as .
[0093] Further, step 7 specifically includes:
[0094] Step 71, given a value, based on the priority of the tasks, set the set the first high-priority tasks are assigned to the base station node , and the remaining tasks are assigned to the buoy node , set the base station node The remaining number of virtual machines is , and it needs to satisfy ; Assume that the number of buoy nodes with available computing resources in the current time slot is , , then when , the tasks with the lowest priority in the task set are rejected by the ocean environmental monitoring system. Conversely, all task calculation requests are received;
[0095] Thus, the elements of the node set and the set are determined, that is, the first high-priority tasks in the set belong to the set , and the remaining tasks assigned to the buoy nodes belong to the set . Obviously , Ø; Here, the number of elements in the set and the set are represented by and respectively, the number of elements of , ;
[0096] Step 72, when , it indicates that the number of nodes currently requiring task transmission is greater than the number of channels of the ocean environmental monitoring system, and channel multiplexing is required. Conversely, no channel multiplexing is needed, and channels are allocated in the order of decreasing task priority; is the number of lacking channels; if , then no channel multiplexing is required, and the tasks corresponding to the sensor nodes not allocated to channels are rejected; if , the sensor nodes not allocated to channels in the set are multiplexed with the sensor nodes with the lowest priority in the set ; if and , the nodes with the highest priority and not allocated to channels in the set are multiplexed with the nodes in the set , and the nodes not allocated to channels and the corresponding tasks are rejected;
[0097] Step 73, respectively for the set and the set Allocate virtual machine resources for the tasks in the order of highest to lowest priority, and determine the number of virtual machine resources for each task, that is, the virtual machine resources are always preferentially allocated to the tasks with higher priority; when there are unallocated virtual machines, each time a virtual machine is taken out from the set of unallocated virtual machines and allocated to the task with the largest total delay and higher priority to maximize the remaining computing resources; combined with the resource reservation scheme in step 5, when the unallocated virtual machine resources reach the required reserved resource amount, stop allocating virtual machine resources;
[0098] Step 74. Calculate the total delay of all nodes in the set based on the task delay calculation model For the rejected tasks, set their total delay to a value, and ensure that this value is greater than the maximum total delay of the nodes in the set ; accumulate the total delays of all tasks in the set, that is:
[0099]
[0100] Step 75. Change the value of and repeat steps 71 to 74 to obtain the corresponding to the minimized value, the virtual machine resource allocation result, the channel multiplexing result and the current remaining computing resource amount.
[0101] The present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements a method for offloading maritime computing tasks based on a resource reservation mechanism as described above.
[0102] Adopting the above technical solution, compared with the prior art, the present invention has the following beneficial effects:
[0103] 1. The present invention calculates the resource reservation amount based on the inventory theory, and can dynamically adjust the resource reservation strategy for each time slot according to the estimated value of the task request number and the number of available resources. Compared with the traditional fixed resource allocation method, this method can better adapt to the uncertainty of computing task requests. In the case of limited system resources, it can effectively reduce the task rejection rate caused by insufficient resources and avoid excessive resource idling. For example, in a scenario with large fluctuations in task requests, the traditional fixed allocation method may reject a large number of tasks due to insufficient resources during peak task times and cause resource waste during low task times, while the present invention can flexibly adjust according to the actual situation and improve resource utilization.
[0104] 2. In the resource allocation decision-making process, not only the resource satisfaction situation in the current time slot is considered, but also various factors such as the released resource amount, shortage amount, and remaining resource amount are comprehensively considered. For example, when the released resources are insufficient to meet the demand, it is decided whether to reserve resources and the reserved amount based on the comparison between the shortage amount and the remaining resource amount. This comprehensive consideration method makes the resource allocation more reasonable, and can achieve the optimal allocation of resources on the premise of meeting the task requests, improving the overall performance of the system.
[0105] 3. Determine the task priorities through the task priority formula, and allocate the tasks with higher priorities to the base station nodes. This method helps the tasks with high importance, large benefits, and relatively high latency requirements to be processed preferentially, improving the response speed and processing efficiency of the system for critical tasks, thereby enhancing the overall task processing quality and benefits of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0106] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0107] Figure 1 is the execution flowchart of a method for offloading maritime computing tasks based on a resource reservation mechanism provided by an embodiment of the present invention.
[0108] Figure 2 is the schematic diagram of the scheduling process executed by the base station node provided by an embodiment of the present invention.
[0109] Figure 3 is the schematic diagram of a computer-readable storage medium provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0110] The present invention will be further described in detail below with reference to the drawings and embodiments. It should be specifically noted that the following embodiments are only used to illustrate the present invention, but do not limit the scope of the present invention. Similarly, the following embodiments are only partial embodiments of the present invention rather than all embodiments. All other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present invention.
[0111] Please refer to Figure 1 and Figure 2 , a method for offloading maritime computing tasks based on a resource reservation mechanism of the present invention includes the following steps:
[0112] Step 1. System initialization: Initialize the marine environment monitoring system, including base station nodes, buoy nodes, and sensing nodes, and clarify the communication coverage, computing functions, and communication capabilities of the base station nodes and buoy nodes; set system parameters, including the number of virtual machines, the number of sub-channels, and the bandwidth.
[0113] In this embodiment, step 1 specifically includes:
[0114] Step 11. Network model: The marine environment monitoring system includes one base station node , buoy nodes and sensing nodes , and one base station node , buoy nodes and sensing nodes form the entire network system through wireless communication. The base station node and the buoy node both have computing functions for performing operations on data; the communication coverage and communication capabilities of the base station node and the buoy node are different. Generally, the communication coverage and communication capabilities of the base station node are both greater than those of the buoy node . Here, the communication capability refers to the number of nodes that can be simultaneously accessed. The sensing node collects marine data in real time and generates computing task requirements irregularly;
[0115] The marine environment monitoring system operates in a time-slot manner, and each time slot corresponds to a scheduling period; in the following description, the concepts of scheduling period and time slot are selected according to needs and are both represented by . For any th time slot, there is a corresponding th scheduling period. The adjacent previous scheduling period is the th scheduling period, and the adjacent next scheduling period is the th scheduling period, where ; a scheduling period includes steps such as receiving task requests, resource allocation, task execution, and result return. The base station node implements resource allocation decisions for the scheduling and computing processes of the entire system. In particular, the time required for task execution is an integer multiple of the scheduling period. Unless otherwise specified, the tasks in this technical solution refer to computing tasks.
[0116] Step 12. Computing resource model: The computing resources of the base station and the buoy are represented in the form of virtual machines. Assuming that there is only one type of virtual machine in the marine environment monitoring system, the required computing resources (millions of instructions per second) it contains are represented by , then the base station is virtualized into virtual machines, and the buoy is virtualized into virtual machines. Since the computing power of the base station is higher than that of the buoy, there is ; Generally, it is considered that the computing resources contained in one virtual machine are the minimum computing resources required for a task. A task can be executed by multiple virtual machines, but to reduce complexity, it is not allowed to assign the same task to the base station and the buoy simultaneously.
[0117] Step 13. Communication model: The sensing nodes are connected to the base station node or the buoy node . Among them, the sensing nodes communicating with the base station node are defined as sensing nodes , and the sensing nodes communicating with the buoy node are defined as sensing nodes ; and the set of sensing nodes and the set of sensing nodes have no intersection, that is, the sensing nodes cannot be connected to the above two types of access points (APs) simultaneously. The union of the set and the set is included in the entire sensing node set;
[0118] The communication resources to be allocated in the marine environment monitoring system are , that is, it contains sub-channels , the bandwidth of each sub-channel is , and the set of channels is represented by ;
[0119] The sensing nodes and the sensing nodes share communication resources to improve spectrum efficiency. And the same channel is only allowed to be reused once. The channel gain from the sensing node to the base station node is , and the channel gain from the sensing node to the buoy node is , where and are large-scale fading, and is fast fading, ;
[0120] The spectrum efficiency obtained by the sensing node is:
[0121]
[0122] The spectrum efficiency obtained by the sensing node is:
[0123]
[0124] wherein, is the transmission power of the sensing node ; represents the transmission power of the sensing node ; represents the multiplexing situation of the sub-channel by the sensing node and the sensing node ; represents the sub-channel is multiplexed by the sensing node and the sensing node ; represents the sub-channel is not multiplexed by the sensing node and the sensing node ; represents the channel noise power; the data rate from the corresponding sensing node to the base station node is ; the data rate from the corresponding sensing node to the base station node is .
[0125] Step 2, Task Generation and Reception: Based on the marine environment monitoring system constructed in Step 1, the sensing node generates a task according to the monitoring requirements and sends the task information to the base station node or the buoy node; the task information includes the task data size, the required computing resources, the task revenue, the computing delay required by the task, and the importance of the task, etc.
[0126] In this embodiment, the specific steps of Step 2 include:
[0127] Step 21, Task Generation Model: The sensing node generates a task according to the monitoring requirements. Assuming that the generation of the task follows a Poisson distribution with a parameter of , then:
[0128] The probability that the number of tasks is is expressed as:
[0129]
[0130] The corresponding cumulative distribution function (CDF) is ;
[0131] The corresponding probability density function is ;
[0132] Step 22, Task calculation model: represents the task of node , represents the task data size, represents the required computing resources (millions of instructions per second), represents the task benefit, represents the computing delay required for the task, represents the importance level of the task; the node is a sensing node or sensing node , and the tasks of sensing node or sensing node are respectively represented as and ; In particular, it is considered that has a relatively large time scale, that is, higher than the system's resource scheduling period, but the faster the task is completed, the more beneficial it is to the system. Since tasks are generated by nodes, for simplicity of description, the present invention alternately uses the two concepts of nodes and tasks as needed, and assumes that each node generates tasks in each time slot. For nodes that do not generate tasks, it can be considered that the node does not exist. Therefore, this assumption does not affect the situation where nodes dynamically generate tasks.
[0133] Step 23, Task delay calculation: The sensing node sends the task information to the base station node or the buoy node, and calculates the corresponding task delays respectively as:
[0134] The transmission delay of the task on the sensing node is:
[0135]
[0136] The computing delay of the task on the sensing node is:
[0137]
[0138] The task on the sensing node The total time delay is:
[0139]
[0140] Sensing node The task on The transmission time delay is:
[0141]
[0142] Sensing node The task on The computing time delay is:
[0143]
[0144] Sensing node The task on The total time delay is:
[0145]
[0146] Among them, and represent the number of virtual machines executing the corresponding tasks, and , , , .
[0147] Step 3, Task priority sorting: Based on the computing task model and task time delay calculation determined in Step 2, calculate the priority of each task according to the task priority formula, and arrange the task queue in descending order of priority; tasks with higher priority will be allocated resources first.
[0148] In this embodiment, the specific steps of Step 3 include:
[0149] Step 31, The priority calculation formula for the task corresponding to node is:
[0150]
[0151] Among them, represents the weight between the benefit and the data volume ratio, represents the weight of the importance level, and , ; is the weight value to be calculated, Tasks on nodes with higher
[0152] Step 32, Sort the tasks in descending order of priority to obtain the task set sorted by priority for the current time slot .
[0153] Step 4, Optimization objective determination: Based on the priority-based task allocation scheme and inventory theory, determine the optimization objective of the marine environmental monitoring system, that is, under the premise of meeting task requirements, minimize the resource idle rate and request rejection rate by reasonably scheduling resources; represent the optimization objective as a weighted sum model, where weight factors are used to balance the resource idle cost and task rejection cost.
[0154] In this embodiment, step 4 is specifically as follows:
[0155] Based on inventory theory, represent the optimization objective of the marine environmental monitoring system as:
[0156]
[0157] Let The corresponding problem is called the inventory cost generated in the th scheduling period; where represents the amount of computing resources to be reserved in the current time slot, represents the amount of computing resources lacking in the next time slot, represents the resource idle cost, represents the cost of user rejection. In the case of a fixed total amount of resources, the reserved resources correspond to the resource idle rate, The larger it is, the higher the resulting resource idle rate. Obviously, the more computing resources reserved in the current time slot, the more computing resources will be available in the next time slot, and the less the amount of computing resources lacking in the next time slot.
[0158] Step 5, Resource reservation calculation: As can be seen from step 4, the calculation of the reserved computing resources is related to the current resource idle rate and the lack of computing resources in the next time slot. Based on the optimization objective, according to the task status in the current time slot and the task request distribution characteristics in the next time slot, use inventory theory to calculate the amount of computing resources to be reserved; ensure that while meeting task requests, resource idle and request rejection are minimized as much as possible, that is, maximize the objective in step 4 . The resource reservation calculation result will be used as an important basis for subsequent resource allocation.
[0159] In this embodiment, step 5 specifically includes:
[0160] Step 51, Let the number of tasks in the current time slot be , and the number of tasks in the next time slot be . Here, the number of tasks is equivalent to the number of requests. According to the task characteristics already received in the current scheduling period , obtain the amount of computing resources released in the th scheduling period as The amount of computing resources to be reserved in the current scheduling period is related to and ; among them is an uncertain random quantity, and its numerical distribution characteristics are determined by the task generation model in step 21.
[0161] Step 52, the amount of computing resources to be reserved in the th time slot , denotes the computing resources required for the task request in the th time slot; since multiple virtual machine resources can be allocated to one task, the number of task requests does not need to be considered less than , that is, it can be ensured that is always non - negative. Since each task is allocated at most one unit of resources, when the actual number of task requests is greater than , the system will reject the user request, that is, there is a lack of computing resources at this time.
[0162] Step 53, according to the distribution characteristics of task requests, the expected value of the lack of computing resources in the next time slot is expressed as:[[]]
[0163]
[0164] Among them, is a positive integer greater than zero, representing the increment of the actual number of arriving tasks. For example means that the actual number of arriving tasks is the original number of tasks plus 1;
[0165] Then the problem is converted to:[[]]
[0166]
[0167] Problem relative to the problem for the variable to find the expectation, the essence of the problem is still to minimize the inventory cost;
[0168] Let
[0169]
[0170] Among them, denotes that the amount of computing resources released in the th scheduling period is , and when the number of arriving tasks is , the inventory cost brought by resource reservation Indicates the corresponding expected inventory cost;
[0171] Step 54. To minimize the expected inventory cost generated in the th scheduling period, the following formula is given:
[0172]
[0173] where represents that when the amount of computing resources released in the th scheduling period is and the number of arriving tasks is , the inventory cost due to resource reservation, represents the change in the expected inventory cost when the number of arriving tasks in the th scheduling period increases by 1, ; when , represents the corresponding minimum expected inventory cost;
[0174] Since , we get:
[0175]
[0176] Because and are both set known quantities, the number of tasks in the next time slot is estimated by the task generation model in Step 21 as , and based on this, the resource scheduling of the previous scheduling period is implemented. It should be clear that this task request number is not the actual task request number, but the quantity of resource reservation determined accordingly.
[0177] Step 6. Determination of resource allocation and resource reservation strategy: Based on the amount of computing resources to be reserved and the actual resource usage, adjust the resource allocation strategy for the current time slot; if the current resources are insufficient, try to meet the current user requests and decide whether to reserve resources according to the shortage amount; if the resources are sufficient, reasonably reserve resources to cope with future tasks.
[0178] In this embodiment, Step 6 specifically includes:
[0179] Step 61. According to the optimal number of tasks corresponding to the minimum expected inventory cost, inversely deduce the amount of computing resources required for the th scheduling period, and then based on derive the resources for the current time slot and further implement the resource allocation strategy;
[0180] Step 62. The goal of resource allocation is the amount of computing resources that need to be reserved on the premise that all task requests are satisfied, the least, and the marine environment monitoring system will not actively reject the current task request for reservation;
[0181] Step 63. If the computing resources to be allocated in the current time slot are insufficient to meet the request requirements, adopt the strategy of allocating as much as possible, that is, try to meet the resource requests of the current user; the resource reservation strategy at this time revolves around the part that is extra in the current time slot but does not meet the minimum allocation requirements. It unfolds as follows. The specific amount of reserved resources is related to the resources that can be released in the next time slot, and it is divided into the following two cases:
[0182] (1) If the released computing resources are sufficient to meet the requirements, that is, , there is no need to reserve computing resources at this time, that is, the amount of computing resources that need to be reserved currently is ;
[0183] (2) If the released computing resources are insufficient to meet the requirements, that is, , the corresponding computing resource shortage amount , and it is necessary to judge according to the size of at this time; if , it means that the computing resource shortage amount is less than , then the amount of computing resources that need to be reserved is ; if , it means that the computing resource shortage amount is more than , then no reservation is made, that is, ;
[0184] If the computing resources to be allocated in the current time slot meet the request requirements, reasonably reserve resources to cope with future tasks. Use ' to represent the remaining computing resources after allocation, and it is divided into the following two cases:
[0185] (1) If the released computing resources are sufficient to meet the requirements, that is, , there is no need to reserve, that is, the amount of computing resources that need to be reserved currently is ;
[0186] (2) If the released computing resources are insufficient to meet the requirements, that is, , the corresponding computing resource shortage amount , and it is necessary to judge according to the size of at this time; if , then ; if , it is divided into two cases again: when Not greater than the minimum computing resource requirement , then no reservation is made. ; When is greater than the minimum computing resource requirement , then set the computing resource amount to be reserved as .
[0187] Step 7: Computing resource and communication resource scheduling and optimization: Based on the resource allocation strategy, implement the computing resource and communication resource scheduling for the current time slot to maximize the remaining computing resource amount at present; for any sensing node and the tasks generated by it, the variables that need to be optimized and determined include: whether the node belongs to the set or the set , that is, whether the node is connected to the base station node or the buoy node ; the nodes sharing the channel with this node, that is, determine the parameter ; the computing resource amount allocated to this node, that is, the allocation of virtual machine resources; specifically as follows:
[0188] Step 71: Given a value, based on the priority of the tasks, set the set the first high-priority tasks are allocated to the base station node , and the remaining tasks are allocated to the buoy node . Set the remaining number of virtual machines of the base station node as , and it is necessary to satisfy ; Assume that the number of available buoy nodes for computing resources in the current time slot is , , then when , the lowest-priority tasks in the task set are rejected by the ocean environmental monitoring system, otherwise, all task computing requests are received;
[0189] Thus, determine the elements of the node set and the set , that is, the first high-priority tasks in the set belong to the set , and the remaining tasks allocated to the buoy node belong to the set . Obviously , Ø; Here, the number of elements in the set and the set are represented by and respectively, the number of elements of is ;
[0190] Step 72. When , it indicates that the number of nodes that need to transmit tasks currently is greater than the number of channels of the marine environmental monitoring system. Then, channel multiplexing is required. Otherwise, channel multiplexing is not implemented, and channels are allocated in the order of decreasing task priority; is the number of lacking channels; if , then channel multiplexing is not implemented, and the tasks corresponding to the sensor nodes not allocated channels are rejected; if , set the sensor nodes not allocated channels in are multiplexed with the sensor nodes with the lowest priority in and , set the nodes with the highest priority and not allocated channels in are multiplexed with the nodes in
[0191] Step 73. Allocate virtual machine resources to the tasks in set and set respectively. Determine the number of virtual machine resources for each task in the order of decreasing priority, that is, virtual machine resources are always preferentially allocated to tasks with high priority; when there are unallocated virtual machines, each time a virtual machine is taken out from the set of unallocated virtual machines and allocated to the task with the largest total delay and high priority to maximize the remaining computing resources; combined with the resource reservation scheme in step 5, when the unallocated virtual machine resources reach the required reserved resource amount, the allocation of virtual machine resources stops;
[0192] Step 74. Calculate the total delay of all nodes in set based on the task delay calculation model. Set the total delay of the rejected tasks to a value, and ensure that this value is greater than the maximum total delay of the nodes in set ; accumulate the total delays of all tasks in set , that is:
[0193]
[0194] Step 75. Change the value, and repeat steps 71 to 74 to obtain the value corresponding to the minimized , the virtual machine resource allocation result, the channel multiplexing result and the current remaining computing resource amount.
[0195] Step 8, Task Execution and Result Return: The base station node and the buoy node execute tasks according to the resource allocation strategy. After the tasks are completed, the occupied virtual machines and channel resources are released, and the resource pool status is updated.
[0196] Reservation Calculation Based on Historical Data Statistical Analysis: Instead of relying on inventory theory to calculate the resource reservation amount, it predicts the trend and scale of future task requests through the statistical analysis of historical task request data, and thus determines the resource reservation quantity. For example, collect the number of task requests in each time slot in the past period, analyze its distribution law (such as statistical features like mean and variance), establish a prediction model (such as time series model, machine learning model, etc.) to estimate the number of task requests in the next time slot, and then calculate the resource reservation amount according to the estimation result. The advantage of this method is that it does not need to assume that the task requests follow a specific distribution (such as Poisson distribution), and it may be more suitable for scenarios where the actual task request patterns are complex and changeable. However, the disadvantage is that it requires a large amount of historical data support, and the accuracy of the prediction model may be affected by factors such as data quality and environmental changes.
[0197] Reservation Strategy with Dynamic Threshold Adjustment: Set a dynamically changing resource reservation threshold instead of calculating the reservation amount based on a fixed formula. Dynamically adjust the reservation threshold according to real-time information such as the current resource usage of the system, the task completion speed, and the task queue length. For example, when the task completion speed is relatively fast and the task queue is short for a continuous period of time in the system, appropriately lower the reservation threshold; on the contrary, when tasks are backlogged or resources are tense, increase the reservation threshold. The benefit of this solution is that it can more flexibly adapt to the real-time state of the system, but a reasonable threshold adjustment algorithm needs to be designed to avoid frequent adjustments that may cause system instability.
[0198] Allocation Method Based on Task Complexity: In addition to allocating tasks according to task priorities, consider the complexity of tasks (such as the complexity of computing task data processing, the complexity of algorithms, etc.) to decide whether to allocate tasks to the base station node or the buoy node. Allocate tasks with high complexity to the base station node with stronger computing power first, and allocate tasks with lower complexity to the buoy node. This can make more full use of the computing power of different nodes and improve the overall task processing efficiency. However, accurately evaluating task complexity may require additional computing resources and algorithm support, and the definition and measurement criteria of complexity may vary depending on the task type.
[0199] Distributed task allocation algorithm: A distributed algorithm is used for task allocation instead of centralized allocation at the base station node. For example, each sensing node autonomously decides which node to send the task to based on local information such as its communication status with the base station node and buoy node, and the node load situation. This approach can reduce the computational burden on the base station node and improve the scalability and fault tolerance of the system. However, the distributed algorithm needs to solve the problems of coordination and information synchronization between nodes to avoid uneven or conflicting task allocation.
[0200] As Figure 3 shown, an embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the above-mentioned method.
[0201] In addition, in each embodiment of the present invention, each functional unit can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0202] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the methods in each embodiment of the present invention. The aforementioned storage medium includes: USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs, etc., which can store program codes.
[0203] The above are only partial embodiments of the present invention, and thus do not limit the protection scope of the present invention. Any equivalent device or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present invention.
Claims
1. A method for offloading maritime computing tasks based on a resource reservation mechanism, characterized in that, It includes the following steps: Step 1, initialize the marine environment monitoring system, including base station nodes, buoy nodes, and sensing nodes, and clarify the communication coverage, computing functions, and communication capabilities of the base station nodes and buoy nodes; Set system parameters, including the number of virtual machines, the number of sub-channels, and the bandwidth; Step 2, the sensing nodes generate tasks according to the monitoring requirements and send the task information to the base station nodes or buoy nodes; Step 3, calculate the priority of each task according to the task priority formula and arrange the task queue in descending order of priority; Step 4, based on the priority-based task allocation scheme and inventory theory, determine the optimization goal of the marine environment monitoring system, that is, to minimize the resource idle rate and request rejection rate while meeting the task requirements; Step 5, based on the optimization goal, calculate the amount of computing resources that need to be reserved according to the task status of the current time slot and the task request distribution characteristics of the next time slot using inventory theory; Step 6, adjust the resource allocation strategy of the current time slot based on the amount of computing resources that need to be reserved and the actual resource usage; Step 7, based on the resource allocation strategy, implement the scheduling of computing resources and communication resources in the current time slot to maximize the remaining computing resources in the current time slot; Step 8, the base station nodes and buoy nodes execute tasks according to the resource allocation strategy. After the tasks are completed, release the occupied virtual machine and channel resources and update the status of the resource pool.
2. The method for offloading marine computing tasks based on a resource reservation mechanism according to claim 1, wherein The specific content of Step 1 includes: Step 11. The marine environment monitoring system includes a base station node , buoy nodes and sensing nodes . The base station node and the buoy nodes both have computing functions for performing operations on data. The communication coverage and communication capabilities of the base station node are greater than those of the buoy nodes . The sensing nodes collect marine data in real time and generate computing task requirements irregularly; The marine environment monitoring system operates in a time-slot manner, and each time slot corresponds to a scheduling period; for any th time slot, there is a th scheduling period. The adjacent previous scheduling period is the th scheduling period, and the adjacent next scheduling period is the th scheduling period, where ; Step 12: The computing resources of the base station and the buoy are represented in the form of virtual machines. Assuming that there is only one type of virtual machine in the ocean environmental monitoring system, the required computing resources it contains are represented by . Then the base station is virtualized into virtual machines, and the buoy is virtualized into virtual machines, ; Step 13, sensing node accesses the base station node or the buoy node , where the sensing node communicating with the base station node is defined as the sensing node , and the sensing node communicating with the buoy node is defined as the sensing node ; and the set of sensing nodes and the set of sensing nodes have no intersection, and the union of the set and the set is included in the entire sensing node set; The communication resources to be allocated in the marine environment monitoring system are , that is, it includes sub-channels . The bandwidth of each sub-channel is . The set of channels is represented by . Sensor node and the sensor node share communication resources, and the same channel is only allowed to be reused once. The channel gain from the sensor node to the base station node , the channel gain from the sensor node to the buoy node , where and are large-scale fading, and are fast fading, ; Sensing node Obtained spectral efficiency is as follows: Sensor node Obtained spectral efficiency is as follows: Among them, is the transmission power of the sensing node , indicating the transmission power of the sensing node ; represents the multiplexing situation of the sub-channel by the sensing node and the sensing node ; represents that the sub-channel is multiplexed by the sensing node and the sensing node ; represents that the sub-channel is not multiplexed by the sensing node and the sensing node ; represents the channel noise power; the data rate of the corresponding sensing node to the base station node is ; the data rate of the corresponding sensing node to the base station node is .
3. The method for offloading maritime computing tasks based on a resource reservation mechanism according to claim 2, wherein The specific content of Step 2 includes: Step 21, sensing node Generate tasks according to monitoring requirements. Assume that the generation of tasks follows a Poisson distribution with parameter Then: The probability that the number of tasks is is expressed as: The corresponding cumulative distribution function is ; The corresponding probability density function is ; Step 22, represents the task of the node . represents the task data size, represents the required computing resources, represents the task benefit, represents the computing delay required for the task, represents the importance of the task; the node is a sensing node or a sensing node , and the tasks of the sensing node or the sensing node are respectively represented as and ; Step 23, the sensing nodes send the task information to the base station nodes or buoy nodes, and calculate the corresponding task delays respectively as: Sensing node Tasks on The transmission delay of is: Sensor node Tasks on The computational delay of is: Sensing node Tasks on The total delay of is: Sensor node Tasks on The transmission delay of is: Sensing node Tasks on The computing delay of is: Sensing node Tasks on The total delay of is: Among them, and represent the number of virtual machines for performing the corresponding tasks, and , , , .
4. The offloading method of a maritime computing task based on a resource reservation mechanism according to claim 3, characterized in that, The specific content of Step 3 includes: Step 31, node The priority calculation formula for the corresponding task is as follows: Among them, represents the weight between revenue and data volume ratio, represents the weight of importance, and , ; is the weight value to be calculated, tasks on nodes with high values have high priorities; Step 32: Sort the tasks in descending order of priority to obtain the set of tasks sorted by priority for the current time slot .
5. The method for offloading marine computing tasks based on a resource reservation mechanism according to claim 4, wherein The specific content of Step 4 is: Based on inventory theory, represent the optimization goal of the marine environment monitoring system as: The corresponding problem is called the inventory cost generated in the th scheduling period; where represents the amount of computing resources that need to be reserved in the current time slot, represents the amount of computing resources lacking in the next time slot, represents the idle cost of resources, represents the cost of user rejection.
6. The method for offloading maritime computing tasks based on a resource reservation mechanism according to claim 5, characterized in that, The specific content of Step 5 includes: Step 51. Set the number of tasks in the current time slot as , and the number of tasks in the next time slot as . According to the task characteristics received in the current scheduling period , obtain the amount of computing resources released in the th scheduling period as . The amount of computing resources that need to be reserved in the current time slot is related to and . Step 52, the amount of computing resources to be reserved for the current time slot , indicating the computing resources required for the th time slot based on the task request; Step 53. The expected value of the amount of computing resources lacking in the next time slot according to the distribution characteristics of the task requests is expressed as: Among them, is a positive integer greater than zero, representing the increment of the actual number of tasks arrived; The problem is converted to: Problem Relative to the problem For the variable When calculating the expectation, the essence of the problem remains minimizing the inventory cost; Let Among them, indicates that the amount of computing resources released in the th scheduling period is , and when the number of arriving tasks is , the inventory cost brought by resource reservation, represents the corresponding expected inventory cost; Step 54. To minimize the expected inventory cost generated in the th scheduling period, the following formula is given: Among them, represents the amount of computing resources released in the scheduling period, and when the number of arriving tasks is , the inventory cost brought by resource reservation represents the change in the expected inventory cost when the number of arriving tasks in the scheduling period increases by 1; when , represents the corresponding minimum expected inventory cost. Due to , we obtain: Because and are both known quantities set, the number of tasks in the next time slot is estimated to be , and resource scheduling for the previous scheduling period is implemented on this premise.
7. The offloading method of maritime computing tasks based on a resource reservation mechanism according to claim 6, wherein, The specific content of Step 6 includes: Step 61: Based on the optimal number of tasks corresponding to the expected minimum inventory cost , to inversely deduce the amount of computing resources required for the th scheduling period , and then based on the resources of the current time slot deduced, further implement the resource allocation strategy; Step 62, the goal of resource allocation is to minimize the amount of computing resources that need to be reserved while ensuring that all task requests are satisfied, and the marine environment monitoring system will not actively reject the current task requests for reservation; Step 63, if the computing resources to be allocated in the current time slot are not enough to meet the request requirements, adopt the strategy of allocating as much as possible, that is, try to meet the resource requests of the current users; if the computing resources to be allocated in the current time slot meet the request requirements, reasonably reserve resources to cope with future tasks.
8. The method for offloading marine computing tasks based on a resource reservation mechanism according to claim 7, wherein The specific content of Step 63 includes: When the computing resources to be allocated in the current time slot are insufficient to meet the request requirements, and use to represent the computing resources that are extra in the current time slot but do not meet the minimum allocation requirements. There are the following two cases: (1) If the released computing resources are sufficient to meet the demand, that is , in this case, there is no need to reserve computing resources, that is, the amount of computing resources to be reserved in the current time slot is ; (2) If the released computing resources are insufficient to meet the demand, that is , the corresponding computing resource shortage . At this time, it is necessary to judge according to ; if , it means that the computing resource shortage is less than , then the amount of computing resources to be reserved in the current time slot ; if , it means that the computing resource shortage is more than , then no reservation is made, that is ; When the computing resources to be allocated in the current time slot meet the request requirements, use ' to represent the remaining computing resources after allocation, and there are the following two cases: (1) If the released computing resources are sufficient to meet the demand, i.e., , there is no need for reservation, that is, the amount of computing resources to be reserved in the current time slot is ; (2) If the released computing resources are insufficient to meet the requirements, that is , the corresponding computing resource shortage . At this time, it is necessary to make a judgment according to ; if , then ; if , it is divided into two cases: when is not greater than the minimum computing resource requirement , no reservation is made, ; when is greater than the minimum computing resource requirement , the amount of computing resources to be reserved for the current time slot is set to .
9. The method for offloading maritime computing tasks based on a resource reservation mechanism according to claim 8, characterized in that The specific content of Step 7 includes: Step 71. Given a value, based on the priority of the tasks, set the set of the first high-priority tasks to be assigned to the base station nodes , and the remaining tasks to be assigned to the buoy nodes . Let the number of remaining virtual machines of the base station nodes be ; assume that the number of available buoy nodes for computing resources in the current time slot is , , then when , the lowest-priority tasks in the task set are rejected by the marine environmental monitoring system; otherwise, all task calculation requests are received. Thus, the node set is determined and the elements of set i.e., the first high-priority tasks in set while the remaining tasks assigned to the buoy nodes belong to set Obviously Ø; Here, the number of elements in set and set are denoted by and respectively, the number of elements in is ; Step 72, when , it indicates that the number of nodes that need to transmit tasks currently is greater than the number of channels of the ocean environmental monitoring system, so channel multiplexing needs to be performed. On the contrary, if channel multiplexing is not required, the channels are allocated in the order of decreasing task priority; is the number of lacking channels; if , then channel multiplexing does not need to be implemented, and the tasks corresponding to the sensor nodes that are not allocated channels are rejected; if , the set the number of sensor nodes that are not allocated channels in the lowest-priority sensor nodes in the set and , the set the highest-priority number of nodes that are not allocated channels in the reuse channels with the nodes in the set, and the nodes that are not allocated channels and their corresponding tasks are rejected; Step 73: For the sets and respectively, allocate virtual machine resources to tasks. Determine the number of virtual machine resources for each task in the order of decreasing priority, that is, virtual machine resources are always preferentially allocated to tasks with high priority. When there are unallocated virtual machines, each time take out a virtual machine from the set of unallocated virtual machines and allocate it to the task with the largest total latency and high priority to maximize the remaining computing resources. Combining with the resource reservation scheme in Step 5, when the unallocated virtual machine resources reach the required reserved resource amount, stop allocating virtual machine resources; Step 74: Calculate the total latency of all nodes in the set based on the task latency calculation model. For the rejected tasks, set their total latency to a value, and ensure that this value is greater than the maximum total latency of the nodes in the set ; accumulate the total latency of all tasks in the set , i.e.: Step 75, change the value, and repeat Steps 71 to 74 to obtain the corresponding values, virtual machine resource allocation results, channel multiplexing results and the current remaining amount of computing resources.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by a processor, it implements a maritime computing task offloading method based on a resource reservation mechanism as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Multi-objective optimized offshore edge calculation unloading method
CN114666839A
Mobile edge computing task unloading and distributing method
CN115665801A
Energy-saving marine dependent task unloading and resource allocation method
CN117336294A
Mobile user terminal task unloading method under distributed edge computing service system
CN111262906A
Edge computing system for urban road C-V2X network
CN113965568A