Edge computing unloading method based on snake optimization strategy

By adopting a snake optimization strategy-based method in the edge computing system, we jointly optimize task offloading, channel allocation and resource allocation, and solve the complexity of task offloading and resource allocation in super-intensive network environments, achieving efficient resource configuration and low-latency task processing.

CN120075891APending Publication Date: 2025-05-30TIANJIN UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510186105.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-20
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

In a super-intensive network environment, task offloading and resource allocation are complex. Traditional optimization algorithms are difficult to find the global optimal solution, and the convergence speed is slow, which cannot meet the real-time and efficient needs of the network.

Method used

The edge computing offload method based on snake optimization strategy is adopted to reduce the total system delay by collaboratively optimizing task offload decisions, channel allocation and MEC computing resource allocation, and the oscillation factor is introduced to improve the snake optimization algorithm to improve the convergence speed.

Benefits of technology

It realizes efficient task offloading and resource allocation in ultra-intensive network environments, reduces the total system delay, improves the overall performance of the MEC system, and meets the computing energy efficiency and latency requirements of 5G networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120075891A_ABST
    Figure CN120075891A_ABST
Patent Text Reader

Abstract

The invention discloses an edge computing unloading method based on a snake optimization strategy. According to the method, the problems of calculation unloading and resource allocation in combination with mobile edge calculation in an ultra-dense network environment are researched. In order to solve the problem, a new solution scheme is provided. In the algorithm part, the principle and steps of the snake optimization algorithm and how to improve the original algorithm by introducing oscillation factors are introduced in detail so as to enhance the global search capability and the convergence speed. The effectiveness and superiority of the improved algorithm are verified through a simulation experiment. Experimental results in ideal and real scenes show that the improved snake optimization algorithm has better performance in processing task unloading and resource allocation problems, can achieve better system time delay within a small number of iterations, and shows better expansibility when the number of user equipment is increased. Compared with some existing methods, the method has the advantages that the performance of an MEC set system can be remarkably improved, and an effective solution is provided for resource management in a complex scene in a 5G network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of edge computing, and particularly to a method for optimizing task offloading and resource allocation in an ultra-dense network environment, aiming to reduce the total system latency through an innovative snake optimization strategy, improve the performance of the mobile edge computing (MEC) system, and meet the strict requirements for computing energy efficiency and latency in 5G and future network development. Background Art

[0002] With the large-scale deployment of 5G networks and the rapid popularization of intelligent devices, network data traffic has increased explosively, posing unprecedented challenges to computing energy efficiency and latency. Mobile edge computing has emerged as a key technology, which pushes computing resources and service capabilities to the network edge, close to user devices, enabling user devices to offload computing tasks to edge servers for processing, thereby reducing task processing latency and device energy consumption.

[0003] However, in actual ultra-dense network scenarios, there are many complex factors, making task offloading and resource allocation an extremely difficult problem. Traditional optimization algorithms often expose many defects when facing such problems. For example, when dealing with mixed integer non-linear programming problems, they are prone to falling into local optimal solutions, resulting in the inability to find the global optimal task offloading and resource allocation scheme. At the same time, the convergence speed of these algorithms is slow, and their performance in high-dimensional complex problems is not satisfactory, making it difficult to meet the requirements of network real-time and efficiency. Therefore, there is an urgent need for a new and efficient method to solve these problems and improve the performance of the edge computing system. Summary of the Invention

[0004] The core objective of the present invention is to propose an edge computing offloading method based on a snake optimization strategy. By jointly optimizing task offloading decisions, channel allocation, and MEC computing resource allocation, the total system latency is minimized, and the overall performance of the MEC system is improved, so as to better adapt to the high data processing requirements and strict latency requirements brought about by the development of 5G networks and intelligent devices, and provide users with a better network service experience.

[0005] The technical solution adopted by the present invention is:

[0006] An edge computing offloading method based on a snake optimization strategy, which mainly includes the following steps:

[0007] Step 1, System Deployment and Initialization Step:

[0008] Step 1.1, Construction of the network architecture;

[0009] Step 1.2, Task offloading decision mechanism and channel allocation scheme;

[0010] 2. Computational model execution and communication model calculation steps:

[0011] 2.1. Construction of the communication model;

[0012] 2.2. Execution of the computational model;

[0013] 3. Optimization problem solving steps:

[0014] 3.1. Solving for computational resource allocation;

[0015] 3.2. Solving for channel resource allocation using an improved snake optimization algorithm.

[0016] Furthermore, in step 1.1, the construction of the network architecture builds a hyper-dense network architecture consisting of one macro base station and N small base stations. The macro base station serves as the core node, carrying the MEC server. The user equipment establishes a connection with the MEC server through the small base stations, forming a multi-level network architecture. Through this hierarchical architecture, the data transmission path and resource allocation are optimized. The system adopts the OFDMA technology, evenly dividing the total bandwidth B into K sub-channels, with each sub-channel bandwidth W = B / K, providing independent channel resources for the data transmission of different user equipments, reducing the interference between channels, and ensuring the efficiency and stability of data transmission.

[0017] Furthermore, in step 1.2, the task offloading decision mechanism and channel allocation scheme,

[0018] The task offloading decision mechanism is to use the task offloading decision variable to represent the task offloading decision of user equipment u s where u s represents the s-th user equipment. When , the task is executed locally on the user equipment; when , the task will be offloaded to the MEC server for processing. Through this decision mechanism, the clarity of the task processing location is ensured, avoiding the ambiguity and uncertainty of the task processing location;

[0019] This task offloading decision variable and the channel allocation binary variable have an exact mathematical relationship, that is Through this relationship, the task offloading decision and channel allocation are closely linked, providing convenience for subsequent joint optimization. Moreover, when the system makes a task offloading decision, it will comprehensively consider the current state of the user equipment, the attributes of the task, and the real-time state of the network to ensure the rationality and effectiveness of the decision;

[0020] The channel allocation scheme is to use the channel allocation binary variable to represent user equipment u sOccupancy of the k-th subchannel, where When It indicates that user equipment u s Occupies subchannel k; when It indicates that the user equipment does not occupy the subchannel;

[0021] The generation of the channel allocation scheme takes into account various factors, including but not limited to the location of the user equipment, signal strength, historical channel usage records, channel occupancy of other user equipment, and the interference level of the current network environment. At the same time, the system adopts a dynamic channel allocation strategy, which can dynamically adjust the channel allocation according to the real-time changes of the network state to improve the channel utilization rate and system performance.

