A load balancing scheduling method and system

By adopting the load balancing scheduling method in the edge computing system, using the pre-trained task scheduling model to divide server groups and transfer the tasks to be unloaded, the problem of load imbalance in the edge computing system is solved, and the load allocation efficiency and resource utilization are improved.

CN119052249BActive Publication Date: 2025-03-11CENT SOUTH UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411540735.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-03-11
Estimated Expiration
2044-10-31

AI Technical Summary

Technical Problem

Due to the complex deployment environment in the edge computing system, the server load is unbalanced, some servers are overloaded and other servers are idle, resulting in unbalanced resource allocation, low scheduling efficiency and low computing resource utilization.

Method used

A load balancing scheduling method and system are proposed. By obtaining the change values ​​of the load amount and node number of the server in each time slot, clustering and grouping, using a pre-trained task scheduling model to divide server groups, and transferring tasks to be unloaded from high-load servers to low-load servers to achieve load balancing.

Benefits of technology

It improves the load allocation efficiency and load utilization of edge computing systems, avoids server overload and idleness, and improves the overall performance and reliability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119052249B_ABST
    Figure CN119052249B_ABST
Patent Text Reader

Abstract

The present application discloses a load balancing scheduling method and system. t The invention discloses a method for realizing a first state and a second state of each server in a time slot; clustering and grouping the multiple servers according to the first state and the second state to obtain multiple server groups, each server group including at least two servers; using a pre-trained task scheduling model to divide the multiple server groups into a first server group and multiple second server groups according to the first state of at least two servers in each server group; unloading the tasks to be unloaded in the multiple second server groups to the first server group according to the task scheduling model, and distributing the tasks to be unloaded to the first server group to at least two servers in the first server group, so as to achieve a refined task scheduling strategy and efficient load balancing scheduling, and maximize the utilization of edge computing resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of edge computing, and in particular to a load balancing scheduling method and system. Background Art

[0002] In recent years, with the rapid development of science and technology, especially the vigorous rise of artificial intelligence, 5G communications and Internet of Things technologies, people's demand for computing resources has gradually increased, and edge computing systems have come into being. It pushes computing resources from the cloud to the edge side closer to users. By building a cloud-edge-end trinity distributed management system, it not only greatly shortens the physical distance of data transmission, thereby significantly reducing latency, but also greatly improves the efficiency of data processing and response.

[0003] However, due to the complexity and diversity of the deployment environment of edge computing servers, servers in different geographical locations and with different user densities face very different load pressures. Some servers may be overloaded due to too many connected users, while others are not fully utilized due to high idle rates, resulting in uneven resource allocation of the entire load system, low scheduling efficiency, and low computing resource utilization. Summary of the invention

[0004] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.

[0005] The main purpose of the embodiments of the present disclosure is to propose a load balancing scheduling method and system that can improve the load distribution efficiency and load utilization of edge computing.

[0006] A first aspect of an embodiment of the present application provides a load balancing scheduling method, the method comprising:

[0007] Get the t In a time slot, each of the plurality of servers has a first state and a second state, wherein the first state is the load of the server, and the second state is a change value between the first number of nodes and the second number of nodes, wherein the first number of nodes is the load of the server. t The number of nodes that establish a connection with the server in a time slot, wherein the second number of nodes is t - the number of nodes connected to the server in a time slot, and the nodes have tasks to be offloaded; wherein the end condition of any time slot includes: the load of the multiple servers in the time slot reaches the corresponding threshold; t is an integer greater than 1;

[0008] Clustering and grouping the plurality of servers according to the first state and the second state to obtain a plurality of server groups, each of the server groups including at least two servers;

[0009] Using a pre-trained task scheduling model, the plurality of server groups are divided into a first server group and a plurality of second server groups according to the first status of at least two servers in each of the server groups; wherein the number of the first server groups is 1, and the amount of tasks in the first server group is less than the amount of tasks in any of the second server groups;

[0010] The tasks to be offloaded in the plurality of second server groups are offloaded to the first server group according to the task scheduling model, and the tasks to be offloaded to the first server group are distributed to at least two servers in the first server group.

[0011] The embodiment of the present application provides a load balancing scheduling method. The method obtains the first t within a time slot, the first state and the second state of each of the multiple servers; clustering the multiple servers according to the first state and the second state to obtain multiple server groups, each of the server groups including at least two servers; using a pre-trained task scheduling model to divide the multiple server groups into a first server group and multiple second server groups according to the first state of at least two servers in each of the server groups; unloading the tasks to be unloaded in the multiple second server groups to the first server group according to the task scheduling model, and distributing the tasks to be unloaded to the first server group to at least two servers in the first server group.

[0012] In some embodiments of the present application, the method of using a pre-trained task scheduling model to divide the plurality of server groups into a first server group and a plurality of second server groups according to a first state of at least two servers in each of the server groups includes:

[0013] Calculating an average value of the task amount of each server group according to the first status of at least two servers in each server group;

[0014] Based on the average value of the task amount, according to the task scheduling model, a server group with the smallest average value of the task amount among the multiple server groups is selected as the first server group, and the other server groups are selected as the second server group.

[0015] In some embodiments of the present application, the step of offloading the to-be-offloaded tasks in the plurality of second server groups to the first server group according to the task scheduling model includes:

[0016] Determine, according to the task scheduling model, a task server to be uninstalled in each of the server groups and a task to be uninstalled in each of the task servers to be uninstalled;

[0017] sorting the at least two servers in the first server group according to the task scheduling model based on the first status of the at least two servers in the first server group to obtain a sorting result;

[0018] According to the task scheduling model, the tasks to be offloaded in the task servers to be offloaded in each of the server groups are offloaded to at least two servers in the first server group according to the sorting result.

[0019] In some embodiments of the present application, the step of unloading the tasks to be unloaded in the task servers to be unloaded in each of the server groups to at least two servers in the first server group according to the sorting result according to the task scheduling model includes:

[0020] According to the task scheduling model and the ranking result, the server ranked first is used as the target server;

