Offshore computing task unloading method based on resource reservation mechanism and medium
By adopting a computing task offload method based on resource reservation mechanism in the marine environment monitoring system, the system's low resource utilization efficiency and weak response capabilities for dynamic changes in the face of uncertainty and resource finiteness of computing task requests is solved, and higher resource utilization and system performance are achieved.
Patent Information
- Application Number
- CN202510383671.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-03-28
AI Technical Summary
When facing the uncertainty and resource limitation of computing task requests, existing marine environment monitoring systems have low resource utilization efficiency and weak ability to respond to dynamic changes, resulting in insufficient or idle computing resources and unable to meet the performance requirements of actual applications.
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, the resource reservation amount is determined using inventory theory, and the resource allocation strategy is dynamically adjusted to maximize resource utilization and minimize resource idleness and rejection rates.
It effectively reduces the task rejection rate caused by insufficient resources, avoids resource idleness, improves the system's resource utilization rate and overall performance, and can better adapt to the uncertainty of computing task requests and resource dynamic changes.
Smart Images

Figure CN119883662A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of marine environment monitoring, and in particular to a method and medium for offloading marine computing tasks based on a resource reservation mechanism. Background Art
[0002] In the field of marine environmental monitoring, surface sensor nodes are responsible for collecting environmental information on the 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 it, which leads to the need for computing task offloading and scheduling. The current computing resource allocation method has many problems when facing the uncertainty of task requests and the limited resources. For example, in terms of resource utilization efficiency, it lacks dynamic adaptability and does not combine the multi-dimensional characteristics of tasks, which easily leads to idle resources or rejected tasks; the ability to cope with dynamic changes in resources and tasks is weak, and it is difficult to balance the rejection rate and idle rate. As a result, the system currently has insufficient computing resources and rejects user requests, or the computing resources are idle, which cannot meet the requirements of system performance in actual applications. Therefore, new strategies are needed to optimize the allocation of computing resources and task scheduling.
[0003] The literature survey is as follows: The literature (Wang Ting. Research on Task Offloading and Resource Allocation Strategy of UAV-Assisted Maritime MEC System [D]. Jilin University, 2024. DOI: 10.27162 / d.cnki.gjlin.2024.002026.) optimizes 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, quantity, and priority of maritime tasks may change at any time; the maritime environment is complex, and communication resources, energy resources, etc. will continue to change with time and environmental conditions. This literature study focuses on specific task types and lacks an effective response mechanism to dynamic changes in tasks, and has not established an offloading and resource allocation strategy that adapts to dynamic fluctuations in resources.
[0004] Although the literature (Wang Xingchen. Research on marine collaborative computing offloading method based on task priority [D]. North China University of Technology, 2023. DOI: 10.26926 / d.cnki.gbfgu.2023.000591.) considers task priority to optimize computing and communication resource allocation, it does not involve resource reservation, which may be insufficient when facing sudden tasks or resource fluctuations.
[0005] The paper (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 unloading computing tasks of drones in smart maritime services, and minimizes the energy consumed by computing tasks under the constraint of meeting the task completion delay threshold. The core of the optimization lies in the reasonable allocation of computing subtasks and computing power to achieve the goal of minimizing energy consumption. However, the scheme is relatively fixed after the task allocation and computing power allocation are determined, and it is impossible to perceive and adapt to the dynamic changes of these computing resources in real time, which may lead to reduced task execution efficiency and even the failure to complete some tasks on time.
[0006] The patent application with publication number CN114666839A proposes a multi-objective optimization method for offshore edge computing offloading, which takes latency and energy consumption as constraints, comprehensively considers resource load, channel transmission and node execution capability, and designs an offloading path optimization method.
[0007] The patent application with publication number CN115665801A proposes a method for offloading and allocating mobile edge computing tasks. The scheduling center node is deployed between the mobile user device and each edge server, and the tasks of the mobile user device are allocated to the edge server or cloud server, thereby significantly reducing latency, reducing energy consumption, and improving efficiency.
[0008] The patent application with publication number CN117336294A proposes an energy-saving ocean-dependent task offloading and resource allocation method, which constructs an optimization problem based on the dependencies and delay constraints of user tasks.
[0009] However, the above patent also fails to fully consider the complex dynamic changes of resources in different time slots due to task completion and the arrival of new tasks. This may make the system unable to timely and effectively adjust resource allocation when facing sudden tasks or resource fluctuations, reduce system stability and reliability, and make it difficult to ensure continuous and efficient execution of tasks, and unable to meet the dynamic needs of computing task offloading and resource allocation in the marine environment. Summary of the invention
[0010] In view of this, an object of the present invention is to propose a method for offloading offshore computing tasks based on a resource reservation mechanism.
[0011] In order to achieve the above technical objectives, the technical solution adopted by the present invention is: The present invention provides a method for offloading offshore computing tasks based on a resource reservation mechanism, comprising the following steps: Step 1: Initialize the marine environment monitoring system, including base station nodes, buoy nodes and sensor nodes, clarify the communication coverage, computing function and communication capability of base station nodes and buoy nodes; set system parameters, including the number of virtual machines, the number of sub-channels and bandwidth; Step 2: The sensor node generates a task according to the monitoring requirements and sends the task information to the base station node or buoy node; 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 task allocation scheme and inventory theory, determine the optimization goal of the marine environment monitoring system, that is, minimize the resource idle rate and request rejection rate while meeting the task requirements; Step 5: Based on the optimization goal, the amount of computing resources that need to be reserved is calculated using inventory theory according to the task status of the current time slot and the distribution characteristics of the task requests of the next time slot; Step 6: Based on the amount of computing resources that need to be reserved and the actual resource usage, adjust the resource allocation strategy of the current time slot; Step 7: Based on the resource allocation strategy, the computing resources and communication resources of the current time slot are scheduled to maximize the current remaining computing resources; Step 8: The base station node and the buoy node execute the task according to the resource allocation strategy. After the task is completed, the occupied virtual machine and channel resources are released and the resource pool status is updated.
[0012] Furthermore, the step 1 specifically includes: Step 11: The marine environment monitoring system includes a base station node , Buoy nodes and Sensor Nodes , base station node and buoy nodes All have computing functions to perform data operations; base station nodes The communication coverage and communication capacity of the buoy node are greater than those of the buoy node. ; Sensor nodes Collect ocean data in real time and generate computing task requirements from time to time; The marine environment monitoring system works in a time slot manner, each time slot corresponds to a scheduling cycle; The time slots correspond to The previous scheduling cycle is the The next scheduling cycle is the scheduling cycles, where ; Step 12: The computing resources of the base station and the buoy are represented by virtual machines. Assuming that there is only one type of virtual machine in the marine environment monitoring system, the computing resource requirements contained in it are expressed as Indicates that the base station is virtualized A virtual machine, a buoy virtual virtual machines, ; Step 13: Sensor Node Access base station node or buoy node , where the base station node Communicating sensor nodes Defined as sensor node , with the buoy node Communicating sensor nodes Defined as sensor node ; and sensor nodes Collection and sensor nodes Collection There is no intersection, set and collection The union of gather; The communication resources to be allocated in the marine environment monitoring system are , which includes Subchannel , the bandwidth of each subchannel is , the set of channels is express; Sensor Node and sensor nodes Shared communication resources, and the same channel is only allowed to be reused once, sensor nodes To the base station node Channel gain , sensor node To the buoy node Channel gain ,in, and For large-scale fading, and For the rapid decline, ; Sensor Node The spectrum efficiency achieved for:
[0013] Sensor Node The spectrum efficiency achieved for:
[0014] in, For sensor nodes The transmission power, Represents sensor node The transmission power; Indicates subchannel Sensor Node and sensor nodes Reuse situation, Indicates subchannel Sensor Node and sensor nodes Reuse, Indicates subchannel Unsensed Nodes and sensor nodes Reuse; represents the channel noise power; the corresponding sensor node To the base station node The data rate is ; Corresponding sensor nodes To the base station node The data rate is .
[0015] Furthermore, the step 2 specifically includes: Step 21: Sensor Node Generate tasks according to monitoring requirements, assuming that the generation of tasks obeys the parameters Poisson distribution, then: The number of tasks is The probability is expressed as:
[0016] The corresponding cumulative distribution function is ; The corresponding probability density function is ; Step 22 Representation Node mission, Indicates the task data size, represents the required computing resources, Represents the task benefit, represents the computational delay required for the task, Indicates the importance of the task; the node It is a sensor node or sensor node , and the sensor node or sensor node The tasks are represented as and ; Step 23, the sensor node sends the task information to the base station node or the buoy node, and the corresponding task delays are calculated as follows: Sensor Node Tasks on The transmission delay is:
[0017] Sensor Node Tasks on The calculation delay is:
[0018] Sensor Node Tasks on The total delay is:
[0019] Sensor Node Tasks on The transmission delay is:
[0020] Sensor Node Tasks on The calculation delay is:
[0021] Sensor Node Tasks on The total delay is:
[0022] in, and represents the number of virtual machines that execute the corresponding task, and , , , .
[0023] Furthermore, the step 3 specifically includes: Step 31, Node The corresponding task priority calculation formula is:
[0024] in, Indicates the weight between revenue and data volume ratio, A weight indicating the importance, and , ; is the weight value to be calculated, Tasks on nodes with high values have high priority; Step 32: Sort the tasks in descending order of priority to obtain a priority-based task set for the current time slot. .
[0025] Furthermore, the step 4 is specifically as follows: Based on inventory theory, the optimization objective of the marine environment monitoring system is expressed as:
[0026] Will The corresponding problem is called The inventory cost generated by the scheduling cycle; among them, Indicates the amount of computing resources that need to be reserved in the current time slot. Indicates the amount of computing resources lacking in the next time slot, represents the idle cost of resources, Indicates the cost of user rejection.
[0027] Furthermore, the step 5 specifically includes: Step 51: Set the number of tasks in the current time slot to , the number of tasks in the next time slot is , according to the current scheduling cycle The received task features are obtained The amount of computing resources released in a scheduling cycle is , the amount of computing resources that need to be reserved in the current scheduling period and and Related; Step 52, The amount of computing resources that need to be reserved for each time slot , Indicates The time slots are based on the computing resources required by the task request; Step 53: Based on the distribution characteristics of the task request, the amount of computing resources lacking in the next time slot The expectation is expressed as:
[0028] in, is a positive integer greater than zero, indicating the increment of the actual number of arrived tasks; The problem Translates to:
[0029] question Relative to the problem For variables To seek expectation, the essence of the problem is still to minimize inventory cost; make
[0030] in, Indicates The amount of computing resources released in a scheduling cycle is , the number of tasks that arrive is When the inventory cost caused by resource reservation is represents the corresponding inventory cost expectation; Step 54: To minimize The expected inventory cost generated by a scheduling cycle is given as follows:
[0031] in, Indicates The amount of computing resources released during the scheduling period is , the number of tasks that arrive is When the inventory cost caused by resource reservation is Indicated in The expected change in inventory cost when the number of tasks arriving in the scheduling period increases by 1, ;when hour, represents the corresponding minimum inventory cost expectation; because ,get:
[0032] because and All are known quantities, and the estimated number of tasks in the next time slot is , and based on this, implement the resource scheduling of the previous scheduling cycle.
[0033] Furthermore, the step 6 specifically includes: Step 61: Optimal number of tasks corresponding to the minimum inventory cost expectation , to infer The amount of computing resources required for each scheduling cycle , then according to Derive the resources of the current time slot and further implement the resource allocation strategy; Step 62: The goal of resource allocation is to reserve computing resources when all task requests are satisfied. At least, the marine environment monitoring system will not actively reject the current task request for the purpose of reservation; Step 63: If the computing resources to be allocated in the current time slot are insufficient to meet the request, adopt a strategy of allocating as much as possible, that is, try to meet the resource request of the current user; if the computing resources to be allocated in the current time slot meet the request, reasonably reserve resources to cope with future tasks.
[0034] Furthermore, the step 63 specifically includes: When the computing resources to be allocated in the current time slot are insufficient to meet the request requirements, Indicates the computing resources that are extra in the current time slot but do not meet the minimum allocation requirements. There are two cases: (1) If the released computing resources are sufficient to meet the demand, that is, , there is no need to reserve computing resources at this time, that is, the amount of computing resources currently required to be reserved is ; (2) If the released computing resources are not enough to meet the demand, that is, , the corresponding computing resource shortage , at this time, it is necessary to The size of , indicating the shortage of computing resources at this time Compare If the number of computing resources is small, the amount of computing resources that need to be reserved ;if , indicating the shortage of computing resources at this time Compare If there are more, no reservation is made. ; When the computing resources to be allocated in the current time slot meet the request requirements, ' Indicates the remaining computing resources after allocation, which can be divided into the following two cases: (1) If the released computing resources are sufficient to meet the demand, that is, , no reservation is required, that is, the current amount of computing resources that need to be reserved is ; (2) If the released computing resources are not enough to meet the demand, that is, , the corresponding computing resource shortage , at this time, it is necessary to The size of ,but ;if , which can be divided into two cases: No more than the minimum computing resource requirement , then no reservation is made. ;when Greater than the minimum computing resource requirement , then the amount of computing resources to be reserved is set to .
[0035] Furthermore, the step 7 specifically includes: Step 71: Given a Value, based on the priority of the task, set the collection forward High priority tasks are assigned to the base station node , the remaining tasks are assigned to the buoy nodes , let base station node The number of remaining virtual machines is , must meet ; Assume that the number of buoy nodes available for computing resources in the current time slot is , , then when When the task set Lowest priority tasks are rejected by the marine environment monitoring system, otherwise, all task calculation requests are accepted; This determines the node set and collection The elements of the set Before High priority tasks belong to the set , the remaining tasks assigned to the buoy nodes belong to the set , obviously , Ø; Here, the collection and collection The number of elements in and express, The number of elements of , ; Step 72: , indicating that the number of nodes that currently need to transmit tasks is greater than the number of channels of the marine environment monitoring system, then channel multiplexing is required. Otherwise, channel multiplexing is not required, and channels are allocated in descending order of task priority; is the number of missing channels; if , then there is no need to implement channel multiplexing, and the tasks corresponding to the sensor nodes that are not assigned to the channel are rejected; if ,gather Not assigned to a channel Sensor nodes and collections The lowest priority sensor nodes to perform channel multiplexing; if and ,gather The highest priority one that is not assigned to a channel Nodes and collections The nodes in the channel reuse channel, the nodes that are not assigned to the channel and the corresponding tasks are rejected; Step 73: and collection Allocate virtual machine resources to the tasks in step 5, determine the number of virtual machine resources for each task in descending order of priority, that is, virtual machine resources are always allocated to tasks with high priority first; when there are unallocated virtual machines, take a virtual machine from the unallocated virtual machine set each time and allocate it 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, stop allocating virtual machine resources when the unallocated virtual machine resources reach the required reserved resource amount; Step 74: Calculate the set based on the task delay calculation model The total delay of all nodes in the set is set to a value for rejected tasks, and the value is ensured to be greater than the set The maximum total delay of the nodes in the set The total delay of all tasks in is accumulated, that is:
[0036] Step 75: Change and repeat steps 71 to 74 to obtain the minimized The corresponding Value, virtual machine resource allocation results, channel multiplexing results and the current amount of remaining computing resources.
[0037] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned method for offloading offshore computing tasks based on a resource reservation mechanism.
[0038] By adopting the above technical solution, the present invention has the following beneficial effects compared with the prior art: 1. The present invention calculates the amount of resource reservation based on inventory theory, and can dynamically adjust the resource reservation strategy for each time slot according to the estimated value of the number of task requests and the number of releasable resources. Compared with the traditional fixed resource allocation method, this method can better adapt to the uncertainty of computing task requests, and effectively reduce the task rejection rate due to insufficient resources when system resources are limited, while avoiding excessive idle resources. For example, in a scenario where the amount of task requests fluctuates greatly, the traditional fixed allocation method may reject a large number of tasks due to insufficient resources during the peak of the task, and cause a waste of resources during the trough of the task. The present invention can be flexibly adjusted according to the actual situation to improve resource utilization.
[0039] 2. In the resource allocation decision process, not only the resource satisfaction of the current time slot is considered, but also multiple factors such as the amount of released resources, the amount of shortage, and the amount of remaining resources are comprehensively considered. For example, when the released resources are not enough to meet the demand, whether to reserve resources and the amount of reservation are decided based on the comparison between the shortage and the remaining resources. This comprehensive consideration makes resource allocation more reasonable, and can achieve the optimal configuration of resources while meeting the task request, thereby improving the overall performance of the system.
[0040] 3. Determine the task priority through the task priority formula, and assign high-priority tasks to base station nodes. This method helps prioritize tasks with high importance, high benefits, and relatively high latency requirements, improves the system's response speed and processing efficiency for key tasks, and thus improves the overall task processing quality and benefits of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0042] Figure 1 It is an execution flow chart of an offshore computing task offloading method based on a resource reservation mechanism provided by an embodiment of the present invention.
[0043] Figure 2 It is a schematic diagram of a scheduling process performed by a base station node provided in an embodiment of the present invention.
[0044] Figure 3 It is a schematic diagram of a computer-readable storage medium provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0045] The present invention will be further described in detail below in conjunction with the accompanying drawings and examples. It is particularly noted that the following examples are only used to illustrate the present invention, but are not intended to limit the scope of the present invention. Similarly, the following examples are only partial embodiments of the present invention rather than all embodiments, and all other embodiments obtained by those of ordinary skill in the art without creative work are within the scope of protection of the present invention.
[0046] See also Figure 1 and Figure 2 , a method for offloading computing tasks at sea based on a resource reservation mechanism of the present invention comprises the following steps: Step 1: System initialization: Initialize the marine environment monitoring system, including base station nodes, buoy nodes and sensor nodes, clarify the communication coverage, computing function and communication capability of base station nodes and buoy nodes; set system parameters, including the number of virtual machines, number of sub-channels and bandwidth; In this embodiment, the step 1 specifically includes: Step 11, network model: the marine environment monitoring system includes a base station node , Buoy nodes and Sensor Nodes , a base station node , Buoy nodes and Sensor Node The entire network system is constructed by wireless communication. and buoy nodes All have computing functions to perform data operations; base station nodes and buoy nodes The communication coverage and communication capabilities of the base station nodes are different. Generally, The communication coverage and communication capacity of the buoy node are greater than those of the buoy node. , the communication capacity here refers to the number of nodes that can access at the same time. Sensor nodes Collect ocean data in real time and generate computing task requirements from time to time; The marine environment monitoring system works in a time slot manner, and each time slot corresponds to a scheduling cycle. In the following description, the concepts of scheduling cycle and time slot are used selectively as needed. For any The time slots correspond to The previous scheduling cycle is the The next scheduling cycle is the scheduling cycles, where A scheduling cycle includes the steps of receiving task requests, resource allocation, task execution and result return. Implement resource allocation decisions for the scheduling and computing process 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.
[0047] Step 12, computing resource model: The computing resources of the base station and buoy are represented by virtual machines. Assuming that there is only one type of virtual machine in the marine environment monitoring system, the computing resource demand (million instructions per second) contained in it is expressed as Indicates that the base station is virtualized A virtual machine, a buoy virtual virtual machines. Since the computing power of the base station is higher than that of the buoy, there is Generally, the computing resources contained in a virtual machine are considered to be the minimum computing resources required for a task. A task can be performed by multiple virtual machines together, but in order to reduce complexity, it is not allowed to assign the same task to the base station and the buoy at the same time.
[0048] Step 13. Communication Model: Sensor Node Access base station node or buoy node , where the base station node Communicating sensor nodes Defined as sensor node , with the buoy node Communicating sensor nodes Defined as sensor node ; and sensor nodes Collection and sensor nodes Collection There is no intersection, that is, the sensor node cannot access the above two types of access nodes (Access Point, AP) at the same time. and collection The union of gather; The communication resources to be allocated in the marine environment monitoring system are , which includes Subchannel , the bandwidth of each subchannel is , the set of channels is express; Sensor Node and sensor nodes Share communication resources to improve spectrum efficiency. The same channel is only allowed to be reused once. To the base station node Channel gain , sensor node To the buoy node Channel gain ,in, and For large-scale fading, and For the rapid decline, ; Sensor Node The spectrum efficiency achieved for:
[0049] Sensor Node The spectrum efficiency achieved for:
[0050] in, For sensor nodes The transmission power, Represents sensor node The transmission power; Indicates subchannel Sensor Node and sensor nodes Reuse situation, Indicates subchannel Sensor Node and sensor nodes Reuse, Indicates subchannel Unsensed Nodes and sensor nodes Reuse; represents the channel noise power; the corresponding sensor node To the base station node The data rate is ; Corresponding sensor nodes To the base station node The data rate is .
[0051] Step 2, task generation and reception: Based on the marine environment monitoring system constructed in step 1, the sensor node generates tasks according to the monitoring requirements and sends the task information to the base station node or buoy node; the task information includes the task data size, the required computing resources, the task benefit, the computing delay required for the task, and the importance of the task.
[0052] In this embodiment, step 2 specifically includes: Step 21: Task Generation Model: Sensor Node Generate tasks according to monitoring requirements, assuming that the generation of tasks obeys the parameters Poisson distribution, then: The number of tasks is The probability is expressed as:
[0053] The corresponding cumulative distribution function (CDF) is ; The corresponding probability density function is ; Step 22: Task calculation model: Representation Node mission, Indicates the task data size, represents the required computing resources (million instructions per second), Represents the task benefit, represents the computational delay required for the task, Indicates the importance of the task; the node It is a sensor node or sensor node , and the sensor node or sensor node The tasks are represented as and In particular, it is believed that The time scale is relatively large, that is, higher than the system's scheduling cycle for resources, but the faster the task is completed, the more beneficial it is to the system. Since tasks are generated by nodes, in order to simplify the description, the present invention uses the two concepts of node and task interchangeably as needed, and assumes that each node generates a task in each time slot. For a node that does not generate a task, it can be considered that the node does not exist, so the assumption here does not affect the situation where the node dynamically generates tasks.
[0054] Step 23, task delay calculation: the sensor node sends the task information to the base station node or the buoy node, and the corresponding task delays are calculated as follows: Sensor Node Tasks on The transmission delay is:
[0055] Sensor Node Tasks on The calculation delay is:
[0056] Sensor Node Tasks on The total delay is:
[0057] Sensor Node Tasks on The transmission delay is:
[0058] Sensor Node Tasks on The calculation delay is:
[0059] Sensor Node Tasks on The total delay is:
[0060] in, and represents the number of virtual machines that execute the corresponding task, and , , , .
[0061] Step 3: Task priority sorting: Based on the computing task model and task delay calculation determined in step 2, the priority of each task is calculated according to the task priority formula, and the task queue is sorted in descending order of priority; tasks with high priority will be allocated resources first.
[0062] In this embodiment, step 3 specifically includes: Step 31, Node The corresponding task priority calculation formula is:
[0063] in, Indicates the weight between revenue and data volume ratio, A weight indicating the importance, and , ; is the weight value to be calculated, Tasks on nodes with high values have high priority; Step 32: Sort the tasks in descending order of priority to obtain a priority-based task set for the current time slot. .
[0064] Step 4: Determine the optimization target: Based on the priority task allocation scheme and inventory theory, determine the optimization target of the marine environment monitoring system, that is, minimize the resource idle rate and request rejection rate by reasonably scheduling resources while meeting the task requirements; express the optimization target as a weighted sum model, in which the weight factor is used to balance the resource idle cost and the task rejection cost.
[0065] In this embodiment, step 4 is specifically as follows: Based on inventory theory, the optimization objective of the marine environment monitoring system is expressed as:
[0066] Will The corresponding problem is called The inventory cost generated by the scheduling cycle; among them, Indicates the amount of computing resources that need to be reserved in the current time slot. Indicates the amount of computing resources lacking in the next time slot, represents the idle cost of resources, It represents the cost of user rejection. When the total amount of resources is determined, the reserved resources correspond to the resource idle rate. The larger the value, the higher the resource idle rate. Obviously, the amount of computing resources reserved for the current time slot The more time slots there are, the more computing resources are available for the next time slot, and the corresponding computing resources lacking in the next time slot The less.
[0067] Step 5, resource reservation calculation: From step 4, we know that 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 goal, according to the task status of the current time slot and the distribution characteristics of the task request of the next time slot, the inventory theory is used to calculate the amount of computing resources that need to be reserved; ensure that under the premise of meeting the task request, the idle resources and request rejection are minimized, that is, the goal in step 4 is maximized. The resource reservation calculation results will serve as an important basis for subsequent resource allocation.
[0068] In this embodiment, step 5 specifically includes: Step 51: Set the number of tasks in the current time slot to , the number of tasks in the next time slot is , where the number of tasks is equal to the number of requests. According to the current scheduling cycle The received task features are obtained The amount of computing resources released in a scheduling cycle is , the amount of computing resources that need to be reserved in the current scheduling period and and Related; among them is an uncertain random quantity, and its numerical distribution characteristics are determined by the task generation model in step 21.
[0069] Step 52, The amount of computing resources that need to be reserved for each time slot , Indicates The time slots are based on the computing resources required by the task request; because multiple virtual machine resources can be assigned to a task, the number of task requests does not matter. Lower than To ensure 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's request, that is, there is a lack of computing resources.
[0070] Step 53: Based on the distribution characteristics of the task request, the amount of computing resources lacking in the next time slot The expectation is expressed as:
[0071] in, is a positive integer greater than zero, indicating the increment of the actual number of arrived tasks, such as Indicates that the actual number of tasks achieved is the original number of tasks Add 1 to the basis; The problem Translates to:
[0072] question Relative to the problem For variables To seek expectation, the essence of the problem is still to minimize inventory cost; make
[0073] in, Indicates The amount of computing resources released in a scheduling cycle is , the number of tasks that arrive is When the inventory cost caused by resource reservation is represents the corresponding inventory cost expectation; Step 54: To minimize The expected inventory cost generated by a scheduling cycle is given as follows:
[0074] in, Indicates The amount of computing resources released during the scheduling period is , the number of tasks that arrive is When the inventory cost caused by resource reservation is Indicated in The expected change in inventory cost when the number of tasks arriving in the scheduling period increases by 1, ;when hour, represents the corresponding minimum inventory cost expectation; because ,get:
[0075] because and are all known quantities. The task generation model in step 21 estimates the number of tasks for the next time slot as , and implement the resource scheduling of the previous scheduling cycle based on this premise. It should be clear that the task request number It is not the actual number of task requests, but the number of resource reservations determined based on it.
[0076] Step 6. Determine computing resource allocation and resource reservation strategy: Based on the amount of computing resources that need 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 based on the shortage; if the resources are sufficient, reserve resources reasonably to cope with future tasks.
[0077] In this embodiment, step 6 specifically includes: Step 61: Optimal number of tasks corresponding to the minimum inventory cost expectation , to infer The amount of computing resources required for each scheduling cycle , then according to Derive the resources of the current time slot and further implement the resource allocation strategy; Step 62: The goal of resource allocation is to reserve computing resources when all task requests are satisfied. At least, the marine environment monitoring system will not actively reject the current task request for the purpose of reservation; Step 63: If the computing resources to be allocated in the current time slot are insufficient to meet the request, adopt the strategy of allocating as much as possible, that is, try to meet the resource request of the current user; the resource reservation strategy at this time is centered around the excess in the current time slot that does not meet the minimum allocation requirement. The specific amount of resource reservation depends on the amount of resources that can be released in the next time slot, which can be divided into the following two cases: (1) If the released computing resources are sufficient to meet the demand, that is, , there is no need to reserve computing resources at this time, that is, the amount of computing resources currently required to be reserved is ; (2) If the released computing resources are not enough to meet the demand, that is, , the corresponding computing resource shortage , at this time, it is necessary to The size of , indicating the shortage of computing resources at this time Compare If the number of computing resources is small, the amount of computing resources that need to be reserved ;if , indicating the shortage of computing resources at this time Compare If there are more, no reservation is made. ; If the computing resources to be allocated in the current time slot meet the request requirements, reserve resources appropriately to cope with future tasks. ' Indicates the remaining computing resources after allocation, which can be divided into the following two cases: (1) If the released computing resources are sufficient to meet the demand, that is, , no reservation is required, that is, the current amount of computing resources that need to be reserved is ; (2) If the released computing resources are not enough to meet the demand, that is, , the corresponding computing resource shortage , at this time, it is necessary to The size of ,but ;if , which can be divided into two cases: No more than the minimum computing resource requirement , then no reservation is made. ;when Greater than the minimum computing resource requirement , then the amount of computing resources to be reserved is set to .
[0078] Step 7: Scheduling and optimizing computing and communication resources: Based on the resource allocation strategy, the computing and communication resource scheduling of the current time slot is implemented to maximize the current remaining computing resources. For any sensor node and the tasks it generates, the variables that need to be optimized and determined include: the node belongs to the set Still a collection , that is, the node is connected to the base station node Or a buoy node? ; The node that shares the channel with this node, that is, determines the parameter ; The amount of computing resources allocated to the node, that is, the allocation of virtual machine resources; the details are as follows: Step 71: Given a Value, based on the priority of the task, set the collection forward High priority tasks are assigned to the base station node , the remaining tasks are assigned to the buoy nodes , let base station node The number of remaining virtual machines is , must meet ; Assume that the number of buoy nodes available for computing resources in the current time slot is , , then when When the task set Lowest priority tasks are rejected by the marine environment monitoring system, otherwise, all task calculation requests are accepted; This determines the node set and collection The elements of the set Before High priority tasks belong to the set , the remaining tasks assigned to the buoy nodes belong to the set , obviously , Ø; Here, the collection and collection The number of elements in and express, The number of elements of , ; Step 72: , indicating that the number of nodes that currently need to transmit tasks is greater than the number of channels of the marine environment monitoring system, then channel multiplexing is required. Otherwise, channel multiplexing is not required, and channels are allocated in descending order of task priority; is the number of missing channels; if , then there is no need to implement channel multiplexing, and the tasks corresponding to the sensor nodes that are not assigned to the channel are rejected; if ,gather Not assigned to a channel Sensor nodes and collections The lowest priority sensor nodes to perform channel multiplexing; if and ,gather The highest priority one that is not assigned to a channel Nodes and collections The nodes in the channel reuse channel, the nodes that are not assigned to the channel and the corresponding tasks are rejected; Step 73: and collection Allocate virtual machine resources to the tasks in step 5, determine the number of virtual machine resources for each task in descending order of priority, that is, virtual machine resources are always allocated to tasks with high priority first; when there are unallocated virtual machines, take a virtual machine from the unallocated virtual machine set each time and allocate it 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, stop allocating virtual machine resources when the unallocated virtual machine resources reach the required reserved resource amount; Step 74: Calculate the set based on the task delay calculation model The total delay of all nodes in the set is set to a value for rejected tasks, and the value is ensured to be greater than the set The maximum total delay of the nodes in the set The total delay of all tasks in is accumulated, that is:
[0079] Step 75: Change and repeat steps 71 to 74 to obtain the minimized The corresponding Value, virtual machine resource allocation results, channel multiplexing results and the current amount of remaining computing resources.
[0080] Step 8, task execution and result return: The base station node and the buoy node execute the task according to the resource allocation strategy. After the task is completed, the occupied virtual machine and channel resources are released and the resource pool status is updated.
[0081] Reservation calculation based on statistical analysis of historical data: Instead of relying on inventory theory to calculate resource reservations, this method uses statistical analysis of historical task request data to predict the trend and scale of future task requests, thereby determining the number of resource reservations. For example, the number of task requests for each time slot in the past period of time is collected, and its distribution pattern (such as mean, variance and other statistical characteristics) is analyzed. A prediction model (such as time series model, machine learning model, etc.) is established to estimate the number of task requests for the next time slot, and then the resource reservation is calculated based on the estimated results. The advantage of this method is that it does not require the assumption that task requests follow a specific distribution (such as Poisson distribution), and may be more suitable for scenarios where the actual task request pattern is 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.
[0082] Reservation strategy with dynamic threshold adjustment: Set a dynamically changing resource reservation threshold instead of calculating the reservation based on a fixed formula. Dynamically adjust the reservation threshold based on real-time information such as the system's current resource usage, task completion speed, and task queue length. For example, when the system completes tasks quickly and the task queue is short for a period of time, the reservation threshold is appropriately lowered; conversely, when there is a backlog of tasks or resources are tight, the reservation threshold is increased. The benefit of this solution is that it can adapt to the real-time status of the system more flexibly, but it is necessary to design a reasonable threshold adjustment algorithm to avoid frequent adjustments that lead to system instability.
[0083] Allocation method based on task complexity: In addition to allocating tasks according to task priority, consider the complexity of the task (such as the complexity of computing task data processing, the complexity of the algorithm, etc.) to decide whether to allocate the task to the base station node or the buoy node. Prioritize tasks with high complexity to base station nodes with stronger computing power, and assign tasks with lower complexity to buoy nodes. This can make better use of the computing power of different nodes and improve the overall task processing efficiency. However, accurate assessment of 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.
[0084] Distributed task allocation algorithm: A distributed algorithm is used to allocate tasks instead of centralizing them at the base station node. For example, each sensor node independently decides which node to send the task to based on its own communication status with the base station node and buoy node, node load status and other local information. This approach can reduce the computational burden of the base station node and improve the scalability and fault tolerance of the system. However, the distributed algorithm needs to solve the coordination and information synchronization problems between nodes to avoid imbalance or conflict in task allocation.
[0085] like Figure 3 As shown, an embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the above method is implemented.
[0086] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0087] 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 the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0088] The above descriptions are only some embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Any equivalent device or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for offloading offshore computing tasks based on a resource reservation mechanism, characterized in that: The steps include: Step 1: Initialize the marine environment monitoring system, including base station nodes, buoy nodes and sensor nodes, and clarify the communication coverage, computing function and communication capability of base station nodes and buoy nodes; Set system parameters, including the number of virtual machines, number of sub-channels, and bandwidth; Step 2: The sensor node generates a task according to the monitoring requirements and sends the task information to the base station node or buoy node; 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 task allocation scheme and inventory theory, determine the optimization goal of the marine environment monitoring system, that is, minimize the resource idle rate and request rejection rate while meeting the task requirements; Step 5: Based on the optimization goal, the amount of computing resources that need to be reserved is calculated using inventory theory according to the task status of the current time slot and the distribution characteristics of the task requests of the next time slot; Step 6: Based on the amount of computing resources that need to be reserved and the actual resource usage, adjust the resource allocation strategy of the current time slot; Step 7: Based on the resource allocation strategy, the computing resources and communication resources of the current time slot are scheduled to maximize the current remaining computing resources; Step 8: The base station node and the buoy node execute the task according to the resource allocation strategy. After the task is completed, the occupied virtual machine and channel resources are released and the resource pool status is updated.
2. A method for offloading offshore computing tasks based on a resource reservation mechanism as claimed in claim 1, characterized in that: The step 1 specifically includes: Step 11: The marine environment monitoring system includes a base station node , Buoy nodes and Sensor Nodes , base station node and buoy nodes All have computing functions to perform data operations; base station nodes The communication coverage and communication capacity of the buoy node are greater than those of the buoy node. ; Sensor nodes Collect ocean data in real time and generate computing task requirements from time to time; The marine environment monitoring system works in a time slot manner, each time slot corresponds to a scheduling cycle; The time slots correspond to The previous scheduling cycle is the The next scheduling cycle is the scheduling cycles, where ; Step 12: The computing resources of the base station and the buoy are represented by virtual machines. Assuming that there is only one type of virtual machine in the marine environment monitoring system, the computing resource requirements contained in it are expressed as Indicates that the base station is virtualized A virtual machine, a buoy virtual virtual machines, ; Step 13: Sensor Node Access base station node or buoy node , where the base station node Communicating sensor nodes Defined as sensor node , with the buoy node Communicating sensor nodes Defined as sensor node ; and sensor nodes Collection and sensor nodes Collection There is no intersection, set and collection The union of gather; The communication resources to be allocated in the marine environment monitoring system are , which includes Subchannel , the bandwidth of each subchannel is , the set of channels is express; Sensor Node and sensor nodes Shared communication resources, and the same channel is only allowed to be reused once, sensor nodes To the base station node Channel gain , sensor node To the buoy node Channel gain ,in, and For large-scale fading, and For the rapid decline, ; Sensor Node The spectrum efficiency achieved for: Sensor Node The spectrum efficiency achieved for: in, For sensor nodes The transmission power, Represents sensor node The transmission power; Indicates subchannel Sensor Node and sensor nodes Reuse situation, Indicates subchannel Sensor Node and sensor nodes Reuse, Indicates subchannel Unsensed Nodes and sensor nodes Reuse; represents the channel noise power; the corresponding sensor node To the base station node The data rate is ; Corresponding sensor nodes To the base station node The data rate is .
3. A method for offloading offshore computing tasks based on a resource reservation mechanism as claimed in claim 2, characterized in that: The step 2 specifically includes: Step 21: Sensor Node Generate tasks according to monitoring requirements, assuming that the generation of tasks obeys the parameters Poisson distribution, then: The number of tasks is The probability is expressed as: The corresponding cumulative distribution function is ; The corresponding probability density function is ; Step 22 Representation Node mission, Indicates the task data size, represents the required computing resources, Represents the task benefit, represents the computational delay required for the task, Indicates the importance of the task; the node It is a sensor node or sensor node , and the sensor node or sensor node The tasks are represented as and ; Step 23, the sensor node sends the task information to the base station node or the buoy node, and the corresponding task delays are calculated as follows: Sensor Node Tasks on The transmission delay is: Sensor Node Tasks on The calculation delay is: Sensor Node Tasks on The total delay is: Sensor Node Tasks on The transmission delay is: Sensor Node Tasks on The calculation delay is: Sensor Node Tasks on The total delay is: in, and represents the number of virtual machines that execute the corresponding task, and , , , .
4. The offshore computing task offloading method based on resource reservation mechanism according to claim 3, characterized in that: The step 3 specifically includes: Step 31, Node The corresponding task priority calculation formula is: in, Indicates the weight between revenue and data volume ratio, A weight indicating the importance, and , ; is the weight value to be calculated, Tasks on nodes with high values have high priority; Step 32: Sort the tasks in descending order of priority to obtain a priority-based task set for the current time slot. .
5. The offshore computing task offloading method based on resource reservation mechanism according to claim 4, characterized in that: The step 4 is specifically as follows: Based on inventory theory, the optimization objective of the marine environment monitoring system is expressed as: Will The corresponding problem is called The inventory cost generated by the scheduling cycle; among them, Indicates the amount of computing resources that need to be reserved in the current time slot. Indicates the amount of computing resources lacking in the next time slot, represents the idle cost of resources, Indicates the cost of user rejection.
6. A method for offloading offshore computing tasks based on a resource reservation mechanism as claimed in claim 5, characterized in that: The step 5 specifically includes: Step 51: Set the number of tasks in the current time slot to , the number of tasks in the next time slot is , according to the current scheduling cycle The received task features are obtained The amount of computing resources released in a scheduling cycle is , the amount of computing resources that need to be reserved in the current scheduling period and and Related; Step 52, The amount of computing resources that need to be reserved for each time slot , Indicates The time slots are based on the computing resources required by the task request; Step 53: Based on the distribution characteristics of the task request, the amount of computing resources lacking in the next time slot The expectation is expressed as: in, is a positive integer greater than zero, indicating the increment of the actual number of arrived tasks; The problem Converts to: question Relative to the problem For variables To seek expectation, the essence of the problem is still to minimize inventory cost; make in, Indicates The amount of computing resources released in a scheduling cycle is , the number of tasks that arrive is When the inventory cost caused by resource reservation is represents the corresponding expected inventory cost; Step 54: To minimize The expected inventory cost generated by a scheduling cycle is given as follows: in, Indicates The amount of computing resources released during the scheduling period is , the number of tasks that arrive is When the inventory cost caused by resource reservation is Indicated in The expected change in inventory cost when the number of tasks arriving in the scheduling period increases by 1, ;when hour, represents the corresponding minimum inventory cost expectation; because ,get: because and All are known quantities, and the estimated number of tasks in the next time slot is , and based on this, implement the resource scheduling of the previous scheduling cycle.
7. The offshore computing task offloading method based on resource reservation mechanism according to claim 6, characterized in that: The step 6 specifically includes: Step 61: Optimal number of tasks corresponding to the minimum inventory cost expectation , to infer the The amount of computing resources required for each scheduling cycle , then according to Derive the resources of the current time slot and further implement the resource allocation strategy; Step 62: The goal of resource allocation is to reserve computing resources when all task requests are satisfied. At least, the marine environment monitoring system will not actively reject the current task request for the purpose of reservation; Step 63: If the computing resources to be allocated in the current time slot are insufficient to meet the request, adopt a strategy of allocating as much as possible, that is, try to meet the resource request of the current user; if the computing resources to be allocated in the current time slot meet the request, reasonably reserve resources to cope with future tasks.
8. The offshore computing task offloading method based on resource reservation mechanism according to claim 7, characterized in that: The step 63 specifically includes: When the computing resources to be allocated in the current time slot are insufficient to meet the request requirements, Indicates the computing resources that are extra in the current time slot but do not meet the minimum allocation requirements. There are two cases: (1) If the released computing resources are sufficient to meet the demand, that is, , there is no need to reserve computing resources at this time, that is, the amount of computing resources currently required to be reserved is ; (2) If the released computing resources are not enough to meet the demand, that is, , the corresponding computing resource shortage , at this time, it is necessary to The size of , indicating the shortage of computing resources at this time Compare If the number of reserved computing resources is small, ;if , indicating the shortage of computing resources at this time Compare If there are more, no reservation is made. ; When the computing resources to be allocated in the current time slot meet the request requirements, ' Indicates the remaining computing resources after allocation, which can be divided into the following two cases: (1) If the released computing resources are sufficient to meet the demand, that is, , no reservation is required, that is, the current amount of computing resources that need to be reserved is ; (2) If the released computing resources are not enough to meet the demand, that is, , the corresponding computing resource shortage , at this time, it is necessary to The size of ,but ;if , which can be divided into two cases: No more than the minimum computing resource requirement , then no reservation is made. ;when Greater than the minimum computing resource requirement , then the amount of computing resources to be reserved is set to .
9. The offshore computing task offloading method based on resource reservation mechanism according to claim 8, characterized in that: The step 7 specifically includes: Step 71: Given a Value, based on the priority of the task, set the collection forward High priority tasks are assigned to the base station node , the remaining tasks are assigned to the buoy nodes , let base station node The number of remaining virtual machines is , must meet ; Assume that the number of buoy nodes available for computing resources in the current time slot is , , then when When the task set Lowest priority tasks are rejected by the marine environment monitoring system, otherwise, all task calculation requests are accepted; This determines the node set and collection The elements of the set Before High priority tasks belong to the set , the remaining tasks assigned to the buoy nodes belong to the set , obviously , Ø; Here, the collection and collection The number of elements in and express, The number of elements of , ; Step 72: , indicating that the number of nodes that currently need to transmit tasks is greater than the number of channels of the marine environment monitoring system, then channel multiplexing is required. Otherwise, channel multiplexing is not required, and channels are allocated in descending order of task priority; is the number of missing channels; if , then there is no need to implement channel multiplexing, and the tasks corresponding to the sensor nodes that are not assigned to the channel are rejected; if ,gather Not assigned to a channel Sensor nodes and collections The lowest priority sensor nodes to perform channel multiplexing; if and ,gather The highest priority one that is not assigned to a channel Nodes and collections The nodes in the channel reuse channel, the nodes that are not assigned to the channel and the corresponding tasks are rejected; Step 73: and collection Allocate virtual machine resources to the tasks in step 5, determine the number of virtual machine resources for each task in descending order of priority, that is, virtual machine resources are always allocated to tasks with high priority first; when there are unallocated virtual machines, take a virtual machine from the unallocated virtual machine set each time and allocate it 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, stop allocating virtual machine resources when the unallocated virtual machine resources reach the required reserved resource amount; Step 74: Calculate the set based on the task delay calculation model The total delay of all nodes in the set is set to a value for rejected tasks, and the value is ensured to be greater than the set The maximum total delay of the nodes in the set The total delay of all tasks in is accumulated, that is: Step 75: Change and repeat steps 71 to 74 to obtain the minimized The corresponding Value, virtual machine resource allocation results, channel multiplexing results and the current amount of remaining 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 method for offloading offshore computing tasks 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