MEC resource allocation method based on large language model driving and multi-strategy heuristic
By employing a multi-strategy heuristic approach driven by a large language model and combining it with multi-objective mixed integer programming to optimize resource allocation, the problem of high computational complexity and local optima traps in 5G mobile edge computing networks is solved. This achieves efficient and intelligent resource allocation, improving network response speed and resource utilization efficiency.
Patent Information
- Application Number
- CN202511984774.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-26
- Publication Date
- 2026-04-24
AI Technical Summary
Existing 5G mobile edge computing network resource allocation schemes face problems such as high computational complexity, local optimum traps, limited generalization ability, and uninterpretable decision-making, making it difficult to achieve a relatively balanced resource allocation. This leads to mutual constraints and compromises in the multi-objective optimization process.
A two-layer architecture based on large language model-driven and multi-strategy heuristic is adopted. By leveraging the contextual understanding and logical reasoning capabilities of the large language model and combining whale optimization, sine-cosine optimization, and simulated annealing algorithms, a multi-objective mixed integer nonlinear programming problem is constructed. Resource allocation is optimized through the exponential weighted moving average method, realizing the collaborative optimization of high-level strategy scheduling and low-level operators.
It significantly improves the search efficiency of resource allocation, reduces the number of iterations, lowers the average service latency of the system, enhances resource utilization efficiency, and achieves highly intelligent and responsive network optimization.
Smart Images