[0021] Aggregating the tasks to be offloaded of the task server to be offloaded according to the task scheduling model to obtain a summary result;

[0022] In the case where the sorting result is sorted from large to small, the tasks to be uninstalled of the task server to be uninstalled are uninstalled to the target server until the first state corresponding to the target server is higher than the corresponding threshold value, then the server adjacent to the target server and ranked after the target server in the sorting result is used as the target server, and the step of unloading the remaining tasks to be uninstalled in the summary result to the target server is executed until the first states corresponding to all servers in the first server group are higher than the corresponding threshold value.

[0023] In some embodiments of the present application, t After the time slot ends, it also includes:

[0024] Calculate the reward function, where the reward function includes:

[0025] ;

[0026] in, For the t The reward function of time slots, N is the total amount of tasks to be offloaded, For the i The service price of the server to be uninstalled corresponding to the task to be uninstalled, For the i The service price of the target server corresponding to the task to be offloaded, is the threshold of the target server, For thei a first state of the target server corresponding to the task to be offloaded, is the weight;

[0027] The task scheduling model is optimized according to the reward function and an average value of first states corresponding to at least two servers in the server group.

[0028] In some embodiments of the present application, determining the task servers to be offloaded in each of the server groups and the tasks to be offloaded in each of the task servers to be offloaded according to the task scheduling model includes:

[0029] Determining a task server to be uninstalled in the server group according to a first state and a minimum uninstall threshold of each server in the server group;

[0030] According to the task scheduling model, tasks exceeding a minimum uninstallation threshold in the to-be-uninstalled task server are taken as to-be-uninstalled tasks.

[0031] In some embodiments of the present application, clustering and grouping the plurality of servers according to the first state and the second state to obtain a plurality of server groups includes:

[0032] Based on the K-means clustering algorithm, the plurality of servers are clustered according to the first state and the second state. Round clustering;

[0033] Calculate the The sum of squared errors of round clustering, where , where the squared error and for:

[0034] ;

[0035] in, For the The sum of squared errors of round clustering, For the The vector representation of the second state of the server in round clustering, For the The set of vectors of the second states of the server groups in the clusters, is the Euclidean distance function;

[0036] when When the minimum value is reached, based on the The clustering results in multiple server groups. include:

[0037] ;

[0038] in, When the number of clusters is The decrease in the sum of squared errors.

[0039] A second aspect of an embodiment of the present invention provides a load balancing scheduling system, the system comprising:

[0040] Get module, used to get the t In a time slot, each of the plurality of servers has a first state and a second state, wherein the first state is the load of the server, and the second state is a change value between the first number of nodes and the second number of nodes, wherein the first number of nodes is the load of the server. t The number of nodes that establish a connection with the server in a time slot, wherein the second number of nodes is t - the number of nodes connected to the server in a time slot, and the nodes have tasks to be offloaded; wherein the end condition of any time slot includes: the load of the multiple servers in the time slot reaches the corresponding threshold; t is an integer greater than 1;

[0041] a grouping module, configured to cluster and group the plurality of servers according to the first state and the second state to obtain a plurality of server groups, each of the server groups including at least two servers;

[0042] a scheduling module, configured to divide the plurality of server groups into a first server group and a plurality of second server groups according to the first status of at least two servers in each of the server groups using a pre-trained task scheduling model; wherein the number of the first server groups is 1, and the amount of tasks in the first server group is less than the amount of tasks in any of the second server groups;

[0043] The unloading module is used to unload the tasks to be unloaded in the plurality of second server groups to the first server group according to the task scheduling model, and distribute the tasks to be unloaded to the first server group to at least two servers in the first server group.

[0044] A third aspect of an embodiment of the present invention provides an electronic device, comprising: at least one control processor and a memory for communicating with the at least one control processor; the memory stores instructions that can be executed by the at least one control processor, and the instructions are executed by the at least one control processor so that the at least one control processor can execute the above-mentioned load balancing scheduling method.

[0045] A fourth aspect of an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the above-mentioned load balancing scheduling method.

[0046] It can be understood that the beneficial effects of the second to fourth aspects compared with the related art are the same as the beneficial effects of the first aspect compared with the related art. Please refer to the relevant description in the first aspect, and no further details will be given here. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0048] Figure 1 It is a flow chart of a load balancing scheduling method provided in an embodiment of the present application;

[0049] Figure 2 This is a schematic diagram of an implementation scenario in an implementation method provided in an embodiment of the present application;

[0050] Figure 3 This is a schematic diagram of a scheduling process in an implementation manner provided in an embodiment of the present application;

[0051] Figure 4 It is a structural diagram of a load balancing scheduling system provided in an embodiment of the present application;

[0052] Figure 5 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0053] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as limiting the present application.

[0054] In the description of this application, if there is a description of first, second, etc., it is only for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.

[0055] In the description of the present application, it should be understood that the descriptions involving orientation, such as the orientation or positional relationship indicated as up, down, etc., are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.

[0056] In the description of this application, it should be noted that, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meaning of the above terms in this application based on the specific content of the technical solution.

[0057] As people's demand for computing resources gradually increases, edge computing is used to push computing resources from the cloud to the edge side closer to users, thereby improving the efficiency of data processing and response by building a cloud-edge-end trinity distributed management system. However, existing edge computing technologies have problems such as unbalanced load system resource allocation, low scheduling efficiency, and low computing resource utilization.

[0058] For this purpose, refer to Figure 1 The embodiment of the present application provides a load balancing scheduling method. The method is applied to a controller. The controller can be a server, an electronic device, or a mobile terminal. There is no specific limitation here. The method includes the following steps S110 to S140.

[0059] Step S110: Get the t In a time slot, each of the plurality of servers has a first state and a second state, wherein the first state is the load of the server, and the second state is a change value between the first node number and the second node number, wherein the first node number is the load of the server, and the second state is a change value between the first node number and the second node number. t The number of nodes that establish a connection with the server in the time slot, and the second number of nodes is t -The number of nodes connected to the server in a time slot, and the nodes have tasks to be offloaded; the end condition of any time slot includes: the load of multiple servers in the time slot reaches the corresponding threshold; t is an integer greater than 1.

