A global load balancing method and apparatus

CN116708448BActive Publication Date: 2026-10-20CHINA MOBILE (XIONGAN) ICT CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210178796.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-25
Publication Date
2026-10-20
Estimated Expiration
2042-02-25

AI Technical Summary

Technical Problem

[0003]本申请实施例提供一种全局负载均衡方法及装置,用以解决现有的负载均衡方法容易陷入局部最优的循环,无法保证寻找到全局最优服务器的技术问题

Benefits of technology

[0038]本申请实施例提供的一种全局负载均衡方法及装置,将加入振荡收敛的增强粒子群优化算法应用于全局负载均衡领域,在增强粒子群优化算法中加入振荡收敛来训练全局负载均衡寻优模型,使得有效跳出局部最优的循环,提高粒子群优化算法的搜索性能和精度,通过全局负载均衡寻优模型能够快速且准确地得到全局最优的服务器,利于合理规划全局均衡策略,有效节省服务器负载,更好地为用户服务。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116708448B_ABST
    Figure CN116708448B_ABST
Patent Text Reader

Abstract

The application provides a global load balancing method and device, and relates to the technical field of load balancing. The method comprises the following steps: a global load balancing optimization model is established; an optimal server is obtained through the global load balancing optimization model; and the global load balancing optimization model is obtained through training based on an enhanced particle swarm optimization algorithm with oscillation convergence. The global load balancing method and device provided in the application implement the enhanced particle swarm optimization algorithm with oscillation convergence in the field of global load balancing, train the global load balancing optimization model by adding oscillation convergence in the enhanced particle swarm optimization algorithm, make it possible to effectively break the cycle of local optimization, improve the search performance and precision of the particle swarm optimization algorithm, quickly and accurately obtain the globally optimal server through the global load balancing optimization model, facilitate reasonable planning of a global balancing strategy, effectively save the server load, and better serve the users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of load balancing technology, specifically to a global load balancing method and apparatus. Background Technology

[0002] Among the current mainstream load balancing methods, round-robin and random methods neglect the configuration of backend servers, making them difficult to implement in reality. When servers go online or offline, source address hashing methods cannot guarantee that the rerouted server is consistent with the server routed to before the server went online or offline, easily triggering a "snowball effect." Weighted round-robin, weighted random, and least connections methods are relatively complex compared to the previous load balancing methods, requiring system monitoring of server status to maintain normal operation, placing enormous pressure on the system. Although there are many load balancing methods available, none can meet the requirements for effective implementation in complex real-world situations, especially in global load balancing scenarios with high throughput. Existing load balancing methods are prone to getting stuck in local optima, failing to guarantee finding the globally optimal server, thus negating the purpose of global load balancing. Summary of the Invention

[0003] This application provides a global load balancing method and apparatus to solve the technical problem that existing load balancing methods are prone to getting stuck in a local optimum loop and cannot guarantee finding the globally optimal server.

[0004] In a first aspect, embodiments of this application provide a global load balancing method, including:

[0005] Establish a global load balancing optimization model;

[0006] The globally optimal server is obtained through the global load balancing optimization model.

[0007] The global load balancing optimization model is trained based on an enhanced particle swarm optimization algorithm with added oscillation convergence.

[0008] In one embodiment, obtaining the globally optimal server through the global load balancing optimization model includes:

[0009] The global load balancing optimization model obtains the particle fitness value based on the particle's velocity and position.

[0010] The historical best position and global best position of the particle are updated based on the particle fitness value, and the velocity and position of the particle are updated by incorporating an oscillating convergence update formula for the next iteration.

[0011] When the iteration reaches the termination condition, the server corresponding to the globally optimal position in the last iteration is output as the globally optimal server.

[0012] In one embodiment, updating the particle's velocity and position by incorporating an oscillating convergent update formula includes:

[0013] The particle velocity is updated using a first update formula, which is:

[0014] vi(t+1)=w*vi(t)+c1*r1*(pi-(1+ξ1)xi(t)-ξ1*xi(t-1))+c2*r2*(pg-(1+ξ2)xi(t)+ξ2*xi(t-1)),

[0015] when hour,

[0016] when hour,

[0017] The position of the particle is updated using the second update formula, which is: xi(t+1)=xi(t)+vi(t+1);