[0022] Furthermore, in the communication model construction in step 2.1, when the user equipment offloads tasks to the MEC server, the OFDMA-based transmission scheme ensures the independence of each user task during the transmission process. By defining the channel allocation binary variable Precisely describes the occupancy status of the device on the channel. When calculating the signal-to-noise ratio Full consideration is given to the uplink transmission power of the user equipment Channel gain Channel Gaussian white noise σ 2 And the interference generated by other user equipment on the same channel Based on this signal-to-noise ratio, the accurate uplink transmission rate is obtained according to the Shannon formula Provides a key quantitative index for subsequent analysis of the timeliness of task transmission;

[0023] User equipment u s The signal-to-noise ratio on subchannel k Is calculated by the formula Where, Represents the uplink transmission power of user equipment u s , Represents the channel gain of user equipment u s On subchannel k, σ 2 Represents the channel Gaussian white noise, Represents the inter-cell interference generated by other user equipment.

[0024] Furthermore, in the execution of the calculation model in step 2.2, in the local calculation model, with the computational amount And data volume As characteristic parameters, combined with the computing power of the local device Through the formula Calculate the delay of task execution locally; the MEC calculation model comprehensively considers all aspects in the task offloading process. First, calculate the uplink transmission rate according to the channel allocation situation and then obtain the uplink transmission delay Combined with the computing resources allocated to the task by the MEC server calculate the execution delay of the task on the MEC server Finally, obtain the overall processing delay Through the task offloading decision variable integrate the local computing delay and the MEC computing delay into the total task delay Provide a comprehensive delay evaluation model for system performance optimization; Indicates the completion of the task The total number of CPU cycles required, which is estimated according to the computing complexity of the task and the amount of data to be processed.

[0025] Furthermore, in the solution of the optimization problem in step 3,

[0026] The problem is presented as follows: Considering the offloading strategy Z, channel configuration X, and MEC resource allocation R comprehensively, an optimization problem P with the objective function of minimizing the total system delay is constructed. Its objective function is At the same time, to ensure the rationality and feasibility of the problem, a series of strict constraint conditions are set. Through variable substitution transform the original problem P into problem P1, and further decompose it into a computing resource allocation problem P2 and a channel resource allocation problem P3, providing a clear idea and feasible method for the subsequent solution process;

[0027] The series of strict constraint conditions mentioned above include the indivisibility constraint of tasks used to ensure that each task can only be executed locally or completely offloaded to the server; the channel occupancy constraint used to ensure that the same channel can only be used by one user equipment at the same time; the non - negative and finite computing resource constraint and used to prevent over - allocation or unreasonable use of computing resources; and the constraint that each user equipment can only offload through one channel at most used to avoid resource waste and system performance degradation caused by user equipment occupying too many channels.

[0028] Furthermore, in the solution of computing resource allocation in step 3.1, for problem P2, first take the second - order derivative of its objective function with respect to to obtain Since represents the number of CPU cycles required to complete a task, which is a non - negative quantity, the second - derivative is non - negative. According to the determination lemma of convex functions, it can be known that problem P2 is a convex function with respect to At the same time, its constraint conditions and f m are all linear constraints. Based on this convex - optimization property, the Lagrangian function is constructed using the KKT conditions

[0029]

[0030] where μ is the Lagrange multiplier corresponding to the constraint condition and μ > 0. By solving the system of equations under the KKT conditions

[0031]

[0032] the optimal solution is obtained, and then the optimal solution for MEC computing resource allocation is obtained. This solution method uses convex - optimization theory and KKT conditions to ensure the optimal allocation of computing resources while satisfying the constraints.

[0033] Furthermore, in step 3.2 of improving the snake optimization algorithm to solve channel resource allocation, the improved snake optimization algorithm introduces an oscillation factor a2,

[0034]

[0035] where t is the current iteration number and T is the maximum iteration number;

[0036] The edge - computing offloading method based on the improved snake - optimization strategy is as follows: for problem P3, the penalty - function method is used to transform the problem into an unconstrained problem, and the fitness function is

[0037]

[0038] where is the penalty factor and is greater than zero. By calling the improved snake optimization algorithm, the optimal channel - allocation scheme and the minimum total task - execution delay are calculated. First, a random initial channel - allocation scheme is generated as the initial position of the population, and a fitness function based on interference, throughput, and delay is designed to evaluate the pros and cons of each channel - allocation scheme. Then, during the iteration process, according to the amount of food and temperature conditions, the behavior pattern of the snake individual is judged, and the channel - allocation scheme is optimized according to the corresponding position - update formula. At the same time, the penalty function is used to handle the constraint conditions, and finally, the optimal channel - allocation scheme and the minimum total task - execution delay are obtained, realizing the efficient utilization of channel resources.

[0039] Furthermore, the improved snake optimization algorithm includes the following steps:

[0040] Population initialization: According to the dimension and range of the problem, use a random distribution function to generate an initial population to ensure the diversity and coverage of the population;

[0041] Fitness calculation: For different channel allocation and resource allocation schemes, design a fitness function according to the total system delay or other performance metrics to accurately evaluate the advantages and disadvantages of each individual;

[0042] Environmental parameter initialization: Include setting initial environmental parameters such as temperature and food quantity, which will affect the behavior and search strategy of the snake;

[0043] Iteration of exploration and exploitation phases: According to the environmental parameters and the current iteration state, in the exploration phase, use an oscillation factor to adjust the position update formula so that individuals can explore more widely in the search space; in the exploitation phase, according to the different food quantity and temperature, perform different position update operations, including but not limited to approaching the optimal solution, competing with other individuals, and mating and reproduction behaviors;

[0044] Individual fitness evaluation and update: After each iteration, update the fitness of the individual according to the new position to accurately evaluate the performance and value of the individual;

[0045] Weight constant update: According to the convergence situation and iteration progress of the algorithm, update the relevant weight constants to balance the exploration and exploitation capabilities of the algorithm;

[0046] Mating operation and individual replacement: According to the fitness and gender of the individuals, perform mating operations to generate new individuals, and use excellent individuals to replace inferior individuals to maintain the evolutionary ability of the population;

[0047] Optimal solution update: Continuously update the optimal solution during the iteration process to ensure that the global optimal solution is finally found;

[0048] Temperature adjustment: Adjust the environmental temperature according to the iteration progress to simulate the influence of temperature on the behavior of snakes in nature and guide the search process.

[0049] The advantages and positive effects of the present invention are:

[0050] 1. Efficient task offloading and resource allocation

