Task scheduling method and device, processing equipment and storage medium

By obtaining the performance indicator information of the server cluster, determining the remaining load rate and setting weighted values, the performance loss caused by execution and interoperability between microservice modules is solved, and efficient resource utilization and reliable deployment of microservices are achieved.

CN119938255APending Publication Date: 2025-05-06CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411823900.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

In microservice-based applications, the execution and interoperability between microservice modules lead to server performance losses. In cluster deployment, while maintaining multiple concurrent services, it is necessary to ensure interactive collaboration between services to avoid waste of load resources, which poses challenges to task scheduling.

Method used

By obtaining performance metric information of at least one server in the server cluster, determining its residual load rate, and setting a first weighted value, which is used to determine the probability of allocating microservice tasks to the corresponding server, thereby performing task scheduling.

Benefits of technology

This method can efficiently utilize resources, reduce resource waste, adapt to the overall operation of the server cluster, and ensure the reliable deployment of microservices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119938255A_ABST
    Figure CN119938255A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a task scheduling method and device, processing equipment and a storage medium. The method comprises the following steps: acquiring performance index information of at least one server in a server cluster; determining the residual load rate of the server based on the inherent load capacity and the current load capacity of the server; wherein the current load capacity is determined based on the performance index information; executing an operation of a first weighted value set for the server based on a comparison result of the residual load rate and a threshold value; wherein the first weighted values set for different servers are used for determining probabilities, and the probabilities are the probabilities for allocating micro-service tasks to the corresponding servers; and executing task scheduling of the micro-service based on the first weighted value of at least one server in the server cluster. Therefore, the method can adapt to the operation condition of at least one server in the server cluster, can efficiently utilize resources, reduces resource waste, and reliably realizes the deployment of micro-services.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to, but are not limited to, the field of cloud computing, and in particular, to a task scheduling method, apparatus, processing device, and storage medium. Background Art

[0002] With the development of mobile Internet technology, microservices, as a mainstream application design framework, are increasingly being used in large-scale commercial software systems. Each microservice can be independently implemented, deployed, and updated, and microservice-based applications can solve complex task allocation, processing, and other problems. Although this new architecture brings convenience to developers, the execution and interoperability between microservice modules also brings significant performance losses to the server. In cluster deployment, the system needs to ensure the normal operation of multiple concurrent services while ensuring the interactive collaboration between services to avoid wasting load resources, which brings challenges to task scheduling based on microservice development. Summary of the invention

[0003] In view of this, the present invention discloses a task scheduling method, apparatus, processing device and storage medium.

[0004] According to a first aspect of an embodiment of the present application, a task scheduling method is provided, the method comprising:

[0005] Obtaining performance indicator information of at least one server in a server cluster; wherein the performance indicator information includes performance parameters, and the server cluster is used to deploy microservices;

[0006] Determining the remaining load rate of the server based on the inherent load capacity and the current load capacity of the server; wherein the current load capacity is determined based on the performance indicator information;

[0007] Based on the comparison result of the remaining load rate and the threshold, performing an operation of a first weighted value set for the server; wherein the first weighted value set for different servers is used to determine a probability, and the probability is a probability of allocating the task of the microservice to the corresponding server;

[0008] Based on the first weighted value of at least one server in the server cluster, task scheduling for the microservice is performed.

[0009] In some embodiments, the performance parameter includes at least one of the following:

[0010] Central Processing Unit (CPU) frequency;

[0011] Disk input and output I / O rate;

[0012] Memory size;

[0013] Network bandwidth.

[0014] In some embodiments, the threshold includes a first threshold and a second threshold; the first threshold is greater than the second threshold; and the operation of performing the first weighted value set for the server based on the comparison result of the remaining load rate and the threshold includes one of the following:

[0015] When the remaining load rate is greater than or equal to the first threshold, keeping the first weighted value unchanged;

[0016] When the remaining load ratio is less than or equal to the first threshold, the first weighted value is updated based on a comparison result between the remaining load ratio and the second threshold.

[0017] In some embodiments, updating the first weighted value based on the comparison result between the remaining load rate and the second threshold value includes one of the following:

[0018] determining that the remaining load rate is greater than or equal to the second threshold, and reducing the first weighted value;

[0019] It is determined that the remaining load ratio is less than or equal to the second threshold, and the first weighted value is set to a first value.

[0020] In some embodiments, the method further comprises:

[0021] Adjusting a performance parameter of a first server in the server cluster based on the first occupancy rate and the second occupancy rate;