[0018] Where xi represents the position of particle i, vi represents the velocity of particle i at position xi, pi represents the historical best position of the particle, pg represents the global best position, w represents the inertia weight, c1 represents the individual learning factor, c2 represents the social learning factor, r1 and r2 represent parameters uniformly distributed between [0, 1], t represents the current iteration number, and G... max ξ1 and ξ2 represent the maximum number of iterations and the parameters for oscillation convergence.

[0019] In one embodiment, updating the historical best position and global best position of the particle based on the particle fitness value, and updating the particle's velocity and position by incorporating an oscillating convergence update formula, further includes:

[0020] The inertial weights of particle motion in the next iteration are adjusted based on the particle fitness value of the current iteration.

[0021] In one embodiment, adjusting the inertial weights of particle motion in the next iteration based on the particle fitness value of the current iteration specifically involves:

[0022] Based on the particle fitness value of the current iteration, the inertial weight of the particle motion in the next iteration is adjusted using an adaptive weight adjustment formula, which is:

[0023] When f≤f avg ;

[0024] w'=w max When f>f avg ;

[0025] Where w' represents the adjusted inertia weight, w min w represents the minimum inertia weight. max Let f represent the maximum inertia weight, and let f represent the particle fitness value in the current iteration. min f represents the minimum particle fitness value. max f represents the maximum particle fitness value. avg This represents the average particle fitness value.

[0026] In one embodiment, updating the historical best position and global best position of the particle based on the particle fitness value, and updating the particle's velocity and position by incorporating an oscillating convergence update formula, further includes:

[0027] The individual learning factor and social learning factor of particle motion are adjusted based on the inertial weight using a weighted function.

[0028] In one embodiment, adjusting the individual learning factor and social learning factor of particle motion using a weighted function based on inertial weights includes:

[0029] The individual learning factor of particle motion is adjusted using an individual learning factor adjustment formula, which is:

[0030] The social learning factor of particle motion is adjusted using a social learning factor adjustment formula, which is:

[0031] Where c1' represents the adjusted individual learning factor, c2' represents the adjusted social learning factor, c1 represents the current individual learning factor, c2 represents the current social learning factor, and w represents the inertia weight. min w represents the minimum inertia weight. max Let f represent the maximum inertia weight, and let f represent the particle fitness value in the current iteration. min f represents the minimum particle fitness value. avg This represents the average particle fitness value.

[0032] Secondly, embodiments of this application provide a global load balancing device, comprising:

[0033] The global load balancing optimization model establishment module is used to: establish a global load balancing optimization model;

[0034] The global optimal server acquisition module is used to: obtain the global optimal server through the global load balancing optimization model;

[0035] The global load balancing optimization model is trained based on an enhanced particle swarm optimization algorithm with added oscillation convergence.

[0036] Thirdly, embodiments of this application provide an electronic device, including a processor and a memory storing a computer program, wherein the processor executes the program to implement the global load balancing method described in the first aspect.

[0037] Fourthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the global load balancing method described in the first aspect.

[0038] This application provides a global load balancing method and apparatus that applies an enhanced particle swarm optimization algorithm with oscillatory convergence to the field of global load balancing. By incorporating oscillatory convergence into the enhanced particle swarm optimization algorithm to train the global load balancing optimization model, it effectively escapes the local optimum loop, improves the search performance and accuracy of the particle swarm optimization algorithm, and enables the global optimal server to be obtained quickly and accurately through the global load balancing optimization model. This facilitates the rational planning of global balancing strategies, effectively saves server load, and better serves users. Attached Figure Description

[0039] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0040] Figure 1 This is one of the flowcharts of the global load balancing method provided in the embodiments of this application.

[0041] Figure 2 This is the second flowchart of the global load balancing method provided in the embodiments of this application.

[0042] Figure 3 This is a schematic diagram of the oscillation convergence of the global load balancing optimization model in the global load balancing method provided in the embodiments of this application.

[0043] Figure 4 This is a schematic diagram illustrating the asymptotic convergence of the global load balancing optimization model in the global load balancing method provided in this application embodiment.

[0044] Figure 5 This illustrates the iterative process of adaptively adjusting inertia weights in the global load balancing method provided in this application embodiment.