[0060] In this step, the time is discretized into time slot units, and the t The first state and the second state of the server starting from the time slot include the load of each server task and the number of nodes recommended to be connected to the current server, wherein the first number of nodes is t The number of nodes that establish a connection with the server in the time slot, and the second number of nodes is t-1 The number of nodes that establish connections with the server in a time slot. Each node that is recommended to be connected to the server has tasks to be unloaded. The first state of each server can be confirmed by directly using the task load collected in the current time slot. The difference between the first number of nodes and the second number of nodes is calculated to obtain the second state. When scheduling each server, monitor whether the load of each server task reaches the preset threshold. When the task load of all servers reaches their respective thresholds, the current time slot scheduling ends. Otherwise, the scheduling process is repeated until the time slot end condition is met.

[0061] This embodiment provides a training process in which the edge server load is scheduled in multiple time slots. Figure 2 The application scenario of the embodiment includes multiple buildings and wireless access points. Each building and the wireless access point of the building corresponds to an edge computing server. Each building has different mobile users. Each mobile user connects to the edge computing server to process the corresponding task. Therefore, the scenario includes multiple edge computing servers distributed in different geographical locations.

[0062] Each edge computing server has different workloads and user movement trajectories. The workload refers to the amount of tasks that the mobile users connected to the current edge computing server need to handle. The user movement trajectory is determined based on the changes in the connection status between the user and each edge computing server, and is used to determine the user change amount of each edge computing server in the current time slot.

[0063] By discretizing time into time slots, at the beginning of each time slot, each edge computing server will determine the maximum computing resource capacity of the corresponding edge computing server based on the workload and user movement trajectory, so as to provide data support for the subsequent confirmation that the tasks to be offloaded in each edge computing server that needs to be scheduled have arrived at the edge computing server used to receive the schedule, and decide whether to offload to the edge computing server for execution or migrate to other edge computing servers for execution. By monitoring the task load of the server, new tasks are allocated according to the current load situation of each server to avoid the situation where some servers are overloaded while other servers are idle.

[0064] Step S120: cluster and group the multiple servers according to the first state and the second state to obtain multiple server groups, each server group including at least two servers.

[0065] In this step, clustering and grouping of multiple servers according to the first state and the second state is preferably implemented based on the K-means clustering algorithm, that is, the K-means clustering algorithm is used to group each server according to the load of the task of each server and the change value between the first node number and the second node number, so as to obtain multiple server groups, wherein each server group includes at least two servers, and the clustering algorithm is used to group the edge computing servers. After grouping, the edge computing servers in the same group have similar user mobility and load patterns, which accelerates the convergence speed of the task scheduling model while also improving the generalization of the model.

[0066] In some embodiments, clustering and grouping multiple servers according to the first state and the second state in step S120 to obtain multiple server groups includes the following steps:

[0067] Based on the K-means clustering algorithm, multiple servers are clustered according to the first state and the second state. Round clustering;

[0068] Calculate the The sum of squared errors of round clustering, where , where the squared error and for:

[0069] ;

[0070] in, For the The sum of squared errors of round clustering, For the The vector representation of the second state of the server in round clustering, For the The set of vectors of the second states of the server groups in the clusters, is the Euclidean distance function;

[0071] when When the minimum value is reached, based on the The clustering results in multiple server groups. include:

[0072] ;

[0073] in, When the number of clusters is The decrease in the sum of squared errors.

[0074] In this step, the K-means clustering algorithm is an unsupervised learning method used to divide the samples in the data set into K clusters, where the samples in each cluster have high similarity, while the samples in different clusters have large differences. The K-means algorithm minimizes the sum of the squares of the distances from the samples in the cluster to their centroids through iterative optimization. Specifically, the K-means clustering algorithm is used to perform clustering on multiple servers according to the first state and the second state. Round clustering is preferably performed based on the task volume of the server load in each round of clustering and the change value of the node in the corresponding time slot. The second state of the server in each round of clustering is defined as a two-dimensional vector, that is, the node change value is defined as a two-dimensional vector, so as to use the K-means algorithm for clustering, provide direct data support for clustering grouping, and improve scheduling efficiency.

[0075] In this embodiment, Euclidean distance is a method used in geometry to measure the straight-line distance between two points. In two-dimensional or three-dimensional space, it is the most intuitive distance measurement method between two points. In machine learning, Euclidean distance is used as a similarity measurement, especially in scenarios such as clustering algorithms (such as K-means) and nearest neighbor algorithms (such as K-NearestNeighbors, KNN). By calculating the distance between data points, the data point closest to a given point can be found, thereby performing tasks such as classification, regression or clustering.

[0076] In this embodiment, refer to Figure 2 , the campus scene is used as the edge computing environment to illustrate the specific implementation method, but it is not limited to the campus environment. Other scenes with a large number of mobile users and edge computing nodes: ports, factories, business districts, etc. can all be used. First, each building has corresponding mobile users and edge servers (edge ​​computing servers). The buildings with similar user mobility and task volume are clustered through the task load of each server and the change in the mobile users in the current time slot (the change value between the first node number and the second node number). Each building cluster presents a similar user load change pattern, which helps to more effectively utilize the task load differences between different clusters in the same time period. It can also aggregate user data, thereby narrowing the decision space for task scheduling and providing more efficient model training support.

[0077] In one implementation of this embodiment, from Choose from the edge computing servers The decision space for task scheduling in multiple time slots is Choose from the edge computing servers The number of combinations, namely:

[0078] ;

[0079] And experience The total action decision space of time slots It can be expressed as the continuous multiplication of the decision space for each time slot, that is:

[0080] ;

[0081] Among them, the number of edge computing servers There is a significant positive correlation between the number of edge computing servers and the size of the decision space. Therefore, by clustering edge computing servers and scheduling tasks among edge computing server clusters, the total number of edge computing server selections and the size of the decision space can be significantly reduced, thereby improving the efficiency and effectiveness of task scheduling.