[0022] The first occupancy rate is the occupancy rate of the performance parameter of the first server, and the second occupancy rate is the occupancy rate of the performance parameter of the second server in the server cluster.

[0023] In some embodiments, adjusting the performance parameter of the first server in the server cluster based on the first occupancy rate and the second occupancy rate includes:

[0024] Based on the first occupancy rate and an average value of the second occupancy rates of all servers in the server cluster, a performance parameter of a first server in the server cluster is adjusted.

[0025] In some embodiments, performing task scheduling of the microservice based on the first weighted value of at least one server in the server cluster includes:

[0026] Based on the first weighted value of at least one server in the server cluster, the task is scheduled by the microservice component Feign; wherein the control layer interface of the microservice architecture associates the routing configuration information of the Feign with the routing of the control layer.

[0027] According to a second aspect of an embodiment of the present application, a task scheduling device is provided, the device comprising:

[0028] An acquisition module is configured to acquire performance indicator information of at least one server in a server cluster; wherein the performance indicator information includes performance parameters, and the server cluster is used to deploy microservices;

[0029] a determination module configured to determine the remaining load rate of the server based on the inherent load capacity and the current load capacity of the server; wherein the current load capacity is determined based on the performance indicator information;

[0030] The execution module is configured to: based on the comparison result of the remaining load rate and the threshold, perform the operation of the first weighted value set for the server; wherein the first weighted values ​​set for different servers are used to determine the probability, and the probability is the probability of assigning the task of the microservice to the corresponding server; based on the first weighted value of at least one server in the server cluster, perform task scheduling of the microservice.

[0031] In some embodiments, the acquisition module is configured such that: the performance parameter includes at least one of the following:

[0032] CPU frequency;

[0033] Disk input and output I / O rate;

[0034] Memory size;

[0035] Network bandwidth.

[0036] In some embodiments, the threshold includes a first threshold and a second threshold; the first threshold is greater than the second threshold; and the execution module is configured as one of the following:

[0037] When the remaining load ratio is greater than or equal to the first threshold, keeping the first weighted value unchanged;

[0038] When the remaining load ratio is less than or equal to the first threshold, the first weighted value is updated based on a comparison result between the remaining load ratio and the second threshold.

[0039] In some embodiments, the execution module is further configured to do one of the following:

[0040] determining that the remaining load rate is greater than or equal to the second threshold, and reducing the first weighted value;

[0041] It is determined that the remaining load ratio is less than or equal to the second threshold, and the first weighted value is set to a first value.

[0042] In some embodiments, the apparatus further includes an adjustment module, and the adjustment module is further configured to:

[0043] Adjusting a second weighted value of a performance parameter of a first server in the server cluster based on the first occupancy rate and the second occupancy rate;

[0044] The first occupancy rate is the occupancy rate of resources corresponding to the performance parameters of the first server, the second occupancy rate is the occupancy rate of resources corresponding to the performance parameters of the second server in the server cluster, and the second weighted value is used to indicate the degree of influence of the performance parameters on the operation of the first server.

[0045] In some embodiments, the adjustment module is further configured to:

[0046] Based on the first occupancy rate and an average value of the second occupancy rates of all servers in the server cluster, a performance parameter of a first server in the server cluster is adjusted.

[0047] In some embodiments, the execution module is further configured to:

[0048] Based on the first weighted value of at least one server in the server cluster, the task is scheduled by the microservice component Feign; wherein the control layer interface of the microservice architecture associates the routing configuration information of the Feign with the routing of the control layer.

[0049] According to a third aspect of an embodiment of the present application, a processing device is provided, wherein the processing device is used to execute the method described in the first aspect.

[0050] According to a fourth aspect of an embodiment of the present application, a computer storage medium is provided, wherein the computer storage medium stores an executable program, and when the executable program is executed by a processor, the method described in the first aspect of the embodiment of the present disclosure is implemented.

[0051] According to a fifth aspect of an embodiment of the present application, a computer program product is provided, including a computer program or instructions, which, when executed by a processor, implements the method described in the first aspect of the embodiment of the present disclosure.