[0045] Figure 6 This illustrates the iterative process of improving the learning factor using a weighted function in the global load balancing method provided in this application embodiment.

[0046] Figure 7 This is a schematic diagram of the global load balancing device provided in the embodiments of this application.

[0047] Figure 8 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0048] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0049] Load balancing refers to the symmetrical arrangement of multiple servers into a single server cluster. Each server has equal status and can independently provide services without the assistance of other servers. Through load-sharing techniques, incoming requests are evenly distributed across a single server in this symmetrical structure, and the server receiving the request responds independently to the client's request. Load balancing distributes client requests evenly across the server array, thereby providing fast access to critical data and resolving issues related to high-concurrency access. This clustering technology can achieve near-mainframe performance with minimal investment.

[0050] Load balancing distributes workloads across multiple operational units, such as FTP servers, web servers, core enterprise application servers, and other primary task servers, enabling them to collaboratively complete tasks. Built upon existing network infrastructure, load balancing provides a transparent, cost-effective, and efficient method to expand server and network device bandwidth, enhance network data processing capabilities, increase throughput, and improve network availability and flexibility.

[0051] No matter how robust the redundancy mechanisms, security tools, and advanced load balancing technologies employed within a user's data center, a single data center cannot guarantee 24 / 7 uninterrupted operation of critical services. Furthermore, a single data center cannot provide users in different locations globally with a consistently fast access experience when accessing applications. Global Server Load Balancing (GSLB) primarily aims to direct user requests to the nearest node (or region) across the entire network. Therefore, proximity determination is a core function of GSLB. Local load balancing, on the other hand, is generally limited to a specific regional area, aiming to find the most suitable node within that area to provide the service.

[0052] Global load balancing (GSLB) can be implemented based on DNS, redirection, or routing protocols. Its key features include: determining server availability by assessing server load, including CPU and bandwidth usage; and selecting the server with the best link between the user (visitor) and the server. Therefore, GSLB comprehensively evaluates both server and link conditions to determine which location should provide service, ensuring quality of service across geographically dispersed server clusters.

[0053] Figure 1 and Figure 2 This is a flowchart illustrating a global load balancing method provided in an embodiment of this application.

[0054] Reference Figure 1 The global load balancing method provided in this application embodiment may include:

[0055] S110. Establish a global load balancing optimization model.

[0056] S120. Obtain the globally optimal server through the global load balancing optimization model.

[0057] It should be noted that the global load balancing optimization model is trained using an enhanced particle swarm optimization algorithm with added oscillation convergence.

[0058] It should be noted that the execution subject of the global load balancing method provided in this application embodiment can be any network-side device, such as a user request processing system, etc.

[0059] In step S110, the network-side device will establish a global load balancing optimization model.

[0060] It should be noted that the embodiments of this application employ an enhanced particle swarm optimization algorithm with added oscillation convergence to train the global load balancing optimization model.

[0061] Particle swarm optimization (PSO) is an evolutionary computation technique originating from studies of bird flocks' foraging behavior. The basic idea of ​​PSO is to find the optimal solution through cooperation and information sharing among individuals within the swarm. It is particularly suitable for scenarios like global load balancing, where the business logic is complex but the mathematical model is relatively simple, and information sharing among individuals is necessary. This application employs an enhanced PSO algorithm with oscillatory convergence to train the global load balancing optimization model. This enhances the overall global search capability and later convergence ability of the global load balancing optimization model, preventing it from getting trapped in local optima. This significantly improves the efficiency and correctness of request forwarding in finding the server. Furthermore, because the enhanced PSO algorithm has low performance requirements, it does not place excessive pressure on the load balancing server.

[0062] Specifically, when establishing a global load balancing optimization model, network-side devices can first define various parameters and variables in the model. Particle swarm optimization is generally used to find the optimal value of a certain function; in practical applications, this can manifest as finding the optimal server to forward a request. This certain function can be a fitness function, thus yielding the optimal server capable of forwarding the request.

[0063] The number of unknowns in the function is the spatial dimension of this search.

[0064] Suppose there are N servers, each acting as a particle, forming a population S;

[0065] xi represents the position of particle i, where i = 1, 2, ..., N;