[0082] In one implementation of this embodiment, the state of the task scheduling model used to schedule the server task is defined as a length of Vector , No. The number of components is equal to The average value of the task load of all edge computing servers in the group.

[0083] ;

[0084] vector The length of the edge computing server and the number of groups after clustering Same, vector No. l Components, that is , indicating that in the time slot Inside, numbered l The average value of the task load of all edge computing servers in the edge computing server group.

[0085] ;

[0086] I Indicates l The number of edge computing servers included in an edge computing server group.

[0087] Furthermore, a two-dimensional vector is first defined, which represents the user change, including the decrease and increase of users. The decrease of users refers to the number of users who disconnected in the current time slot compared with the previous time slot; and the increase of users refers to the number of users who started to establish connections in the current time slot compared with the previous time slot, that is, the change value between the first node number and the second node number in the second state of each server. When the change value is a positive number, it represents the increase of users, that is, no user reduction; when the change value is a negative number, it represents the decrease of users, that is, no user increase. Therefore, for the building , which represents the vector of user changes It can be expressed as:

[0088] ;

[0089] in, and Represents the first Within hours, the building The number of users who decrease and increase in the server, and It means the building The total number of user connections to the server.

[0090] Then, the vector of user change is normalized from the two aspects of the decrease and increase of users. The decrease and increase of users are normalized according to their proportion of the whole day, as shown in the following user decrease element normalization:

[0091] ;

[0092] For the number of user connections, the normalized value is based on the building It is calculated as the ratio of the total number of user connections in the building to the maximum and minimum number of user connections in all buildings, that is, ,in The set is represented as follows:

[0093] ;

[0094] In the vector of user changes The first 24 dimensions describe the building in detail. The first dimension shows the trend of user flow of the server in a day, and the last dimension accurately reflects the weight of the building server in the user mobility of the entire system, allowing us to fully and deeply understand the user activity of each building and its relative importance in the system.

[0095] Based on user change vector , the K-means clustering algorithm is used to cluster the servers of each building. The number of clusters K is preferably the inflection point where SSE slows down significantly as the number of clusters increases. When the number of clusters is K, the SSE is calculated as follows:

[0096] ;

[0097] in, Representative The vector set of user changes of the server groups in the cluster, represents the Euclidean distance function, yes The centroid of the change vector in is calculated as follows:

[0098] ;

[0099] in, Indicates a building The change vector of i Line j Elements of a column.

[0100] Therefore, the decrease in SSE as the number of clusters increases is defined as:

[0101] ;

[0102] And, the optimal number of clusters K is the decrease Reaching the minimum point, Indicates the decrease in SSE when the number of clusters is K.

[0103] Step S130: using a pre-trained task scheduling model to divide the multiple server groups into a first server group and multiple second server groups according to the first status of at least two servers in each server group; wherein the number of first server groups is 1, and the amount of tasks in the first server group is less than the amount of tasks in any second server group.

[0104] In this step, the pre-trained task scheduling model is preferably a task scheduling model constructed by each server historical data set based on reinforcement learning, which can adapt to dynamically changing workloads and system states, thereby achieving more efficient resource allocation, wherein the server historical data set includes a training set and a verification set, which contains various indicators related to the state space and the actions taken and their results. Preferably, the reinforcement learning process includes: step 1, the agent selects an action based on the current state and its strategy; step 2, the environment responds to the action of the agent and provides a new state and reward; step 3, the agent uses the reward to update its knowledge, such as adjusting the value function or strategy; repeat steps 1 to 3 until the termination condition is met, such as reaching the maximum number of iterations or finding a satisfactory solution. The task scheduling model constructed based on reinforcement learning can automatically learn and improve its scheduling strategy based on historical data, thereby achieving more efficient task processing. The task scheduling model is used to determine the first server group for receiving the tasks to be offloaded and other second server groups that need to be scheduled based on multiple server data, and perform corresponding task scheduling operations, wherein the number of first server groups is 1, the remaining server groups are divided into multiple second server groups, and the amount of tasks in the first server group is less than the amount of tasks in any second server group, thereby receiving the tasks to be offloaded with maximum capacity.

[0105] In some embodiments, in step S130, the plurality of server groups are divided into a first server group and a plurality of second server groups according to the first status of at least two servers in each server group using a pre-trained task scheduling model, including the following steps:

[0106] Calculating an average value of the task amount of each server group according to the first status of at least two servers in each server group;

[0107] Based on the average value of the task amount, a server group with the smallest average value of the task amount among the multiple server groups is selected as the first server group according to the task scheduling model, and the other server groups are selected as the second server group.

[0108] In this step, first, the average task volume of each server group is calculated according to the first state of each server in the multiple server groups, and then based on the average task volume of each server group, according to the task scheduling model, the server group with the smallest average task volume among the multiple server groups is selected as the first server group, and the other server groups are selected as the second server group.

[0109] In this embodiment, the load queue length of each server, that is, the task volume of each server load, is normalized to obtain the processed task volume, and then the corresponding online network model is constructed based on the processed task volume using the target network model to determine the target group, that is, to determine the first server group for receiving the task to be offloaded, wherein the target grid model is constructed by sampling the experience pool data, that is, it is constructed and trained through historical data, and constructing the online grid model also includes updating the model according to the loss function, wherein the loss function, also called the cost function or the error function, is a function used in machine learning and deep learning to quantify the difference between the model prediction value and the actual value. The prediction performance of the model can be measured by the loss function. Generally, the smaller the value of the loss function, the better, because it means that the model's prediction is closer to the true value. Therefore, the model is updated by the loss function to make the model data more accurate.

[0110] Step S140: offload the tasks to be offloaded in the plurality of second server groups to the first server group according to the task scheduling model, and distribute the tasks to be offloaded to the first server group to at least two servers in the first server group.

[0111] In this step, after determining the first server group for receiving the tasks to be offloaded and other second server groups that need to offload tasks, the tasks in multiple second server groups are offloaded to the first server group through the task scheduling model, and the tasks offloaded to the first server group are distributed to at least two servers in the first server group.

