A load access control method based on service grid
The service grid layer obtains user requests and collects cluster load information, and uses intelligent optimization algorithms to optimize the target service deployment solution, solves the problem of load imbalance in the existing technology, realizes fine management and control of microservice traffic, and improves system performance and availability.
Patent Information
- Application Number
- CN202411422634.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-12
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-10-12
AI Technical Summary
The prior art is difficult to effectively handle exponentially growing network traffic, resulting in unbalanced cluster load and affecting service stability and performance.
User requests are obtained through the service grid layer, cluster load information is collected, target service deployment scheme is optimized using intelligent optimization algorithms, and weight parameters are adjusted to achieve balanced control of load access.
It realizes fine management and control of microservice traffic, intelligent routing based on request characteristics and microservice status, improves system performance and availability, and avoids performance reduction and downtime caused by overload load.
Smart Images

Figure CN119276873B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of access control, and in particular relates to a load access control method based on a service grid. Background Art
[0002] With the increasing network traffic, a large number of network requests occur simultaneously, which puts great pressure on the physical resources of the cluster and affects the stability of the services in the cluster. In order to ensure the stability of the services deployed and running in the cluster, it is necessary to perform load balancing and flow limiting operations on the request traffic. Designing and implementing a cluster service that can handle exponentially growing traffic is a challenge for cloud service providers. Due to the sharp increase in certain traffic, the load may be concentrated on certain functions, resulting in abnormal request processing and affecting other related services in turn. Therefore, in order to better cope with rapidly changing traffic, the cluster must provide reliable and scalable cloud services. When using container orchestration tools, containerized cloud components can be easily deployed and expanded as needed. In addition, repeated containers ensure reliable operation. However, this increase in load capacity depends on the improvement of hardware resources. Because each cluster server has an upper limit on physical resources and cannot always expand resources infinitely, each application in the cluster has an acceptable load upper limit. When the traffic is too large for a short time, the load pressure on the cluster backend service is too large, and the performance is rapidly reduced, which will cause the request to be unable to be processed normally, and may even cause an avalanche and cause downtime.
[0003] In the prior art, a static round-robin algorithm is often used for load balancing, routing requests to each backend server in turn. This algorithm is suitable for scenarios where server performance is not much different and request complexity is similar. Otherwise, servers with poor performance may gradually accumulate requests and the load will gradually increase. Summary of the invention
[0004] The present invention provides a load access control method based on a service grid, which is used to solve the technical problems existing in the prior art.
[0005] A load access control method based on a service grid, comprising:
[0006] Obtain the service request transmitted by the user, and determine the corresponding target service in the service grid layer according to the service request; wherein different target services are called through the network proxy;
[0007] Collecting load information in the service cluster, and initializing a target service deployment plan according to the load information in the service cluster;
[0008] The weight parameters corresponding to the target service deployment solution are optimized through an intelligent optimization algorithm to obtain an optimal weight parameter combination. According to the optimal weight parameter combination, the target service accesses the service cluster to achieve balanced control of load access.
[0009] Further, collecting load information in the service cluster and initializing the target service deployment scheme according to the load information in the service cluster includes:
[0010] Collecting load information in the service cluster; wherein the load information includes one or more of CPU occupancy, memory occupancy, and network bandwidth occupancy on each node in the service cluster;
[0011] For any type of load information, the node weight corresponding to the load information is initialized to obtain the load optimization code corresponding to the load information, and multiple load optimization codes are repeatedly obtained to obtain multiple target service deployment solutions corresponding to the load information.
[0012] Furthermore, the weight parameters corresponding to the target service deployment solution are optimized by an intelligent optimization algorithm to obtain the optimal weight parameter combination, including:
[0013] Determine the current load information to be optimized, and optimize the weight parameters corresponding to the target service deployment solution corresponding to the current load information to be optimized through an intelligent optimization algorithm to obtain the optimal weight parameter combination corresponding to the load information;
[0014] Determine whether the optimal weight parameter combination for all load information is obtained. If so, end this process. Otherwise, obtain the optimal weight parameter combination corresponding to the remaining load information until the optimal weight parameter combination for all load information is obtained and end this process.
[0015] Further, the current load information to be optimized is determined, and the weight parameters corresponding to the target service deployment scheme corresponding to the current load information to be optimized are optimized by an intelligent optimization algorithm to obtain an optimal weight parameter combination corresponding to the load information, including:
[0016] A1. Constructing an objective function according to the node weight and load information; wherein the smaller the objective function, the better;
[0017] A2. Determine the current load information to be optimized;
[0018] A3. According to the objective function, obtain the objective function value corresponding to the target service deployment scheme corresponding to each load information currently to be optimized, and determine the optimal target service deployment scheme according to the objective function value;
[0019] A4. According to the objective function value corresponding to the optimal target service deployment solution, determine the initial annealing temperature T0, and set the current temperature T as the initial temperature T0;
[0020] A4. Determine the inner loop iteration counter g=1 and the maximum number of iterations Gmax;
[0021] A5. Determine a mutation probability value and a crossover probability value based on the parameter aggregation degree, perform a selection operation, and determine an iterative operation corresponding to each target service deployment solution, where the iterative operation is a mutation operation or a crossover operation;
[0022] A6. Determine the child target service deployment scheme according to the iteration operation, mutation probability value and crossover probability value corresponding to each target service deployment scheme, and update the child target service deployment scheme according to the child target service deployment scheme to obtain an updated target service deployment scheme;
[0023] A7, determine whether the count value of the inner loop iteration counter g is greater than or equal to the maximum number of iterations Gmax, if so, proceed to step A8, otherwise re-acquire the target function corresponding to the target service deployment solution, increase the count value of the inner loop iteration counter g by one, and return to step A5;
[0024] A8, determine whether the current temperature T is less than the preset termination temperature. If so, use the optimal target service deployment solution as the optimal weight parameter combination corresponding to the load information and proceed to step A9. Otherwise, perform annealing and return to step A4.
[0025] A9. Determine whether all load information has been traversed. If so, end the step of obtaining the optimal weight parameter combination. Otherwise, return to step A2.
[0026] Furthermore, the objective function is constructed according to the node weight and load information:
[0027]
[0028] Among them, ω mn represents the weight of the mth type of load information on the nth service node, θ mn represents the mth type of load information on the nth service node, M represents the total number of load information, and N represents the total number of service nodes; ω mn is greater than or equal to 0, and for the same load information, the ω corresponding to N service nodes mn The sum is 1.
[0029] Furthermore, according to the objective function value corresponding to the optimal target service deployment solution, the initial annealing temperature T0 is determined as:
[0030] According to the optimal target service deployment solution, the objective function value corresponding to it is:best ;
[0031] According to the objective function value f corresponding to the optimal target service deployment solution best The initial annealing temperature T0 is determined as: T0 = -1 / (ln0.2 + f best ).
[0032] Furthermore, after the target service deployment plan is changed, the method further includes: determining the sum of all weight parameters in the target service deployment plan, and dividing each dimensional weight parameter by the sum of the weight parameters to obtain an updated target service deployment plan.
[0033] Furthermore, the mutation probability value and the crossover probability value are determined based on the parameter aggregation degree, including:
[0034]
[0035] Among them, p c represents the crossover probability value, p m represents the mutation probability value, k1 represents the first coefficient, k2 represents the second coefficient, f a represents the average objective function value, f best represents the optimal objective function value, and π represents the ratio of pi.
[0036] Further, according to the iteration operation, mutation probability value and crossover probability value corresponding to each target service deployment scheme, a child target service deployment scheme is determined, and the child target service deployment scheme is updated to obtain an updated target service deployment scheme, including:
[0037] Determine the selection probability value between (0,1) as p1;
[0038] For each target service deployment scheme, a random number r1 between (0, 1) is randomly generated, and it is determined whether the random number r1 is greater than or equal to the selection probability value p1. If so, the iterative operation of the target service deployment scheme is determined to be a mutation operation, otherwise, the iterative operation of the target service deployment scheme is determined to be a crossover operation; wherein the mutation operation depends on the mutation probability value, and the crossover operation depends on the crossover probability value;
[0039] When the iterative operation corresponding to the target service deployment plan is a mutation operation, for each weight in the target service deployment plan, the weight is mutated according to the mutation probability value and the roulette wheel selection mechanism is used to obtain the mutated target service deployment plan;
[0040] When the iteration operation corresponding to the target service deployment plan is a crossover operation, for each weight in the target service deployment plan, the weights are crossed according to the crossover probability value and the roulette wheel selection mechanism is used to obtain the target service deployment plan after the crossover;
[0041] Determine whether the objective function value of the offspring target service deployment plan is less than the objective function value of the original target service deployment plan. If so, use the offspring target service deployment plan to replace the original target service deployment plan to obtain an updated target service deployment plan. Otherwise, use the probability selection method to update the original target service deployment plan to obtain an updated target service deployment plan.
[0042] Furthermore, the original target service deployment plan is updated using a probabilistic selection method, including:
[0043] Determine the selection probability as:
[0044]
[0045] Among them, p2 represents the probability of selection, e represents the natural constant, k3 represents the third coefficient, T represents the current temperature, and f n represents the objective function value corresponding to the child target service deployment scheme, f o Indicates the objective function value corresponding to the original target service deployment plan;
[0046] According to the selection probability and the roulette wheel selection mechanism, the original target service deployment plan is replaced by the child target service deployment plan to obtain an updated target service deployment plan.
[0047] The invention provides a load access control method based on a service grid, which provides microservices through a service grid, simplifies the development, deployment, management and maintenance of microservices, and provides functions such as traffic management, service discovery, network policy, authentication and authorization, and monitoring, ensuring that the communication between microservices is more reliable, efficient and secure. Then, through load control, fine management and control of microservice traffic is achieved, and requests can be intelligently routed to the most suitable microservice instance according to the characteristics of the request and the status of the microservice, thereby improving the performance and availability of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0049] Figure 1 A flow chart of a load access control method based on a service grid provided in an embodiment of the present invention.
[0050] The above drawings have shown clear embodiments of the present invention, which will be described in more detail below. These drawings and text descriptions are not intended to limit the scope of the present invention in any way, but to illustrate the concept of the present invention for those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0051] 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 embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0052] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0053] like Figure 1 As shown, an embodiment of the present invention provides a load access control method based on a service grid, comprising:
[0054] S101, obtaining a service request transmitted by a user, and determining a corresponding target service in a service grid layer according to the service request; wherein different target services are called through a network proxy.
[0055] Service mesh is a form of microservice architecture based on network proxy, which includes a set of network proxies and other auxiliary components required for communication between services. Service mesh simplifies the development, deployment, management and maintenance of microservices by abstracting the communication and relationship between services. Service mesh provides functions such as traffic management, service discovery, network policy, authentication and authorization, monitoring, etc. to ensure that communication between microservices is more reliable, efficient and secure.
[0056] Therefore, the embodiment of the present invention adopts a service grid to provide microservices to users, thereby providing higher quality services.
[0057] S102, collecting load information in the service cluster, and initializing a target service deployment plan according to the load information in the service cluster;
[0058] One or more load information on each node in the service cluster can be collected to evaluate the corresponding performance of the service node, thereby achieving load balancing when the service calls the backend node.
[0059] The initialization target service deployment plan can be: initialize the weight on the service node to determine the number of resources that the service grid calls the backend, thereby achieving load balancing of the service cluster, and combining the characteristics of the service grid itself to provide better microservices.
[0060] S103. Optimize the weight parameters corresponding to the target service deployment solution through an intelligent optimization algorithm to obtain an optimal weight parameter combination. According to the optimal weight parameter combination, the target service accesses the service cluster to achieve balanced control of load access.
[0061] Intelligent optimization algorithms can be particle swarm algorithms and genetic algorithms. Through intelligent optimization algorithms, multi-dimensional parameter optimization can be achieved, so that the parameter allocation corresponding to multiple service nodes is optimal, the optimal weight parameter combination is obtained, and then better resource allocation is provided for the service.
[0062] In an embodiment of the present invention, collecting load information in a service cluster and initializing a target service deployment scheme according to the load information in the service cluster includes:
[0063] Collect load information in the service cluster; wherein the load information includes one or more of CPU occupancy, memory occupancy, and network bandwidth occupancy on each node in the service cluster.
[0064] For example, the CPU occupancy rate can be collected as load information, and then weights can be assigned to minimize the CPU occupancy rate corresponding to all service nodes, thereby achieving load balancing. It is worth noting that other load information processing can also be done in this way.
[0065] For any type of load information, the node weight corresponding to the load information is initialized to obtain the load optimization code corresponding to the load information, and multiple load optimization codes are repeatedly obtained to obtain multiple target service deployment solutions corresponding to the load information.
[0066] The invention provides a load access control method based on a service grid, which provides microservices through a service grid, simplifies the development, deployment, management and maintenance of microservices, and provides functions such as traffic management, service discovery, network policy, authentication and authorization, and monitoring, ensuring that the communication between microservices is more reliable, efficient and secure. Then, through load control, fine management and control of microservice traffic is achieved, and requests can be intelligently routed to the most suitable microservice instance according to the characteristics of the request and the status of the microservice, thereby improving the performance and availability of the system.
[0067] In the embodiment of the present invention, the weight parameters corresponding to the target service deployment solution are optimized by an intelligent optimization algorithm to obtain an optimal weight parameter combination, including:
[0068] Determine the current load information to be optimized, and optimize the weight parameters corresponding to the target service deployment solution corresponding to the current load information to be optimized through an intelligent optimization algorithm to obtain the optimal weight parameter combination corresponding to the load information;
[0069] Determine whether the optimal weight parameter combination for all load information is obtained. If so, end this process. Otherwise, obtain the optimal weight parameter combination corresponding to the remaining load information until the optimal weight parameter combination for all load information is obtained and end this process.
[0070] It is worth noting that each type of load information needs to obtain the optimal weight parameter combination separately, so as to achieve the optimization of multiple parameters.
[0071] In an embodiment of the present invention, the current load information to be optimized is determined, and the weight parameters corresponding to the target service deployment scheme corresponding to the current load information to be optimized are optimized by an intelligent optimization algorithm to obtain the optimal weight parameter combination corresponding to the load information, including:
[0072] A1. Construct an objective function according to the node weight and load information; wherein the smaller the objective function is, the better.
[0073] Whether training all weight information at once or training one weight information at a time, the objective function can be used as a reference. When training one weight, keep other weights unchanged. Therefore, all weight parameters need to be initialized at the initial moment, and then trained one by one.
[0074] A2. Determine the current load information to be optimized.
[0075] That is, it is necessary to first determine which load information to optimize, and then assign its weight to achieve load balancing.
[0076] A3. According to the objective function, obtain the objective function value corresponding to the target service deployment plan corresponding to each current load information to be optimized, and determine the optimal target service deployment plan according to the objective function value, that is, determine the optimal target service deployment plan with the smallest objective function value.
[0077] A4. According to the objective function value corresponding to the optimal target service deployment solution, determine the initial annealing temperature T0, and set the current temperature T as the initial temperature T0;
[0078] A4. Determine the inner loop iteration counter g=1 and the maximum number of iterations Gmax;
[0079] A5. Determine a mutation probability value and a crossover probability value based on the parameter aggregation degree, perform a selection operation, and determine an iterative operation corresponding to each target service deployment solution, where the iterative operation is a mutation operation or a crossover operation;
[0080] A6. Determine the child target service deployment scheme according to the iteration operation, mutation probability value and crossover probability value corresponding to each target service deployment scheme, and update the child target service deployment scheme according to the child target service deployment scheme to obtain an updated target service deployment scheme;
[0081] A7, determine whether the count value of the inner loop iteration counter g is greater than or equal to the maximum number of iterations Gmax, if so, proceed to step A8, otherwise re-acquire the target function corresponding to the target service deployment solution, increase the count value of the inner loop iteration counter g by one, and return to step A5;
[0082] A8, determine whether the current temperature T is less than the preset termination temperature. If so, use the optimal target service deployment solution as the optimal weight parameter combination corresponding to the load information and proceed to step A9. Otherwise, perform annealing and return to step A4.
[0083] A9. Determine whether all load information has been traversed. If so, end the step of obtaining the optimal weight parameter combination. Otherwise, return to step A2.
[0084] Optionally, after each optimization of the target service deployment scheme, the target service deployment scheme may be subjected to out-of-bounds processing so that the value of each element is between 0 and 1. In order to make all weights add up to 1, all weights in the same target service deployment scheme may be added together, and then each element may be divided by 1, thereby scaling the parameters to meet the constraints.
[0085] In an embodiment of the present invention, the objective function is constructed according to the node weight and load information:
[0086]
[0087] Among them, ω mn represents the weight of the mth type of load information on the nth service node, θ mn represents the mth type of load information on the nth service node, M represents the total number of load information, and N represents the total number of service nodes; ω mn is greater than or equal to 0, and for the same load information, the ω corresponding to N service nodes mn The sum is 1.
[0088] In the embodiment of the present invention, according to the objective function value corresponding to the optimal target service deployment solution, the initial annealing temperature T0 is determined as:
[0089] According to the optimal target service deployment solution, the objective function value corresponding to it is: best ;
[0090] According to the objective function value f corresponding to the optimal target service deployment solution best The initial annealing temperature T0 is determined as: T0 = -1 / (ln0.2 + f best ).
[0091] In the embodiment of the present invention, after the target service deployment plan changes, it also includes: determining the sum of all weight parameters in the target service deployment plan, and dividing each dimensional weight parameter by the sum of the weight parameters to obtain an updated target service deployment plan.
[0092] In the embodiment of the present invention, determining the mutation probability value and the crossover probability value based on the parameter aggregation degree includes:
[0093]
[0094] Among them, p c represents the crossover probability value, p m represents the mutation probability value, k1 represents the first coefficient, k2 represents the second coefficient, f a represents the average objective function value, f best represents the optimal objective function value, and π represents the ratio of pi.
[0095] The embodiment of the present invention adopts nonlinear transformation. The objective function value of the current optimal target service deployment solution is far away from the average value. The smaller the value, the more dispersed the deployment solution is in the solution space. Conversely, the more concentrated the deployment solution is in the solution space. This allows more diverse solutions to be generated during the crossover process, enriching the population while retaining excellent genetic inheritance and strengthening global search capabilities. Adaptive mutation increases the probability of mutation at the beginning and end of the algorithm, speeds up the convergence of the algorithm, and gives the algorithm a stronger ability to jump out of the local optimum.
[0096] In an embodiment of the present invention, according to the iteration operation, mutation probability value and crossover probability value corresponding to each target service deployment scheme, a child target service deployment scheme is determined, and the child target service deployment scheme is updated to obtain an updated target service deployment scheme, including:
[0097] Determine the selection probability value between (0,1) as p1;
[0098] For each target service deployment scheme, a random number r1 between (0, 1) is randomly generated, and it is determined whether the random number r1 is greater than or equal to the selection probability value p1. If so, the iterative operation of the target service deployment scheme is determined to be a mutation operation, otherwise, the iterative operation of the target service deployment scheme is determined to be a crossover operation; wherein the mutation operation depends on the mutation probability value, and the crossover operation depends on the crossover probability value;
[0099] When the iterative operation corresponding to the target service deployment plan is a mutation operation, for each weight in the target service deployment plan, the weight is mutated according to the mutation probability value and the roulette wheel selection mechanism is used to obtain the mutated target service deployment plan;
[0100] When the iteration operation corresponding to the target service deployment plan is a crossover operation, for each weight in the target service deployment plan, the weights are crossed according to the crossover probability value and the roulette wheel selection mechanism is used to obtain the target service deployment plan after the crossover;
[0101] Determine whether the objective function value of the offspring target service deployment plan is less than the objective function value of the original target service deployment plan. If so, use the offspring target service deployment plan to replace the original target service deployment plan to obtain an updated target service deployment plan. Otherwise, use the probability selection method to update the original target service deployment plan to obtain an updated target service deployment plan.
[0102] In an embodiment of the present invention, a probability selection method is used to update the original target service deployment scheme, including:
[0103] Determine the selection probability as:
[0104]
[0105] Among them, p2 represents the probability of selection, e represents the natural constant, k3 represents the third coefficient, T represents the current temperature, and f n represents the objective function value corresponding to the child target service deployment scheme, f o Indicates the objective function value corresponding to the original target service deployment plan;
[0106] According to the selection probability and the roulette wheel selection mechanism, the original target service deployment plan is replaced by the child target service deployment plan to obtain an updated target service deployment plan.
[0107] It is worth noting that a fixed selection probability can also be set, such as 0.0001, which can make the algorithm select inferior solutions to a certain extent, thereby improving the global search capability of the algorithm.
[0108] According to the optimal weight parameter combination, the target service is enabled to access the service cluster to achieve load access balance control, which may include:
[0109] For any type of load information, based on its corresponding optimal weight parameter combination, the total amount of resources required for the service and the weight of the service node are used to allocate resources to the service. The number of resources required on a single service node is the total amount of resources required * the weight of the service node.
[0110] Those skilled in the art will readily appreciate 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 that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed by the present invention. It should be understood that the present invention is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A load access control method based on a service grid, characterized in that: include: Obtain the service request transmitted by the user, and determine the corresponding target service in the service grid layer according to the service request; wherein different target services are called through the network proxy; Collecting load information in the service cluster, and initializing a target service deployment plan according to the load information in the service cluster; Optimize the weight parameters corresponding to the target service deployment solution through an intelligent optimization algorithm to obtain an optimal weight parameter combination. According to the optimal weight parameter combination, the target service accesses the service cluster to achieve load access balance control; Collecting load information in the service cluster and initializing a target service deployment plan according to the load information in the service cluster, including: Collecting load information in the service cluster; wherein the load information includes one or more of CPU occupancy, memory occupancy, and network bandwidth occupancy on each node in the service cluster; For any type of load information, initialize the node weight corresponding to the load information, obtain the load optimization code corresponding to the load information, and repeatedly obtain multiple load optimization codes to obtain multiple target service deployment solutions corresponding to the load information; The weight parameters corresponding to the target service deployment solution are optimized through an intelligent optimization algorithm to obtain the optimal weight parameter combination, including: Determine the current load information to be optimized, and optimize the weight parameters corresponding to the target service deployment solution corresponding to the current load information to be optimized through an intelligent optimization algorithm to obtain the optimal weight parameter combination corresponding to the load information; Determine whether the optimal weight parameter combination of all load information is obtained. If so, end this process. Otherwise, obtain the optimal weight parameter combination corresponding to the remaining load information until the optimal weight parameter combination of all load information is obtained, and end this process. Determine the current load information to be optimized, and optimize the weight parameters corresponding to the target service deployment solution corresponding to the current load information to be optimized through an intelligent optimization algorithm to obtain the optimal weight parameter combination corresponding to the load information, including: A1. Constructing an objective function according to the node weight and load information; wherein the smaller the objective function, the better; A2. Determine the current load information to be optimized; A3. According to the objective function, obtain the objective function value corresponding to the target service deployment scheme corresponding to each load information currently to be optimized, and determine the optimal target service deployment scheme according to the objective function value; A4. According to the objective function value corresponding to the optimal target service deployment solution, determine the initial annealing temperature T0, and set the current temperature T as the initial temperature T0; A4. Determine the inner loop iteration counter g=1 and the maximum number of iterations Gmax; A5. Determine a mutation probability value and a crossover probability value based on the parameter aggregation degree, perform a selection operation, and determine an iterative operation corresponding to each target service deployment solution, where the iterative operation is a mutation operation or a crossover operation; A6. Determine the child target service deployment scheme according to the iteration operation, mutation probability value and crossover probability value corresponding to each target service deployment scheme, and update the child target service deployment scheme according to the child target service deployment scheme to obtain an updated target service deployment scheme; A7, determine whether the count value of the inner loop iteration counter g is greater than or equal to the maximum number of iterations Gmax, if so, proceed to step A8, otherwise re-acquire the target function corresponding to the target service deployment solution, increase the count value of the inner loop iteration counter g by one, and return to step A5; A8, determine whether the current temperature T is less than the preset termination temperature. If so, use the optimal target service deployment solution as the optimal weight parameter combination corresponding to the load information and proceed to step A9. Otherwise, perform annealing and return to step A4. A9. Determine whether all load information has been traversed. If so, end the step of obtaining the optimal weight parameter combination. Otherwise, return to step A2.
2. The load access control method based on service grid according to claim 1 is characterized in that: The objective function constructed according to the node weight and load information is: Among them, ω mn represents the weight of the mth type of load information on the nth service node, θ mn represents the mth type of load information on the nth service node, M represents the total number of load information, and N represents the total number of service nodes; ω mn is greater than or equal to 0, and for the same load information, the ω corresponding to N service nodes mn The sum is 1.
3. The load access control method based on service grid according to claim 1 is characterized in that: According to the objective function value corresponding to the optimal target service deployment solution, the initial annealing temperature T0 is determined as: According to the optimal target service deployment solution, the objective function value corresponding to it is: best ; According to the objective function value f corresponding to the optimal target service deployment solution best The initial annealing temperature T0 is determined as: T0 = -1 / (ln0.2 + f best ).
4. The load access control method based on service grid according to claim 1 is characterized in that: After the target service deployment plan is changed, the method further includes: determining the sum of all weight parameters in the target service deployment plan, and dividing each dimensional weight parameter by the sum of the weight parameters to obtain an updated target service deployment plan.
5. The load access control method based on service grid according to claim 1 is characterized in that: The mutation probability value and crossover probability value are determined by the degree of parameter aggregation, including: Among them, p c represents the crossover probability value, p m represents the mutation probability value, k1 represents the first coefficient, k2 represents the second coefficient, f a represents the average objective function value, f best represents the optimal objective function value, and π represents the ratio of pi.
6. The load access control method based on service grid according to claim 5 is characterized in that: According to the iteration operation, mutation probability value and crossover probability value corresponding to each target service deployment scheme, the target service deployment scheme of the child generation is determined, and the target service deployment scheme of the child generation is updated to obtain the updated target service deployment scheme, including: Determine the selection probability value between (0,1) as p1; For each target service deployment scheme, a random number r1 between (0, 1) is randomly generated, and it is determined whether the random number r1 is greater than or equal to the selection probability value p1. If so, the iterative operation of the target service deployment scheme is determined to be a mutation operation, otherwise, the iterative operation of the target service deployment scheme is determined to be a crossover operation; wherein the mutation operation depends on the mutation probability value, and the crossover operation depends on the crossover probability value; When the iterative operation corresponding to the target service deployment plan is a mutation operation, for each weight in the target service deployment plan, the weight is mutated according to the mutation probability value and the roulette wheel selection mechanism is used to obtain the mutated target service deployment plan; When the iteration operation corresponding to the target service deployment plan is a crossover operation, for each weight in the target service deployment plan, the weights are crossed according to the crossover probability value and the roulette wheel selection mechanism is used to obtain the target service deployment plan after the crossover; Determine whether the objective function value of the offspring target service deployment plan is less than the objective function value of the original target service deployment plan. If so, use the offspring target service deployment plan to replace the original target service deployment plan to obtain an updated target service deployment plan. Otherwise, use the probability selection method to update the original target service deployment plan to obtain an updated target service deployment plan.
7. The load access control method based on service grid according to claim 6 is characterized in that: The original target service deployment plan is updated using the probability selection method, including: Determine the selection probability as: Among them, p2 represents the probability of selection, e represents the natural constant, k3 represents the third coefficient, T represents the current temperature, and f n represents the objective function value corresponding to the child target service deployment scheme, f o Indicates the objective function value corresponding to the original target service deployment plan; According to the selection probability and the roulette wheel selection mechanism, the original target service deployment plan is replaced by the child target service deployment plan to obtain an updated target service deployment plan.
Citation Information
Patent Citations
Micro-service dynamic adaptive client load balancing method and system
CN117155942A
Self-adaptive load balancing method suitable for data intermediate station service grid
CN117793115A