Figure CN121924535A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of 5G mobile edge computing and network resource management technology, specifically involving a MEC resource allocation method based on large language model-driven and multi-strategy heuristic. Background Technology
[0002] In recent years, with the full commercialization of 5G networks, mobile edge computing has become a crucial infrastructure supporting ultra-low latency and high bandwidth applications, widely serving scenarios such as industrial automation, intelligent manufacturing, and remote equipment operation and maintenance in the Industrial Internet. In the 5G mobile edge cloud environment, a large number of sensing devices, control terminals, and intelligent equipment continuously connect to industrial sites. This, coupled with the rapid growth of latency-sensitive services such as AR / VR and human-machine collaboration, presents the network system with challenges including highly heterogeneous computing resources, significantly different service requirements, and sudden increases in network traffic. This poses a severe challenge to the real-time scheduling and collaborative optimization capabilities of the network architecture. Achieving optimal resource allocation across multiple services and resource dimensions under millisecond-level latency constraints has evolved into a typical NP-hard problem.
[0003] However, existing resource allocation schemes have the following problems:
[0004] (1) When using integer linear programming or mixed-integer nonlinear programming for modeling, the solution time often increases exponentially as the network topology expands and the number of user requests and server nodes grows synchronously, leading to excessive computational complexity and significantly weakening the real-time performance of network regulation. Meanwhile, different heuristic algorithms have inherent search preferences, and a single algorithm is prone to getting trapped in local optima during iteration. Furthermore, traditional heuristic methods struggle to achieve an effective trade-off between global exploration and improving search accuracy within a local range, making them more susceptible to getting trapped in local optima under large-scale concurrent request scenarios. Existing solutions still fall short in balancing service latency optimization and load balancing, making it difficult to achieve a relatively balanced resource allocation, resulting in mutual constraints and trade-offs during multi-objective optimization.
[0005] (2) When using DRL to solve resource allocation problems, algorithms such as DQN or PPO are usually used to drive the agent to learn decision-making strategies through trial and error with a large number of interactions with the environment. However, such models often require millions of interaction training sessions to converge, and when there are slight changes in the network topology, such as the addition of new base stations, the generalization ability of the existing strategies is limited, and retraining is usually required. In addition, the black-box nature of DRL makes its decisions lack interpretability, and poor decisions may be made in the early exploration phase of training, causing performance fluctuations and affecting network stability. Summary of the Invention
[0006] This invention proposes a 5GMEC resource allocation method based on large language model-driven and multi-strategy hyperheuristic approach. The core of this method is to construct a two-layer architecture of "large model decision center" and "bottom-level heuristic algorithm". By utilizing the powerful contextual understanding and logical reasoning capabilities of LLM, the method can perceive the current optimization state and intelligently select the most suitable bottom-level algorithm to iteratively update the solution space.
[0007] A resource allocation method for MEC based on large language model-driven and multi-strategy heuristics includes the following steps:
[0008] Step 1: The network controller inputs the topology information of the target MEC network, including the server set S, the edge link set E, and their bandwidth capacity, and captures the user request set R(t) within the current time slice in real time. Each request r k This includes computational workload, data size, and latency tolerance; it also involves constructing an initial population of resource allocation schemes, where each solution vector represents a server matching and path routing strategy.
[0009] Step 2: In each iteration of the algorithm, firstly, feature extraction is performed on the current population state; then, the objective function values of all solutions in the current population are calculated, and the optimal fitness value F is extracted. best The average fitness value and fitness variance are recorded, and the number of algebras in which the optimal solution has not been updated is recorded. These numerical features are serialized into natural language prompt words as context input for the large model.
[0010] Step 3: Construct a large language model decision agent. Its input is the prompt words generated in Step 2, and its output is the name of the best heuristic algorithm to be used in the current iteration step. The model analyzes the semantics of the state through an attention mechanism. If it is determined that the population is in the early stage of exploration, it tends to output the SCORM (Sine and Cosine Reduction) algorithm instruction to traverse the solution space. If it is determined that the population is trapped in a local optimum, it outputs the SA (Simulated Annealing) algorithm instruction to introduce perturbation. If it is determined that the population has locked the potential region, it outputs the WORM (Whale Optimization) algorithm instruction to accelerate convergence.
[0011] Step 4: Input the real-time state data of the current optimization process into the large language model deployed in Step 3. After model inference, directly output the most suitable heuristic algorithm instruction; according to this instruction, the network controller schedules the corresponding mathematical module to update the current resource allocation scheme population, completes high-level policy scheduling, and calculates the current optimal fitness as a performance indicator;
[0012] Step 5: Based on the search strategy determined in Step 4, define the structure of each solution vector in the solution space, and then determine the boundaries of all available computing and bandwidth resources for the entire network; use the exponentially weighted moving average (EWMA) method to calculate the instantaneous load of the server.
[0013] Step 6: Model this resource allocation problem as a multi-objective mixed integer nonlinear programming problem and corresponding constraints; define the weighted sum of average service latency and load balancing as the overall objective function Z; under the premise of satisfying server capacity and link bandwidth constraints, find a set of optimal server matching and path routing schemes to maximize the overall system performance.
[0014] Step 7: Based on the modeled objective function and constraints, construct the fitness function and introduce a penalty mechanism based on the degree of violation;
[0015] Step 8: Solve this constrained combinatorial optimization problem by updating the population position using the underlying heuristic algorithm selected by the large model. First, the large model outputs algorithm instructions based on the current state. If the instruction is WORM, the encirclement and spiral update mechanism is executed to guide the population to converge quickly towards the optimal region. If the instruction is SCORM, the sine and cosine oscillation mechanism is executed to balance global exploration and local exploitation. If the instruction is SA, the random perturbation and probability acceptance mechanism is executed to give the algorithm the ability to escape local optima. Subsequently, the global optimal solution is updated, and the performance improvement of this iteration is fed back to the context history of the large model as the basis for the next round of decision-making.
[0016] Step 9: Calculate the final system average latency and load balancing variance as performance indicators. Repeat step 8 until the maximum number of iterations is reached or the fitness no longer decreases significantly. Output the final optimal resource allocation scheme. The network controller issues flow table rules and allocates virtual machine resources according to the scheme to complete the real-time optimization configuration of the 5G MEC network.
[0017] Compared with the prior art, the significant advantages of this invention are as follows:
[0018] (1) This invention proposes a large-scale model decision-making mechanism that combines high intelligence and high response speed to address the problem of efficient search of complex solution spaces in mobile edge computing networks. This mechanism directly establishes an intelligent mapping relationship from population state semantics to search strategy selection, avoiding the blind search process caused by the reliance on delayed pheromone accumulation in traditional ant colony algorithms, thereby alleviating the problem of strong randomness and limited convergence speed in the cold start stage. By introducing state-aware Prompt engineering, key information such as fitness stagnation steps, population diversity, and the current optimization stage are used as the basis for high-level decision-making, enabling the large language model to implement differentiated strategy scheduling for different convergence states, forcibly applying physical perturbations to the population trapped in local optima, and performing in-depth development on potential regions. This decision-making mechanism significantly reduces the number of iterations required for the algorithm to achieve stable convergence, improving the overall efficiency of solution space search and providing key technical support for meeting the millisecond-level real-time response requirements of 5G.
[0019] (2) At the execution layer, this invention constructs resource allocation as a multi-objective mixed-integer nonlinear programming problem and employs a multi-strategy heuristic framework composed of WORM, SCORM, and SA for efficient solution. Under the strict constraints of server computing capacity and link bandwidth, it achieves coordinated optimization between minimizing the system's average service latency and load balancing. By fully integrating the mathematical characteristics of the three algorithms in encirclemental convergence, oscillatory search, and physical escape mechanisms, it effectively overcomes the problems of single-element heuristic algorithms easily getting trapped in local optima and the lack of flexibility of traditional numerical optimization methods, achieving a reasonable balance between global exploration capability and local solution accuracy, thus taking into account both the stability of the optimization process and the accuracy of the results. Compared with existing resource allocation strategies, this method can significantly reduce the system's average service latency and effectively reduce the network node load variance, thereby improving the overall resource utilization efficiency.
[0020] (3) This invention addresses the problem of inference bias and high computational cost when large language models directly participate in operations research optimization. It reduces the coupling complexity between high-level semantic reasoning and low-level numerical computation, and constructs an optimized architecture that decouples logical decision-making and mathematical operations, enabling macro-level strategy reasoning of large models to effectively guide the micro-level numerical updates of low-level operators, thus realizing a shift from passive solution to active algorithm navigation. It systematically avoids the unreliability of purely data-driven methods and the lack of adaptability of purely mathematical methods, achieving global optimization of decision intelligence and computational accuracy. This provides a complete solution with empirical advantages for building intelligent and highly reliable next-generation mobile edge computing networks. Attached Figure Description
[0021] Figure 1 This is an overall implementation flowchart of a specific embodiment of the present invention. Detailed Implementation
[0022] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings.
[0023] This invention addresses the limitations of resource allocation in existing 5G mobile edge computing networks, including heterogeneous computing resources, bursty network traffic, and the difficulty of a single optimization strategy balancing exploration and development. It proposes a resource allocation method based on a large language model and a multi-strategy hyperheuristic approach. First, to address the problems of traditional single metaheuristic algorithms easily getting stuck in local optima and having slow convergence speeds when facing high-dimensional solution spaces, and the lack of environmental state awareness in traditional hyperheuristic algorithms, a high-level decision-making mechanism based on a large language model is designed. Utilizing the contextual understanding and logical reasoning capabilities of the large language model, numerical features such as the fitness distribution and stagnation steps of the population are mapped to semantic state representations, thereby achieving dynamic perception and intelligent judgment of the current optimization process. Based on this, optimization operators with global exploration or local development capabilities are adaptively scheduled during the search phase. Broad exploration is strengthened in the early stages of the search or when stagnation occurs, and refined development is adopted after the potential region is identified. This breaks through the limitations of the static iterative strategy of traditional algorithms, achieving adaptive coverage search of the solution space and laying a strategic foundation for subsequent precise resource allocation.
[0024] After intelligent decision-making on optimization strategies through a high-level large model, this embodiment retains algorithms such as whale optimization, sine-cosine optimization, and Henry's Law gas solubility optimization as underlying operators for numerical calculation and iterative updates of specific resource allocation schemes. These algorithms fully leverage their mathematical characteristics under different search modes to update the solution space, thereby avoiding the uncertainty risks and high computational overhead that may be introduced by directly relying on large language models for numerical reasoning. Based on this, a joint optimization framework is constructed that decouples and collaborates the logical reasoning capabilities of the large model with the computational capabilities of heuristic algorithms. This forms a two-layer architecture where the large model is responsible for strategy scheduling and the underlying operators are responsible for specific execution. Under the premise of strictly meeting server computing capacity and link bandwidth constraints, it achieves collaborative optimization of minimizing end-to-end service latency and balancing system load. This architecture effectively alleviates the problem of response lag in single optimization algorithms under sudden traffic scenarios and also solves the problem of infeasible solutions that may arise when large language models directly solve operations research problems, achieving a deep integration of intelligent decision-making and precise computation. At the system architecture level, this invention realizes a closed-loop collaborative mechanism between high-level semantic decision-making and low-level numerical optimization, breaking down the barriers between intelligent decision-making and mathematical computation in traditional research, and constructing a deeply coupled hyperheuristic optimization framework, so that the policy reasoning ability of large language models can effectively serve the overall goal of improving network service quality.
[0025] like Figure 1 As shown, this embodiment proposes a 5G MEC resource allocation method based on large language model-driven and multi-strategy hyperheuristic approach. The specific steps are as follows:
[0026] Step 1: The network controller inputs the topology information of the target MEC network, including the server set S, the edge link set E, and their bandwidth capacity. Simultaneously, the system captures the user request set R(t) within the current time slice in real time, with each request r... k This includes computational workload, data size, and latency tolerance. Based on this, the system constructs an initial population of resource allocation schemes, where each solution vector represents a server matching and path routing strategy. To quantify service quality, a service latency model for a single request is first defined. This latency is the sum of transmission latency, queuing latency, and execution latency, calculated using the following formula:
[0027]
[0028] in, For data transmission delay, For queuing delays on virtual machines, The task execution delay is calculated, and the parameters (J) after summation and normalization are determined. latency ):
[0029]
[0030] Where S is the set of all edge servers in the MEC network, p and q are servers selected from this set to represent the start and end points of the end-to-end connection; R(t) represents the set of all user requests submitted within time slice t. It is a binary unloading decision variable; a value of 1 indicates a request r. k Ultimately, it is assigned to server q for execution. A value of 0 indicates that it is not assigned to server q. It is also a binary variable that reflects the request reception status; a value of 1 indicates that the request r... k It was indeed received by server p, and taking 0 is the opposite.
[0031] In step 1, the network topology information and user requests are specifically defined as follows: The edge network includes a set of MEC servers S and a set of edge links E. Each user request is defined as a 5-tuple feature vector, including computational workload, number of instructions, data volume, application type of the request, and latency tolerance. At this point, the calculation of service latency not only includes the basic transmission and execution time but also needs to consider the queuing model. Assuming that virtual machine queuing follows the MM1 model, the queuing latency calculation formula is:
[0032]
[0033] in, and These represent the virtual machine's service rate and request arrival rate, respectively.
[0034] Step 2: In each iteration of the algorithm, the system first extracts features from the current population state. It then calculates the objective function values for all solutions in the current population and extracts the optimal fitness value F. best Average fitness value and fitness variance; optimal fitness value (F best The formulas for the maximum fitness of all individuals in the current population and the minimum fitness of the corresponding objective function are as follows:
[0035] F best =max{f1,f2,...,f N}
[0036] f N The fitness value in the Nth iteration; the average fitness value. The average fitness value represents the arithmetic mean of the fitness of all individuals in the current population. The formula for the average fitness value is as follows:
[0037]
[0038] Finally, fitness variance Specifically, it reflects the degree of population diversity, and the calculation formula is:
[0039]
[0040] Simultaneously, the number of consecutive algebras in which the optimal solution has not been updated (i.e., the number of stalled steps) is recorded. These numerical features are serialized into natural language prompts, such as "CurrentDiversity:Low; Stagnation:10 steps", as contextual input to the large model.
[0041] Step 3: Construct a large language model decision agent by inputting an offline expert dataset, performing supervised fine-tuning, constructing a reward function, and performing reinforcement learning alignment to complete the fine-tuning. Its input is the prompt words generated in Step 2, and its output is the name of the best heuristic algorithm to be used in the current iteration. Internally, the model analyzes the semantics of the state through an attention mechanism. If it determines that the population is in the early stages of exploration, it tends to output the SCORM instruction to traverse the solution space; if it determines that the population is trapped in a local optimum, it outputs the SA instruction to introduce perturbation; if it determines that the population has locked onto a potential region, it outputs the WORM instruction to accelerate convergence.
[0042] In step 3, the input prompt design for the large language model includes two dimensions: state description and task instruction. The state description extracts three key numerical features of the current iteration: the current optimal fitness value, the number of fitness stagnation steps (i.e., how many consecutive generations the optimal solution has not been updated), and the population diversity index. The task instruction requires the model to choose one of three strategy directions based on the above state: "fast convergence", "oscillating search", and "breaking out of local optima", and output the corresponding algorithm name (WORM, SCORM, or SA).
[0043] Step 4: Input the real-time state data of the current optimization process into the large language model deployed in Step 3. After model inference, directly output the most suitable heuristic algorithm instruction. Based on this instruction, the network controller schedules the corresponding mathematical module to update the current resource allocation scheme population, completes high-level policy scheduling, and calculates the current optimal fitness as a performance indicator.
[0044] In step 4, if the instruction is WORM (Whale Optimization Algorithm), then the spiral bubble-web hunting behavior of a humpback whale is simulated.
[0045] When using a contraction encirclement mechanism, the Lagrange equation is constructed based on the assumed objective function:
[0046]
[0047] in, For the current optimal solution, E and U are coefficient vectors, t n That is the number of the current iteration.
[0048] The algorithm is based on the position of the current global optimum. The mathematical formula for guiding other individuals to update their positions in a spiral manner is as follows:
[0049]
[0050] Among them, U ' U represents the distance between the solution and the optimal solution. ' v is a random number ' Define the spiral shape.
[0051] If the instruction is SCORM (Sine-Cosine Algorithm), the position update is performed using the mathematical oscillation characteristics of sine and cosine functions. The system generates a random control parameter r4; when r4 ≥ 0.5, the cosine function is used, otherwise the sine function is used. The position update formula is as follows:
[0052]
[0053] Where u1 is the direction parameter that decays with the number of iterations, u2 determines the distance moved, u3 is the target weight, and I i (t ” ) indicates that at the t-th ” In the next iteration, the i-th solution in the population. This mechanism, through the periodic variation of sine and cosine, enables the solution vector to oscillate and search across a wide range in the solution space, effectively balancing exploration and development.
[0054] If the instruction is SA (Simulated Annealing), then physical annealing is executed. The system randomly modifies the server allocation or routing paths of some requests based on the current solution, generating a new solution I. new Calculate the fitness difference ΔE between the new and old solutions. If ΔE < 0, accept the new solution directly; if ΔE ≥ 0, accept the poor solution with a probability of P = exp(-ΔE / T) according to the Metropolis criterion, where the temperature T decreases with iteration. This mechanism gives the algorithm the ability to "tolerate temporary degradation" when trapped in local optima, thus achieving global escape.
[0055] Step 5: Based on the search strategy determined in Step 4, define the structure of each solution vector in the solution space, thereby determining the boundaries of allocable computing and bandwidth resources across the entire network. Simultaneously, to evaluate the balance of resource allocation, calculate the standard deviation of the server's computing load. As a metric, the formula is as follows:
[0056]
[0057] in, The normalized load for server q. The average load of the system This serves as an indicator of the server's operational status. Simultaneously, the standard deviation σ of the network transmission load... net (t) is:
[0058]
[0059] Where E is the set of all edge links in the network; e ij It is a single link connecting nodes i and j; h ij It is a binary variable, representing e. ij Whether it is selected, with a value of 1 for yes; N ij (t) Link-normalized instantaneous network load; λ net (t) is the system's average network load, which is the load of all used links N. ij The arithmetic mean of (t). And we will also use EWMA to handle the link-normalized network load N. ij (t), its formula is:
[0060]
[0061] Where y2 is the EWMA weighting coefficient of network load; The current network load for observation:
[0062]
[0063] Where, ψ i,j (t) refers to link e before routing the current new task. ij The percentage of bandwidth already in use; It is a binary decision variable; if r is requested... k The routing path passes through link e ij If the value is 1, then the value is 1; otherwise, the value is 0. Is it a request r k Data transmission rate on this link; μ i,j Link e ij Total physical bandwidth capacity.
[0064] Based on this, we can define the total load balancing degree J. load :
[0065]
[0066] Among them, M r The current set of all requested application types in the system, such as video processing and VR rendering; |M r The total number of application types requested.
[0067] In step 5, to more accurately reflect the dynamic changes in network load, the Exponentially Weighted Moving Average (EWMA) method is used to calculate the instantaneous load of the server. The specific normalized load update formula is as follows:
[0068]
[0069] Where y1 is the weight parameter, For the current observation load, This represents the estimated load from the previous moment. Similarly, network link load is also smoothed using the same EWMA method, thereby eliminating the impact of instantaneous jitter on the calculation of load balancing metrics.
[0070] Step 6: Model this resource allocation problem as a multi-objective mixed-integer nonlinear programming problem. Define the weighted sum of the system's average service latency and load balancing as the overall objective function Z. Under the constraints of server capacity and link bandwidth, find a set of optimal server matching and path routing schemes to maximize the overall system performance. The objective function is defined as follows:
[0071] Z = α × J latency +(1-α)×J load
[0072] Where α is the weighting parameter, J latency and J load These are the normalized total system delay and total load variance, respectively.
[0073] In step 6, when constructing the objective function, strict resource constraints must be imposed to ensure the feasibility of the solution. These constraints include: each request can only be assigned to one server (not divisible), the total latency of requests must not exceed their tolerance, the computing resources allocated to requests must not exceed the virtual machine capacity, and the total traffic flowing through the links must not exceed the physical bandwidth capacity of the links. These constraints collectively constitute the solution space boundary of the mixed-integer nonlinear programming problem.
[0074] Step 7: Based on the modeled objective function and constraints, construct the fitness function. To amplify the differences in high-quality solutions and accelerate convergence, an exponentially scaled fitness function f is adopted. i The calculation formula is as follows:
[0075]
[0076] Among them, Z i Z is the objective value of the current solution. min and These are the minimum and average values in the current population, respectively.
[0077] In step 7, to address the constraints from step 6, the fitness function design incorporates a penalty mechanism based on the degree of violation. For infeasible solutions that violate constraints, a penalty term is added to the fitness calculation formula:
[0078]
[0079] Where, α j ' For the penalty weight of violating the j-th constraint, n j The binary variable represents whether the constraint is violated; c τ This represents the total number of constraints defined in the optimization problem. If the solution is completely feasible, the penalty term is 0; the more constraints are violated, the larger the penalty value, thus guiding the heuristic algorithm to automatically avoid infeasible regions.
[0080] Step 8: Solve this constrained combinatorial optimization problem, using the underlying heuristic algorithm selected by the large model for population position updates. First, the large model outputs algorithm instructions based on the current state. If the instruction is WORM, the encirclement and spiral update mechanism is executed to guide the population to converge quickly towards the optimal region; if the instruction is SCORM, the sine and cosine oscillation mechanism is executed to balance global exploration and local exploitation; if the instruction is SA, the random perturbation and probability acceptance mechanism is executed, giving the algorithm the ability to escape local optima traps. Subsequently, the global optimal solution is updated, and the performance improvement of this iteration is fed back to the context history of the large model as the basis for the next round of decision-making.
[0081] In step 8, the specific iterative search process, steps 81 to 83, is detailed as follows:
[0082] Step 81: If the large model decision outputs WORM, then execute the encirclement mechanism, utilizing the current optimal solution I. best Guide population position updates, in the formula and This is a vector of convergence coefficients; as the number of iterations increases, The modulus decreases linearly, thus achieving a smooth transition from global exploration to local development.
[0083] in, r1r2 are random variables taking values in [0,1]. A modulus greater than 1 indicates a global search preference, while a modulus between 0 and 1 indicates a local search. The modulus value varies randomly between 0 and 2, which represents avoiding getting trapped in local optima.
[0084] Step 82: If the large model decision outputs SCORM, then the sine and cosine update formulas are switched according to the value of the random number r4. The periodic changes of the sine and cosine functions are used to make the solution oscillate and search around the optimal solution in order to find potential better solutions.
[0085] Step 83: If the large model decision outputs SA, then calculate the difference ΔE between the objective function of the new solution and the current solution. When ΔE>0, the new solution is not discarded directly, but accepted with a probability of exp(-ΔE / T), where the temperature T decays exponentially with the number of iterations. This mechanism ensures that the algorithm has a very high ability to escape local optima in the early stage.
[0086] Step 9: Calculate the final system average latency and load balancing variance as performance indicators. Repeat step 8 until the maximum number of iterations is reached or the fitness no longer decreases significantly. Output the final optimal resource allocation scheme. The network controller issues flow table rules and allocates virtual machine resources according to the scheme to complete the real-time optimization configuration of the 5G MEC network.
[0087] The above description is only a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiments. Any equivalent modifications or changes made by those skilled in the art based on the content disclosed in the present invention should be included within the scope of protection set forth in the claims.
Claims
1. A resource allocation method for MEC based on large language model-driven and multi-strategy heuristics, characterized in that: The method includes the following steps: Step 1: The network controller inputs the topology information of the target MEC network, including the server set S, the edge link set E, and their bandwidth capacity, and captures the user request set R(t) within the current time slice in real time. Each request r k This includes computational workload, data size, and latency tolerance; it also involves constructing an initial population of resource allocation schemes, where each solution vector represents a server matching and path routing strategy. Step 2: In each iteration of the algorithm, firstly, feature extraction is performed on the current population state; then, the objective function values of all solutions in the current population are calculated, and the optimal fitness value F is extracted. best The average fitness value and fitness variance are recorded, and the number of algebras in which the optimal solution has not been updated is recorded. These numerical features are serialized into natural language prompt words as context input for the large model. Step 3: Construct a large language model decision agent. Its input is the prompt words generated in Step 2, and its output is the name of the best heuristic algorithm to be used in the current iteration step. The model analyzes the semantics of the state through an attention mechanism. If it is determined that the population is in the early stage of exploration, it tends to output the SCORM (Sine and Cosine Reduction) algorithm instruction to traverse the solution space. If it is determined that the population is trapped in a local optimum, it outputs the SA (Simulated Annealing) algorithm instruction to introduce perturbation. If it is determined that the population has locked the potential region, it outputs the WORM (Whale Optimization) algorithm instruction to accelerate convergence. Step 4: Input the real-time status data of the current optimization process into the large language model deployed in Step 3; after model inference, directly output the most suitable heuristic algorithm instruction; according to this instruction, the network controller schedules the corresponding mathematical module to update the current resource allocation scheme population, completes high-level policy scheduling, and calculates the current optimal fitness as a performance indicator. Step 5: Based on the search strategy determined in Step 4, define the structure of each solution vector in the solution space, and then determine the boundaries of all available computing and bandwidth resources for the entire network; use the exponentially weighted moving average (EWMA) method to calculate the instantaneous load of the server. Step 6: Model this resource allocation problem as a multi-objective mixed-integer nonlinear programming problem and the corresponding constraints; Define the weighted sum of average service latency and load balancing as the overall objective function Z. Under the premise of satisfying server capacity and link bandwidth constraints, find an optimal set of server matching and path routing schemes to maximize the overall system performance. Step 7: Based on the modeled objective function and constraints, construct the fitness function and introduce a penalty mechanism based on the degree of violation; Step 8: Solve this constrained combinatorial optimization problem by updating the population position using the underlying heuristic algorithm selected by the large model. First, the large model outputs algorithm instructions based on the current state. If the instruction is WORM, the encirclement and spiral update mechanism is executed to guide the population to converge quickly towards the optimal region. If the instruction is SCORM, the sine and cosine oscillation mechanism is executed to balance global exploration and local exploitation. If the instruction is SA, the random perturbation and probability acceptance mechanism is executed to give the algorithm the ability to escape local optima. Subsequently, the global optimal solution is updated, and the performance improvement of this iteration is fed back to the context history of the large model as the basis for the next round of decision-making. Step 9: Calculate the final system average latency and load balancing variance as performance indicators. Repeat step 8 until the maximum number of iterations is reached or the fitness no longer decreases significantly. Output the final optimal resource allocation scheme. The network controller issues flow table rules and allocates virtual machine resources according to the scheme to complete the real-time optimization configuration of the 5G MEC network.
2. The MEC resource allocation method based on large language model-driven and multi-strategy heuristic as described in claim 1, characterized in that: In step 1, the service latency model for a single request is first defined. This latency is composed of the sum of transmission latency, queuing latency, and execution latency, and its calculation formula is as follows: in, For data transmission delay, For queuing delays on virtual machines, Delaying task execution; In the network topology, the edge network consists of a set of MEC servers S and a set of edge links E. Each user request is defined as a 5-tuple feature vector, including computational workload, number of instructions, data volume, application type of the request, and latency tolerance. The calculation of service latency includes basic transmission and execution time and a queuing model. The queuing follows the MM1 model, so the formula for calculating queuing latency is: in, and These represent the virtual machine's service rate and request arrival rate, respectively.
3. The MEC resource allocation method based on large language model-driven and multi-strategy heuristic as described in claim 1, characterized in that: In step 3, the input prompt word Prompt design of the large language model includes two dimensions: state description and task instruction. The state description part extracts three key numerical features of the current iteration: the current optimal fitness value, the fitness stagnation step number, and the population diversity index. The task instruction part requires the model to choose one of the three strategy directions from fast convergence, oscillating search, and escaping local optima based on the above state, and output the corresponding algorithm name WORM, SCORM, or SA.
4. The MEC resource allocation method based on large language model-driven and multi-strategy heuristic as described in claim 1, characterized in that: In step 4, if the instruction is WORM, construct the Lagrange equation based on the assumed objective function: in, For the current optimal solution, E and U are coefficient vectors; The algorithm is based on the position of the current global optimum. The mathematical formula for guiding other individuals to update their positions in a spiral manner is as follows: Among them, U ' U represents the distance between the solution and the optimal solution. ' v is a random number ' Define the spiral shape; If the instruction is SCORM, the position update is performed using the mathematical oscillation characteristics of sine and cosine functions. The system generates a random control parameter r4; when r4 ≥ 0.5, the cosine function is used, and otherwise the sine function is used. The position update formula is as follows: Where u1 is the direction parameter that decays with the number of iterations, u2 determines the distance moved, and u3 is the target weight; this mechanism enables the solution vector to perform a wide-range oscillating search in the solution space through the periodic changes of sine and cosine, effectively balancing exploration and development. If the instruction is SA, then physical annealing is executed; the system randomly changes the server allocation or routing path of some requests based on the current solution, generating a new solution I. new ; Calculate the fitness difference ΔE between the new solution and the old solution; if ΔE < 0, accept the new solution directly; if ΔE ≥ 0, accept the difference solution with a probability of P = exp(-ΔE / T) according to the Metropolis criterion, where the temperature T decreases as the iteration proceeds.
5. The MEC resource allocation method based on large language model-driven and multi-strategy heuristic as described in claim 1, characterized in that: In step 5, the standard deviation of the server's computational load is calculated. As a metric, the formula is as follows: in, The normalized load for server q. The average load of the system This serves as an indicator of the server's running status. The normalized load update formula is: Where y1 is the weight parameter, For the current observation load, The estimated load is from the previous moment; the same EWMA method is used to smooth the network link load, thereby eliminating the impact of instantaneous jitter on the calculation of load balancing metrics.
6. The MEC resource allocation method based on large language model-driven and multi-strategy heuristic as described in claim 1, characterized in that: In step 6, the objective function is defined as follows: Z=α×J latency +(1-α)×J load Where α is the weighting parameter, J latency and J load These are the normalized system total delay and total load variance, respectively; The constraints include: each request can only be assigned to one server, the total latency of the requests must not exceed their tolerance, the computing resources allocated to the requests must not exceed the virtual machine capacity, and the total traffic flowing through the link must not exceed the physical bandwidth capacity of the link.
7. The MEC resource allocation method based on large language model-driven and multi-strategy heuristic as described in claim 1, characterized in that: In step 7, to amplify the differences in high-quality solutions and accelerate convergence, an exponentially scaled fitness function f is used. i The calculation formula is as follows: Among them, Z i Z is the objective value of the current solution. min and These are the minimum and average values in the current population, respectively. To handle constraints, the fitness function design incorporates a penalty mechanism based on the degree of violation; for infeasible solutions that violate constraints, a penalty term is added to the fitness calculation formula: Where, α j ' For the penalty weight of violating the j-th constraint, n j The binary variable represents whether the constraint is violated; if the solution is completely feasible, the penalty term is 0; the more constraints are violated, the larger the penalty value.
8. The MEC resource allocation method based on large language model-driven and multi-strategy heuristic as described in claim 1, characterized in that: In step 8, the specific iterative search process, steps 81 to 83, is detailed as follows: Step 81: If the large model decision outputs WORM, then execute the encirclement mechanism, utilizing the current optimal solution I. best Guide population position updates, in the formula and This is a vector of convergence coefficients; as the number of iterations increases, The modulus decreases linearly, thus achieving a smooth transition from global exploration to local development; Step 82: If the large model decision outputs SCORM, then switch between sine and cosine update formulas according to the value of the random number r4. By utilizing the periodic changes of the sine and cosine functions, the solution will oscillate and search around the optimal solution to discover potential better solutions. Step 83: If the large model decision outputs SA, then calculate the difference ΔE between the objective function of the new solution and the current solution. When ΔE>0, the new solution is not discarded directly, but accepted with a probability of exp(-ΔE / T), where the temperature T decays exponentially with the number of iterations. This mechanism ensures that the algorithm has a very high ability to escape local optima in the early stage.