[0112] In some embodiments, in step S140, the tasks to be offloaded in the plurality of second server groups are offloaded to the first server group according to the task scheduling model, including the following steps:

[0113] Determine the task servers to be uninstalled in each server group and the tasks to be uninstalled in each task server to be uninstalled according to the task scheduling model;

[0114] Sorting the at least two servers in the first server group according to the task scheduling model based on the first status of the at least two servers in the first server group to obtain a sorting result;

[0115] According to the task scheduling model, the tasks to be uninstalled in the task servers to be uninstalled in each server group are uninstalled to at least two servers in the first server group according to the sorting result.

[0116] In this step, firstly, the task servers to be uninstalled in each server group and the tasks to be uninstalled in each task server to be uninstalled are determined according to the task scheduling model. Then, based on the first status of at least two servers in the first server group, the two servers in the first server group are sorted according to the task scheduling model to obtain the sorting result. Then, according to the task scheduling model, the tasks to be uninstalled in the task servers to be uninstalled in each server group are unloaded to at least two servers in the first server group according to the sorting result.

[0117] In this embodiment, refer to Figure 3 , in the time slot t At the beginning, the servers in the third group (first server group) are first sorted according to the task volume of each server load in the third group (first server group) to obtain the sorting result, and then the server groups after each clustering are scheduled between groups and within groups according to the task scheduling model.

[0118] The inter-group scheduling includes determining the first server group for receiving the task to be offloaded according to the average value of the task amount of the current load of multiple server groups, Figure 3 The third group is in the middle, and the first group and the second group are the second server groups for tasks to be unloaded. The servers for tasks to be unloaded in each second server group and the tasks to be unloaded of the servers for tasks to be unloaded are determined according to the task amount of the load of each server in the multiple second server groups, and then the tasks to be unloaded in the servers for tasks to be unloaded in the second server group are scheduled to be unloaded to the third group (first server group) according to the task scheduling model; the intra-group scheduling includes determining the servers for tasks to be unloaded in the third group according to the task amount of the load of each server in the third group (first server group), and then scheduling the tasks to be unloaded in the servers for tasks to be unloaded in the third group to be unloaded to the third group (first server group) according to the task scheduling model and the sorting results, until the load of multiple servers in the current time slot reaches the corresponding threshold, and the load balancing scheduling of edge computing in the current time slot is completed.

[0119] Then in the time slot t+1 To begin, return to Get t Within a time slot, the steps of the first state and the second state of each server in the multiple servers repeat the above-mentioned load balancing scheduling operation of edge computing, thereby distributing requests evenly to different servers to prevent any single server from being overloaded, reducing the processing burden of each server, speeding up the processing time of a single request, improving the system's fault tolerance, and reducing the risk of single point failures, which not only improves the efficiency and stability of the IT infrastructure, but also provides a solid foundation for business growth.

[0120] In some embodiments, the step of determining the task servers to be uninstalled in each server group and the tasks to be uninstalled in each task server to be uninstalled according to the task scheduling model includes the following steps:

[0121] Determine the task server to be uninstalled in the server group according to the first state and the lowest uninstall threshold of each server in the server group;

[0122] According to the task scheduling model, the tasks exceeding the minimum offloading threshold in the task server to be offloaded are regarded as tasks to be offloaded.

[0123] In this embodiment, the task servers to be uninstalled in each server group need to be determined according to the first state of each server in the server group and the minimum uninstall threshold, that is, determined by the task amount of each server load and the minimum uninstall threshold, and the task amount exceeding the minimum uninstall threshold in the task servers to be uninstalled is used as the task to be uninstalled according to the task scheduling model, wherein the minimum migration threshold Specifically, the amount of tasks that the edge computing server can calculate within a time slot:

[0124] ;

[0125] in, is the CPU frequency of the edge computing server, that is, the computing power of the CPU, and timeslot represents a time slot. It is the average number of CPU cycles required to process a task, that is, the size of the task.

[0126] Therefore, when executing task scheduling of server load, it is necessary to make a judgment first. If the task volume of the current server load is greater than the minimum unloading threshold, the tasks exceeding the minimum unloading threshold will be scheduled; if the task volume of the current server load is less than or equal to the minimum unloading threshold, it means that the current server does not schedule tasks, thereby improving the utilization rate of the edge computing server, avoiding idle server resources, and reducing the migration rate.

[0127] In some embodiments, the step of unloading the tasks to be unloaded in the task servers to be unloaded in each server group to at least two servers in the first server group according to the sorting result according to the task scheduling model includes the following steps:

[0128] According to the task scheduling model and the sorting results, the server ranked first is used as the target server;

[0129] According to the task scheduling model, the tasks to be offloaded of the task server to be offloaded are aggregated to obtain an aggregated result;

[0130] When the sorting result is sorted from large to small, the tasks to be uninstalled of the task server to be uninstalled are uninstalled to the target server until the first state corresponding to the target server is higher than the corresponding threshold value. Then, the server adjacent to the target server and ranked after the target server in the sorting result is used as the target server, and the step of unloading the remaining tasks to be uninstalled in the summary result to the target server is executed until the first states corresponding to all servers in the first server group are higher than the corresponding threshold value.

[0131] In this step, first, according to the task scheduling model and the sorting result, the server ranked first is used as the target server, that is, the server for receiving the tasks to be uninstalled. Secondly, the tasks to be uninstalled of the task servers to be uninstalled are summarized according to the task scheduling model to obtain the summary result. When the sorting result is sorted from large to small, the tasks to be uninstalled of the task servers to be uninstalled are uninstalled to the target server until the first state corresponding to the target server is higher than the corresponding threshold (the task volume threshold of the server load). Then, the server adjacent to the target server and ranked after the target server in the sorting result is used as the target server, and the step of unloading the remaining uninstalled tasks to be uninstalled in the summary result to the target server is executed until the first states corresponding to all servers in the first server group are higher than the corresponding threshold. Each server has a corresponding task volume threshold of the server load, and the sorting result is sorted according to the task volume of the server load being sorted.