[0066] vi represents the velocity of particle i at position Xi, i = 1, 2, ..., N;

[0067] pi represents the best position that particle i has traversed (the particle's historical best position), i = 1, 2, ..., N;

[0068] pg represents the optimal position among all the positions traversed by the particles (the optimal position in the swarm, also known as the global optimal position), i = 1, 2, ..., N;

[0069] w represents the inertia weight;

[0070] c1 and c2 represent individual learning factors and social learning factors, respectively;

[0071] r1 and r2 are parameters uniformly distributed between the interval [0, 1], and are random numbers that need to be updated in each iteration.

[0072] Then, the network-side device can also define update formulas for updating the velocity and position of particles during iteration. In this embodiment, the update formulas include a first update formula and a second update formula. The first update formula is used to update the velocity of the particles, and the first update formula is specifically as follows:

[0073] vi(t+1)=w*vi(t)+c1*r1*(pi-(1+ξ1)xi(t)-ξ1*xi(t-1))+c2*r2*(pg-(1+ξ2)xi(t)+ξ2*xi(t-1)),

[0074] when hour,

[0075] when hour,

[0076] The second update formula is used to update the position of the particles. The second update formula is as follows:

[0077] xi(t+1)=xi(t)+vi(t+1) (2);

[0078] Where xi represents the position of particle i, vi represents the velocity of particle i at position xi, pi represents the historical best position of the particle, pg represents the global best position, w represents the inertia weight, c1 represents the individual learning factor, c2 represents the social learning factor, r1 and r2 represent parameters uniformly distributed between [0, 1], t represents the current iteration number, and G... max ξ1 and ξ2 represent the maximum number of iterations and the parameters for oscillation convergence.

[0079] In a typical PSO (Programmable Optimization Search), xi(t) tends to fluctuate within a fixed interval, meaning the algorithm searches for the position of each particle after the t-th iteration within this interval. The position function xi(t) does not oscillate and converge, making the algorithm prone to getting trapped in local optima. In application scenarios, this can cause requesting particles to get stuck in partial optima within a server cluster when searching for the optimal server, thus failing to find the optimal server across the entire cluster. While a partial optimum may still accept the request, the purpose of the algorithm in searching for the globally optimal server is lost. Ultimately, this leads to increasingly heavy server load, at which point the algorithm loses its ability to escape local optima, and subsequent requests may also fall into other local optima, resulting in a cycle of different local optima.

[0080] This application employs an enhanced particle swarm optimization algorithm with second-order oscillatory convergence. The significance lies in enabling the global load balancing optimization model to oscillate and converge in the first half of the iteration, improving the global search capability of the particle swarm. In the second half of the iteration, it enables the global load balancing optimization model to converge asymptotically, accelerating the convergence speed and ensuring the efficiency of request forwarding by obtaining the globally optimal server. A schematic diagram of oscillatory convergence and asymptotic convergence is shown below. Figure 3 and Figure 4 As shown.

[0081] In step S120, the network-side device will obtain the globally optimal server through the global load balancing optimization model.

[0082] It should be noted that step S120 may include:

[0083] The global load balancing optimization model obtains the particle fitness value based on the particle's velocity and position.

[0084] The historical best position and global best position of the particle are updated based on the particle fitness value, and the velocity and position of the particle are updated by incorporating an oscillating convergence update formula for the next iteration.

[0085] When the iteration reaches the termination condition, the server corresponding to the globally optimal position in the last iteration is output as the globally optimal server.

[0086] Specifically, refer to Figure 2The network-side device can first initialize a particle swarm (containing n particles) using a global load balancing optimization model: n requests are simulated globally as particles forming the particle swarm, with each server represented by its coordinates. During particle movement, particles tend to move towards the optimal server; the movement of the particle swarm serves as the algorithm's objective. During iteration, the network-side device can calculate the fitness value of each request as a particle based on its current speed and position, using a fitness function. Then, the optimal server for each individual request is determined: for each request particle, its fitness value at its current position is compared to its historical best position. If the current position's fitness value is higher, it indicates that the server at the current position is better than the historical best position. The current position is then used to update the particle's historical best position. This method helps find the optimal server for the current request. Then the network-side device can find the optimal fitness value of the group: the requesting particles in the group will share their respective optimal positions, thus obtaining the global optimal position. For each requesting particle, the fitness value of its current position can be compared with the fitness value corresponding to the current global optimal position. If the fitness value of a requesting particle's current position is higher, then its current position is used to update the global optimal position. In this way, the global optimal position in the particle group can be found.

[0087] When the iteration reaches the termination condition (the termination condition can be reaching a preset number of iterations or the particle fitness value exceeding a preset threshold, etc.), the server corresponding to the global optimal position in the last iteration is the global optimal server. When the iteration does not reach the termination condition, the particle velocity and position can be updated using the above equations (1) and (2), and the next iteration can be performed until the iteration reaches the termination condition. The server corresponding to the global optimal position in the last iteration is then output as the global optimal server.

[0088] The global load balancing method provided in this application applies an enhanced particle swarm optimization algorithm with oscillatory convergence to the field of global load balancing. By incorporating oscillatory convergence into the enhanced particle swarm optimization algorithm to train the global load balancing optimization model, it effectively escapes the local optimum loop, improves the search performance and accuracy of the particle swarm optimization algorithm, and can quickly and accurately obtain the globally optimal server through the global load balancing optimization model. This facilitates the rational planning of global balancing strategies, effectively saves server load, and better serves users.

[0089] In one embodiment, updating the historical best position and global best position of the particle based on the particle fitness value, and updating the particle's velocity and position by incorporating an oscillating convergence update formula, may further include:

[0090] The inertial weights of particle motion in the next iteration are adjusted based on the particle fitness value of the current iteration.

[0091] It should be noted that an adaptive weight adjustment method can be adopted to adjust the inertia weight of particle motion in the next iteration based on the particle fitness value of the current iteration. A larger inertia weight is beneficial for global search, while a smaller inertia weight is beneficial for local search. The network-side device can set a maximum and a minimum inertia weight, and then make the inertia weight change with the particle fitness value during the iteration process. Figure 5 The iterative process of adaptively adjusting the inertia weight is shown.

[0092] Specifically, the network-side device can adjust the inertial weights of particle motion in the next iteration based on the particle fitness value of the current iteration using an adaptive weight adjustment formula. The adaptive weight adjustment formula can be:

[0093] When f≤f avg ,

[0094] w'=w max When f>f avg (3);

[0095] Where w' represents the adjusted inertia weight, w min w represents the minimum inertia weight. max Let f represent the maximum inertia weight, and let f represent the particle fitness value in the current iteration. min f represents the minimum particle fitness value. max f represents the maximum particle fitness value. avg This represents the average particle fitness value.

[0096] During the iterative process of particle motion, an adaptive weight adjustment method is adopted to adjust the inertia weight of particle motion in the next iteration based on the particle fitness value of the current iteration. This can improve the global search capability in the early stage of the global load balancing optimization model, as well as the local search capability in the later stage. This can significantly improve the search capability and convergence effect of the global load balancing optimization model, thereby achieving the goal of finding the globally optimal server quickly and accurately.

[0097] In one embodiment, updating the historical best position and global best position of the particle based on the particle fitness value, and updating the particle's velocity and position by incorporating an oscillating convergence update formula, may further include:

[0098] The individual learning factor and social learning factor of particle motion are adjusted based on the inertial weight using a weighted function.

[0099] It should be noted that using a weighted function to adjust the learning factor in the iterative process of particle motion based on the inertia weight can increase the coupling between the learning factor and the inertia weight. This increases the intelligence effect and search capability of the global load balancing optimization model using an enhanced particle swarm optimization algorithm with oscillatory convergence. In the early stage, the individual learning factor is larger, which is beneficial for the global load balancing optimization model to find the optimal solution globally. In the later stage, the individual learning factor decreases with the inertia weight, while the social learning factor increases with the inertia weight, which can effectively improve the convergence capability of the global load balancing optimization model. Figure 6 The iterative process of improving the learning factor using a weighted function is shown.

[0100] Specifically, the adjustment of individual and social learning factors of particle motion using a weighted function based on inertial weights may include:

[0101] The individual learning factor of particle motion is adjusted using an individual learning factor adjustment formula, which is:

[0102] The social learning factor of particle motion is adjusted using a social learning factor adjustment formula, which is:

[0103] Where c1' represents the adjusted individual learning factor, c2' represents the adjusted social learning factor, c1 represents the current individual learning factor, c2 represents the current social learning factor, and w represents the inertia weight. min w represents the minimum inertia weight. max Let f represent the maximum inertia weight, and let f represent the particle fitness value in the current iteration. min f represents the minimum particle fitness value. avg This represents the average particle fitness value.

[0104] By using a weighted function to adjust the individual and social learning factors of particle motion based on inertia weights, the learning factors can change with the inertia weights during the iteration process of particle motion. For general PSO and other improved methods, the learning factors and inertia weights are decoupled, weakening the uniformity of the PSO evolutionary process and hindering global particle search. The embodiments of this application, which make the learning factors change linearly with the inertia weights, improve the optimization accuracy of the global load balancing optimization model, increase particle interaction during particle motion, prevent getting trapped in local optima, and enhance the global load balancing optimization model's ability to search for optimal solutions and its convergence capability.

[0105] The global load balancing method provided in this application applies an enhanced particle swarm optimization algorithm with oscillatory convergence to the field of global load balancing. By incorporating oscillatory convergence into the enhanced particle swarm optimization algorithm to train the global load balancing optimization model, it effectively escapes the local optimum loop, improves the search performance and accuracy of the particle swarm optimization algorithm, and can quickly and accurately obtain the globally optimal server through the global load balancing optimization model. This facilitates the rational planning of global balancing strategies, effectively saves server load, and better serves users.

[0106] The global load balancing method provided in this application can determine server availability by judging server load, including CPU usage, bandwidth usage, and other data. It can also determine the link status between users (visitors) and servers, selecting the server with the best link status based on proximity. By comprehensively judging the server and link, it determines which location of the server should provide the service, thus ensuring the service quality of the geographically dispersed server cluster.

[0107] The global load balancing device provided in the embodiments of this application is described below. The global load balancing device described below can be referred to in correspondence with the global load balancing method described above.

[0108] Figure 7 This is a schematic diagram of the structure of a global load balancing device provided in an embodiment of this application.

[0109] Reference Figure 7 This application provides a global load balancing device, which may include:

[0110] The global load balancing optimization model establishment module 710 is used to: establish a global load balancing optimization model;

[0111] The global optimal server acquisition module 720 is used to: obtain the global optimal server through the global load balancing optimization model;

[0112] The global load balancing optimization model is trained based on an enhanced particle swarm optimization algorithm with added oscillation convergence.

[0113] In one embodiment, the globally optimal server acquisition module 720 may include:

[0114] The particle fitness value acquisition submodule is used to: obtain the particle fitness value based on the particle's velocity and position through the global load balancing optimization model;

[0115] The particle update submodule is used to: update the historical best position and global best position of the particle according to the particle fitness value, and update the velocity and position of the particle by adding an oscillating convergence update formula for the next iteration;

[0116] The global optimal server output submodule is used to: when the iteration reaches the termination condition, output the server corresponding to the global optimal position in the last iteration as the global optimal server.

[0117] In one embodiment, the particle update submodule may include:

[0118] The first particle update submodule is used to update the particle velocity using a first update formula, which is: vi(t+1)=w*vi(t)+c1*r1*(pi-(1+ξ1)xi(t)-ξ1*xi(t-1))+c2*r2*(pg-(1+ξ2)xi(t)+ξ2*xi(t-1)).

[0119] when hour,

[0120] when hour,

[0121] The second particle update submodule is used to update the position of the particle using a second update formula, which is: xi(t+1)=xi(t)+vi(t+1);

[0122] Where xi represents the position of particle i, vi represents the velocity of particle i at position xi, pi represents the historical best position of the particle, pg represents the global best position, w represents the inertia weight, c1 represents the individual learning factor, c2 represents the social learning factor, r1 and r2 represent parameters uniformly distributed between [0, 1], t represents the current iteration number, and G... max ξ1 and ξ2 represent the maximum number of iterations and the parameters for oscillation convergence.

[0123] In one embodiment, the globally optimal server acquisition module 720 may further include:

[0124] The inertia weight adjustment submodule is used to adjust the inertia weight of particle motion in the next iteration based on the particle fitness value of the current iteration.

[0125] It should be noted that the inertia weight adjustment submodule is specifically used to: adjust the inertia weight of the particle motion in the next iteration according to the particle fitness value of the current iteration, using an adaptive weight adjustment formula, which is:

[0126] When f≤f avg ;

[0127] w'=w max When f>f avg;

[0128] Where w' represents the adjusted inertia weight, w min w represents the minimum inertia weight. max Let f represent the maximum inertia weight, and let f represent the particle fitness value in the current iteration. min f represents the minimum particle fitness value. max f represents the maximum particle fitness value. avg This represents the average particle fitness value.

[0129] In one embodiment, the globally optimal server acquisition module 720 may further include:

[0130] The learning factor adjustment submodule is used to adjust the individual and social learning factors of particle motion based on inertial weights using a weighted function.

[0131] In one embodiment, the learning factor adjustment submodule may include:

[0132] The individual learning factor adjustment submodule is used to: adjust the individual learning factor of particle motion using an individual learning factor adjustment formula, wherein the individual learning factor adjustment formula is:

[0133]

[0134] The social learning factor adjustment submodule is used to: adjust the social learning factor of particle motion using a social learning factor adjustment formula, wherein the social learning factor adjustment formula is:

[0135]

[0136] Where c1' represents the adjusted individual learning factor, c2' represents the adjusted social learning factor, c1 represents the current individual learning factor, c2 represents the current social learning factor, and w represents the inertia weight. min w represents the minimum inertia weight. max Let f represent the maximum inertia weight, and let f represent the particle fitness value in the current iteration. min f represents the minimum particle fitness value. avg This represents the average particle fitness value.

[0137] Figure 8 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 8As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830, and a communication bus 840, wherein the processor 810, the communication interface 820, and the memory 830 communicate with each other via the communication bus 840. The processor 810 can call a computer program in the memory 830 to execute steps of a global load balancing method, such as including:

[0138] Establish a global load balancing optimization model;

[0139] The globally optimal server is obtained through the global load balancing optimization model.

[0140] The global load balancing optimization model is trained based on an enhanced particle swarm optimization algorithm with added oscillation convergence.

[0141] Furthermore, the logical instructions in the aforementioned memory 830 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0142] On the other hand, this application also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can perform the steps of the global load balancing method provided in the above embodiments, such as including:

[0143] Establish a global load balancing optimization model;

[0144] The globally optimal server is obtained through the global load balancing optimization model.

[0145] The global load balancing optimization model is trained based on an enhanced particle swarm optimization algorithm with added oscillation convergence.

[0146] On the other hand, embodiments of this application also provide a processor-readable storage medium storing a computer program for causing a processor to execute the steps of the global load balancing method provided in the above embodiments, such as including:

[0147] Establish a global load balancing optimization model;

[0148] The globally optimal server is obtained through the global load balancing optimization model.

[0149] The global load balancing optimization model is trained based on an enhanced particle swarm optimization algorithm with added oscillation convergence.

[0150] The processor-readable storage medium can be any available medium or data storage device that the processor can access, including but not limited to magnetic memory (e.g., floppy disk, hard disk, magnetic tape, magneto-optical disk (MO)), optical memory (e.g., CD, DVD, BD, HVD), and semiconductor memory (e.g., ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state drive (SSD)).

[0151] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0152] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0153] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A global load balancing method, characterized in that, include: Establish a global load balancing optimization model; The globally optimal server is obtained through the global load balancing optimization model. The global load balancing optimization model is trained based on an enhanced particle swarm optimization algorithm with added oscillation convergence. The step of obtaining the globally optimal server through the global load balancing optimization model includes: The global load balancing optimization model obtains the particle fitness value based on the particle's velocity and position. The historical best position and global best position of the particle are updated based on the particle fitness value, and the velocity and position of the particle are updated by incorporating an oscillating convergence update formula for the next iteration. When the iteration reaches the termination condition, the server corresponding to the global optimal position in the last iteration is output as the global optimal server. The step of updating the historical best position and global best position of the particle based on the particle fitness value, and updating the particle velocity and position by incorporating an oscillating convergence update formula, includes: The individual and social learning factors of particle motion are adjusted using a weighted function based on inertial weights. The method of adjusting the individual learning factors and social learning factors of particle motion using a weighted function based on inertial weights includes: The individual learning factor of particle motion is adjusted using an individual learning factor adjustment formula, which is: ; The social learning factor of particle motion is adjusted using a social learning factor adjustment formula, which is: ; in, This represents the adjusted individual learning factor. This represents the adjusted social learning factor. This represents the current individual's learning factor. This represents the current social learning factor. Indicates inertia weight, This represents the minimum inertia weight. This represents the maximum inertia weight. This represents the particle fitness value in the current iteration. Represents the minimum particle fitness value. This represents the average particle fitness value.

