WO2020000668A1 - Procédé et serveur d'exécution de tâche basée sur un groupe de serveurs - Google Patents

Procédé et serveur d'exécution de tâche basée sur un groupe de serveurs Download PDF

Info

Publication number
WO2020000668A1
WO2020000668A1 PCT/CN2018/105279 CN2018105279W WO2020000668A1 WO 2020000668 A1 WO2020000668 A1 WO 2020000668A1 CN 2018105279 W CN2018105279 W CN 2018105279W WO 2020000668 A1 WO2020000668 A1 WO 2020000668A1
Authority
WO
WIPO (PCT)
Prior art keywords
service
preset
preset task
task
resource usage
Prior art date
Application number
PCT/CN2018/105279
Other languages
English (en)
Chinese (zh)
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 WO2020000668A1 publication Critical patent/WO2020000668A1/fr

Links

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/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues

Definitions

  • the present application belongs to the field of computer technology, and in particular, relates to a server cluster-based task execution method and a server.
  • the embodiments of the present application provide a server cluster-based task execution method and server to solve the problem that in the prior art, the server only runs a fixed task, and each task may have a different amount of concurrency in different time periods. Different processing pressures may result in wasted server resources.
  • a first aspect of the embodiments of the present application provides a server cluster-based task execution method, including:
  • the first preset task and the second preset task are executed at the same time, if the current resource usage rate is greater than or equal to a second preset threshold, stopping the execution of the second preset task; wherein, the The first preset threshold is smaller than the second preset threshold.
  • a second aspect of the embodiments of the present application provides a server, including:
  • a task obtaining unit configured to obtain a first preset task corresponding to a cluster to which it belongs and a second preset task corresponding to another cluster;
  • a prediction unit configured to predict a resource usage rate corresponding to the execution of the first preset task
  • a task execution unit configured to execute the second preset task if the resource usage rate is less than a first preset threshold
  • a task termination unit configured to stop executing the second preset when the first preset task and the second preset task are executed simultaneously, and if the current resource usage rate is greater than or equal to a second preset threshold A task; wherein the first preset threshold is smaller than the second preset threshold.
  • a third aspect of the embodiments of the present application provides a server, including a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, where the processor executes the computer-readable The following steps are implemented when the instruction is read:
  • the first preset task and the second preset task are executed at the same time, if the current resource usage rate is greater than or equal to a second preset threshold, stopping the execution of the second preset task; wherein, the The first preset threshold is smaller than the second preset threshold.
  • a fourth aspect of the embodiments of the present application provides a computer-readable storage medium.
  • the computer-readable storage medium stores computer-readable instructions. When the computer-readable instructions are executed by a processor, the following steps are implemented:
  • the first preset task and the second preset task are executed at the same time, if the current resource usage rate is greater than or equal to a second preset threshold, stopping the execution of the second preset task; wherein, the The first preset threshold is smaller than the second preset threshold.
  • the node server when the node server detects that the resource usage rate of the first preset task corresponding to the cluster in which it is currently present is less than the first preset threshold, the node server executes the second preset task of other clusters. When the first preset task is executed, the second preset task is executed.
  • system resources are reserved for the execution of the first preset task, even if the first preset task is suddenly started when the second preset task is executed, it will not affect The processing speed of the first preset task; or when performing the first preset task, use the surplus system resources to execute the second preset task, without affecting the processing of the first preset task, on the one hand, it can make full use of this Node system resources, on the other hand, can ease the pressure of data processing in other clusters and improve the overall data processing efficiency.
  • FIG. 1 is an implementation flowchart of a server cluster-based task execution method according to an embodiment of the present application
  • FIG. 2 is an implementation flowchart of a server cluster-based task execution method according to another embodiment of the present application.
  • FIG. 3 is a structural block diagram of a server according to an embodiment of the present application.
  • FIG. 4 is a schematic diagram of a server according to another embodiment of the present application.
  • FIG. 1 is an implementation flowchart of a server cluster-based task execution method according to an embodiment of the present application.
  • the execution subject of the server cluster-based task execution method in this embodiment is a node server in the cluster.
  • a cluster includes multiple node servers, and the node servers in multiple clusters are uniformly scheduled by the management server for task scheduling.
  • the method for performing a task based on a server cluster as shown in the figure may include:
  • S101 Obtain a first preset task corresponding to a cluster to which it belongs and a second preset task corresponding to other clusters.
  • the management server usually deploys preset tasks according to the cluster.
  • a cluster executes the preset tasks corresponding to the cluster to which it belongs, it can also decide whether to execute the preset tasks corresponding to other clusters according to the actual situation.
  • a preset task corresponding to a cluster refers to a task that a node server in the cluster must perform, that is, a preset task corresponding to the cluster has the highest priority.
  • the management server deploys the preset tasks corresponding to the other clusters to the node server of the cluster, the priorities of the preset tasks corresponding to the other clusters are lower than the preset tasks corresponding to the cluster.
  • the management server can deploy the preset tasks T1 and T2 to S1 and S2.
  • S1 the priority of T1 is higher than the priority of T2, and the node server in S1 executes the preset task T1 first;
  • the priority of T2 is lower than that of T1, and the node server in S2 performs the preset task T2 first.
  • S1 runs only T1, and S2 runs only T2.
  • T1 can be the bank's external business, such as deposit and withdrawal business, insurance business, etc.
  • other server clusters T2 can be the bank's internal business, such as bank reconciliation business.
  • Other server clusters refer to server clusters other than server cluster S1.
  • first preset task and the second preset task may be a task or a type of task, which is not limited herein.
  • the node server may predict resource information consumed when the first preset task is performed when the first preset task is not currently performed, so as to obtain a resource utilization rate when the first preset task is performed.
  • Resource utilization includes memory usage and / or central processing unit (CPU) usage.
  • the resource usage rate corresponding to the execution of the first preset task represents how much system resources are required to perform the first preset task.
  • the node server may also obtain the resource usage rate corresponding to the execution of the first preset task in real time or at a preset time interval during the execution of the first preset task, thereby predicting the utilization rate of the first preset task for a period of time. Corresponding resource usage.
  • the node server may preset a scheduled task started at a preset time interval, and when the current time reaches the start time of the preset time interval, start the scheduled task to obtain the resource usage rate corresponding to the execution of the first preset task.
  • a scheduled task is a task that is started and executed at a preset timing. The timing task is used to obtain a resource usage rate corresponding to the execution of the first preset task.
  • S102 may specifically include: acquiring the first preset time period for each preset period. Set the historical resource usage rate and historical business data amount corresponding to the task; according to the current business data amount corresponding to the first preset task, the historical resource usage rate of each of the preset periods, and the The historical service data amount predicts a resource usage rate corresponding to performing the first preset task.
  • the node server can obtain the historical resource usage rate when the node server executes the first preset task in the preset statistical period from the database, and extract the historical resource usage rate corresponding to the execution of the first preset task in each preset period and Historical business data amount, and then determine the preset time period to which the current moment belongs, according to the preset time period to which the current moment belongs, the current amount of business data corresponding to the first preset task, and the execution of the first preset task corresponding to each preset period Historical resource usage rate and historical business data volume to predict the resource usage rate corresponding to the execution of the first preset task.
  • the preset statistical period may be one week, or 15 days or one month.
  • the specific statistical period may be set according to actual needs. Each statistical period includes multiple different preset periods each day.
  • the node server may obtain a graph of historical resource usage rate and historical business data amount, where the graph includes the resource usage rate of the node server when performing the first preset task in each preset time period, and the node server may Based on the graph, the current time, and the current amount of business data corresponding to the first preset task, a resource usage rate corresponding to the execution of the first preset task is predicted. Specifically, the ratio between the current amount of business data corresponding to the first preset task and the amount of historical business data corresponding to the preset time period to which the current time belongs, and the historical resource usage rate corresponding to the preset time period to which the current time belongs. To predict the resource usage rate corresponding to the execution of the first preset task.
  • the node server When the node server obtains the resource usage rate corresponding to the execution of the first preset task, it compares the resource usage rate corresponding to the execution of the first preset task with the first preset threshold.
  • the first preset threshold may be 80%, but is not limited thereto, and may be specifically set according to actual conditions, for example, set according to resources consumed by the node server in performing the first preset task, and is not limited herein.
  • the resource utilization rate includes a memory utilization rate and a CPU utilization rate
  • the first preset threshold includes a first memory utilization rate threshold and a first CPU utilization rate threshold.
  • the comparison result is that the resource usage rate corresponding to the first preset task is less than the first preset threshold, it is determined that when the node server executes the first preset task, there are still surplus system resources to perform operations other than the first preset task.
  • External tasks can share the second preset task of other clusters and execute S103; when the comparison result is that the first preset task corresponds to a resource usage rate that is greater than or equal to the first preset threshold, no processing is performed, waiting Perform the first preset task.
  • the resource utilization includes the memory usage rate and the CPU usage rate
  • the corresponding memory usage rate when executing the first preset task is less than the first memory usage threshold value
  • the corresponding CPU when executing the first preset task If the usage rate is less than the first CPU usage threshold value, the comparison result indicates that the resource usage rate corresponding to the first preset task is less than the first preset threshold value, and S103 is executed; if the memory usage rate corresponding to the first preset task is executed, Is greater than or equal to the first memory usage threshold, or the CPU usage corresponding to the first preset task is greater than or equal to the first CPU usage threshold, then the comparison result is the resource usage corresponding to the first preset task The rate is greater than or equal to a first preset threshold.
  • the node server may be currently performing the first preset task, or may not be performing the first preset task.
  • the node server determines that the corresponding resource utilization rate when performing the first preset task is less than the first resource utilization rate, or when performing the first preset task, When the corresponding CPU usage is greater than or equal to the first CPU usage threshold, the second preset task is executed, and at this time, the node server still has surplus system resources to perform tasks other than the first preset task.
  • the resource utilization rate includes the memory usage rate and the CPU usage rate
  • the corresponding memory usage rate when performing the first preset task is less than the first memory usage threshold
  • the corresponding CPU usage rate when the first preset task is executed When it is less than the first CPU usage threshold, a second preset task is executed.
  • the node server obtains the priority of the second preset task, and determines and executes the priority according to the priority of the second preset task from high to low.
  • the second highest preset task The priority of the second preset task can be dynamically adjusted according to the emergency situation and importance of the task.
  • the current resource utilization rate can be obtained.
  • the second priority task with the highest priority is not executed.
  • the second preset task is added in order from high to low priority.
  • the node server executes the first preset task and the second preset task at the same time, the node server obtains the current resource usage rate. If the current resource usage rate is greater than or equal to the second preset threshold, the node server stops executing the second preset task.
  • the second preset threshold is greater than the first preset threshold.
  • the first preset threshold is 80% and the second preset threshold is 90%, but it is not limited to this. It can be set according to actual conditions. limit.
  • the second preset task is at least two items, and the current resource utilization is greater than or equal to the second preset threshold, the priority is given. Stop execution of the second preset task with the lowest priority. If the resource utilization of the second preset task with the lowest priority is still greater than or equal to the second preset threshold, stop execution of the second lowest priority task. Two preset tasks, and so on, until the first preset task and the second preset task are executed at the same time, the current resource usage is less than the second preset threshold; or until all the second preset tasks are terminated.
  • the method may further include: if the resource usage rate is less than a preset threshold and the end time corresponding to the execution time required to execute the first preset task, continue to start the second item according to the priority of the second preset task.
  • the second preset task when the resource usage rate when executing at least two second preset tasks is greater than or equal to the second preset threshold, the second preset task is gradually terminated according to the priority of the second preset task from low to high. Set tasks.
  • it may further include: obtaining the resource utilization rate corresponding to the first preset task that is not performed: If the first preset task and a resource usage rate corresponding to the first preset task is less than a third preset threshold, the second preset task is executed.
  • the third preset threshold is smaller than the first preset threshold.
  • the first preset threshold may be 80%, and the third preset threshold may be 40%, but is not limited thereto.
  • the third preset threshold can be set according to the system resources required to start the first preset task to ensure that the first preset task can be successfully started. After the successful start, if the current resource usage is greater than or equal to the third preset task, When the threshold is set, the execution of the second preset task is stopped to prevent a situation in which the execution of the first preset task is delayed due to the execution of the second preset task.
  • the node server when the node server detects that the resource usage rate of the first preset task corresponding to the cluster in which it is currently present is less than the first preset threshold, the node server executes the second preset task of other clusters. When the first preset task is executed, the second preset task is executed.
  • system resources are reserved for the execution of the first preset task, even if the first preset task is suddenly started when the second preset task is executed, it will not affect The processing speed of the first preset task; or when performing the first preset task, use the surplus system resources to execute the second preset task, without affecting the processing of the first preset task, on the one hand, it can make full use of this
  • the system resources of the node server can ease the data processing pressure of other clusters and improve the overall data processing efficiency.
  • FIG. 2 is an implementation flowchart of a server cluster-based task execution method according to another embodiment of the present application.
  • the execution subject of the server cluster-based task execution method in this embodiment is a node server in the cluster.
  • a cluster includes multiple node servers, and the node servers in multiple clusters are uniformly scheduled by the management server for task scheduling.
  • the method for performing a task based on a server cluster as shown in the figure may include:
  • S201 Obtain a first preset task corresponding to the cluster to which it belongs and a second preset task corresponding to other clusters.
  • S201 in this embodiment is the same as S101 in the previous embodiment.
  • S101 in the previous embodiment For details, refer to the related description of S101 in the previous embodiment, and details are not described herein again.
  • the node server processes different amounts of data, its resource usage varies. Considering that it takes a certain amount of time to start and stop tasks, in order to avoid excessive resource utilization and the inability to terminate the second preset being executed in a timely manner. A situation that the system is stuck or even crashed due to the task occurs, and the server predicts the resource usage rate corresponding to the execution of the first preset task according to the business data corresponding to the first preset task.
  • the server obtains service data corresponding to the first preset task.
  • the business data corresponding to the first preset task is data that needs to be processed when the first preset task is performed, or data that is required for each business processing flow when the first preset task is performed.
  • the node server stores in advance the business processing flow of each business type and the data to be processed in each processing step of each business processing flow.
  • the server cluster-based task execution method may further include: obtaining service ranking information corresponding to the first preset task, where the service ranking information includes service information requested by a customer for processing.
  • the business information that customers apply for includes, but is not limited to, business identification.
  • the service identifier can be a service name or a service number, which is not limited here.
  • S203 Predict the resource usage rate corresponding to the execution of the first preset task according to the service type to which the service data belongs.
  • the node server obtains the service data corresponding to the first preset task, it can determine the service corresponding to the first preset task based on the service data included in each service type and the name or attribute information of the service data corresponding to the first preset task.
  • the type of business to which the data belongs and obtain historical statistics from the database.
  • the historical statistics include the system resources (memory usage and CPU usage) that are consumed when processing the data of each business type, thereby predicting execution based on historical statistics
  • the resource usage rate corresponding to the first preset task are examples of the resource usage rate corresponding to the first preset task.
  • the node server may determine the resource usage rate corresponding to the peak period of the service type according to historical statistical data, and use it as the corresponding value for performing the first preset task. Resource usage.
  • the node server may count the total amount of data of the business data corresponding to the first preset task, and when determining the business type to which the business data belongs, obtain from the historical records the resources that need to be consumed to process the business data of the same data volume of the business type To determine the resource usage rate corresponding to the first preset task.
  • S203 may include S2031 to S2032. details as follows:
  • S2031 Determine the service type to which the customer applies for the service and the number of applications for each of the service types according to the service ranking information.
  • the node server can determine the type of service to which the customer applies for the service according to the service information that the customer applies for and the service identifier contained in each service type contained in the service ranking information; according to the service ranking information of each service type The latest queuing sequence number contained in it counts the number of applications for each business type.
  • Business ranking information may refer to the ranking information of customers when they conduct business at business outlets.
  • S2032 Predict the resource usage rate corresponding to the execution of the first preset task according to the number of applications of each of the service types and the amount of service data of each of the service types.
  • the node server counts the service data amount of each service type according to the service data corresponding to each service type of the first preset task, and the service data amount refers to the number of bits occupied by the service data.
  • the node server determines the amount of concurrent service data that needs to be processed corresponding to each service type according to the number of applications of each of the service types, the amount of service data of each service type, and the maximum concurrent amount that can be processed.
  • the amount of concurrent business data corresponding to that type of business is the product of the number of applications for each business type and the amount of business data for each business type.
  • the amount of concurrent business data corresponding to each business type is the product of the maximum concurrent amount and the amount of business data of each business type.
  • the node server can calculate the resource usage rate of the concurrent service data amount of each service type according to the amount of concurrent service data corresponding to each service type, and according to the service type corresponding to the first preset task, and each service type The resource utilization rate of the amount of concurrent business data, and estimate the resource utilization rate corresponding to the first preset task.
  • the resource usage rate corresponding to the execution of the first preset task may be the sum of the resource usage rates of the concurrent service data volumes of all service types that require concurrent processing.
  • the business ranking information includes the age information of the customer, and S2032 specifically includes the following steps:
  • the node server obtains the historical business transaction records of customers of each age group from the database, and determines, according to the business information that the customer applies for in the business ranking information, that customers of each age group are processing business offices of each type of business.
  • the required time length is obtained as the service processing time length corresponding to each customer of each said service type.
  • the node server determines the processing time required to process the business data of each service type according to the number of applications of each service type, the service processing time corresponding to each customer of each service type, and the maximum concurrent amount supported by each service type.
  • the processing time required to process the business data of that business type is the longest processing time required for a customer to apply for the business of this business type.
  • the processing time required to process the business data of that business type is determined by the maximum concurrent amount, the number of applications, and the longest required time for a customer to apply for the business of the business type. The processing time is determined jointly.
  • the amount of service data for each service type may be the total amount of service data that needs to be processed for a service of that service type once.
  • the node server determines the amount of concurrent business data that needs to be processed corresponding to each business type according to the number of applications for each business type, the amount of business data for each business type, and the maximum concurrent amount supported by each business type. Wherein, when the number of applications of a certain business type is less than the maximum concurrent volume, the amount of concurrent business data corresponding to that business type is the product of the number of applications for each business type and the volume of business data for each business type. When the number of applications of a business type is greater than or equal to the maximum concurrent amount, the amount of concurrent business data corresponding to each business type is the product of the maximum concurrent amount and the amount of business data of each business type.
  • the node server may determine the execution time required to execute the first preset task according to the processing time required for processing the service data of each service type and the amount of concurrent service data corresponding to each service type that needs to be processed.
  • the node server may measure the resource usage rate of the concurrent service data amount of each service type according to the concurrent service data amount corresponding to each service type of the first preset task, so that according to each service type ’s
  • the resource usage rate of the concurrent business data amount and the execution time required to perform the first preset task are estimated to estimate the resource usage rate corresponding to the execution of the first preset task within the execution time.
  • the resource usage rate corresponding to the execution of the first preset task may be the sum of the resource usage rates of the concurrent service data volumes of all service types that require concurrent processing.
  • the node server may obtain the current service ranking.
  • the business ranking information may refer to the ranking information when the customer handles the business at the business outlet.
  • the ranking information may include the queuing number, the customer's personal information, and the type of business the customer wants to handle.
  • Personal information can include age, and can also include the customer's name, ID number, etc.
  • the type of business can be deposit business, withdrawal business, card opening business, etc.
  • the node server determines the type of service to which the customer applies for the service and the number of applications of each type of service according to the service ranking information, and according to the number of applications of each type of service, the age information of the customer applying for each type of service, each The historical application records of customers in the age range, predict the processing time required to process the business data of each business type, and the resource information required to process the business data of each business type, and identify the longest processing time as the The length of time required for a preset task is to identify the sum of the resources that need to be consumed by all service types that need to be processed in parallel as the resource usage rate for performing the first preset task, or when the resource usage rate for each service type is obtained, Predict the resource usage rate of the first preset task according to the maximum resource utilization rate.
  • the node server may calculate the processing time of each service type and the system resources occupied by the processing stages of each step of each service type according to big data. The statistical results can be processed for the entire process.
  • the resource utilization rate change curve of the business is embodied.
  • the type of business that the customer wants to handle is a card sign-up service.
  • the card sign-up service can include the following steps:
  • the staff member inquires the customer's card opening history at the Bank; (2) The staff member recommends the card opening type and the customer fills out the form; (3) Enter the card opening information; (4) The user selects the service satisfaction; and so on.
  • step (1) generally lasts a few seconds, and the memory usage is x%; step (2) generally lasts a few minutes, and the memory usage is generally 0.
  • the method for processing the length of each business type is as follows:
  • the node server can more accurately predict the length of time required for each type of business based on the customer's age information, the historical application records of customers of different age groups, and the type of business. Processing time for each service type.
  • Customer's age information and customer history application records can be obtained from the database.
  • the database can store the corresponding relationship between the customer's age information, business type, customer processing time, and resource usage rate. For example, for customers aged 20-25, the time to process withdrawals may be 10 minutes, but for customers aged 65-60, the time to process withdrawals may take 20 minutes.
  • the historical application record represents the record information when the previous customer came to handle this type of business. It can specifically include the use time of each step when the previous customer went through this type of business. It is assumed that the customer has come to handle ten withdrawals. The average time used can predict the time for customers to handle the withdrawal business this time.
  • the node server obtains the resource usage rate corresponding to the execution of the first preset task, it compares the resource usage rate corresponding to the execution of the first preset task with the first preset threshold.
  • the first preset threshold may be 80%, but is not limited thereto, and may be specifically set according to actual conditions, for example, set according to resources consumed by the node server in performing the first preset task, and is not limited herein.
  • the resource utilization rate includes a memory utilization rate and a CPU utilization rate
  • the first preset threshold includes a first memory utilization rate threshold and a first CPU utilization rate threshold.
  • the comparison result is that the resource usage rate corresponding to the first preset task is less than the first preset threshold, it is determined that when the node server executes the first preset task, there are still surplus system resources to perform operations other than the first preset task.
  • External tasks can share the second preset task of other clusters and execute S103; when the comparison result is that the first preset task corresponds to a resource usage rate that is greater than or equal to the first preset threshold, no processing is performed, waiting Perform the first preset task.
  • the resource utilization includes the memory usage rate and the CPU usage rate
  • the corresponding memory usage rate when executing the first preset task is less than the first memory usage threshold value
  • the corresponding CPU when executing the first preset task If the usage rate is less than the first CPU usage threshold value, the comparison result indicates that the resource usage rate corresponding to the first preset task is less than the first preset threshold value, and S103 is executed; if the memory usage rate corresponding to the first preset task is executed, Is greater than or equal to the first memory usage threshold, or the CPU usage corresponding to the first preset task is greater than or equal to the first CPU usage threshold, then the comparison result is the resource usage corresponding to the first preset task The rate is greater than or equal to a first preset threshold.
  • S204 in this embodiment is the same as S103 in the previous embodiment.
  • S103 in the previous embodiment For details, refer to the related description of S103 in the previous embodiment, and details are not described herein again.
  • S205 in this embodiment is the same as S104 in the previous embodiment.
  • S104 in the previous embodiment For details, refer to the related description of S104 in the previous embodiment, and details are not described herein again.
  • S206 to S206 may also be included.
  • S207 and S202 are side-by-side steps.
  • the schemes corresponding to S201-S205 and the schemes corresponding to S201 and S206-S207 are side-by-side schemes, and the node server selects one to execute.
  • S206 ⁇ S207 are as follows:
  • S206 Acquire an execution period of the first preset task and an execution period of the second preset task; wherein the execution period of the first preset task is different from the execution period of the second preset task .
  • the execution period of the first preset task and the execution period of the second preset task are set in advance and stored in the node server in advance.
  • the first preset task and the second preset task are time-sharing tasks, and the execution period of the first preset task and the execution period of the second preset task do not overlap.
  • the end time of the execution period of the first preset task may be the same as the start time of the execution period of the second preset task, or the start time of the execution period of the first preset task may be the end of the execution period of the second preset task Same moment.
  • the node server when the node server detects that the resource usage rate of the first preset task corresponding to the cluster in which it is currently present is less than the first preset threshold, the node server executes the second preset task of other clusters. When the first preset task is executed, the second preset task is executed.
  • system resources are reserved for the execution of the first preset task, even if the first preset task is suddenly started when the second preset task is executed, it will not affect The processing speed of the first preset task; or when performing the first preset task, use the surplus system resources to execute the second preset task, without affecting the processing of the first preset task, on the one hand, it can make full use of this Node system resources, on the other hand, can ease the pressure of data processing in other clusters and improve the overall data processing efficiency.
  • FIG. 3 is a structural block diagram of a server provided by an embodiment of the present application, the server.
  • Each unit included in the server is configured to execute steps in the embodiments corresponding to FIG. 1 to FIG. 2.
  • the server 3 includes:
  • a task obtaining unit 310 configured to obtain a first preset task corresponding to a cluster to which it belongs and a second preset task corresponding to another cluster;
  • a prediction unit 320 configured to predict a resource usage rate corresponding to the execution of the first preset task
  • a task execution unit 330 configured to execute the second preset task if the resource usage rate is less than a first preset threshold
  • a task termination unit 340 is configured to stop executing the second preset task when the current preset resource usage is greater than or equal to a second preset threshold when the first preset task and the second preset task are executed simultaneously.
  • a task is set, wherein the first preset threshold is smaller than the second preset threshold.
  • FIG. 4 is a schematic diagram of a server according to another embodiment of the present application.
  • the server 4 in this embodiment includes a processor 40, a memory 41, and computer-readable instructions 42 stored in the memory 41 and executable on the processor 40, such as a control program of the server. .
  • the processor 40 executes the computer-readable instructions 42
  • the steps in the server cluster-based task execution method embodiment of the foregoing servers are implemented, such as S101 to S104 shown in FIG. 1.
  • the processor 40 executes the computer-readable instructions 42
  • the functions of the units in the foregoing device embodiments are implemented, for example, the functions of the units 310 to 340 shown in FIG. 3.
  • the computer-readable instructions 42 may be divided into one or more units, and the one or more units are stored in the memory 41 and executed by the processor 40 to complete the present application.
  • the one or more units may be instruction segments of a series of computer-readable instructions capable of performing a specific function, and the instruction segments are used to describe an execution process of the computer-readable instructions 42 in the server 4.
  • the computer-readable instructions 42 may be divided into a task acquisition unit, a prediction unit, a task execution unit, and a task termination unit, and the specific functions of each unit are as described above.
  • the server may include, but is not limited to, a processor 40 and a memory 41.
  • FIG. 4 is only an example of the server 4 and does not constitute a limitation on the server 4. It may include more or less components than shown in the figure, or combine some components or different components, such as
  • the server may further include an input-output server, a network access server, a bus, and the like.
  • the processor 40 may be a central processing unit (Central Processing Unit (CPU), or other general-purpose processors, Digital Signal Processors (DSPs), and application-specific integrated circuits (Applications) Specific Integrated Circuit (ASIC), off-the-shelf Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • CPU Central Processing Unit
  • DSP Digital Signal Processor
  • ASIC Applications
  • FPGA off-the-shelf Programmable Gate Array
  • a general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the memory 41 may be an internal storage unit of the server 4, such as a hard disk or a memory of the server 4.
  • the memory 41 may also be an external storage server of the server 4, such as a plug-in hard disk, a Smart Media Card (SMC), and a Secure Digital (SD) card provided on the server 4. Flash card, etc.
  • the memory 41 may include both an internal storage unit of the server 4 and an external storage server.
  • the memory 41 is configured to store the computer-readable instructions and other programs and data required by the server.
  • the memory 41 may also be used to temporarily store data that has been output or is to be output.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

La présente invention s'applique au domaine de la technologie informatique et concerne un procédé et un serveur d'exécution de tâche basée sur un groupe de serveurs. Ledit procédé consiste à : obtenir une première tâche prédéfinie correspondant au groupe auquel appartient un serveur de nœud lui-même et une deuxième tâche prédéfinie correspondant à un autre groupe ; prédire un taux d'utilisation de ressources correspondant à l'instant d'exécution de la première tâche prédéfinie ; si le taux d'utilisation de ressources est inférieur à un premier seuil prédéfini, exécuter la deuxième tâche prédéfinie ; et pendant l'exécution simultanée de la première tâche prédéfinie et de la deuxième tâche prédéfinie, si un taux d'utilisation de ressources actuel est supérieur ou égal à un deuxième seuil prédéfini, arrêter l'exécution de la deuxième tâche prédéfinie, le premier seuil prédéfini étant inférieur au deuxième seuil prédéfini. Selon les modes de réalisation de la présente invention, des ressources redondantes d'un groupe sont utilisées pleinement pour partager des tâches d'autres groupes de manière à réduire la pression de traitement de données d'autres groupes selon le principe d'assurer l'exécution fluide d'une première tâche prédéfinie, ce qui améliore l'efficacité globale de traitement de données.
PCT/CN2018/105279 2018-06-27 2018-09-12 Procédé et serveur d'exécution de tâche basée sur un groupe de serveurs WO2020000668A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810675281.9 2018-06-27
CN201810675281.9A CN108920265A (zh) 2018-06-27 2018-06-27 一种基于服务器集群的任务执行方法及服务器

Publications (1)

Publication Number Publication Date
WO2020000668A1 true WO2020000668A1 (fr) 2020-01-02

Family

ID=64422832

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/105279 WO2020000668A1 (fr) 2018-06-27 2018-09-12 Procédé et serveur d'exécution de tâche basée sur un groupe de serveurs

Country Status (2)

Country Link
CN (1) CN108920265A (fr)
WO (1) WO2020000668A1 (fr)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112448992A (zh) * 2019-09-02 2021-03-05 北京国双科技有限公司 一种边缘计算任务调度方法及装置
CN110995614B (zh) * 2019-11-05 2022-04-05 华为技术有限公司 一种算力资源分配的方法及装置
CN113132324B (zh) * 2019-12-31 2023-04-28 奇安信科技集团股份有限公司 样本鉴定方法及系统
CN112231100A (zh) * 2020-10-15 2021-01-15 北京明略昭辉科技有限公司 队列资源调整方法、装置、电子设备和计算机可读介质
CN112486658A (zh) * 2020-12-17 2021-03-12 华控清交信息科技(北京)有限公司 一种任务调度方法、装置和用于任务调度的装置
CN115437797B (zh) * 2022-11-10 2024-06-11 广州信安数据有限公司 一种执行策略自动优化方法、存储介质和服务器
CN116880407A (zh) * 2023-08-01 2023-10-13 中科院成都信息技术股份有限公司 基于工业控制系统的设备运行控制方法、装置及终端设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103856512A (zh) * 2012-11-30 2014-06-11 华为技术有限公司 云计算的管理服务器、工作和闲置主机以及资源调度方法
CN105162844A (zh) * 2015-08-05 2015-12-16 中国联合网络通信集团有限公司 一种任务分配的方法及装置
US20150363277A1 (en) * 2014-06-12 2015-12-17 International Business Machines Corporation Checkpoint triggering in a computer system
CN106230997A (zh) * 2016-09-30 2016-12-14 腾讯科技(北京)有限公司 一种资源调度方法和装置
CN106406987A (zh) * 2015-07-29 2017-02-15 阿里巴巴集团控股有限公司 一种集群中的任务执行方法及装置

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007006332A (ja) * 2005-06-27 2007-01-11 Hitachi Ltd ダイジェストデータ生成装置、ダイジェストデータ生成方法及びダイジェストデータ生成プログラム
JP2007199811A (ja) * 2006-01-24 2007-08-09 Hitachi Ltd プログラム制御方法、計算機およびプログラム制御プログラム
CN101442789A (zh) * 2008-12-23 2009-05-27 中国移动通信集团北京有限公司 移动通信系统分层网的接入控制方法及装置
CN103491556B (zh) * 2012-06-13 2017-06-20 华为技术服务有限公司 一种网络调整的方法及装置
CN106201711B (zh) * 2016-06-29 2019-07-26 联想(北京)有限公司 一种任务处理方法及服务器
CN107621973B (zh) * 2016-07-13 2021-10-26 阿里巴巴集团控股有限公司 一种跨集群的任务调度方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103856512A (zh) * 2012-11-30 2014-06-11 华为技术有限公司 云计算的管理服务器、工作和闲置主机以及资源调度方法
US20150363277A1 (en) * 2014-06-12 2015-12-17 International Business Machines Corporation Checkpoint triggering in a computer system
CN106406987A (zh) * 2015-07-29 2017-02-15 阿里巴巴集团控股有限公司 一种集群中的任务执行方法及装置
CN105162844A (zh) * 2015-08-05 2015-12-16 中国联合网络通信集团有限公司 一种任务分配的方法及装置
CN106230997A (zh) * 2016-09-30 2016-12-14 腾讯科技(北京)有限公司 一种资源调度方法和装置

Also Published As

Publication number Publication date
CN108920265A (zh) 2018-11-30

Similar Documents

Publication Publication Date Title
WO2020000668A1 (fr) Procédé et serveur d'exécution de tâche basée sur un groupe de serveurs
CN108446176B (zh) 一种任务分配方法、计算机可读存储介质及终端设备
CN106407190B (zh) 一种事件记录查询方法及装置
WO2017045553A1 (fr) Procédé et système d'attribution de tâches
CN110287003B (zh) 资源的管理方法和管理系统
WO2021159638A1 (fr) Procédé, appareil et dispositif de planification de ressources de file d'attente de grappe, et support de stockage
EP4068090A1 (fr) Procédé et appareil de planification de conteneurs et support de stockage lisible par ordinateur non-volatile
JP5448032B2 (ja) リソース管理装置、リソース管理プログラム、およびリソース管理方法
US9870269B1 (en) Job allocation in a clustered environment
WO2016078178A1 (fr) Procédé de planification d'uct virtuelle
WO2017206749A1 (fr) Procédé et appareil adaptatifs d'allocation de ressources
US8108874B2 (en) Minimizing variations of waiting times of requests for services handled by a processor
WO2019062068A1 (fr) Procédé d'attribution de tâche d'agent, support d'informations et serveur
CN107818012B (zh) 一种数据处理方法、装置及电子设备
WO2024016596A1 (fr) Procédé et appareil de planification de grappe de conteneurs, dispositif et support d'enregistrement
CN107766160A (zh) 队列消息处理方法及终端设备
CN111753065A (zh) 请求响应方法、系统、计算机系统和可读存储介质
CN114265679A (zh) 数据处理方法、装置和服务器
CN114661476A (zh) 一种任务处理方法、装置、设备以及存储介质
CN108255595A (zh) 一种数据任务的调度方法、装置、设备及可读存储介质
CN110825212B (zh) 节能调度方法及装置、计算机可存储介质
CN114157717B (zh) 一种微服务动态限流的系统及方法
CN108471386B (zh) 一种基于令牌、交易记录的流量、频率控制方法
Cunha et al. Exploiting user patience for scaling resource capacity in cloud services
CN106997304B (zh) 输入输出事件的处理方法及设备

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: 18924015

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: 18924015

Country of ref document: EP

Kind code of ref document: A1