Internet of Things mobile edge computing resource allocation method, device and equipment
By constructing an initial device population and sorting and dynamically selecting it, and combining it with genetic operations to optimize resource allocation, the problems of transmission delay and packet loss caused by network congestion in mobile edge computing of the Internet of Things are solved, and the task processing time is minimized and the system performance is improved.
Patent Information
- Application Number
- CN202511163671.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-20
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2045-08-20
AI Technical Summary
The existing full offloading scheme in IoT mobile edge computing leads to increased transmission delay and packet loss when the network is congested. In addition, traditional methods are difficult to efficiently solve the global optimal solution and ignore the device battery capacity and MEC resource limitations.
By obtaining the total number of IoT mobile devices and the current number of computing tasks of edge computing nodes, an initial device population is constructed. The population optimization algorithm is used for sorting and dynamic selection to generate a subset of target device individuals and a set of candidate solutions. Genetic operations are combined to optimize resource allocation and achieve a dynamic balance between partial offloading and local processing.
It achieves efficient minimization of the 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 CN120670174A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer information processing technology, and in particular to a method, device and equipment for allocating mobile edge computing resources for the Internet of Things. Background Art
[0002] With the widespread adoption of the Internet of Things in smart cities, mobile edge computing (MEC) has become a key technology for addressing the lack of computing power in terminal devices by shifting computing resources to the edge of the network. The current mainstream solution adopts a full offload model, whereby tasks are processed entirely locally or offloaded entirely to the MEC, and resource allocation is optimized based on energy efficiency metrics. However, full offload solutions present the following challenges in resource-constrained scenarios: First, when the network is congested, full offload can lead to increased transmission delays and data loss due to channel contention, resulting in degraded transmission performance. Second, existing algorithms often ignore the hard constraints of device battery capacity and total MEC resources, resulting in low feasibility and distorted optimization models. Finally, the resource allocation problem is inherently a non-convex optimization problem, making it difficult for traditional methods to efficiently find the global optimal solution, resulting in low solution efficiency. Summary of the Invention
[0003] The present invention provides a method, device and equipment for allocating resources in mobile edge computing of the Internet of Things, which solves the problems of increased transmission delay and packet loss caused by network congestion in a full offload solution in mobile edge computing.
[0004] In order to solve the above technical problems, the technical solutions of the present invention are as follows:
[0005] An embodiment of the present invention provides a method for allocating mobile edge computing resources for the Internet of Things, including:
[0006] Get the total number of IoT mobile devices and the number of current computing tasks performed by edge computing nodes;
[0007] Obtaining 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 a plurality of device population individuals;
[0008] Sorting the initial device population according to the number of current computing tasks to obtain a sorted device population;
[0009] Dynamically selecting the sorted device populations according to the weight vectors of the multiple device population individuals to obtain a target device individual subset;
[0010] Obtaining a device candidate solution set according to the target device individual subset and the sorted device population;
[0011] Computing resource allocation data is determined based on the target device individual subset and the device candidate solution set.
[0012] Optionally, obtaining an initial device population that can be used to allocate computing tasks based on the total number of IoT mobile devices includes:
[0013] according to: , get the local IoT mobile device computing resource allocation ratio vector, where, Allocate a proportional vector for local computing device resources, For the The local resource allocation ratio of each computing task, , is the total number of devices, and ;
[0014] according to: , get the edge node computing resource allocation ratio vector, where, Compute resource allocation ratio vectors for edge nodes, For the The edge node computing resource allocation ratio of each computing task, and ;
[0015] according to: , get the transmission power vector of the IoT mobile device, where, is the transmit power vector, For the The transmit power of each IoT mobile device, and ;
[0016] according to: , get the computing task division ratio vector of the local IoT mobile device, where Split the proportional vector for the computational tasks of the local IoT mobile device, For the The proportion of computing tasks processed locally on IoT mobile devices, and ;
[0017] Randomly generate a plurality of population individuals, each population individual including the local IoT mobile device computing resource allocation ratio vector, the edge node computing resource allocation ratio vector, the transmit power vector, and the computing task partitioning ratio vector of the local IoT mobile device;
[0018] The plurality of population individuals are integrated to obtain an initial device population that can be used to allocate computing tasks.
[0019] Optionally, the initial device population is sorted according to the current number of computing tasks to obtain a sorted device population, including:
[0020] according to:
[0021] ;
[0022] Get the fitness value of the individual in the initial device population, where For the The fitness values of individuals in the initial device population, , is the total number of individuals in the initial device population; 、 and To calculate the task parameters, For the The number of computing cycles required for a computing task, For the The amount of data that needs to be processed by a computing task, For the The transmission rate from an IoT mobile device to a mobile edge node; and The hardware parameters of IoT mobile devices, is the local maximum computing frequency of IoT mobile devices, is the maximum computation frequency of the mobile edge node; For the The first individual of the initial device population The ratio of edge node computing resources allocated to each computing task; For the The first individual of the initial device population The local resource allocation ratio of each computing task; For the The first individual of the initial device population The proportion of computing tasks processed locally on IoT mobile devices;
[0023] The initial device population is sorted in ascending order of the fitness values to obtain a sorted device population.
[0024] Optionally, dynamically selecting the sorted device populations according to the weight vectors of the multiple device population individuals to obtain a target device individual subset includes:
[0025] according to:
[0026] ;
[0027] Get the ranking weight coefficients of multiple device population individuals, where: is the ranking weight coefficient of the mth device population individual, is the ranking of the mth device population individual; is the selection pressure, and , ;
[0028] Integrating the ranking weight coefficients of the plurality of device population individuals to obtain a weight vector;
[0029] Converting the ranking weight coefficients of the plurality of device population individuals in the weight vector to obtain a selection probability vector;
[0030] Determining a plurality of sector intervals according to the selection probability vector;
[0031] Randomly selecting the multiple sector intervals to obtain multiple individuals;
[0032] The multiple individuals are integrated to obtain a target device individual subset.
[0033] Optionally, obtaining a device candidate solution set according to the target device individual subset and the sorted device population includes:
[0034] Calculating statistical characteristics of the target device individual subset to obtain a statistical parameter matrix;
[0035] Obtain the optimal individual of the sorted population;
[0036] A candidate solution set is determined according to the optimal individual and the statistical parameter matrix.
[0037] Optionally, determining computing resource allocation data based on the target device individual subset and the device candidate solution set includes:
[0038] Merging the target device individual subset and the device candidate solution set to obtain a merged population;
[0039] An iterative judgment process is performed on the merged population to obtain resource allocation data.
[0040] Optionally, performing iterative judgment processing on the merged population to obtain resource allocation data includes:
[0041] Determining fitness values of multiple population individuals according to the merged population;
[0042] Determining a fitness change rate according to the fitness values of the plurality of population individuals;
[0043] The fitness change rate is compared with a preset threshold value, and when the fitness change rate is less than the preset threshold value, the optimal individual of the merged population is output to obtain resource allocation data.
[0044] An embodiment of the present invention further 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 the edge computing node;
[0046] a processing module configured to obtain, based on the total number of IoT mobile devices, an initial device population to be used for allocating computing tasks, the initial device population comprising a plurality of device population individuals; sort the initial device population according to the current number of computing tasks to obtain a sorted device population; dynamically select the sorted device population based on weight vectors of the plurality of device population individuals to obtain a target device individual subset; and obtain a device candidate solution set based on the target device individual subset and the sorted device population;
[0047] A determination module is used to determine computing resource allocation data according to the target device individual subset and the device candidate solution set.
[0048] An embodiment of the present invention further provides a computing device, comprising: a processor and a memory storing a computer program, wherein the computer program executes the above method when executed by the processor.
[0049] An embodiment of the present invention further provides a computer-readable storage medium storing instructions, which, when executed on a computer, enable the computer to execute the above method.
[0050] The technical solution of the present invention includes at least the following effects:
[0051] The above-mentioned scheme of the present invention obtains the total number of IoT mobile devices and the current number of computing tasks performed by the edge computing node; 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 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 device candidate solution set is obtained; based on the target device individual subset and the device candidate 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. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 This is a flow chart of a method for allocating mobile edge computing resources for the Internet of Things provided by an embodiment of the present invention;
[0053] Figure 2 This is a structural diagram of an IoT mobile edge computing resource allocation device provided by an embodiment of the present invention;
[0054] Figure 3 It is a structural diagram of a computing device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[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 the edge computing node;
[0058] Step 12: obtaining 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 a plurality of device population individuals;
[0059] Step 13: sorting the initial device population according to the current number of computing tasks to obtain a sorted device population;
[0060] Step 14: dynamically selecting the sorted device populations based on the weight vectors of the multiple device population individuals to obtain a target device individual subset;
[0061] Step 15: obtaining a candidate device solution set based on the target device individual subset and the sorted device population;
[0062] Step 16: Determine computing resource allocation data based on the target device individual 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 calculation, the task parameters that each IoT mobile device needs to process, such as the data volume of the calculation task and the calculation cycle requirement, and the hardware parameters of the IoT mobile device, such as the computing power of the IoT mobile device.
[0064] In step 12, an initial device population is generated based on the total number of IoT mobile devices. This initial device population contains multiple device population individuals, each of which represents a possible resource allocation solution. In the context of IoT mobile edge computing, each individual can be viewed as a combined resource allocation and task offloading strategy, including which tasks should be processed locally, which tasks should be offloaded to MEC nodes, and the corresponding resource allocation ratios.
[0065] In step 13, each individual in the initial device population is evaluated using the collected computing task parameters and IoT mobile device hardware parameters. The evaluation indicators 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 a ranked population and a 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 used 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 are more likely to be selected, which helps maintain population diversity and avoids premature convergence to a local optimal solution. At the same time, to balance exploration and exploitation, the selection pressure (i.e., the relative probability of high-fitness individuals participating in recombination) can be dynamically adjusted, initially set low to promote extensive exploration and then gradually increased to focus on promising 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 to generate a new set of candidate solutions through genetic operations such as crossover and mutation. This step aims to explore new areas in the solution space through genetic operations and find potentially better resource allocation solutions. The candidate solution set includes a variety of optimized and improved resource allocation and task offloading strategies.
[0068] In step 16, the optimal resource allocation data is extracted based on the information in the excellent individual subset and the candidate solution set. This includes determining which computing tasks each IoT mobile device should process, which computing tasks should be offloaded to the MEC node, and the corresponding resource allocation ratios, such as transmit power and computing resource ratios. These 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: , get the local IoT mobile device computing resource allocation ratio vector, where, Allocate a proportional vector for local computing device resources, is the local resource allocation ratio of the nth computing task, , N is the total number of devices, and ;
[0072] Step 122, according to: , get the edge node computing resource allocation ratio vector, where, Compute resource allocation ratio vectors for edge nodes, Calculate the resource allocation ratio for the edge node of the nth computing task, and ;
[0073] Step 123, according to: , get the transmission power vector of the IoT mobile device, where, is the transmit power vector, is the transmission power of the nth IoT mobile device, and ;
[0074] Step 124, according to: , get the computing task division ratio vector of the local IoT mobile device, where Split the proportional vector for the computational tasks of the local IoT mobile device, is the proportion of the nth computing task processed locally on the IoT mobile device, and ;
[0075] Step 125: randomly generate a plurality of population individuals, each population individual including the local IoT mobile device computing resource allocation ratio vector, the edge node computing resource allocation ratio vector, the transmit power vector, and the computing task partitioning ratio vector of the local IoT mobile device;
[0076] Step 126 : Integrate the plurality of 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 ratio of computing resources allocated to the nth computing task on the local IoT mobile device. This ratio satisfies the constraints: , which 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% (complete local processing). This vector is used to quantify the allocation of each computing task on local computing resources.
[0078] In step 122, the edge computing resource allocation ratio vector is then constructed: ; where each element 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 the edge computing node by all tasks cannot exceed 1, that is, the constraint condition is met: This vector represents the allocation of each task on edge computing resources and is used to balance local and edge computing resources.
[0079] In step 123, a transmit power vector is constructed: ; where each element Represents the transmission power of the nth IoT mobile device when sending task data to the edge computing node; Transmission power is an important parameter in wireless communication, which directly affects the rate and reliability of data transmission; Based on actual needs and device capabilities, the transmission power of each IoT mobile device is set to a positive value ( ) to ensure that data can be effectively transmitted to edge computing nodes;
[0080] In step 124, the local task split ratio vector is constructed: ; where each element Represents the proportion of the nth task processed locally; similar to the local computing resource allocation ratio, this ratio also meets the constraints: , but the local task split ratio vector focuses more on describing the specific part of the task executed locally rather than resource allocation; by adjusting , which allows for flexible control over how tasks are split between local and edge computing nodes;
[0081] In step 125, after obtaining the above four vectors, multiple population individuals are randomly generated; each population individual contains the above four vectors, namely the local computing resource allocation ratio vector, the edge computing resource allocation ratio vector, the transmit power vector, and the local task split ratio vector. These individuals represent different resource allocation and task offloading strategies;
[0082] In step 126, the randomly generated multiple population individuals 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 a rich set of 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] Get the fitness value of the individual in the initial device population, where For the The fitness values of individuals in the initial device population, , is the total number of individuals in the initial device population; 、 and To calculate the task parameters, For the The number of computing cycles required for a computing task, For the The amount of data that needs to be processed by a computing task, For the The transmission rate from an IoT mobile device to a mobile edge node; and The hardware parameters of IoT mobile devices, is the local maximum computing frequency of IoT mobile devices, is the maximum computation frequency of the mobile edge node; For the The first individual of the initial device population The ratio of edge node computing resources allocated to each computing task; For the The first individual of the initial device population The local resource allocation ratio of each computing task; For the The first individual of the initial device population The proportion of computing tasks processed locally on IoT mobile devices;
[0087] Step 132 : sorting the initial device population according to the ascending order of the fitness values to obtain a sorted device population.
[0088] In step 131 of this embodiment, first, according to the given fitness function formula:
[0089] (1)
[0090] Calculate the fitness value of each individual in the initial device population. This fitness function comprehensively considers the task processing time on the local and edge computing nodes, as well as the data transmission time. The fitness value of each individual is obtained through weighted summation to measure its performance.
[0091] In step 132, the individuals in the initial device population are sorted in ascending order according to the fitness values calculated in the previous step; in the sorted population, individuals with smaller fitness values are placed in front, indicating that their performance is better.
[0092] In an optional embodiment of the present invention, step 14 may include:
[0093] Step 141, according to:
[0094] ;
[0095] Get the ranking weight coefficients of multiple device population individuals, where: For the The ranking weight coefficient of each device population individual, For the Ranking of individuals in the device population; is the selection pressure, and , ;
[0096] Step 142: integrating the ranking weight coefficients of the plurality of device population individuals to obtain a weight vector;
[0097] Step 143 , converting the ranking weight coefficients of the multiple device population individuals in the weight vector to obtain a selection probability vector;
[0098] Step 144, determining a plurality of sector intervals according to the selection probability vector;
[0099] Step 145, randomly selecting the multiple sector intervals to obtain multiple individuals;
[0100] Step 146 : performing integration processing on the multiple individuals to obtain a target device individual subset.
[0101] In step 141 of this embodiment, according to the ranking weight coefficient formula:
[0102] (2)
[0103] Calculate the ranking weight coefficient of each population individual; where, represents the ranking weight coefficient of the mth population individual, is the ranking of the mth individual in the population, is the selected pressure, its initial value , the subsequent values are calculated by the recursive formula: Calculated; selection pressure It is a dynamically adjusted parameter used to control the relative probability of high-fitness individuals in the subsequent selection process. Setting a low selection pressure in the early stage helps maintain the diversity of the population and avoids premature convergence to the local optimal solution. As the iteration proceeds, the selection pressure is gradually increased to focus on the potential solution space.
[0104] In step 142, the ranking weight coefficients of the multiple population individuals 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 and provides a basis for dynamic selection operations. Through the weight vector, the algorithm can more reasonably select excellent individuals for genetic operations, thereby gradually optimizing the resource allocation plan.
[0105] In step 143, these weight coefficients are converted into selection probabilities. The specific method is 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: , then the selection probability is: ;
[0107] (2) Generate selection probability vector: Finally, we get the vector: ,in It represents the probability of the mth individual being selected. The higher the weight of the individual, the greater the corresponding selection probability, which reflects 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 of which corresponds to an individual; starting from the first individual, the cumulative probability is calculated in sequence: 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 fan-shaped interval; for example, the first individual corresponds to the interval [0, 0.3), the second corresponds to [0.3, 0.8), and the third corresponds 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 through a 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 falls. For example, if r = 0.45, 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, and the same individual is allowed to be selected multiple times (i.e., "sampling with replacement") to maintain population diversity.
[0110] In step 146, the randomly selected multiple 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 excellent genes. The subset size 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 giving priority to high-weight individuals until the scale requirements are 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, calculating statistical characteristics of the target device individual subset to obtain a statistical parameter matrix;
[0113] Step 152, obtaining the optimal individual of the sorted population;
[0114] Step 153: Determine a 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 are first extracted for each individual in the excellent individual subset, including: edge computing resource allocation ratio (Ratio of edge computing resources for the nth task of the mth individual), local computing resource allocation ratio (the proportion of local computing resources for the nth task of the mth individual), the proportion of local processing 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, minimum 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 (such as 、 、 ), columns correspond to different tasks or resource dimensions; each element represents the statistical characteristics of the parameter in the subset, such as the mean reflects the central trend of resource allocation, and the variance reflects the 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 a benchmark for generating candidate solutions. The specific process includes:
[0117] (1) According to the sorting result of step 132, the population has been sorted in ascending order of fitness value, and the individual with the smallest fitness value is the optimal individual (i.e., the one with the best performance);
[0118] (2) The first individual in the sorted population is selected as the optimal individual, and its resource allocation scheme is recorded as: (n is the task number);
[0119] The optimal individual reflects the optimal resource allocation pattern in the current population. Using it as the benchmark for generating candidate solutions can ensure that the candidate solutions at least inherit the core features of the local optimal solution and avoid the search direction deviating from the high-quality solution space.
[0120] In step 153, by integrating the global advantages of the best individual and the statistical characteristics of the excellent subset, a candidate solution set with both diversity and adaptability is generated. The specific process includes: As the center, generate T new solutions according to Gaussian distribution:
[0121] (3)
[0122] in, is the proportion of local computing resources for the nth new solution; is the ratio of edge computing resources for the nth new solution; is the transmission power of the nth new solution; is the probability of local processing of the nth new solution; is the proportion of local computing resources of the optimal individual; is the ratio of edge computing resources of the optimal individual; is the transmission power of the optimal individual; The probability of local processing for the optimal individual; 、 、 、 are all Gaussian distributed, representing the random perturbation source of the new solution, where 、 、 、 is the variance corresponding to each variable;
[0123] Constraints include:
[0124] (1) If , then set ;like , then set ;
[0125] (2) ;
[0126] (3) ;
[0127] (4) ;
[0128] Finally, we get a new set of candidate solutions: ;
[0129] In an optional embodiment of the present invention, step 16 may include:
[0130] Step 161: Merge the target device individual subset and the device candidate solution set to obtain a merged population;
[0131] Step 162, determining the fitness values of multiple population individuals based on the merged population;
[0132] Step 163: determining a fitness change rate according to the fitness values of the plurality of individuals in the population;
[0133] Step 164 : Compare the fitness change rate with a preset threshold value. When the fitness change rate is less than the preset threshold value, output the optimal individual of the merged population to obtain resource allocation data.
[0134] In step 161 of this embodiment, the excellent individual subset (the set of individuals with higher fitness generated in step 14) and the candidate solution set (the set of solutions with both diversity and local optimal characteristics generated in step 15) are merged to form a mixed population containing two types of individuals; when merging, it is necessary to ensure that there are no duplicate individuals. If there are duplicates, one copy can be retained or a better one can be selected based on the fitness value to avoid wasting computing resources; the size of the merged population can be set to a fixed value, such as 1.5 times the original population size, 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 removing redundant solutions based on cluster analysis.
[0136] In step 162, the fitness values of multiple population individuals are calculated using formula (1);
[0137] In step 163, the optimal fitness value of the merged population under the current iteration number t is recorded and the optimal fitness value of the previous generation ;according to:
[0138] (4)
[0139] Calculate the fitness change rate;
[0140] In step 164, at the maximum number of iterations: hour( can be preset to 100), or ( Can be preset to ), 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 a method for allocating mobile edge computing resources for the Internet of Things provided by an embodiment of the present invention is as follows:
[0142] Step 1: Obtain the total number of IoT mobile devices, computing 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) Calculate cycle requirements ( ): the number of computing 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 division ratio ( ): The proportion of tasks processed locally (the initial value needs to be set);
[0148] (3) Hardware parameters include:
[0149] 1) Device side: Maximum computing power ;
[0150] 2) MEC: Maximum computing power , Maximum transmit power ;
[0151] 3) System Constraints: 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 plan, which is encoded as a combination of decision variables and can be expressed as:
[0154] ;
[0155] Randomly generate solutions that satisfy the constraints, such as 、 、 、 ;
[0156] Step 3: Evaluation and sorting.
[0157] For each individual, substitute the objective function to calculate the total task processing time:
[0158] ;
[0159] Arrange the population in ascending order of fitness (minimum time is 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 weights are used to adjust the selection pressure (to avoid premature convergence).
[0162] Step 4: Dynamic selection processing.
[0163] Based on the weight vector, excellent individuals are selected according to probability, that is, individuals with high weights have a high probability of being selected; dynamic selection pressure ; Initial stage, Lower (0.5), expand the search range; in the later iteration, Gradually increase and focus on the local optimal solution; obtain a subset of excellent individuals, that is, the individuals in the top 20% to 30% of fitness.
[0164] Step 5: Generate candidate solution sets.
[0165] Extract all variables of the excellent individual subset, calculate the mean and standard deviation of each variable in the excellent individual subset, and take the local computing resource ratio and transmission power as an example (other variables Similarly):
[0166] , ;
[0167] , ;
[0168] The optimal solution individual As the center, generate T new solutions according to Gaussian distribution;
[0169]
[0170] Constraints include:
[0171] (1) If , then set ;like , then set ;
[0172] (2) ;
[0173] (3) ;
[0174] (4) ;
[0175] Finally, we get a new set of candidate solutions: ;
[0176] Step 6: Output resource allocation data.
[0177] Merge the two types of individuals directly 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 we continue to iterate, Pass to step 3 for the next round of evaluation; if terminated, output the global optimal solution individual ; Each element in the optimal solution individual is the optimal resource allocation plan.
[0182] The proposed method for allocating IoT mobile edge computing resources 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) Utilize the statistical characteristics of the population to dynamically generate new solutions, combined with a gradually enhanced selection pressure mechanism to avoid premature convergence of the algorithm and efficiently solve non-convex optimization problems;
[0184] (2) Jointly optimize the task split ratio, device transmission power, local computing resources, and edge resource allocation to achieve the global optimal objective function and minimize the total task processing time;
[0185] (3) Dynamic task partitioning through local processing combined with edge offloading replaces the complete offloading solution, significantly reducing transmission delay and packet loss rate, and avoiding the risk of network congestion;
[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, an embodiment of the present invention further provides an IoT mobile edge computing resource allocation device 20, comprising:
[0188] An acquisition module 21 is used to obtain the total number of IoT mobile devices and the number of current computing tasks performed by the edge computing node;
[0189] Processing module 22 is configured to obtain, based on the total number of IoT mobile devices, an initial device population to be used for allocating computing tasks, the initial device population comprising a plurality of device population individuals; sort the initial device population according to the current number of computing tasks to obtain a sorted device population; dynamically select the sorted device population based on weight vectors of the plurality of device population individuals to obtain a target device individual subset; and obtain a device candidate solution set based on the target device individual subset and the sorted device population.
[0190] The determination module 23 is configured to determine computing resource allocation data according to the target device individual subset and the device candidate solution set.
[0191] Optionally, the processing module 22 is specifically configured to:
[0192] according to: , get the local IoT mobile device computing resource allocation ratio vector, where, Allocate a proportional vector for local computing device resources, For the The local resource allocation ratio of each computing task, , is the total number of devices, and ;
[0193] according to: , get the edge node computing resource allocation ratio vector, where, Compute resource allocation ratio vectors for edge nodes, For the The edge node computing resource allocation ratio of each computing task, and ;
[0194] according to: , get the transmission power vector of the IoT mobile device, where, is the transmit power vector, For the The transmit power of each IoT mobile device, and ;
[0195] according to: , get the computing task division ratio vector of the local IoT mobile device, where Split the proportional vector for the computational tasks of the local IoT mobile device, For the The proportion of computing tasks processed locally on IoT mobile devices, and ;
[0196] Randomly generate a plurality of population individuals, each population individual including the local IoT mobile device computing resource allocation ratio vector, the edge node computing resource allocation ratio vector, the transmit power vector, and the computing task partitioning ratio vector of the local IoT mobile device;
[0197] The plurality of population individuals are integrated to obtain an initial device population that can be used to allocate computing tasks.
[0198] Optionally, the processing module 22 is further configured to:
[0199] according to:
[0200] ;
[0201] Get the fitness value of the individual in the initial device population, where For the The fitness values of individuals in the initial device population, , is the total number of individuals in the initial device population; 、 and To calculate the task parameters, For the The number of computing cycles required for a computing task, For the The amount of data that needs to be processed by a computing task, For the The transmission rate from an IoT mobile device to a mobile edge node; and The hardware parameters of IoT mobile devices, is the local maximum computing frequency of IoT mobile devices, is the maximum computation frequency of the mobile edge node; For the The first individual of the initial device population The ratio of edge node computing resources allocated to each computing task; For the The first individual of the initial device population The local resource allocation ratio of each computing task; For the The first individual of the initial device population The proportion of computing tasks processed locally on IoT mobile devices;
[0202] The initial device population is sorted in ascending order of the fitness values to obtain a sorted device population.
[0203] Optionally, the processing module 22 is further specifically configured to:
[0204] according to:
[0205] ;
[0206] Get the ranking weight coefficients of multiple device population individuals, where: For the The ranking weight coefficient of each device population individual, For the Ranking of individuals in the device population; is the selection pressure, and , ;
[0207] Integrating the ranking weight coefficients of the plurality of device population individuals to obtain a weight vector;
[0208] Converting the ranking weight coefficients of the plurality of device population individuals in the weight vector to obtain a selection probability vector;
[0209] Determining a plurality of sector intervals according to the selection probability vector;
[0210] Randomly selecting the multiple sector intervals to obtain multiple individuals;
[0211] The multiple individuals are integrated to obtain a target device individual subset.
[0212] Optionally, the processing module 22 is further specifically configured to:
[0213] Calculating statistical characteristics of the target device individual subset to obtain a statistical parameter matrix;
[0214] Obtain the optimal individual of the sorted population;
[0215] A candidate solution set is determined according to the optimal individual and the statistical parameter matrix.
[0216] Optionally, the determining module 23 is specifically configured to:
[0217] Merging the target device individual subset and the device candidate solution set to obtain a merged population;
[0218] An iterative judgment process is performed on the merged population to obtain resource allocation data.
[0219] Optionally, performing iterative judgment processing on the merged population to obtain resource allocation data includes:
[0220] Determining fitness values of multiple population individuals according to the merged population;
[0221] Determining a fitness change rate according to the fitness values of the plurality of population individuals;
[0222] The fitness change rate is compared with a preset threshold value, and when the fitness change rate is less than the preset threshold value, 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, and all implementation methods in the above method embodiment are applicable to this embodiment and can achieve the same technical effect.
[0224] like Figure 3 As shown, an embodiment of the present invention further provides a computing device 30, including a processor 31, a memory 32, and a program or instruction stored in the memory 32 and executable on the processor 31. When the program or instruction is executed by the processor 31, each process of the above-mentioned embodiment of the method for allocating resources of the mobile edge computing of the Internet of Things is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here. It should be noted that the computing device in the embodiment of the present invention includes the above-mentioned mobile electronic device and non-mobile electronic device.
[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 clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0227] In the embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interface, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0228] The units described as separate components may or may not be physically separate, and 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 these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0229] 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.
[0230] If the 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 the present invention, or the portion 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, stored in a storage medium, includes instructions for causing a computer device (such as a personal computer, server, or network device) to execute all or part of the steps of the various embodiments of the method of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.
[0231] In addition, it should be pointed out that in the apparatus and method of the present invention, it is obvious that each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent solutions of the present invention. Moreover, the steps of performing the above-mentioned series of processing can naturally be performed in chronological order according to the order of description, but they do not necessarily need to be performed in chronological order, and some steps can be performed in parallel or independently of each other. For those of ordinary skill in the art, it can be understood that all or any steps or components of the method and apparatus of the present invention can be implemented in hardware, firmware, software or a combination thereof in any computing device (including a processor, storage medium, etc.) or a network of computing devices. This can be achieved by those of ordinary skill in the art using their basic programming skills after reading the description of the present invention.
[0232] Therefore, the purpose of the present invention can also be achieved by running a program or a group of programs on any computing device. The computing device can be a well-known general-purpose device. Therefore, the purpose of the present invention can also be achieved simply by providing a program product containing program code for implementing the method or device. That is to say, 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 well-known storage medium or any storage medium developed in the future. It should also be pointed out that in the device and method of the present invention, it is obvious that each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present invention. In addition, the steps of performing the above-mentioned series of processing can naturally be performed in chronological order according to the order of description, but do not necessarily need to be performed in chronological order. Certain steps can be performed in parallel or independently of each other.
[0233] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for allocating mobile edge computing resources for the Internet of Things, characterized in that: include: Get the total number of IoT mobile devices and the number of current computing tasks performed by edge computing nodes; Obtaining 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 a plurality of device population individuals; Sorting the initial device population according to the number of current computing tasks to obtain a sorted device population; Dynamically selecting the sorted device populations according to the weight vectors of the multiple device population individuals to obtain a target device individual subset; Obtaining a device candidate solution set according to the target device individual subset and the sorted device population; Computing resource allocation data is determined based on the target device individual subset and the device candidate solution set.
2. The method for allocating mobile edge computing resources for the Internet of Things according to claim 1, wherein: According to the total number of IoT mobile devices, an initial device population that can be used to allocate computing tasks is obtained, including: according to: , get the local IoT mobile device computing resource allocation ratio vector, where, Allocate a ratio vector for local computing device resources, For the The local resource allocation ratio of each computing task, , is the total number of devices, and ; according to: , get the edge node computing resource allocation ratio vector, where, Compute resource allocation ratio vectors for edge nodes, For the The edge node computing resource allocation ratio of each computing task, and ; according to: , get the transmission power vector of the IoT mobile device, where, is the transmit power vector, For the The transmit power of each IoT mobile device, and ; according to: , get the computing task division ratio vector of the local IoT mobile device, where Split the proportional vector for the computational tasks of the local IoT mobile device, For the The proportion of computing tasks processed locally on IoT mobile devices, and ; Randomly generate a plurality of population individuals, each population individual including the local IoT mobile device computing resource allocation ratio vector, the edge node computing resource allocation ratio vector, the transmit power vector, and the computing task partitioning ratio vector of the local IoT mobile device; The plurality of population individuals are integrated to obtain an initial device population that can be used to allocate computing tasks.
3. The method for allocating mobile edge computing resources for the Internet of Things according to claim 2, wherein: Sorting the initial device population according to the current number of computing tasks to obtain a sorted device population includes: according to: ; Get the fitness value of the individual in the initial device population, where For the The fitness values of individuals in the initial device population, , is the total number of individuals in the initial device population; 、 and To calculate the task parameters, For the The number of computing cycles required for a computing task, For the The amount of data that needs to be processed by a computing task, For the The transmission rate from an IoT mobile device to a mobile edge node; and The hardware parameters of IoT mobile devices, is the local maximum computing frequency of the IoT mobile device, is the maximum computation frequency of the mobile edge node; For the The first individual of the initial device population The ratio of edge node computing resources allocated to each computing task; For the The first individual of the initial device population The local resource allocation ratio of each computing task; For the The first individual of the initial device population The proportion of computing tasks processed locally on IoT mobile devices; The initial device population is sorted in ascending order of the fitness values to obtain a sorted device population.
4. The method for allocating mobile edge computing resources for the Internet of Things according to claim 1, wherein: According to the weight vectors of the plurality of device population individuals, a dynamic selection process is performed on the sorted device population to obtain a target device individual subset, including: according to: ; Get the ranking weight coefficients of multiple device population individuals, where: For the The ranking weight coefficient of each device population individual, For the Ranking of individuals in the device population; is the selection pressure, and , ; Integrating the ranking weight coefficients of the plurality of device population individuals to obtain a weight vector; Converting the ranking weight coefficients of the plurality of device population individuals in the weight vector to obtain a selection probability vector; Determining a plurality of sector intervals according to the selection probability vector; Randomly selecting the multiple sector intervals to obtain multiple individuals; The multiple individuals are integrated to obtain a target device individual subset.
5. The method for allocating mobile edge computing resources for the Internet of Things according to claim 1, wherein: According to the target device individual subset and the sorted device population, a device candidate solution set is obtained, including: Calculating statistical characteristics of the target device individual subset to obtain a statistical parameter matrix; Obtain the optimal individual of the sorted population; A candidate solution set is determined according to the optimal individual and the statistical parameter matrix.
6. The method for allocating mobile edge computing resources for the Internet of Things according to claim 5, characterized in that: Determining computing resource allocation data based on the target device individual subset and the device candidate solution set includes: Merging the target device individual subset and the device candidate solution set to obtain a merged population; An iterative judgment process is performed on the merged population to obtain resource allocation data.
7. The method for allocating mobile edge computing resources for the Internet of Things according to claim 6, wherein: Performing iterative judgment processing on the merged population to obtain resource allocation data, including: Determining fitness values of multiple population individuals according to the merged population; Determining a fitness change rate according to the fitness values of the plurality of population individuals; The fitness change rate is compared with a preset threshold value, and when the fitness change rate is less than the preset threshold value, the optimal individual of the merged population is output to obtain resource allocation data.
8. An 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 the edge computing node; a processing module configured to obtain, based on the total number of IoT mobile devices, an initial device population to which computing tasks can be allocated, the initial device population comprising a plurality of 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 the sorted device population according to weight vectors of the plurality of device population individuals to obtain a target device individual subset; Obtaining a device candidate solution set according to the target device individual subset and the sorted device population; A determination module is used to determine computing resource allocation data according to the target device individual subset and the device candidate solution set.
9. A computing device, characterized in that include: A processor and a memory storing a computer program, wherein when the computer program is executed by the processor, the method according to any one of claims 1 to 7 is performed.
10. A computer-readable storage medium, characterized in that The device stores instructions, which, when executed on a computer, enable the computer to execute the method according to any one of claims 1 to 7.
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
Task unloading method for multi-user multi-server parallel computing in mobile edge computing
CN117389730A