2. The global load balancing method according to claim 1, characterized in that, The method of updating the particle velocity and position by incorporating an oscillating convergence update formula also includes: The particle velocity is updated using a first update formula, which is: , , ; , ; The particle's position is updated using a second update formula, which is: ; in, This indicates the position of particle i. Indicates the position of particle i The speed at that point, This represents the best position in the particle's history. Indicates the globally optimal position. Indicates inertia weight, Represents individual learning factors. Represents social learning factors. and Let represent the parameters uniformly distributed between the interval [0, 1], and t represent the current iteration number. Indicates the maximum number of iterations. and The parameter represents the convergence of the oscillation.

3. The global load balancing method according to claim 2, characterized in that, The step of updating the historical best position and global best position of the particle based on the particle fitness value, and updating the particle velocity and position by incorporating an oscillating convergence update formula, further includes: The inertial weights of particle motion in the next iteration are adjusted based on the particle fitness value of the current iteration.

4. The global load balancing method according to claim 3, characterized in that, The adjustment of the inertial weights of particle motion in the next iteration based on the particle fitness value of the current iteration is specifically as follows: Based on the particle fitness value of the current iteration, the inertial weight of the particle motion in the next iteration is adjusted using an adaptive weight adjustment formula, which is: ,when ; ,when ; in, This represents the adjusted inertia weight. This represents the minimum inertia weight. This represents the maximum inertia weight. This represents the particle fitness value in the current iteration. Represents the minimum particle fitness value. This represents the maximum particle fitness value. This represents the average particle fitness value.