[0051] By comprehensively considering and synergistically optimizing task offloading decisions, channel allocation, and MEC computing resource allocation, it is possible to achieve optimal resource allocation according to the actual situation of user equipment, task characteristics, and the dynamic changes in the network environment. For example, when the task data volume is large and the local device's computing power is limited, it can intelligently offload the task to the MEC server and reasonably allocate channel resources and computing resources, thereby effectively reducing the task processing delay and improving the overall operation efficiency of the system. The optimization problem constructed based on accurate communication models and computing models comprehensively considers various actual factors such as signal-to-noise ratio, channel gain, noise interference, task computing volume, and data volume, making the resource allocation more scientific and reasonable, and avoiding waste and unreasonable occupation of resources.

[0052] 2. Advantages of the Improved Snake Optimization Algorithm

[0053] The improved snake optimization algorithm with an oscillation factor performs excellently in dealing with complex edge computing offloading problems. The oscillation factor dynamically adjusts the search behavior according to the number of iterations. In the exploration stage, it can enhance the global search ability of the algorithm, making the algorithm more likely to jump out of the local optimal solution and find a better resource allocation scheme. Compared with the original snake optimization algorithm and other traditional optimization algorithms, the improved algorithm has obvious advantages in convergence speed. When facing different numbers of users and task conditions, it can reach a better solution within fewer iterations, reducing the computing time and resource consumption, improving the system's response speed, and being more suitable for edge computing scenarios with high real-time requirements.

[0054] 3. Good System Performance and Stability

[0055] When facing various complex scenarios, such as an increase in the number of user devices, an increase in task data volume and computing volume, etc., the present invention can effectively control the growth rate of the total system delay. By dynamically adjusting the task offloading strategy and resource allocation, it ensures that the system can still maintain relatively stable performance under high load conditions and provide reliable services for users. Whether in simulation experiments or field experiments, the method of the present invention has shown high stability and adaptability. In different network environments and user behavior patterns, the system can operate stably and stand out among various comparison algorithms, verifying its effectiveness and reliability in practical applications.

[0056] 4. Practicality and Scalability

[0057] The system architecture is designed reasonably and has good scalability, enabling it to easily adapt to the expansion of the network scale and the access of new devices. Whether adding small base stations, user equipment, or MEC servers, the system can automatically identify and manage them, and accordingly optimize the resource allocation strategy to meet the growing business requirements. Considering various factors in practical applications, such as channel state monitoring, communication link management, task offloading decision adjustment, computing resource prediction, etc., the present invention has strong practicability and can be directly applied to actual edge computing systems to effectively solve the task offloading and resource allocation problems in reality.

[0058] 5. Security Assurance and User-Friendliness

[0059] The system's security assurance mechanism ensures the confidentiality, integrity of data, and legal access of user equipment, effectively preventing network attacks and data leakage risks, and providing a secure and reliable computing environment for users. The user interface and feedback mechanism enhance the user experience. Users can conveniently view the task status, submit tasks, and provide feedback on the service quality, making the system easier to use and manage, and enhancing users' satisfaction and trust in edge computing services. Description of the Drawings

[0060] Figure 1 is U s = 4, the relationship diagram between the number of iterations and fitness;

[0061] Figure 2 is U s = 7, the relationship diagram between the number of iterations and fitness;

[0062] Figure 3 is U s = 10, the relationship diagram between the number of iterations and fitness;

[0063] Figure 4 is the relationship diagram between the total system delay and the number of UEs in a single small base station;

[0064] Figure 5 is the relationship diagram between the total system delay and the task data volume;

[0065] Figure 6 is the relationship diagram between the total system delay and the required computing volume of the task;

[0066] Figure 7 is U s = 1, the relationship diagram between the number of iterations and the total system delay;

[0067] Figure 8 is U s = 4, the relationship diagram between the number of iterations and the total system delay;

[0068] Figure 9 is Us Relationship diagram of the number of iterations and the total system delay when = 7;

[0069] Figure 10 Relationship diagram of the number of iterations and fitness in the real scenario;

[0070] Figure 11 Relationship diagram of the number of user equipment and the total system delay in the real scenario.

[0071] Figure 12 Flowchart of the edge computing offloading method based on the snake optimization strategy of the present invention. Detailed implementation manners

[0072] See Appendix Figure 12 A kind of edge computing offloading method based on the snake optimization strategy provided by the present invention mainly includes the following steps:

[0073] Step 1, system deployment and initialization step:

[0074] Step 1.1, construction of the network architecture;

[0075] Step 1.2, task offloading decision mechanism and channel allocation scheme;

[0076] Step 2, calculation model execution and communication model calculation step:

[0077] Step 2.1, construction of the communication model;

[0078] Step 2.2, execution of the calculation model;

[0079] Step 3, optimization problem solving step:

[0080] Step 3.1, solving for the calculation resource allocation;

[0081] Step 3.2, solving for the channel resource allocation by improving the snake optimization algorithm.

[0082] The system network architecture includes a macro base station and a ultra-dense network composed of multiple (N) small base stations. These base stations are distributed in a predetermined area to achieve network coverage of the area. A high-performance mobile edge computing (MEC) server is set in the macro base station. This server has powerful computing capabilities and can process a large number of task requests from user equipment. The user equipment establishes a connection with the MEC server through the small base station, forming a multi-level network architecture. This hierarchical architecture helps to optimize the data transmission path and resource allocation.

[0083] The system adopts Orthogonal Frequency Division Multiple Access (OFDMA) technology, divides the total system bandwidth B into K sub-channels, where the bandwidth of each sub-channel is accurately calculated as W = B / K, providing independent channel resources for data transmission of different user devices, reducing interference between channels, and ensuring the efficiency and stability of data transmission. This OFDMA technology ensures that when different user devices perform data transmission on different sub-channels, the interference between them is minimized, thus providing a stable and efficient communication foundation for the system.

[0084] The system also includes a corresponding channel status monitoring module for real-time monitoring of the status information of each sub-channel, including but not limited to channel occupancy, signal strength, noise level, etc., providing accurate data support for subsequent channel allocation decisions. At the same time, the system has a communication link management module that can dynamically adjust the parameters of the communication link according to changes in the network environment to ensure the reliability and efficiency of data transmission.

[0085] The task offloading decision-making mechanism of the present invention uses a variable to represent the task offloading decision of user equipment u s , where u s represents the s-th user equipment. When , the task is executed locally on the user equipment; when , the task will be offloaded to the MEC server for processing. This decision-making mechanism ensures the clarity of the task processing location and avoids ambiguity and uncertainty in the task processing location.