[0052] In an embodiment of the application, the performance indicator information of at least one server in a server cluster is obtained; wherein the performance indicator information includes performance parameters, and the server cluster is used to deploy microservices, so that the performance indicator information of the server used to deploy microservices can be obtained. The remaining load rate of the server is determined based on the inherent load capacity and current load capacity of the server; wherein the current load capacity is determined based on the performance indicator information. In this way, the current remaining load rate of the server can be accurately determined based on the acquired performance indicator information. Based on the comparison result of the remaining load rate and the threshold, the operation of the first weighted value set for the server is performed; wherein the first weighted value set for different servers is used to determine the probability, and the probability is the probability of assigning the task of the microservice to the corresponding server; in this way, the processing of the first weighted value can be performed based on the comparison result of the remaining load rate and the threshold, so that the probability of assigning the task of the microservice to the corresponding server can be adjusted, so that the task scheduling of the microservice based on the first weighted value can adapt to the overall operation of at least one server in the server cluster, and can efficiently utilize resources, reduce resource waste, and reliably realize the deployment of microservices. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 is a flowchart of a task scheduling method according to the first embodiment;

[0054] Figure 2 is a flowchart of a task scheduling method according to the second embodiment;

[0055] Figure 3 is a flowchart of a task scheduling method according to the third embodiment;

[0056] Figure 4 FIG. 4 is a schematic diagram of a task scheduling device according to a fourth embodiment. DETAILED DESCRIPTION

[0057] In order to make the purpose, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present invention. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present invention.

[0058] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0059] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present invention described herein can be implemented in an order other than that illustrated or described herein.

[0060] In the following description, “greater than” and “less than” are involved. It should be noted that in the present disclosure, “greater than” can be used to indicate “greater than” or “equal to”; “less than” can be used to indicate “less than” or “equal to”.

[0061] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. The terms used herein are only for the purpose of describing the embodiments of the present invention and are not intended to limit the present invention.

[0062] In order to better understand the embodiments of the present disclosure, relevant examples are first described:

[0063] In some embodiments, the network architecture adopts a multi-task centralized processing method, which not only has low processing efficiency and high error rate, but also has high coupling between modules. It cannot be deployed independently and is easy to affect the operation of other modules.

[0064] In some embodiments, resource scheduling strategies often set the weights of various performance indicators of the server to fixed values, while the impact of the server on performance is constantly changing during operation, resulting in misjudgment of the server status and poor system scheduling effects.

[0065] like Figure 1 As shown, an image method is provided in an embodiment of the present application, and the method includes:

[0066] Step S101, obtaining performance indicator information of at least one server in a server cluster.

[0067] Step S102: determining the remaining load rate of the server based on the inherent load capacity and the current load capacity of the server.

[0068] Step S103: Based on the comparison result between the remaining load rate and the threshold, an operation of setting a first weighted value for the server is performed.

[0069] Step S104: Execute task scheduling of the microservice based on the first weighted value of at least one server in the server cluster.

[0070] The task scheduling method disclosed in the present invention can be applied to electronic devices. The electronic devices involved in the present invention may be, but are not limited to, computers, mobile phones, wearable devices, vehicle-mounted terminals, road side units (RSU, Road Side Unit), smart home terminals, industrial sensor equipment and / or medical equipment, etc.

[0071] In some embodiments, the server cluster includes at least one server, and the at least one server is used to deploy the microservice. Here, the at least one server can be all servers or part of the servers in the server cluster.

[0072] Exemplarily, in step S101, the performance indicator information of some servers in the server cluster may be obtained, or the performance indicator information of all servers in the server cluster may be obtained.

[0073] In some embodiments, the performance indicator information of at least one server in the server cluster is periodically obtained, so that the performance indicator information of at least one server in the server cluster can be obtained in real time. The real-time status of the server can be dynamically monitored, which improves the situation where a single server is in an overloaded state due to the resource load algorithm only scheduling tasks in the ideal state of the server, thereby improving resource utilization and reducing system operation costs.

[0074] In some embodiments, the performance parameter includes at least one of the following:

[0075] CPU frequency;

[0076] Disk input and output I / O rate;

[0077] Memory size;

[0078] Network bandwidth.

[0079] It should be noted that the performance parameters are parameters corresponding to resources, and the resources may be central processing unit resources, disk resources, memory resources or network bandwidth resources.

[0080] In some embodiments, the inherent load capacity of the server is determined, wherein the inherent load capacity may be the load capacity of the server factory settings. For example, the server may be set with a fixed CPU frequency, disk I / O rate, memory size, and network bandwidth when it is factory set.

[0081] Exemplarily, the performance indicator information includes performance parameters, and the performance parameters include CPU frequency, disk I / O rate, memory size, and network bandwidth. If the server cluster an consists of n servers,