[0132] In this embodiment, the servers in the first server group are first sorted from large to small according to the task amount of the server load, and the server ranked first is used as the target server, that is, the server for receiving the task to be offloaded, and then the task is preferentially offloaded to the target server. When all the computing resources of the target server are occupied, the server adjacent to the target server and ranked after the target server in the sorting result is used as the target server, and the step of unloading the remaining unloaded tasks to be offloaded to the target server is continued. If all the computing resources in the first server group are occupied, the remaining unoffloaded tasks are executed on their respective edge computing servers without being scheduled for offloading, thereby utilizing the computing resources of the idle edge computing servers to schedule the tasks that need to be scheduled for offloading from the edge computing servers with high loads to the edge computing servers with low loads, and at the same time fully utilizing the computing resources of all edge computing servers without excessively increasing the load of specific edge computing servers, thereby achieving load balancing.

[0133] In this embodiment, t After the time slot ends, the reward function is calculated, where the reward function includes:

[0134] ;

[0135] in, For the t The reward function for time slots, N is i The amount of tasks to be unloaded, For the i The service price of the server to be uninstalled corresponding to the task to be uninstalled, For the i The service price of the target server corresponding to the task to be offloaded, is the threshold of the target server, For the i The first state of the target server corresponding to the task to be offloaded, is the weight;

[0136] The task scheduling model is optimized according to the reward function and the average value of the first states corresponding to multiple servers in each server group to obtain an optimized task scheduling model.

[0137] In this embodiment, the reward is defined as the sum of the difference between the source edge computing server price and the target edge computing server price for each task scheduling, and the sum of the remaining computing resources of the target edge computing server in each time slot. In the reward function, the sum of the difference between the source edge computing server price and the target edge computing server price for each task scheduling is used to optimize revenue, and the sum of the remaining computing resources of the target edge computing server is used to balance the load, and both are normalized. The reward function is as follows:

[0138] ;

[0139] in, For the t The reward function for time slots, N is i The amount of tasks to be unloaded, For the i The service price of the server to be uninstalled corresponding to the task to be uninstalled, For the i The service price of the target server corresponding to the task to be offloaded, is the threshold of the target server, For the i The first state of the target server corresponding to the task to be offloaded, is the weight, represents the weight of optimized income after normalization, Represents the weight of the normalized balanced load.

[0140] In this embodiment, normalization is a data preprocessing technique, and its purpose is to adjust the range of numerical features so that the data are comparable. Because different features may have very different magnitudes and units, if appropriate scaling is not performed, subsequent model optimization may be affected by these differences, resulting in performance degradation or slower convergence. Therefore, the sum of the difference between the source edge computing server price and the target edge computing server price for each task scheduling representing optimized revenue and the sum of the remaining computing resources of the target edge computing server representing balanced load are normalized to ensure the comparability of the data, so as to optimize the task scheduling model through the reward function to make the best decision in real time according to the current environmental conditions, and continuously learn and optimize from historical data, thereby meeting the real-time and scalability requirements of dynamically changing scenarios, and solving the problems of insufficient computing resource utilization and insufficient profitability in large-scale edge computing scenarios.

[0141] In this embodiment, by obtaining the t The invention discloses a method for realizing a first state and a second state of each server in a time slot; clustering and grouping the multiple servers according to the first state and the second state to obtain multiple server groups, each server group including at least two servers; using a pre-trained task scheduling model to divide the multiple server groups into a first server group and multiple second server groups according to the first state of at least two servers in each server group; unloading the tasks to be unloaded in the multiple second server groups to the first server group according to the task scheduling model, and distributing the tasks to be unloaded to the first server group to at least two servers in the first server group, so as to achieve a refined task scheduling strategy and efficient load balancing scheduling, and maximize the utilization of edge computing resources.

[0142] like Figure 4 As shown, some embodiments of the present application provide a load balancing scheduling system, the system includes an acquisition module 410, a grouping module 420, a scheduling module 430, and an unloading module 440, specifically:

[0143] The acquisition module 410 is used to obtain the t In a time slot, each of the plurality of servers has a first state and a second state, wherein the first state is the load of the server, and the second state is a change value between the first node number and the second node number, wherein the first node number is the load of the server, and the second state is a change value between the first node number and the second node number. t The number of nodes that establish a connection with the server in the time slot, and the second number of nodes is t -The number of nodes connected to the server in a time slot, and the nodes have tasks to be offloaded; the end condition of any time slot includes: the load of multiple servers in the time slot reaches the corresponding threshold; t is an integer greater than 1;

[0144] A grouping module 420, configured to cluster and group the plurality of servers according to the first state and the second state to obtain a plurality of server groups, each server group including at least two servers;

[0145] a scheduling module 430, configured to divide the plurality of server groups into a first server group and a plurality of second server groups according to a first state of at least two servers in each server group using a pre-trained task scheduling model; wherein the number of the first server group is 1, and the amount of tasks in the first server group is less than the amount of tasks in any second server group;

[0146] The unloading module 440 is used to unload the tasks to be unloaded in the plurality of second server groups to the first server group according to the task scheduling model, and distribute the tasks to be unloaded to the first server group to at least two servers in the first server group.

[0147] In one embodiment, the grouping module 420 is further used to: based on the K-means clustering algorithm, group the plurality of servers according to the first state and the second state. Round clustering.

[0148] In one embodiment, the grouping module 420 is further configured to: calculate the , where the squared error and for:

[0149] ;

[0150] in, For the The sum of squared errors of round clustering, For the The vector representation of the second state of the server in round clustering, For the The set of vectors of the second states of the server groups in the clusters, is the Euclidean distance function.

[0151] In one embodiment, the grouping module 420 is further configured to: When the minimum value is reached, based on the The clustering results in multiple server groups. include:

[0152] ;

[0153] in, When the number of clusters is The decrease in the sum of squared errors.

[0154] In one embodiment, the scheduling module 430 is further configured to calculate an average value of the task volume of each server group according to the first status of at least two servers in each server group.

[0155] In one embodiment, the scheduling module 430 is further used to: based on the average task amount and according to the task scheduling model, select a server group with the smallest average task amount among multiple server groups as the first server group, and select the other server groups as the second server group.