[0086] This task offloading decision variable has an exact mathematical relationship with the channel allocation binary variable , that is Through this relationship, the task offloading decision is closely linked to the channel allocation, providing convenience for subsequent joint optimization. Moreover, when making a task offloading decision, the system comprehensively considers the current state of the user equipment (such as CPU usage, memory occupancy, battery power, etc.), the attributes of the task (such as task type, task urgency, task data volume, required computing resources, etc.), and the real-time state of the network (such as channel load, MEC server load, etc.) to ensure the rationality and effectiveness of the decision.

[0087] The system also includes a task offloading decision adjustment module that adjusts the task offloading decision in real time according to dynamic information during task execution, such as task execution progress, network congestion, changes in MEC server load, etc., to ensure that the system performance is always in an optimal state.

[0088] The channel allocation scheme in the mechanism of the present invention

[0089] uses the channel allocation binary variable to represent the user equipment u s the occupancy situation of the k-th sub-channel, where when represents that the user equipment u s occupies the sub-channel k; when it means that the user equipment does not occupy the sub-channel.

[0090] The generation of the channel allocation scheme takes into account various factors, including but not limited to the location of the user equipment, signal strength, historical channel usage records, the channel occupancy situation of other user equipment, and the interference level of the current network environment. At the same time, the system adopts a dynamic channel allocation strategy, which can dynamically adjust the channel allocation according to the real-time changes of the network state to improve the channel utilization rate and system performance.

[0091] The system has a channel allocation conflict detection and resolution mechanism. When multiple user equipment simultaneously requests to occupy the same channel, this mechanism can coordinate the conflict through predefined priority rules or other optimization algorithms (such as based on channel quality, task urgency, etc.) to ensure that each sub-channel is used by only one user equipment at the same moment, avoiding resource conflicts and communication interference.

[0092] The construction of the communication model in the mechanism of the present invention

[0093] When the user equipment offloads tasks to the MEC server, the OFDMA-based transmission scheme ensures the independence of each user task during the transmission process. By defining the channel allocation binary variable accurately describes the occupancy state of the device on the channel. When calculating the signal-to-noise ratio fully considers the uplink transmission power of the user equipment channel gain channel Gaussian white noise σ 2 and the interference generated by other user equipment on the same channel Based on this signal-to-noise ratio, the accurate uplink transmission rate is obtained according to the Shannon formula providing a key quantitative index for subsequent analysis of the timeliness of task transmission;

[0094] The user equipment u s the signal-to-noise ratio on the sub-channel k is accurately calculated by the formula wherein, represents the uplink transmission power of the user equipment u s and represents the channel gain of the user equipment u s on the sub-channel k, and σ 2 represents the channel Gaussian white noise, Represents the inter-cell interference generated by other user devices. This formula comprehensively considers various factors that may affect the signal-to-noise ratio and accurately reflects the complex interference situation in the actual communication environment.

[0095] Based on the above signal-to-noise ratio Through the Shannon formula Calculate the uplink transmission rate of user equipment u s On sub-channel k This formula, based on the principles of information theory, converts the signal-to-noise ratio into a quantifiable transmission rate, providing a scientific basis for evaluating data transmission performance.

[0096] The system further includes a communication performance evaluation module, which not only calculates the signal-to-noise ratio and transmission rate but also monitors and evaluates communication performance indicators such as bit error rate, transmission delay jitter, and packet loss rate in real time. Based on these indicators, the system can judge the quality of the current communication link and provide a basis for subsequent channel adjustment and resource allocation.

[0097] The calculation model setting in the mechanism of the present invention

[0098] Is in the local calculation model, the delay of the task Executed locally Calculated by the formula Among them, Represents the total number of CPU cycles required to complete the task This cycle number is estimated based on the computational complexity of the task and the amount of data to be processed; Represents the computing power of the local device, that is, the number of CPU cycles that the local device can execute per unit time. This calculation model accurately reflects the relationship between the processing ability of the local device and the computational requirements of the task.

[0099] In the MEC calculation model, the uplink transmission rate of the task offloaded to the MEC server Is calculated by the formula This formula comprehensively considers the transmission rate of the user equipment on different sub-channels and the channel occupancy situation, and accurately obtains the total uplink transmission rate. Based on this, the uplink transmission delay can be calculated Where Is the size of the task data volume. At the same time, the task execution delay of the MEC server Where Is the computing resource allocated by the MEC server to this task. The overall processing delay Comprehensively considers the time overhead of transmission and execution.

[0100] The final total task delay Where is the task offloading decision variable. This formula unifies the cases of local processing and offloading to the MEC server for processing, providing a comprehensive quantitative basis for the optimization of the total system delay. The system also includes a computing resource prediction module, which can predict the required computing resources and time overhead according to historical task execution data and current task characteristics, providing a more accurate basis for resource allocation.

[0101] In the optimization problem and solution strategy of the mechanism of the present invention,

[0102] The problem is manifested as follows: Considering the offloading strategy Z, channel configuration X, and MEC resource allocation R comprehensively, an optimization problem P with minimizing the total system delay as the objective function is constructed, and its objective function is At the same time, in order to ensure the rationality and feasibility of the problem, a series of strict constraints are set, and through variable substitution the original problem P is transformed into problem P1, and further decomposed into a computing resource allocation problem P2 and a channel resource allocation problem P3, providing a clear idea and feasible method for the subsequent solution process;

[0103] Its objective function is aiming to minimize the total task delay of all user devices in the system to improve system performance. The decision variables of this optimization problem include the task offloading strategy Z, channel configuration X, and MEC resource allocation R.

[0104] At the same time, the optimization problem P needs to satisfy the following constraints:

[0105] Indivisibility constraint of tasks Ensuring that each task is either processed entirely locally or entirely offloaded to the MEC server, avoiding the complex management and potential errors brought by partial offloading.

[0106] Channel occupancy constraint Guaranteeing that the same channel can only be used by one user device at the same time, ensuring the exclusivity and conflict-freeness of channel resources.

[0107] Non-negativity and finiteness constraint of computing resources Preventing negative computing resource allocation; and Ensuring that the total computing resources allocated to tasks do not exceed the maximum computing capacity of the MEC server, preventing resource overload.

[0108] Constraint that each user device can offload through at most one channel Avoiding resource waste and system performance degradation caused by user devices occupying too many channels.

[0109] The system also has an optimization problem dynamic adjustment module, which can dynamically adjust the constraint conditions and objective function of the optimization problem according to changes in the network environment and user devices to adapt to different application scenarios and performance requirements.

