A method, apparatus, and device for allocating mobile edge computing resources for the Internet of Things.
By constructing an initial device population and sorting and dynamically selecting devices, the allocation of computing resources is optimized, solving the transmission delay and packet loss problems caused by network congestion in mobile edge computing, and minimizing task processing time and improving system performance.
Patent Information
- Application Number
- CN202511163671.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-20
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2045-08-20
AI Technical Summary
Existing mobile edge computing full offloading schemes lead to increased transmission delays and packet loss during network congestion, and traditional methods are difficult to efficiently solve for the global optimal solution, ignoring device battery capacity and MEC resource limitations.
By obtaining the total number of IoT mobile devices and the number of current computing tasks on edge computing nodes, an initial device population is constructed, sorted, and dynamically selected to generate a candidate solution set of devices. Combined with genetic operations and iterative judgment, the allocation of computing resources is optimized.
It achieves efficient minimization of total task processing time, avoids transmission delays and packet loss caused by network congestion, balances device battery capacity and resource allocation, and optimizes system performance.
Smart Images

Figure CN120670174B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer information processing technology, and in particular to a method, apparatus and device for allocating mobile edge computing resources for the Internet of Things. Background Technology
[0002] With the widespread application of the Internet of Things (IoT) in smart cities, mobile edge computing (MEC) has become a key technology for solving the problem of insufficient computing power in terminal devices by offloading computing resources to the network edge. Current mainstream solutions adopt a complete offloading model, where tasks are processed entirely locally or completely offloaded to the MEC, and resource allocation is optimized based on energy efficiency indicators. However, the complete offloading solution has the following problems in real-world resource-constrained scenarios: First, when the network is congested, complete offloading can lead to increased transmission latency and data loss due to channel contention, resulting in degraded transmission performance; second, existing algorithms typically ignore the hard limitations of device battery capacity and the total amount of MEC resources, leading to low feasibility and distorted optimization models; finally, the resource allocation problem is essentially a non-convex optimization problem, and traditional methods struggle to efficiently find the global optimal solution, resulting in low solution efficiency. Summary of the Invention
[0003] This invention provides a method, apparatus, and device for allocating resources in mobile edge computing for the Internet of Things, which solves the problems of increased transmission delay and packet loss caused by network congestion in the complete offloading scheme of mobile edge computing.
[0004] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows:
[0005] This invention provides a method for allocating mobile edge computing resources in the Internet of Things (IoT), comprising:
[0006] Obtain the total number of IoT mobile devices and the number of current computing tasks performed by edge computing nodes;
[0007] Based on the total number of IoT mobile devices, an initial device population that can be used to allocate computing tasks is obtained, and the initial device population includes multiple device population individuals;
[0008] Based on the current number of computing tasks, the initial device population is sorted to obtain a sorted device population;
[0009] Based on the weight vectors of the multiple device populations, the sorted device populations are dynamically selected to obtain a subset of target device individuals.
[0010] Based on the subset of target devices and the sorted device population, a candidate solution set for devices is obtained;
[0011] The computing resource allocation data is determined based on the subset of target devices and the candidate solution set of devices.
[0012] Optionally, based on the total number of IoT mobile devices, an initial device population suitable for allocating computing tasks is obtained, including:
[0013] according to: This yields the local IoT mobile device computing resource allocation ratio vector, where... Allocate a proportional vector to local computing device resources. For the first The local resource allocation ratio for each computing task , For the total number of devices, and ;
[0014] according to: This yields the edge node computational resource allocation ratio vector, where, Calculate the resource allocation ratio vector for edge nodes. For the first The allocation ratio of computing resources to edge nodes for each computing task, and ;
[0015] according to: This yields the transmit power vector of the IoT mobile device, where... For the transmit power vector, For the first The transmit power of each IoT mobile device, and ;
[0016] according to: This yields the computational task segmentation ratio vector for the local IoT mobile device, where... A segmentation vector for the computational tasks of local IoT mobile devices. For the first The proportion of computing tasks processed locally on IoT mobile devices, and ;
[0017] Multiple population individuals are randomly generated, and each population individual contains the computing resource allocation ratio vector of the local IoT mobile device, the computing resource allocation ratio vector of the edge node, the transmit power vector, and the computing task segmentation ratio vector of the local IoT mobile device.
[0018] The individuals from the multiple populations are integrated to obtain an initial device population that can be used to allocate computing tasks.
[0019] Optionally, based on the current number of computing tasks, the initial device population is sorted to obtain a sorted device population, including:
[0020] according to:
[0021] ;
[0022] The fitness values of individuals in the initial equipment population are obtained, where, For the first The fitness value of each individual in the initial equipment population. , This represents the initial total number of individuals in the device population. , and To calculate task parameters, For the first Number of computation cycles required for each computation task For the first The amount of data that a computing task needs to process For the first The transmission rate from an IoT mobile device to a mobile edge node; and For the hardware parameters of IoT mobile devices, The maximum local computing frequency for IoT mobile devices. This represents the maximum computation frequency for mobile edge nodes. For the first The first individual in the initial device population The proportion of edge node computing resources allocated to each computing task; For the first The first individual in the initial device population The local resource allocation ratio for each computing task; For the first The first individual in the initial device population The proportion of computing tasks processed on local IoT mobile devices;
[0023] The initial device population is sorted in ascending order of fitness values to obtain the sorted device population.
[0024] Optionally, based on the weight vectors of the multiple device populations, a dynamic selection process is performed on the sorted device populations to obtain a subset of target device individuals, including:
[0025] according to:
[0026] ;
[0027] The ranking weight coefficients of individuals in multiple device populations are obtained, among which, Let m be the ranking weight coefficient of the m-th device in the population. Let m be the ranking of the m-th device in the population. To choose pressure, and , ;
[0028] The ranking weight coefficients of the multiple device populations are integrated to obtain a weight vector;
[0029] The ranking weight coefficients of multiple device population individuals in the weight vector are transformed to obtain the selection probability vector;
[0030] Based on the selection probability vector, multiple sector intervals are determined;
[0031] Randomly select from the multiple sector intervals to obtain multiple individuals;
[0032] The multiple individuals are integrated to obtain a subset of the target device individuals.
[0033] Optionally, a candidate solution set for devices is obtained based on the subset of target devices and the sorted device population, including:
[0034] Statistical characteristics are calculated for a subset of the target devices to obtain a statistical parameter matrix;
[0035] Obtain the best individual in the sorted population;
[0036] Based on the optimal individual and the statistical parameter matrix, a candidate solution set is determined.
[0037] Optionally, computational resource allocation data is determined based on the subset of target devices and the candidate solution set of devices, including:
[0038] The subset of individual target devices and the candidate solution set of devices are merged to obtain a merged population.
[0039] The merged population is subjected to iterative judgment processing to obtain resource allocation data.
[0040] Optionally, the merged population is subjected to iterative judgment processing to obtain resource allocation data, including:
[0041] Based on the merged population, determine the fitness values of multiple individuals in the population;
[0042] The fitness change rate is determined based on the fitness values of the individuals in the multiple populations.
[0043] The fitness change rate is compared with a preset threshold. When the fitness change rate is less than the preset threshold, the optimal individual of the merged population is output to obtain resource allocation data.
[0044] This invention also provides an IoT mobile edge computing resource allocation device, comprising:
[0045] The acquisition module is used to obtain the total number of IoT mobile devices and the number of current computing tasks performed by edge computing nodes;
[0046] The processing module is configured to: obtain an initial device population suitable for allocating computing tasks based on the total number of IoT mobile devices, wherein the initial device population includes multiple device population individuals; sort the initial device population according to the current number of computing tasks to obtain a sorted device population; dynamically select a target device subset based on the weight vectors of the multiple device population individuals; and obtain a candidate solution set of devices based on the target device subset and the sorted device population.
[0047] The determination module is used to determine computing resource allocation data based on the subset of target devices and the candidate solution set of devices.
[0048] This invention also provides a computing device, including: a processor and a memory storing a computer program, wherein the computer program, when run by the processor, executes the above-described method.
[0049] This invention also provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the above-described method.
[0050] The technical solution of the present invention has at least the following effects:
[0051] The above-described solution of the present invention obtains the total number of IoT mobile devices and the number of current computing tasks performed by edge computing nodes; based on the total number of IoT mobile devices, an initial device population is obtained that can be used to allocate computing tasks, the initial device population including multiple device population individuals; based on the number of current computing tasks, the initial device population is sorted to obtain a sorted device population; based on the weight vectors of the multiple device population individuals, the sorted device population is dynamically selected to obtain a target device individual subset; based on the target device individual subset and the sorted device population, a candidate device solution set is obtained; based on the target device individual subset and the candidate device solution set, computing resource allocation data is determined, thereby achieving efficient minimization of the total task processing time and avoiding transmission delays and packet loss caused by network congestion. Attached Figure Description
[0052] Figure 1 This is a flowchart of the IoT mobile edge computing resource allocation method provided in an embodiment of the present invention;
[0053] Figure 2 This is a structural diagram of the IoT mobile edge computing resource allocation device provided in an embodiment of the present invention;
[0054] Figure 3 This is a schematic diagram of the structure of the computing device provided in an embodiment of the present invention. Detailed Implementation
[0055] Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.
[0056] like Figure 1 As shown, an embodiment of the present invention proposes a method for allocating mobile edge computing resources for the Internet of Things, including:
[0057] Step 11: Obtain the total number of IoT mobile devices and the number of current computing tasks performed by edge computing nodes;
[0058] Step 12: Based on the total number of IoT mobile devices, obtain an initial device population that can be used to allocate computing tasks, wherein the initial device population includes multiple device population individuals;
[0059] Step 13: Sort the initial device population according to the current number of computing tasks to obtain the sorted device population;
[0060] Step 14: Based on the weight vectors of the multiple device populations, perform dynamic selection processing on the sorted device populations to obtain a subset of target device individuals;
[0061] Step 15: Obtain a candidate solution set of devices based on the subset of target devices and the sorted device population;
[0062] Step 16: Determine the computing resource allocation data based on the target device subset and the device candidate solution set.
[0063] In step 11 of this embodiment, when implementing the IoT mobile edge computing resource allocation method, it is first necessary to collect basic information of the system, including the total number of IoT mobile devices participating in the computing, the task parameters that each IoT mobile device needs to process, such as the data volume of the computing task, the computing cycle requirements, etc., and the hardware parameters of the IoT mobile devices, such as the computing power of the IoT mobile devices.
[0064] In step 12, an initial device population is generated based on the total number of IoT mobile devices acquired. This initial device population contains multiple device population individuals, each representing a possible resource allocation scheme. In the context of IoT mobile edge computing, each individual can be regarded as a combination strategy of resource allocation and task offloading, including which tasks should be processed locally, which tasks should be offloaded to MEC nodes, and the corresponding resource allocation ratio.
[0065] In step 13, each individual in the initial device population is evaluated using the collected computational task parameters and IoT mobile device hardware parameters. The evaluation metrics may include key performance indicators such as task processing time and energy consumption. Based on the evaluation results, the individuals in the initial device population are ranked, and the fitness and ranking weight coefficient of each individual are calculated to obtain the ranked population and the corresponding weight vector. The weight vector reflects the relative importance of each individual in the subsequent selection process.
[0066] In step 14, based on the weight vector obtained in the previous step, a dynamic selection strategy, such as roulette wheel selection or tournament selection, is adopted to select a subset of excellent individuals from the sorted population to form an excellent individual subset. During the selection process, individuals with larger weights have a higher probability of being selected, which helps to maintain the diversity of the population and avoid premature convergence to a local optimum. At the same time, in order to balance exploration and development, the selection pressure (i.e., the relative probability of high-fitness individuals participating in recombination) can be dynamically adjusted. It is initially set to be low to promote extensive exploration, and gradually increased in the later stage to focus on potential solution spaces.
[0067] In step 15, the subset of excellent individuals obtained in the previous step is combined with other individuals in the sorted population. Genetic operations such as crossover and mutation can be used to generate a new set of candidate solutions. This step aims to explore new regions in the solution space through genetic operations and find potentially better resource allocation schemes. The candidate solution set contains a variety of optimized and improved resource allocation and task unloading strategies.
[0068] In step 16, the optimal resource allocation data is extracted based on the information in the subset of excellent individuals and the candidate solution set. This includes determining which computing tasks each IoT mobile device should handle, which computing tasks should be offloaded to the MEC node, and the corresponding resource allocation ratio, such as transmit power and computing resource ratio. This resource allocation data will directly guide the actual resource allocation and task offloading operations in the IoT system to minimize task processing time and optimize system performance.
[0069] The technical solution described in this embodiment achieves efficient minimization of the total task processing time, while avoiding transmission delays and packet loss caused by network congestion.
[0070] In an optional embodiment of the present invention, step 12 may include:
[0071] Step 121, according to: This yields the local IoT mobile device computing resource allocation ratio vector, where... Allocate a proportional vector to local computing device resources. The local resource allocation ratio for the nth computation task. N is the total number of devices, and ;
[0072] Step 122, according to: This yields the edge node computational resource allocation ratio vector, where, Calculate the resource allocation ratio vector for edge nodes. Calculate the resource allocation ratio for the edge node of the nth computing task, and ;
[0073] Step 123, according to: This yields the transmit power vector of the IoT mobile device, where... For the transmit power vector, Let be the transmit power of the nth IoT mobile device, and ;
[0074] Step 124, according to: This yields the computational task segmentation ratio vector for the local IoT mobile device, where... A segmentation vector for the computational tasks of local IoT mobile devices. The proportion of the nth computational task processed on local IoT mobile devices, and ;
[0075] Step 125: Randomly generate multiple population individuals, each population individual containing the local IoT mobile device computing resource allocation ratio vector, the edge node computing resource allocation ratio vector, the transmit power vector, and the local IoT mobile device computing task segmentation ratio vector;
[0076] Step 126: Integrate the multiple population individuals to obtain an initial device population that can be used to allocate computing tasks.
[0077] In step 121 of this embodiment, a local computing resource allocation ratio vector is first constructed based on the total number N of IoT mobile devices: ; ( () represents the proportion of computing resources allocated to the nth computing task on the local IoT mobile device. This proportion satisfies the following constraints: This indicates that the proportion of resources processed by each computing task on the local IoT mobile device can be adjusted between 0% (no processing at all) and 100% (fully local processing); this vector is used to quantify the allocation of local computing resources for each computing task.
[0078] In step 122, the next step is to construct the edge computing resource allocation ratio vector: ; where each element This represents the resource allocation ratio of the nth computing task on the edge computing (MEC) node; since edge computing resources are shared, the total resources allocated to all tasks on the edge computing node cannot exceed 1, thus satisfying the constraint: This vector represents the allocation of edge computing resources for each task, used to balance local and edge computing resources.
[0079] In step 123, the transmit power vector is constructed: ; where each element This represents the transmit power when the nth IoT mobile device sends task data to the edge computing node; transmit power is an important parameter in wireless communication, directly affecting the data transmission rate and reliability; the transmit power of each IoT mobile device depends on actual needs and device capabilities. Set to a positive value ( This ensures that data can be effectively transmitted to edge computing nodes;
[0080] In step 124, construct the local task segmentation ratio vector: ; where each element This represents the proportion of the nth task processed locally; similar to the local computing resource allocation proportion, this proportion also satisfies the following constraints: However, the local task segmentation ratio vector focuses more on describing the specific part of the task executed locally, rather than resource allocation; by adjusting It allows for flexible control over how tasks are split between local and edge computing nodes;
[0081] In step 125, after obtaining the four vectors mentioned above, multiple population individuals are randomly generated; each population individual contains the four vectors mentioned above, namely, the local computing resource allocation ratio vector, the edge computing resource allocation ratio vector, the transmit power vector, and the local task segmentation ratio vector. These individuals represent different resource allocation and task offloading strategies;
[0082] In step 126, the randomly generated individuals from multiple populations are integrated to form a complete initial device population. This initial device population contains a variety of possible resource allocation and task offloading schemes, providing rich candidate solutions for subsequent evaluation, selection, and optimization. By iteratively optimizing these individuals, the optimal resource allocation strategy can be gradually found, thereby minimizing task processing time and improving system performance.
[0083] In an optional embodiment of the present invention, step 13 may include:
[0084] Step 131, according to:
[0085] ;
[0086] The fitness values of individuals in the initial equipment population are obtained, where, For the first The fitness value of each individual in the initial equipment population. , This represents the initial total number of individuals in the device population. , and To calculate task parameters, For the first Number of computation cycles required for each computation task For the first The amount of data that a computing task needs to process For the first The transmission rate from an IoT mobile device to a mobile edge node; and For the hardware parameters of IoT mobile devices, The maximum local computing frequency for IoT mobile devices. This represents the maximum computation frequency for mobile edge nodes. For the first The first individual in the initial device population The proportion of edge node computing resources allocated to each computing task; For the first The first individual in the initial device population The local resource allocation ratio for each computing task; For the first The first individual in the initial device population The proportion of computing tasks processed on local IoT mobile devices;
[0087] Step 132: Sort the initial device population in ascending order of fitness values to obtain the sorted device population.
[0088] In step 131 of this embodiment, the fitness function formula is first applied:
[0089] (1)
[0090] The fitness value of each individual in the initial device population is calculated. This fitness function takes into account the processing time of the task on local and edge computing nodes, as well as the data transmission time. The fitness value of each individual is obtained by weighted summation to measure its quality.
[0091] In step 132, individuals in the initial device population are sorted in ascending order based on the fitness values calculated in the previous step; in the sorted population, individuals with smaller fitness values are ranked higher, indicating that they have better performance.
[0092] In an optional embodiment of the present invention, step 14 may include:
[0093] Step 141, according to:
[0094] ;
[0095] The ranking weight coefficients of individuals in multiple device populations are obtained, among which, For the first The ranking weight coefficient of each individual device in the population. For the first Ranking of individual devices in a population; To choose pressure, and , ;
[0096] Step 142: Integrate the ranking weight coefficients of the multiple device populations to obtain a weight vector;
[0097] Step 143: The ranking weight coefficients of multiple device population individuals in the weight vector are transformed to obtain the selection probability vector;
[0098] Step 144: Determine multiple sector intervals based on the selected probability vector;
[0099] Step 145: Randomly select from the multiple sector intervals to obtain multiple individuals;
[0100] Step 146: Integrate the multiple individuals to obtain a subset of the target device individuals.
[0101] In step 141 of this embodiment, according to the ranking weight coefficient formula:
[0102] (2)
[0103] Calculate the ranking weight coefficient for each individual in the population; where, This represents the ranking weight coefficient of the m-th individual in the population. Let m be the rank of the m-th individual in the population. To select the pressure, its initial value Subsequent values are obtained through a recursive formula: Calculated; Selected pressure It is a dynamically adjusted parameter used to control the relative probability of high-fitness individuals in subsequent selection processes; setting a low selection pressure in the early stage helps maintain the diversity of the population and avoids premature convergence to a local optimum; as the iteration progresses, the selection pressure is gradually increased to focus on the potential solution space.
[0104] In step 142, the ranking weight coefficients of multiple individuals in the population calculated in the previous step are integrated to form a weight vector. This weight vector reflects the relative importance of each individual in the subsequent selection process, providing a basis for dynamic selection operations. Through the weight vector, the algorithm can more rationally select superior individuals for genetic operations, thereby gradually optimizing the resource allocation scheme;
[0105] In step 143, these weighting coefficients are converted into selection probabilities, specifically as follows:
[0106] (1) Normalization: Divide all coefficients in the weight vector by their sum so that the sum of all selection probabilities is 1; for example, if the weight vector is: The probability of choosing is: ;
[0107] (2) Generate the selection probability vector: The final vector is: ,in This represents the probability that the m-th individual is selected; the higher the weight of an individual, the greater its corresponding selection probability, reflecting the mechanism of "survival of the fittest".
[0108] In step 144, based on the selection probability vector, the selection space (such as a unit circle or a linear interval) is divided into multiple sectors (or sub-intervals), each corresponding to an individual; starting from the first individual, the cumulative probability is calculated sequentially: For example, if the selection probability is [0.3, 0.5, 0.2], then the cumulative probability is [0.3, 0.8, 1.0]. The cumulative probability is mapped to the boundaries of the sector intervals; for example, the first individual corresponds to the interval [0, 0.3), the second to [0.3, 0.8), and the third to [0.8, 1.0]. This division ensures that the probability of an individual being selected is proportional to its weight.
[0109] In step 145, individuals are randomly selected from the sector interval using the Roulette Wheel Selection mechanism. First, a random number r is generated in the range [0, 1]. The selected individual is determined based on the cumulative probability interval in which r is located. For example, if r = 0.45, then it falls into the second interval [0.3, 0.8), corresponding to the second individual. The above process is repeated multiple times (e.g., k times) to generate k individuals. Each selection is performed independently, allowing the same individual to be selected multiple times (i.e., "sampling with replacement") to maintain population diversity.
[0110] In step 146, multiple randomly selected individuals are integrated into a subset as a candidate set for subsequent genetic operations. First, if duplicate individuals need to be avoided, the selected individuals can be deduplicated, but duplicates are usually retained to enhance the propagation of superior genes. The size of the subset can be dynamically adjusted according to the algorithm requirements, such as being fixed at 20% of the population size, or related to the weight distribution, such as prioritizing high-weight individuals until the size requirement is met. The final subset contains individuals with higher fitness and better resource allocation schemes, providing high-quality parents for subsequent crossover, mutation, and other operations, thereby gradually optimizing the overall resource allocation strategy.
[0111] In an optional embodiment of the present invention, step 15 may include:
[0112] Step 151: Calculate the statistical characteristics of the subset of individual target devices to obtain a statistical parameter matrix;
[0113] Step 152: Obtain the best individual in the sorted population;
[0114] Step 153: Determine the candidate solution set based on the optimal individual and the statistical parameter matrix.
[0115] In step 151 of this embodiment, the core parameters of the resource allocation scheme for each individual in the subset of excellent individuals are first extracted, including: the edge computing resource allocation ratio. (Edge computing resource allocation ratio for the nth task of the mth individual), local computing resource allocation ratio (Local computing resource ratio of the m-th individual's n-th task), Local processing ratio of tasks (The probability that the nth task of the mth individual is processed locally); Perform statistical characteristic analysis on the above parameters, calculate the mean, variance, maximum value, minimum value, and other statistics of each parameter in the subset, and form a statistical parameter matrix; where the rows of the matrix correspond to different parameters (e.g., , , The columns correspond to different task or resource dimensions; each element represents the statistical characteristics of the parameter in the subset, such as the mean reflecting the central tendency of resource allocation and the variance reflecting diversity; through the statistical parameter matrix, the resource allocation pattern of the excellent individual subset is quantified, providing a data-driven reference for the subsequent generation of candidate solutions by combining the optimal individuals.
[0116] In step 152, the individual with the best overall performance is selected from the sorted population and used as the benchmark for generating candidate solutions; the specific process includes:
[0117] (1) According to the sorting results in step 132, the population has been sorted in ascending order of fitness value, and the individual with the smallest fitness value is the best individual (i.e. the best performance).
[0118] (2) Select the first individual in the sorted population as the optimal individual, and its resource allocation scheme is denoted as: (n is the task number);
[0119] The optimal individual embodies the optimal resource allocation pattern in the current population. Using it as the benchmark for generating candidate solutions can ensure that candidate solutions at least inherit the core characteristics of local optima and avoid the search direction from deviating from the high-quality solution space.
[0120] In step 153, by integrating the global advantage of the optimal individual with the statistical characteristics of the excellent subset, a candidate solution set that combines diversity and adaptability is generated. The specific process includes: using the optimal individual Generate T new solutions centered at the Gaussian distribution:
[0121] (3)
[0122] in, The proportion of local computing resources allocated to the nth new solution; The percentage of edge computing resources for the nth new solution; The transmit power of the nth new solution; The probability of local processing for the nth new solution; The optimal proportion of local computing resources for an individual; The optimal proportion of edge computing resources for an individual; The optimal transmission power for an individual; The probability of local processing for the optimal individual; , , , All are Gaussian distributed, representing random perturbation sources for the new solution, where , , , The variances of each variable;
[0123] The constraints include:
[0124] (1) If Then place ;like Then place ;
[0125] (2) ;
[0126] (3) ;
[0127] (4) ;
[0128] The final set of new candidate solutions is obtained: ;
[0129] In an optional embodiment of the present invention, step 16 may include:
[0130] Step 161: Merge the subset of target devices and the candidate solution set of devices to obtain the merged population;
[0131] Step 162: Determine the fitness values of multiple individuals in the merged population;
[0132] Step 163: Determine the fitness change rate based on the fitness values of the multiple individuals in the population;
[0133] Step 164: Compare the fitness change rate with a preset threshold. When the fitness change rate is less than the preset threshold, output the optimal individual of the merged population to obtain resource allocation data.
[0134] In step 161 of this embodiment, the subset of excellent individuals (the set of individuals with high fitness generated in step 14) is merged with the candidate solution set (the set of solutions with both diversity and local optima generated in step 15) to form a mixed population containing the two types of individuals. During the merging, it is necessary to ensure that there are no duplicate individuals. If there are duplicates, one can be retained or the better one can be selected based on the fitness value to avoid wasting computational resources. The size of the merged population can be set to a fixed value, such as 1.5 times the size of the original population, or dynamically adjusted, such as gradually reducing it according to the number of iterations, to balance computational complexity and search efficiency.
[0135] If the size after merging exceeds the threshold, the population can be streamlined by randomly deleting individuals with low fitness or by removing redundant solutions based on cluster analysis.
[0136] In step 162, the fitness values of multiple individuals in the population are calculated using equation (1);
[0137] In step 163, the optimal fitness value of the merged population at the current iteration number t is recorded. and the previous generation's optimal fitness value ;according to:
[0138] (4)
[0139] Calculate the rate of change of fitness;
[0140] In step 164, at the maximum number of iterations: hour( (Can be preset to 100), or ( Can be preset as When the condition is met, the calculation is terminated and the global optimal solution is output. The elements in the global optimal solution are the resource allocation data.
[0141] A specific embodiment of the IoT mobile edge computing resource allocation method provided by this invention is as follows:
[0142] Step 1: Obtain the total number of IoT mobile devices, calculation task parameters, and IoT mobile device hardware parameters.
[0143] (1) The total number of devices (N) is the number of IoT terminal devices participating in the calculation in the system, corresponding to n=1, 2, ..., N in the mathematical model;
[0144] (2) Task parameters include:
[0145] 1) Calculation cycle requirements ( ): The number of computation cycles required to complete the nth device task;
[0146] 2) Data volume ( ): The number of data bits that the nth device needs to process;
[0147] 3) Task splitting ratio ( ): The proportion of tasks processed locally (initial value needs to be set);
[0148] (3) Hardware parameters include:
[0149] 1) Device side: Maximum computing power ;
[0150] 2) MEC side: Maximum computing power Maximum transmission power ;
[0151] 3) System constraints: The transmission rate from the nth device to the mobile edge computing node ;
[0152] Step 2: Generate the initial device population.
[0153] In the initial device population, each individual represents a resource allocation scheme, encoded as a combination of decision variables, which can be represented as:
[0154] ;
[0155] Randomly generate solutions that satisfy the constraints, such as , , , ;
[0156] Step 3, evaluation and sorting process.
[0157] For each individual, substitute the values into the objective function to calculate the total task processing time:
[0158] ;
[0159] Sort the population in ascending order of fitness (minimum time optimal); calculate the ranking weight of each individual:
[0160] ;
[0161] Among them, the best individual has the highest weight, and the worst individual has the lowest weight; the weight is used to adjust the selection pressure (to avoid early convergence).
[0162] Step 4, Dynamic Selection Processing.
[0163] Selecting superior individuals based on probability using weight vectors, i.e., individuals with high weights have a high probability of being selected; dynamic selection pressure. Initial stage, A lower value (0.5) expands the search range; in later iterations, Gradually increase the size, focusing on local optima; obtain a subset of excellent individuals, namely the top 20% to 30% of individuals in terms of fitness.
[0164] Step 5: Generate a candidate solution set.
[0165] Extract the variables of all individuals in the subset of outstanding individuals, and calculate the mean and standard deviation of each variable in the subset of outstanding individuals, taking the proportion of local computing resources and transmission power as an example (other variables) Similarly):
[0166] , ;
[0167] , ;
[0168] With the optimal solution individual Generate T new solutions centered at the Gaussian distribution;
[0169]
[0170] The constraints include:
[0171] (1) If Then place ;like Then place ;
[0172] (2) ;
[0173] (3) ;
[0174] (4) ;
[0175] The final set of new candidate solutions is obtained: ;
[0176] Step 6: Output resource allocation data.
[0177] The two types of individuals are directly merged into a new population: ;
[0178] Determine whether any of the following termination conditions are met:
[0179] (1) Maximum number of iterations: t≥100;
[0180] (2) ;
[0181] If the iteration continues, then Proceed to step 3 for the next round of evaluation; if termination occurs, output the individual global optimal solution. The elements in the optimal solution are the optimal resource allocation scheme.
[0182] The IoT mobile edge computing resource allocation method proposed in this invention achieves the following technical effects by designing a population optimization algorithm based on statistical characteristics and adopting a partially offloaded hybrid computing paradigm:
[0183] (1) New solutions are dynamically generated by utilizing population statistical characteristics and combined with a progressively increasing selection pressure mechanism to avoid premature convergence of the algorithm and efficiently solve non-convex optimization problems;
[0184] (2) Jointly optimize the task segmentation ratio, device transmission power, local computing resources and edge resource allocation to make the objective function globally optimal and minimize the total task processing time;
[0185] (3) By combining local processing with edge offloading for dynamic task segmentation, the full offloading scheme is replaced, which significantly reduces transmission delay and packet loss rate and avoids network congestion risk.
[0186] (4) Under the constraints of equipment battery capacity, resource allocation upper limit and variable boundary, achieve a balance between resource allocation and energy consumption, and strictly meet system constraints.
[0187] like Figure 2 As shown, this embodiment of the invention also provides an IoT mobile edge computing resource allocation device 20, comprising:
[0188] The acquisition module 21 is used to acquire the total number of IoT mobile devices and the number of current computing tasks performed by edge computing nodes;
[0189] Processing module 22 is configured to: obtain an initial device population for allocating computing tasks based on the total number of IoT mobile devices, wherein the initial device population includes multiple device population individuals; sort the initial device population according to the current number of computing tasks to obtain a sorted device population; dynamically select a target device subset based on the weight vectors of the multiple device population individuals; and obtain a candidate solution set of devices based on the target device subset and the sorted device population.
[0190] The determination module 23 is used to determine computing resource allocation data based on the target device subset and the device candidate solution set.
[0191] Optionally, processing module 22 is specifically used for:
[0192] according to: This yields the local IoT mobile device computing resource allocation ratio vector, where... Allocate a proportional vector to local computing device resources. For the first The local resource allocation ratio for each computing task , For the total number of devices, and ;
[0193] according to: This yields the edge node computational resource allocation ratio vector, where, Calculate the resource allocation ratio vector for edge nodes. For the first The allocation ratio of computing resources to edge nodes for each computing task, and ;
[0194] according to: This yields the transmit power vector of the IoT mobile device, where... For the transmit power vector, For the first The transmit power of each IoT mobile device, and ;
[0195] according to: This yields the computational task segmentation ratio vector for the local IoT mobile device, where... A segmentation vector for the computational tasks of local IoT mobile devices. For the first The proportion of computing tasks processed locally on IoT mobile devices, and ;
[0196] Multiple population individuals are randomly generated, and each population individual contains the computing resource allocation ratio vector of the local IoT mobile device, the computing resource allocation ratio vector of the edge node, the transmit power vector, and the computing task segmentation ratio vector of the local IoT mobile device.
[0197] The individuals from the multiple populations are integrated to obtain an initial device population that can be used to allocate computing tasks.
[0198] Optionally, the processing module 22 is also specifically used for:
[0199] according to:
[0200] ;
[0201] The fitness values of individuals in the initial equipment population are obtained, where, For the first The fitness value of each individual in the initial equipment population. , This represents the initial total number of individuals in the device population. , and To calculate task parameters, For the first Number of computation cycles required for each computation task For the first The amount of data that a computing task needs to process For the first The transmission rate from an IoT mobile device to a mobile edge node; and For the hardware parameters of IoT mobile devices, The maximum local computing frequency for IoT mobile devices. This represents the maximum computation frequency for mobile edge nodes. For the first The first individual in the initial device population The proportion of edge node computing resources allocated to each computing task; For the first The first individual in the initial device population The local resource allocation ratio for each computing task; For the first The first individual in the initial device population The proportion of computing tasks processed on local IoT mobile devices;
[0202] The initial device population is sorted in ascending order of fitness values to obtain the sorted device population.
[0203] Optionally, the processing module 22 is also specifically used for:
[0204] according to:
[0205] ;
[0206] The ranking weight coefficients of individuals in multiple device populations are obtained, among which, For the first The ranking weight coefficient of each individual device in the population. For the first Ranking of individual devices in a population; To choose pressure, and , ;
[0207] The ranking weight coefficients of the multiple device populations are integrated to obtain a weight vector;
[0208] The ranking weight coefficients of multiple device population individuals in the weight vector are transformed to obtain the selection probability vector;
[0209] Based on the selection probability vector, multiple sector intervals are determined;
[0210] Randomly select from the multiple sector intervals to obtain multiple individuals;
[0211] The multiple individuals are integrated to obtain a subset of the target device individuals.
[0212] Optionally, the processing module 22 is also specifically used for:
[0213] Statistical characteristics are calculated for a subset of the target devices to obtain a statistical parameter matrix;
[0214] Obtain the best individual in the sorted population;
[0215] Based on the optimal individual and the statistical parameter matrix, a candidate solution set is determined.
[0216] Optionally, module 23 is specifically used for:
[0217] The subset of individual target devices and the candidate solution set of devices are merged to obtain a merged population.
[0218] The merged population is subjected to iterative judgment processing to obtain resource allocation data.
[0219] Optionally, the merged population is subjected to iterative judgment processing to obtain resource allocation data, including:
[0220] Based on the merged population, determine the fitness values of multiple individuals in the population;
[0221] The fitness change rate is determined based on the fitness values of the individuals in the multiple populations.
[0222] The fitness change rate is compared with a preset threshold. When the fitness change rate is less than the preset threshold, the optimal individual of the merged population is output to obtain resource allocation data.
[0223] It should be noted that this device is a device corresponding to the above method. All implementation methods in the above method embodiments are applicable to this embodiment and can achieve the same technical effect.
[0224] like Figure 3 As shown, this embodiment of the invention also provides a computing device 30, including a processor 31, a memory 32, and a program or instructions stored in the memory 32 and executable on the processor 31. When the program or instructions are executed by the processor 31, they implement the various processes of the above-described IoT mobile edge computing resource allocation method embodiment and achieve the same technical effects. To avoid repetition, they will not be described again here. It should be noted that the computing device in this embodiment of the invention includes the above-described mobile electronic devices and non-mobile electronic devices.
[0225] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.
[0226] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0227] In the embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0228] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0229] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0230] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a portion of the 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 to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.
[0231] Furthermore, it should be noted that in the apparatus and method of the present invention, it is obvious that the components or steps can be decomposed and / or recombined. These decompositions and / or recombinations should be considered equivalent solutions of the present invention. Moreover, the steps performing the above series of processes can naturally be executed in the order described, but are not necessarily required to be executed in chronological order; some steps can be executed in parallel or independently of each other. Those skilled in the art will understand that all or any step or component of the method and apparatus of the present invention can be implemented in any computing device (including processors, storage media, etc.) or network of computing devices, in hardware, firmware, software, or a combination thereof. This is something that those skilled in the art can achieve by using their basic programming skills after reading the description of the present invention.
[0232] Therefore, the object of the present invention can also be achieved by running a program or a set of programs on any computing device. The computing device can be a known general-purpose device. Therefore, the object of the present invention can also be achieved simply by providing a program product containing program code for implementing the method or apparatus. That is, such a program product also constitutes the present invention, and the storage medium storing such a program product also constitutes the present invention. Obviously, the storage medium can be any known storage medium or any storage medium developed in the future. It should also be noted that in the apparatus and method of the present invention, it is obvious that the components or steps can be decomposed and / or recombined. These decompositions and / or recombinations should be considered equivalent to the present invention. Furthermore, the steps for performing the above series of processes can naturally be performed in the order described, but are not necessarily required to be performed in chronological order. Some steps can be performed in parallel or independently of each other.
[0233] The above are preferred embodiments of the present invention. It should be noted that, for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for allocating mobile edge computing resources in the Internet of Things (IoT), characterized in that, include: Obtain the total number of IoT mobile devices and the number of current computing tasks performed by edge computing nodes; Based on the total number of IoT mobile devices, an initial device population that can be used to allocate computing tasks is obtained, and the initial device population includes multiple device population individuals; Based on the current number of computing tasks, the initial device population is sorted to obtain a sorted device population; Based on the weight vectors of the multiple device populations, the sorted device populations are dynamically selected to obtain a subset of target device individuals. Based on the subset of target devices and the sorted device population, a candidate solution set for devices is obtained; Based on the subset of target devices and the candidate solution set of devices, determine the computing resource allocation data; The initial device population available for allocating computing tasks is obtained based on the total number of IoT mobile devices, including: according to: This yields the local IoT mobile device computing resource allocation ratio vector, where... Allocate a proportional vector to local computing device resources. For the first The local resource allocation ratio for each computing task , For the total number of devices, and ; according to: This yields the edge node computational resource allocation ratio vector, where, Calculate the resource allocation ratio vector for edge nodes. For the first The allocation ratio of computing resources to edge nodes for each computing task, and ; according to: This yields the transmit power vector of the IoT mobile device, where... For the transmit power vector, For the first The transmit power of each IoT mobile device, and ; according to: This yields the computational task segmentation ratio vector for the local IoT mobile device, where... A segmentation vector for the computational tasks of local IoT mobile devices. For the first The proportion of computing tasks processed locally on IoT mobile devices, and ; Multiple population individuals are randomly generated, and each population individual contains the computing resource allocation ratio vector of the local IoT mobile device, the computing resource allocation ratio vector of the edge node, the transmit power vector, and the computing task segmentation ratio vector of the local IoT mobile device. The individuals from the multiple populations are integrated to obtain an initial device population that can be used to allocate computing tasks.
2. The IoT mobile edge computing resource allocation method according to claim 1, characterized in that, Based on the current number of computing tasks, the initial device population is sorted to obtain a sorted device population, including: according to: ; The fitness values of individuals in the initial equipment population are obtained, where, For the first The fitness value of each individual in the initial equipment population. , This represents the initial total number of individuals in the device population. , and To calculate task parameters, For the first Number of computation cycles required for each computation task For the first The amount of data that a computing task needs to process For the first The transmission rate from an IoT mobile device to a mobile edge node; The maximum local computing frequency for IoT mobile devices. This represents the maximum computation frequency for mobile edge nodes. For the first The first individual in the initial device population The proportion of edge node computing resources allocated to each computing task; For the first The first individual in the initial device population The local resource allocation ratio for each computing task; For the first The first individual in the initial device population The proportion of computing tasks processed on local IoT mobile devices; The initial device population is sorted in ascending order of fitness values to obtain the sorted device population.
3. The IoT mobile edge computing resource allocation method according to claim 2, characterized in that, Based on the weight vectors of the multiple device populations, a dynamic selection process is performed on the sorted device populations to obtain a subset of target device individuals, including: according to: ; The ranking weight coefficients of individuals in multiple device populations are obtained, among which, For the first The ranking weight coefficient of each individual device in the population. For the first Ranking of individual devices in a population; To choose pressure, and , ; The ranking weight coefficients of the multiple device populations are integrated to obtain a weight vector; The ranking weight coefficients of multiple device population individuals in the weight vector are transformed to obtain the selection probability vector; Based on the selection probability vector, multiple sector intervals are determined; Randomly select from the multiple sector intervals to obtain multiple individuals; The multiple individuals are integrated to obtain a subset of the target device individuals.
4. The IoT mobile edge computing resource allocation method according to claim 1, characterized in that, Based on the subset of target devices and the sorted device population, a candidate solution set for devices is obtained, including: Statistical characteristics are calculated for a subset of the target devices to obtain a statistical parameter matrix; Obtain the best individual in the sorted population; Based on the optimal individual and the statistical parameter matrix, a candidate solution set is determined.
5. The IoT mobile edge computing resource allocation method according to claim 4, characterized in that, Based on the subset of target devices and the candidate solution set of devices, computational resource allocation data is determined, including: The subset of individual target devices and the candidate solution set of devices are merged to obtain a merged population. The merged population is subjected to iterative judgment processing to obtain resource allocation data.
6. The IoT mobile edge computing resource allocation method according to claim 5, characterized in that, The merged population is subjected to iterative judgment processing to obtain resource allocation data, including: Based on the merged population, determine the fitness values of multiple individuals in the population; The fitness change rate is determined based on the fitness values of the individuals in the multiple populations. The fitness change rate is compared with a preset threshold. When the fitness change rate is less than the preset threshold, the optimal individual of the merged population is output to obtain resource allocation data.
7. An Internet of Things (IoT) mobile edge computing resource allocation device, characterized in that, include: The acquisition module is used to obtain the total number of IoT mobile devices and the number of current computing tasks performed by edge computing nodes; The processing module is configured to obtain an initial device population that can be used to allocate computing tasks based on the total number of IoT mobile devices, wherein the initial device population includes multiple device population individuals; sort the initial device population according to the current number of computing tasks to obtain a sorted device population; and dynamically select a subset of target device individuals based on the weight vectors of the multiple device population individuals. Based on the subset of target devices and the sorted device population, a candidate solution set for devices is obtained; The determination module is used to determine computing resource allocation data based on the subset of target devices and the candidate solution set of devices; The initial device population available for allocating computing tasks is obtained based on the total number of IoT mobile devices, including: according to: This yields the local IoT mobile device computing resource allocation ratio vector, where... Allocate a proportional vector to local computing device resources. For the first The local resource allocation ratio for each computing task , For the total number of devices, and ; according to: This yields the edge node computational resource allocation ratio vector, where, Calculate the resource allocation ratio vector for edge nodes. For the first The allocation ratio of computing resources to edge nodes for each computing task, and ; according to: This yields the transmit power vector of the IoT mobile device, where... For the transmit power vector, For the first The transmit power of each IoT mobile device, and ; according to: This yields the computational task segmentation ratio vector for the local IoT mobile device, where... A segmentation vector for the computational tasks of local IoT mobile devices. For the first The proportion of computing tasks processed locally on IoT mobile devices, and ; Multiple population individuals are randomly generated, and each population individual contains the computing resource allocation ratio vector of the local IoT mobile device, the computing resource allocation ratio vector of the edge node, the transmit power vector, and the computing task segmentation ratio vector of the local IoT mobile device. The individuals from the multiple populations are integrated to obtain an initial device population that can be used to allocate computing tasks.
8. A computing device, characterized in that, include: A processor, a memory storing a computer program, wherein the computer program, when executed by the processor, performs the method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The system stores instructions that, when executed on a computer, cause the computer to perform the method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Computing task unloading method and device and computer readable storage medium
CN110418356A
Edge computing task unloading method based on improved self-learning weight
CN116668447A