[0156] In one embodiment, the offloading module 440 is further used to determine the task servers to be offloaded in each server group and the tasks to be offloaded in each task server to be offloaded according to the task scheduling model.

[0157] In one embodiment, the unloading module 440 is further used to: sort the at least two servers in the first server group according to the task scheduling model based on the first status of the at least two servers in the first server group to obtain a sorting result.

[0158] In one embodiment, the unloading module 440 is further used to: unload the tasks to be unloaded in the task servers to be unloaded in each server group to at least two servers in the first server group according to the sorting result according to the task scheduling model.

[0159] In one embodiment, the unloading module 440 is further configured to: select the server ranked first as the target server according to the ranking result according to the task scheduling model.

[0160] In one implementation, the offloading module 440 is further configured to: aggregate the tasks to be offloaded from the task servers to be offloaded according to the task scheduling model to obtain an aggregated result.

[0161] In one embodiment, the unloading module 440 is also used for: when the sorting result is sorted from large to small, the tasks to be unloaded of the task server to be unloaded are unloaded to the target server until the first state corresponding to the target server is higher than the corresponding threshold value, and then the server adjacent to the target server and ranked after the target server in the sorting result is used as the target server, and the step of unloading the remaining unloaded tasks to be unloaded in the summary result to the target server is executed until the first states corresponding to all servers in the first server group are higher than the corresponding threshold value.

[0162] In one embodiment, the unloading module 440 is further used to calculate a reward function, wherein the reward function includes:

[0163] ;

[0164] in, For the tThe reward function of time slots, N is the total number of tasks to be offloaded, For the i The service price of the server to be uninstalled corresponding to the task to be uninstalled, For the i The service price of the target server corresponding to the task to be offloaded, is the threshold of the target server, For the i The first state of the target server corresponding to the task to be offloaded, is the weight.

[0165] In one embodiment, the unloading module 440 is further used to optimize the task scheduling model according to the reward function and the average value of the first states corresponding to at least two servers in the server group.

[0166] In one implementation, the unloading module 440 is further configured to: determine the task server to be unloaded in the server group according to the first state and the lowest unloading threshold of each server in the server group.

[0167] In one implementation, the unloading module 440 is further configured to: according to the task scheduling model, take the tasks exceeding the minimum unloading threshold in the task server to be unloaded as the tasks to be unloaded.

[0168] It should be noted that the load balancing scheduling system provided in this embodiment and the above-mentioned load balancing scheduling method are based on the same inventive concept, so the relevant content of the above-mentioned load balancing scheduling method is also applicable to the content of the load balancing scheduling system, so it will not be repeated here.

[0169] like Figure 5 The embodiment of the present application further provides an electronic device, the electronic device comprising:

[0170] At least one hydrogen fuel cell;

[0171] at least one memory;

[0172] at least one processor;

[0173] at least one program;

[0174] The program is stored in the memory, and the processor executes at least one program to implement the load balancing scheduling method mentioned above in the present disclosure.

[0175] The electronic device may be any intelligent terminal including a mobile phone, a tablet computer, a personal digital assistant (PDA), a vehicle-mounted computer, etc.

[0176] The electronic device according to the embodiment of the present application is described in detail below.

[0177] The processor 1600 may be implemented by a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present disclosure;

[0178] The memory 1700 may be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1700 may store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1700, and the processor 1600 calls and executes a load balancing scheduling method of the embodiment of the present disclosure.

[0179] Input / output interface 1800, used to implement information input and output;

[0180] Communication interface 1900, used to realize communication interaction between the device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);

[0181] Bus 2000 , which transmits information between various components of the device (e.g., processor 1600 , memory 1700 , input / output interface 1800 , and communication interface 1900 );

[0182] The processor 1600 , the memory 1700 , the input / output interface 1800 , and the communication interface 1900 are connected to each other in communication within the device via the bus 2000 .

[0183] The embodiment of the present disclosure further provides a storage medium, which is a computer-readable storage medium. The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the above-mentioned load balancing scheduling method.

[0184] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0185] The embodiments described in the embodiments of the present disclosure are intended to more clearly illustrate the technical solutions of the embodiments of the present disclosure and do not constitute a limitation on the technical solutions provided by the embodiments of the present disclosure. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of the present disclosure are also applicable to similar technical problems.

[0186] Those skilled in the art will appreciate that the technical solutions shown in the figures do not limit the embodiments of the present disclosure and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0187] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0188] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0189] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0190] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0191] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0192] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0193] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0194] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable an electronic device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store programs.

[0195] The above is a specific description of the preferred implementation of the embodiments of the present application, but the embodiments of the present application are not limited to the above-mentioned implementation methods. Technical personnel familiar with the field can also make various equivalent modifications or substitutions without violating the spirit of the embodiments of the present application. These equivalent modifications or substitutions are all included in the scope defined by the claims of the embodiments of the present application.

[0196] The embodiments of the present application are described in detail above in conjunction with the accompanying drawings, but the present application is not limited to the above embodiments. Various changes can be made within the knowledge scope of ordinary technicians in the relevant technical field without departing from the purpose of the present application.

Claims