[0110] In the solution scheme of the computing resource allocation problem of the present invention,

[0111] For a given channel allocation scheme X 0 , the problem P2 is expressed as Aiming to optimize the MEC computing resource allocation to minimize the task processing delay.

[0112] First, take the second derivative of its objective function with respect to to obtain Since represents the number of CPU cycles required to complete the task and is a non - negative quantity, the second - order derivative is non - negative. According to the determination lemma of convex functions, it can be known that the problem P2 is a convex function with respect to . At the same time, its constraint conditions and are both linear constraints.

[0113] Based on this convex optimization property, construct the Lagrangian function through the KKT conditions

[0114]

[0115] (where μ is the Lagrange multiplier corresponding to the constraint condition and μ > 0), and solve the system of equations according to the KKT conditions to obtain the optimal solution Furthermore, obtain the optimal solution of the MEC computing resource allocation This solution process utilizes convex optimization theory and KKT conditions to achieve the optimal allocation of computing resources on the premise of meeting the computing resource constraints, effectively reducing the task processing delay and ensuring the optimal allocation of computing resources on the premise of meeting the constraints.

[0117] The system also includes a computing resource allocation adjustment module, which dynamically adjusts the computing resource allocation result according to real - time task and network status, such as the dynamic arrival and departure of tasks and the load change of the MEC server, to ensure the optimality and adaptability of resource allocation.

[0118] The improved snake optimization algorithm of the present invention is applied to edge computing offloading,

[0119] The basic snake optimization algorithm is as follows: The design inspiration of the snake optimization algorithm comes from the mating behavior of snakes. Its search process is divided into an exploration stage and a development stage. In the exploration stage, the presence and quality of food determine the movement direction and search strategy of the snake, while temperature affects the breadth and locality of the exploration stage. When food is scarce, the snake will prioritize searching for food, and its position update has a large degree of randomness. The development stage includes multiple transition processes. When food is abundant and the temperature is high, the snake will move towards the direction where food is rich; when food is abundant and the environment is cold in the environment, the mating behavior will be triggered, including the combat stage and the mating stage. In the combat, male snakes compete for the optimal mate, and female snakes choose the most excellent male; in the mating stage, if the mating is successful, the female snake will lay eggs and hatch new young snakes. The specific steps of the algorithm include population initialization, through the formula

[0120] X i = X min + r × (X max - X min )

[0121] to generate the initial population positions; divide the population into male and female groups, and determine the number of each group according to the proportion; evaluate each group and determine the definitions of temperature and food quantity; update the positions of snake individuals according to different conditions in the exploration stage and the development stage.

[0122] Since the original snake optimization algorithm is prone to falling into local optimal solutions in high-dimensional complex problems, the reason is that the weight constant in the position update formula in its exploration stage is fixed. The present invention proposes an improved snake optimization algorithm, and an oscillation factor a2 is introduced into the position update formula in the exploration stage of the original snake optimization algorithm, and its expression is

[0123]

[0124] where t is the current iteration number and T is the maximum iteration number. The introduction of this oscillation factor aims to dynamically adjust the search behavior according to the progress of the iteration and enhance the exploration ability of the algorithm.

[0125] The improved snake optimization algorithm includes steps such as population initialization, fitness calculation, environmental parameter initialization, iteration in the exploration and development stages, individual fitness evaluation and update, weight constant update, mating operation and individual replacement, optimal solution update, and temperature adjustment. In the exploration stage, the oscillation factor is used to adjust the position update formula, enabling individuals to explore more widely in the search space and avoiding early convergence; in the development stage, different position update operations are performed according to the temperature and food quantity conditions, such as continuing to explore food in the hot state and entering the combat or mating mode in the cold state, enhancing the local search ability and population diversity. The specific steps of the improved snake optimization algorithm are as follows:

[0126] Population initialization: According to the dimension and range of the problem, use a random distribution function to generate an initial population to ensure the diversity and coverage of the population.

[0127] Fitness calculation: For different channel allocation and resource allocation schemes, design a fitness function according to the total system delay or other performance metrics to accurately evaluate the advantages and disadvantages of each individual.

[0128] Environmental parameter initialization: Include setting initial environmental parameters such as temperature and food quantity, which will affect the behavior and search strategy of the snake.

[0129] Iteration of exploration and exploitation stages: According to the environmental parameters and the current iteration state, in the exploration stage, use an oscillation factor to adjust the position update formula so that individuals can explore more widely in the search space; in the exploitation stage, according to different food quantities and temperatures, perform different position update operations, including but not limited to approaching the optimal solution, competing with other individuals, mating and reproducing, etc.

[0130] Individual fitness evaluation and update: After each iteration, update the fitness of the individual according to the new position to accurately evaluate the performance and value of the individual.

[0131] Weight constant update: According to the convergence situation and iteration progress of the algorithm, update the relevant weight constants to balance the exploration and exploitation capabilities of the algorithm.

[0132] Mating operation and individual replacement: According to the fitness and gender of the individuals (for grouped snake individuals), perform mating operations to generate new individuals, and use excellent individuals to replace inferior individuals to maintain the evolutionary ability of the population.

[0133] Optimal solution update: Continuously update the optimal solution during the iteration process to ensure that the global optimal solution is finally found.

[0134] Temperature adjustment: Adjust the environmental temperature according to the iteration progress to simulate the influence of temperature on snake behavior in nature and guide the search process.

[0135] The computational complexity of this algorithm remains unchanged compared with the original snake optimization algorithm, but it has significant advantages in global search ability and convergence speed. Especially when dealing with complex edge computing offloading problems, it can more effectively avoid falling into local optimal solutions.

[0136] The specific application of the improved snake optimization algorithm of the present invention in the channel resource allocation problem P3 is

[0137] Using the penalty function method to transform problem P3 into an unconstrained problem, and its fitness function is

[0138]

[0139] where is a penalty factor and is greater than zero. This penalty function incorporates the constraint conditions into the fitness function to avoid infeasible solutions caused by violating the constraints.

[0140] By calling the improved snake optimization algorithm to calculate the optimal channel allocation scheme and the minimum total task execution delay, first randomly generate an initial channel allocation scheme as the initial positions of the population, and these initial positions consider the characteristics and historical usage of different user equipment and channels. Then, design a fitness function based on interference, throughput, and delay to evaluate the quality of each individual (i.e., different channel allocation schemes). During the iteration process, according to the exploration and exploitation phases of the snake optimization algorithm, continuously update the individual positions (i.e., channel allocation schemes), and evaluate the new individuals according to the fitness function. At the same time, according to the penalty function, punish those individuals that do not meet the constraint conditions, prompting the algorithm to search for the optimal solution in the direction of meeting the constraints. Through continuous iterative updates, finally find the optimal channel allocation scheme, so that the system minimizes the total task execution delay and improves the system performance under the premise of meeting various constraints.

