Server racking path optimization method and device, electronic equipment and storage medium
By building a path network model in the server shelf process and applying an ant colony algorithm and two-element optimization algorithm to optimize the server shelf path, the existing shelf process is solved and more efficient shelf operation is achieved.
Patent Information
- Application Number
- CN202411709609.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-14
AI Technical Summary
The existing server launch process is inefficient, especially when the data center cabinet capacity tends to be upper limit, the upload location is scattered and complex, and the server is heavier and the handling relies on manpower, resulting in heavy loading tasks.
By building a network model of server unboxing points, cabinet locations and paths between them, combining ant colony algorithm and two-element optimization algorithm, efficient optimization of server shelf paths is achieved. This method improves the accuracy and efficiency of path selection by updating local and global pheromone concentrations.
Effectively optimize the server's shelf-up path from the unboxing point to the cabinet, reduce time and labor costs, improve the computer room management efficiency, and significantly improve the overall efficiency of server shelf operations.
Smart Images

Figure CN119623795A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of server operation and maintenance technology, and in particular to a server rack path optimization method, device, electronic device and storage medium. Background Art
[0002] With the booming development of the Internet, artificial intelligence and big data technologies, data center business is facing major changes. The industry has gradually shifted from relying on mainframes to a large number of distributed servers to meet the needs of emerging businesses. These emerging businesses require more advanced servers, and the server update cycle has been greatly shortened from five to seven years to two to three years. This trend has made the rack-mounted server racking and de-racking an important part of the daily operation and maintenance of data centers.
[0003] The existing server shelving process usually includes several steps: first, a certain number of servers are moved from the warehouse to a fixed unpacking point for unpacking and loaded onto a flatbed truck; then, the servers are transported from the unpacking point to the computer room and put on the shelves at designated locations; when the servers on the flatbed truck are put on the shelves, they return to the unpacking point to load new servers and continue to go to other locations to be put on the shelves; after all servers are put on the shelves, personnel and vehicles withdraw from the computer room and return to the unpacking point, ending the entire shelving process.
[0004] However, as the capacity of data center cabinets approaches its upper limit, the shelf locations are scattered and complex. In addition, the servers are heavy and their transportation relies on manpower, making the shelf task arduous. There is an urgent need to optimize the path of the server shelf process to improve the efficiency of the shelf operation. Summary of the invention
[0005] The embodiments of the present application provide a server racking path optimization method, device, electronic device and storage medium, which are used to optimize the server racking path and improve the racking operation efficiency.
[0006] In a first aspect, an embodiment of the present application provides a server rack path optimization method, comprising:
[0007] Determine the location of the server unpacking point, the cabinet location of each cabinet to be put on the rack in the computer room, and the path between each two locations of the server unpacking point and the locations of the cabinets to be put on the rack, the path length corresponding to the path, and the initial pheromone concentration on each path;
[0008] According to the path length, the initial pheromone concentration on each path and the path optimization rule, the current initial optimization path, the current number of iterations, and the current local pheromone concentration on each path are determined. The path optimization rule is determined based on the ant colony algorithm and the two-element optimization algorithm. The local pheromone concentration is the pheromone concentration obtained by locally updating the pheromone on each path during the process of selecting the optimization path based on the path optimization rule.
[0009] Get the last initial optimization path, which is the initial optimization path obtained in the previous iteration of the current iteration number;
[0010] If the first global path length of the current initial optimization path is different from the second global path length of the last initial optimization path, determining the global pheromone increase amount according to the first global path length and the second global path length;
[0011] According to the global pheromone increase and the current local pheromone concentration, the pheromone on each path in the current initial optimization path is globally updated to obtain the global pheromone concentration on the current initial optimization path;
[0012] According to the global pheromone concentration and the current local pheromone concentration, the initial pheromone concentration on each path is updated, and the steps of determining the current initial optimization path, the current number of iterations, and the current local pheromone concentration on each path according to the path length, the initial pheromone concentration on each path and the path optimization rule are re-executed until the first global path length of the current initial optimization path is the same as the second global path length of the previous initial optimization path, and the target optimization path is determined.
[0013] In a second aspect, an embodiment of the present application provides a server rack path optimization device, including:
[0014] The first determination module is used to determine the location of the server unpacking point, the cabinet location of each cabinet to be put on the rack in the computer room, and the path between each two locations of the server unpacking point and the locations of the cabinets to be put on the rack, the path length corresponding to the path, and the initial pheromone concentration on each path;
[0015] A processing module is used to determine the current initial optimization path, the current number of iterations, and the current local pheromone concentration on each path according to the path length, the initial pheromone concentration on each path, and the path optimization rule. The path optimization rule is determined based on the ant colony algorithm and the two-element optimization algorithm. The local pheromone concentration is the pheromone concentration obtained by locally updating the pheromone on each path during the process of selecting the optimization path based on the path optimization rule.
[0016] An acquisition module is used to acquire the last initial optimization path, where the last initial optimization path is the initial optimization path obtained in the previous iteration of the current iteration number;
[0017] An analysis module, configured to determine the global pheromone increase amount according to the first global path length and the second global path length if the first global path length of the current initial optimization path is different from the second global path length of the last initial optimization path;
[0018] An updating module is used to globally update the pheromones on each path in the current initial optimization path according to the global pheromone increase and the current local pheromone concentration, so as to obtain the global pheromone concentration on the current initial optimization path;
[0019] The second determination module is used to update the initial pheromone concentration on each path according to the global pheromone concentration and the current local pheromone concentration, and re-execute the steps of determining the current initial optimization path, the current number of iterations, and the current local pheromone concentration on each path according to the path length, the initial pheromone concentration on each path and the path optimization rule, until the first global path length of the current initial optimization path is the same as the second global path length of the previous initial optimization path, and the target optimization path is determined.
[0020] In a third aspect, an embodiment of the present application provides an electronic device, including: a memory, a processor;
[0021] Memory stores computer-executable instructions;
[0022] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the above first aspect and / or various possible implementations of the first aspect.
[0023] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the first aspect above and / or various possible implementations of the first aspect.
[0024] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the above first aspect and / or various possible implementation methods of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0026] Figure 1 Schematic diagram of the process of optimizing the server path provided in this application Figure 1 ;
[0027] Figure 2 Schematic diagram of the process of optimizing the server path provided in this application Figure 2 ;
[0028] Figure 3 A flow chart of a server path optimization method based on path optimization rules provided in this application;
[0029] Figure 4 A schematic diagram of the modeling of the target location of the server rack provided for this application;
[0030] Figure 5 A schematic diagram of the iterative results of the server path optimization method provided in this application;
[0031] Figure 6 A schematic diagram of the results of a target optimization path provided in this application;
[0032] Figure 7 A schematic diagram of the structure of the server rack path optimization device provided in this application;
[0033] Figure 8 A schematic diagram of the structure of the electronic device provided in this application.
[0034] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0035] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0036] First, the terms involved in this application are explained:
[0037] Ant Colony Algorithm: An intelligent optimization algorithm that simulates the foraging behavior of ants in nature. It simulates the behavior of ants releasing and sensing pheromones in the process of looking for food. The concentration of pheromones represents the distance of the path. The higher the pheromone concentration, the shorter the corresponding path distance. Ants choose paths based on the pheromone concentration and release a certain amount of pheromones on the selected path, which increases the pheromone concentration on the path. The ant colony uses this positive feedback mechanism to find the shortest path from the nest to the food.
[0038] Server racking: The server is transported to the cabinet via a flatbed truck, plugged in and connected to the network.
[0039] Unpacking point: The server is packed in cartons and needs to be unpacked at the unpacking point before entering the computer room.
[0040] Listing location: The target location of the server listing.
[0041] Active-active deployment: Servers are deployed in different locations. When some servers go offline, other servers can still provide services.
[0042] Two-element optimization algorithm: 2-optimization algorithm, also known as 2-opt algorithm, randomly exchanges two edges of the solution to the path planning problem to obtain a new feasible solution, which is compared with the original solution to find a better solution.
[0043] In the prior art, in order to realize multi-active deployment of distributed servers, multiple servers under the same cluster may need to be put on different cabinets in different computer rooms, so as to ensure that the business can be migrated to different servers in the same cluster when a problem occurs in a cabinet or a computer room, thereby ensuring the availability of the business. Under the current circumstances, data centers use flatbed trucks and manpower as the main means of transportation. At the same time, in order to meet fire protection requirements and avoid fire hazards, servers are usually transported in boxes to designated unpacking locations for unpacking. After unpacking and preparation are completed, the server is loaded and transported to the designated cabinet location in the computer room by manual transportation for shelving. In addition, because server security is related to user data security and corporate confidentiality security, financial regulatory authorities require that data center operation and maintenance personnel must be supervised when operating in the computer room, which means that when a large number of servers are put on the shelves, it may be necessary to carry out multiple shelving processes in batches.
[0044] Therefore, the existing server mounting process includes: first, a certain number of servers are transported from the warehouse to a fixed unpacking point for unpacking and loading onto a flatbed truck; then, the servers are transported from the unpacking point to the computer room and mounted at various designated locations; when the servers on the flatbed truck are mounted, they are returned to the unpacking point to load new servers and continue to other locations to be mounted; after all servers are mounted, personnel and vehicles withdraw from the computer room and return to the unpacking point, ending the entire mounting process. As the capacity of data center cabinets approaches the upper limit, the mounting locations are scattered and complex, and the servers are heavy and rely on manpower for transportation, the mounting task is arduous, and there is an urgent need to optimize the path of the server mounting process to reduce manpower and time costs and improve the efficiency of the mounting operation.
[0045] The server rack path optimization method provided in the present application establishes a path network model by determining the server unpacking point location, the cabinet location of each cabinet to be racked in the computer room, and the paths and path lengths between these locations, and the initial pheromone concentration is distributed to each path, providing a basis for subsequent path optimization; the local and global pheromone concentrations are updated by combining the ant colony algorithm with the two-element optimization algorithm, so that the local and global optimality can be taken into account in the path selection process, thereby improving the accuracy of path selection; at the same time, the global pheromone increase is determined by the first global path length of the current initial optimization path and the second global path length of the last initial optimization path, so that the pheromone on the optimal path is updated to provide positive feedback of the pheromone, thereby improving the efficiency and convergence speed of path optimization, thereby effectively optimizing the server's rack path from the unpacking point to the cabinet, reducing time and labor costs, and improving computer room management efficiency.
[0046] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0047] The execution subject of the server path optimization method provided in the embodiment of the present application can be a server. Among them, the server can be a mobile phone, a computer, a tablet and other devices. The embodiment of the present application does not impose any special restrictions on the implementation method of the execution subject, as long as the execution subject can determine the location of the server unpacking point, the cabinet location of each cabinet to be put on the shelf in the computer room, and the path between each two positions of the server unpacking point and the cabinet to be put on the shelf, the path length corresponding to the path, and the initial pheromone concentration on each path; according to the path length, the initial pheromone concentration on each path and the path optimization rules, determine the current initial optimization path, the current number of iterations, and the current local pheromone concentration on each path. The path optimization rules are determined based on the ant colony algorithm and the two-element optimization algorithm. The local pheromone concentration is the pheromone concentration obtained by locally updating the pheromones on each path during the process of selecting the optimization path based on the path optimization rules; obtain the last initial optimization path, and the last initial optimization path is the initial optimization path obtained at the previous iteration of the current number of iterations; if If the first global path length of the current initial optimization path is different from the second global path length of the last initial optimization path, the global pheromone increase is determined according to the first global path length and the second global path length; the pheromones on each path in the current initial optimization path are globally updated according to the global pheromone increase and the current local pheromone concentration to obtain the global pheromone concentration on the current initial optimization path; the initial pheromone concentration on each path is updated according to the global pheromone concentration and the current local pheromone concentration, and the steps of determining the current initial optimization path, the current number of iterations, and the current local pheromone concentration on each path according to the path length, the initial pheromone concentration on each path and the path optimization rule are re-executed until the first global path length of the current initial optimization path is the same as the second global path length of the last initial optimization path, and the target optimization path is determined.
[0048] Figure 1 Schematic diagram of the process of optimizing the server path provided in this application Figure 1 The execution subject of the method may be a server storing the server rack path optimization method or other servers, and this embodiment is not particularly limited here. Figure 1 As shown, the method may include:
[0049] S101, determine the location of the server unpacking point, the cabinet location of each cabinet to be put on the rack in the computer room, and the path between each two locations of the server unpacking point and the locations of the cabinets to be put on the rack, the path length corresponding to the path, and the initial pheromone concentration on each path.
[0050] The server unpacking point location is the location where the server is loaded onto a flatbed truck, such as the entrance to the computer room or a dedicated unpacking area. The cabinet location can refer to the location of each cabinet to be racked in the computer room, which can be obtained through the computer room layout map or database. The path length can refer to the actual physical distance from one location (such as a server unpacking point or a cabinet to be racked) to another cabinet to be racked, or an equivalent measurement value related to transportation cost, time, etc. set according to actual conditions.
[0051] It should be noted that in the ant colony algorithm, the pheromone concentration is used to guide the path selection, and the initial pheromone concentration can be uniformly distributed or set according to empirical values.
[0052] In one example, a bounded three-dimensional area can be generated by inputting three-dimensional terrain data of a computer room. The area contains multiple independent computer rooms, each of which has multiple rows of cabinets. The cabinets that need to be put on the server rack are regarded as cabinets to be put on the rack, that is, they are regarded as independent path points. Since the location of the server unpacking point also belongs to the three-dimensional area, a path point set N = {n0, n1, n2, ..., n m-1}, the path length between two path points can be expressed as L, such as path point n i (which represents the same path point as the path point i described later) to path point n j The path length is L (which represents the same path point as the path point j described later). i,j , when there are m path points, the path length matrix L can be determined m×m .
[0053] S102. Determine the current initial optimization path, the current number of iterations, and the current local pheromone concentration on each path based on the path length, the initial pheromone concentration on each path, and the path optimization rules. The path optimization rules are determined based on the ant colony algorithm and the two-element optimization algorithm. The local pheromone concentration is the pheromone concentration obtained by locally updating the pheromones on each path during the process of selecting the optimization path based on the path optimization rules.
[0054] In this step, the standard ant colony algorithm library can be used in combination with a customized local search strategy to set different parameters (such as pheromone volatility coefficient, number of ants) to observe the impact on the optimization results.
[0055] Optionally, before this step, you can also set the objective function and constraints of the path optimization. For example, you can determine the objective function and constraints based on the cabinet location of the cabinet to be put on the shelf, the number of servers required, and the number and capacity of flatbed trucks. For example, if the total number of servers to be put on the shelf is 100, the number of flatbed trucks is 1, and the capacity is 10, then 10 transportations are required. In this case, the global path starting from the unpacking point each time can be used as the objective function, and the total number of servers required for each path point in the path starting from the unpacking point each time is less than or equal to the capacity of the flatbed truck as a constraint to select the path passed. It should be noted that due to the power and space limitations of the cabinet, the capacity of each cabinet does not exceed the maximum capacity of the flatbed truck, so it is necessary to set each cabinet to only accept a single service from a single vehicle.
[0056] S103, obtaining the last initial optimization path, where the last initial optimization path is the initial optimization path obtained in the iteration before the current iteration number.
[0057] Among them, a data structure (such as an array or a matrix) can be used to store the initial optimization path in the iterative process, so that the initial optimization path obtained in the previous iteration corresponding to the current iteration can be obtained in each iteration, so as to facilitate the subsequent judgment of the optimization status of the path selected in the current iteration.
[0058] S104: If the first global path length of the current initial optimization path is different from the second global path length of the last initial optimization path, determine the global pheromone increase amount according to the first global path length and the second global path length.
[0059] Among them, if the total length of the current initial optimization path is different from the last initial optimization path, it means that the current global path selection may become longer or shorter, and it is necessary to calculate the global pheromone increase to feedback the value of the path selected this time. For example, when the current selection is a shorter path, more pheromone concentration will be added to meet the shortest requirement of path optimization; when the current path is a longer path, the pheromone concentration may be reduced to indicate that the current path is not optimal. In one example, the difference in global path length can be calculated and the pheromone increase can be determined according to a preset rule (such as proportional increase).
[0060] S105. According to the global pheromone increase and the current local pheromone concentration, the pheromone on each path in the current initial optimization path is globally updated to obtain the global pheromone concentration on the current initial optimization path.
[0061] Furthermore, according to the preset global pheromone volatilization coefficient, the current local pheromone concentration is volatilized, and the global pheromone increase is added to obtain the global pheromone concentration on the current initial optimization path.
[0062] In one example, the global pheromone concentration satisfies:
[0063] τ i,j (t+1)=(1-ρ)τ i,j +ρΔτ i,j ;
[0064] Among them, τ i,j (t+1) is the global pheromone concentration; τ i,j is the current local pheromone concentration; ρ is the global pheromone volatility coefficient; Δτ i,j For the increase in pheromone.
[0065] Each iteration updates the global pheromone on the current initial optimization path, providing positive feedback of pheromone for the next iteration process, which can effectively speed up the subsequent optimization process.
[0066] S106. Update the initial pheromone concentration on each path according to the global pheromone concentration and the current local pheromone concentration, and re-execute the steps of determining the current initial optimization path, the current number of iterations, and the current local pheromone concentration on each path according to the path length, the initial pheromone concentration on each path, and the path optimization rule, until the first global path length of the current initial optimization path is the same as the second global path length of the previous initial optimization path, and the target optimization path is determined.
[0067] Among them, according to the global pheromone concentration and the current local pheromone concentration, the method for updating the initial pheromone concentration on each path can be to use the pheromone concentration updated after the current iteration as the initial pheromone concentration for the next iteration. Further, in the next iteration, the initial pheromone concentration on each path in the current initial optimization path is the global pheromone concentration, and the initial pheromone concentration on other paths is the current local pheromone concentration (i.e., the remaining concentration after the pheromone volatilizes).
[0068] When the first global path length of the current initial optimization path is the same as the second global path length of the last initial optimization path, the previous initial optimization path or the last initial optimization path may be selected as the target optimization path.
[0069] The server rack path optimization method provided in the embodiment of the present application realizes efficient optimization of the server rack path by constructing a network model of the server unpacking point, the cabinet location and the path therebetween, and combining the ant colony algorithm and the two-element optimization algorithm. By utilizing the local and global pheromone concentration update mechanism of the ant colony algorithm, the method takes into account both local and global optimality in the path selection process, improves the accuracy of path selection, and at the same time, through the combination of the two-element optimization algorithm, further improves the efficiency and convergence speed of path optimization. The iterative optimization process can only generate positive feedback of the pheromone increase when the current initial optimization path is shorter than the previous one, ensuring that the optimal path is quickly approached in a complex path network, adapting to the needs of large data centers or computer rooms, and having the ability to dynamically adjust to cope with changes in the environment or needs, thereby significantly reducing the time and computing resource consumption of path optimization, and enhancing the reliability and practicality of path selection.
[0070] On the basis of the above embodiments, the method described in S102 for determining the current initial optimization path, the current number of iterations, and the current local pheromone concentration on each path according to the path length, the initial pheromone concentration on each path, and the path optimization rules may include: determining the number of ants required for path optimization, where the ants are used to simulate the behavior of a flatbed truck starting from the server unpacking point, passing through the cabinet to be put on the shelf, and returning to the server unpacking point to form a path; for each ant, determining the target path formed by the ant starting from the server unpacking point, passing through each cabinet to be put on the shelf, and returning to the server unpacking point, as well as the current local pheromone concentration on each path according to the path length and the initial pheromone concentration on each path; determining the current initial optimization path and the current number of iterations according to the target path corresponding to each ant.
[0071] Among them, the number of ants can refer to the number of virtual individuals used to simulate path search in the ant colony algorithm. Each ant will independently try to find the optimal path starting from the server unpacking point, passing through each rack position and then returning to the server unpacking point. The appropriate setting of the number of ants has an important impact on whether the algorithm can effectively find the optimal path and the operation efficiency of the algorithm. Generally speaking, too few ants may lead to incomplete coverage of the search space and difficulty in finding the optimal solution; too many ants may increase the amount of calculation and prolong the algorithm running time. For example, suppose that a server racking path of a data center with 100 rack positions is optimized. In preliminary tests, you can first try to set different numbers of ants, such as 5, 10, 20, etc. By observing the operation results and efficiency of the algorithm under different numbers of ants, select the number of ants s (such as 10 ants) that can complete multiple iterative searches within a relatively reasonable time and can better cover possible path combinations and find a more satisfactory optimization path.
[0072] The initial pheromone concentration can be the pheromone concentration pre-set on each path (i.e., all possible path connections between the server unpacking point and the cabinet position to be put on the rack, between the cabinet position to be put on the rack, etc.) at the beginning of the algorithm. The pheromone concentration will affect the ants' tendency to choose a path. A higher initial pheromone concentration may make the ants more inclined to choose the path, and vice versa. The setting of the initial pheromone concentration is usually determined based on experience or some preliminary tests, and its purpose is to provide a basic guide for the ants' initial path selection.
[0073] The current local pheromone concentration refers to the actual pheromone concentration on each path after the ant completes the path formation process from the server unpacking point, passing through each rack to be mounted and returning to the server unpacking point. This concentration is based on the initial pheromone concentration and is obtained through the local update of pheromones by the ant during the walking process (according to the ant's walking path and related rules). It reflects the activity of the ant on the current path and will affect the path selection of subsequent ants (if any).
[0074] The current initial optimization path can refer to the comparison of the target paths formed by all ants in an iteration process, and the selection of a relatively optimal path as the current initial optimization path. This path will serve as an important reference for this iteration and be used for subsequent pheromone updates and other operations. It represents the optimal transportation and shelf solution found by all ants in the current iteration.
[0075] For example, suppose that in one iteration, the server unpacking point is represented by 0, and the positions of the cabinets to be put on the rack are represented by 1, 2, 3, 4, 5, 6, and 7 respectively. There are 5 ants (Ant A, Ant B, Ant C, Ant D, and Ant E) that form the following target paths respectively: Ant A: 0-1-3-5-0, with a path length of 20 meters. Ant B: 0-2-4-6-0, with a path length of 22 meters. Ant C: 0-1-4-5-0, with a path length of 21 meters. Ant D: 0-3-5-7-0, with a path length of 23 meters. Ant E: 0-2-3-6-0, with a path length of 24 meters. By comparing the lengths of these five target paths, it can be found that the target path formed by Ant A is the shortest, so the target path of Ant A is determined as the current initial optimization path. At this time, the iteration in progress is the current iteration number, such as the third iteration.
[0076] The current iteration number refers to the iteration round that the algorithm is currently running. As the number of iterations increases, the ants will constantly adjust their path selection strategies in the hope of finding a better path. Each iteration will be based on the results of the previous iteration (such as changes in pheromone concentration, the optimal path of the previous iteration, etc.), and gradually approach the optimal solution through multiple iterations.
[0077] By simulating the foraging behavior of ants and taking advantage of the characteristics of multiple ants searching in parallel in the path network, efficient optimization of the server rack path is achieved. By reasonably selecting the number of ants, the balance between the algorithm's search breadth and computational efficiency is ensured. During the path selection process, each ant dynamically adjusts the pheromone concentration on the path, so that the path selection not only depends on the local optimality of the current path, but also considers the global optimality, thereby enhancing the accuracy of path selection. By iteratively updating the path selection results, the optimal path is gradually approached, and the needs of complex path networks are met, which significantly improves the efficiency and reliability of path optimization, reduces the time and computing resource consumption of path optimization, and has strong practicality and adaptability.
[0078] On the basis of the above embodiment, for each ant, according to the path length and the initial pheromone concentration on each path, the method for determining the target path formed by the ant starting from the server unpacking point position, passing through each cabinet to be put on the shelf and returning to the server unpacking point position, and the current local pheromone concentration on each path may include: for each ant, taking the server unpacking point as the starting point of the ant, and according to the path length between the starting point position and the first cabinet to be put on the shelf position and the initial pheromone concentration on the corresponding path, determining the second cabinet to be put on the shelf that the ant reaches after starting from the starting point position, and updating the path status of the second cabinet to be put on the shelf in the taboo table, and the first cabinet to be put on the shelf is the cabinet that satisfies the starting point. A cabinet to be put on the shelf with preset constraints; locally update the pheromones on the path between the starting point and the second cabinet to be put on the shelf to obtain the corresponding local pheromone concentration; take the second cabinet to be put on the shelf as the starting point of the ant, and re-execute the step of determining the second cabinet to be put on the shelf that the ant reaches after starting from the starting point according to the path length between the starting point and the position of the first cabinet to be put on the shelf and the initial pheromone concentration on the corresponding path, until the second cabinet to be put on the shelf updated in the taboo table includes every cabinet to be put on the shelf in the computer room, and obtain the target path formed by the ant starting from the server unpacking point position, passing through each cabinet to be put on the shelf and then returning to the server unpacking point position, as well as the current local pheromone concentration on each path.
[0079] The first rack to be put on the rack refers to the racks that meet certain preset constraints with the current starting point (initial server unpacking point, and later a certain rack to be put on the rack) when the ant selects the next target. These constraints can consider multiple factors such as path connectivity and repeatability, flatbed truck capacity, the number of servers required to be put on the rack, and rack priority, to screen out reasonable candidate racks for the ant to choose.
[0080] Furthermore, the preset constraints may refer to the objective function and constraints of the path optimization set in advance, which can be used to evaluate the quality of the path and ensure that the global path generated by the ant selection meets all constraints.
[0081] For example, the server rack path is taken as the optimization target, and the path point set N corresponding to the rack cabinet to be racked is {n0, n1, n2, ..., n m-1}, flatbed truck capacity limit, shelf quantity information corresponding to the shelf position D = {d1, d2, ..., d m} is a constraint condition, where the shelf quantity information d corresponding to the i-th cabinet to be put on the shelf i Including the path point n0 corresponding to the server unpacking point and the cabinet position n to be put on the rack i 、Number of servers to be put on the shelf q i , the method of establishing the preset constraint conditions may include:
[0082] (1) Define the path decision variable x on the server i,j ,in,
[0083]
[0084] The path length from path point i to path point j is L i,j , in order to make the total transportation path of the server rack as short as possible, the first objective function is set as:
[0085]
[0086] The first constraint is:
[0087]
[0088] Among them, the first constraint is used to ensure that the selected path is a complete and feasible one-time traversal path, that is, after selecting the path from i to j, when judging j to other path points, the path from j to i cannot be selected to avoid repeated path selection.
[0089] (2) Furthermore, in view of the constraint of returning to the server unpacking point n0 for loading multiple times, the path planning in step (1) is adjusted, and the maximum cargo capacity of the flatbed truck is denoted as G, the variable of the cargo capacity is denoted as Q, and the global path of the kth time (corresponding to ant k) starting from the server unpacking point n0 is denoted as r k , then the updated second objective function is:
[0090] min R=∑r k ;
[0091]
[0092]
[0093] in, is the number of servers to be put on the shelf required for path point j, Q k is the total number of servers required in the path starting from the server unpacking point n0 for the kth time, Q k Less than or equal to the maximum cargo capacity G of a flatbed truck.
[0094] The second cabinet to be put on the shelf can refer to the cabinet that is finally selected by the ant as the next target cabinet to be gone to according to factors such as the path length and the initial pheromone concentration on the corresponding path from the first cabinet to be put on the shelf that meets the preset constraints. It is the direct destination of the ant after each step of the path planning decision.
[0095] The taboo table can be used to record the information of the cabinets to be put on the shelves that the ants have passed through during the path construction process and the related path status. Its purpose is to prevent the ants from repeatedly visiting the cabinets they have passed through, ensuring the uniqueness and integrity of the path. It can also be used as a reference for subsequent pheromone updates and path optimization.
[0096] Take a small data center as an example. The server unpacking point is located near the entrance of the data center. There are 5 cabinets to be put on the rack (labeled as cabinet A, cabinet B, cabinet C, cabinet D, cabinet E) distributed in different computer room areas. First, the server unpacking point is used as the starting point of the ant. According to the preset constraints, the first cabinets to be put on the rack are cabinet A, cabinet B, cabinet C, cabinet D, and cabinet E.
[0097] Next, the second cabinet to be put on the shelf that the ant wants to go to is determined based on the path length between the starting point (server unpacking point) and the first cabinet to be put on the shelf (cabinet A, cabinet B, cabinet C, cabinet D, cabinet E) and the initial pheromone concentration on the corresponding path. Assuming that the ant chooses cabinet A, at this time, the path status of cabinet A is updated in the taboo table, indicating that the ant has passed the cabinet. At the same time, the pheromone on the path between the starting point (server unpacking point) and the second cabinet to be put on the shelf (cabinet A) is partially updated.
[0098] After that, cabinet A is used as the new starting point of the ant, and the first cabinet to be put on the shelf is re-determined (cabinet B, cabinet C, cabinet D, cabinet E). Then the second cabinet to be put on the shelf is determined according to the path length and pheromone concentration, and the above pheromone update and taboo table update steps are repeated.
[0099] This cycle repeats until the second cabinet to be put on the shelf updated in the taboo table includes every cabinet to be put on the shelf in the computer room (i.e. cabinet A, cabinet B, cabinet C, cabinet D, cabinet E). At this time, the ants have formed a target path starting from the server unpacking point, passing through each cabinet to be put on the shelf, and returning to the server unpacking point. For example: server unpacking point-cabinet A-cabinet C-cabinet E-cabinet D-cabinet B-server unpacking point, and in this process, the current local pheromone concentration on each path is also determined.
[0100] In one example, the local pheromone concentration may satisfy:
[0101] τ i,j (t+1)=(1-ρ i )τ i,j +ρ i τ0;
[0102] Among them, τ i,j (t+1) is the updated local pheromone concentration; τ i,j is the unupdated local pheromone concentration (if the path is selected by the ant for the first time, the corresponding unupdated local pheromone concentration is 0; if other ants have selected the path before this path selection, the corresponding unupdated local pheromone concentration is the local pheromone concentration updated when other ants selected the path); ρ i is the local pheromone volatility coefficient; τ0 is the initial pheromone concentration, which is generally set to
[0103] The local update of pheromones can volatilize part of the pheromones of the corresponding path (such as from i to j) when the ant passes through the corresponding path, reducing the probability of other ants choosing this edge, which can enhance the pioneering nature of the algorithm.
[0104] By simulating the foraging behavior of ants and using the dynamic update of the taboo table and pheromone concentration, efficient optimization of the server rack path is achieved. By presetting constraints, the server rack path problem is converted into a standard vehicle route problem, so that the ant colony algorithm can be applied to solve the optimization problem, ensuring that the structure of the optimization problem is suitable for the use of the ant colony algorithm, so that the ants can reasonably select the first cabinet to be racked, ensuring the directionality and efficiency of the path selection. The use of the taboo table effectively prevents repeated visits in the path search, avoids falling into the local optimal trap, and ensures the uniqueness and integrity of the path. Fully combining multiple information for path decision-making improves the efficiency of information utilization; ultimately, it can reduce human intervention, significantly improve the overall efficiency of server rack operations, and better meet the needs of data centers for efficient server racking.
[0105] On the basis of the above embodiments, a method for determining the second cabinet to be put on the shelf that the ant reaches after starting from the starting point position according to the path length between the starting point position and the position of the first cabinet to be put on the shelf and the initial pheromone concentration on the corresponding path may include: determining the probability of the ant reaching the first cabinet to be put on the shelf after starting from the starting point position according to the path length between the starting point position and the position of the first cabinet to be put on the shelf and the initial pheromone concentration on the corresponding path; for multiple first cabinets to be put on the shelf, determining the second cabinet to be put on the shelf that meets the preset probability requirements.
[0106] In this step, the preset probability requirement can be a preset threshold or condition, which is used to screen out a cabinet that meets specific requirements from multiple first cabinets to be put on the shelf, that is, the second cabinet to be put on the shelf. Optionally, the first cabinet to be put on the shelf corresponding to the maximum probability is selected as the second cabinet to be put on the shelf. For example, there are first cabinets to be put on the shelf: cabinet A, cabinet B, cabinet C, cabinet D, and the probabilities of reaching the position of the first cabinet to be put on the shelf after starting from the starting point are: 0.25, 0.18, 0.12, 0.17, respectively. Then, according to the maximum probability principle, cabinet A is selected as the second cabinet to be put on the shelf.
[0107] In one example, the probability that ant k starts from the starting point (assumed to be i) and reaches the first rack position (assumed to be j) is satisfy:
[0108]
[0109] Among them, N i is the set of first cabinets to be put on the rack; α is the pheromone importance factor; β is the heuristic function importance factor; η i,j For L i,j The reciprocal of the distance L i,j The smaller the i,j The larger the τ i,j is the pheromone concentration;
[0110] It should be noted that when α is 0, the ants make choices based entirely on the location distance, but the solution composed of the local optimal solution at each step is usually not the global optimal solution; when β is 0, the ants make judgments based entirely on the pheromone concentration, which will cause the ants' behavior to converge quickly and it is difficult to reach the optimal solution. Therefore, it is necessary to choose appropriate α and β.
[0111] By combining the probability model with the path length and pheromone concentration, the intelligent and optimized path selection is realized. In the path selection process, the probability model effectively balances the influence of path length and pheromone concentration, so that the path selection not only depends on the local optimum but also considers the global optimum. By setting the preset probability requirements, the method can screen out a better path, avoid blindly treating all possible paths equally, improve the efficiency and pertinence of path planning, reduce the time and computing resource consumption of path optimization, and enhance the practicality of path selection.
[0112] On the basis of the above embodiments, the method for determining the current initial optimization path and the current number of iterations according to the target path corresponding to each ant may include: determining a first optimization path that meets the preset path length requirement according to the target path corresponding to each ant; exchanging any two positions in the first optimization path to generate a second optimization path; comparing the path length of the first optimization path with the path length of the second optimization path to determine the current initial optimization path and the current number of iterations.
[0113] Furthermore, the first optimized path may be a path selected from the target paths corresponding to each ant and meeting the preset path length requirement. The preset path length requirement may be a global path length standard or threshold set in advance during the path optimization process. Only target paths that meet the length requirement will be further considered and processed, which is used to screen out relatively optimal paths, avoid unnecessary complex optimization operations on overly long paths, and improve algorithm efficiency. For example, a target path with the shortest global path length is selected as the first optimized path.
[0114] The exchange process may refer to the position swapping operation of any two positions (such as two positions of the cabinets to be mounted) in the first optimization path. Through this exchange, the order of the paths is changed to generate a new path combination, namely the second optimization path, the purpose of which is to explore the influence of different path orders on the path length, so as to find a better path arrangement.
[0115] For example, there is a data center, the server unpacking point is located at A, and there are 5 cabinets to be put on the rack at B, C, D, E, and F. There are 3 ants that form the following target paths:
[0116] Ant 1: ABCDEFA, path length is 30 meters.
[0117] Ant 2: ACBEDFA, with a path length of 32 meters.
[0118] Ant 3: ADEBCFA, path length is 35 meters.
[0119] According to the shortest path length requirement, the first optimized path is the path of ant 1. Then the first optimized path is exchanged, such as exchanging the positions of C and E, to generate the second optimized path: ABEDCFA. After calculation, its path length is 28 meters. After comparison, it is found that the second optimized path is shorter, so the current initial optimized path is determined to be ABEDCF–A.
[0120] By presetting the path length requirement, the better first optimization path is selected, reducing the amount of calculation for subsequent optimization. Then, the second optimization path is generated through exchange processing and the length is compared, which can more comprehensively explore the potential better arrangement methods in the path and effectively avoid missing the global optimal solution due to local optimality. It can comprehensively consider multiple factors such as path length and combination changes of different positions, making path optimization more systematic and intelligent, so that in complex data center racking scenarios, it can more accurately find efficient server racking paths, improve the overall efficiency of racking operations, and reduce manpower and time costs.
[0121] Based on the above embodiment, the global pheromone increase amount described in S104 satisfies:
[0122]
[0123] Among them, Δτ i,j The global pheromone increase; L p+1 is the second global path length; L p is the first global path length.
[0124] The pheromones on the optimal path are updated by the first global path length of the current initial optimization path and the second global path length of the last initial optimization path to provide positive feedback of pheromones. Only when the current path is shorter can a positive increase in pheromones be generated, providing positive feedback of pheromones for the next iterative process, which can effectively speed up the subsequent optimization process.
[0125] Based on the above embodiments, the server rack path optimization method may include: if the first global path length of the current initial optimization path is the same as the second global path length of the last initial optimization path, then the current initial optimization path is used as the target optimization path; and / or, if the current number of iterations meets the preset number of iterations requirement, then the target optimization path is determined based on the current initial optimization path and the last initial optimization path.
[0126] The preset number of iterations requirement may refer to a preset number of iterations threshold. When the number of iterations reaches this threshold, the iteration will be stopped regardless of whether the current path can be further optimized, and the target optimization path will be determined based on the current initial optimization path and the last initial optimization path. This is to prevent the algorithm from falling into an infinite loop or excessive iterations, and to balance the optimization effect and computing resource consumption to a certain extent.
[0127] In one example, if the first global path length of the current initial optimization path is the same as the second global path length of the last initial optimization path, the current initial optimization path is used as the target optimization path.
[0128] In another example, if the current number of iterations meets the preset number of iterations, the target optimization path is determined according to the current initial optimization path and the last initial optimization path. Optionally, the current initial optimization path is used as the target optimization path, or the path with a shorter global path length is used as the target optimization path.
[0129] In another example, if the first global path length of the current initial optimization path is the same as the second global path length of the last initial optimization path, and the current number of iterations meets the preset number of iterations requirement, the iteration is terminated, and the target optimization path is determined based on the current initial optimization path and the last initial optimization path.
[0130] By comparing the length of the current initial optimization path and the last target optimization path during the iteration process, it is possible to promptly determine whether the current iteration has achieved a better optimization effect. When the path length no longer improves, the iteration can be stopped, avoiding meaningless waste of computing resources and improving the efficiency of the algorithm. At the same time, the setting of the preset number of iterations allows the algorithm to give a relatively good result within a certain period of time even if it cannot quickly converge to a better path under complex circumstances, thereby enhancing the stability and reliability of the algorithm. It can more flexibly and efficiently find the optimal shelving path under different data center environments and shelving requirements, thereby effectively reducing the time and labor costs of server shelving and improving the operational efficiency of the data center.
[0131] Figure 2 Schematic diagram of the process of optimizing the server path provided in this application Figure 2 .like Figure 2 As shown, the method may include:
[0132] S201. Set a set of shelf locations according to the three-dimensional terrain data of the computer room to obtain initial data.
[0133] The three-dimensional terrain data of the computer room is input to generate a bounded three-dimensional area, which contains multiple independent computer rooms. Each computer room has multiple rows of cabinets. The cabinets are regarded as independent path points to obtain initial data, including the path point set N = {n0, n1, n2, ..., n m-1} and the path length matrix L m×m , where L i,j Represents the path length from path point i to j.
[0134] S202. Taking the server shelving path as the optimization target, and taking the shelving location set, the flatbed truck capacity limit, and the number of shelves corresponding to the shelving locations as constraints, a multi-batch server shelving path planning model is established.
[0135] Among them, taking the server shelving path as the optimization goal, and taking the shelving location set, flatbed truck capacity limit, and the number of shelves corresponding to the shelving location as constraints, a multi-batch server shelving path planning model is established.
[0136] Furthermore, define the path decision variable x on the server i,j In order to make the total transportation path shortest, according to the path length L from the shelf position i to the shelf position j i,j , determine the objective function min R and the corresponding constraints.
[0137] In view of the constraint of returning to the unpacking point for loading multiple times, the path planning is adjusted. The maximum cargo capacity of the flatbed truck is recorded as G, and the cargo capacity change variable Q is defined. The unpacking point is used as the starting point of multiple loading paths, and the kth path starting from the unpacking point is recorded as r k , then the objective function is changed to minR=∑r k .
[0138] S203: Convert the server routing problem into a vehicle routing problem with capacity constraints, taking path length as the optimization objective and customer demand and vehicle cargo load as constraints.
[0139] Among them, as shown in Table 1, the flatbed truck, shelf location, unpacking point, flatbed truck capacity, path length, and shelf quantity in the established multi-batch server shelf path planning model are respectively corresponded to the corresponding parameters such as vehicles, customers, warehouses, goods, maximum cargo capacity of vehicles, path length, customer demand, etc. in the capacity-constrained vehicle routing problem model, thereby converting the server shelf path problem into a capacity-constrained vehicle routing problem with path length as the optimization goal and customer demand and vehicle cargo as constraints.
[0140] Table 1: Correspondence between the multi-batch server routing model and the vehicle routing problem with capacity constraints
[0141] Transport cart path planning Capability Constrained Vehicle Routing Problem flatbed truck vehicle Shelf location client Unboxing Point storehouse server goods Flatbed truck cargo capacity Maximum cargo capacity Path length Path length Shelf quantity Customer needs
[0142] S204. Solve the problem using the ant colony algorithm improved by the 2-opt algorithm.
[0143] It should be noted that the ant colony algorithm improved by the 2-opt algorithm can correspond to the path optimization rule to determine the target optimization path.
[0144] The server shelving path optimization method provided in the embodiment of the present application takes the server shelving path as the optimization target, takes the shelving location set, the maximum capacity limit of the flatbed truck, and the number of shelves corresponding to the shelving location as the constraints, and establishes a multi-batch server shelving path planning model; then the flatbed truck, the shelving location, the unpacking point, the maximum capacity of the flatbed truck, the path length, and the number of shelves corresponding to the shelving location in the established shelving path planning model are respectively corresponded to the corresponding vehicle, customer, warehouse, cargo, maximum cargo capacity of the vehicle, path length, customer demand and other parameters in the vehicle path problem model with capacity constraints, thereby converting the data center server shelving path optimization problem into a vehicle path problem with capacity constraints with path length as the optimization target and customer demand and vehicle cargo as constraints; finally, the converted vehicle path problem is solved using an ant colony algorithm improved based on the 2-opt algorithm. It provides a feasible method for the server shelving path planning problem in the data center, effectively saving labor costs and improving the efficiency of server shelving in the data center.
[0145] Figure 3 A flow chart of the server path optimization method based on path optimization rules provided in this application is as follows: Figure 3 As shown, in this embodiment Figure 2 Based on the embodiment, a server rack path optimization method is described in detail, and the method includes:
[0146] (1) First, based on the three-dimensional terrain data scale of the computer room, generate a path length matrix L with m rack locations m×m And the data set D = {d1, d2, ..., d m}, then the data d of the i-th listing position i Including the fixed starting point, i.e. the unpacking point n0, the shelf position n i , Listing location Server listing quantity q i .
[0147] (2) Initialize the parameters of the ant colony algorithm. The corresponding parameters may include:
[0148] s is the number of ants; N i is the next node set of the shelf position i; α is the pheromone importance factor; β is the heuristic function importance factor; ρ is the pheromone volatility coefficient; η i,j is the inverse of the distance from shelf position i to j, distance Li,j The smaller the i,j The larger the τ i,j is the pheromone concentration from shelf position i to j.
[0149] (3) Solve the server path optimization model based on the ant colony algorithm and update the local pheromone.
[0150] When ant k is at shelf position i, the probability of going to each shelf position j is calculated according to the transfer probability calculation formula The shelf position with the highest probability is selected as the next shelf position, and the selected next position is added to the taboo table and updated. Whenever the next shelf position is selected, the pheromone update formula (τ i,j (t+1)=(1-ρ i )τ i,j +ρ i τ0) locally updates the pheromone on the path just traveled.
[0151] (4) Perform 2-opt optimization in the listing path to determine whether the taboo table is full.
[0152] Repeat step (3) until the taboo table is full and an algorithm iteration is completed. The optimal solution of this iteration is obtained. The 2-opt algorithm is used to randomly exchange the positions of two points in the optimal path multiple times to obtain a new path based on the optimal solution. This new path is compared with the current optimal path to try to find a better path. If a better path exists, it is retained as the new optimal path.
[0153] The traditional ant colony algorithm uses the roulette algorithm to process the calculated probability, which reduces the relative importance of pheromone concentration, expands the range that the ant colony can search, and avoids rapid convergence and thus jumping out of the local optimal solution. However, the roulette algorithm also increases the time complexity of the algorithm when performing local optimization, and increases the difficulty of finding the global optimal solution. Therefore, the 2-opt algorithm is used to replace the roulette algorithm, that is, the positions of two points in the optimal path are randomly exchanged multiple times to obtain a new path based on the optimal solution, which is compared with the current optimal path to try to find a better path. If a better path exists, it is retained as the new optimal path.
[0154] (5) After one round of iteration, the global pheromone update is performed.
[0155] According to the global pheromone update formula (τ i,j (t+1)=(1-ρ)τ i,j +ρΔτ i,j ) The pheromone on the optimal path obtained in this iteration is updated. The global pheromone on the optimal path is updated in each iteration, which provides positive feedback of pheromone for the next iteration process and can effectively speed up the subsequent optimization process.
[0156] (6) When the maximum number of iterations is reached, the optimal path and optimal path table are output.
[0157] If the number of iterations does not reach the set maximum number of iterations, the position of the flatbed truck is set as the starting point and the process returns to step (3) to start the next round of iterations. Otherwise, as the number of iterations increases, the optimal path length no longer changes, the algorithm ends, and the optimal path and optimal path table are output.
[0158] Figure 4 A schematic diagram of the modeling of the server rack target location provided for this application, such as Figure 4 As shown, the starting point described in the figure is the server unpacking point position n0, and other points except the starting point correspond to the cabinet positions of the cabinet to be mounted.
[0159] Figure 5 The schematic diagram of the iterative results of the server rack path optimization method provided in this application is as follows: Figure 5 As shown in , when the number of iterations is 100, the optimal path length no longer changes, and the target optimal path can be output, as Figure 6 As shown, it can be used as a reference indicator for the actual walking path of the data center when the server is racked, so as to improve the server racking efficiency of the data center.
[0160] Figure 7 The schematic diagram of the structure of the server rack path optimization device provided in this application is as follows: Figure 7 As shown, the server rack path optimization device 70 provided in this embodiment includes:
[0161] The first determination module 701 is used to determine the location of the server unpacking point, the cabinet location of each cabinet to be put on the rack in the computer room, and the path between each two locations of the server unpacking point and the locations of the cabinets to be put on the rack, the path length corresponding to the path, and the initial pheromone concentration on each path;
[0162] Processing module 702, used to determine the current initial optimization path, the current number of iterations, and the current local pheromone concentration on each path according to the path length, the initial pheromone concentration on each path, and the path optimization rule, the path optimization rule is determined based on the ant colony algorithm and the two-element optimization algorithm, and the local pheromone concentration is the pheromone concentration obtained by locally updating the pheromone on each path in the process of selecting the optimization path based on the path optimization rule;
[0163] An acquisition module 703 is used to acquire a previous initial optimization path, where the previous initial optimization path is an initial optimization path obtained in the previous iteration of the current iteration number;
[0164] An analysis module 704 is used to determine the global pheromone increase amount according to the first global path length and the second global path length if the first global path length of the current initial optimization path is different from the second global path length of the last initial optimization path;
[0165] An updating module 705 is used to globally update the pheromone on each path in the current initial optimization path according to the global pheromone increase and the current local pheromone concentration, so as to obtain the global pheromone concentration on the current initial optimization path;
[0166] The second determination module 706 is used to update the initial pheromone concentration on each path according to the global pheromone concentration and the current local pheromone concentration, and re-execute the steps of determining the current initial optimization path, the current number of iterations, and the current local pheromone concentration on each path according to the path length, the initial pheromone concentration on each path and the path optimization rule, until the first global path length of the current initial optimization path is the same as the second global path length of the previous initial optimization path, and the target optimization path is determined.
[0167] In a possible implementation, the processing module 702 may also be used to:
[0168] Determine the number of ants required for path optimization. The ants are used to simulate the behavior of a flatbed truck starting from the server unpacking point and then returning to the server unpacking point to form a path;
[0169] For each ant, determine the target path formed by the ant starting from the server unpacking point, passing through each rack to be mounted, and returning to the server unpacking point, as well as the current local pheromone concentration on each path, based on the path length and the initial pheromone concentration on each path;
[0170] According to the target path corresponding to each ant, the current initial optimization path and the current number of iterations are determined.
[0171] In a possible implementation, the processing module 702 may also be used to:
[0172] For each ant, the server unpacking point is used as the starting point of the ant. According to the path length between the starting point and the first cabinet to be put on the shelf and the initial pheromone concentration on the corresponding path, the second cabinet to be put on the shelf that the ant reaches after starting from the starting point is determined, and the path status of the second cabinet to be put on the shelf is updated in the taboo table. The first cabinet to be put on the shelf is the cabinet to be put on the shelf that meets the preset constraints between the starting point and the cabinet;
[0173] Locally update the pheromone on the path between the starting point and the second point to obtain the corresponding local pheromone concentration;
[0174] Take the second cabinet to be put on the shelf as the starting point of the ant, and re-execute the step of determining the second cabinet to be put on the shelf that the ant reaches after starting from the starting point according to the path length between the starting point and the position of the first cabinet to be put on the shelf and the initial pheromone concentration on the corresponding path, until the second cabinet to be put on the shelf updated in the taboo table includes every cabinet to be put on the shelf in the computer room, and obtain the target path formed by the ant starting from the server unpacking point, passing through each cabinet to be put on the shelf and returning to the server unpacking point, as well as the current local pheromone concentration on each path.
[0175] In a possible implementation, the processing module 702 may also be used to:
[0176] Determine the probability that the ant will reach the first cabinet position after starting from the starting point position according to the path length between the starting point position and the first cabinet position to be mounted and the initial pheromone concentration on the corresponding path;
[0177] For multiple first racks to be put on the rack, determine a second rack to be put on the rack that meets a preset probability requirement.
[0178] In a possible implementation, the processing module 702 may also be used to:
[0179] Determine a first optimized path that meets a preset path length requirement according to the target path corresponding to each ant;
[0180] Swapping any two positions in the first optimization path to generate a second optimization path;
[0181] The path length of the first optimization path is compared with the path length of the second optimization path to determine the current initial optimization path and the current number of iterations.
[0182] In a possible implementation, the analysis module 704 may also be used to:
[0183] The global pheromone increase meets the following requirements:
[0184]
[0185] Among them, Δτ i,j The global pheromone increase; L p+1 is the second global path length; L p is the first global path length.
[0186] In a possible implementation, the analysis module 704 may also be used to:
[0187] If the first global path length of the current initial optimization path is the same as the second global path length of the last initial optimization path, the current initial optimization path is used as the target optimization path;
[0188] and / or,
[0189] If the current number of iterations meets the preset number of iterations, the target optimization path is determined according to the current initial optimization path and the last initial optimization path.
[0190] The server rack path optimization device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be described in detail here.
[0191] Figure 8 This is a schematic diagram of the structure of the electronic device provided in this application. Figure 8 As shown, the electronic device 80 provided in this embodiment includes: at least one processor 801 and a memory 802. Optionally, the device 80 also includes a communication component 803. The processor 801, the memory 802 and the communication component 803 are connected via a bus 804.
[0192] In a specific implementation process, at least one processor 801 executes the computer-executable instructions stored in the memory 802, so that at least one processor 801 executes the above method.
[0193] The specific implementation process of the processor 801 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.
[0194] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0195] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.
[0196] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.
[0197] The present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.
[0198] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.
[0199] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0200] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.
[0201] The division of units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0202] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0203] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0204] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0205] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0206] Finally, it should be noted that those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention, which follow the general principles of the present invention and include common knowledge or customary technical means in the art not disclosed by the present invention, are not limited to the precise structure described above and shown in the drawings, and may be modified and changed in various ways without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A server rack path optimization method, characterized in that: include: Determine the location of the server unpacking point, the cabinet location of each cabinet to be put on the rack in the computer room, and the path between each two locations of the server unpacking point and the locations of the cabinets to be put on the rack, the path length corresponding to the path, and the initial pheromone concentration on each path; According to the path length, the initial pheromone concentration on each path and the path optimization rule, the current initial optimization path, the current number of iterations, and the current local pheromone concentration on each path are determined, wherein the path optimization rule is determined based on the ant colony algorithm and the two-element optimization algorithm, and the local pheromone concentration is the pheromone concentration obtained by locally updating the pheromone on each path during the process of selecting the optimization path based on the path optimization rule; Obtaining a previous initial optimization path, where the previous initial optimization path is an initial optimization path obtained in the iteration before the current iteration number; If the first global path length of the current initial optimization path is different from the second global path length of the last initial optimization path, determining the global pheromone increase amount according to the first global path length and the second global path length; According to the global pheromone increase and the current local pheromone concentration, the pheromone on each path in the current initial optimization path is globally updated to obtain the global pheromone concentration on the current initial optimization path; According to the global pheromone concentration and the current local pheromone concentration, the initial pheromone concentration on each path is updated, and the step of determining the current initial optimization path, the current number of iterations, and the current local pheromone concentration on each path according to the path length, the initial pheromone concentration on each path and the path optimization rule is re-executed until the first global path length of the current initial optimization path is the same as the second global path length of the previous initial optimization path, and the target optimization path is determined.
2. The method according to claim 1, characterized in that Determining the current initial optimization path, the current number of iterations, and the current local pheromone concentration on each path according to the path length, the initial pheromone concentration on each path, and the path optimization rule includes: Determine the number of ants required for path optimization, where the ants are used to simulate the behavior of a flatbed truck starting from the server unpacking point, passing through the cabinet to be put on the rack, and returning to the server unpacking point to form a path; For each ant, according to the path length and the initial pheromone concentration on each path, determine the target path formed by the ant starting from the server unpacking point, passing through each rack to be mounted, and returning to the server unpacking point, as well as the current local pheromone concentration on each path; According to the target path corresponding to each ant, the current initial optimization path and the current number of iterations are determined.
3. The method according to claim 2, characterized in that For each ant, according to the path length and the initial pheromone concentration on each path, determining the target path formed by the ant starting from the server unpacking point, passing through each rack to be mounted, and returning to the server unpacking point, as well as the current local pheromone concentration on each path, includes: For each ant, the server unpacking point is used as the starting point of the ant, and the second cabinet to be put on the shelf that the ant reaches after starting from the starting point is determined according to the path length between the starting point and the first cabinet to be put on the shelf and the initial pheromone concentration on the corresponding path, and the path status of the second cabinet to be put on the shelf is updated in the taboo table. The first cabinet to be put on the shelf is the cabinet to be put on the shelf that meets the preset constraint conditions between the starting point and the first cabinet to be put on the shelf; Locally updating the pheromone on the path between the starting point and the second rack position to be mounted to obtain a corresponding local pheromone concentration; Take the second cabinet to be put on the shelf as the starting point of the ant, and re-execute the step of determining the second cabinet to be put on the shelf that the ant reaches after starting from the starting point according to the path length between the starting point and the first cabinet to be put on the shelf and the initial pheromone concentration on the corresponding path, until the second cabinet to be put on the shelf updated in the taboo table includes each cabinet to be put on the shelf in the computer room, and obtain the target path formed by the ant starting from the server unpacking point, passing through each cabinet to be put on the shelf and returning to the server unpacking point, as well as the current local pheromone concentration on each path.
4. The method according to claim 3, characterized in that The step of determining the second cabinet to be mounted after the ant starts from the starting point according to the path length between the starting point and the first cabinet to be mounted and the initial pheromone concentration on the corresponding path comprises: Determine the probability that the ant will reach the first cabinet position to be mounted after starting from the starting point position according to the path length between the starting point position and the first cabinet position to be mounted and the initial pheromone concentration on the corresponding path; For multiple first racks to be put on the rack, determine a second rack to be put on the rack that meets a preset probability requirement.
5. The method according to claim 2, characterized in that: The step of determining the current initial optimization path and the current number of iterations according to the target path corresponding to each ant includes: Determine a first optimized path that meets a preset path length requirement according to the target path corresponding to each ant; Swapping any two positions in the first optimization path to generate a second optimization path; The path length of the first optimization path and the path length of the second optimization path are compared to determine the current initial optimization path and the current number of iterations.
6. The method according to claim 1, characterized in that The global pheromone increase satisfies: Among them, Δτ i,j is the global pheromone increase; L p+1 is the second global path length; L p is the first global path length.
7. The method according to claim 1, characterized in that The method further comprises: If the first global path length of the current initial optimization path is the same as the second global path length of the last initial optimization path, taking the current initial optimization path as the target optimization path; and / or, If the current number of iterations meets the preset number of iterations requirement, a target optimization path is determined according to the current initial optimization path and the last initial optimization path.
8. A server rack path optimization device, characterized in that: include: The first determination module is used to determine the location of the server unpacking point, the cabinet location of each cabinet to be put on the rack in the computer room, and the path between each two locations of the server unpacking point and the locations of the cabinets to be put on the rack, the path length corresponding to the path, and the initial pheromone concentration on each path; A processing module, used to determine the current initial optimization path, the current number of iterations, and the current local pheromone concentration on each path according to the path length, the initial pheromone concentration on each path, and the path optimization rule, wherein the path optimization rule is determined based on the ant colony algorithm and the two-element optimization algorithm, and the local pheromone concentration is the pheromone concentration obtained by locally updating the pheromone on each path during the process of selecting the optimization path based on the path optimization rule; An acquisition module, used to acquire a previous initial optimization path, where the previous initial optimization path is an initial optimization path obtained in the previous iteration of the current iteration number; An analysis module, configured to determine the global pheromone increase amount according to the first global path length and the second global path length if the first global path length of the current initial optimization path is different from the second global path length of the last initial optimization path; An updating module, used for globally updating the pheromone on each path in the current initial optimization path according to the global pheromone increase and the current local pheromone concentration, to obtain the global pheromone concentration on the current initial optimization path; The second determination module is used to update the initial pheromone concentration on each path according to the global pheromone concentration and the current local pheromone concentration, and re-execute the step of determining the current initial optimization path, the current number of iterations, and the current local pheromone concentration on each path according to the path length, the initial pheromone concentration on each path and the path optimization rule, until the first global path length of the current initial optimization path is the same as the second global path length of the previous initial optimization path, and the target optimization path is determined.
9. An electronic device, characterized in that: include: Memory, processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.