Equipment deployment method and device, equipment and readable storage medium
By clustering the base stations in the wireless metropolitan area network and iteratively updating the pheromone matrix, the deployment of edge servers is optimized, solving the problems of high delay and load imbalance caused by the deployment of edge servers in the wireless metropolitan area network, and achieving low cost. Balancing effects of latency and load balancing.
Patent Information
- Application Number
- CN202411125956.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2024-10-11
AI Technical Summary
In wireless metropolitan area networks, the placement of edge servers leads to high access latency and load imbalance, with some servers being overloaded and some servers being idle.
By clustering the base stations in the target area, the cluster center is determined as the network address of the edge server, and the pheromone matrix and tabu table are used for iterative updates to optimize the distribution relationship between base stations and edge servers to ensure load balancing and minimal delay. change.
On the premise of ensuring service quality, an optimized balance between low latency and load balancing is achieved, and the problems of high latency and load imbalance in edge server deployment are solved.
Smart Images

Figure CN118764876A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a device deployment method, apparatus, device and readable storage medium. Background Art
[0002] By offloading computing tasks from mobile devices to edge servers with sufficient computing resources, network congestion and data propagation delay can be effectively reduced. Edge server placement is the core of task offloading. Edge server placement is to design a specific method to select the appropriate geographical location for the edge server within a certain geographical location range, while meeting user needs and goals, taking into account user and resource constraints, to achieve the ultimate goal of minimizing network delays and balancing access resources.
[0003] Due to the high population density in urban areas covered by current wireless metropolitan area networks, edge servers are generally placed in wireless metropolitan area networks, but the following problems may exist: mobile users access edge servers through base stations, and the inefficient placement of edge servers will lead to long access delays and serious workload imbalance among edge servers; the network address of the edge server determines the user range it serves. Due to the large scale of wireless metropolitan area networks, some edge servers may be overloaded, while others may be underused or even idle (load imbalance).
[0004] In summary, how to effectively solve the specific deployment of edge servers and other issues is a technical problem that technical personnel in this field urgently need to solve. Summary of the invention
[0005] The purpose of this application is to provide a device deployment method, apparatus, device and readable storage medium, which can achieve an optimized balance between low latency and load balancing while ensuring service quality by deploying edge servers.
[0006] In order to solve the above technical problems, this application provides the following technical solutions:
[0007] A device deployment method, comprising:
[0008] Performing clustering processing on the base stations in the target area to obtain at least two cluster centers;
[0009] Determining the cluster center as the network address of the edge server;
[0010] Based on the base station and the edge server, an initial pheromone matrix and a taboo table are constructed; wherein the pheromone matrix records the allocation relationship between the base station and the edge server, and the taboo table records the edge server with full load;
[0011] Determine the average load of the edge server, and use the average load to iteratively update the pheromone matrix and the taboo table;
[0012] After the iterative update is completed, the base station allocation information is determined based on the pheromone matrix;
[0013] The edge server is deployed in combination with the network address and the base station allocation information.
[0014] Preferably, determining the cluster center as the network address of the edge server includes:
[0015] Obtaining a target base station of a cluster center in the cluster center;
[0016] Obtaining a base station address of the target base station;
[0017] The base station address is determined as the network address of the edge server.
[0018] Preferably, determining the average load of the edge server includes:
[0019] Obtaining and accumulating the loads of the base stations in the target area to obtain the total load of the target area;
[0020] Comparing the total load with the number of edge servers to obtain a ratio;
[0021] The ratio is determined as the average load of the edge server.
[0022] Preferably, based on the base station and the edge server, an initial pheromone matrix is constructed, including:
[0023] Creating the pheromone matrix based on the number of the base stations and the number of the edge servers;
[0024] Wherein, the pheromone matrix:
[0025]
[0026] Among them, τ ij Record base station b i With edge servers j The distribution relationship between them, n is the number of all base stations, and k is the number of all edge servers.
[0027] Preferably, the pheromone matrix and the taboo table are iteratively updated by utilizing the average load, including:
[0028] Base station b i Traverse the list of edge servers outside the taboo table to determine the nearest current edge server;
[0029] The current edge server s in the pheromone matrix j The sum of the pheromones plus the sum of the current base station load is determined as the current edge server s j Total load in, i∈{1, 2, 3, ..., n};
[0030] Determine the total load Is the load above average?
[0031] If yes, continue to look for the next nearest edge server;
[0032] If not, the base station is assigned to the current edge server, the pheromone matrix is updated, and the base station b i The allocation plan is recorded to the current edge server plan E s middle;
[0033] After completing the allocation of a base station, detecting whether there is an edge server in the pheromone matrix whose load exceeds the average load;
[0034] If yes, then add the edge server to the taboo table;
[0035] Wherein, updating the pheromone matrix includes:
[0036] when When τ ij =0;
[0037] When b i ∈s j hour,
[0038] Among them, when base station b i Not allocated in s j When τ ij The value is 0; when base station b i Allocated in s j When τ ij The value is base station b i The load size;
[0039] Among them, the taboo table update conditions:
[0040] when When j =F;
[0041] when , F remains unchanged; wherein F is the taboo table.
[0042] Preferably, determining base station allocation information based on the pheromone matrix includes:
[0043] Based on the pheromone matrix, a base station allocation scheme is determined; wherein the base station allocation scheme is C(b i ,s j )(b i ∈B∪s j ∈S);
[0044] use and Determine the load standard deviation ω and average delay under the base station allocation scheme
[0045] The base station allocation scheme, the load standard deviation ω and the average delay Determine to allocate information to the base station.
[0046] Preferably, deploying the edge server in combination with the network address and the base station allocation information includes:
[0047] Determine the load standard deviation ω and the average delay Whether the preset deployment conditions are met;
[0048] If yes, the edge server is deployed using the network address and the base station allocation scheme.
[0049] A device deployment apparatus, comprising:
[0050] A cluster processing module, used to perform cluster processing on the base stations in the target area to obtain at least two cluster centers;
[0051] A network address determination module, used to determine the cluster center as the network address of the edge server;
[0052] An initialization module, used to construct an initial pheromone matrix and a taboo table based on the base station and the edge server; wherein the pheromone matrix records the allocation relationship between the base station and the edge server, and the taboo table records the edge server with full load;
[0053] An updating module, used for determining an average load of the edge server, and iteratively updating the pheromone matrix and the taboo table using the average load;
[0054] An allocation determination module, used to determine base station allocation information based on the pheromone matrix after the iterative update is completed;
[0055] A deployment module is used to deploy the edge server in combination with the network address and the base station allocation information.
[0056] An electronic device, comprising:
[0057] Memory for storing computer programs;
[0058] A processor is used to implement the steps of the above-mentioned device deployment method when executing the computer program.
[0059] A readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned device deployment method are implemented.
[0060] A computer program product includes a computer program / instruction, which, when executed by a processor, implements the steps of the above-mentioned device deployment method.
[0061] Applying the method provided in the embodiment of the present application, the base stations in the target area are clustered to obtain at least two cluster centers; the cluster center is determined as the network address of the edge server; based on the base station and the edge server, an initial pheromone matrix and taboo table are constructed; wherein the pheromone matrix records the allocation relationship between the base station and the edge server, and the taboo table records the edge server with full load; the average load of the edge server is determined, and the average load is used to iteratively update the pheromone matrix and taboo table; after the iterative update is completed, the base station allocation information is determined based on the pheromone matrix; and the edge server is deployed in combination with the network address and the base station allocation information.
[0062] In this application, in order to reduce the delay, when determining the network address of the edge server, the base stations in the target area where the edge server needs to be placed are first clustered to obtain at least two cluster centers, and then each cluster center is determined as the network address of the edge server. In this way, the network delay from the base station to the edge server can be reduced. In order to effectively balance the load, a pheromone matrix is established to record the allocation relationship between the base station and the edge server, and a taboo table is established to record the edge server with full load. The average load of the edge server is determined, and the pheromone matrix and the taboo table are iteratively updated using the average load. The edge server can be allocated to the base station in the target area while ensuring the load balance of the edge server. After the iterative update is completed, the base station allocation information can be determined based on the pheromone matrix, and the edge server is finally deployed in combination with the network address and the base station allocation information.
[0063] Technical effect: Achieve an optimal balance between low latency and load balancing while ensuring service quality.
[0064] Correspondingly, the embodiments of the present application also provide a device deployment apparatus, a device, a readable storage medium and a computer program product corresponding to the above-mentioned device deployment method, which have the above-mentioned technical effects and are not repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0066] Figure 1 This is a flow chart for implementing a device deployment method in an embodiment of the present application;
[0067] Figure 2 A schematic diagram of the position relationship between an edge server and a base station;
[0068] Figure 3 A schematic diagram of an edge server placement system model;
[0069] Figure 4 This is a specific implementation flow chart of a device deployment method in an embodiment of the present application;
[0070] Figure 5 This is a schematic diagram of the structure of a device deployment apparatus in an embodiment of the present application;
[0071] Figure 6 This is a schematic diagram of the structure of an electronic device in an embodiment of the present application;
[0072] Figure 7 This is a schematic diagram of the specific structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0073] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0074] Deployment of edge servers mainly involves two issues: network address selection of edge servers and allocation of base stations they serve. In this application, the network address and base station allocation are determined based on a heuristic algorithm. For details, please refer to Figure 1 , Figure 1 This is a flow chart of a device deployment method in an embodiment of the present application. The device may be specifically an edge server. The method includes the following steps:
[0075] S101. Perform clustering processing on base stations in a target area to obtain at least two cluster centers.
[0076] The target area is specifically an area where an edge server needs to be deployed, for example, the target area may be a wireless metropolitan area network.
[0077] In this application, firstly, the base stations in the target area are clustered based on the distance, so as to obtain at least two cluster centers. The specific implementation includes:
[0078] B={b1,b2,b3,...,b k};
[0079]
[0080] Among them, d(P b , P s ) is the distance between two base stations, hav(θ) is the semi-haversine formula, which is used to determine the distance between two points on a great circle based on the longitude and latitude of the two points. B is the base station set, n represents the base station order, R is the radius, θ is the central angle between the two base station locations, and (α1, σ1) and (α2, σ2) are the latitude and longitude coordinates between the two base stations. Take the locations of K base stations as the centroid of the cluster, iterate with the minimum distance until the centroid remains unchanged, and obtain k clusters, i.e., k A i (A is a set of edge server placement solutions):
[0081] A i ={..., b j , ...}, (1≤i≤k)∪(b j ∈B)∪min(d(b, b i ))(4) Among them, A i represents the set of base stations in the i-th cluster, and b represents each base station in the i-th cluster in the base station set B.
[0082] S102: Determine the cluster center as the network address of the edge server.
[0083] After obtaining at least two cluster centers, the addresses corresponding to the cluster centers can be determined as the network addresses of the edge servers.
[0084] In a specific implementation of the present application, determining the cluster center as the network address of the edge server includes:
[0085] Obtain the target base station of the cluster center in the cluster center;
[0086] Obtain the base station address of the target base station;
[0087] The base station address is determined as the network address of the edge server.
[0088] That is to say, the clustering method adopted by the heuristic algorithm is to set the edge server at the center of a cluster, and the location of the cluster center base station is the location of the edge server Select b i The base station is s j The network address of the edge server, then b i The base station address is s j Edge server address, that is:
[0089]
[0090] S103: Based on the base station and the edge server, construct an initial pheromone matrix and taboo table.
[0091] Among them, the pheromone matrix records the allocation relationship between base stations and edge servers, and the taboo table records the edge servers that are fully loaded.
[0092] A row of the pheromone matrix corresponds to a base station, and a column corresponds to an edge server, that is, the scale of the pheromone matrix is related to the number of base stations and edge servers. Each element corresponds to whether the base station is assigned to the corresponding edge server. In the initially constructed pheromone matrix, the elements can all be initialized to 0.
[0093] Correspondingly, the taboo table records the edge servers that are fully loaded, that is, the edge servers recorded in the table no longer participate in the base station allocation. The taboo table can be empty in the initial state, and the fully loaded edge servers are gradually written as the base station allocation proceeds.
[0094] In a specific implementation of the present application, an initial pheromone matrix is constructed based on a base station and an edge server, including:
[0095] Based on the number of base stations and the number of edge servers, a pheromone matrix is created;
[0096] Among them, the pheromone matrix:
[0097]
[0098] Among them, τ ij Record base station b i With edge servers j The distribution relationship between them, n is the number of all base stations, and k is the number of all edge servers.
[0099] That is to say, in the process of base station allocation, the pheromone matrix T in the ant colony algorithm can be introduced t And taboo table F. In this pheromone matrix, τ ij Record base station b i With edge servers jThe distribution relationship between them, n is the number of all base stations, k is the number of all edge servers, Assigned to edge servers j A collection of base stations.
[0100] when When τ ij =0;
[0101] When b i ∈s j hour,
[0102] When base station b i Not allocated in s j When τ ij The value is 0; when base station b i Allocated in s j When τ ij The value is base station b i The load size.
[0103] S104: Determine the average load of the edge server, and use the average load to iteratively update the pheromone matrix and the taboo table.
[0104] In order to balance the load among the edge servers, when allocating edge servers to the base station, the edge servers may be allocated according to the principle of load priority allocation, and the total load of the edge servers shall not exceed the average load.
[0105] That is to say, the base station allocation process follows the following two principles: First, the load priority allocation principle. All base stations are sorted in descending order according to load size before allocation. Base stations with large loads are allocated first to reduce the imbalance of loads on each edge server. Second, if the load size of a certain edge server is Over average load No base station allocation is performed.
[0106] In a specific implementation of the present application, determining the average load of the edge server includes:
[0107] Obtain the load of the base stations in the target area and accumulate them to obtain the total load of the target area;
[0108] Compare the total load with the number of edge servers to get a ratio;
[0109] The ratio is determined as the average load of the edge server.
[0110] Specifically, the locations of K edge servers can be obtained in the optimal placement plan of edge servers, and then the base stations are allocated. First, the average load of the edge server is calculated using the following formula:
[0111]
[0112] in, is the load of each base station, b i is a base station in the base station set B, K is the number of edge servers, is the average load of the edge server.
[0113] After calculating the average load, an edge server can be assigned to each base station based on the above two allocation rules, that is, a base station corresponding to each edge server is assigned. The allocation process is the process of continuously updating the pheromone matrix and taboo table.
[0114] In a specific implementation of the present application, the pheromone matrix and the taboo table are iteratively updated using the average load, including:
[0115] Base station b i Traverse the list of edge servers outside the taboo table to determine the nearest current edge server;
[0116] The current edge server s in the pheromone matrix j The sum of the pheromones plus the sum of the current base station load is determined as the current edge server s j Total load in, i∈{1, 2, 3, ..., n};
[0117] Determine the total load Is the load above average?
[0118] If yes, continue to look for the next nearest edge server;
[0119] If not, assign the base station to the current edge server, update the pheromone matrix, and assign the base station b i The allocation plan is recorded to the current edge server plan E s middle;
[0120] After completing the allocation of a base station, check whether there is an edge server with a load exceeding the average load in the pheromone matrix;
[0121] If yes, add the edge server to the taboo list;
[0122] Among them, updating the pheromone matrix includes:
[0123] when When τ ij =0;
[0124] When b i ∈s j hour,
[0125] Among them, when base station b i Not allocated in s j When τ ij The value is 0; when base station b i Allocated in s j When τ ij The value is base station b i The load size;
[0126] Among them, the taboo table update conditions are:
[0127] when When j =F;
[0128] when When , F remains unchanged; where F is the taboo table.
[0129] For ease of description, the above steps are combined for explanation below.
[0130] Taboo table F is a list of fully loaded edge servers. When the base station allocates, it searches for the nearest edge server in the list of edge servers that can be allocated outside the taboo table. The edge servers that enter taboo table F must meet the following requirements:
[0131] In the process of base station allocation, the load priority allocation principle is adopted, and the base station with large load b i Priority allocation.
[0132] when hour, and
[0133] when When τ ij =0;
[0134] Base station b i When traversing the list of edge servers outside the taboo table, find the nearest edge server to make a judgment: if the current edge server s in the pheromone matrix j If the sum of the pheromone of plus the current base station load exceeds the average load, no allocation is made and the search for the next nearest edge server continues; if the load does not exceed the average load, the base station is allocated to the current edge server, the pheromone table is updated, and the base station b i The distribution plan records to the edge server plan E s Each time a base station is assigned, it is necessary to check whether there is an edge server in the pheromone table that exceeds the load balancing value. If there is, the edge server is added to the taboo table and no longer traversed. The taboo table update rule is:
[0135] when When j =F;
[0136] when When , F remains unchanged.
[0137] S105. After the iterative update is completed, the base station allocation information is determined based on the pheromone matrix.
[0138] Specifically, after all base stations are assigned corresponding edge servers, it may be determined that the updating of the pheromone matrix and the taboo table is completed.
[0139] Since the pheromone matrix records the allocation relationship between base stations and edge servers, the base station allocation information can be determined from the pheromone matrix.
[0140] Specifically, each row in the pheromone matrix can be traversed to find out the elements in the row that are not 0, and thus it can be determined to which edge server the base station corresponding to the row is assigned.
[0141] In one embodiment of the present application, determining base station allocation information based on the pheromone matrix includes:
[0142] Based on the pheromone matrix, the base station allocation scheme is determined; where the base station allocation scheme is C(b i ,s j )(b i ∈B∪s j ∈S);
[0143] use and Determine the load standard deviation ω and average delay under the base station allocation scheme
[0144] Base station allocation scheme, load standard deviation ω and average delay Determine the allocation information for the base station.
[0145] That is to say, after completing the base station allocation, the base station allocation scheme C (b i ,s j )(b i ∈B∪s j ∈S), thus we can get the load standard deviation ω and average delay under this scheme
[0146]
[0147]
[0148] S106: Deploy edge servers based on the network address and base station allocation information.
[0149] That is, when deploying edge servers, their deployment locations are determined based on the network addresses; and based on the base station allocation information, it is determined which base stations each edge server serves.
[0150] In a specific implementation of the present application, the edge server is deployed in combination with the network address and the base station allocation information, including:
[0151] Determine the load standard deviation ω and average delay Whether the preset deployment conditions are met;
[0152] If so, deploy edge servers using the network address and base station allocation scheme.
[0153] That is, in this application, the deployment conditions can also be pre-set, and the deployment conditions can be specifically the threshold of the load standard deviation and the threshold of the average delay. When the corresponding thresholds are met, edge servers are deployed in the target area based on the network address and base station allocation plan.
[0154] Applying the method provided in the embodiment of the present application, the base stations in the target area are clustered to obtain at least two cluster centers; the cluster center is determined as the network address of the edge server; based on the base station and the edge server, an initial pheromone matrix and taboo table are constructed; wherein the pheromone matrix records the allocation relationship between the base station and the edge server, and the taboo table records the edge server with full load; the average load of the edge server is determined, and the average load is used to iteratively update the pheromone matrix and taboo table; after the iterative update is completed, the base station allocation information is determined based on the pheromone matrix; and the edge server is deployed in combination with the network address and the base station allocation information.
[0155] In this application, in order to reduce the delay, when determining the network address of the edge server, the base stations in the target area where the edge server needs to be placed are first clustered to obtain at least two cluster centers, and then each cluster center is determined as the network address of the edge server. In this way, the network delay from the base station to the edge server can be reduced. In order to effectively balance the load, a pheromone matrix is established to record the allocation relationship between the base station and the edge server, and a taboo table is established to record the edge server with full load. The average load of the edge server is determined, and the pheromone matrix and the taboo table are iteratively updated using the average load. The edge server can be allocated to the base station in the target area while ensuring the load balance of the edge server. After the iterative update is completed, the base station allocation information can be determined based on the pheromone matrix, and the edge server is finally deployed in combination with the network address and the base station allocation information.
[0156] Technical effect: Achieve an optimal balance between low latency and load balancing while ensuring service quality.
[0157] In a specific implementation of the present application, when a preset reset condition is met, the base stations in the target area are re-clustered to obtain at least two cluster centers; the cluster center is determined as the network address of the edge server; based on the base station and the edge server, an initial pheromone matrix and taboo table are constructed; wherein the pheromone matrix records the allocation relationship between the base station and the edge server, and the taboo table records the edge server with full load; the average load of the edge server is determined, and the average load is used to iteratively update the pheromone matrix and taboo table; after the iterative update is completed, the base station allocation information is determined based on the pheromone matrix; and the edge server is deployed in combination with the network address and the base station allocation information.
[0158] Considering that users are mobile and the access to base stations will change in real time, the load size of each base station also presents a certain degree of dynamics. The placement of mobile edge servers is also a dynamic process, that is, once the base station load changes, the placement location of the mobile edge server and the base station allocation result will also change accordingly. Therefore, a reset condition can be provided, which can be specifically that the mean square error of the load of the edge server exceeds the threshold, or the load of a certain edge server is lower than the minimum threshold, or the average delay is greater than the preset threshold. When the reset condition is met, repeat the above steps S101 to S106, so that the edge server meets the actual user access situation at the moment.
[0159] To facilitate those skilled in the art to better implement and understand the device deployment method provided in the embodiments of the present application, a comparative explanation is provided below in conjunction with relevant technical solutions.
[0160] Please refer to Figure 2 By offloading computing tasks from mobile devices to edge servers with sufficient computing resources, network congestion and data propagation delay can be effectively reduced. Edge server placement is the core of task offloading. Edge server placement is to design a specific method to select the appropriate geographical location for the edge server within a certain geographical location range, while meeting user needs and goals, taking into account user and resource constraints, to achieve the ultimate goal of minimizing network delays and balancing access resources. An efficient edge server placement method can effectively meet the needs of mobile users for low latency, high bandwidth, and other access requirements.
[0161] Due to the high population density in urban areas covered by current wireless metropolitan area networks, edge servers are generally placed in wireless metropolitan area networks, but the following problems may exist: mobile users access edge servers through base stations, and the inefficient placement of edge servers will lead to longer access delays and serious workload imbalance between edge servers; the placement of edge servers determines the scope of users they serve. Due to the large scale of wireless metropolitan area networks, some edge servers may be overloaded, while others may be underused or even idle (load imbalance).
[0162] Please refer to Figure 2 , from b1 to b 12 Select 3 locations for edge servers s1, s2, and s3 from the 12 base stations, and assign the 12 base stations to the service ranges of edge servers s1, s2, and s3. For example, edge server s1 is responsible for processing user requests forwarded by base stations b1, b2, b3, and b4. The placement plan of each edge server in the model must meet the two goals of load balancing and delay minimization.
[0163] Assume S = {s1, s2, s3, ..., s k} (S is a set of edge servers, s is an edge server in the set S) is a group of edge servers, B = {b1, b2, b3, ..., b k} is the set of all base stations (b is the base station in set B), and the base station is responsible for forwarding all service requests of mobile network users within its coverage area. After the edge servers are placed, each edge server is responsible for processing user service requests forwarded by all base stations within its coverage area, and the load of each edge server is equal to the sum of the loads of all base stations within its coverage area.
[0164] d(P b , P s )(P is the location of the base station or edge server) represents the distance between each base station and its assigned edge server. The access delay of the edge server in processing all mobile user requests is equal to the sum of the distances from all base stations within its coverage area to the edge server.
[0165] In the above-constructed system model, two problems need to be solved: the placement of K edge servers and the allocation method of N base stations. The solution needs to meet the requirements of edge server load balancing and minimize the access delay of mobile users on each base station. However, the existing solution is to set the edge device to be placed in a certain location and then study its access delay, without considering load-related issues; and there is a lack of research on the mobile edge server placement model in the prior art.
[0166] Please refer to Figure 4, due to the mobility of users, the access to base stations will also change in real time, so the load size of each base station also presents a certain degree of dynamics. The placement of mobile edge servers is also a dynamic process, that is, once the base station load changes, the placement location of the mobile edge server and the base station allocation result will also change accordingly. This paper adopts a load-first heuristic algorithm to solve the edge server placement problem. First, the heuristic algorithm is used to cluster the base stations according to the distance, and the base station located at the centroid of each cluster is selected as the location of K edge servers; then based on the load priority allocation principle, the base station with large load is allocated first, and the base station searches for edge servers outside the taboo table according to the pheromone matrix, and determines whether the current base station load exceeds the average load of the edge server, and updates the pheromone matrix; then, after each base station completes the allocation, the pheromone matrix is checked to determine whether the current edge server load exceeds the average load. If it exceeds, it will be added to the taboo table and will not participate in the next base station allocation; finally, after the base station allocation is completed, the optimal allocation plan and the load standard deviation and average delay under the plan are output.
[0167] That is to say, the mobile edge server placement method based on heuristic algorithm provided in the embodiment of the present application establishes an edge server placement optimization model with minimizing access delay and minimizing load difference as optimization goals, and achieves an optimal balance between low delay and load balancing while ensuring service quality.
[0168] Corresponding to the above method embodiment, the embodiment of the present application further provides a device deployment apparatus, and the device deployment apparatus described below and the device deployment method described above can refer to each other.
[0169] See also Figure 5 As shown, the device includes the following modules:
[0170] A cluster processing module 101 is used to perform cluster processing on the base stations in the target area to obtain at least two cluster centers;
[0171] A network address determination module 102, configured to determine the cluster center as the network address of the edge server;
[0172] Initialization module 103, used to construct an initial pheromone matrix and taboo table based on the base station and the edge server; wherein the pheromone matrix records the allocation relationship between the base station and the edge server, and the taboo table records the edge server with full load;
[0173] An updating module 104 is used to determine the average load of the edge server and iteratively update the pheromone matrix and the taboo table using the average load;
[0174] The allocation determination module 105 is used to determine the base station allocation information based on the pheromone matrix after the iterative update is completed;
[0175] The deployment module 106 is used to deploy edge servers in combination with the network address and base station allocation information.
[0176] Using the device provided in the embodiment of the present application, the base stations in the target area are clustered to obtain at least two cluster centers; the cluster center is determined as the network address of the edge server; based on the base station and the edge server, an initial pheromone matrix and taboo table are constructed; wherein the pheromone matrix records the allocation relationship between the base station and the edge server, and the taboo table records the edge server with full load; the average load of the edge server is determined, and the average load is used to iteratively update the pheromone matrix and taboo table; after the iterative update is completed, the base station allocation information is determined based on the pheromone matrix; and the edge server is deployed in combination with the network address and the base station allocation information.
[0177] In this application, in order to reduce the delay, when determining the network address of the edge server, the base stations in the target area where the edge server needs to be placed are first clustered to obtain at least two cluster centers, and then each cluster center is determined as the network address of the edge server. In this way, the network delay from the base station to the edge server can be reduced. In order to effectively balance the load, a pheromone matrix is established to record the allocation relationship between the base station and the edge server, and a taboo table is established to record the edge server with full load. The average load of the edge server is determined, and the pheromone matrix and the taboo table are iteratively updated using the average load. The edge server can be allocated to the base station in the target area while ensuring the load balance of the edge server. After the iterative update is completed, the base station allocation information can be determined based on the pheromone matrix, and the edge server is finally deployed in combination with the network address and the base station allocation information.
[0178] Technical effect: Achieve an optimal balance between low latency and load balancing while ensuring service quality.
[0179] In a specific implementation of the present application, the network address determination module is specifically used to obtain a target base station of a cluster center in a cluster center;
[0180] Obtain the base station address of the target base station;
[0181] The base station address is determined as the network address of the edge server.
[0182] In a specific implementation of the present application, the updating module is specifically used to obtain the load of the base stations in the target area and accumulate them to obtain the total load of the target area;
[0183] Compare the total load with the number of edge servers to get a ratio;
[0184] The ratio is determined as the average load of the edge server.
[0185] In a specific implementation of the present application, the initialization module is specifically used to create a pheromone matrix based on the number of base stations and the number of edge servers;
[0186] Among them, the pheromone matrix:
[0187]
[0188] Among them, τ ij Record base station b i With edge servers j The distribution relationship between them, n is the number of all base stations, and k is the number of all edge servers.
[0189] In a specific implementation of the present application, the update module is specifically used for base station b i Traverse the list of edge servers outside the taboo table to determine the nearest current edge server;
[0190] The current edge server s in the pheromone matrix j The sum of the pheromones plus the sum of the current base station load is determined as the current edge server s j Total load in, i∈{1, 2, 3, ..., n};
[0191] Determine the total load Is the load above average?
[0192] If yes, continue to look for the next nearest edge server;
[0193] If not, assign the base station to the current edge server, update the pheromone matrix, and assign the base station b i The allocation plan is recorded to the current edge server plan E s middle;
[0194] After completing the allocation of a base station, check whether there is an edge server with a load exceeding the average load in the pheromone matrix;
[0195] If yes, add the edge server to the taboo list;
[0196] Among them, updating the pheromone matrix includes:
[0197] when When τ ij =0;
[0198] When b i ∈s j hour,
[0199] Among them, when base station b i Not allocated in s j When τ ij The value is 0; when base station b i Allocated in s j When τ ij The value is base station b i The load size;
[0200] Among them, the taboo table update conditions are:
[0201] when When j =F;
[0202] when When , F remains unchanged; where F is the taboo table.
[0203] In a specific implementation of the present application, the allocation determination module is specifically used to determine the base station allocation scheme based on the pheromone matrix; wherein the base station allocation scheme is C(b i ,s j )(b i ∈B∪s j ∈S);
[0204] use and Determine the load standard deviation ω and average delay under the base station allocation scheme
[0205] Base station allocation scheme, load standard deviation ω and average delay Determine the allocation information for the base station.
[0206] In a specific implementation of the present application, a deployment module is specifically used to determine the load standard deviation ω and the average delay Whether the preset deployment conditions are met;
[0207] If so, deploy edge servers using the network address and base station allocation scheme.
[0208] Corresponding to the above method embodiment, an embodiment of the present application further provides an electronic device, and the electronic device described below and the device deployment method described above can refer to each other.
[0209] See also Figure 6 As shown, the electronic device includes:
[0210] A memory 332, for storing computer programs;
[0211] The processor 322 is used to implement the steps of the device deployment method of the above method embodiment when executing the computer program.
[0212] For details, please refer to Figure 7 , Figure 7 A specific structural diagram of an electronic device provided for this embodiment, the electronic device may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) (for example, one or more processors) and a memory 332, and the memory 332 stores one or more computer programs 342 or data 344. Among them, the memory 332 can be a temporary storage or a permanent storage. The program stored in the memory 332 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the data processing device. Furthermore, the processor 322 can be configured to communicate with the memory 332 to execute a series of instruction operations in the memory 332 on the electronic device 301.
[0213] The electronic device 301 may further include one or more power supplies 326 , one or more wired or wireless network interfaces 350 , one or more input and output interfaces 358 , and / or one or more operating systems 341 .
[0214] The steps in the device deployment method described above may be implemented by the structure of an electronic device.
[0215] Corresponding to the above method embodiment, the embodiment of the present application further provides a readable storage medium. The readable storage medium described below and the device deployment method described above can refer to each other.
[0216] A readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the device deployment method of the above method embodiment are implemented.
[0217] The readable storage medium may specifically be a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or other readable storage medium that can store program codes.
[0218] Corresponding to the above method embodiment, the embodiment of the present application further provides a computer program product. The computer program product described below and the device deployment method described above can refer to each other.
[0219] A computer program product includes a computer program / instruction. When the computer program / instruction is executed by a processor, the steps of the above-mentioned device deployment method are implemented.
[0220] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0221] Those skilled in the art may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0222] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0223] Finally, it should be noted that, in this article, relationships such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms include, include or any other variations are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0224] Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A device deployment method, characterized in that: include: Performing clustering processing on the base stations in the target area to obtain at least two cluster centers; Determining the cluster center as the network address of the edge server; Based on the base station and the edge server, an initial pheromone matrix and a taboo table are constructed; wherein the pheromone matrix records the allocation relationship between the base station and the edge server, and the taboo table records the edge server with full load; Determine the average load of the edge server, and use the average load to iteratively update the pheromone matrix and the taboo table; After the iterative update is completed, the base station allocation information is determined based on the pheromone matrix; The edge server is deployed in combination with the network address and the base station allocation information.
2. The method according to claim 1, characterized in that Determining the cluster center as the network address of the edge server includes: Obtaining a target base station of a cluster center in the cluster center; Obtaining a base station address of the target base station; The base station address is determined as the network address of the edge server.
3. The method according to claim 1, characterized in that Determining an average load of the edge server includes: Obtaining and accumulating the loads of the base stations in the target area to obtain the total load of the target area; Comparing the total load with the number of edge servers to obtain a ratio; The ratio is determined as the average load of the edge server.
4. The method according to any one of claims 1 to 3, characterized in that: Based on the base station and the edge server, an initial pheromone matrix is constructed, including: Creating the pheromone matrix based on the number of the base stations and the number of the edge servers; Wherein, the pheromone matrix: Among them, τ ij Record base station b i With edge servers j The distribution relationship between them, n is the number of all base stations, and k is the number of all edge servers.
5. The method according to claim 4, characterized in that The pheromone matrix and the taboo table are iteratively updated using the average load, including: Base station b i Traverse the list of edge servers outside the taboo table to determine the nearest current edge server; The current edge server s in the pheromone matrix j The sum of the pheromones plus the sum of the current base station load is determined as the current edge server s j Total load in, Determine the total load Is the load above average? If yes, continue to look for the next nearest edge server; If not, the base station is assigned to the current edge server, the pheromone matrix is updated, and the base station b i The allocation plan is recorded to the current edge server plan E s middle; After completing the allocation of a base station, detecting whether there is an edge server in the pheromone matrix whose load exceeds the average load; If yes, then add the edge server to the taboo table; Wherein, updating the pheromone matrix includes: when When τ ij =0; When b i ∈s j hour, Among them, when base station b i Not allocated in s j When τ ij The value is 0; when base station b i Allocated in s j When τ ij The value is base station b i The load size; Among them, the taboo table update conditions: when When j =F; when , F remains unchanged; wherein F is the taboo table.
6. The method according to claim 5, characterized in that Based on the pheromone matrix, determining base station allocation information includes: Based on the pheromone matrix, a base station allocation scheme is determined; wherein the base station allocation scheme is C(b i ,s j )(b i ∈B∪s j ∈S); use and Determine the load standard deviation ω and average delay under the base station allocation scheme The base station allocation scheme, the load standard deviation ω and the average delay d are determined as the base station allocation information.
7. The method according to claim 6, characterized in that Deploying the edge server in combination with the network address and the base station allocation information includes: Determine the load standard deviation ω and the average delay Whether the preset deployment conditions are met; If yes, the edge server is deployed using the network address and the base station allocation scheme.
8. A device deployment apparatus, characterized in that: include: A cluster processing module, used to perform cluster processing on the base stations in the target area to obtain at least two cluster centers; A network address determination module, used to determine the cluster center as the network address of the edge server; An initialization module, used to construct an initial pheromone matrix and a taboo table based on the base station and the edge server; wherein the pheromone matrix records the allocation relationship between the base station and the edge server, and the taboo table records the edge server with full load; An updating module, used for determining an average load of the edge server, and iteratively updating the pheromone matrix and the taboo table using the average load; An allocation determination module, used to determine base station allocation information based on the pheromone matrix after the iterative update is completed; A deployment module is used to deploy the edge server in combination with the network address and the base station allocation information.
9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the device deployment method as claimed in any one of claims 1 to 7 when executing the computer program.
10. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the device deployment method according to any one of claims 1 to 7 are implemented.