[0141] The above details the principle and steps of the snake optimization algorithm and how to improve the original algorithm by introducing an oscillation factor to enhance the global search ability and convergence speed. The improved algorithm verifies its effectiveness and superiority through simulation experiments. The experimental results in ideal and real scenarios show that the improved snake optimization algorithm has better performance in dealing with task offloading and resource allocation problems, can achieve better system delay in fewer iterations, and shows better scalability when the number of user equipment increases.

[0142] Embodiment 1

[0143] The method designed in this embodiment verifies the feasibility of the algorithm based on Matlab simulation. The scenario is an ultra-dense network area with a radius of 500 meters, ensuring that the base station can fully cover the area, which includes a macro base station and N small base stations. Among them, the macro base station is equipped with an MEC server that can handle multiple tasks simultaneously. The user equipment is evenly distributed within the coverage area, and the small base stations are randomly distributed in the area. The total bandwidth of the system is 20 MHz, and the channel gain model follows the distance-based path loss model, with the expression 127 + 30logd. The rest is shown in Table 1.

[0144] Table 1 Main parameters

[0145]

[0146] The setting of these parameters provides a basis for the analysis of subsequent experimental results, ensuring that the experiment is carried out under specific network environments and device conditions, and can accurately reflect the performance of different algorithms in this scenario.

[0147] To comprehensively evaluate the performance of the edge computing offloading method (ISO) based on the snake optimization improvement strategy proposed in this invention, a variety of representative optimization algorithms are selected for comparison, including the Grey Wolf Optimizer (GWO), Sparrow Search Algorithm (SSA), Snake Optimization Algorithm (SO), Particle Swarm Optimization (PSO), and Whale Optimization Algorithm (WOA). These algorithms have certain advantages in their respective application fields, but their performances vary when dealing with the edge computing offloading problem. By comparing with them, the advantages and characteristics of the ISO algorithm can be more clearly highlighted.

[0148] Simulation experiment results

[0149] (1) Analysis of the relationship between the number of iterations and fitness: The purpose of this experiment is to evaluate the relationship between the iterative performance and adaptability of the algorithm under different numbers of users. The results are shown in Appendix Figure 1 Appendix Figure 2 Appendix Figure 3 as follows:

[0150] From the three experimental figures, we can find the following conclusions: As the number of user devices in a single small base station increases, the ISO algorithm always shows a relatively fast and stable iterative process and can maintain a low fitness value in multiple iterations. In contrast, the performance of the SO algorithm in terms of fitness is not as good as that of the ISO algorithm. After improvement, the ISO algorithm has significantly improved the randomness of exploration, making it easier to find the optimal solution, so the number of iterations required is lower than that of the traditional SO algorithm. As the number of iterations increases, the performances of the traditional GWO and SSA algorithms fluctuate more significantly compared to other algorithms, lacking stability and being difficult to meet the actual user needs. The adaptability and the efficiency of achieving the optimal solution of the PSO and WOA algorithms are not as good as those of the ISO algorithm under different conditions of the change in the number of devices. In summary, the ISO algorithm shows better adaptability to user needs in the comparison of multiple algorithms, and its performance is relatively stable as the number of devices increases.

[0151] (2) Analysis of the relationship between the total system delay and the number of UEs in a single small base station

[0152] Appendix Figure 4 Appendix shows the relationship between the total system delay and the number of user devices in a single small base station, and verifies the delay performances of different algorithms under different user devices through experiments. From Appendix Figure 4From the analysis results, it can be seen that as the number of user equipments in a single small base station increases, the total system delay also shows a corresponding increasing trend. This trend can be attributed to the fact that when multiple user equipments access the base station simultaneously, the competition for network resources intensifies, resulting in a decrease in transmission rate and an increase in the pressure of computing resource allocation. In addition, as the number of UEs increases, the demand for task offloading to the MEC server also increases, further exacerbating the system delay.

[0153] In the appendix Figure 4 the performance of various algorithms also varies. Traditional algorithms perform well when facing a small number of UEs, but as the number of UEs increases, the growth rate of delay is relatively fast, showing poor scalability. In contrast, improved algorithms such as the strategy based on the improved snake optimization algorithm (ISO) can still maintain a relatively low increase in delay at a higher number of UEs, showing better performance.

[0154] (3) Analysis of the relationship between the total system delay and the task data volume

[0155] The appendix Figure 5 shows the relationship between the total system delay and the task data volume. Through analysis, the following conclusions can be drawn:

[0156] As the task data volume increases, the total system delay shows an upward trend. This is because when the task data volume is small, the computing and transmission overheads are relatively low, so the system delay is relatively small. As the data volume increases, the time for transmission to the MEC server and the task processing time will both increase significantly, resulting in an increase in the total system delay. In addition, the increase in task data volume also puts higher requirements on the occupancy of the channel bandwidth, leading to more severe channel congestion and further increasing the delay.

[0157] Different algorithms show different effects when dealing with the increase in task data volume. The delay of traditional optimization algorithms increases relatively fast, while the offloading strategy of improved optimization algorithms, such as the improved snake optimization algorithm, can better maintain a lower delay when the data volume increases, showing its advantages in processing large data volume tasks.

[0158] (4) Analysis of the relationship between the total system delay and the required computing volume of the task

[0159] The appendix Figure 6It shows the relationship between the total system delay and the amount of computation required for the task. By analyzing this figure, it can be found that as the amount of computation required for the task increases, the total system delay also shows an obvious upward trend. This trend is mainly due to the fact that when the amount of computation required for the task increases, the time for processing the computational task locally or on the MEC server also increases accordingly, resulting in an increase in the overall delay. It is worth noting that different algorithms have significant differences in performance when faced with an increase in the amount of task computation. The improved snake optimization algorithm can better balance the allocation of computing resources when dealing with large-scale computational tasks, thus suppressing the rapid increase in delay to a certain extent. This shows that through effective resource allocation and optimization strategies, a relatively reasonable delay can still be maintained under high computational demands, thereby improving the overall performance of the system.

[0160] (5) Analysis of the relationship between the number of iterations and the total system delay

