Edge server deployment method capable of maximizing profit
By introducing the M/M/1 queueing model and Gray Wolf Optimization algorithm in mobile edge computing, the deployment location and number of edge servers is optimized, and the problem of difficulty in maximizing profits in the existing technology is solved, and delay and energy consumption are achieved. Optimization and profit maximization.
Patent Information
- Application Number
- CN202411293123.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2025-02-14
AI Technical Summary
In mobile edge computing, the prior art rarely considers deployment costs and profit issues from the perspective of service providers, making it difficult to maximize profits.
Model the edge server deployment problem as a task of optimizing delay and energy consumption, introduce the M/M/1 queuing model, build a profit model between delay and energy consumption, and propose an edge server deployment algorithm based on the gray wolf optimization algorithm .
By optimizing the deployment location and number of edge servers, we can effectively reduce latency and energy consumption, realize load balancing, improve server utilization, and maximize service provider profits.
Smart Images

Figure CN119450492A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to an edge server deployment method for maximizing profits. Background Art
[0002] With the rapid development of the Internet of Things (IoT) and the widespread use of wireless networks, the number of edge devices and the amount of data generated by these devices are growing exponentially. However, mobile terminal devices (such as mobile phones, tablets, computers, etc.) are limited in computing power and storage capacity due to their lightweight design, limited physical size, and short battery life. Traditional cloud computing architectures are difficult to meet the growing needs of these terminal devices. Therefore, mobile edge computing (MEC) technology has emerged. This technology deploys edge servers at the edge of the network (such as base stations) close to end users to provide the required computing power, improve service performance, reduce user-perceived service latency, and reduce network congestion on the backhaul link.
[0003] In the application of mobile edge computing, the number and location of edge servers are key factors. By transferring task requests from cloud data centers to edge servers close to end users for processing, network congestion can be significantly reduced, energy consumption of cloud data centers can be reduced, and network transmission delay can be shortened. The deployment problem of edge servers can be defined as: considering the quality of end-user experience and other constraints, determine the optimal number and location of edge servers to reduce transmission delay, energy consumption, achieve load balancing, and improve server utilization. Therefore, studying the deployment location of edge servers is a key step in promoting the development of mobile edge computing technology.
[0004] Existing research focuses on how to reduce transmission delay, energy consumption and achieve server load balancing, but rarely considers deployment costs and profit issues from the perspective of service providers. The present invention aims to optimize the deployment of edge servers from the perspective of service providers to maximize the profits of service providers. The specific method includes: modeling the edge server deployment problem as a task of optimizing delay and energy consumption, introducing the M / M / 1 queuing model, and dividing the delay into transmission delay, queuing delay and remote delay. Furthermore, a profit model between delay and energy consumption is proposed, which regards energy consumption as operating cost and delay as income, and balances delay and profit by constructing a system objective function. Finally, the present invention proposes an edge server deployment algorithm based on the gray wolf optimization algorithm to effectively solve discrete optimization problems. By using the data set of Shanghai Telecom base stations for simulation experiments, the results show that the algorithm of the present invention outperforms the existing comparative algorithms in reducing delay, reducing energy consumption, and achieving load balancing, verifying its effectiveness. Summary of the invention
[0005] Purpose of the invention: The technical problem to be solved by the present invention is to provide an edge server deployment method for maximizing profits in view of the shortcomings of the prior art, including the following steps:
[0006] Step 1: Set the edge server deployment scenario to a smart city scenario;
[0007] Step 2, preprocessing the Shanghai Telecom base station data set (mainly removing useless information and invalid base stations in the data set), the data set includes the number of base stations, the longitude and latitude coordinates of the base stations, and the data volume of mobile terminal devices accessing the base stations;
[0008] Step 3, construct mathematical model and objective function;
[0009] Step 4: Establish edge server deployment algorithm;
[0010] Step 5: Complete edge server deployment and base station allocation according to the edge server deployment algorithm.
[0011] Step 3 includes: considering only the end-to-end delay between the base station and the server, and according to the Shannon formula, the base station b j The task on is uploaded to the i-th edge server s i The transmission rate r ij for:
[0012]
[0013] Where w represents the channel bandwidth; p j Indicates base station b j The transmission power of all base stations is set to be the same; h ij Indicates base station b j With the i-th edge server s i The channel gain between 0 represents the noise power; then base station b j With the i-th edge server s i The transmission time T ij for:
[0014]
[0015] Among them, d(s i ,b j ) represents base station b j and the i-th edge server s i The distance between i )、l(b j ) represent the location of the i-th edge server and the j-th base station respectively.
[0016] Step 3 also includes:
[0017] Assume that all edge servers are the same and each mobile terminal device has a task volume w m and a task arrival rate λ m , task arrival rate λ m It obeys Poisson distribution; and each edge server is set to process the computing tasks on the terminal device at the same rate μ; the terminal user's queuing delay is modeled as the task arrival process follows the Poisson process; the service time follows the exponential distribution queuing model. When the task of the mobile terminal device arrives at the edge server, if the edge server is idle, the task is processed immediately; otherwise, the task will be queued for processing; the waiting time of the terminal user's task includes the queuing time and the task processing time. According to the M / M / 1 queuing model, the i-th edge server s i The queuing delay T q,i It is expressed as:
[0018]
[0019] in, represents the i-th edge server s i The cumulative terminal user arrival rate on base station b j The tasks on c are processed on the i-th edge server, i is the set of base stations covered by the i-th edge server; m represents the arrival rate of the mth user, and the mth user is at base station b j Within the coverage range; Set the cumulative user arrival rate λ on each edge server i must be smaller than the maximum user arrival rate λ that the edge server can handle max , that is, i <λ max If λ is not satisfied i <λ max , the task is not processed on the edge server;
[0020] Average queuing delay It is expressed as:
[0021]
[0022] Where k represents the number of edge servers.
[0023] Step 3 also includes: setting the fixed delay generated by transferring the task from the mobile terminal device to the remote cloud as T d , remote delay T c,i It is expressed as:
[0024]
[0025] The i-th edge server si The total delay T i It is expressed as:
[0026] T i =T ij +T q,i +T c,i (7)
[0027] Therefore, the average delay on the edge server It is expressed as:
[0028]
[0029] Step 3 also includes:
[0030] Building an energy consumption model:
[0031] In t 1 Time to t 2 The i-th edge server s between time i Energy consumption E i It is expressed as:
[0032]
[0033] P i (t) = P idle +(P max -P idle )×η i (t) (10)
[0034]
[0035] Where d is the integral symbol; P i (t) is the i-th edge server s i The power at time t; e i It represents the sum of the energy consumed by the task during transmission and when it is transferred to the remote location; P idle Indicates the power when the edge server is not working; P max represents the power of the edge server in full operation state; η i (t) represents the utilization rate of the i-th edge server;
[0036] The i-th edge server s i Operating cost S i,cost for:
[0037] S i,cost =ρ×E i (12)
[0038] Where ρ represents the price of electricity.
[0039] Step 3 also includes: Building a revenue model:
[0040] The following formula is used to calculate the i-th edge server s i Benefits you can get:
[0041]
[0042] Where T ideal represents the ideal delay, T max The maximum delay that the user can tolerate, S i,in represents the i-th edge server s i The benefits that can be obtained on max Indicates that when the i-th edge server s i When the delay is less than the ideal delay, the maximum benefit can be obtained; Represents the linear penalty factor.
[0043] Step 3 also includes: constructing the following objective function:
[0044] Energy consumption expenses as operating costs S i,cost , using operating cost S i,cost and the income S i,in Construct system objective function Ι:
[0045]
[0046] C5:λ i <λ max ,i=(1,2,...,k)
[0047] The placement problem of edge servers can be viewed as consisting of potential locations of mobile users, base stations, and edge servers. 1 ,…,b j ,…,b n} represents the set of base stations, |B|=n, n is the number of base stations; S={s 1 ,…,s i ,…,s k} represents the set of edge server deployment locations, |S| = k, k represents the number of edge servers; when k edge servers are placed, the base station set B is divided into k subsets, using the set C = {c 1 ,…,c i ,…,c k} means that |C|=|S|=k, and the base stations in each subset are disjoint, c i represents the i-th subset of the base station set B, and i ranges from 1 to k;
[0048] A matrix X is introduced to represent the placement of edge servers and a matrix Y is introduced to represent the allocation relationship between base stations and edge servers. ij and ij Represent the elements of matrix X and matrix Y respectively.
[0049] x ij ,y ij ∈[0,1], when x ij =1, it means that the edge server s i Deployed at base station b j On, otherwise, x ij =0;
[0050] When ij =1, it means that the base station b j Assigned to ES i , otherwise, y ij = 1. Where i = 1, 2, ..., k, j = 1, 2, ..., n.
[0051] Among them, st means being subject to or satisfying certain conditions, constraint C1 means that the edge server can only be deployed at a certain base station location; constraint C2 means that a certain base station BS is only assigned to a certain edge server, that is, the tasks on the base station are processed by the edge server; constraint C3 means that the base stations in any two subsets do not overlap with each other, that is, the tasks on a base station can only be processed by one edge server; constraint C4 means that the edge server covers all base stations, and each edge server is responsible for processing the tasks on all base stations within its coverage; constraint C5 means that the cumulative user arrival rate on each edge server is less than the maximum user arrival rate that the edge server can handle;
[0052] In step 4, an edge server deployment algorithm is established based on the improved gray wolf optimization algorithm, including the following steps:
[0053] Step 4-1: Use the inverse incomplete Γ function to update the convergence factor a. The calculation formula is:
[0054]
[0055] Among them, a min =0.4,a max =0.8 represents the maximum and minimum value of a respectively; the intermediate parameter τ = 0.01; iter is the current number of iterations; Max_iter is the maximum number of iterations;
[0056] Step 4-2: The disturbance probability calculation formula is:
[0057]
[0058] Where P is the perturbation probability; G is the dimension of the desired optimization problem;
[0059] The calculation formula for the disturbance of the gray wolf individual is:
[0060] M(g+1)=lb+r·(ub-lb), r <P
[0061] Where M(g+1) is the individual after the g+1th generation disturbance, g is the number of iterations; lb and ub are the lower and upper bounds of the gray wolf individual respectively; r is a random vector with values between [0,1]; the gray wolf individual after disturbance is updated based on the greedy mechanism, and the update formula is:
[0062]
[0063] Among them, x(g+1) represents the gray wolf individual after the g+1th generation disturbance; f(M(g+1)) and f(X(g+1)) are the fitness function values of the individual after the g+1th generation disturbance and the fitness function value of the gray wolf individual after the g+1th generation disturbance, respectively.
[0064] Step 5 includes:
[0065] Based on the binary encoding method, the gray wolf individuals are encoded and an edge server deployment scheme is established, including edge server deployment and base station allocation. Therefore, the scheme for encoding the gray wolf individuals includes both edge server deployment and base station allocation. The allocation of base stations to edge servers is a one-to-many mapping relationship. All base stations are potential edge server placement locations. A two-dimensional matrix is used as the encoding scheme. Using this encoding scheme can bring the following benefits. First, the location of the edge server is easy to find. Second, the base station allocation is clearly displayed. Third, the constraint violation judgment is simplified.
[0066] The individual coding method of the gray wolf is a k×2n matrix (k is the number of edge servers, n is the number of base stations), each row represents an edge server, and each column represents a base station. The first n columns represent the deployment matrix X, and the last n columns represent the allocation matrix Y; in the matrix X, the marked position of each row represents the deployment position of the edge server, and in the matrix Y, the marked position of each column represents the allocation of the base station represented by this column to the edge server represented by this row.
[0067] The present invention also provides an electronic device, comprising a processor and a memory, wherein the memory stores program code, and when the program code is executed by the processor, the processor executes the steps of the described method.
[0068] The present invention can help edge service providers gain more profits while meeting user needs, and can also effectively reduce system latency and energy consumption on edge servers, and has a certain guiding role in the deployment of edge servers in smart city construction.
[0069] Beneficial effects: The present invention provides an edge server deployment method of an improved grey wolf optimization algorithm, which can effectively balance system latency and energy consumption of edge servers, thereby enabling edge service providers to obtain as much profit as possible.
[0070] In order to enable service providers to obtain the maximum profit. The edge server deployment problem is modeled as a problem of optimizing delay and energy consumption. In order to be more in line with the real-world scenario, the M / M / 1 queuing model is introduced. The delay is divided into transmission delay, queuing delay and remote delay when transferring to the remote cloud; a profit model between delay and energy consumption is further proposed, which takes energy consumption as operating cost and delay as income, and then uses the relationship between the two to construct the system objective function to ensure access delay and maximize the profit of edge service providers; finally, an edge server deployment algorithm based on the gray wolf optimization algorithm is proposed, which is advanced in solving discrete optimization problems; finally, a simulation experiment is carried out using the Shanghai Telecom base station data set. The experimental results show that the algorithm is superior to its comparison algorithm in all aspects. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments, and the above and / or other advantages of the present invention will become more clear.
[0072] Figure 1 It is a schematic diagram of the edge server placement system model.
[0073] Figure 2 This is a diagram showing how system profit changes with the number of edge servers.
[0074] Figure 3 This is a schematic diagram of the edge server deployment process. DETAILED DESCRIPTION
[0075] In the embodiment of the present invention, the environment is configured on a Windows system. And a real data set of Shanghai Telecom base stations is used for simulation, which includes the base station location (latitude and longitude), the number of covered users, and the cumulative access hours of each base station for 15 consecutive days. In order to simulate the queuing delay, a task arrival rate is generated for each mobile user using Poisson distribution based on the Shanghai Telecom base station data set as the task arrival rate of the mobile device, which is processed and represented as the cumulative user arrival rate of the base station. Simulation on a real data set can better provide some guidance and help for the edge service providers in the construction of smart cities regarding the deployment location of edge servers. Some information of Shanghai Telecom base stations is shown in Table 1 below:
[0076] Table 1
[0077]
[0078] In a specific embodiment of the present invention, Figure 1 , Figure 3 As shown, from the perspective of the service provider, it aims to enable the service provider to obtain maximum profit. The edge server deployment problem is constructed as a model for optimizing latency and energy consumption. In order to fit the real scenario, the M / M / 1 queuing model is introduced. The latency is subdivided into transmission delay, queuing delay, and remote delay transferred to the cloud; further construct a profit model between latency and energy consumption, that is, energy consumption is regarded as operating cost, latency is regarded as revenue, and the relationship between the two is used to construct the system objective function to ensure access latency and maximize the profit of the edge service provider; finally, an edge server deployment algorithm based on the gray wolf optimization algorithm is proposed, which is advanced in solving discrete optimization problems. The present invention uses the data set of Shanghai Telecom base stations for simulation experiments.
[0079] 1. Transmission delay:
[0080] Without considering the transmission delay of the task request of the mobile user before accessing the base station, the present invention only considers the end-to-end delay between the base station and the server, and according to the Shannon formula, the base station b j The tasks on the server are uploaded to the edge server s i The transmission rate r ij As shown below:
[0081]
[0082] Where w represents the channel bandwidth; p j Indicates base station b j The transmission power of all base stations is assumed to be the same in the present invention; h ij Indicates base station b j With servers i The channel gain between 0represents the noise power. Then the transmission time T between the base station and ES ij As shown below:
[0083]
[0084] Among them, d(s i ,b j ) and r ij Respectively represent b j and i The distance and transmission rate between them.
[0085] 2. Queuing delay:
[0086] The present invention assumes that all servers are the same (including configuration and computing power). Assume that each terminal device has a task volume w m and a task arrival rate λ m , the arrival rate follows a Poisson distribution. And it is assumed that each server processes the computing tasks on the terminal device at the same rate μ. The present invention models the queuing delay of the terminal user as an M / M / 1 queuing model. When the task of the terminal user arrives at ES, if ES is idle, the task is processed immediately; otherwise, the task will be queued for processing. The waiting time of the user task includes the queuing time and the task processing time (the present invention ignores the delay of the server processing the task). According to the M / M / 1 queuing model, the edge server s i The queuing delay on is expressed as:
[0087]
[0088] in, Represents edge servers i The cumulative terminal user arrival rate on (the i-th edge server); b j Indicates that the base station belongs to c i The task on the base station is processed on the i-th ES, c i is the set of base stations covered by the i-th edge server; m represents the arrival rate of the mth user, and the user is at base station b j Within the coverage area of base station b j A subset of the user set covered. In order to accurately calculate the queuing delay, assume that the cumulative user arrival rate λ on each ES i must be smaller than the maximum user arrival rate λ that ES can handle max , that is, i <λ max .
[0089] Therefore, the average queuing delay It is expressed as:
[0090]
[0091] 3. Remote delay:
[0092] When the system processes too many tasks, the queue length increases, resulting in higher queuing delays, which affects the user experience. To alleviate this problem, it is necessary to transfer tasks that cannot be processed by the edge server to the cloud data center, which will introduce additional remote delays. Assume that the fixed delay generated by transferring tasks from the terminal network to the cloud data center is T d , because cloud data centers have powerful computing capabilities, the computing delay in cloud data centers can be ignored. Therefore, the remote delay T c,i It can be expressed as:
[0093]
[0094] Therefore, the edge servers i The total delay T i It can be expressed as:
[0095] T i =T ij +T q,i +T c,i (7)
[0096] Therefore, the average delay on the edge server It can be expressed as:
[0097]
[0098] 4. Energy consumption model:
[0099] In the edge server (ES) system, the energy consumption of the server in idle state is about 60% of the energy consumption when it is running at full load. In order to reduce the total energy consumption of the system, save energy and reduce environmental pollution, the deployment plan of the edge server must be optimized. There are many factors that affect the energy consumption of the edge server, including CPU, memory, hard disk, network card, etc. Among them, the CPU status has the most significant impact on the energy consumption of the edge server. There is a linear relationship between the energy consumption of the edge server and the CPU utilization. Therefore, the CPU utilization can be used to indirectly represent the resource utilization of the edge server, and further infer its energy consumption. The energy consumption of ES can be expressed as a linear relationship with the CPU utilization. Therefore, the CPU utilization can be used to represent the resource utilization of the edge server, that is, the energy consumption of ES can be indirectly obtained by the CPU utilization. Therefore, the edge server s i Energy consumption E i It is expressed as:
[0100]
[0101] P i (t) = P idle +(P max -P idle )×η i (t) (10)
[0102]
[0103] Among them, P i (t) is the edge server s i The power at time t; e i It represents the sum of the energy consumed by the task during transmission and when it is transferred to the remote location; P idle Indicates the power when ES is not working; P max Indicates the power of ES in full operation state; η i (t) represents the utilization rate of ES, which is calculated using the cumulative user arrival rate on ES.
[0104] The present invention uses the energy consumption on the edge server to represent the operating cost of the service provider. i Operating cost S i,cost for:
[0105] S i,cost =ρ×E i (12)
[0106] ρ represents the price of electricity.
[0107] Revenue model:
[0108] When the delay on the server is less than T ideal (ideal delay), the user can get satisfactory service. If the delay on the server is greater than T ideal When the delay is greater than T, the user's quality of experience begins to decline. Therefore, as a penalty, the server's revenue will decrease linearly. max (the maximum delay that the user can tolerate), the user cannot accept the service quality at all and the benefit obtained is 0. Therefore, the edge server s i The benefits that can be obtained can be calculated by formula (4-10):
[0109]
[0110] Among them, S i,in Represents edge servers i The revenue that can be obtained from the transaction is the fee that the user has to pay; max It means that when the delay on the server is less than the ideal delay, the maximum benefit can be obtained; Represents a linear penalty factor. When the system delay is greater than the ideal delay and less than the maximum delay that the user can tolerate, the benefits that can be obtained will decrease linearly. When the system delay is greater than the maximum tolerable delay, the user experience is extremely poor. At this time, the user does not need to pay any fees to the service provider, that is, the benefits on the server are zero.
[0111] 5. Objective function:
[0112] In the MEC (mobile edge computing) system, edge service providers deploy edge servers in wireless metropolitan area networks to provide services to users. For edge service providers, if they want to make more profits, they need to reduce operating costs and increase revenue. In other words, if edge service providers expect to make more profits, they must reduce the energy consumption of edge servers to cut expenses, while providing users with lower latency to improve user experience quality and increase revenue. This paper uses energy consumption expenditure as operating cost S i,cost , using operating cost S i,cost and the income S i,in Construct the system objective function Ι (total profit), and the mathematical model is described as follows:
[0113]
[0114]
[0115] C5:λ i <λ max ,i=(1,2,...,k)
[0116] Constraint C1 means that ES can only be deployed at a certain base station location; Constraint C2 means that a certain BS is only assigned to a certain ES, that is, the tasks on the base station are processed by the edge server; Constraint C3 means that the base stations in any two subsets do not overlap, that is, the tasks on a base station can only be processed by one edge server; Constraint C4 means that ES covers all base stations, and each ES is responsible for processing the tasks on all base stations within its coverage; Constraint C5 means that the cumulative user arrival rate on each ES is less than the maximum user arrival rate that the ES can handle, where λ max is the maximum user arrival rate.
[0117] 6. Improved nonlinear convergence factor
[0118] During the iteration process, the convergence factor a decreases linearly, which makes the algorithm converge slowly. In order to make the algorithm have stronger overall search ability and local exploration ability during the iterative optimization process, and maintain faster convergence speed and convergence accuracy. The inverse incomplete Γ function is used to update the convergence factor a, and the calculation formula is as follows:
[0119]
[0120] Among them, this section sets each parameter to a min =1; a max =2; τ = 0.01; iter is the current number of iterations; Max-iter is the maximum number of iterations.
[0121] 7. Add perturbation function
[0122] As the number of iterations of the algorithm increases, the algorithm's optimization ability gradually tends to converge. If it converges at the local optimum, it is difficult to jump out of the local optimum. In order to solve the above problem, adding a perturbation mechanism to the population update can effectively improve the algorithm's ability to jump out of the local optimum. Therefore, adding a perturbation with a certain probability to the original algorithm can enhance the population diversity in the later stage of the algorithm's optimization, creating favorable conditions for getting rid of local convergence. The perturbation probability calculation formula is as follows:
[0123]
[0124] P is the perturbation probability; G is the dimension of the desired optimization problem; Max_iter is the maximum number of iterations. In the early stages of the algorithm iteration, the perturbation probability is small so that the algorithm can quickly find the global optimal solution; in the later stages of the algorithm iteration, the perturbation probability increases, enhancing population diversity. The calculation formula for the perturbation of the gray wolf individual is as follows:
[0125] M(g+1)=lb+r·(ub-lb), r <P
[0126] Where M(g+1) is the individual after the g+1th generation disturbance, g is the number of iterations; lb and ub are the lower and upper bounds of the gray wolf individual respectively; r is a random vector with values between [0,1]. The gray wolf individual after disturbance is updated based on the greedy mechanism, and the update formula is:
[0127]
[0128] Among them, X(g+1) represents the gray wolf individual after the g+1th generation disturbance; f(M(g+1)) and f(X(g+1)) are the fitness function values of the individual after the g+1th generation disturbance and the fitness function value of the gray wolf individual after the g+1th generation disturbance, respectively.
[0129] 8. Coding Scheme
[0130] Based on the binary encoding method, the gray wolf individuals are encoded. An edge server ES deployment scheme is established, including edge server ES deployment and base station allocation. Therefore, the encoding scheme should include both relationships at the same time. And the allocation of base stations to edge servers ES is a one-to-many mapping relationship. As mentioned above, all base stations are potential edge server ES placement locations. The encoding method of the present invention is shown in Table 2 below, where '1' is used to represent the placement location of the edge server ES and the allocation relationship between the edge server ES and the base station.
[0131] Table 2
[0132] Serial number 1 2 3 … n-1 n n+1 n+2 … 2n-1 2n 1 1 1 2 1 3 … k-1 1 1 k 1 1 1
[0133] In Table 2 above, the individual coding method is a k×2n matrix, each row represents an ES (edge server), and each column represents a BS (base station). The first n columns represent the deployment matrix X, and the last n columns represent the allocation matrix Y. In matrix X, the position marked as 1 in each row represents the deployment location of the edge server. In matrix Y, the position marked as 1 in each column represents the allocation of the base station represented by this column to the edge server represented by this row. Take Table 2 above as an example: the second row indicates that the edge server numbered 2 is deployed on the base station numbered 3, and the base station numbered 3 is assigned to the edge server; the k-1th row indicates that the edge server numbered k-1 is deployed on the base station numbered n-1, and the station numbered n-1 is assigned to the edge server. Due to the constraints C1 and C2 of the formula in the objective function, the marked positions in the matrix should comply with the following rules:
[0134] (1) In the matrix X, each row must have at most one label, and the labels between any two rows are not in the same column.
[0135] (2) In the matrix Y, each column can only have one marker (the column can only have one base station assigned to the ES).
[0136] (3) In matrices X and Y, labels in the same column must be in the same row, because the base station where the edge server is deployed must be assigned to the edge server.
[0137] The experimental results are as follows Figure 2 As shown in the figure, the number of base stations remains unchanged at 2753, and the number of edge servers is increased. Figure 2The total profit of the system changes with the increase in the number of edge servers. As can be seen from the figure, this method can enable edge service providers to obtain the maximum profit. As the number of edge servers increases, the system profit increases linearly. This is because as the number of edge servers increases, the delay in the system continues to decrease, so that the system revenue continues to increase; and the energy consumption in the system decreases with the increase in the number of edge servers, so that the operating cost in the system is reduced, so the system profit continues to increase. The Top-K algorithm has the lowest profit because the algorithm deploys the server on the base station with the largest load, which causes high energy consumption on the server, thereby increasing the operating cost of the server, so the algorithm generates the lowest profit. As can be seen from the figure, this method has the highest profit, followed by MIP, Random, K-means and Top-K algorithms.
[0138] The present invention provides an edge server deployment method that maximizes profits. There are many methods and ways to implement the technical solution. The above is only a preferred implementation of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention. All components not specified in this embodiment can be implemented using existing technologies.
Claims
1. A method for deploying edge servers to maximize profits, characterized in that: The following steps are involved: Step 1: Set the edge server deployment scenario to a smart city scenario; Step 2, preprocessing the Shanghai Telecom base station data set, wherein the data set includes the number of base stations, the longitude and latitude coordinates of the base stations, and the data volume of mobile terminal devices accessing the base stations; Step 3, construct mathematical model and objective function; Step 4: Establish edge server deployment algorithm; Step 5: Complete edge server deployment and base station allocation according to the edge server deployment algorithm.
2. The method according to claim 1, characterized in that Step 3 includes: considering only the end-to-end delay between the base station and the server, and according to the Shannon formula, the base station b j The task on is uploaded to the i-th edge server s i The transmission rate r ij for: Where w represents the channel bandwidth; p j Indicates base station b j The transmission power of all base stations is set to be the same; h ij Indicates base station b j With the i-th edge server s i The channel gain between them; N0 represents the noise power; then the base station b j With the i-th edge server s i The transmission time T ij for: Among them, d(s i ,b j ) represents base station b j and the i-th edge server s i The distance between i )、l(b j ) represent the location of the i-th edge server and the j-th base station respectively.
3. The method according to claim 2, characterized in that Step 3 also includes: Assume that all edge servers are the same and each mobile terminal device has a task volume w m and a task arrival rate λ m , task arrival rate λ m It obeys Poisson distribution; and each edge server is set to process the computing tasks on the terminal device at the same rate μ; the terminal user's queuing delay is modeled as the task arrival process follows the Poisson process; the service time follows the exponential distribution queuing model. When the task of the mobile terminal device arrives at the edge server, if the edge server is idle, the task is processed immediately; otherwise, the task will be queued for processing; the waiting time of the terminal user's task includes the queuing time and the task processing time. According to the M / M / 1 queuing model, the i-th edge server s i The queuing delay T q,i It is expressed as: in, represents the i-th edge server s i The cumulative terminal user arrival rate on base station b j The tasks on c are processed on the i-th edge server, i is the set of base stations covered by the i-th edge server; m represents the arrival rate of the mth user, and the mth user is at base station b j Within the coverage range; Set the cumulative user arrival rate λ on each edge server i must be smaller than the maximum user arrival rate λ that the edge server can handle max , that is, i <λ max If λ is not satisfied i <λ max , the task is not processed on the edge server; Average queuing delay It is expressed as: Where k represents the number of edge servers.
4. The method according to claim 3, characterized in that Step 3 also includes: setting the fixed delay generated by transferring the task from the mobile terminal device to the remote cloud as T d , remote delay T c,i It is expressed as: The i-th edge server s i The total delay T i It is expressed as: T i =T ij +T q,i +T c,i (7) Therefore, the average delay on the edge server It is expressed as:
5. The method according to claim 4, characterized in that Step 3 also includes: Building an energy consumption model: Between time t1 and time t2, the i-th edge server s i Energy consumption E i It is expressed as: P i (t)=P idle +(P max -P idle )×η i (t) (10) Where d is the integral symbol; P i (t) is the i-th edge server s i The power at time t; e i It represents the sum of the energy consumed by the task during transmission and when it is transferred to the remote location; P idle Indicates the power when the edge server is not working; P max represents the power of the edge server in full operation state; η i (t) represents the utilization rate of the i-th edge server; The i-th edge server s i Operating cost S i,cost for: S i,cost =ρ×E i (12) Where ρ represents the price of electricity.
6. The method according to claim 5, characterized in that Step 3 also includes: Building a revenue model: The following formula is used to calculate the i-th edge server s i Benefits you can get: Where T ideal represents the ideal delay, T max Indicates the maximum delay that the user can tolerate, S i,in represents the i-th edge server s i The benefits that can be obtained on max Indicates that when the i-th edge server s i When the delay is less than the ideal delay, the maximum benefit can be obtained; Represents the linear penalty factor.
7. The method according to claim 6, characterized in that Step 3 also includes: constructing the following objective function: Energy consumption expenses as operating costs S i,cost , using operating cost S i,cost and the income S i,in Construct system objective function Ι: C5:λ i <λ max ,i=(1,2,...,k) Where B={b1,…,b j ,…,b n } represents the set of base stations, |B| = n, n is the number of base stations; S = {s1,…,s i ,…,s k } represents the set of edge server deployment locations, |S| = k, k represents the number of edge servers; when k edge servers are placed, the base station set B is divided into k subsets, using the set C = {c1,…,c i ,…,c k } means that |C|=|S|=k, and the base stations in each subset are disjoint, c i represents the i-th subset of the base station set B, and i ranges from 1 to k; We introduce a matrix X to represent the placement of edge servers and a matrix Y to represent the allocation relationship between base stations and edge servers. The binary decision variable x ij and ij Represent the elements of matrix X and matrix Y respectively; x ij ,y ij ∈[0,1], when x ij =1, it means that the edge server s i Deployed at base station b j On, otherwise, x ij =0; When ij =1, it means that the base station b j Assigned to ES i Otherwise, y ij =1; Where i=1,2,…,k, j=1,2,…,n; st means being subject to or satisfying a certain condition.
8. The method according to claim 7, characterized in that In step 4, an edge server deployment algorithm is established based on the improved gray wolf optimization algorithm, including the following steps: Step 4-1: Use the inverse incomplete Γ function to update the convergence factor a. The calculation formula is: Among them, a min ,a max They represent the maximum and minimum values of a respectively; τ is an intermediate parameter; iter is the current number of iterations; Max_iter is the maximum number of iterations; Step 4-2: The disturbance probability calculation formula is: Where P is the perturbation probability; G is the dimension of the desired optimization problem; The calculation formula for the disturbance of the gray wolf individual is: M(g+1)=lb+r·(ub-lb), r<P Where M(g+1) is the individual after the g+1th generation disturbance, g is the number of iterations; lb and ub are the lower and upper bounds of the gray wolf individual respectively; r is a random vector with values between [0,1]; the gray wolf individual after disturbance is updated based on the greedy mechanism, and the update formula is: Among them, X(g+1) represents the gray wolf individual after the g+1th generation disturbance; f(M(g+1)) and f(X(g+1)) are the fitness function values of the individual after the g+1th generation disturbance and the fitness function value of the gray wolf individual after the g+1th generation disturbance, respectively.
9. The method according to claim 8, characterized in that Step 5 includes: Based on the binary coding method, the gray wolf individuals are encoded, and an edge server deployment scheme is established, including edge server deployment and base station allocation. Therefore, the scheme for encoding the gray wolf individuals includes both edge server deployment and base station allocation. The allocation of base stations to edge servers is a one-to-many mapping relationship. All base stations are potential edge server placement locations. A two-dimensional matrix is used as the coding scheme. The gray wolf individual coding method is a k×2n matrix. Each row represents an edge server, and each column represents a base station. The first n columns represent the deployment matrix X, and the last n columns represent the allocation matrix Y. In the matrix X, the marked position of each row represents the deployment position of the edge server. In the matrix Y, the marked position of each column represents the allocation of the base station represented by this column to the edge server represented by the row.
10. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores program codes, and when the program codes are executed by the processor, the processor executes the steps of the method according to any one of claims 1 to 9.