[0082] an={a1,a2,…,an};

[0083] Then the inherent load capacity of the i-th server is:

[0084]

[0085] in, They correspond to the maximum occupancy rate of the CPU frequency, disk I / O rate, memory size, and network bandwidth of the i-th server, respectively. They correspond to the weights of the CPU frequency, disk I / O rate, memory size, and network bandwidth of the i-th server respectively.

[0086] in, in, The default is 1.

[0087] In some embodiments, the current load capacity of the server is determined, wherein the current load capacity may be the current load capacity of the server when the server is running. The current load capacity may be determined based on the performance indicator information of the server acquired in real time.

[0088] For example, the current load capacity of the i-th server is:

[0089]

[0090] In some embodiments, They correspond to the current CPU frequency, disk I / O rate, memory size, and current occupancy rate of the network bandwidth of the i-th server respectively. are respectively the CPU frequency, disk I / O rate, memory size, and network bandwidth weights (corresponding to the first weighted value) of the current i-th server.

[0091] in,

[0092] In some embodiments, performance indicator information of the server is acquired in real time and the current load capacity of the server is determined based on the performance indicator information.

[0093] In some embodiments, the remaining load ratio may be a ratio of a difference between the inherent load capacity of the server and the current load capacity to the inherent load capacity.

[0094] For example, the difference between the inherent load capacity of the i-th server and the current load capacity is called the residual load capacity of the server, that is:

[0095]

[0096] The ratio of the remaining load capacity of the i-th server to the inherent load capacity is called the remaining load rate of the server, that is:

[0097]

[0098] When the ideal state is reached, the remaining load rate of each server should be equal, which should satisfy:

[0099]

[0100] In some embodiments, the first weighted values ​​set for different servers are used to determine the probability, which is the probability of assigning the task of the microservice to the corresponding server. If the probability corresponding to the server is high, the server will be assigned the task of the microservice with a high probability; if the probability corresponding to the server is low, the server will be assigned the task of the microservice with a low probability; if the probability corresponding to the server is 0, the server will not be assigned the task of the microservice.

[0101] In some embodiments, performance indicator information of at least one server in a server cluster is obtained; wherein the performance indicator information includes performance parameters, and the server cluster is used to deploy microservices; the remaining load rate of the server is determined based on the inherent load capacity and current load capacity of the server; wherein the current load capacity is determined based on the performance indicator information; based on a comparison result of the remaining load rate and a threshold, an operation of a first weighted value set for the server is performed; wherein the first weighted values ​​set for different servers are used to determine a probability, and the probability is the probability of assigning a task of the microservice to the corresponding server; based on the first weighted value of at least one server in the server cluster, task scheduling of the microservice is performed.

[0102] In some embodiments, the threshold includes a first threshold and a second threshold; the first threshold is greater than the second threshold.

[0103] In some embodiments, performance indicator information of at least one server in a server cluster is obtained; the remaining load rate of the server is determined based on the inherent load capacity and current load capacity of the server; wherein the current load capacity is determined based on the performance indicator information; when the remaining load rate is greater than or equal to the first threshold, the first weighted value is kept unchanged; wherein the first weighted value set for different servers is used to determine a probability, and the probability is the probability of assigning a task of the microservice to the corresponding server; based on the first weighted value of at least one server in the server cluster, task scheduling of the microservice is performed.

[0104] In some embodiments, performance indicator information of at least one server in a server cluster is obtained; the remaining load rate of the server is determined based on the inherent load capacity and current load capacity of the server; wherein the current load capacity is determined based on the performance indicator information; when the remaining load rate is less than or equal to the first threshold, the first weighted value is updated based on the comparison result between the remaining load rate and the second threshold; wherein the first weighted values ​​set for different servers are used to determine a probability, and the probability is the probability of assigning a task of the microservice to the corresponding server; based on the first weighted value of at least one server in the server cluster, task scheduling of the microservice is performed.

[0105] In some embodiments, performance indicator information of at least one server in a server cluster is obtained; the remaining load rate of the server is determined based on the inherent load capacity and current load capacity of the server; wherein the current load capacity is determined based on the performance indicator information; it is determined that the remaining load rate is greater than or equal to the second threshold, and the first weighted value is reduced; wherein the first weighted value set for different servers is used to determine a probability, and the probability is the probability of assigning a task of the microservice to the corresponding server; based on the first weighted value of at least one server in the server cluster, task scheduling of the microservice is performed.