1. A load balancing scheduling method, characterized in that: The method comprises: Get the t In a time slot, each of the plurality of servers has a first state and a second state, wherein the first state is the load of the server, and the second state is a change value between the first number of nodes and the second number of nodes, wherein the first number of nodes is the load of the server. t The number of nodes that establish a connection with the server in a time slot, wherein the second number of nodes is t - the number of nodes connected to the server in a time slot, and the nodes have tasks to be offloaded; wherein the end condition of any time slot includes: the load of the multiple servers in the time slot reaches the corresponding threshold; t is an integer greater than 1; Clustering and grouping the plurality of servers according to the first state and the second state to obtain a plurality of server groups, each of the server groups including at least two servers; Using a pre-trained task scheduling model, the plurality of server groups are divided into a first server group and a plurality of second server groups according to the first status of at least two servers in each of the server groups; wherein the number of the first server groups is 1, and the amount of tasks in the first server group is less than the amount of tasks in any of the second server groups; offloading the to-be-offloaded tasks in the plurality of second server groups to the first server group according to the task scheduling model, and distributing the to-be-offloaded tasks to the first server group to at least two servers in the first server group; The clustering and grouping of the plurality of servers according to the first state and the second state to obtain a plurality of server groups includes: Based on the K-means clustering algorithm, the plurality of servers are clustered according to the first state and the second state. Round clustering; Calculate the The sum of squared errors of round clustering, where , where the squared error and for: ; in, For the The sum of squared errors of round clustering, For the a vector representation of the first state and the second state of the server in round clustering, For the a set of vectors of the first state and the second state of the server groups in a cluster, is the Euclidean distance function; when When the minimum value is reached, based on the The clustering results in multiple server groups. include: ; in, When the number of clusters is The decrease in the sum of squared errors.

2. The load balancing scheduling method according to claim 1, characterized in that: The method of using a pre-trained task scheduling model to divide the plurality of server groups into a first server group and a plurality of second server groups according to a first state of at least two servers in each of the server groups comprises: Calculating an average value of the task amount of each server group according to the first status of at least two servers in each server group; Based on the average value of the task amount, according to the task scheduling model, a server group with the smallest average value of the task amount among the multiple server groups is selected as the first server group, and the other server groups are selected as the second server group.

3. The load balancing scheduling method according to claim 1, characterized in that: The step of offloading the to-be-offloaded tasks in the plurality of second server groups to the first server group according to the task scheduling model comprises: Determine, according to the task scheduling model, a task server to be uninstalled in each of the server groups and a task to be uninstalled in each of the task servers to be uninstalled; sorting the at least two servers in the first server group according to the task scheduling model based on the first status of the at least two servers in the first server group to obtain a sorting result; According to the task scheduling model, the tasks to be offloaded in the task servers to be offloaded in each of the server groups are offloaded to at least two servers in the first server group according to the sorting result.

4. The load balancing scheduling method according to claim 3, characterized in that: The step of unloading the tasks to be unloaded in the task servers to be unloaded in each of the server groups to at least two servers in the first server group according to the sorting result according to the task scheduling model includes: According to the task scheduling model and the ranking result, the server ranked first is used as the target server; Aggregate the tasks to be offloaded of the task server to be offloaded according to the task scheduling model to obtain a summary result; In the case where the sorting result is sorted from large to small, the tasks to be uninstalled of the task server to be uninstalled are uninstalled to the target server until the first state corresponding to the target server is higher than the corresponding threshold value, then the server adjacent to the target server and ranked after the target server in the sorting result is used as the target server, and the step of unloading the remaining tasks to be uninstalled in the summary result to the target server is executed until the first states corresponding to all servers in the first server group are higher than the corresponding threshold value.

5. The load balancing scheduling method according to claim 4, characterized in that: In the t After the time slot ends, it also includes: Calculate the reward function, where the reward function includes: ; in, For the t The reward function of time slots, N is the total amount of tasks to be offloaded, For the i The service price of the server to be uninstalled corresponding to the task to be uninstalled, For the i The service price of the target server corresponding to the task to be offloaded, is the threshold of the target server, For the i a first state of the target server corresponding to the task to be offloaded, is the weight; The task scheduling model is optimized according to the reward function and an average value of first states corresponding to at least two servers in the server group.

6. The load balancing scheduling method according to claim 5, characterized in that: The step of determining the task server to be uninstalled in each of the server groups and the tasks to be uninstalled in each of the task servers to be uninstalled according to the task scheduling model includes: Determining a task server to be uninstalled in the server group according to a first state and a minimum uninstall threshold of each server in the server group; According to the task scheduling model, tasks exceeding a minimum uninstallation threshold in the to-be-uninstalled task server are taken as to-be-uninstalled tasks.

7. A load balancing scheduling system, characterized in that: The system comprises: Get module, used to get the t In a time slot, each of the plurality of servers has a first state and a second state, wherein the first state is the load of the server, and the second state is a change value between the first number of nodes and the second number of nodes, wherein the first number of nodes is the load of the server. t The number of nodes that establish a connection with the server in a time slot, wherein the second number of nodes is t - the number of nodes connected to the server in a time slot, and the nodes have tasks to be offloaded; wherein the end condition of any time slot includes: the load of the multiple servers in the time slot reaches the corresponding threshold; t is an integer greater than 1; a grouping module, configured to cluster and group the plurality of servers according to the first state and the second state to obtain a plurality of server groups, each of the server groups including at least two servers; a scheduling module, configured to divide the plurality of server groups into a first server group and a plurality of second server groups according to the first status of at least two servers in each of the server groups using a pre-trained task scheduling model; wherein the number of the first server groups is 1, and the amount of tasks in the first server group is less than the amount of tasks in any of the second server groups; an unloading module, configured to unload the tasks to be unloaded in the plurality of second server groups to the first server group according to the task scheduling model, and distribute the tasks to be unloaded to the first server group to at least two servers in the first server group; The clustering and grouping of the plurality of servers according to the first state and the second state to obtain a plurality of server groups includes: Based on the K-means clustering algorithm, the plurality of servers are clustered according to the first state and the second state. Round clustering; Calculate the The sum of squared errors of round clustering, where , where the squared error and for: ; in, For the said The sum of squared errors of round clustering, For the a vector representation of the first state and the second state of the server in round clustering, For the a set of vectors of the first state and the second state of the server groups in a cluster, is the Euclidean distance function; when When the minimum value is reached, based on the The clustering results in multiple server groups. include: ; in, When the number of clusters is The decrease in the sum of squared errors.

8. An electronic device, characterized in that: It includes at least one control processor and a memory for communicating with the at least one control processor; the memory stores instructions that can be executed by the at least one control processor, and the instructions are executed by the at least one control processor so that the at least one control processor can execute a load balancing scheduling method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute a load balancing scheduling method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Multi-level computing power network task scheduling method and device

    CN116708443A

  • Network service server load balancing

    EP0903901A2