WO2019192263A1 - 一种任务的分配方法、装置及设备 - Google Patents

一种任务的分配方法、装置及设备 Download PDF

Info

Publication number
WO2019192263A1
WO2019192263A1 PCT/CN2019/073963 CN2019073963W WO2019192263A1 WO 2019192263 A1 WO2019192263 A1 WO 2019192263A1 CN 2019073963 W CN2019073963 W CN 2019073963W WO 2019192263 A1 WO2019192263 A1 WO 2019192263A1
Authority
WO
WIPO (PCT)
Prior art keywords
task
weight
processing
execution server
task execution
Prior art date
Application number
PCT/CN2019/073963
Other languages
English (en)
French (fr)
Inventor
于翔
Original Assignee
阿里巴巴集团控股有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Publication of WO2019192263A1 publication Critical patent/WO2019192263A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system

Definitions

  • the present specification relates to the field of computer technology, and in particular, to a method, device and device for allocating tasks.
  • Task scheduling is an application technology commonly used in software design of computer server. Task scheduling can allocate large data tasks to different task execution servers, which can complete the business process and protect system resources relatively smoothly. In the scheduling process, how to effectively balance the task processing between each task execution server, to avoid excessive execution of some task execution server resources, and some task execution servers have been idle state is a problem to be solved.
  • the task list that needs to be processed in the current scheduling period may be queried, and the task list records related information of the task to be processed. Then, the queried task list is split into a plurality of small task lists, and randomly sent to each task execution server by means of a service request.
  • the task processing amount cannot be well balanced between the respective task execution servers, so that the task execution server that is already near full load may continue to receive new tasks while some are idle.
  • the task execution server of the state has not received the tasks that need to be processed, which makes the task processing inefficient.
  • the purpose of the embodiments of the present specification is to provide a method, an apparatus, and a device for allocating tasks, so as to solve the problem that the task processing efficiency is low by randomly assigning tasks in the prior art.
  • a method for allocating tasks according to an embodiment of the present disclosure includes:
  • the determining, according to the task execution log, determining a task processing weight for assigning a task to the task execution server includes:
  • the task processing statistics information includes at least one or more of the following: an upper limit of the task timeout period, The number of successful task processing or business type failures per unit time, the number of tasks completed in time per unit time, the total number of tasks processed per unit time, and the number of task failures caused by system anomalies per unit time;
  • the task processing weight includes an overload weight of the task execution server
  • a task processing weight for assigning a task to the task execution server including:
  • the overload weight of the task execution server is determined according to the number of task processing success or service type failure in the unit time, and the total number of tasks processed in the unit time.
  • the task processing weight includes a task assignment weight of the task execution server
  • a task processing weight for assigning a task to the task execution server including:
  • the task assignment weight of the task execution server is determined according to the total number of tasks processed in the unit time.
  • the task assignment weight is inversely related to the total number of tasks processed in the unit time.
  • the task processing weight includes a task processing speed weight of the task execution server
  • a task processing weight for assigning a task to the task execution server including:
  • the task processing speed weight of the task execution server is determined according to an upper limit of the task timeout period and an average duration of task processing in a recent predetermined number of times.
  • the task processing weight includes a historical processing performance weight of the task execution server
  • a task processing weight for assigning a task to the task execution server including:
  • the historical processing performance weight of the task execution server is determined according to an upper limit of the task timeout period and an average duration of task processing in a recent predetermined number of times.
  • the historical processing performance weight includes a historical processing time sub-weight and a historical processing jitter sub-weight.
  • Determining the historical processing performance weight of the task execution server according to the upper limit of the task timeout period and the average duration of the task processing in the recent predetermined number of times including:
  • the historical processing performance weight is determined according to the historical processing time length sub-weight and the historical processing dither sub-weight.
  • the task processing weights include overload weights, task assignment weights, task processing speed weights, and historical processing performance weights.
  • the determining a task processing weight for assigning a task to the task execution server includes:
  • W is the task processing weight
  • W 1 is the overload weight
  • W 2 is the task assignment weight
  • W 3 is the task processing speed weight
  • W 4 is the history.
  • a method for allocating tasks according to an embodiment of the present disclosure includes:
  • the task scheduling request is used to request to allocate a task for the task execution server;
  • the method further includes:
  • the task execution server is notified to perform a task assigned to the task execution server.
  • the obtaining a task processing weight for assigning a task to the task execution server includes:
  • the task processing weights used to assign tasks to the task execution server are obtained from the load monitoring server.
  • a method for allocating tasks according to an embodiment of the present disclosure includes:
  • the method further includes:
  • the task execution server is notified to perform a task assigned to the task execution server.
  • the determining, according to the task execution log, determining a task processing weight for assigning a task to the task execution server includes:
  • the task processing statistics information includes at least one or more of the following: an upper limit of the task timeout period, The number of successful task processing or business type failures per unit time, the number of tasks completed in time per unit time, the total number of tasks processed per unit time, and the number of task failures caused by system anomalies per unit time;
  • a task allocation device provided by an embodiment of the present specification, the device includes:
  • a log obtaining module configured to acquire a task execution log of the task execution server
  • a weight determining module configured to determine, according to the task execution log, a task processing weight for assigning a task to the task execution server;
  • a weight sending module configured to send a task processing weight of the task execution server to the task distribution server, so that the task distribution server allocates a task scheduling server according to the task processing weight to the task execution server when receiving the task scheduling request task.
  • the weight determining module includes:
  • a statistical unit configured to determine task processing statistics information of the task execution server according to relevant parameter data in the task execution log in the task execution log, where the task processing statistical information includes at least one or more of the following: a task The upper limit of the timeout period, the number of successful tasks or service failures per unit time, the number of timeout tasks completed per unit time, the total number of tasks processed per unit time, and the number of task failures caused by system anomalies per unit time;
  • the weight determining unit is configured to determine, according to the task processing statistical information of the task execution server, a task processing weight for assigning a task to the task execution server.
  • the task processing weight includes an overload weight of the task execution server
  • the weight determining unit is configured to process, according to the number of task processing success or service type failure in the unit time, and the unit time processing The total number of tasks that determine the overload weight of the task execution server.
  • the task processing weight includes a task allocation weight of the task execution server, and the weight determining unit is configured to determine a task allocation weight of the task execution server according to the total number of tasks processed in the unit time.
  • the task assignment weight is inversely related to the total number of tasks processed in the unit time.
  • the task processing weight includes a task processing speed weight of the task execution server, and the weight determining unit is configured to determine, according to an upper limit of the task timeout period, and an average duration of task processing in a recent predetermined number of times.
  • the task execution server's task processing speed weight is configured to determine, according to an upper limit of the task timeout period, and an average duration of task processing in a recent predetermined number of times.
  • the task processing weight includes a history processing performance weight of the task execution server, and the weight determining unit is configured to determine, according to an upper limit of the task timeout period and an average duration of task processing in a recent predetermined number of times.
  • the historical processing performance weight of the task execution server is configured to determine, according to an upper limit of the task timeout period and an average duration of task processing in a recent predetermined number of times.
  • the historical processing performance weight includes a historical processing time sub-weight and a historical processing dither sub-weight
  • the weight determining unit is configured to respectively determine an average duration of the task processing according to the upper limit of the task timeout period and the recent predetermined number of times. Determining a history processing time sub-weight of the task execution server and the history processing dither sub-weight; determining the historical processing performance weight according to the historical processing time sub-weight and the historical processing dither sub-weight.
  • the task processing weight includes an overload weight, a task assignment weight, a task processing speed weight, and a history processing performance weight
  • the weight determining module is configured to allocate weights according to the overload weight, the task, and the task. Processing speed weights and historical processing performance weights, using formulas
  • W is the task processing weight
  • W 1 is the overload weight
  • W 2 is the task assignment weight
  • W 3 is the task processing speed weight
  • W 4 is the history.
  • a task allocation device provided by an embodiment of the present specification, the device includes:
  • a request receiving module configured to receive a task scheduling request, where the task scheduling request is used to request to allocate a task for the task execution server;
  • a weight acquisition module configured to acquire a task processing weight for assigning a task to the task execution server
  • the task assignment module is configured to allocate a task for the task execution server from the target task corresponding to the task scheduling request according to the task processing weight.
  • the device further includes:
  • the notification module is configured to notify the task execution server to perform a task assigned to the task execution server in a point-to-point manner.
  • the weight obtaining module is configured to acquire, from the load monitoring server, a task processing weight for assigning a task to the task execution server.
  • a task allocation device provided by an embodiment of the present specification, the device includes:
  • a log obtaining module configured to acquire a task execution log of the task execution server, where the task execution log includes relevant parameter data in the process of executing the task;
  • a weight determining module configured to determine, according to the task execution log, a task processing weight for assigning a task to the task execution server;
  • the task assignment module is configured to allocate a task to the task execution server from the target task corresponding to the task scheduling request according to the task processing weight when receiving the task scheduling request.
  • the device further includes:
  • the notification module is configured to notify the task execution server to perform a task assigned to the task execution server in a point-to-point manner.
  • the weight determining module includes:
  • a statistical unit configured to determine task processing statistics information of the task execution server according to relevant parameter data in the task execution log in the task execution log, where the task processing statistical information includes at least one or more of the following: a task The upper limit of the timeout period, the number of successful tasks or service failures per unit time, the number of timeout tasks completed per unit time, the total number of tasks processed per unit time, and the number of task failures caused by system anomalies per unit time;
  • the weight determining unit is configured to determine, according to the task processing statistical information of the task execution server, a task processing weight for assigning a task to the task execution server.
  • the task distribution device includes:
  • a memory arranged to store computer executable instructions that, when executed, cause the processor to:
  • the task distribution device includes:
  • a memory arranged to store computer executable instructions that, when executed, cause the processor to:
  • the task scheduling request is used to request to allocate a task for the task execution server;
  • the task distribution device includes:
  • a memory arranged to store computer executable instructions that, when executed, cause the processor to:
  • the task execution log of the task execution server is obtained by the task execution log of the task execution server, and the task processing weight for assigning the task to the task execution server is determined, and then the task execution server task processing can be performed.
  • the weight is sent to the task distribution server, so that when the task assignment server receives the task scheduling request, the task execution server allocates the task according to the task processing weight, so that the task execution log of the task execution server can be collected to determine the task of the task execution server.
  • the processing weights when the next task scheduling request arrives, can assign tasks to the respective task execution servers according to the above task processing weights, thereby forming a complete closed loop of the three processes of "scheduling allocation", "task execution", and "load control". Therefore, the number of task processing between each task execution server can be well balanced, and the "overload” or "starvation” phenomenon of the task execution server can be avoided, and the task processing of the current task execution server can be dynamically performed. Line regulation, to solve the stochastic scheduling regular tasks of the state.
  • FIG. 2 is a schematic structural view of a task distribution system of the present specification
  • FIG. 3 is an embodiment of a method for allocating another task of the present specification
  • FIG. 4 is a schematic diagram of another method for allocating tasks according to the present specification.
  • FIG. 5 is a schematic diagram of another method for allocating tasks according to the present specification.
  • Figure 6 is a schematic structural view of a distribution system of another task of the present specification.
  • FIG. 7 is still another embodiment of a method for allocating tasks according to the present specification.
  • Figure 8 is an embodiment of a task distribution device of the present specification
  • Figure 9 is an embodiment of a task distribution device of the present specification.
  • Figure 10 is an embodiment of a task distribution device of the present specification
  • Figure 12 is an embodiment of a task assignment device of the present specification.
  • the embodiments of the present specification provide a method, an apparatus, and a device for allocating tasks.
  • an embodiment of the present disclosure provides a method for allocating tasks.
  • the execution body of the method may be a load monitoring server, where the load monitoring server may be a separate server or may be composed of multiple servers.
  • the server cluster, and the load monitoring server can be used to monitor the task processing status of the task execution server.
  • the method can be used to monitor the task execution task of the task execution server, and calculate the weight of the task assignment by each task execution server when the task is assigned next time.
  • the method may specifically include the following steps:
  • step S102 a task execution log of the task execution server is acquired.
  • the task execution server may be a server that performs a specific task or tasks in a certain service, and may include a task execution server and a task distribution server in the business system, where the task assignment server may be used to allocate a server for the task.
  • the task execution server may be a specific executor of the task, and the task execution server may be a stand-alone server or a server in a server cluster composed of multiple servers.
  • the task execution log may include related parameter data in the process of executing the task, where the related parameter data may include one type or multiple types, for example, the start time of the task execution, the time consumed by the task execution, and the result of the task execution.
  • the related parameter data in the process of performing the task may not be limited to include the above-mentioned parameter data, and may also include other parameter data, which may be selected according to actual conditions, which is not limited in the embodiment of the present specification.
  • the timing scheduling of the asynchronous task is an application technology commonly used in the software design of the computer server.
  • the scheduled scheduling of the asynchronous task can be performed by querying and executing a fixed number of tasks each time, and scheduling execution repeatedly, so that The task of large data volume is performed in batches, and only a part of tasks are executed in each scheduling period, thereby completing the business processing process relatively smoothly and protecting system resources.
  • the scheduling process how can the task processing amount between each task execution server be effectively balanced, and some task execution server resources are excessively consumed, and some task execution servers are always in an idle state, which is required in the asynchronous task scheduling process. solved problem.
  • the problem can be solved by disassembling the task, and specifically, querying the task list of the task to be processed in the current scheduling period, where the task list needs to be processed. Information about the task, such as the number of tasks the task contains and the identity of the task. Then, the queried task list can be split into a plurality of small task lists, and randomly sent to each task execution server by means of a service request.
  • the above processing manner can realize distributed scheduling of tasks, that is, splitting the tasks separately, so that each task execution server executes some of the tasks, and can avoid the bottleneck of the single task execution server performing tasks, but the above processing methods are in each Task processing is not well balanced between task execution servers. As a result, it is possible that the task execution server that is already running at full capacity is still receiving new tasks, and some idle task servers have not received them.
  • the task that needs to be processed that is, there is no effective feedback path between the task performer (task execution server) and the task assigner (task assignment server), and the task assignment server cannot dynamically update the task allocation amount according to the performer's situation. Adjustments can only be made randomly.
  • the embodiment of the present specification provides a mechanism and an algorithm for dynamically adjusting tasks, so as to effectively solve the above problems, and specifically includes the following contents:
  • the service system or the distributed scheduling system in the embodiment of the present disclosure may include three parts, which may be: a task execution server, a task distribution server, and a load monitoring server.
  • the task execution server and the task assignment server may refer to the foregoing related content.
  • the load monitoring server may be configured to acquire and calculate task assignment weights of the respective task execution servers, so that the task assignment server allocates corresponding tasks to the task execution server.
  • the service can trigger a series of complex tasks.
  • the terminal device that is used by the user can generate a task scheduling request based on the task to be processed, and the task scheduling request can be sent to the task scheduling request.
  • Task assignment server may be configured to acquire and calculate task assignment weights of the respective task execution servers, so that the task assignment server allocates corresponding tasks to the task execution server.
  • the task may be assigned to the task execution server.
  • the task execution server executes the task
  • the related parameter data in the process of executing the task may be recorded, and the related parameter data may be Recorded in the logs of each task execution server.
  • the log execution command may be sent to each task execution server, and the task execution server may obtain the log report instruction, and may obtain the task during the execution process.
  • the related parameter data generates a task execution log, which can be sent to the load monitoring server, and the load monitoring server can receive the task execution log sent by each task execution server.
  • the task execution log is obtained by the load monitoring server to each task execution server, and the load monitoring server directly pulls the corresponding task execution log to each task execution server, or may execute the server by each task.
  • the task execution log is sent to the load monitoring server.
  • the embodiment of the present specification does not limit how to obtain the task execution log.
  • step S104 based on the task execution log, a task processing weight for assigning a task to the task execution server is determined.
  • the task processing weight may be used to implement the task allocation server to allocate tasks for each task execution server, and determine the task allocation amount of each task execution server, wherein the task allocation amount may be the number of assigned tasks or the assigned task. The amount of data, etc.
  • each of the obtained task execution logs may be separately analyzed, and multiple parameters may be extracted from the task execution log, and Specific parameter values corresponding to each parameter, for example, as shown in Table 1, the following parameters and corresponding parameter values may be included in the task execution log.
  • Session ID for a single batch of scheduling process 123
  • the start time of the task execution (beginTime) 10:03:45 Time spent on task execution (costTime) 100 milliseconds
  • the task execution server's IP address (executorIP) Xxx.xxx.xxx.xxx
  • the result of the task execution (executeResult) success Task execution result code (executeResultCode) 111
  • the task execution result code can be used to distinguish between system exceptions and business exceptions.
  • the related parameter data shown in Table 1 above may be further converted and calculated, and basic data for determining the task processing weight of the task execution server, for example, the task assignment of the task execution server, etc., specifically, Taking the basic data as the task assignment server's recent task assignment as an example, the weight of the task execution server's recent task assignment can be calculated.
  • the relevant parameter data in the task execution log collected by the load monitoring server is the task.
  • the execution server has executed the completed data with a certain delay, but can be used to approximate the task assignment of the current time. The more tasks the task is assigned to the current time, the lower the weight of the task assignment.
  • the weight of the task allocation situation may be determined based on the total number of tasks performed by the task execution server in the unit time. To this end, the total number of tasks processed by the task execution server in the unit time may be calculated based on the related parameter data in Table 1 above. After obtaining the total number of tasks processed by each task execution server in a unit time, the weight of the task assignment of each task execution server may be obtained, and the weight of the task assignment status of each task execution server may be used as the task of the corresponding task execution server. Handle weights.
  • task processing weight of the task execution server is not limited to the above one, and may be included in the actual application, and may be set according to actual conditions, which is not limited in the embodiment of the present specification.
  • step S106 the task processing weight of the task execution server is sent to the task assignment server, so that when the task assignment server receives the task scheduling request, the task assignment server assigns a task to the task execution server according to the task processing weight.
  • the load monitoring server may send the task processing weights of the respective task execution servers to the task assignments in order to perform the task assignment in the next task assignment server receiving the task scheduling request.
  • the server in this way, when the task assignment server receives the task scheduling request, it can assign a task to the task execution server according to the task processing weight.
  • an embodiment of the present disclosure provides a method for allocating tasks.
  • the execution entity of the method may be a task allocation server, where the task distribution server may be a separate server or may be composed of multiple servers. Server cluster, and the task assignment server can be used to assign tasks to the task execution server, and so on.
  • the method can be used in the process of assigning tasks to the task execution server according to the weight assigned by the task.
  • the method may specifically include the following steps:
  • step S302 a task scheduling request is received, the task scheduling request is used to request to assign a task to the task execution server.
  • the service server when the user determines that a certain service needs to be performed, the service server provides a corresponding service to the user, and a series of complicated tasks can be triggered by the user's operation or request. At this time, the terminal device that can be used by the user can be triggered.
  • the task scheduling request is generated based on the task to be processed, and the task scheduling request may be sent to the task distribution server.
  • step S304 task processing weights for assigning tasks to the task execution server are acquired.
  • the task distribution server In the implementation, in order to avoid the task execution server that is already running near full load is still receiving new tasks continuously, and some task execution servers in idle state have not received the tasks to be processed, the task distribution server The task processing weights of the respective task execution servers can be stored.
  • the task assignment server receives the task scheduling request through the processing of the foregoing step S302, the task execution server corresponding to the task scheduling request may be determined. After the determination, the task of the task execution server may be searched for from the task processing weight stored by itself. Handle weights.
  • step S306 a task is assigned to the task execution server from the target task corresponding to the task scheduling request according to the task processing weight.
  • the task assignment server may determine the amount of tasks that need to be allocated for the corresponding task execution server according to the task processing weight. Then, the target task corresponding to the task scheduling request may be divided into multiple parts, wherein the larger the value of the task processing weight, the more the assigned task quantity, so that the task allocation can be dynamically adjusted, and the task execution server
  • the overall closed loop is formed between the load monitoring server and the task distribution server to achieve the purpose of dynamically adjusting system resources.
  • the embodiment of the present specification provides a task assignment method, which is configured to obtain a task processing weight for assigning a task to a task execution server by acquiring a task execution log of the task execution server, and then, may send the task processing weight of the task execution server to the task. Allocating a server, so that when the task assignment server receives the task scheduling request, assigns a task to the task execution server according to the task processing weight, so that the task execution log of the task execution server can be collected by the task execution task, and the task processing weight of the task execution server is determined.
  • the task assignment task can be assigned to each task according to the above task processing weight, so that the three processing links of "scheduling assignment", "task execution”, and “load control” form a complete closed loop, so that It is good to balance the number of task processing between each task execution server, avoid the "overload” or “starvation” phenomenon of the task execution server, and can dynamically adjust the task processing of the current task execution server, and solve the problem.
  • Machine scheduling regular tasks of the state can be assigned to each task according to the above task processing weight, so that the three processing links of "scheduling assignment", "task execution”, and “load control” form a complete closed loop, so that It is good to balance the number of task processing between each task execution server, avoid the "overload” or “starvation” phenomenon of the task execution server, and can dynamically adjust the task processing of the current task execution server, and solve the problem.
  • Machine scheduling regular tasks of the state can be assigned to each task according to the above task processing weight, so that the three processing links of "scheduling assignment", "task
  • the embodiment of the present disclosure provides a method for allocating tasks, which may be jointly performed by a load monitoring server and a task distribution server, where the load monitoring server may be an independent server or multiple A server cluster consisting of servers, and the load monitoring server can be used to monitor the task processing status of the task execution server.
  • the task distribution server may be a separate server or a server cluster composed of a plurality of servers, and the task distribution server may be used to allocate tasks to the task execution server and the like.
  • the method can be used to monitor the task execution task of the task execution server, and calculate the weight of the task assignment by each task execution server when the task is assigned next time.
  • the method may specifically include the following steps:
  • step S402 the load monitoring server acquires a task execution log of the task execution server.
  • the content of the step S402 is the same as the content of the step S102 in the first embodiment.
  • step S404 the load monitoring server determines task processing statistics of the task execution server according to the task execution log.
  • the task processing statistics may include at least one of the following: an upper limit of the task timeout period, a number of successful task processing or business type failures per unit time, a number of timeout tasks completed per unit time, and processing in a unit time. The total number of tasks, the number of task failures due to system anomalies per unit time.
  • the related parameter data recorded in the task execution log of each task execution server may be statistically analyzed, and the task processing statistical information of the task execution server may be obtained.
  • the task processing statistics may be the basic data for determining the task processing weight of the task execution server.
  • the task processing statistics of the execution server can include the task processing statistics parameters and their corresponding statistics. For details, see Table 2 below.
  • Task processing statistical parameters Statistics Upper limit of task timeout 1 second The number of successful task processing or business type failures per unit time 20 The number of tasks completed in timeout per unit time 1 Total number of tasks processed per unit of time twenty one Number of failed tasks due to system anomalies per unit time 0
  • the upper limit of the task timeout period can be obtained by multiplying the average time consumption of the task multiple times by a preset fixed coefficient, or manually observing the task execution log to determine a fixed duration as the upper limit of the task timeout time. Wait.
  • the number of successful task processing or business type failures per unit time does not include the number of timeout completed tasks.
  • the number of task failures due to system anomalies per unit time may be the number of task failures due to the task execution server being unable to receive newly assigned tasks or other system-type exceptions.
  • step S406 the load monitoring server determines the task processing weight for assigning the task to the task execution server according to the task processing statistical information of the task execution server.
  • a calculation rule or a calculation principle of task processing weights may be set, and task processing weights may be selected or set based on a set calculation rule or a calculation principle of task processing weights.
  • An optional calculation rule or calculation principle for task processing weights is provided, which may specifically include the following four aspects:
  • the task execution server is guaranteed to be overloaded and the task can be processed normally.
  • the server is preferentially assigned tasks for tasks that currently have a small number of processing tasks.
  • the task execution server with a faster processing speed of the N tasks in the near future is assigned priority.
  • the task execution server with better performance in historical processing prioritizes tasks.
  • calculation rules or calculation principles of the above four aspects are reduced in priority from the first aspect to the fourth aspect, that is, when setting task processing weights, firstly, high-priority calculation rules or calculation principles can be obtained. Satisfy and then meet low-priority calculation rules or calculation principles.
  • the task processing weights may include multiple types, and different service systems may set different task processing weights.
  • four optional task processing weights are provided for detailed description, and the weights are processed for the following four tasks.
  • the other task processing weights can be referred to the following related content processing, and will not be described here.
  • the first type considers that the overload of the task execution server has the highest priority among the above calculation rules or calculation principles, that is, the overload condition of the task execution server, which has a great influence on the assignment of tasks. Therefore, the task processing weights may include The processing of the task execution server may be: determining the overload weight of the task execution server according to the number of successful task processing or service type failures per unit time and the total number of tasks processed per unit time.
  • the overload weight of the task execution server may be the number of successful task processing per unit time (including the number of successful task processing and business type failures) and the total number of tasks processed per unit time. The ratio is determined, and the higher the ratio is, the higher the success rate of the task execution server executing the task, and the less the task execution server is overloaded.
  • the overload weight can be determined by the following formula (1)
  • W 1 is the overload weight of the task execution server
  • m is the number of successful task processing per unit time
  • k is the total number of tasks processed per unit time
  • u is the number of task failures due to system anomalies per unit time
  • the task processing The weights may include the task assignment weights of the task execution server, and the processing of the step S406 may be: determining the task assignment weights of the task execution server according to the total number of tasks processed in the unit time, wherein the task assignment weights and unit time processing The total number of tasks is negatively correlated.
  • the negative correlation between the task assignment weight and the total number of tasks processed in the unit time may include multiple implementation manners, for example, the task assignment weight is inversely related to the total number of tasks processed in the unit time, and the like in this embodiment does not Make a limit.
  • the related parameter data in the task execution log collected by the load monitoring server is data that the task execution server has performed, and has a certain delay, but can be used to approximate the task allocation status of the current time, and the current time is
  • the task assignment weight can be determined by the following formula (2)
  • the task The processing weight may include the task processing speed weight of the task execution server, and the processing of the step S406 may be specifically: determining the task processing speed weight of the task execution server according to the upper limit of the task timeout period and the average duration of the task processing in the recent predetermined number of times. .
  • the predetermined number of times may be set according to the actual situation, such as the last 5 times or the last 10 times, etc., which is not limited in the embodiment of the present specification.
  • the average duration of the task processing in the recent predetermined number of times can be determined by the following formula (3)
  • n is the number of times
  • N is the maximum number of recent predetermined times
  • ⁇ t n is the single execution time of the nth task. The average length of time for the task of the recent N times.
  • the task processing speed weight of the task execution server is low, and the average duration of the task processing with the recent predetermined number of times Increase and monotonically decrease.
  • the task processing speed weight approaches 0, and when the recent N times of the task processing average duration is close to 0. At the same time, the task processing speed weight is close to 1, which satisfies the requirements of the calculation rule or the calculation principle of the above third aspect.
  • the purpose of introducing the natural base e in the above formula (4) is to normalize, and to make the change of the function corresponding to the weight of the task processing speed smoother.
  • the task processing weight may include the historical processing performance weight of the task execution server, and the processing of the above step S406 may specifically be: The upper limit of the task timeout period and the average duration of the task processing of the recent predetermined number of times determine the historical processing performance weight of the task execution server.
  • the historical processing performance can be divided into two parts, that is, the historical processing duration and the historical processing jitter.
  • the historical processing performance weights may include the historical processing time sub-weight and the historical processing jitter sub-weight, and the foregoing processing may specifically be: Determining the historical processing time sub-weight and the historical processing dither weight of the task execution server according to the upper limit of the task timeout period and the average duration of the task processing in the recent predetermined number of times; determining the history according to the historical processing time sub-weight and the historical processing jitter sub-weight Handle performance weights.
  • the calculation reference value is lower, and the historical reference data that is closer to the current time has a higher calculation reference value. Therefore, the historical data is also the historical processing performance from the current time. The factors that need to be considered in the calculation of weights.
  • the historical processing time weight can be recorded as H 1 , and the historical processing time weight can be determined by the following formula (5)
  • n the meaning of n means the nth most recent processing, and the larger the value of n, the more the historical data is from the current time. long. It can be obtained from the above formula (5) that the longer the historical data from the current time, the smaller the value of the weight of the longest sub-history in the history processing, and the tendency to decrease exponentially.
  • the historical processing jitter sub-weight can be recorded as H 2 , and the historical processing jitter sub-weight can be determined by the following formula (6)
  • the variance is used in the above formula (6) to estimate the historical processing jitter sub-weight, which is the same as the historical processing time sub-weight.
  • the longer the historical data from the current time the smaller the value of the historical processing jitter sub-weight.
  • the final historical processing performance weight W 4 can be obtained, and the calculation formula can be as follows (7)
  • the task processing weights of any of the above four task processing weights can be used as the task processing weights for assigning tasks to the task execution server.
  • the combination of two or more of the above four task processing weights may also be used as a task processing weight for assigning a task to the task execution server, wherein the task processing weight may include an overload.
  • the processing of determining the task processing weights for assigning tasks to the task execution server may be implemented in the following manner: according to the overload weight, Task assignment weight, task processing speed weight, and historical processing performance weight, using the following formula (8)
  • W is the task processing weights task execution server weights
  • W 2 is a task distribution rights task execution server weights
  • W. 3 is a task processing speed weighting task execution server weights
  • W. 4 for the task execution The historical processing performance weight of the server, a ⁇ (0,1), b ⁇ (0,1).
  • the impact weight of the server, the task allocation weight, the task processing speed weight, and the historical processing performance weight may be performed according to the foregoing task, and the corresponding coefficient is set for each weight, and at the same time, it is also required to ensure that under certain circumstances
  • the task execution server's overload weight, task assignment weight, task processing speed weight, and historical processing performance weight are the primary and secondary relationships between the four weights. Therefore, the task processing server's task processing weight should be the overload weight and the task assignment weight.
  • the task processing speed weight and the historical processing performance weight are functions of the variable, and the function should conform to the following principles:
  • the success rate of task processing per unit time is a priority principle, that is, for any two different IP address task execution servers, if the IP addresses of the two task execution servers are IP1 and IP2, the IP1 task execution server is overloaded.
  • Weight W 1 (IP1), the overload weight W 1 (IP2) of the task execution server of IP2, and W 1 (IP1)>W 1 (IP2), the task processing weight of the two task execution servers should satisfy W(IP1) >W(IP2).
  • the task allocation weight of the task execution server W 2 should be affected only by the overload weight W 1 of the task execution server. The greater the number of tasks currently being processed, the greater the workload of the task execution server.
  • the task processing speed weight W 3 of the task execution server should be comprehensively considered with the task assignment weight W 2 of the task execution server, and can be specifically adjusted by the proportional coefficient.
  • the historical processing performance weight of the task execution server is an auxiliary inspection factor, and has the lowest impact on the task processing server's task processing weight.
  • the task processing weight of the task execution server can be determined by formula (8).
  • the parameters of (a, b) in the formula can be selected according to different actual scenarios and business system conditions. Moreover, in the same scenario, the (a, b) vector can be applied to obtain the best value.
  • step S408 the load monitoring server transmits the task processing weight of the task execution server to the task distribution server.
  • the content of the step S408 is the same as the content of the step S106 in the first embodiment.
  • step S410 the task assignment server receives a task scheduling request for requesting to assign a task to the task execution server.
  • the content of the step S410 is the same as the content of the step S302 in the first embodiment.
  • step S412 the task assignment server acquires a task processing weight for assigning a task to the task execution server.
  • step S412 is implemented after the load monitoring server sends the task processing weight to the task distribution server.
  • the task distribution server may also actively acquire or pull the task execution server from the load monitoring server.
  • the task processing weight may specifically include the following: the task allocation server acquires a task processing weight for assigning a task to the task execution server from the load monitoring server.
  • step S414 the task assignment server assigns a task to the task execution server from the target task corresponding to the task scheduling request according to the task processing weight.
  • the content of the step S414 is the same as the content of the step S306 in the first embodiment.
  • step S416 the task assignment server notifies the task execution server to execute the task assigned to the task execution server in a point-to-point manner.
  • the target task corresponding to the task scheduling request may be divided according to the value of the task processing weight of each task execution server, and the corresponding number of the target tasks may be The task is divided into the corresponding task execution server.
  • the number of tasks assigned by the current task execution server (the sum of the task processing weight of the current task execution server / the task processing weight of each task execution server) * the total number of target tasks, for example
  • the task processing weight of the current task execution server is 0.3
  • the sum of the task processing weights of each task execution server is 5
  • the total number of target tasks is 50
  • the corresponding number of tasks after the division can be notified to the task execution server in a point-to-point manner, so that the task of assigning tasks to the task execution server can be realized by the asynchronous task scheduling manner, so that the The load monitoring server collects the task execution log of the task execution server, and performs calculation and analysis on the task execution log, and the obtained result is used as the task processing weight of the task execution server.
  • the task can be calculated according to the already calculated task.
  • the processing weights are assigned to each task execution server, so that the three processes of "scheduling assignment", "task execution", and "load control” are opened to form a complete closed loop, so that the task execution servers can be well balanced.
  • the number of tasks processed, avoiding the "overload” or "starvation” phenomenon of the task execution server can dynamically adjust the task processing of the current task execution server, and solve the drawbacks of the existing random scheduling timing task.
  • the embodiment of the present specification provides a task assignment method, which is configured to obtain a task processing weight for assigning a task to a task execution server by acquiring a task execution log of the task execution server, and then, may send the task processing weight of the task execution server to the task. Allocating a server, so that when the task assignment server receives the task scheduling request, assigns a task to the task execution server according to the task processing weight, so that the task execution log of the task execution server can be collected by the task execution task, and the task processing weight of the task execution server is determined.
  • the task assignment task can be assigned to each task according to the above task processing weight, so that the three processing links of "scheduling assignment", "task execution”, and “load control” form a complete closed loop, so that It is good to balance the number of task processing between each task execution server, avoid the "overload” or “starvation” phenomenon of the task execution server, and can dynamically adjust the task processing of the current task execution server, and solve the problem.
  • Machine scheduling regular tasks of the state can be assigned to each task according to the above task processing weight, so that the three processing links of "scheduling assignment", "task execution”, and “load control” form a complete closed loop, so that It is good to balance the number of task processing between each task execution server, avoid the "overload” or “starvation” phenomenon of the task execution server, and can dynamically adjust the task processing of the current task execution server, and solve the problem.
  • Machine scheduling regular tasks of the state can be assigned to each task according to the above task processing weight, so that the three processing links of "scheduling assignment", "task
  • the embodiment of the present disclosure provides a method for allocating tasks.
  • the execution entity of the method may be a task allocation server, where the task distribution server may be a separate server or may be composed of multiple servers.
  • the server cluster and, as shown in FIG. 6, the task distribution server can be used to allocate tasks and the like to the task execution server, and the task distribution server also integrates the functions of the load monitoring server in the first embodiment and the second embodiment.
  • the method can be used in the process of assigning tasks to the task execution server according to the weight assigned by the task.
  • the method may specifically include the following steps:
  • step S502 a task execution log of the task execution server is acquired.
  • the content of the step S502 is the same as that of the step S102 in the first embodiment.
  • step S504 based on the task execution log, a task processing weight for assigning a task to the task execution server is determined.
  • the content of the step S504 is the same as the content of the step S104 in the first embodiment.
  • step S506 when the task scheduling request is received, the task is assigned to the task execution server from the target task corresponding to the task scheduling request according to the task processing weight.
  • the embodiment of the present specification provides a task assignment method, which determines a task processing weight for assigning a task to a task execution server by acquiring a task execution log of the task execution server, and then, according to the task processing, when receiving the task scheduling request
  • the weight assigns a task to the task execution server, so that the task execution log of the task execution server can be determined by collecting the task execution log of the task execution server.
  • the server can be executed for each task according to the task processing weight.
  • Assigning tasks so that the three processing links of "scheduling assignment", “task execution”, and “load control” form a complete closed loop, so that the number of task processing between each task execution server can be well balanced, and the task execution server is avoided.
  • the phenomenon of "overload” or “starvation” can dynamically adjust the task processing of the current task execution server, and solve the drawbacks of the random scheduling timing task.
  • an embodiment of the present disclosure provides a method for allocating tasks.
  • the execution entity of the method may be a task allocation server, where the task distribution server may be a separate server or may be composed of multiple servers.
  • the server cluster and, as shown in FIG. 6, the task distribution server can be used to allocate tasks and the like to the task execution server, and the task distribution server also integrates the functions of the load monitoring server in the first embodiment and the second embodiment.
  • the method can be used in the process of assigning tasks to the task execution server according to the weight assigned by the task.
  • the method may specifically include the following steps:
  • step S702 a task execution log of the task execution server is acquired.
  • the task processing statistics information of the task execution server is determined according to the related parameter data in the task execution log in the task execution log, and the task processing statistics information includes at least one or more of the following: an upper limit of the task timeout period. The number of tasks processed successfully or business-type failures per unit time, the number of tasks completed within the unit time, the total number of tasks processed per unit time, and the number of task failures caused by system anomalies per unit time.
  • step S706 the task processing weights for assigning tasks to the task execution server are determined according to the task processing statistical information of the task execution server.
  • the task processing weight may include the overload weight of the task execution server, and the processing of the foregoing step S706 may be specifically implemented by: the number of task processing success or service type failure per unit time, and the total number of tasks processed per unit time. Determine the overload weight of the task execution server.
  • the task processing weight may include the task assignment weight of the task execution server, and the processing of the foregoing step S706 may be specifically implemented by: determining the task assignment weight of the task execution server according to the total number of tasks processed in the unit time, wherein the task The assigned weight is inversely related to the total number of tasks processed per unit of time.
  • the task processing weight may include the task processing speed weight of the task execution server, and the processing of the foregoing step S706 may be specifically implemented by: determining the task execution server according to the upper limit of the task timeout period and the average duration of the task processing in the recent predetermined number of times. The task handles the speed weight.
  • the task processing weight may include the historical processing performance weight of the task execution server, and the processing of the foregoing step S706 may be specifically implemented by: determining the task execution server according to the upper limit of the task timeout period and the average duration of the task processing in the recent predetermined number of times. Historical processing performance weights.
  • the task processing weights may include the foregoing overload weights, task allocation weights, task processing speed weights, and historical processing performance weights.
  • the processing of the foregoing step S706 may be specifically implemented by: overload weights, task assignment weights, task processing speed weights, and Historical processing performance weights, using formulas
  • W is the task processing weight
  • W 1 is the overload weight
  • W 2 is the task assignment weight
  • W 3 is the task processing speed weight
  • W 4 is the historical processing performance weight, a ⁇ (0, 1), b ⁇ (0, 1).
  • step S708 a task scheduling request is received for requesting to assign a task to the task execution server.
  • step S710 a task processing weight for assigning a task to the task execution server is acquired.
  • step S712 a task is assigned to the task execution server from the target task corresponding to the task scheduling request according to the task processing weight.
  • step S714 the task execution server is notified to perform the task assigned to the task execution server in a point-to-point manner.
  • the embodiment of the present specification provides a task assignment method, which determines a task processing weight for assigning a task to a task execution server by acquiring a task execution log of the task execution server, and then, according to the task processing, when receiving the task scheduling request
  • the weight assigns a task to the task execution server, so that the task execution log of the task execution server can be determined by collecting the task execution log of the task execution server.
  • the server can be executed for each task according to the task processing weight.
  • Assigning tasks so that the three processing links of "scheduling assignment", “task execution”, and “load control” form a complete closed loop, so that the number of task processing between each task execution server can be well balanced, and the task execution server is avoided.
  • the phenomenon of "overload” or “starvation” can dynamically adjust the task processing of the current task execution server, and solve the drawbacks of the random scheduling timing task.
  • the embodiment of the present specification further provides a task distribution device, as shown in FIG. 8 .
  • the distribution device of the task includes: a log obtaining module 801, a weight determining module 802, and a weight sending module 803, wherein:
  • the log obtaining module 801 is configured to acquire a task execution log of the task execution server.
  • the weight determination module 802 is configured to determine, according to the task execution log, a task processing weight for assigning a task to the task execution server;
  • the weight sending module 803 is configured to send the task processing weight of the task execution server to the task distribution server, so that when the task distribution server receives the task scheduling request, the task processing server performs the server according to the task processing weight. Assignments.
  • the weight determining module 802 includes:
  • a statistical unit configured to determine task processing statistics information of the task execution server according to relevant parameter data in the task execution log in the task execution log, where the task processing statistical information includes at least one or more of the following: a task The upper limit of the timeout period, the number of successful tasks or service failures per unit time, the number of timeout tasks completed per unit time, the total number of tasks processed per unit time, and the number of task failures caused by system anomalies per unit time;
  • the weight determining unit is configured to determine, according to the task processing statistical information of the task execution server, a task processing weight for assigning a task to the task execution server.
  • the task processing weight includes an overload weight of the task execution server
  • the weight determining unit is configured to: according to the number of task processing success or service type failure in the unit time, and the unit time The total number of tasks processed internally determines the overload weight of the task execution server.
  • the task processing weight includes a task assignment weight of the task execution server, and the weight determination unit is configured to determine a task of the task execution server according to the total number of tasks processed in the unit time. Assign weights.
  • the task assignment weight is inversely related to the total number of tasks processed in the unit time.
  • the task processing weight includes a task processing speed weight of the task execution server
  • the weight determining unit is configured to use an upper limit of the task timeout period and an average duration of the task processing in a recent predetermined number of times. Determining a task processing speed weight of the task execution server.
  • the task processing weight includes a history processing performance weight of the task execution server
  • the weight determining unit is configured to: according to an upper limit of the task timeout period and an average duration of task processing in a recent predetermined number of times, Determining the historical processing performance weight of the task execution server.
  • the historical processing performance weight includes a historical processing time sub-weight and a historical processing dither sub-weight
  • the weight determining unit is configured to respectively process according to the upper limit of the task timeout period and the recent predetermined number of tasks.
  • the task processing weight includes an overload weight, a task allocation weight, a task processing speed weight, and a history processing performance weight
  • the weight determining module 802 is configured to allocate weight according to the overload weight, the task, The task processing speed weight and the historical processing performance weight, using a formula
  • W is the task processing weight
  • W 1 is the overload weight
  • W 2 is the task assignment weight
  • W 3 is the task processing speed weight
  • W 4 is the history.
  • the embodiment of the present specification provides a task allocation apparatus, which determines a task processing weight for assigning a task to a task execution server by acquiring a task execution log of the task execution server, and then, may send the task processing weight of the task execution server to the task. Allocating a server, so that when the task assignment server receives the task scheduling request, assigns a task to the task execution server according to the task processing weight, so that the task execution log of the task execution server can be collected by the task execution task, and the task processing weight of the task execution server is determined.
  • the task assignment task can be assigned to each task according to the above task processing weight, so that the three processing links of "scheduling assignment", "task execution”, and “load control” form a complete closed loop, so that It is good to balance the number of task processing between each task execution server, avoid the "overload” or “starvation” phenomenon of the task execution server, and can dynamically adjust the task processing of the current task execution server, and solve the problem.
  • the disadvantages of randomly scheduling scheduled tasks are randomly scheduling scheduled tasks.
  • the embodiment of the present specification further provides a task distribution device, as shown in FIG.
  • the distribution device of the task includes: a request receiving module 901, a weight obtaining module 902, and a task assigning module 903, wherein:
  • the request receiving module 901 is configured to receive a task scheduling request, where the task scheduling request is used to request to allocate a task for the task execution server;
  • the weight obtaining module 902 is configured to acquire a task processing weight for assigning a task to the task execution server;
  • the task assignment module 903 is configured to allocate a task for the task execution server from the target task corresponding to the task scheduling request according to the task processing weight.
  • the device further includes:
  • the notification module is configured to notify the task execution server to perform a task assigned to the task execution server in a point-to-point manner.
  • the weight obtaining module 902 is configured to acquire, from the load monitoring server, a task processing weight for assigning a task to the task execution server.
  • the embodiment of the present specification provides a task allocation apparatus, which determines a task processing weight for assigning a task to a task execution server by acquiring a task execution log of the task execution server, and then, may send the task processing weight of the task execution server to the task. Allocating a server, so that when the task assignment server receives the task scheduling request, assigns a task to the task execution server according to the task processing weight, so that the task execution log of the task execution server can be collected by the task execution task, and the task processing weight of the task execution server is determined.
  • the task assignment task can be assigned to each task according to the above task processing weight, so that the three processing links of "scheduling assignment", "task execution”, and “load control” form a complete closed loop, so that It is good to balance the number of task processing between each task execution server, avoid the "overload” or “starvation” phenomenon of the task execution server, and can dynamically adjust the task processing of the current task execution server, and solve the problem.
  • Machine scheduling regular tasks of the state can be assigned to each task according to the above task processing weight, so that the three processing links of "scheduling assignment", "task execution”, and “load control” form a complete closed loop, so that It is good to balance the number of task processing between each task execution server, avoid the "overload” or “starvation” phenomenon of the task execution server, and can dynamically adjust the task processing of the current task execution server, and solve the problem.
  • Machine scheduling regular tasks of the state can be assigned to each task according to the above task processing weight, so that the three processing links of "scheduling assignment", "task
  • the embodiment of the present specification further provides a task distribution device, as shown in FIG.
  • the distribution device of the task includes: a log obtaining module 1001, a weight determining module 1002, and a task assigning module 1003, wherein:
  • the log obtaining module 1001 is configured to acquire a task execution log of the task execution server.
  • the weight determining module 1002 is configured to determine, according to the task execution log, a task processing weight used to allocate a task for the task execution server;
  • the task assignment module 1003 is configured to allocate a task to the task execution server from the target task corresponding to the task scheduling request according to the task processing weight when receiving the task scheduling request.
  • the device further includes:
  • the notification module is configured to notify the task execution server to perform a task assigned to the task execution server in a point-to-point manner.
  • the weight determining module 1002 includes:
  • a statistical unit configured to determine task processing statistics information of the task execution server according to relevant parameter data in the task execution log in the task execution log, where the task processing statistical information includes at least one or more of the following: a task The upper limit of the timeout period, the number of successful tasks or service failures per unit time, the number of timeout tasks completed per unit time, the total number of tasks processed per unit time, and the number of task failures caused by system anomalies per unit time;
  • the weight determining unit is configured to determine, according to the task processing statistical information of the task execution server, a task processing weight for assigning a task to the task execution server.
  • the embodiment of the present specification provides a task allocation apparatus, which determines a task processing weight for assigning a task to a task execution server by acquiring a task execution log of the task execution server, and then, according to the task processing, when receiving the task scheduling request
  • the weight assigns a task to the task execution server, so that the task execution log of the task execution server can be determined by collecting the task execution log of the task execution server.
  • the server can be executed for each task according to the task processing weight.
  • Assigning tasks so that the three processing links of "scheduling assignment", “task execution”, and “load control” form a complete closed loop, so that the number of task processing between each task execution server can be well balanced, and the task execution server is avoided.
  • the phenomenon of "overload” or “starvation” can dynamically adjust the task processing of the current task execution server, and solve the drawbacks of the random scheduling timing task.
  • the embodiment of the present specification further provides a task distribution device, as shown in FIG.
  • the distribution device of the task may be the load monitoring server provided by the above embodiment.
  • the task allocation device may vary considerably depending on configuration or performance, and may include one or more processors 1101 and memory 1102 in which one or more storage applications or data may be stored.
  • the memory 1102 can be short-lived or persistent.
  • An application stored in memory 1102 can include one or more modules (not shown), each of which can include a series of computer-executable instructions in a distribution device for a task.
  • the processor 1101 can be arranged to communicate with the memory 1102 to execute a series of computer executable instructions in the memory 1102 on a task assignment device.
  • the task assignment device may also include one or more power sources 1103, one or more wired or wireless network interfaces 1104, one or more input and output interfaces 1105, one or more keyboards 1106.
  • the task distribution device includes a memory, and one or more programs, wherein one or more programs are stored in the memory, and one or more programs may include one or more modules, and each The modules may include a series of computer executable instructions in a task assignment device and are configured to be executed by one or more processors.
  • the one or more programs are included for performing the following computer executable instructions:
  • the determining, according to the task execution log, determining a task processing weight for assigning a task to the task execution server includes:
  • the task processing statistics information includes at least one or more of the following: an upper limit of the task timeout period, The number of successful task processing or business type failures per unit time, the number of tasks completed in time per unit time, the total number of tasks processed per unit time, and the number of task failures caused by system anomalies per unit time;
  • the task processing weight includes an overload weight of the task execution server
  • a task processing weight for assigning a task to the task execution server including:
  • the overload weight of the task execution server is determined according to the number of task processing success or service type failure in the unit time, and the total number of tasks processed in the unit time.
  • the task processing weight includes a task assignment weight of the task execution server
  • a task processing weight for assigning a task to the task execution server including:
  • the task assignment weight of the task execution server is determined according to the total number of tasks processed in the unit time.
  • the task assignment weight is inversely related to the total number of tasks processed in the unit time.
  • the task processing weight includes a task processing speed weight of the task execution server
  • a task processing weight for assigning a task to the task execution server including:
  • the task processing speed weight of the task execution server is determined according to an upper limit of the task timeout period and an average duration of task processing in a recent predetermined number of times.
  • the task processing weight includes a historical processing performance weight of the task execution server
  • a task processing weight for assigning a task to the task execution server including:
  • the historical processing performance weight of the task execution server is determined according to an upper limit of the task timeout period and an average duration of task processing in a recent predetermined number of times.
  • the historical processing performance weight includes a historical processing time sub-weight and a historical processing jitter sub-weight.
  • Determining the historical processing performance weight of the task execution server according to the upper limit of the task timeout period and the average duration of the task processing in the recent predetermined number of times including:
  • the historical processing performance weight is determined according to the historical processing time length sub-weight and the historical processing dither sub-weight.
  • the task processing weights include overload weights, task assignment weights, task processing speed weights, and historical processing performance weights.
  • the determining a task processing weight for assigning a task to the task execution server includes:
  • W is the task processing weight
  • W 1 is the overload weight
  • W 2 is the task assignment weight
  • W 3 is the task processing speed weight
  • W 4 is the history.
  • the embodiment of the present specification provides a task distribution device, which determines a task processing weight for assigning a task to a task execution server by acquiring a task execution log of the task execution server, and then can send the task processing weight of the task execution server to the task. Allocating a server, so that when the task assignment server receives the task scheduling request, assigns a task to the task execution server according to the task processing weight, so that the task execution log of the task execution server can be collected by the task execution task, and the task processing weight of the task execution server is determined.
  • the task assignment task can be assigned to each task according to the above task processing weight, so that the three processing links of "scheduling assignment", "task execution”, and “load control” form a complete closed loop, so that It is good to balance the number of task processing between each task execution server, avoid the "overload” or “starvation” phenomenon of the task execution server, and can dynamically adjust the task processing of the current task execution server, and solve the problem.
  • Machine scheduling regular tasks of the state can be assigned to each task according to the above task processing weight, so that the three processing links of "scheduling assignment", "task execution”, and “load control” form a complete closed loop, so that It is good to balance the number of task processing between each task execution server, avoid the "overload” or “starvation” phenomenon of the task execution server, and can dynamically adjust the task processing of the current task execution server, and solve the problem.
  • Machine scheduling regular tasks of the state can be assigned to each task according to the above task processing weight, so that the three processing links of "scheduling assignment", "task
  • the embodiment of the present specification further provides a task distribution device, as shown in FIG. 12 .
  • the task distribution device may be the task distribution server provided by the above embodiment.
  • the task allocation device may vary considerably depending on configuration or performance, and may include one or more processors 1201 and memory 1202 in which one or more storage applications or data may be stored.
  • the memory 1202 can be short-lived or persistent.
  • An application stored in memory 1202 may include one or more modules (not shown), each of which may include a series of computer executable instructions in a distribution device for a task.
  • the processor 1201 can be configured to communicate with the memory 1202 to execute a series of computer executable instructions in the memory 1202 on the task's distribution device.
  • the task assignment device may also include one or more power sources 1203, one or more wired or wireless network interfaces 1204, one or more input and output interfaces 1205, one or more keyboards 1206.
  • the task distribution device includes a memory, and one or more programs, wherein one or more programs are stored in the memory, and one or more programs may include one or more modules, and each The modules may include a series of computer executable instructions in a task assignment device and are configured to be executed by one or more processors.
  • the one or more programs are included for performing the following computer executable instructions:
  • the task scheduling request is used to request to allocate a task for the task execution server;
  • it also includes:
  • the task execution server is notified to perform a task assigned to the task execution server.
  • the obtaining a task processing weight for assigning a task to the task execution server includes:
  • the task processing weights used to assign tasks to the task execution server are obtained from the load monitoring server.
  • the task distribution device includes a memory, and one or more programs, wherein one or more programs are stored in the memory, and one or more programs may include one or more modules. And each module can include a series of computer executable instructions in a distribution device for a task, and configured to be executed by one or more processors.
  • the one or more programs are included for performing the following computer executable instructions:
  • it also includes:
  • the task execution server is notified to perform a task assigned to the task execution server.
  • the determining, according to the task execution log, determining a task processing weight for assigning a task to the task execution server includes:
  • the task processing statistics information includes at least one or more of the following: an upper limit of the task timeout period, The number of successful task processing or business type failures per unit time, the number of tasks completed in time per unit time, the total number of tasks processed per unit time, and the number of task failures caused by system anomalies per unit time;
  • the embodiment of the present specification provides a task distribution device, which determines a task processing weight for assigning a task to a task execution server by acquiring a task execution log of the task execution server, and then, according to the task processing, when receiving the task scheduling request
  • the weight assigns a task to the task execution server, so that the task execution log of the task execution server can be determined by collecting the task execution log of the task execution server.
  • the server can be executed for each task according to the task processing weight.
  • Assigning tasks so that the three processing links of "scheduling assignment", “task execution”, and “load control” form a complete closed loop, so that the number of task processing between each task execution server can be well balanced, and the task execution server is avoided.
  • the phenomenon of "overload” or “starvation” can dynamically adjust the task processing of the current task execution server, and solve the drawbacks of the random scheduling timing task.
  • PLD Programmable Logic Device
  • FPGA Field Programmable Gate Array
  • HDL Hardware Description Language
  • the controller can be implemented in any suitable manner, for example, the controller can take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (eg, software or firmware) executable by the (micro)processor.
  • computer readable program code eg, software or firmware
  • examples of controllers include, but are not limited to, the following microcontrollers: ARC625D, Atmel AT91SAM, Microchip The PIC18F26K20 and the Silicone Labs C8051F320, the memory controller can also be implemented as part of the control logic of the memory.
  • the controller can be logically programmed by means of logic gates, switches, ASICs, programmable logic controllers, and embedding.
  • Such a controller can therefore be considered a hardware component, and the means for implementing various functions included therein can also be considered as a structure within the hardware component.
  • a device for implementing various functions can be considered as a software module that can be both a method of implementation and a structure within a hardware component.
  • the system, device, module or unit illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product having a certain function.
  • a typical implementation device is a computer.
  • the computer can be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or A combination of any of these devices.
  • embodiments of the present specification can be provided as a method, system, or computer program product.
  • one or more embodiments of the present specification can take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware.
  • one or more embodiments of the present specification can employ a computer program embodied on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer usable program code embodied therein.
  • the form of the product is not limited to disk storage, CD-ROM, optical storage, etc.
  • Embodiments of the present specification are described with reference to flowcharts and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present specification. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG.
  • These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
  • a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • processors CPUs
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • the memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory in a computer readable medium, such as read only memory (ROM) or flash memory.
  • RAM random access memory
  • ROM read only memory
  • Memory is an example of a computer readable medium.
  • Computer readable media includes both permanent and non-persistent, removable and non-removable media.
  • Information storage can be implemented by any method or technology.
  • the information can be computer readable instructions, data structures, modules of programs, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory. (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape storage or other magnetic storage devices or any other non-transportable media can be used to store information that can be accessed by a computing device.
  • computer readable media does not include temporary storage of computer readable media, such as modulated data signals and carrier waves.
  • embodiments of the present specification can be provided as a method, system, or computer program product.
  • one or more embodiments of the present specification can take the form of an entirely hardware embodiment, an entirely software embodiment or a combination of software and hardware.
  • one or more embodiments of the present specification can employ a computer program embodied on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer usable program code embodied therein.
  • the form of the product is not limited to disk storage, CD-ROM, optical storage, etc.
  • One or more embodiments of the present specification can be described in the general context of computer-executable instructions executed by a computer, such as a program module.
  • program modules include routines, programs, objects, components, data structures, and the like that perform particular tasks or implement particular abstract data types.
  • One or more embodiments of the present specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are connected through a communication network.
  • program modules can be located in both local and remote computer storage media including storage devices.

Abstract

一种任务的分配方法、装置及设备,该任务的分配方法包括:获取任务执行服务器的任务执行日志(S102),然后,根据上述任务执行日志,确定用于为上述任务执行服务器分配任务的任务处理权重(S104),将上述任务执行服务器的任务处理权重发送给任务分配服务器,以使该任务分配服务器在接收到任务调度请求时,根据该任务处理权重为任务执行服务器分配任务(S106)。

Description

一种任务的分配方法、装置及设备 技术领域
本说明书涉及计算机技术领域,尤其涉及一种任务的分配方法、装置及设备。
背景技术
任务调度是在计算机服务端的软件设计中常见的一种应用技术,通过任务调度可以将大数据量的任务分配给不同的任务执行服务器执行,进而可以相对平滑地完成业务处理过程,保护系统资源。在调度过程中,如何能够有效地平衡各任务执行服务器之间的任务处理量,避免有些任务执行服务器资源过度消耗,而有些任务执行服务器一直处于空闲状态是需要解决的问题。
通常,当接收到需要进行调度的任务时,可以查询当前调度周期内需要处理的任务列表,该任务列表中记录有需要处理的任务的相关信息。然后,将查询到的任务列表拆分为多个小的任务列表,并通过服务请求的方式随机发送给各个任务执行服务器。
然而,通过上述处理方式,在各个任务执行服务器之间无法很好平衡任务处理量,这样,可能会出现已经接近满负荷运行的任务执行服务器仍然在不停地接收新的任务,而一些处于空闲状态的任务执行服务器一直没有接收到需要处理的任务,从而使得任务处理效率低下。
发明内容
本说明书实施例的目的是提供一种任务的分配方法、装置及设备,以解决现有技术中通过随机分配任务,使得任务处理效率低下的问题。
为解决上述技术问题,本说明书实施例是这样实现的:
本说明书实施例提供的一种任务的分配方法,所述方法包括:
获取任务执行服务器的任务执行日志;
根据所述任务执行日志,确定用于为所述任务执行服务器分配任务的任务处理权重;
将所述任务执行服务器的任务处理权重发送给任务分配服务器,以使所述任务分配服务器在接收到任务调度请求时,根据所述任务处理权重为所述任务执行服务器分配任务。
可选地,所述根据所述任务执行日志,确定用于为所述任务执行服务器分配任务的任务处理权重,包括:
根据所述任务执行日志中执行任务过程中的相关参数数据,确定所述任务执行服务器的任务处理统计信息,所述任务处理统计信息至少包括以下中的一个或多个:任务超时时间的上限、单位时间内任务处理成功或业务型失败的数量、单位时间内超时完成任务的数量、单位时间内处理的任务总数量、单位时间内由于系统异常导致的任务失败数量;
根据所述任务执行服务器的任务处理统计信息,确定用于为所述任务执行服务器分配任务的任务处理权重。
可选地,所述任务处理权重包括所述任务执行服务器的过载权重,
所述根据所述任务执行服务器的任务处理统计信息,确定用于为所述任务执行服务器分配任务的任务处理权重,包括:
根据所述单位时间内任务处理成功或业务型失败的数量,以及所述单位时间内处理的任务总数量,确定所述任务执行服务器的过载权重。
可选地,所述任务处理权重包括所述任务执行服务器的任务分配权重,
所述根据所述任务执行服务器的任务处理统计信息,确定用于为所述任务执行服务器分配任务的任务处理权重,包括:
根据所述单位时间内处理的任务总数量,确定所述任务执行服务器的任务分配权重。所述任务分配权重与所述单位时间内处理的任务总数量负相关。
可选地,所述任务处理权重包括所述任务执行服务器的任务处理速度权重,
所述根据所述任务执行服务器的任务处理统计信息,确定用于为所述任务执行服务器分配任务的任务处理权重,包括:
根据所述任务超时时间的上限,以及近期预定次数的任务处理的平均时长,确定所述任务执行服务器的任务处理速度权重。
可选地,所述任务处理权重包括所述任务执行服务器的历史处理性能权重,
所述根据所述任务执行服务器的任务处理统计信息,确定用于为所述任务执行服务器分配任务的任务处理权重,包括:
根据所述任务超时时间的上限和近期预定次数的任务处理的平均时长,确定所述任务 执行服务器的历史处理性能权重。
可选地,所述历史处理性能权重包括历史处理时长子权重和历史处理抖动子权重,
所述根据所述任务超时时间的上限和近期预定次数的任务处理的平均时长,确定所述任务执行服务器的历史处理性能权重,包括:
分别根据所述任务超时时间的上限和近期预定次数的任务处理的平均时长,确定所述任务执行服务器的历史处理时长子权重和所述历史处理抖动子权重;
根据所述历史处理时长子权重和所述历史处理抖动子权重,确定所述历史处理性能权重。
可选地,所述任务处理权重包括过载权重、任务分配权重、任务处理速度权重和历史处理性能权重,
所述确定用于为所述任务执行服务器分配任务的任务处理权重,包括:
根据所述过载权重、所述任务分配权重、所述任务处理速度权重和所述历史处理性能权重,利用公式
Figure PCTCN2019073963-appb-000001
计算所述任务处理权重;其中,W为所述任务处理权重,W 1为所述过载权重,W 2为所述任务分配权重,W 3为所述任务处理速度权重,W 4为所述历史处理性能权重,a∈(0,1),b∈(0,1)。
本说明书实施例提供的一种任务的分配方法,所述方法包括:
接收任务调度请求,所述任务调度请求用于请求为任务执行服务器分配任务;
获取用于为所述任务执行服务器分配任务的任务处理权重;
根据所述任务处理权重,从所述任务调度请求对应的目标任务中为所述任务执行服务器分配任务。
可选地,所述方法还包括:
以点对点调用的方式,通知所述任务执行服务器执行为所述任务执行服务器分配的任务。
可选地,所述获取用于为任务执行服务器分配任务的任务处理权重,包括:
从负载监控服务器中获取用于为任务执行服务器分配任务的任务处理权重。
本说明书实施例提供的一种任务的分配方法,所述方法包括:
获取任务执行服务器的任务执行日志,所述任务执行日志中包括执行任务过程中的相关参数数据;
根据所述任务执行日志,确定用于为所述任务执行服务器分配任务的任务处理权重;
当接收到任务调度请求时,根据所述任务处理权重,从所述任务调度请求对应的目标任务中为所述任务执行服务器分配任务。
可选地,所述方法还包括:
以点对点调用的方式,通知所述任务执行服务器执行为所述任务执行服务器分配的任务。
可选地,所述根据所述任务执行日志,确定用于为所述任务执行服务器分配任务的任务处理权重,包括:
根据所述任务执行日志中执行任务过程中的相关参数数据,确定所述任务执行服务器的任务处理统计信息,所述任务处理统计信息至少包括以下中的一个或多个:任务超时时间的上限、单位时间内任务处理成功或业务型失败的数量、单位时间内超时完成任务的数量、单位时间内处理的任务总数量、单位时间内由于系统异常导致的任务失败数量;
根据所述任务执行服务器的任务处理统计信息,确定用于为所述任务执行服务器分配任务的任务处理权重。
本说明书实施例提供的一种任务的分配装置,所述装置包括:
日志获取模块,用于获取任务执行服务器的任务执行日志;
权重确定模块,用于根据所述任务执行日志,确定用于为所述任务执行服务器分配任务的任务处理权重;
权重发送模块,用于将所述任务执行服务器的任务处理权重发送给任务分配服务器,以使所述任务分配服务器在接收到任务调度请求时,根据所述任务处理权重为所述任务执行服务器分配任务。
可选地,所述权重确定模块,包括:
统计单元,用于根据所述任务执行日志中执行任务过程中的相关参数数据,确定所述任务执行服务器的任务处理统计信息,所述任务处理统计信息至少包括以下中的一个或多个:任务超时时间的上限、单位时间内任务处理成功或业务型失败的数量、单位时间内超时完成任务的数量、单位时间内处理的任务总数量、单位时间内由于系统异常导致的任务失败数量;
权重确定单元,用于根据所述任务执行服务器的任务处理统计信息,确定用于为所述任务执行服务器分配任务的任务处理权重。
可选地,所述任务处理权重包括所述任务执行服务器的过载权重,所述权重确定单元,用于根据所述单位时间内任务处理成功或业务型失败的数量,以及所述单位时间内处理的任务总数量,确定所述任务执行服务器的过载权重。
可选地,所述任务处理权重包括所述任务执行服务器的任务分配权重,所述权重确定单元,用于根据所述单位时间内处理的任务总数量,确定所述任务执行服务器的任务分配权重。所述任务分配权重与所述单位时间内处理的任务总数量负相关。
可选地,所述任务处理权重包括所述任务执行服务器的任务处理速度权重,所述权重确定单元,用于根据所述任务超时时间的上限,以及近期预定次数的任务处理的平均时长,确定所述任务执行服务器的任务处理速度权重。
可选地,所述任务处理权重包括所述任务执行服务器的历史处理性能权重,所述权重确定单元,用于根据所述任务超时时间的上限和近期预定次数的任务处理的平均时长,确定所述任务执行服务器的历史处理性能权重。
可选地,所述历史处理性能权重包括历史处理时长子权重和历史处理抖动子权重,所述权重确定单元,用于分别根据所述任务超时时间的上限和近期预定次数的任务处理的平均时长,确定所述任务执行服务器的历史处理时长子权重和所述历史处理抖动子权重;根据所述历史处理时长子权重和所述历史处理抖动子权重,确定所述历史处理性能权重。
可选地,所述任务处理权重包括过载权重、任务分配权重、任务处理速度权重和历史处理性能权重,所述权重确定模块,用于根据所述过载权重、所述任务分配权重、所述任务处理速度权重和所述历史处理性能权重,利用公式
Figure PCTCN2019073963-appb-000002
计算所述任务处理权重;其中,W为所述任务处理权重,W 1为所述过载权重,W 2为 所述任务分配权重,W 3为所述任务处理速度权重,W 4为所述历史处理性能权重,a∈(0,1),b∈(0,1)。
本说明书实施例提供的一种任务的分配装置,所述装置包括:
请求接收模块,用于接收任务调度请求,所述任务调度请求用于请求为任务执行服务器分配任务;
权重获取模块,用于获取用于为所述任务执行服务器分配任务的任务处理权重;
任务分配模块,用于根据所述任务处理权重,从所述任务调度请求对应的目标任务中为所述任务执行服务器分配任务。
可选地,所述装置还包括:
通知模块,用于以点对点调用的方式,通知所述任务执行服务器执行为所述任务执行服务器分配的任务。
可选地,所述权重获取模块,用于从负载监控服务器中获取用于为任务执行服务器分配任务的任务处理权重。
本说明书实施例提供的一种任务的分配装置,所述装置包括:
日志获取模块,用于获取任务执行服务器的任务执行日志,所述任务执行日志中包括执行任务过程中的相关参数数据;
权重确定模块,用于根据所述任务执行日志,确定用于为所述任务执行服务器分配任务的任务处理权重;
任务分配模块,用于当接收到任务调度请求时,根据所述任务处理权重,从所述任务调度请求对应的目标任务中为所述任务执行服务器分配任务。
可选地,所述装置还包括:
通知模块,用于以点对点调用的方式,通知所述任务执行服务器执行为所述任务执行服务器分配的任务。
可选地,所述权重确定模块,包括:
统计单元,用于根据所述任务执行日志中执行任务过程中的相关参数数据,确定所述任务执行服务器的任务处理统计信息,所述任务处理统计信息至少包括以下中的一个或多 个:任务超时时间的上限、单位时间内任务处理成功或业务型失败的数量、单位时间内超时完成任务的数量、单位时间内处理的任务总数量、单位时间内由于系统异常导致的任务失败数量;
权重确定单元,用于根据所述任务执行服务器的任务处理统计信息,确定用于为所述任务执行服务器分配任务的任务处理权重。
本说明书实施例提供的一种任务的分配设备,所述任务的分配设备包括:
处理器;以及
被安排成存储计算机可执行指令的存储器,所述可执行指令在被执行时使所述处理器:
获取任务执行服务器的任务执行日志;
根据所述任务执行日志,确定用于为所述任务执行服务器分配任务的任务处理权重;
将所述任务执行服务器的任务处理权重发送给任务分配服务器,以使所述任务分配服务器在接收到任务调度请求时,根据所述任务处理权重为所述任务执行服务器分配任务。
本说明书实施例提供的一种任务的分配设备,所述任务的分配设备包括:
处理器;以及
被安排成存储计算机可执行指令的存储器,所述可执行指令在被执行时使所述处理器:
接收任务调度请求,所述任务调度请求用于请求为任务执行服务器分配任务;
获取用于为所述任务执行服务器分配任务的任务处理权重;
根据所述任务处理权重,从所述任务调度请求对应的目标任务中为所述任务执行服务器分配任务。
本说明书实施例提供的一种任务的分配设备,所述任务的分配设备包括:
处理器;以及
被安排成存储计算机可执行指令的存储器,所述可执行指令在被执行时使所述处理器:
获取任务执行服务器的任务执行日志;
根据所述任务执行日志,确定用于为所述任务执行服务器分配任务的任务处理权重;
当接收到任务调度请求时,根据所述任务处理权重,从所述任务调度请求对应的目标任务中为所述任务执行服务器分配任务。
由以上本说明书实施例提供的技术方案可见,本说明书实施例通过获取任务执行服务器的任务执行日志,确定用于为任务执行服务器分配任务的任务处理权重,然后,可以将任务执行服务器的任务处理权重发送给任务分配服务器,以使任务分配服务器在接收到任务调度请求时,根据任务处理权重为任务执行服务器分配任务,这样,可以通过收集任务执行服务器的任务执行日志,确定任务执行服务器的任务处理权重,当下一次的任务调度请求到达时,可以根据上述任务处理权重为各个任务执行服务器分配任务,从而将“调度分配”、“任务执行”、“负载控制”三个处理环节形成完整的闭环,从而可以很好的平衡各个任务执行服务器之间的任务处理数量,避免任务执行服务器的“过载”或“饥饿”现象,能够动态地对当前任务执行服务器的任务处理进行调节,解决了随机调度定时任务的弊端。
附图说明
为了更清楚地说明本说明书实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本说明书中记载的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本说明书一种任务的分配方法实施例;
图2为本说明书一种任务的分配系统的结构示意图;
图3为本说明书另一种任务的分配方法实施例;
图4为本说明书又一种任务的分配方法实施例;
图5为本说明书又一种任务的分配方法实施例;
图6为本说明书另一种任务的分配系统的结构示意图;
图7为本说明书又一种任务的分配方法实施例;
图8为本说明书一种任务的分配装置实施例;
图9为本说明书一种任务的分配装置实施例;
图10为本说明书一种任务的分配装置实施例;
图11为本说明书一种任务的分配设备实施例
图12为本说明书一种任务的分配设备实施例。
具体实施方式
本说明书实施例提供一种任务的分配方法、装置及设备。
为了使本技术领域的人员更好地理解本说明书中的技术方案,下面将结合本说明书实施例中的附图,对本说明书实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本说明书一部分实施例,而不是全部的实施例。基于本说明书中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都应当属于本说明书保护的范围。
实施例一
如图1所示,本说明书实施例提供一种任务的分配方法,该方法的执行主体可以为负载监控服务器,其中,该负载监控服务器可以是独立的一个服务器,也可以是由多个服务器组成的服务器集群,而且,该负载监控服务器可以用于监测任务执行服务器的任务处理情况等。该方法可以用于对任务执行服务器执行任务的情况进行监控,并计算各任务执行服务器在下一次分配任务时任务分配的权重等处理中。该方法具体可以包括以下步骤:
在步骤S102中,获取任务执行服务器的任务执行日志。
其中,任务执行服务器可以是某一项业务中执行具体某一项或多项任务的服务器,在业务系统中可以包括任务执行服务器和任务分配服务器,其中的任务分配服务器可以用于为任务分配服务器分配任务,任务执行服务器可以是任务的具体执行者,任务执行服务器可以是一个独立的服务器,也可以是由多个服务器组成的服务器集群中的一个服务器。任务执行日志中可以包括执行任务过程中的相关参数数据,其中的相关参数数据可以包括一种,也可以包括多种,例如,任务执行的开始时间、任务执行所消耗的时间和任务执行的结果等,在实际应用中,执行任务过程中的相关参数数据可以并不限于包括上述参数数据,还可以包括其它参数数据,具体可以根据实际情况选取,本说明书实施例对此不做限定。
在实施中,异步任务的定时调度是在计算机服务端的软件设计中常见的一种应用技术,异步任务的定时调度可以通过每次查询并执行固定数量的任务,并周而复始地调度执行,从而可以将大数据量的任务分批次进行,每个调度周期内只执行一部分任务,进而可以相对平滑地完成业务处理过程,保护系统资源。但是,在调度过程中,如何能够有效地平衡各任务执行服务器之间的任务处理量,避免有些任务执行服务器资源过度消耗,而有些任 务执行服务器一直处于空闲状态,这是异步任务调度过程中要解决的问题。为此,可以通过以下方式解决上述问题,即通过将任务进行拆分的方式完成异步任务调度,具体地,查询当前调度周期内需要处理的任务的任务列表,该任务列表中记录有需要处理的任务的相关信息,如,该任务包含的任务数量和该任务的标识等。然后,可以将查询到的任务列表拆分为多个小的任务列表,并通过服务请求的方式随机发送给各个任务执行服务器。
上述处理方式,可以实现对任务的分布式调度,即将任务拆分开,使得每个任务执行服务器执行其中的一部分任务,能够避免单个任务执行服务器执行任务的瓶颈,但是,上述处理方式,在各个任务执行服务器之间无法很好平衡任务处理量,这样,可能会出现已经接近满负荷运行的任务执行服务器仍然在不停地接收新的任务,而一些处于空闲状态的任务执行服务器一直没有接收到需要处理的任务,即在任务的执行者(任务执行服务器)和任务的分配者(任务分配服务器)之间缺乏有效的反馈途径,任务分配服务器无法根据执行者的情况对任务的分配数量进行动态调节,而只能进行随机分配。为此,本说明书实施例提供一种任务动态调节的机制和算法,从而有效解决上述问题,具体可以包括以下内容:
如图2所示,本说明书实施例中的业务系统或分布式调度系统中可以包括三个部分,可以分别为:任务执行服务器、任务分配服务器和负载监控服务器等。任务执行服务器和任务分配服务器可以参见前述相关内容,负载监控服务器可以用于获取并计算各个任务执行服务器的任务分配权重,以便任务分配服务器为任务执行服务器分配相应的任务。每当用户确定需要进行某一项业务时,该业务可以触发一系列复杂的任务,此时,可以通过用户使用的终端设备基于需要处理的任务生成任务调度请求,可以将该任务调度请求发送给任务分配服务器。当任务分配服务器接收到需要处理的任务后,可以将该任务分配给任务执行服务器,任务执行服务器在执行该任务时,可以记录执行该任务的过程中的相关参数数据,可以将上述相关参数数据记录在各个任务执行服务器的日志中。
当需要对任务执行服务器设置任务处理权重或需要对其任务处理权重进行更新时,可以向各个任务执行服务器发送日志上报指令,任务执行服务器接收到日志上报指令后,可以获取执行任务的过程中的相关参数数据生成任务执行日志,可以将该任务执行日志发送给负载监控服务器,负载监控服务器可以接收各个任务执行服务器发送的任务执行日志。其中,上述任务执行日志是由负载监控服务器主动向各个任务执行服务器获取的,还可以是负载监控服务器直接到各个任务执行服务器中拉取相应的任务执行日志,或者,还可以由各个任务执行服务器主动向负载监控服务器发送其任务执行日志等,本说明书实施例对 如何获取任务执行日志的处理不做限定。
在步骤S104中,根据上述任务执行日志,确定用于为上述任务执行服务器分配任务的任务处理权重。
其中,任务处理权重可以用于实现任务分配服务器为各个任务执行服务器分配任务,以及确定各个任务执行服务器的任务分配量,其中的任务分配量可以是分配的任务个数,也可以是分配的任务的数据量等。
在实施中,负载监控服务器通过上述步骤S102的处理得到各个任务执行服务器的任务执行日志后,可以分别对得到的每一个任务执行日志进行分析,可以从任务执行日志中提取出多项参数,以及每项参数对应的具体参数值,例如,如表1所示,任务执行日志中可以包括下述参数和相应的参数值。
表1
参数名称 参数值
单个批次的调度过程的会话标识(sessionID) 123
任务执行的开始时间(beginTime) 10:03:45
任务执行所消耗的时间(costTime) 100毫秒
执行任务的任务执行服务器的IP地址(executorIP) xxx.xxx.xxx.xxx
任务执行的结果(executeResult) 成功
任务执行结果码(executeResultCode) 111
其中,任务执行结果码可以用于区分系统异常和业务异常等。可以对上述表1中所示的相关的参数数据进一步进行数据的转换和计算,得到用于确定该任务执行服务器的任务处理权重的基础数据,例如任务执行服务器近期的任务分配情况等,具体地,以基础数据为任务执行服务器近期的任务分配情况为例,可以计算任务执行服务器近期的任务分配情况的权重,具体地,考虑到负载监控服务器收集到的任务执行日志中的相关参数数据是任务执行服务器已经执行完成的数据,具有一定的时延,但可以用于近似表示当前时间的任务分配情况,当前时间被分配的任务越多的任务执行服务器,其任务分配情况的权重越低,因此,可以基于任务执行服务器在单位时间内任务的处理总数来确定任务分配情况的权重,为此,可以基于上述表1中的相关参数数据计算各个任务执行服务器在单位时间内任务的处理总数。得到各个任务执行服务器在单位时间内任务的处理总数后,可以进而得到各个任务执行服务器的任务分配情况的权重,可以将得到的各个任务执行服务器的任务分配情 况的权重作为相应任务执行服务器的任务处理权重。
需要说明的是,任务执行服务器的任务处理权重并不限于上述一种,在实际应用中还可以包括多种,具体可以根据实际情况设定,本说明书实施例对此不做限定。
在步骤S106中,将上述任务执行服务器的任务处理权重发送给任务分配服务器,以使该任务分配服务器在接收到任务调度请求时,根据该任务处理权重为任务执行服务器分配任务。
在实施中,负载监控服务器得到各个任务执行服务器的任务处理权重后,为了在下一次任务分配服务器接收到任务调度请求进行任务分配,负载监控服务器可以将各个任务执行服务器的任务处理权重发送给任务分配服务器,这样,当任务分配服务器在接收到任务调度请求时,可以根据该任务处理权重为任务执行服务器分配任务。
如图3所示,本说明书实施例提供一种任务的分配方法,该方法的执行主体可以为任务分配服务器,其中,该任务分配服务器可以是独立的一个服务器,也可以是由多个服务器组成的服务器集群,而且,该任务分配服务器可以用于向任务执行服务器分配任务等。该方法可以用于对任务执行服务器依据任务分配的权重进行任务分配等处理中。该方法具体可以包括以下步骤:
在步骤S302中,接收任务调度请求,该任务调度请求用于请求为任务执行服务器分配任务。
在实施中,当用户确定需要进行某一项业务时,业务服务器会向用户提供相应的服务,通过用户的操作或请求,可以触发一系列复杂的任务,此时,可以通过用户使用的终端设备基于需要处理的任务生成任务调度请求,可以将该任务调度请求发送给任务分配服务器。
在步骤S304中,获取用于为上述任务执行服务器分配任务的任务处理权重。
在实施中,为了避免出现已经接近满负荷运行的任务执行服务器仍然在不停地接收新的任务,而一些处于空闲状态的任务执行服务器一直没有接收到需要处理的任务的情况,任务分配服务器中可以存储有各个任务执行服务器的任务处理权重。当任务分配服务器通过上述步骤S302的处理接收到任务调度请求时,可以确定该任务调度请求对应的任务执行服务器,确定后,可以从自身存储的任务处理权重中查找确定出的任务执行服务器的任务处理权重。
在步骤S306中,根据上述任务处理权重,从上述任务调度请求对应的目标任务中为上 述任务执行服务器分配任务。
在实施中,任务分配服务器查找到相应的任务执行服务器的任务处理权重后,可以根据任务处理权重,确定需要为相应的任务执行服务器分配的任务量。然后,可以将任务调度请求对应的目标任务划分为多个部分,其中,任务处理权重的数值越大,分配的任务量就越多,这样,可以使得对任务的分配进行动态调节,任务执行服务器、负载监控服务器和任务分配服务器之间形成整体的闭环,达到动态调节系统资源的目的。
本说明书实施例提供一种任务的分配方法,通过获取任务执行服务器的任务执行日志,确定用于为任务执行服务器分配任务的任务处理权重,然后,可以将任务执行服务器的任务处理权重发送给任务分配服务器,以使任务分配服务器在接收到任务调度请求时,根据任务处理权重为任务执行服务器分配任务,这样,可以通过收集任务执行服务器的任务执行日志,确定任务执行服务器的任务处理权重,当下一次的任务调度请求到达时,可以根据上述任务处理权重为各个任务执行服务器分配任务,从而将“调度分配”、“任务执行”、“负载控制”三个处理环节形成完整的闭环,从而可以很好的平衡各个任务执行服务器之间的任务处理数量,避免任务执行服务器的“过载”或“饥饿”现象,能够动态地对当前任务执行服务器的任务处理进行调节,解决了随机调度定时任务的弊端。
实施例二
如图4所示,本说明书实施例提供一种任务的分配方法,该方法可以由负载监控服务器和任务分配服务器共同执行,其中,该负载监控服务器可以是独立的一个服务器,也可以是由多个服务器组成的服务器集群,而且,该负载监控服务器可以用于监测任务执行服务器的任务处理情况等。该任务分配服务器可以是独立的一个服务器,也可以是由多个服务器组成的服务器集群,而且,该任务分配服务器可以用于向任务执行服务器分配任务等。该方法可以用于对任务执行服务器执行任务的情况进行监控,并计算各任务执行服务器在下一次分配任务时任务分配的权重等处理中。该方法具体可以包括以下步骤:
在步骤S402中,负载监控服务器获取任务执行服务器的任务执行日志。
上述步骤S402的步骤内容与上述实施例一中步骤S102的步骤内容相同,上述步骤S402的具体处理过程可以参见上述实施例一中步骤S102的相关内容,在此不再赘述。
在步骤S404中,负载监控服务器根据上述任务执行日志,确定任务执行服务器的任务处理统计信息。
其中,该任务处理统计信息可以至少包括以下中的一个或多个:任务超时时间的上限、 单位时间内任务处理成功或业务型失败的数量、单位时间内超时完成任务的数量、单位时间内处理的任务总数量、单位时间内由于系统异常导致的任务失败数量。
在实施中,为了能够直观的体现出任务执行服务器执行任务的情况,可以对每个任务执行服务器的任务执行日志中记载的相关参数数据进行统计分析,可以得到任务执行服务器的任务处理统计信息,该任务处理统计信息可以是用于确定该任务执行服务器的任务处理权重的基础数据,其中,任务执行日志中记载的相关参数数据可以参见上述实施例一中的表1所示,相应的,任务执行服务器的任务处理统计信息中可以包括任务处理统计参数,及其对应的统计值,具体可以参见下述表2所示。
表2
任务处理统计参数 统计值
任务超时时间的上限 1秒
单位时间内任务处理成功或业务型失败的数量 20
单位时间内超时完成任务的数量 1
单位时间内处理的任务总数量 21
单位时间内由于系统异常导致的任务失败数量 0
其中,任务超时时间的上限可以通过多次执行任务的平均耗时乘以预先设定的固定系数得到,或者,也可以通过人工观察任务执行日志,从而确定某个固定时长作为任务超时时间的上限等。单位时间内任务处理成功或业务型失败的数量不包括超时完成任务的数量。单位时间内由于系统异常导致的任务失败数量可以是由于任务执行服务器无法接收新分配的任务或其他系统型异常等导致的任务失败数量。
在步骤S406中,负载监控服务器根据任务执行服务器的任务处理统计信息,确定用于为该任务执行服务器分配任务的任务处理权重。
上述步骤S406的具体处理过程可以参见上述实施例一中的相关内容。
在实际应用中,为了实现对任务的动态调度,可以设置任务处理权重的计算规则或计算原则,可以基于设置的任务处理权重的计算规则或计算原则来选取或设置任务处理权重,本说明书实施例中提供一种可选的任务处理权重的计算规则或计算原则,具体可以包括以下四个方面:
第一方面,保证任务执行服务器没有出现过载,能够正常处理任务。
第二方面,为当前处理任务数量较少的任务执行服务器优先分配任务。
第三方面,近期N次任务的处理速度较快的任务执行服务器优先分配任务。
第四方面,历史处理性能表现较好的任务执行服务器优先分配任务。
此外,上述的四个方面的计算规则或计算原则在优先级上,由第一方面~第四方面依次降低,即在设置任务处理权重时,首先保证高优先级的计算规则或计算原则能够得到满足,然后再满足低优先级的计算规则或计算原则。
另外,任务处理权重可以包括多种,不同的业务系统可以设置不同的任务处理权重,本说明书实施例中提供四种可选的任务处理权重进行详细说明,对于除了下述四种任务处理权重外的其它任务处理权重,可以参考下述相关内容处理,在此不再赘述。
第一种,考虑到任务执行服务器的过载情况在上述计算规则或计算原则中优先级最高,也即是任务执行服务器的过载情况,对任务的分配有较大影响,因此,任务处理权重可以包括任务执行服务器的过载权重,则上述步骤S406的处理具体可以为:根据单位时间内任务处理成功或业务型失败的数量,以及单位时间内处理的任务总数量,确定任务执行服务器的过载权重。
在实施中,对于任务执行服务器的过载情况,任务执行服务器的过载权重可以通过单位时间内任务处理成功的数量(包括任务处理成功和业务型失败的数量)与单位时间内处理的任务总数量的比值进行确定,得到的比值越高,则任务执行服务器执行任务的成功率越高,进而该任务执行服务器也就越不会发生过载。针对某指定IP地址的任务执行服务器,其过载权重可以通过以下公式(1)确定
Figure PCTCN2019073963-appb-000003
Figure PCTCN2019073963-appb-000004
其中,W 1为任务执行服务器的过载权重,m为单位时间内任务处理成功的数量,k为单位时间内处理的任务总数量,k=n+m+u,n为单位时间内超时完成任务的数量,u为单位时间内由于系统异常导致的任务失败数量,W 1∈(0,1]。例如,如果单位时间内任务处理成功的数量为20,单位时间内处理的任务总数量为21,即m=20,k=21,则任务执行服务器的过载权重W 1=20/21=0.95。
第二种,考虑到任务执行服务器的任务分配情况在上述计算规则或计算原则中优先级较高,也即是任务执行服务器的任务分配情况,对任务的分配有一定的影响,因此,任务 处理权重可以包括任务执行服务器的任务分配权重,则上述步骤S406的处理具体可以为:根据单位时间内处理的任务总数量,确定任务执行服务器的任务分配权重,其中,任务分配权重与单位时间内处理的任务总数量负相关。
其中,任务分配权重与单位时间内处理的任务总数量负相关可以包括多种实现方式,例如,任务分配权重与单位时间内处理的任务总数量互为倒数关系等,本说明书实施例对此不做限定。
在实施中,负载监控服务器收集到的任务执行日志中的相关参数数据是任务执行服务器已经执行完成的数据,具有一定的时延,但可以用于近似表示当前时间的任务分配情况,当前时间被分配的任务越多的任务执行服务器,其任务分配权重越低,并且任务分配权重应该呈极速下降趋势。针对某指定IP地址的任务执行服务器,其任务分配权重可以通过以下公式(2)确定
Figure PCTCN2019073963-appb-000005
Figure PCTCN2019073963-appb-000006
其中,W 2∈(0,1]。例如,如果单位时间内处理的任务总数量为21,即k=21,则任务执行服务器的任务分配权重W 2=1/(21)!。
第三种,考虑到任务执行服务器的任务处理速度情况在上述计算规则或计算原则中优先级较高,也即是任务执行服务器的任务处理速度,对任务的分配有一定的影响,因此,任务处理权重可以包括任务执行服务器的任务处理速度权重,则上述步骤S406的处理具体可以为:根据任务超时时间的上限,以及近期预定次数的任务处理的平均时长,确定任务执行服务器的任务处理速度权重。
其中,近期预定次数可以根据实际情况设定,具体如最近5次或最近10次等,本说明书实施例对此不做限定。
在实施中,近期预定次数的任务处理的平均时长可以通过如下公式(3)确定
Figure PCTCN2019073963-appb-000007
其中,n为次数,N为近期预定次数中的最大次数,Δt n为第n次任务的单次执行时间,
Figure PCTCN2019073963-appb-000008
为近期N次数的任务处理的平均时长。
为了简化计算,以及便于后续进行归一化处理,在计算时如果出现超过了任务超时时 间的上限α exp的情况,则将Δt n取值为α exp
根据上述第三方面的计算规则或计算原则,如果近期预定次数的任务处理的平均时长较长,则任务执行服务器的任务处理速度权重较低,并且随着近期预定次数的任务处理的平均时长的增加而单调递减。最终,任务处理速度权重可以通过以下公式确定
Figure PCTCN2019073963-appb-000009
其中,
Figure PCTCN2019073963-appb-000010
W 3∈(0,1)。
通过上述公式(4)可以得到,当近期N次的任务处理的平均时长接近任务超时时间的上限时,任务处理速度权重趋近于0,而当近期N次的任务处理的平均时长接近于0时,任务处理速度权重接近1,满足上述第三方面的计算规则或计算原则的要求。其中,上述公式(4)中引入自然底数e的目的在于归一化,并且使任务处理速度权重对应的函数的变化更加平滑。
第四种,考虑到任务执行服务器的历史处理性能,对任务的分配有一定的影响,因此,任务处理权重可以包括任务执行服务器的历史处理性能权重,则上述步骤S406的处理具体可以为:根据任务超时时间的上限和近期预定次数的任务处理的平均时长,确定任务执行服务器的历史处理性能权重。
其中,历史处理性能可以分为两个部分,即历史处理时长和历史处理抖动,相应的,历史处理性能权重可以包括历史处理时长子权重和历史处理抖动子权重,则上述处理过程具体可以为:分别根据任务超时时间的上限和近期预定次数的任务处理的平均时长,确定任务执行服务器的历史处理时长子权重和历史处理抖动子权重;根据历史处理时长子权重和历史处理抖动子权重,确定历史处理性能权重。
在实施中,历史处理时长越长,说明任务执行服务器的性能不足,历史处理时长子权重越低;历史处理抖动越明显,说明任务执行服务器的处理不稳定,历史处理抖动子权重越低。同时,考虑到距离当前时间较久的历史数据,其计算参考价值较低,而距离当前时间较近的历史数据,其计算参考价值较高,因此,历史数据距离当前时间的长短也是历史处理性能权重计算中需要考量的因素。
可以将历史处理时长子权重记为H 1,历史处理时长子权重可以通过以下公式(5)确定
Figure PCTCN2019073963-appb-000011
其中,Δt n∈(0,α exp),H 1∈(0,1),n的取值含义表示距离当前最近的第n次处理,n的取值越大表示该历史数据距离当前时间越长。从上述公式(5)中可以得到,距离当前时间越长的历史数据,历史处理时长子权重的取值越小,并且呈指数下降的趋势。
可以将历史处理抖动子权重记为H 2,历史处理抖动子权重可以通过以下公式(6)确定
Figure PCTCN2019073963-appb-000012
其中,Δt n∈(0,α exp),H 2∈(0,1),上述公式(6)中采用方差来估计历史处理抖动子权重,与历史处理时长子权重相同。对于历史处理抖动子权重的计算,距离当前时间越长的历史数据,历史处理抖动子权重的取值越小。
通过上述历史处理时长子权重和历史处理抖动子权重的计算,可以得到最终的历史处理性能权重W 4,计算公式可如下公式(7)
Figure PCTCN2019073963-appb-000013
其中,W 4∈(0,1)。通过上述公式(7)可以确定,历史处理时长越长、历史处理抖动越明显的任务执行服务器,其历史处理性能权重越低,上述结果与上述第四方面的计算规则或计算原则相符。
上述四种任务处理权重中的任一种任务处理权重均可以作为用于向任务执行服务器分配任务的任务处理权重,上述四种任务处理权重的具体计算方法可以参见上述相关内容。在实际应用中,上述四种任务处理权重中的两种或两种以上的任务处理权重的组合,也可以作为用于向任务执行服务器分配任务的任务处理权重,其中,任务处理权重可以包括过载权重、任务分配权重、任务处理速度权重和历史处理性能权重等四种,此时,上述确定用于为任务执行服务器分配任务的任务处理权重的处理具体可以通过以下方式实现:根据上述过载权重、任务分配权重、任务处理速度权重和历史处理性能权重,利用以下公式(8)
Figure PCTCN2019073963-appb-000014
计算任务执行服务器的任务处理权重。
其中,W为任务执行服务器的任务处理权重,W 1为任务执行服务器的过载权重,W 2为任务执行服务器的任务分配权重,W 3为任务执行服务器的任务处理速度权重,W 4为任务执行服务器的历史处理性能权重,a∈(0,1),b∈(0,1)。
在实施中,可以根据上述任务执行服务器的过载权重、任务分配权重、任务处理速度权重和历史处理性能权重的影响强弱,对每一个权重设置相应的系数,同时,还需要保证在一定情况下,上述任务执行服务器的过载权重、任务分配权重、任务处理速度权重和历史处理性能权重等四个权重之间的主次关系,因而任务执行服务器的任务处理权重应是以过载权重、任务分配权重、任务处理速度权重和历史处理性能权重为变量的函数,且该函数应符合以下原则:
原则一,单位时间内任务处理的成功率为优先考虑原则,即对于任意两个不同IP地址的任务执行服务器,如果两个任务执行服务器的IP地址为IP1和IP2,IP1的任务执行服务器的过载权重W 1(IP1),IP2的任务执行服务器的过载权重W 1(IP2),且W 1(IP1)>W 1(IP2),则两个任务执行服务器的任务处理权重应满足W(IP1)>W(IP2)。
原则二,任务执行服务器的任务分配权重W 2的影响程度应仅次于任务执行服务器的过载权重W 1。当前处理的任务的数量越多,则表明该任务执行服务器的工作负荷越大。
原则三,任务执行服务器的任务处理速度权重W 3应与任务执行服务器的任务分配权重W 2综合考虑,具体可以通过比例系数进行调节。
原则四,任务执行服务器的历史处理性能权重为辅助考察因素,对任务执行服务器的任务处理权重的影响效果最低。
基于上述四项原则,可以通过公式(8)确定任务执行服务器的任务处理权重
Figure PCTCN2019073963-appb-000015
其中,公式中的(a,b)的参数可以根据实际场景以及业务系统状况的不同而可以选择不同的取值。而且,在同一场景下,可以应用(a,b)向量来获得最佳值。
在步骤S408中,负载监控服务器将上述任务执行服务器的任务处理权重发送给任务分配服务器。
上述步骤S408的步骤内容与上述实施例一中步骤S106的步骤内容相同,上述步骤 S408的具体处理过程可以参见上述实施例一中步骤S106的相关内容,在此不再赘述。
在步骤S410中,任务分配服务器接收任务调度请求,该任务调度请求用于请求为任务执行服务器分配任务。
上述步骤S410的步骤内容与上述实施例一中步骤S302的步骤内容相同,上述步骤S410的具体处理过程可以参见上述实施例一中步骤S302的相关内容,在此不再赘述。
在步骤S412中,任务分配服务器获取用于为上述任务执行服务器分配任务的任务处理权重。
需要说明的是,上述步骤S412的处理是在负载监控服务器向任务分配服务器发送任务处理权重后实现的,在实际应用中,任务分配服务器还可以向负载监控服务器主动获取或拉取任务执行服务器的任务处理权重,具体可以包括以下内容:任务分配服务器从负载监控服务器中获取用于为任务执行服务器分配任务的任务处理权重。
上述具体处理过程可以参见上述相关内容,在此不再赘述。
在步骤S414中,根据上述任务处理权重,任务分配服务器从上述任务调度请求对应的目标任务中为上述任务执行服务器分配任务。
上述步骤S414的步骤内容与上述实施例一中步骤S306的步骤内容相同,上述步骤S414的具体处理过程可以参见上述实施例一中步骤S306的相关内容,在此不再赘述。
在步骤S416中,任务分配服务器以点对点调用的方式,通知任务执行服务器执行为任务执行服务器分配的任务。
在实施中,任务分配服务器获取到负载监控服务器计算的任务处理权重的结果后,可以根据各个任务执行服务器的任务处理权重的数值划分任务调度请求对应的目标任务,可以将目标任务中相应数量的任务划分给对应的任务执行服务器,具体地,当前任务执行服务器分配的任务数量=(当前任务执行服务器的任务处理权重/各个任务执行服务器的任务处理权重的总和)*目标任务的总数量,例如,当前任务执行服务器的任务处理权重为0.3,各个任务执行服务器的任务处理权重的总和为5,目标任务的总数量为50,则当前任务执行服务器分配的任务数量=(0.3/5)*50=3,即需要将目标任务中的3个任务分配给当前任务执行服务器。通过上述方式划分完成后,可以将划分后的相应数量的任务,以点对点调用的方式通知到任务执行服务器,从而可以通过异步任务调度的方式实现为任务执行服务器分配任务的目的,这样,可以通过负载监控服务器收集任务执行服务器的任务执行日志, 并对任务执行日志进行计算分析,得出的结果作为任务执行服务器的任务处理权重,当下一次的任务调度请求到达时,可以根据已经计算好的任务处理权重为各个任务执行服务器分配任务,从而将“调度分配”、“任务执行”、“负载控制”三个处理环节打通,形成完整的闭环,从而可以很好的平衡各个任务执行服务器之间的任务处理数量,避免任务执行服务器的“过载”或“饥饿”现象,能够动态地对当前任务执行服务器的任务处理进行调节,解决了现有随机调度定时任务的弊端。
本说明书实施例提供一种任务的分配方法,通过获取任务执行服务器的任务执行日志,确定用于为任务执行服务器分配任务的任务处理权重,然后,可以将任务执行服务器的任务处理权重发送给任务分配服务器,以使任务分配服务器在接收到任务调度请求时,根据任务处理权重为任务执行服务器分配任务,这样,可以通过收集任务执行服务器的任务执行日志,确定任务执行服务器的任务处理权重,当下一次的任务调度请求到达时,可以根据上述任务处理权重为各个任务执行服务器分配任务,从而将“调度分配”、“任务执行”、“负载控制”三个处理环节形成完整的闭环,从而可以很好的平衡各个任务执行服务器之间的任务处理数量,避免任务执行服务器的“过载”或“饥饿”现象,能够动态地对当前任务执行服务器的任务处理进行调节,解决了随机调度定时任务的弊端。
实施例三
如图5所示,本说明书实施例提供一种任务的分配方法,该方法的执行主体可以为任务分配服务器,其中,该任务分配服务器可以是独立的一个服务器,也可以是由多个服务器组成的服务器集群,而且,如图6所示,该任务分配服务器可以用于向任务执行服务器分配任务等,该任务分配服务器还集成了上述实施例一和实施例二中负载监控服务器的功能。该方法可以用于对任务执行服务器依据任务分配的权重进行任务分配等处理中。该方法具体可以包括以下步骤:
在步骤S502中,获取任务执行服务器的任务执行日志。
上述步骤S502的步骤内容与上述实施例一中步骤S102的步骤内容相同,上述步骤S502的具体处理过程可以参见上述实施例一中步骤S102的相关内容,在此不再赘述。
在步骤S504中,根据上述任务执行日志,确定用于为上述任务执行服务器分配任务的任务处理权重。
上述步骤S504的步骤内容与上述实施例一中步骤S104的步骤内容相同,上述步骤S504的具体处理过程可以参见上述实施例一中步骤S104的相关内容,在此不再赘述。
在步骤S506中,当接收到任务调度请求时,根据上述任务处理权重,从该任务调度请求对应的目标任务中为任务执行服务器分配任务。
上述步骤S506的具体处理过程可以参见上述实施例一中的相关内容,在此不再赘述。
本说明书实施例提供一种任务的分配方法,通过获取任务执行服务器的任务执行日志,确定用于为任务执行服务器分配任务的任务处理权重,然后,可以在接收到任务调度请求时,根据任务处理权重为任务执行服务器分配任务,这样,可以通过收集任务执行服务器的任务执行日志,确定任务执行服务器的任务处理权重,当下一次的任务调度请求到达时,可以根据上述任务处理权重为各个任务执行服务器分配任务,从而将“调度分配”、“任务执行”、“负载控制”三个处理环节形成完整的闭环,从而可以很好的平衡各个任务执行服务器之间的任务处理数量,避免任务执行服务器的“过载”或“饥饿”现象,能够动态地对当前任务执行服务器的任务处理进行调节,解决了随机调度定时任务的弊端。
实施例四
如图7所示,本说明书实施例提供一种任务的分配方法,该方法的执行主体可以为任务分配服务器,其中,该任务分配服务器可以是独立的一个服务器,也可以是由多个服务器组成的服务器集群,而且,如图6所示,该任务分配服务器可以用于向任务执行服务器分配任务等,该任务分配服务器还集成了上述实施例一和实施例二中负载监控服务器的功能。该方法可以用于对任务执行服务器依据任务分配的权重进行任务分配等处理中。该方法具体可以包括以下步骤:
在步骤S702中,获取任务执行服务器的任务执行日志。
在步骤S704中,根据上述任务执行日志中执行任务过程中的相关参数数据,确定任务执行服务器的任务处理统计信息,该任务处理统计信息至少包括以下中的一个或多个:任务超时时间的上限、单位时间内任务处理成功或业务型失败的数量、单位时间内超时完成任务的数量、单位时间内处理的任务总数量、单位时间内由于系统异常导致的任务失败数量。
在步骤S706中,根据任务执行服务器的任务处理统计信息,确定用于为任务执行服务器分配任务的任务处理权重。
其中,任务处理权重可以包括任务执行服务器的过载权重,上述步骤S706的处理具体可以通过以下处理实现:根据单位时间内任务处理成功或业务型失败的数量,以及单位时间内处理的任务总数量,确定任务执行服务器的过载权重。
此外,任务处理权重可以包括任务执行服务器的任务分配权重,上述步骤S706的处理具体可以通过以下处理实现:根据单位时间内处理的任务总数量,确定任务执行服务器的任务分配权重,其中,该任务分配权重与单位时间内处理的任务总数量负相关。
另外,任务处理权重可以包括任务执行服务器的任务处理速度权重,上述步骤S706的处理具体可以通过以下处理实现:根据任务超时时间的上限,以及近期预定次数的任务处理的平均时长,确定任务执行服务器的任务处理速度权重。
此外,任务处理权重可以包括任务执行服务器的历史处理性能权重,上述步骤S706的处理具体可以通过以下处理实现:根据任务超时时间的上限和近期预定次数的任务处理的平均时长,确定任务执行服务器的历史处理性能权重。
另外,任务处理权重可以包括上述过载权重、任务分配权重、任务处理速度权重和历史处理性能权重,上述步骤S706的处理具体可以通过以下处理实现:根据过载权重、任务分配权重、任务处理速度权重和历史处理性能权重,利用公式
Figure PCTCN2019073963-appb-000016
计算任务处理权重。
其中,W为任务处理权重,W 1为过载权重,W 2为任务分配权重,W 3为任务处理速度权重,W 4为历史处理性能权重,a∈(0,1),b∈(0,1)。
在步骤S708中,接收任务调度请求,该任务调度请求用于请求为任务执行服务器分配任务。
在步骤S710中,获取用于为上述任务执行服务器分配任务的任务处理权重。
在步骤S712中,根据上述任务处理权重,从上述任务调度请求对应的目标任务中为上述任务执行服务器分配任务。
在步骤S714中,以点对点调用的方式,通知所述任务执行服务器执行为所述任务执行服务器分配的任务。
上述步骤S702~步骤S714的具体处理过程可以参见上述实施例一和实施例二中的相关内容,在此不再赘述。
本说明书实施例提供一种任务的分配方法,通过获取任务执行服务器的任务执行日志,确定用于为任务执行服务器分配任务的任务处理权重,然后,可以在接收到任务调度请求 时,根据任务处理权重为任务执行服务器分配任务,这样,可以通过收集任务执行服务器的任务执行日志,确定任务执行服务器的任务处理权重,当下一次的任务调度请求到达时,可以根据上述任务处理权重为各个任务执行服务器分配任务,从而将“调度分配”、“任务执行”、“负载控制”三个处理环节形成完整的闭环,从而可以很好的平衡各个任务执行服务器之间的任务处理数量,避免任务执行服务器的“过载”或“饥饿”现象,能够动态地对当前任务执行服务器的任务处理进行调节,解决了随机调度定时任务的弊端。
实施例五
以上为本说明书实施例提供的任务的分配方法,基于同样的思路,本说明书实施例还提供一种任务的分配装置,如图8所示。
该任务的分配装置包括:日志获取模块801、权重确定模块802和权重发送模块803,其中:
日志获取模块801,用于获取任务执行服务器的任务执行日志;
权重确定模块802,用于根据所述任务执行日志,确定用于为所述任务执行服务器分配任务的任务处理权重;
权重发送模块803,用于将所述任务执行服务器的任务处理权重发送给任务分配服务器,以使所述任务分配服务器在接收到任务调度请求时,根据所述任务处理权重为所述任务执行服务器分配任务。
本说明书实施例中,所述权重确定模块802,包括:
统计单元,用于根据所述任务执行日志中执行任务过程中的相关参数数据,确定所述任务执行服务器的任务处理统计信息,所述任务处理统计信息至少包括以下中的一个或多个:任务超时时间的上限、单位时间内任务处理成功或业务型失败的数量、单位时间内超时完成任务的数量、单位时间内处理的任务总数量、单位时间内由于系统异常导致的任务失败数量;
权重确定单元,用于根据所述任务执行服务器的任务处理统计信息,确定用于为所述任务执行服务器分配任务的任务处理权重。
本说明书实施例中,所述任务处理权重包括所述任务执行服务器的过载权重,所述权重确定单元,用于根据所述单位时间内任务处理成功或业务型失败的数量,以及所述单位时间内处理的任务总数量,确定所述任务执行服务器的过载权重。
本说明书实施例中,所述任务处理权重包括所述任务执行服务器的任务分配权重,所述权重确定单元,用于根据所述单位时间内处理的任务总数量,确定所述任务执行服务器的任务分配权重。所述任务分配权重与所述单位时间内处理的任务总数量负相关。
本说明书实施例中,所述任务处理权重包括所述任务执行服务器的任务处理速度权重,所述权重确定单元,用于根据所述任务超时时间的上限,以及近期预定次数的任务处理的平均时长,确定所述任务执行服务器的任务处理速度权重。
本说明书实施例中,所述任务处理权重包括所述任务执行服务器的历史处理性能权重,所述权重确定单元,用于根据所述任务超时时间的上限和近期预定次数的任务处理的平均时长,确定所述任务执行服务器的历史处理性能权重。
本说明书实施例中,所述历史处理性能权重包括历史处理时长子权重和历史处理抖动子权重,所述权重确定单元,用于分别根据所述任务超时时间的上限和近期预定次数的任务处理的平均时长,确定所述任务执行服务器的历史处理时长子权重和所述历史处理抖动子权重;根据所述历史处理时长子权重和所述历史处理抖动子权重,确定所述历史处理性能权重。
本说明书实施例中,所述任务处理权重包括过载权重、任务分配权重、任务处理速度权重和历史处理性能权重,所述权重确定模块802,用于根据所述过载权重、所述任务分配权重、所述任务处理速度权重和所述历史处理性能权重,利用公式
Figure PCTCN2019073963-appb-000017
计算所述任务处理权重;其中,W为所述任务处理权重,W 1为所述过载权重,W 2为所述任务分配权重,W 3为所述任务处理速度权重,W 4为所述历史处理性能权重,a∈(0,1),b∈(0,1)。
本说明书实施例提供一种任务的分配装置,通过获取任务执行服务器的任务执行日志,确定用于为任务执行服务器分配任务的任务处理权重,然后,可以将任务执行服务器的任务处理权重发送给任务分配服务器,以使任务分配服务器在接收到任务调度请求时,根据任务处理权重为任务执行服务器分配任务,这样,可以通过收集任务执行服务器的任务执行日志,确定任务执行服务器的任务处理权重,当下一次的任务调度请求到达时,可以根据上述任务处理权重为各个任务执行服务器分配任务,从而将“调度分配”、“任务执行”、“负载控制”三个处理环节形成完整的闭环,从而可以很好的平衡各个任务执行服务器之 间的任务处理数量,避免任务执行服务器的“过载”或“饥饿”现象,能够动态地对当前任务执行服务器的任务处理进行调节,解决了随机调度定时任务的弊端。
实施例六
基于同样的思路,本说明书实施例还提供一种任务的分配装置,如图9所示。
该任务的分配装置包括:请求接收模块901、权重获取模块902和任务分配模块903,其中:
请求接收模块901,用于接收任务调度请求,所述任务调度请求用于请求为任务执行服务器分配任务;
权重获取模块902,用于获取用于为所述任务执行服务器分配任务的任务处理权重;
任务分配模块903,用于根据所述任务处理权重,从所述任务调度请求对应的目标任务中为所述任务执行服务器分配任务。
本说明书实施例中,所述装置还包括:
通知模块,用于以点对点调用的方式,通知所述任务执行服务器执行为所述任务执行服务器分配的任务。
本说明书实施例中,所述权重获取模块902,用于从负载监控服务器中获取用于为任务执行服务器分配任务的任务处理权重。
本说明书实施例提供一种任务的分配装置,通过获取任务执行服务器的任务执行日志,确定用于为任务执行服务器分配任务的任务处理权重,然后,可以将任务执行服务器的任务处理权重发送给任务分配服务器,以使任务分配服务器在接收到任务调度请求时,根据任务处理权重为任务执行服务器分配任务,这样,可以通过收集任务执行服务器的任务执行日志,确定任务执行服务器的任务处理权重,当下一次的任务调度请求到达时,可以根据上述任务处理权重为各个任务执行服务器分配任务,从而将“调度分配”、“任务执行”、“负载控制”三个处理环节形成完整的闭环,从而可以很好的平衡各个任务执行服务器之间的任务处理数量,避免任务执行服务器的“过载”或“饥饿”现象,能够动态地对当前任务执行服务器的任务处理进行调节,解决了随机调度定时任务的弊端。
实施例七
基于同样的思路,本说明书实施例还提供一种任务的分配装置,如图9所示。
该任务的分配装置包括:日志获取模块1001、权重确定模块1002和任务分配模块1003,其中:
日志获取模块1001,用于获取任务执行服务器的任务执行日志;
权重确定模块1002,用于根据所述任务执行日志,确定用于为所述任务执行服务器分配任务的任务处理权重;
任务分配模块1003,用于当接收到任务调度请求时,根据所述任务处理权重,从所述任务调度请求对应的目标任务中为所述任务执行服务器分配任务。
本说明书实施例中,所述装置还包括:
通知模块,用于以点对点调用的方式,通知所述任务执行服务器执行为所述任务执行服务器分配的任务。
本说明书实施例中,所述权重确定模块1002,包括:
统计单元,用于根据所述任务执行日志中执行任务过程中的相关参数数据,确定所述任务执行服务器的任务处理统计信息,所述任务处理统计信息至少包括以下中的一个或多个:任务超时时间的上限、单位时间内任务处理成功或业务型失败的数量、单位时间内超时完成任务的数量、单位时间内处理的任务总数量、单位时间内由于系统异常导致的任务失败数量;
权重确定单元,用于根据所述任务执行服务器的任务处理统计信息,确定用于为所述任务执行服务器分配任务的任务处理权重。
本说明书实施例提供一种任务的分配装置,通过获取任务执行服务器的任务执行日志,确定用于为任务执行服务器分配任务的任务处理权重,然后,可以在接收到任务调度请求时,根据任务处理权重为任务执行服务器分配任务,这样,可以通过收集任务执行服务器的任务执行日志,确定任务执行服务器的任务处理权重,当下一次的任务调度请求到达时,可以根据上述任务处理权重为各个任务执行服务器分配任务,从而将“调度分配”、“任务执行”、“负载控制”三个处理环节形成完整的闭环,从而可以很好的平衡各个任务执行服务器之间的任务处理数量,避免任务执行服务器的“过载”或“饥饿”现象,能够动态地对当前任务执行服务器的任务处理进行调节,解决了随机调度定时任务的弊端。
实施例八
以上为本说明书实施例提供的任务的分配装置,基于同样的思路,本说明书实施例还 提供一种任务的分配设备,如图11所示。
所述任务的分配设备可以为上述实施例提供的负载监控服务器。
任务的分配设备可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上的处理器1101和存储器1102,存储器1102中可以存储有一个或一个以上存储应用程序或数据。其中,存储器1102可以是短暂存储或持久存储。存储在存储器1102的应用程序可以包括一个或一个以上模块(图示未示出),每个模块可以包括对任务的分配设备中的一系列计算机可执行指令。更进一步地,处理器1101可以设置为与存储器1102通信,在任务的分配设备上执行存储器1102中的一系列计算机可执行指令。任务的分配设备还可以包括一个或一个以上电源1103,一个或一个以上有线或无线网络接口1104,一个或一个以上输入输出接口1105,一个或一个以上键盘1106。
具体在本实施例中,任务的分配设备包括有存储器,以及一个或一个以上的程序,其中一个或者一个以上程序存储于存储器中,且一个或者一个以上程序可以包括一个或一个以上模块,且每个模块可以包括对任务的分配设备中的一系列计算机可执行指令,且经配置以由一个或者一个以上处理器执行该一个或者一个以上程序包含用于进行以下计算机可执行指令:
获取任务执行服务器的任务执行日志;
根据所述任务执行日志,确定用于为所述任务执行服务器分配任务的任务处理权重;
将所述任务执行服务器的任务处理权重发送给任务分配服务器,以使所述任务分配服务器在接收到任务调度请求时,根据所述任务处理权重为所述任务执行服务器分配任务。
可选地,所述根据所述任务执行日志,确定用于为所述任务执行服务器分配任务的任务处理权重,包括:
根据所述任务执行日志中执行任务过程中的相关参数数据,确定所述任务执行服务器的任务处理统计信息,所述任务处理统计信息至少包括以下中的一个或多个:任务超时时间的上限、单位时间内任务处理成功或业务型失败的数量、单位时间内超时完成任务的数量、单位时间内处理的任务总数量、单位时间内由于系统异常导致的任务失败数量;
根据所述任务执行服务器的任务处理统计信息,确定用于为所述任务执行服务器分配任务的任务处理权重。
可选地,所述任务处理权重包括所述任务执行服务器的过载权重,
所述根据所述任务执行服务器的任务处理统计信息,确定用于为所述任务执行服务器分配任务的任务处理权重,包括:
根据所述单位时间内任务处理成功或业务型失败的数量,以及所述单位时间内处理的任务总数量,确定所述任务执行服务器的过载权重。
可选地,所述任务处理权重包括所述任务执行服务器的任务分配权重,
所述根据所述任务执行服务器的任务处理统计信息,确定用于为所述任务执行服务器分配任务的任务处理权重,包括:
根据所述单位时间内处理的任务总数量,确定所述任务执行服务器的任务分配权重。所述任务分配权重与所述单位时间内处理的任务总数量负相关。
可选地,所述任务处理权重包括所述任务执行服务器的任务处理速度权重,
所述根据所述任务执行服务器的任务处理统计信息,确定用于为所述任务执行服务器分配任务的任务处理权重,包括:
根据所述任务超时时间的上限,以及近期预定次数的任务处理的平均时长,确定所述任务执行服务器的任务处理速度权重。
可选地,所述任务处理权重包括所述任务执行服务器的历史处理性能权重,
所述根据所述任务执行服务器的任务处理统计信息,确定用于为所述任务执行服务器分配任务的任务处理权重,包括:
根据所述任务超时时间的上限和近期预定次数的任务处理的平均时长,确定所述任务执行服务器的历史处理性能权重。
可选地,所述历史处理性能权重包括历史处理时长子权重和历史处理抖动子权重,
所述根据所述任务超时时间的上限和近期预定次数的任务处理的平均时长,确定所述任务执行服务器的历史处理性能权重,包括:
分别根据所述任务超时时间的上限和近期预定次数的任务处理的平均时长,确定所述任务执行服务器的历史处理时长子权重和所述历史处理抖动子权重;
根据所述历史处理时长子权重和所述历史处理抖动子权重,确定所述历史处理性能权重。
可选地,所述任务处理权重包括过载权重、任务分配权重、任务处理速度权重和历史 处理性能权重,
所述确定用于为所述任务执行服务器分配任务的任务处理权重,包括:
根据所述过载权重、所述任务分配权重、所述任务处理速度权重和所述历史处理性能权重,利用公式
Figure PCTCN2019073963-appb-000018
计算所述任务处理权重;其中,W为所述任务处理权重,W 1为所述过载权重,W 2为所述任务分配权重,W 3为所述任务处理速度权重,W 4为所述历史处理性能权重,a∈(0,1),b∈(0,1)。
本说明书实施例提供一种任务的分配设备,通过获取任务执行服务器的任务执行日志,确定用于为任务执行服务器分配任务的任务处理权重,然后,可以将任务执行服务器的任务处理权重发送给任务分配服务器,以使任务分配服务器在接收到任务调度请求时,根据任务处理权重为任务执行服务器分配任务,这样,可以通过收集任务执行服务器的任务执行日志,确定任务执行服务器的任务处理权重,当下一次的任务调度请求到达时,可以根据上述任务处理权重为各个任务执行服务器分配任务,从而将“调度分配”、“任务执行”、“负载控制”三个处理环节形成完整的闭环,从而可以很好的平衡各个任务执行服务器之间的任务处理数量,避免任务执行服务器的“过载”或“饥饿”现象,能够动态地对当前任务执行服务器的任务处理进行调节,解决了随机调度定时任务的弊端。
实施例九
以上为本说明书实施例提供的任务的分配装置,基于同样的思路,本说明书实施例还提供一种任务的分配设备,如图12所示。
所述任务的分配设备可以为上述实施例提供的任务分配服务器。
任务的分配设备可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上的处理器1201和存储器1202,存储器1202中可以存储有一个或一个以上存储应用程序或数据。其中,存储器1202可以是短暂存储或持久存储。存储在存储器1202的应用程序可以包括一个或一个以上模块(图示未示出),每个模块可以包括对任务的分配设备中的一系列计算机可执行指令。更进一步地,处理器1201可以设置为与存储器1202通信,在任务的分配设备上执行存储器1202中的一系列计算机可执行指令。任务的分配设备还可以包 括一个或一个以上电源1203,一个或一个以上有线或无线网络接口1204,一个或一个以上输入输出接口1205,一个或一个以上键盘1206。
具体在本实施例中,任务的分配设备包括有存储器,以及一个或一个以上的程序,其中一个或者一个以上程序存储于存储器中,且一个或者一个以上程序可以包括一个或一个以上模块,且每个模块可以包括对任务的分配设备中的一系列计算机可执行指令,且经配置以由一个或者一个以上处理器执行该一个或者一个以上程序包含用于进行以下计算机可执行指令:
接收任务调度请求,所述任务调度请求用于请求为任务执行服务器分配任务;
获取用于为所述任务执行服务器分配任务的任务处理权重;
根据所述任务处理权重,从所述任务调度请求对应的目标任务中为所述任务执行服务器分配任务。
可选地,还包括:
以点对点调用的方式,通知所述任务执行服务器执行为所述任务执行服务器分配的任务。
可选地,所述获取用于为任务执行服务器分配任务的任务处理权重,包括:
从负载监控服务器中获取用于为任务执行服务器分配任务的任务处理权重。
另外,具体在本实施例中,任务的分配设备包括有存储器,以及一个或一个以上的程序,其中一个或者一个以上程序存储于存储器中,且一个或者一个以上程序可以包括一个或一个以上模块,且每个模块可以包括对任务的分配设备中的一系列计算机可执行指令,且经配置以由一个或者一个以上处理器执行该一个或者一个以上程序包含用于进行以下计算机可执行指令:
获取任务执行服务器的任务执行日志;
根据所述任务执行日志,确定用于为所述任务执行服务器分配任务的任务处理权重;
当接收到任务调度请求时,根据所述任务处理权重,从所述任务调度请求对应的目标任务中为所述任务执行服务器分配任务。
可选地,还包括:
以点对点调用的方式,通知所述任务执行服务器执行为所述任务执行服务器分配的任 务。
可选地,所述根据所述任务执行日志,确定用于为所述任务执行服务器分配任务的任务处理权重,包括:
根据所述任务执行日志中执行任务过程中的相关参数数据,确定所述任务执行服务器的任务处理统计信息,所述任务处理统计信息至少包括以下中的一个或多个:任务超时时间的上限、单位时间内任务处理成功或业务型失败的数量、单位时间内超时完成任务的数量、单位时间内处理的任务总数量、单位时间内由于系统异常导致的任务失败数量;
根据所述任务执行服务器的任务处理统计信息,确定用于为所述任务执行服务器分配任务的任务处理权重。
本说明书实施例提供一种任务的分配设备,通过获取任务执行服务器的任务执行日志,确定用于为任务执行服务器分配任务的任务处理权重,然后,可以在接收到任务调度请求时,根据任务处理权重为任务执行服务器分配任务,这样,可以通过收集任务执行服务器的任务执行日志,确定任务执行服务器的任务处理权重,当下一次的任务调度请求到达时,可以根据上述任务处理权重为各个任务执行服务器分配任务,从而将“调度分配”、“任务执行”、“负载控制”三个处理环节形成完整的闭环,从而可以很好的平衡各个任务执行服务器之间的任务处理数量,避免任务执行服务器的“过载”或“饥饿”现象,能够动态地对当前任务执行服务器的任务处理进行调节,解决了随机调度定时任务的弊端。
上述对本说明书特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。
在20世纪90年代,对于一个技术的改进可以很明显地区分是硬件上的改进(例如,对二极管、晶体管、开关等电路结构的改进)还是软件上的改进(对于方法流程的改进)。然而,随着技术的发展,当今的很多方法流程的改进已经可以视为硬件电路结构的直接改进。设计人员几乎都通过将改进的方法流程编程到硬件电路中来得到相应的硬件电路结构。因此,不能说一个方法流程的改进就不能用硬件实体模块来实现。例如,可编程逻辑器件(Programmable Logic Device,PLD)(例如现场可编程门阵列(Field Programmable Gate Array,FPGA))就是这样一种集成电路,其逻辑功能由用户对器件编程来确定。由设计人员自行 编程来把一个数字系统“集成”在一片PLD上,而不需要请芯片制造厂商来设计和制作专用的集成电路芯片。而且,如今,取代手工地制作集成电路芯片,这种编程也多半改用“逻辑编译器(logic compiler)”软件来实现,它与程序开发撰写时所用的软件编译器相类似,而要编译之前的原始代码也得用特定的编程语言来撰写,此称之为硬件描述语言(Hardware Description Language,HDL),而HDL也并非仅有一种,而是有许多种,如ABEL(Advanced Boolean Expression Language)、AHDL(Altera Hardware Description Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL(Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby Hardware Description Language)等,目前最普遍使用的是VHDL(Very-High-Speed Integrated Circuit Hardware Description Language)与Verilog。本领域技术人员也应该清楚,只需要将方法流程用上述几种硬件描述语言稍作逻辑编程并编程到集成电路中,就可以很容易得到实现该逻辑方法流程的硬件电路。
控制器可以按任何适当的方式实现,例如,控制器可以采取例如微处理器或处理器以及存储可由该(微)处理器执行的计算机可读程序代码(例如软件或固件)的计算机可读介质、逻辑门、开关、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程逻辑控制器和嵌入微控制器的形式,控制器的例子包括但不限于以下微控制器:ARC625D、Atmel AT91SAM、Microchip PIC18F26K20以及Silicone Labs C8051F320,存储器控制器还可以被实现为存储器的控制逻辑的一部分。本领域技术人员也知道,除了以纯计算机可读程序代码方式实现控制器以外,完全可以通过将方法步骤进行逻辑编程来使得控制器以逻辑门、开关、专用集成电路、可编程逻辑控制器和嵌入微控制器等的形式来实现相同功能。因此这种控制器可以被认为是一种硬件部件,而对其内包括的用于实现各种功能的装置也可以视为硬件部件内的结构。或者甚至,可以将用于实现各种功能的装置视为既可以是实现方法的软件模块又可以是硬件部件内的结构。
上述实施例阐明的系统、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机。具体的,计算机例如可以为个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任何设备的组合。
为了描述的方便,描述以上装置时以功能分为各种单元分别描述。当然,在实施本说明书一个或多个实施例时可以把各单元的功能在同一个或多个软件和/或硬件中实现。
本领域内的技术人员应明白,本说明书的实施例可提供为方法、系统、或计算机程序产品。因此,本说明书一个或多个实施例可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本说明书一个或多个实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本说明书的实施例是参照根据本说明书实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、 电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。
本领域技术人员应明白,本说明书的实施例可提供为方法、系统或计算机程序产品。因此,本说明书一个或多个实施例可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本说明书一个或多个实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本说明书一个或多个实施例可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本说明书一个或多个实施例,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
以上所述仅为本说明书的实施例而已,并不用于限制本说明书。对于本领域技术人员来说,本说明书可以有各种更改和变化。凡在本说明书的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本说明书的权利要求范围之内。

Claims (31)

  1. 一种任务的分配方法,所述方法包括:
    获取任务执行服务器的任务执行日志;
    根据所述任务执行日志,确定用于为所述任务执行服务器分配任务的任务处理权重;
    将所述任务执行服务器的任务处理权重发送给任务分配服务器,以使所述任务分配服务器在接收到任务调度请求时,根据所述任务处理权重为所述任务执行服务器分配任务。
  2. 根据权利要求1所述的方法,所述根据所述任务执行日志,确定用于为所述任务执行服务器分配任务的任务处理权重,包括:
    根据所述任务执行日志中执行任务过程中的相关参数数据,确定所述任务执行服务器的任务处理统计信息,所述任务处理统计信息至少包括以下中的一个或多个:任务超时时间的上限、单位时间内任务处理成功或业务型失败的数量、单位时间内超时完成任务的数量、单位时间内处理的任务总数量、单位时间内由于系统异常导致的任务失败数量;
    根据所述任务执行服务器的任务处理统计信息,确定用于为所述任务执行服务器分配任务的任务处理权重。
  3. 根据权利要求2所述的方法,所述任务处理权重包括所述任务执行服务器的过载权重,
    所述根据所述任务执行服务器的任务处理统计信息,确定用于为所述任务执行服务器分配任务的任务处理权重,包括:
    根据所述单位时间内任务处理成功或业务型失败的数量,以及所述单位时间内处理的任务总数量,确定所述任务执行服务器的过载权重。
  4. 根据权利要求2所述的方法,所述任务处理权重包括所述任务执行服务器的任务分配权重,
    所述根据所述任务执行服务器的任务处理统计信息,确定用于为所述任务执行服务器分配任务的任务处理权重,包括:
    根据所述单位时间内处理的任务总数量,确定所述任务执行服务器的任务分配权重。所述任务分配权重与所述单位时间内处理的任务总数量负相关。
  5. 根据权利要求2所述的方法,所述任务处理权重包括所述任务执行服务器的任务处理速度权重,
    所述根据所述任务执行服务器的任务处理统计信息,确定用于为所述任务执行服务 器分配任务的任务处理权重,包括:
    根据所述任务超时时间的上限,以及近期预定次数的任务处理的平均时长,确定所述任务执行服务器的任务处理速度权重。
  6. 根据权利要求2所述的方法,所述任务处理权重包括所述任务执行服务器的历史处理性能权重,
    所述根据所述任务执行服务器的任务处理统计信息,确定用于为所述任务执行服务器分配任务的任务处理权重,包括:
    根据所述任务超时时间的上限和近期预定次数的任务处理的平均时长,确定所述任务执行服务器的历史处理性能权重。
  7. 根据权利要求6所述的方法,所述历史处理性能权重包括历史处理时长子权重和历史处理抖动子权重,
    所述根据所述任务超时时间的上限和近期预定次数的任务处理的平均时长,确定所述任务执行服务器的历史处理性能权重,包括:
    分别根据所述任务超时时间的上限和近期预定次数的任务处理的平均时长,确定所述任务执行服务器的历史处理时长子权重和所述历史处理抖动子权重;
    根据所述历史处理时长子权重和所述历史处理抖动子权重,确定所述历史处理性能权重。
  8. 根据权利要求1所述的方法,所述任务处理权重包括过载权重、任务分配权重、任务处理速度权重和历史处理性能权重,
    所述确定用于为所述任务执行服务器分配任务的任务处理权重,包括:
    根据所述过载权重、所述任务分配权重、所述任务处理速度权重和所述历史处理性能权重,利用公式
    Figure PCTCN2019073963-appb-100001
    计算所述任务处理权重;其中,W为所述任务处理权重,W 1为所述过载权重,W 2为所述任务分配权重,W 3为所述任务处理速度权重,W 4为所述历史处理性能权重,a∈(0,1),b∈(0,1)。
  9. 一种任务的分配方法,所述方法包括:
    接收任务调度请求,所述任务调度请求用于请求为任务执行服务器分配任务;
    获取用于为所述任务执行服务器分配任务的任务处理权重;
    根据所述任务处理权重,从所述任务调度请求对应的目标任务中为所述任务执行服 务器分配任务。
  10. 根据权利要求9所述的方法,所述方法还包括:
    以点对点调用的方式,通知所述任务执行服务器执行为所述任务执行服务器分配的任务。
  11. 根据权利要求9所述的方法,所述获取用于为任务执行服务器分配任务的任务处理权重,包括:
    从负载监控服务器中获取用于为任务执行服务器分配任务的任务处理权重。
  12. 一种任务的分配方法,所述方法包括:
    获取任务执行服务器的任务执行日志;
    根据所述任务执行日志,确定用于为所述任务执行服务器分配任务的任务处理权重;
    当接收到任务调度请求时,根据所述任务处理权重,从所述任务调度请求对应的目标任务中为所述任务执行服务器分配任务。
  13. 根据权利要求12所述的方法,所述方法还包括:
    以点对点调用的方式,通知所述任务执行服务器执行为所述任务执行服务器分配的任务。
  14. 根据权利要求13所述的方法,所述根据所述任务执行日志,确定用于为所述任务执行服务器分配任务的任务处理权重,包括:
    根据所述任务执行日志中执行任务过程中的相关参数数据,确定所述任务执行服务器的任务处理统计信息,所述任务处理统计信息至少包括以下中的一个或多个:任务超时时间的上限、单位时间内任务处理成功或业务型失败的数量、单位时间内超时完成任务的数量、单位时间内处理的任务总数量、单位时间内由于系统异常导致的任务失败数量;
    根据所述任务执行服务器的任务处理统计信息,确定用于为所述任务执行服务器分配任务的任务处理权重。
  15. 一种任务的分配装置,所述装置包括:
    日志获取模块,用于获取任务执行服务器的任务执行日志;
    权重确定模块,用于根据所述任务执行日志,确定用于为所述任务执行服务器分配任务的任务处理权重;
    权重发送模块,用于将所述任务执行服务器的任务处理权重发送给任务分配服务器,以使所述任务分配服务器在接收到任务调度请求时,根据所述任务处理权重为所述任务执行服务器分配任务。
  16. 根据权利要求15所述的装置,所述权重确定模块,包括:
    统计单元,用于根据所述任务执行日志中执行任务过程中的相关参数数据,确定所述任务执行服务器的任务处理统计信息,所述任务处理统计信息至少包括以下中的一个或多个:任务超时时间的上限、单位时间内任务处理成功或业务型失败的数量、单位时间内超时完成任务的数量、单位时间内处理的任务总数量、单位时间内由于系统异常导致的任务失败数量;
    权重确定单元,用于根据所述任务执行服务器的任务处理统计信息,确定用于为所述任务执行服务器分配任务的任务处理权重。
  17. 根据权利要求16所述的装置,所述任务处理权重包括所述任务执行服务器的过载权重,所述权重确定单元,用于根据所述单位时间内任务处理成功或业务型失败的数量,以及所述单位时间内处理的任务总数量,确定所述任务执行服务器的过载权重。
  18. 根据权利要求16所述的装置,所述任务处理权重包括所述任务执行服务器的任务分配权重,所述权重确定单元,用于根据所述单位时间内处理的任务总数量,确定所述任务执行服务器的任务分配权重。所述任务分配权重与所述单位时间内处理的任务总数量负相关。
  19. 根据权利要求16所述的装置,所述任务处理权重包括所述任务执行服务器的任务处理速度权重,所述权重确定单元,用于根据所述任务超时时间的上限,以及近期预定次数的任务处理的平均时长,确定所述任务执行服务器的任务处理速度权重。
  20. 根据权利要求16所述的装置,所述任务处理权重包括所述任务执行服务器的历史处理性能权重,所述权重确定单元,用于根据所述任务超时时间的上限和近期预定次数的任务处理的平均时长,确定所述任务执行服务器的历史处理性能权重。
  21. 根据权利要求20所述的装置,所述历史处理性能权重包括历史处理时长子权重和历史处理抖动子权重,所述权重确定单元,用于分别根据所述任务超时时间的上限和近期预定次数的任务处理的平均时长,确定所述任务执行服务器的历史处理时长子权重和所述历史处理抖动子权重;根据所述历史处理时长子权重和所述历史处理抖动子权重,确定所述历史处理性能权重。
  22. 根据权利要求15所述的装置,所述任务处理权重包括过载权重、任务分配权重、任务处理速度权重和历史处理性能权重,所述权重确定模块,用于根据所述过载权重、所述任务分配权重、所述任务处理速度权重和所述历史处理性能权重,利用公式
    Figure PCTCN2019073963-appb-100002
    计算所述任务处理权重;其中,W为所述任务处理权重,W 1为所述过载权重,W 2为所述任务分配权重,W 3为所述任务处理速度权重,W 4为所述历史处理性能权重,a∈(0,1),b∈(0,1)。
  23. 一种任务的分配装置,所述装置包括:
    请求接收模块,用于接收任务调度请求,所述任务调度请求用于请求为任务执行服务器分配任务;
    权重获取模块,用于获取用于为所述任务执行服务器分配任务的任务处理权重;
    任务分配模块,用于根据所述任务处理权重,从所述任务调度请求对应的目标任务中为所述任务执行服务器分配任务。
  24. 根据权利要求23所述的装置,所述装置还包括:
    通知模块,用于以点对点调用的方式,通知所述任务执行服务器执行为所述任务执行服务器分配的任务。
  25. 根据权利要求23所述的装置,所述权重获取模块,用于从负载监控服务器中获取用于为任务执行服务器分配任务的任务处理权重。
  26. 一种任务的分配装置,所述装置包括:
    日志获取模块,用于获取任务执行服务器的任务执行日志;
    权重确定模块,用于根据所述任务执行日志,确定用于为所述任务执行服务器分配任务的任务处理权重;
    任务分配模块,用于当接收到任务调度请求时,根据所述任务处理权重,从所述任务调度请求对应的目标任务中为所述任务执行服务器分配任务。
  27. 根据权利要求26所述的装置,所述装置还包括:
    通知模块,用于以点对点调用的方式,通知所述任务执行服务器执行为所述任务执行服务器分配的任务。
  28. 根据权利要求27所述的装置,所述权重确定模块,包括:
    统计单元,用于根据所述任务执行日志中执行任务过程中的相关参数数据,确定所述任务执行服务器的任务处理统计信息,所述任务处理统计信息至少包括以下中的一个或多个:任务超时时间的上限、单位时间内任务处理成功或业务型失败的数量、单位时间内超时完成任务的数量、单位时间内处理的任务总数量、单位时间内由于系统异常导致的任务失败数量;
    权重确定单元,用于根据所述任务执行服务器的任务处理统计信息,确定用于为所述任务执行服务器分配任务的任务处理权重。
  29. 一种任务的分配设备,所述任务的分配设备包括:
    处理器;以及
    被安排成存储计算机可执行指令的存储器,所述可执行指令在被执行时使所述处理器:
    获取任务执行服务器的任务执行日志;
    根据所述任务执行日志,确定用于为所述任务执行服务器分配任务的任务处理权重;
    将所述任务执行服务器的任务处理权重发送给任务分配服务器,以使所述任务分配服务器在接收到任务调度请求时,根据所述任务处理权重为所述任务执行服务器分配任务。
  30. 一种任务的分配设备,所述任务的分配设备包括:
    处理器;以及
    被安排成存储计算机可执行指令的存储器,所述可执行指令在被执行时使所述处理器:
    接收任务调度请求,所述任务调度请求用于请求为任务执行服务器分配任务;
    获取用于为所述任务执行服务器分配任务的任务处理权重;
    根据所述任务处理权重,从所述任务调度请求对应的目标任务中为所述任务执行服务器分配任务。
  31. 一种任务的分配设备,所述任务的分配设备包括:
    处理器;以及
    被安排成存储计算机可执行指令的存储器,所述可执行指令在被执行时使所述处理器:
    获取任务执行服务器的任务执行日志;
    根据所述任务执行日志,确定用于为所述任务执行服务器分配任务的任务处理权重;
    当接收到任务调度请求时,根据所述任务处理权重,从所述任务调度请求对应的目标任务中为所述任务执行服务器分配任务。
PCT/CN2019/073963 2018-04-04 2019-01-30 一种任务的分配方法、装置及设备 WO2019192263A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810298743.XA CN108681484B (zh) 2018-04-04 2018-04-04 一种任务的分配方法、装置及设备
CN201810298743.X 2018-04-04

Publications (1)

Publication Number Publication Date
WO2019192263A1 true WO2019192263A1 (zh) 2019-10-10

Family

ID=63800749

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/073963 WO2019192263A1 (zh) 2018-04-04 2019-01-30 一种任务的分配方法、装置及设备

Country Status (3)

Country Link
CN (1) CN108681484B (zh)
TW (1) TWI701597B (zh)
WO (1) WO2019192263A1 (zh)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108681484B (zh) * 2018-04-04 2020-08-18 阿里巴巴集团控股有限公司 一种任务的分配方法、装置及设备
CN111182011B (zh) * 2018-11-09 2022-06-10 中移(杭州)信息技术有限公司 一种服务集分配方法及装置
CN110795255B (zh) * 2019-10-16 2022-07-08 金蝶软件(中国)有限公司 数据批量值调整方法、装置、可读存储介质和设备
CN110764892A (zh) * 2019-10-22 2020-02-07 北京字节跳动网络技术有限公司 任务处理方法、设备及计算机可读存储介质
CN110990136B (zh) * 2019-11-29 2024-04-09 北京奇艺世纪科技有限公司 一种任务处理方法和任务调度器
CN111367647A (zh) * 2020-03-31 2020-07-03 绿盟科技集团股份有限公司 一种任务指派方法及装置
CN112286672B (zh) * 2020-12-30 2021-05-07 南京智闪萤科技有限公司 用于调度任务的方法、计算设备和计算机存储介质
CN115080193A (zh) * 2021-03-12 2022-09-20 天翼云科技有限公司 分布式环境下的任务处理方法、装置、电子设备和介质
CN113112139A (zh) * 2021-04-07 2021-07-13 上海联蔚盘云科技有限公司 云平台账单的处理方法和设备
CN113242301B (zh) * 2021-05-11 2024-03-26 鸬鹚科技(深圳)有限公司 真实服务器的选定方法、装置、计算机设备及存储介质
CN113467915A (zh) * 2021-07-13 2021-10-01 中科曙光国际信息产业有限公司 作业调度方法、装置、计算机设备及可读存储介质
CN115357257B (zh) * 2022-10-21 2023-01-24 统信软件技术有限公司 一种安装文件生成方法、系统、计算设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103401947A (zh) * 2013-08-20 2013-11-20 曙光信息产业(北京)有限公司 多个服务器的任务分配方法和装置
CN105471985A (zh) * 2015-11-23 2016-04-06 北京农业信息技术研究中心 负载均衡方法及云平台计算方法、云平台
CN106412124A (zh) * 2016-12-01 2017-02-15 广州高能计算机科技有限公司 一种并序化云服务平台任务分配系统及任务分配方法
CN108681484A (zh) * 2018-04-04 2018-10-19 阿里巴巴集团控股有限公司 一种任务的分配方法、装置及设备

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
ES2252462T3 (es) * 2001-05-14 2006-05-16 Telefonaktiebolaget Lm Ericsson (Publ) Supervision de tareas.
US7296269B2 (en) * 2003-04-22 2007-11-13 Lucent Technologies Inc. Balancing loads among computing nodes where no task distributor servers all nodes and at least one node is served by two or more task distributors
US9537973B2 (en) * 2012-11-01 2017-01-03 Microsoft Technology Licensing, Llc CDN load balancing in the cloud
CN103024081B (zh) * 2013-01-04 2016-01-20 福建星网锐捷通讯股份有限公司 适用于有时效保证通讯系统的点对点通讯的终端调度方法
JP2014182653A (ja) * 2013-03-19 2014-09-29 Canon Inc ログ管理システム、ログ管理方法、画像形成装置およびその制御方法、並びにプログラム
CN103281367B (zh) * 2013-05-22 2016-03-02 北京蓝汛通信技术有限责任公司 一种负载均衡方法及装置
CN106657399B (zh) * 2017-02-20 2020-08-18 北京奇虎科技有限公司 基于中间件实现的后台服务器选择方法及装置
CN107819626A (zh) * 2017-11-15 2018-03-20 广州天源信息科技股份有限公司 基于日志监控分析实现负载均衡器调整分发的方法及系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103401947A (zh) * 2013-08-20 2013-11-20 曙光信息产业(北京)有限公司 多个服务器的任务分配方法和装置
CN105471985A (zh) * 2015-11-23 2016-04-06 北京农业信息技术研究中心 负载均衡方法及云平台计算方法、云平台
CN106412124A (zh) * 2016-12-01 2017-02-15 广州高能计算机科技有限公司 一种并序化云服务平台任务分配系统及任务分配方法
CN108681484A (zh) * 2018-04-04 2018-10-19 阿里巴巴集团控股有限公司 一种任务的分配方法、装置及设备

Also Published As

Publication number Publication date
TWI701597B (zh) 2020-08-11
CN108681484B (zh) 2020-08-18
TW201942739A (zh) 2019-11-01
CN108681484A (zh) 2018-10-19

Similar Documents

Publication Publication Date Title
WO2019192263A1 (zh) 一种任务的分配方法、装置及设备
WO2020228177A1 (zh) 批量数据处理方法、装置、计算机设备及存储介质
US20150295970A1 (en) Method and device for augmenting and releasing capacity of computing resources in real-time stream computing system
Mattess et al. Scaling mapreduce applications across hybrid clouds to meet soft deadlines
US11977761B2 (en) Predictive allocation of ephemeral containers for cloud computing services
US11886919B2 (en) Directing queries to nodes of a cluster of a container orchestration platform distributed across a host system and a hardware accelerator of the host system
US9807014B2 (en) Reactive throttling of heterogeneous migration sessions in a virtualized cloud environment
US20170010919A1 (en) Dynamic weight accumulation for fair allocation of resources in a scheduler hierarchy
WO2017028696A1 (zh) 分布式存储系统的负载监控方法及设备
EP3575979B1 (en) Query priority and operation-aware communication buffer management
WO2015001850A1 (ja) タスク割り当て判定装置、制御方法、及びプログラム
JP2016042284A (ja) 並列計算機システム、管理装置、並列計算機システムの制御方法及び管理装置の制御プログラム
US20220329651A1 (en) Apparatus for container orchestration in geographically distributed multi-cloud environment and method using the same
Komarasamy et al. A novel approach for Dynamic Load Balancing with effective Bin Packing and VM Reconfiguration in cloud
WO2020224531A1 (zh) 存储系统中令牌的分配方法和装置
Vashishth et al. A predictive approach to task scheduling for Big Data in cloud environments using classification algorithms
CN111930516B (zh) 一种负载均衡方法及相关装置
Kumar et al. Load balancing algorithm to minimize the makespan time in cloud environment
WO2020088078A1 (zh) 一种基于fpga的数据处理方法、装置、设备及介质
Guo Ant colony optimization computing resource allocation algorithm based on cloud computing environment
CN109391663B (zh) 一种访问请求的处理方法与设备
Divya et al. Workload characteristics and resource aware Hadoop scheduler
CN113760549B (zh) 一种pod部署方法及装置
Liu et al. Improving resource utilization of a cloud-based testing platform for android applications
JP2012133629A (ja) ストレージリソース制御システムおよびストレージリソース制御プログラムならびにストレージリソース制御方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19782265

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19782265

Country of ref document: EP

Kind code of ref document: A1