[0106] In some embodiments, performance indicator information of at least one server in a server cluster is obtained; the remaining load rate of the server is determined based on the inherent load capacity and current load capacity of the server; wherein the current load capacity is determined based on the performance indicator information; it is determined that the remaining load rate is less than or equal to the second threshold, and the first weighted value is set to a first value; wherein the first weighted value set for different servers is used to determine a probability, and the probability is the probability of assigning a task of the microservice to the corresponding server; based on the first weighted value of at least one server in the server cluster, task scheduling of the microservice is performed.

[0107] In some embodiments, performance indicator information of at least one server in a server cluster is obtained; wherein the performance indicator information includes performance parameters, and the server cluster is used to deploy microservices; the remaining load rate of the server is determined based on the inherent load capacity and current load capacity of the server; wherein the current load capacity is determined based on the performance indicator information; based on a comparison result of the remaining load rate and a threshold, an operation of a first weighted value set for the server is performed; wherein the first weighted values ​​set for different servers are used to determine a probability, and the probability is the probability of assigning a task of the microservice to the corresponding server; based on the first weighted value of at least one server in the server cluster, task scheduling of the microservice is performed.

[0108] Exemplarily, assume that the initial performance weighted value (corresponding to the first weighted value) of the i-th server is W i , then W i The dynamic adjustment formula is:

[0109]

[0110] Among them, R h and R l The high and low thresholds are set for the remaining load rate respectively. When the server remaining load rate is greater than the high threshold, the server is in a low load state, and the server weight value remains unchanged at this time; when the server remaining load rate is between the low threshold and the high threshold, the server is in a medium load state, and the server weight value will be dynamically adjusted to reduce the probability of the server receiving a task; when the server remaining load rate is less than the low threshold, the server is in a high load state, and the server weight value is set to 0, and no tasks are assigned to the server.

[0111] In some embodiments, performance indicator information of at least one server in a server cluster is obtained; wherein the performance indicator information includes performance parameters, and the server cluster is used to deploy microservices; the remaining load rate of the server is determined based on the inherent load capacity and current load capacity of the server; wherein the current load capacity is determined based on the performance indicator information; based on the comparison result of the remaining load rate and a threshold, an operation of a first weighted value set for the server is performed; wherein the first weighted values ​​set for different servers are used to determine a probability, and the probability is the probability of assigning a task of the microservice to the corresponding server; based on the first weighted value of at least one server in the server cluster, the task scheduling of the microservice is performed. Based on the first occupancy rate and the second occupancy rate, the second weighted value of the performance parameter of the first server in the server cluster is adjusted; wherein the first occupancy rate is the occupancy rate of the resource corresponding to the performance parameter of the first server, the second occupancy rate is the occupancy rate of the resource corresponding to the performance parameter of the second server in the server cluster, and the second weighted value is used to indicate the degree of influence of the performance parameter on the first server.

[0112] In some embodiments, performance indicator information of at least one server in a server cluster is obtained; wherein the performance indicator information includes performance parameters, and the server cluster is used to deploy microservices; the remaining load rate of the server is determined based on the inherent load capacity and current load capacity of the server; wherein the current load capacity is determined based on the performance indicator information; based on the comparison result of the remaining load rate and a threshold, an operation of a first weighted value set for the server is performed; wherein the first weighted values ​​set for different servers are used to determine a probability, and the probability is the probability of assigning a task of the microservice to the corresponding server; based on the first weighted value of at least one server in the server cluster, task scheduling of the microservice is performed; based on the first occupancy rate and the average value of the second occupancy rates of all servers in the server cluster, a second weighted value of the performance parameter of the first server in the server cluster is adjusted; wherein the first occupancy rate is the occupancy rate of the resource corresponding to the performance parameter of the first server, the second occupancy rate is the occupancy rate of the resource corresponding to the performance parameter of the second server in the server cluster, and the second weighted value is used to indicate the degree of influence of the performance parameter on the first server.

[0113] Exemplarily, by comparing the current occupancy rate of the resource corresponding to the performance parameter indicated by each performance indicator information of a single server (corresponding to the first occupancy rate) and the current occupancy rate of the resource corresponding to the performance parameter indicated by each performance indicator information in the entire server cluster (corresponding to the second occupancy rate), the weight of each performance indicator of a single server (corresponding to the second weighted value) is adjusted. First, the average occupancy rate (corresponding to the second occupancy rate) of the resource corresponding to the performance parameter indicated by each performance indicator information of the servers in the current cluster is calculated:

[0114]

[0115] when When , it means that the performance indicator has a greater impact on the server, and the weight value of the corresponding indicator should be increased. Otherwise, it means that the performance indicator has a smaller impact on the server, and the weight value of the corresponding indicator should be reduced.

[0116] Then the new weights of the four indicators (corresponding to performance parameters) of the i-th server are:

[0117]

[0118] Then the new weights of each load performance index (corresponding performance parameter) are:

[0119]

[0120] In some embodiments, performance indicator information of at least one server in a server cluster is obtained; wherein the performance indicator information includes performance parameters, and the server cluster is used to deploy microservices; the remaining load rate of the server is determined based on the inherent load capacity and current load capacity of the server; wherein the current load capacity is determined based on the performance indicator information; based on the comparison result of the remaining load rate and a threshold, an operation of a first weighted value set for the server is performed; wherein the first weighted values ​​set for different servers are used to determine a probability, and the probability is the probability of assigning a task of the microservice to the corresponding server; based on the first weighted value of at least one server in the server cluster, task scheduling is performed through the microservice component Feign; wherein the control layer interface of the microservice architecture associates the routing configuration information of Feign and the routing of the control layer.

[0121] In some embodiments, when deploying a microservice example, the microservice architecture distributes multiple task requests to different servers for processing based on a first weighted value through a Feign component. The control layer design interface of each module (or calling function) can be used to associate the routing configuration information of Feign with the control layer routing. When the microservice schedules the task, the control layer design interface of each module is associated with the routing configuration information of Feign, and the routing dynamically schedules the multi-resource service by obtaining the control method of the called control layer.

[0122] In this way, the microservice framework is used to implement request processing, and optimization is made for the low efficiency and high error rate of centralized processing of multiple tasks. Task scheduling is implemented through the Feign component, which optimizes the conflict problem of multi-resource linkage calls that services depend on, and improves business processing efficiency.

[0123] To better understand the embodiments of the present invention, please refer to Figure 2 , the embodiment of the present application provides a task scheduling method, including:

[0124] Step S201, the server runs.

[0125] Step S202: Update various performance indicators (corresponding performance indicator information) of the server periodically.

[0126] Step S203, calculating the remaining load rate of the server.

[0127] Step S204, calculate whether the remaining load rate is greater than a set high threshold (corresponding to the first threshold). If not, execute step S205, if yes, execute step S208.

[0128] Step S205 , calculating whether the remaining load rate is greater than a set lower threshold (corresponding to the second threshold), if not, executing step S206 , if yes, executing step 207 .

[0129] Step S206, the server weight value is set to 0, and step S209 is executed.

[0130] Step S207, update the server weight value, and execute step S209.

[0131] Step S208: the server weight value remains unchanged, and step S209 is executed.

[0132] Step S209: The microservice allocates tasks according to the server weight values.

[0133] To better understand the embodiments of the present invention, please refer to Figure 3 , the embodiment of the present application provides a task scheduling method, including:

[0134] Step S301, select a server cluster for deploying microservices, determine various indicator information of the server including CPU frequency, disk I / O rate, memory size, and network bandwidth; and determine the remaining load rate of the server in an ideal state based on the basic information of the server.

[0135] In some embodiments, the remaining load rate is calculated as follows:

[0136] Determine the server cluster an={a1,a2,…,an}. According to the calculation formula, the inherent load capacity of the i-th server is:

[0137]

[0138] The current load capacity of the i-th server is:

[0139]

[0140] The difference between the inherent load capacity and the current load capacity of the i-th server is called the residual load capacity of the server, that is:

[0141]

[0142] The ratio of the remaining load capacity of the i-th server to the inherent load capacity is called the remaining load rate of the server, that is:

[0143]

[0144] Step S302, monitor various performance indicators of each server, calculate new weights of various indicator information of the current server to update the remaining load rate, judge the server working status according to the remaining load rate, and appropriately update the weighted value of the server.

[0145] In some embodiments, the update process is as follows:

[0146] According to the formula, the average occupancy rate of each performance indicator of the server in the current cluster is calculated as:

[0147]

[0148] when When , it means that the performance indicator has a greater impact on the server, and the weight value of the corresponding indicator should be increased. Otherwise, it means that the performance indicator has a smaller impact on the server, and the weight value of the corresponding indicator should be reduced. According to the average occupancy rate, the new weights of the four indicators of the i-th server are:

[0149]

[0150] The new weights of each load performance indicator are:

[0151]

[0152] Update the remaining load rate based on the new weight currently calculated by the server, and adjust the remaining load rate based on the high and low thresholds R h , R l , determine the server status and modify the server weight value W i .

[0153] The initial performance weighted value W of the i-th server i The dynamic adjustment formula is:

[0154]

[0155] Step S303, design the microservice architecture, implement low coupling in interface structure according to functional constraints, deploy microservice instances, implement task scheduling through microservices, associate routing configuration information through Feign components, dynamically schedule multi-resource services, and determine the optimal task scheduling solution based on the task workflow and server configuration information.

[0156] In some embodiments, the microservice scheduling process is as follows:

[0157] When the front end initiates a request, the server data source is collected through the deployed microservice, the data is processed according to the load balancing algorithm, and the microservice is called to allocate tasks according to the server weight value.

[0158] According to the formula, the probability of forwarding a request to the i-th server is:

[0159]

[0160] A random number between 0 and 1 is generated by the microservice, and the forwarding of the request is determined by calculating the position of the random number in the server probability interval. The corresponding interface is exposed by the service registration and discovery of the microservice, and remote calls are implemented through the feign component. Multiple requests are received and routed to the corresponding server for processing.

[0161] In an embodiment of the present application, performance indicator information of at least one server in a server cluster is obtained; wherein the performance indicator information includes performance parameters, and the server cluster is used to deploy microservices, so that the performance indicator information of the server used to deploy microservices can be obtained. The remaining load rate of the server is determined based on the inherent load capacity and current load capacity of the server; wherein the current load capacity is determined based on the performance indicator information. In this way, the current remaining load rate of the server can be accurately determined based on the acquired performance indicator information. Based on the comparison result of the remaining load rate and the threshold, an operation of the first weighted value set for the server is performed; wherein the first weighted value set for different servers is used to determine a probability, and the probability is the probability of assigning the task of the microservice to the corresponding server; in this way, the processing of the first weighted value can be performed based on the comparison result of the remaining load rate and the threshold, so that the probability of assigning the task of the microservice to the corresponding server can be adjusted, so that the task scheduling of the microservice based on the first weighted value can be adapted to the overall operation of at least one server in the server cluster, and resources can be efficiently utilized, resource waste can be reduced, and the deployment of microservices can be reliably realized.

[0162] like Figure 4 As shown, an embodiment of the present application provides a task scheduling device, wherein the image recognition device comprises:

[0163] The acquisition module 41 is configured to acquire performance indicator information of at least one server in a server cluster; wherein the performance indicator information includes performance parameters, and the server cluster is used to deploy microservices;

[0164] A determination module 42 is configured to determine a remaining load rate of the server based on an inherent load capacity and a current load capacity of the server; wherein the current load capacity is determined based on the performance indicator information;

[0165] The execution module 43 is configured to: based on the comparison result of the remaining load rate and the threshold, perform the operation of the first weighted value set for the server; wherein the first weighted value set for different servers is used to determine the probability, and the probability is the probability of assigning the task of the microservice to the corresponding server; based on the first weighted value of at least one server in the server cluster, perform task scheduling of the microservice.

[0166] An embodiment of the present application provides a processing device, and the processing device includes: implementing any method described in the embodiments of the present disclosure.

[0167] The present application provides a processing device, the processing device comprising:

[0168] A memory for storing executable programs;

[0169] The processor is used to implement any method described in the embodiments of the present disclosure when executing the executable program stored in the memory.

[0170] It can be understood that the memory can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM, SyncLink Dynamic Random Access Memory), and direct RAM bus random access memory (DRRAM, Direct Rambus Random Access Memory).The memories described in the embodiments of the present application are intended to include, but are not limited to, these and any other suitable types of memories.

[0171] Among them, the method for determining the topological structure disclosed in the embodiment of the present application can be applied to the processor or implemented by the processor. The processor can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the method for determining the topological structure can be completed by the hardware integrated logic circuit or software instructions in the processor. The above-mentioned processor can be a general-purpose processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor can implement or execute the methods, steps and logic block diagrams disclosed in the present invention. The general-purpose processor can be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the present invention, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, which is located in a memory, and the processor reads the information in the memory, and completes the steps of the method for determining the topological structure provided in the embodiment of the present application in combination with its hardware.