[0161] Appendix Figure 7 、Appendix Figure 8 and Appendix Figure 9 respectively show the relationship between the number of iterations and the total system delay under different numbers of user equipment.

[0162] From these three figures, it can be seen that as the number of iterations increases, the total system delay gradually decreases and tends to be stable after a certain number of times. This shows that most of the optimization algorithms adopted can gradually approach the optimal solution during multiple iterations, thus effectively reducing the total system delay. In addition, the relationship between the number of iterations and the total system delay is also different in scenarios with different numbers of user equipment. When the number of user equipment in each base station increases to 7, the decline process of the total system delay becomes slower, and the stable delay value is higher than the previous two cases. This shows that in scenarios with a large number of user equipment, the convergence speed of the optimization algorithm further slows down, and it is difficult to significantly reduce the total system delay. Among the selected algorithms, although the optimization effect of ISO weakens compared with the previous two cases, it can still approach convergence after a sufficient number of iterations. This shows that ISO still has strong robustness and adaptability when facing high-complexity and high-load environments. By reasonably setting the number of iterations and algorithm parameters, good performance can be maintained in complex scenarios.

[0163] Consider the impact of the change in the number of user equipment in the real scenario on the total system delay. And analyze the relationship between the number of iterations and fitness of each algorithm, as well as the relationship between the number of user equipment and the total system delay, with the change of user equipment.

[0164] Appendix Figure 10It shows the fitness change of each algorithm with the increase of the number of iterations in a real scenario. In the real scenario, ten small base stations are selected, and there are 15 user equipments in each small base station. With the increase of the number of iterations, the fitness of most algorithms gradually decreases and finally tends to be stable, indicating that these algorithms can gradually approach the optimal solution during multiple iterations. However, there are obvious differences in the convergence speed of different algorithms. Among them, the fitness of the improved snake optimization algorithm (ISO) decreases faster and reaches a stable state within fewer iterations, showing good convergence. There are certain differences in the final stable fitness values of different algorithms shown in the figure. The ISO algorithm can maintain a lower fitness value in each test scenario, indicating that it still has a high optimization effect in complex real scenarios. In contrast, other traditional algorithms such as the particle swarm optimization algorithm (PSO) and the whale optimization algorithm (WOA) are slightly insufficient in the final fitness value, showing higher fitness fluctuations. This clearly demonstrates the advantages of the ISO algorithm compared with other algorithms. Especially in the initial stage of iteration, the fitness decrease speed of the ISO algorithm is significantly better than that of other algorithms. This indicates that the ISO algorithm can find a solution closer to the optimal one faster in the initial stage of optimization and has stronger initial search ability.

[0165] Appendix Figure 11 It shows the impact of different numbers of user equipments on the total system delay in a real scenario. With the increase of the number of user equipments, the total system delay increases significantly. This is because when more user equipments access the network simultaneously, network resources (such as bandwidth and computing resources) become more tense, resulting in an increase in both the task transmission and processing time. The strategy based on the improved snake optimization algorithm (ISO) can still maintain a lower delay increase rate when the number of user equipments increases, showing its strong adaptability and optimization ability. In contrast, the delay of other traditional algorithms increases faster, showing poor scalability.

[0166] Through the analysis of the above simulation experiments and on-site experimental test results, the following conclusions can be drawn: The edge computing offloading method (ISO) based on the snake optimization improvement strategy proposed by the present invention has significant advantages in dealing with task offloading and resource allocation problems. In terms of the relationship between the number of iterations and fitness, the ISO algorithm exhibits fast and stable convergence characteristics, and can find better solutions within fewer iterations; in the analysis of the relationship between the total system delay and various factors (such as the number of UEs in a single small base station, the amount of task data, and the amount of computation required for tasks), when facing complex and changing network environments and task requirements, the ISO algorithm can effectively control the increase in delay and demonstrate good scalability and stability; in the real-scenario test, the ISO algorithm also performs excellently, being superior to other traditional algorithms both in terms of the speed of fitness decline and the control of the total system delay. In summary, the ISO algorithm provides an efficient and reliable solution for resource management in complex scenarios in 5G networks, and has important application value and promotion prospects.

Claims

1. An edge computing offloading method based on snake optimization strategy, characterized in that The method mainly includes the following steps:

1. System deployment and initialization steps: Section 1.

1. Building the network architecture; Section 1.2, Task offloading decision mechanism and channel allocation scheme; Second, calculation model execution and communication model calculation steps: Section 2.1, Communication model construction; Section 2.2, computational model execution; 3. Steps for solving optimization problems: Section 3.1, computing resource allocation solution; Section 3.

2. Improve the snake optimization algorithm to solve channel resource allocation.

2. The edge computing offloading method based on the snake optimization strategy as claimed in claim 1, characterized in that: The construction of the network architecture in step 1.1 builds an ultra-dense network architecture consisting of a macro base station and N small base stations. The macro base station serves as the core node and carries the MEC server. The user equipment establishes a connection with the MEC server through the small base station, forming a multi-level network architecture. The layered architecture optimizes the data transmission path and resource allocation. The system uses OFDMA technology to evenly divide the total bandwidth B into K sub-channels. The bandwidth of each sub-channel is W = B / K, which provides independent channel resources for data transmission of different user devices, reduces interference between channels, and ensures the efficiency and stability of data transmission.

3. The edge computing offloading method based on the snake optimization strategy as claimed in claim 1, characterized in that: In step 1.2, task offloading decision mechanism and channel allocation scheme, The task offloading decision mechanism is to use the task offloading decision variable To represent the user equipment u s The task offloading decision, where u s represents the sth user equipment, when When , the task is executed locally on the user's device; when When the task is unloaded to the MEC server for processing, the decision-making mechanism ensures the clarity of the task processing location and avoids the ambiguity and uncertainty of the task processing location; This task offloads the decision variables Binary variables with channel assignment There is a precise mathematical relationship, namely Through this relationship, the task offloading decision is closely linked to the channel allocation, which facilitates the subsequent joint optimization. In addition, when making a task offloading decision, the system will comprehensively consider the current status of the user equipment, the attributes of the task, and the real-time status of the network to ensure the rationality and effectiveness of the decision. The channel allocation scheme is to use the channel allocation binary variable To represent the user equipment u s The occupancy of the kth subchannel, where then Indicates user equipment u s Occupy subchannel k; when When , it indicates that the user equipment does not occupy the sub-channel; The generation of the channel allocation plan takes into account a variety of factors, including but not limited to the location of the user device, signal strength, historical channel usage records, channel occupancy of other user devices, and the interference level of the current network environment. At the same time, the system adopts a dynamic channel allocation strategy, which can dynamically adjust the channel allocation according to the real-time changes in the network status to improve channel utilization and system performance.