5. A global load balancing device, characterized in that, include: The global load balancing optimization model establishment module is used to: establish a global load balancing optimization model; The global optimal server acquisition module is used to: obtain the global optimal server through the global load balancing optimization model; The global load balancing optimization model is trained based on an enhanced particle swarm optimization algorithm with added oscillation convergence. The step of obtaining the globally optimal server through the global load balancing optimization model includes: The global load balancing optimization model obtains the particle fitness value based on the particle's velocity and position. The historical best position and global best position of the particle are updated based on the particle fitness value, and the velocity and position of the particle are updated by incorporating an oscillating convergence update formula for the next iteration. When the iteration reaches the termination condition, the server corresponding to the global optimal position in the last iteration is output as the global optimal server. The module for obtaining the globally optimal server includes: The learning factor adjustment submodule is used to: adjust the individual learning factor and social learning factor of particle motion based on inertia weight using a weighted function; The learning factor adjustment submodule includes: The individual learning factor adjustment submodule is used to: adjust the individual learning factor of particle motion using an individual learning factor adjustment formula, wherein the individual learning factor adjustment formula is: ; The social learning factor adjustment submodule is used to: adjust the social learning factor of particle motion using a social learning factor adjustment formula, wherein the social learning factor adjustment formula is: ; in, This represents the adjusted individual learning factor. This represents the adjusted social learning factor. This represents the current individual's learning factor. This represents the current social learning factor. Indicates inertia weight, This represents the minimum inertia weight. This represents the maximum inertia weight. This represents the particle fitness value in the current iteration. Represents the minimum particle fitness value. This represents the average particle fitness value.

6. An electronic device comprising a processor and a memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the global load balancing method according to any one of claims 1 to 4.

7. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the global load balancing method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Improved second-order oscillating particle swarm optimization based key frame extraction method

    CN104331911A

  • Streaming media server load balancing method and system, computer equipment and terminal

    CN113141317A