[0172] The embodiment of the present application also provides a computer storage medium, which stores an executable program. When the executable program is executed by a processor, the method of image recognition as described in any of the embodiments of the present disclosure is implemented. Specifically, it can be a computer-readable storage medium, such as a memory that stores a computer program, and the above-mentioned computer program can be executed by a processor of a processing device to complete the steps described in the method of the embodiment of the present application. The computer-readable storage medium can be a memory such as ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface memory, optical disk, or CD-ROM.

[0173] The embodiment of the present application provides a computer program product, which includes: a computer program or executable instructions, which are stored in a computer-readable storage medium. The processor of the computer device reads the computer program or executable instructions from the computer-readable storage medium, and the processor executes the computer program or executable instructions, so that the computer device performs any one of the above-mentioned image recognition methods of the embodiment of the present disclosure.

[0174] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A task scheduling method, characterized in that: The method comprises: Obtaining performance indicator information of at least one server in a server cluster; wherein the performance indicator information includes performance parameters, and the server cluster is used to deploy microservices; Determining the remaining load rate of the server based on the inherent load capacity and the current load capacity of the server; wherein the current load capacity is determined based on the performance indicator information; Based on the comparison result of the remaining load rate and the threshold, performing an operation of the first weighted value set for the server; wherein the first weighted value set for different servers is used to determine a probability, and the probability is the probability of allocating the task of the microservice to the corresponding server; Based on the first weighted value of at least one server in the server cluster, task scheduling of the microservice is performed.

2. The method according to claim 1, characterized in that The performance parameters include at least one of the following: CPU frequency; Disk input and output I / O rate; Memory size; Network bandwidth.

3. The method according to claim 1 or 2, characterized in that: The threshold includes a first threshold and a second threshold; the first threshold is greater than the second threshold; the operation of performing the first weighted value set for the server based on the comparison result of the remaining load rate and the threshold includes one of the following: When the remaining load rate is greater than or equal to the first threshold, keeping the first weighted value unchanged; When the remaining load ratio is less than or equal to the first threshold, the first weighted value is updated based on a comparison result between the remaining load ratio and the second threshold.

4. The method according to claim 3, characterized in that The updating of the first weighted value based on the comparison result between the remaining load rate and the second threshold value includes one of the following: determining that the remaining load rate is greater than or equal to the second threshold, and reducing the first weighted value; It is determined that the remaining load ratio is less than or equal to the second threshold, and the first weighted value is set to a first value.

5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: Adjusting a second weighted value of a performance parameter of a first server in the server cluster based on the first occupancy rate and the second occupancy rate; The first occupancy rate is the occupancy rate of resources corresponding to the performance parameters of the first server, the second occupancy rate is the occupancy rate of resources corresponding to the performance parameters of the second server in the server cluster, and the second weighted value is used to indicate the degree of influence of the performance parameters on the first server.

6. The method according to claim 5, characterized in that The adjusting the second weighted value of the performance parameter of the first server in the server cluster based on the first occupancy rate and the second occupancy rate includes: Based on the first occupancy rate and an average value of the second occupancy rates of all servers in the server cluster, a second weighted value of a performance parameter of a first server in the server cluster is adjusted.

7. The method according to any one of claims 1 to 6, characterized in that The performing task scheduling of the microservice based on the first weighted value of at least one server in the server cluster includes: Based on the first weighted value of at least one server in the server cluster, the task is scheduled by the microservice component Feign; wherein the control layer interface of the microservice architecture associates the routing configuration information of the Feign with the routing of the control layer.

8. A task scheduling device, characterized in that: The device comprises: An acquisition module is configured to acquire performance indicator information of at least one server in a server cluster; wherein the performance indicator information includes performance parameters, and the server cluster is used to deploy microservices; a determination module configured to determine the remaining load rate of the server based on the inherent load capacity and the current load capacity of the server; wherein the current load capacity is determined based on the performance indicator information; The execution module is configured to: based on the comparison result of the remaining load rate and the threshold, perform the operation of the first weighted value set for the server; wherein the first weighted values ​​set for different servers are used to determine the probability, and the probability is the probability of assigning the task of the microservice to the corresponding server; based on the first weighted value of at least one server in the server cluster, perform task scheduling of the microservice.

9. A computer storage medium, characterized in that The computer storage medium stores an executable program, and when the executable program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

10. A computer program product, comprising a computer program or instructions, characterized in that: When the computer program or instruction is executed by a processor, the method according to any one of claims 1 to 7 is implemented.