4. The edge computing offloading method based on the snake optimization strategy as claimed in claim 1, characterized in that: The communication model in step 2.1 is constructed when the user equipment unloads tasks to the MEC server. The OFDMA-based transmission scheme ensures the independence of each user task during the transmission process. By defining the channel allocation binary variable Accurately describe the device's occupancy status on the channel and calculate the signal-to-noise ratio The uplink transmission power of the user equipment is fully considered. Channel Gain Channel Gaussian white noise σ 2 and interference from other user devices on the same channel Based on this signal-to-noise ratio, the accurate uplink transmission rate is obtained according to the Shannon formula. Provide key quantitative indicators for the timeliness of subsequent analysis task transmission; User equipment s The signal-to-noise ratio of k on the subchannel By formula It is calculated that, Indicates user equipment u s The uplink transmission power is Indicates user equipment u s The channel gain on subchannel k, σ 2 represents the channel Gaussian white noise, Indicates the inter-cell interference caused by other user equipment.

5. The edge computing offloading method based on the snake optimization strategy as claimed in claim 1, characterized in that: The computation model execution in step 2.2 is performed in the local computation model, with the computation amount of the task and data volume is a characteristic parameter, combined with the computing power of the local device By formula Calculate the delay of task execution locally; the MEC calculation model comprehensively considers all aspects of the task offloading process. First, the uplink transmission rate is calculated based on the channel allocation. Then the uplink transmission delay is obtained Combined with the computing resources allocated to the task by the MEC server Calculate the execution delay of the task on the MEC server The final overall processing delay is Offloading decision variables through tasks Integrate local computing delay and MEC computing delay into the total task delay Provides a comprehensive latency evaluation model for system performance optimization; Indicates completion of task The total number of CPU cycles required is estimated based on the computational complexity of the task and the amount of data that needs to be processed.

6. The edge computing offloading method based on the snake optimization strategy as claimed in claim 1, characterized in that: In step 3, in solving the optimization problem, The problem is manifested as follows: considering the offloading strategy Z, channel configuration X and MEC resource allocation R, an optimization problem P is constructed with the objective function of minimizing the total system delay. Its objective function is At the same time, in order to ensure the rationality and feasibility of the problem, a series of strict constraints were set. The original problem P is transformed into problem P1, and further decomposed into computing resource allocation problem P2 and channel resource allocation problem P3, which provides a clear idea and feasible method for the subsequent solution process; A series of strict constraints, including the indivisibility of tasks Used to ensure that each task can only be executed locally or completely offloaded to the server; channel occupancy constraints Used to ensure that the same channel can only be used by one user device at the same time; computing resources are non-negative and limited constraints and Used to prevent over-allocation or unreasonable use of computing resources; and the constraint that each user device can only be offloaded through one channel at most It is used to prevent user equipment from occupying too many channels, causing resource waste and system performance degradation.

7. The edge computing offloading method based on the snake optimization strategy as claimed in claim 1, characterized in that: The computational resource allocation solution in step 3.1 is for problem P2. First, its objective function Ask about The second-order derivative of because It represents the number of CPU cycles required to complete the task, which is a non-negative quantity, so the second-order derivative is non-negative. According to the convex function determination lemma, problem P2 is about is a convex function, and its constraints and All are linear constraints. Based on this convex optimization characteristic, the Lagrangian function is constructed using the KKT condition. Where μ is the constraint condition The corresponding Lagrange multiplier and μ>0, by solving the system of equations under KKT conditions Find the optimal solution Then we can get the optimal solution for MEC computing resource allocation. This solution method uses convex optimization theory and KKT conditions to ensure the optimal allocation of computing resources while satisfying constraints.

8. The edge computing offloading method based on the snake optimization strategy as claimed in claim 1, characterized in that: Step 3.2: Improve the snake optimization algorithm to solve the channel resource allocation. The improved snake optimization algorithm is to introduce the oscillation factor a2. Where t is the current number of iterations, and T is the maximum number of iterations; The edge computing offloading method based on the snake optimization improvement strategy is: for problem P3, the penalty function method is used to transform the problem into an unconstrained problem, and the fitness function is in The penalty factor is greater than zero. The optimal channel allocation scheme and the minimum total delay of task execution are calculated by calling the improved snake optimization algorithm. First, the initial channel allocation scheme is randomly generated as the initial position of the population, and a fitness function based on interference, throughput and delay is designed to evaluate the pros and cons of each channel allocation scheme. Then, in the iterative process, the behavior pattern of individual snakes is judged according to the food amount and temperature conditions, and the channel allocation scheme is optimized according to the corresponding position update formula. At the same time, the penalty function is used to process the constraints. Finally, the optimal channel allocation scheme and the minimum total delay of task execution are obtained, so as to achieve efficient utilization of channel resources.

9. The edge computing offloading method based on the snake optimization strategy as claimed in claim 8, characterized in that: The improved snake optimization algorithm includes the following steps: Population initialization: Based on the dimension and scope of the problem, a random distribution function is used to generate the initial population to ensure the diversity and coverage of the population; Fitness calculation: For different channel allocation and resource allocation schemes, the fitness function is designed according to the total system delay or other performance indicators to accurately evaluate the advantages and disadvantages of each individual; Environmental parameter initialization: including setting the initial temperature, food quantity and other environmental parameters, which will affect the snake's behavior and search strategy; Iteration between exploration and development phases: According to the environmental parameters and the current iteration status, in the exploration phase, the position update formula is adjusted using the oscillation factor to enable the individual to explore more extensively in the search space; During the development phase, different position update operations are performed according to the amount of food and temperature, including but not limited to approaching the optimal solution, competing with other individuals, and mating and reproduction behaviors; Individual fitness evaluation and update: After each iteration, the fitness of the individual is updated according to the new position in order to accurately evaluate the performance and value of the individual; Weight constant update: Update the relevant weight constants according to the convergence and iteration progress of the algorithm to balance the exploration and development capabilities of the algorithm; Mating operation and individual replacement: According to the fitness and gender of the individual, mating operation is carried out to produce new individuals, and excellent individuals are used to replace poor individuals to maintain the evolutionary ability of the population; Optimal solution update: Continuously update the optimal solution during the iteration process to ensure that the global optimal solution is finally found; Temperature adjustment: Adjust the ambient temperature according to the iteration progress, simulate the effect of temperature on snake behavior in nature, and guide the search process.