CN111090517A - Job scheduling method, device, equipment and storage medium - Google Patents

Job scheduling method, device, equipment and storage medium Download PDF

Info

Publication number
CN111090517A
CN111090517A CN201911175091.1A CN201911175091A CN111090517A CN 111090517 A CN111090517 A CN 111090517A CN 201911175091 A CN201911175091 A CN 201911175091A CN 111090517 A CN111090517 A CN 111090517A
Authority
CN
China
Prior art keywords
job
working node
working
node
type
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN201911175091.1A
Other languages
Chinese (zh)
Inventor
王若曾
刘洋
徐庆智
杨朴
辛跃
陈龙
马超
王鑫琦
柯莹
方文奇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CCB Finetech Co Ltd
Original Assignee
China Construction Bank Corp
CCB Finetech Co Ltd
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 China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN201911175091.1A priority Critical patent/CN111090517A/en
Publication of CN111090517A publication Critical patent/CN111090517A/en
Pending legal-status Critical Current

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/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
    • 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

Abstract

The invention provides a job scheduling method, a job scheduling device, job scheduling equipment and a storage medium, and relates to the technical field of operation and maintenance. The job scheduling method comprises the following steps: and receiving a job request, and determining whether the job request meets a preset condition. And if the job request meets the preset condition, acquiring the job type indicated by the job request and the load capacity of the working node corresponding to the job type. And issuing the operation to the corresponding working node according to the operation type and the load capacity of the working node. Because the operation content is directly issued to the working node without depending on the script for issuing, the system resource occupied by script management and control is saved, and the effect of saving the system resource occupation is realized.

Description

Job scheduling method, device, equipment and storage medium
Technical Field
The invention relates to the technical field of operation and maintenance, in particular to a job scheduling method, a job scheduling device, job scheduling equipment and a storage medium.
Background
In operation and maintenance work of a large-scale private cloud environment, the infrastructure is a common operation and maintenance tool. The basic working principle of the infrastructure is to log in a remote host and execute remote operation through a Secure Shell (SSH) protocol, without installing any form of Agent program on a target host. In the infrastructure, documents in which YAML is not a Markup Language (YAML Ain't Markup Language, YAML) format, called scripts (playbooks), are used to store and maintain a manageable remote host range, called manifests (Inventory), as media storage operation content.
Currently, some anchor-based job scheduling engines are available, the most representative of which is AWX. AWX provides a graphical user Interface in a Web page (Web) form and a Representational State Transfer Application Programming Interface (REST API), a bottom layer uses a derivative item Ansibile Runner of Ansible, and invokes Ansible to execute remote operation in a Shell (Shell) command mode, and a solution of cluster deployment is provided.
However, the scenario is still used in the AWX as a storage medium of the job content, which is not beneficial to centralized management and control of the job content, and meanwhile, the AWX cannot effectively manage the content of the scenario, thereby increasing the system resource occupation.
Disclosure of Invention
The present invention provides a job scheduling method, apparatus, device and storage medium to overcome the above-mentioned shortcomings in the prior art, so as to solve the problem of excessive system resource occupation during task issuing.
In order to achieve the above purpose, the embodiment of the present invention adopts the following technical solutions:
in a first aspect, an embodiment of the present invention provides a job scheduling method, which is applied to a master control end of a cloud platform, where the cloud platform includes the master control end, a plurality of controlled ends, a switch, and a database server, where at least one controlled end constitutes a working node, and the method includes:
and receiving a job request, and determining whether the job request meets a preset condition. And if the job request meets the preset condition, acquiring the job type indicated by the job request and the load capacity of the working node corresponding to the job type. And issuing the operation to the corresponding working node according to the operation type and the load capacity of the working node.
Optionally, before obtaining the job type indicated by the job request, the method includes:
and acquiring the number of the job targets in the job request indication. And determining N operation types according to the operation target number, and configuring corresponding N working nodes according to the N operation types, wherein N is an integer greater than or equal to 2.
Optionally, issuing the job to the corresponding work node according to the job type and the load capacity of the work node, including:
and acquiring the working state of the ith working node corresponding to the ith working type according to the ith working type, wherein i is greater than or equal to 1 and less than or equal to N. And if the working state of the ith working node is idle, issuing the job to at least one working node in the ith working node through a target message queue corresponding to the ith working node.
Optionally, after acquiring the working state of the ith working node corresponding to the ith job type according to the ith job type, the method further includes:
and if the working state of the ith type working node is busy, sequentially acquiring the working states from the i-1 type working node to the 1 type working node. And if the working nodes with the working states of idle exist in the working states from the i-1 type working nodes to the 1 type working nodes, determining the target message queue corresponding to the idle working node type. And issuing the job to at least one working node in the idle working node category through the target message queue.
Optionally, determining whether the job request meets a preset condition includes:
characteristic information of a device that transmits a job request is acquired. And acquiring the data format of the job request. And if the characteristic information and the data format accord with the preset conditions, determining that the operation request accords with the preset conditions.
In a second aspect, an embodiment of the present invention further provides a job scheduling method, which is applied to a controlled end of a cloud platform, where the cloud platform includes a master control end, multiple controlled ends, a switch, and a database server, where at least one controlled end constitutes a working node, and the method includes:
and receiving the operation sent to the corresponding working node by the main control end according to the operation type and the load capacity of the working node. And acquiring a job task according to the job and executing the job content.
Optionally, after executing the job content, the method further includes:
and updating the working state of the working node according to the job type of the job and the execution information of the working node.
In a third aspect, an embodiment of the present invention further provides a job scheduling apparatus, which is applied to a master control end of a cloud platform, where the cloud platform includes the master control end, a plurality of controlled ends, a switch, and a database server, where at least one controlled end constitutes a working node, and the apparatus includes:
and the determining module is used for receiving the job request and determining whether the job request meets the preset condition. And the obtaining module is used for obtaining the operation type indicated by the operation request and the load capacity of the working node corresponding to the operation type if the operation request meets the preset condition. And the issuing module is used for issuing the operation to the corresponding working node according to the operation type and the load capacity of the working node.
Optionally, the obtaining module is further configured to obtain a job target number in the job request indication. And determining N operation types according to the operation target number, and configuring corresponding N working nodes according to the N operation types, wherein N is an integer greater than or equal to 2.
Optionally, the issuing module is specifically configured to obtain a working state of an ith class of working node corresponding to an ith job type according to the ith job type, where i is greater than or equal to 1 and less than or equal to N. And if the working state of the ith working node is idle, issuing the job to at least one working node in the ith working node through a target message queue corresponding to the ith working node.
Optionally, the determining module is further configured to sequentially obtain the working states of the i-1 class working node to the 1 class working node if the working state of the i-th class working node is busy. And if the working nodes with the working states of idle exist in the working states from the i-1 type working nodes to the 1 type working nodes, determining the target message queue corresponding to the idle working node type. And issuing the job to at least one working node in the idle working node category through the target message queue.
Optionally, the determining module is specifically configured to acquire feature information of the device that sends the job request. And acquiring the data format of the job request. And if the characteristic information and the data format accord with the preset conditions, determining that the operation request accords with the preset conditions.
In a fourth aspect, an embodiment of the present invention further provides a job scheduling apparatus, which is applied to a controlled end of a cloud platform, where the cloud platform includes a master control end, multiple controlled ends, a switch, and a database server, where at least one controlled end constitutes a working node, and the apparatus includes:
and the receiving module is used for receiving the operation sent to the corresponding working node by the main control end according to the operation type and the load capacity of the working node. And the execution module is used for acquiring the job task according to the job and executing the job content.
Optionally, the apparatus further comprises: and the updating module is used for updating the working state of the working node according to the operation type of the operation and the execution information of the working node.
In a fifth aspect, an embodiment of the present invention further provides a master device, including: the system comprises a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, when the master control end device runs, the processor and the storage medium communicate through the bus, and the processor executes the machine-readable instructions to execute the steps of the job scheduling method provided by the first aspect.
In a sixth aspect, an embodiment of the present invention further provides a controlled-end device, where the controlled-end device includes: the system comprises a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, when the controlled end device runs, the processor and the storage medium communicate through the bus, and the processor executes the machine-readable instructions to execute the steps of the job scheduling method provided by the second aspect.
In a seventh aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the job scheduling method provided in the first aspect are executed.
In an eighth aspect, the embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the job scheduling method provided in the second aspect are executed.
The invention has the beneficial effects that: the method comprises the steps of directly receiving a job request, obtaining a job type of the job request meeting preset conditions and the load capacity of a working node corresponding to the job type, and issuing the job to the corresponding working node according to the job type and the load capacity of the working node. Because the operation content is directly issued to the working node without depending on the script for issuing, the system resource occupied by script management and control is saved, and the effect of saving the system resource occupation is realized.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a schematic view of an application scenario of a job scheduling method provided in the present application;
fig. 2 is a schematic flowchart of a job scheduling method according to an embodiment of the present application;
fig. 3 is a schematic flowchart of a job scheduling method according to another embodiment of the present application;
fig. 4 is a flowchart illustrating a job scheduling method according to another embodiment of the present application;
fig. 5 is a flowchart illustrating a job scheduling method according to another embodiment of the present application;
fig. 6 is a flowchart illustrating a job scheduling method according to another embodiment of the present application;
fig. 7 is a flowchart illustrating a job scheduling method according to another embodiment of the present application;
fig. 8 is a schematic structural diagram of a job scheduling apparatus according to another embodiment of the present application;
fig. 9 is a schematic structural diagram of a job scheduling apparatus according to another embodiment of the present application;
fig. 10 is a schematic structural diagram of a job scheduling apparatus according to another embodiment of the present application;
fig. 11 is a schematic structural diagram of a master device according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of a controlled end device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention.
Fig. 1 is a schematic view of an application scenario of a job scheduling method provided in the present application.
As shown in fig. 1, the scenario includes:
a main control end 101, a controlled end 102, a switch 103, a database server 104, and a Representational State Transfer Application Programming Interface (REST API)105, where the database server 104 includes a service database 1041 and a running database 1042.
The master control end 101 and the controlled end 102 may be the same device or different devices, when the master control end 101 and the controlled end 102 are the same device, communication connection may be performed through a bus inside the device, and when the master control end 101 and the controlled end 102 are different devices, communication connection may be performed through an access network of the switch 103, for example, communication connection may be performed through a wired network or a wireless network.
Similarly, the service database 1041 and the operation database 1042 may be the same device as the master control end 101 or different devices, and the communication connection manner thereof is similar to that of the controlled end 102, and thus are not described herein again. The business database 1041 is used for storing metadata, job templates, job scheduling processes, job execution histories and other business data, and can provide OLAP related functions such as statistical analysis and the like, and is accessed only by the master control terminal, and a relational database mariidb is adopted.
The operation database 1042 is used for sharing between the master control end and the slave end, and is divided into two independent examples: a inventory database and a control database. The list database is used for storing the infrastructure list data, can share a consistent list among a plurality of working nodes, and provides a reading speed higher than that of a local file. The control database is used for sharing changed control data between the master control end and the controlled end, such as the load condition of the working nodes, the withdrawn job list and the like. The database is read and written very frequently during operation, the stored data structure is relatively simple, and a redis memory database with a k-v structure can be adopted.
The master 101 may call the REST API105 for receiving the job task forwarded from the REST API 105.
Fig. 2 is a flowchart illustrating a job scheduling method according to an embodiment of the present application. The operation scheduling method is applied to a main control end of a cloud platform, the cloud platform comprises the main control end, a plurality of controlled ends, a switch and a database server, and at least one controlled end forms a working node. The master control end and the controlled end may be apparatuses having computing capabilities such as a notebook computer, a desktop computer, and a server, which are not limited herein.
As shown in fig. 2, the method includes:
s201, receiving a job request, and determining whether the job request meets a preset condition.
In some embodiments, in order to ensure that the received job request can be processed effectively, it is necessary to ensure that the job request meets a preset condition, where the preset condition may be a source of the job request, a format of the job request, a number of tasks included in the job request, and the like, and is not limited herein.
The job request comprises a task request or a control request, the task request indicates a task which needs to be executed by the controlled terminal, and the control request is used for controlling the controlled terminal so as to change parameters of the controlled terminal.
S202, if the job request meets the preset conditions, acquiring the job type indicated by the job request and the load capacity of the working node corresponding to the job type.
The job type indicated by the job request may be divided according to the condition that the job request occupies the working node resource, which is not limited herein.
It should be noted that different working nodes have different load capacities, and according to different load capacities, the working nodes may be divided into different types to execute different types of jobs.
And S203, issuing the operation to the corresponding working node according to the operation type and the load capacity of the working node.
In some embodiments, the job request may be preferentially issued to a node matching the job type and the load capacity of the working node, so as to ensure that the job request can be processed timely and effectively.
In this embodiment, the job is issued to the corresponding work node according to the job type and the load capacity of the work node by directly receiving the job request, obtaining the job type of the job request meeting the preset condition, and obtaining the load capacity of the work node corresponding to the job type. Because the operation content is directly issued to the working node without depending on the script for issuing, the system resource occupied by script management and control is saved, and the effect of saving the system resource occupation is realized.
Fig. 3 is a flowchart illustrating a job scheduling method according to another embodiment of the present application.
Optionally, as shown in fig. 3, before obtaining the job type indicated by the job request, the method includes:
s301, acquiring the number of the job targets in the job request instruction.
In some embodiments, each job request may include multiple concurrent requests of the same type, and the number of concurrent requests is the target number of jobs.
S302, determining N job types according to the number of the job targets, and configuring corresponding N types of working nodes according to the N job types.
Wherein N is an integer greater than or equal to 2.
In some embodiments, the larger the number of job targets, the more work node resources that the job request needs to occupy, and therefore, the N job types may be determined according to the number of job targets. For example, if N is 3, job requests for which the job target number is less than 10 may be determined as type 3 jobs; determining the job requests with the job target number being more than or equal to 10 and less than or equal to 50 as type 2 jobs; the job requests whose job target number is greater than 50 are determined as type 3 jobs. Accordingly, a work node capable of simultaneously processing less than 10 job targets may be regarded as a class 3 node; taking working nodes which can simultaneously process more than or equal to 10 and less than or equal to 50 job targets as type 2 nodes; a working node capable of processing more than 10 job targets at the same time is taken as a class 1 node, but not limited thereto.
Optionally, since the different types of working nodes are different only in the number of job targets that can be processed simultaneously, but the different types of working nodes are close in overall processing capability, the monitoring process of the class 3 node may be increased to process more scattered tasks, such as fault processing, and the monitoring process of the class 1 node may be decreased to process tasks of large batches of targets, such as full-scale password rule change, patch upgrade, and the like.
Fig. 4 is a flowchart illustrating a job scheduling method according to another embodiment of the present application.
As shown in fig. 4, issuing a job to a corresponding work node according to a job type and a load capacity of the work node includes:
s401, acquiring the working state of the ith working node corresponding to the ith working type according to the ith working type.
Optionally, referring to the above example, if N is 3, the ith job type may be one of a 3-class job, a 2-class job, and a 1-class job, and the corresponding ith work node is a 3-class node, a 2-class node, and a 1-class node.
S402, judging the working state of the ith type working node to be idle or busy.
The ith type working node is busy, that is, the monitoring processes of all the ith type nodes are occupied, and similarly, the ith type node is idle, that is, a node capable of calling the monitoring processes exists in the ith type node, for example, if the processing capacity of the ith type node is 100 and a job being executed occupies 40 processing capacity in a certain ith type node, the ith type node also has 60 processing capacity for calling, that is, the ith type node is considered to be idle.
And S403, if the operation is idle, sending the operation to at least one working node in the ith working node through a target message queue corresponding to the ith working node.
It should be noted that, referring to fig. 1, the task queue and the control queue may be implemented by the switch 103, but not limited thereto.
S404, if the node is busy, the working state from the i-1 class working node to the 1 class working node is obtained.
It should be noted that, because the number of concurrent tasks that can be simultaneously processed by the i-1 class working node to the 1 class working node is greater than that of the i class, if there is an idle working node in the i-1 class working node to the 1 class working node, the working node may also process the job request to be issued.
S405, judging whether working nodes with idle working states exist in the working states from the-1 type working node to the 1 type working node
The method for judging whether the working node is idle is consistent with the method, and details are not repeated herein.
And S406, if the idle work node exists, determining a target message queue corresponding to the idle work node type, and executing S407, otherwise, executing S403.
In some embodiments, if there is a free work node from the i-1 class work node to the 1 class work node, the job can be processed by using the node. Otherwise, the operation is sent to the i-class working node and is processed after the preorder operation is finished.
S407, the job is issued to at least one working node in the idle working node category through the target message queue.
The target message queue is the same as the above, and is not described herein again.
Fig. 5 is a flowchart illustrating a job scheduling method according to another embodiment of the present application.
As shown in fig. 5, determining whether the job request meets the preset condition includes:
s2011, the feature information of the device that sent the job request is acquired.
In some embodiments, the job request needs to come from a trusted device, the feature information of the device sending the job request is obtained, whether the device sending the job request is legal or not is determined according to the feature information, and if the device sending the job request is legal, the device can be trusted.
S2012, the data format of the job request is acquired.
In some embodiments, the job request needs to be transmitted in a preset data format, and therefore, the data format of the data request needs to be verified, the data format of the job request is obtained, whether the data format of the job request is legal or not is determined, and if the data format of the job request is legal, the job request can be issued and executed.
And S2013, if the characteristic information and the data format accord with preset conditions, determining that the operation request accords with the preset conditions.
The device sending the job request and the data format of the job request need to be legal at the same time, and the job request can be determined to meet the preset condition at the moment.
Optionally, the method further includes receiving a job termination request, and terminating the corresponding job according to the job termination request.
In some embodiments, after receiving the job termination request, it is necessary to first determine whether the job termination request meets a preset condition, if yes, obtain a status of the job that is indicated to be terminated by the job termination request, if the job is already executed or does not exist, ignore the job termination request, if the job is being executed in a work node, send a job termination instruction to the corresponding work node through a control queue, and if the job is not executed, write the job termination instruction into a withdrawal job list in the running database.
Fig. 6 is a flowchart illustrating a job scheduling method according to another embodiment of the present application. The job scheduling method is applied to the controlled end of the cloud platform.
As shown in fig. 6, the method includes:
and S501, receiving the operation sent to the corresponding working node by the main control end according to the operation type and the load capacity of the working node.
In some embodiments, each worker node listens to both the task queue and the monitor queue.
After monitoring that the task queue sends a task request, determining whether the task is in a job withdrawal list of a control database, if so, returning a task termination message to a main control end through a result queue, and then continuing monitoring the task queue; if not, S502 is executed.
After monitoring that the monitoring queue issues a control request, determining whether the request is a termination instruction, if so, terminating the operation of the working node; if not, the control request is analyzed, and the operation of the working node is controlled according to the control instruction.
And S502, acquiring a job task according to the job and executing the job content.
In some embodiments, when a work node executes a job, it is required to verify whether the job request meets a preset condition, if so, the job content indicated by the job request is obtained, the job content is stored in a list database in an operation database, then the job is issued and executed, and then an execution result message is returned to a main control end through a result queue; if not, returning an execution exception message to the main control end through the result queue to indicate that the operation request is illegal.
The method provided by the embodiment is applied to the controlled end corresponding to the master control end device, and therefore, the beneficial effects are the same as those of the method, and are not described herein again.
Fig. 7 is a flowchart illustrating a job scheduling method according to another embodiment of the present application.
Optionally, as shown in fig. 7, after executing the job content, the method further includes:
and S503, updating the working state of the working node according to the job type of the job and the execution information of the working node.
In some embodiments, as shown in S501 and S502, after the task request and the control request are executed, the working state of the working node is updated, that is, the load information of the working node is updated.
Optionally, the method further includes receiving a job termination instruction, and terminating the corresponding job according to the received job termination instruction.
Fig. 8 is a schematic structural diagram of a job scheduling apparatus according to another embodiment of the present application.
As shown in fig. 8, the job scheduling apparatus is applied to a master control end of a cloud platform, and the apparatus includes:
the determining module 601 is configured to receive a job request and determine whether the job request meets a preset condition. The obtaining module 602 is configured to obtain a job type indicated by the job request and a load capacity of a work node corresponding to the job type if the job request meets a preset condition. The issuing module 603 is configured to issue the job to the corresponding work node according to the job type and the load capacity of the work node.
Optionally, the obtaining module 602 is further configured to obtain the number of job targets in the job request indication. And determining N operation types according to the operation target number, and configuring corresponding N working nodes according to the N operation types, wherein N is an integer greater than or equal to 2.
Optionally, the issuing module 603 is specifically configured to obtain a working state of an ith class of working node corresponding to an ith job type according to the ith job type, where i is greater than or equal to 1 and less than or equal to N. And if the working state of the ith working node is idle, issuing the job to at least one working node in the ith working node through a target message queue corresponding to the ith working node.
Optionally, the determining module 601 is further configured to sequentially obtain the working states of the i-1 class working node to the 1 class working node if the working state of the i-th class working node is busy. And if the working nodes with the working states of idle exist in the working states from the i-1 type working nodes to the 1 type working nodes, determining the target message queue corresponding to the idle working node type. And issuing the job to at least one working node in the idle working node category through the target message queue.
Optionally, the determining module 601 is specifically configured to obtain feature information of a device that sends the job request. And acquiring the data format of the job request. And if the characteristic information and the data format accord with the preset conditions, determining that the operation request accords with the preset conditions.
Fig. 9 is a schematic structural diagram of a job scheduling apparatus according to another embodiment of the present application.
As shown in fig. 9, the job scheduling apparatus is applied to a controlled end of a cloud platform, and includes:
the receiving module 701 is configured to receive a job sent by the main control end to a corresponding working node according to the job type and the load capacity of the working node. And the execution module 702 is configured to acquire a job task according to the job and execute the job content.
Fig. 10 is a schematic structural diagram of a job scheduling apparatus according to another embodiment of the present application.
Optionally, as shown in fig. 10, the apparatus further includes: the updating module 703 is configured to update the working state of the working node according to the job type of the job and the execution information of the working node.
These above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), or one or more microprocessors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), among others. For another example, when one of the above modules is implemented in the form of a processing element scheduler code, the processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
Fig. 11 is a schematic structural diagram of an apparatus according to an embodiment of the present application.
As shown in fig. 11, the device may be a master device or a slave device, and includes: a processor 801, a storage medium 802, and a bus 803, wherein:
the main control end device may include one or more processors 801, a bus 803 and a storage medium 802, where the storage medium 802 is used to store programs, the processors 801 are communicatively connected with the storage medium 802 through the bus 803, and the processors 801 call the programs stored in the storage medium 802 to execute the above method embodiments.
Fig. 12 is a schematic structural diagram of a controlled end device according to an embodiment of the present application.
As shown in fig. 12, the controlled-end device includes: a processor 901, a storage medium 902, and a bus 903, wherein:
the master device may include one or more processors 901, a bus 903 and a storage medium 902, where the storage medium 902 is used to store a program, the processor 901 is communicatively connected to the storage medium 902 through the bus 903, and the processor 901 calls the program stored in the storage medium 902 to execute the above method embodiments.
It is noted that processor 801 and processor 901 may include one or more processing cores (e.g., single core processors or multi-core processors). Merely by way of example, a Processor may include a Central Processing Unit (CPU), an Application Specific Integrated Circuit (ASIC), an Application Specific Instruction Set Processor (ASIP), a Graphics Processing Unit (GPU), a Physical Processing Unit (PPU), a Digital Signal Processor (DSP), a Field Programmable Gate Array (FPGA), a Programmable Logic Device (PLD), a controller, a microcontroller Unit, a Reduced Instruction Set computer (Reduced Instruction Set computer), a microprocessor, or the like, or any combination thereof.
Storage media 802 and 902 may include: including mass storage, removable storage, volatile Read-and-write Memory, or Read-Only Memory (ROM), among others, or any combination thereof. By way of example, mass storage may include magnetic disks, optical disks, solid state drives, and the like; removable memory may include flash drives, floppy disks, optical disks, memory cards, zip disks, tapes, and the like; volatile read-write memory may include Random Access Memory (RAM); the RAM may include Dynamic RAM (DRAM), Double data Rate Synchronous Dynamic RAM (DDR SDRAM); static RAM (SRAM), Thyristor-Based Random Access Memory (T-RAM), Zero-capacitor RAM (Zero-RAM), and the like. By way of example, ROMs may include Mask Read-Only memories (MROMs), Programmable ROMs (PROMs), Erasable Programmable ROMs (PERROMs), Electrically Erasable Programmable ROMs (EEPROMs), compact disk ROMs (CD-ROMs), digital versatile disks (ROMs), and the like.
For ease of illustration, only one processor 801 is depicted in the master device. However, it should be noted that the master device in the present application may further include a plurality of processors 801, and thus, the steps performed by one processor described in the present application may also be performed by a plurality of processors in combination or individually. For example, if the processor 801 of the master device executes step a and step B, it should be understood that step a and step B may be executed by two different processors together or executed in a single processor. For example, a first processor performs step a and a second processor performs step B, or the first processor and the second processor perform steps a and B together.
Also, only one processor 901 is depicted in the controlled end device. However, it should be noted that the controlled end device in the present application may further include multiple processors 901, and thus, the steps performed by one processor described in the present application may also be performed by multiple processors in combination or individually. For example, if the processor 901 of the controlled end device executes step a and step B, it should be understood that step a and step B may also be executed by two different processors together or executed in a single processor. For example, a first processor performs step a and a second processor performs step B, or the first processor and the second processor perform steps a and B together.
Optionally, the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the steps of the job scheduling method applied to the master.
Optionally, the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the steps of the job scheduling method applied to the controlled end.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.

Claims (12)

1. A job scheduling method is applied to a master control end of a cloud platform, wherein the cloud platform comprises the master control end, a plurality of controlled ends, a switch and a database server, at least one controlled end forms a working node, and the job scheduling method is characterized by comprising the following steps:
receiving a job request, and determining whether the job request meets a preset condition;
if the operation request meets the preset condition, acquiring an operation type indicated by the operation request and the load capacity of a working node corresponding to the operation type;
and issuing the operation to the corresponding working node according to the operation type and the load capacity of the working node.
2. The job scheduling method according to claim 1, wherein the obtaining of the job type indicated by the job request is preceded by:
acquiring the number of the operation targets in the operation request indication;
and determining N operation types according to the operation target number, and configuring corresponding N working nodes according to the N operation types, wherein N is an integer greater than or equal to 2.
3. The job scheduling method according to claim 2, wherein issuing the job to the corresponding work node according to the job type and the load capacity of the work node comprises:
acquiring the working state of an ith working node corresponding to the ith working type according to the ith working type, wherein i is greater than or equal to 1 and less than or equal to N;
and if the working state of the ith working node is idle, issuing the operation to at least one working node in the ith working node through a target message queue corresponding to the ith working node.
4. The job scheduling method according to claim 3, wherein after acquiring the working state of the ith working node corresponding to the ith job type according to the ith job type, the method further comprises:
if the working state of the ith working node is busy, sequentially acquiring the working states from the i-1 working node to the 1 working node;
if the working state from the i-1 type working node to the 1 type working node is an idle working node, determining a target message queue corresponding to the idle working node;
and issuing the operation to at least one working node in the idle working node category through the target message queue.
5. The job scheduling method according to claim 1, wherein the determining whether the job request meets a preset condition comprises:
acquiring characteristic information of equipment sending the job request;
acquiring a data format of the job request;
and if the characteristic information and the data format accord with the preset condition, determining that the operation request accords with the preset condition.
6. A job scheduling method is applied to a controlled end of a cloud platform, wherein the cloud platform comprises a main control end, a plurality of controlled ends, a switch and a database server, at least one controlled end forms a working node, and the job scheduling method is characterized by comprising the following steps:
receiving the operation sent to the corresponding working node by the main control end according to the operation type and the load capacity of the working node;
and acquiring a job task according to the job and executing the job content.
7. The job scheduling method according to claim 6, further comprising, after executing the job content:
and updating the working state of the working node according to the operation type of the operation and the execution information of the working node.
8. The utility model provides a job scheduling device, is applied to cloud platform's main control end, cloud platform includes main control end, a plurality of controlled ends, switch and database server, wherein, at least one the controlled end constitutes a work node, its characterized in that includes:
the system comprises a determining module, a judging module and a judging module, wherein the determining module is used for receiving a job request and determining whether the job request meets a preset condition;
the obtaining module is used for obtaining the operation type indicated by the operation request and the load capacity of the working node corresponding to the operation type if the operation request meets the preset condition;
and the issuing module is used for issuing the operation to the corresponding working node according to the operation type and the load capacity of the working node.
9. The utility model provides a job scheduling device, is applied to cloud platform's controlled end, cloud platform includes main control end, a plurality of controlled ends, switch and database server, wherein, at least one the controlled end constitutes a work node, its characterized in that includes:
the receiving module is used for receiving the operation sent to the corresponding working node by the main control end according to the operation type and the load capacity of the working node;
and the execution module is used for acquiring the job task according to the job and executing the job content.
10. A master control end device is characterized by comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, when the master device is operated, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to execute the steps of the job scheduling method according to any one of claims 1 to 5.
11. A controlled-end device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, when the controlled end device runs, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to execute the steps of the job scheduling method according to any one of claims 6 to 7.
12. A computer-readable storage medium, having stored thereon a computer program for performing, when executed by a processor, the steps of the job scheduling method according to any one of claims 1 to 7.
CN201911175091.1A 2019-11-26 2019-11-26 Job scheduling method, device, equipment and storage medium Pending CN111090517A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911175091.1A CN111090517A (en) 2019-11-26 2019-11-26 Job scheduling method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911175091.1A CN111090517A (en) 2019-11-26 2019-11-26 Job scheduling method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111090517A true CN111090517A (en) 2020-05-01

Family

ID=70393755

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911175091.1A Pending CN111090517A (en) 2019-11-26 2019-11-26 Job scheduling method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111090517A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108924214A (en) * 2018-06-27 2018-11-30 中国建设银行股份有限公司 A kind of load-balancing method of computing cluster, apparatus and system
CN109101325A (en) * 2017-06-21 2018-12-28 杭州海康威视数字技术股份有限公司 A kind of method for scheduling task, device, system and electronic equipment
CN109783224A (en) * 2018-12-10 2019-05-21 平安科技(深圳)有限公司 Method for allocating tasks, device and terminal device based on load allotment
CN109857549A (en) * 2019-01-04 2019-06-07 平安科技(深圳)有限公司 Image processing method, system, equipment and medium based on load balancing
CN109933420A (en) * 2019-04-02 2019-06-25 深圳市网心科技有限公司 Node tasks dispatching method, electronic equipment and system
CN110287009A (en) * 2019-05-28 2019-09-27 北京大米科技有限公司 A kind of working node selection method, device, storage medium and server

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109101325A (en) * 2017-06-21 2018-12-28 杭州海康威视数字技术股份有限公司 A kind of method for scheduling task, device, system and electronic equipment
CN108924214A (en) * 2018-06-27 2018-11-30 中国建设银行股份有限公司 A kind of load-balancing method of computing cluster, apparatus and system
CN109783224A (en) * 2018-12-10 2019-05-21 平安科技(深圳)有限公司 Method for allocating tasks, device and terminal device based on load allotment
CN109857549A (en) * 2019-01-04 2019-06-07 平安科技(深圳)有限公司 Image processing method, system, equipment and medium based on load balancing
CN109933420A (en) * 2019-04-02 2019-06-25 深圳市网心科技有限公司 Node tasks dispatching method, electronic equipment and system
CN110287009A (en) * 2019-05-28 2019-09-27 北京大米科技有限公司 A kind of working node selection method, device, storage medium and server

Similar Documents

Publication Publication Date Title
CN103593242B (en) Resource sharing control system based on Yarn frameworks
US9898338B2 (en) Network computer system and method for dynamically changing execution sequence of application programs
US11474712B2 (en) Method, apparatus, device and storage medium for managing access request
US9836516B2 (en) Parallel scanners for log based replication
US20120297216A1 (en) Dynamically selecting active polling or timed waits
US20110265093A1 (en) Computer System and Program Product
DE102020114142A1 (en) TECHNOLOGIES FOR INTERRUPT DISASSOCIATED QUEENING FOR MULTI-QUEUE I / O DEVICES
CN112231098A (en) Task processing method, device, equipment and storage medium
CN115150471A (en) Data processing method, device, equipment, storage medium and program product
CN113778644B (en) Task processing method, device, equipment and storage medium
CN114327880A (en) Computing method of light code heterogeneous distributed system
US20130013892A1 (en) Hierarchical multi-core processor, multi-core processor system, and computer product
CN111858656A (en) Static data query method and device based on distributed architecture
CN111090517A (en) Job scheduling method, device, equipment and storage medium
CN112241398A (en) Data migration method and system
CN110851245A (en) Distributed asynchronous task scheduling method and electronic equipment
CN115904669A (en) Task scheduling method, system, electronic device and computer readable storage medium
US20230393782A1 (en) Io request pipeline processing device, method and system, and storage medium
CN114020454A (en) Memory management method, device, equipment and medium
US11169720B1 (en) System and method for creating on-demand virtual filesystem having virtual burst buffers created on the fly
CN112000703B (en) Data warehousing processing method and device, computer equipment and storage medium
US20180115495A1 (en) Coordinating Accesses of Shared Resources by Clients in a Computing Device
WO2021159608A1 (en) Protocol buffers-based mirror cache method
CN114925078A (en) Data updating method, system, electronic device and storage medium
CN113794757A (en) Method and system for remote synchronization of redis cluster based on rabbitmq

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20220928

Address after: 12 / F, 15 / F, 99 Yincheng Road, Pudong New Area pilot Free Trade Zone, Shanghai, 200120

Applicant after: Jianxin Financial Science and Technology Co.,Ltd.

Address before: 25 Financial Street, Xicheng District, Beijing 100033

Applicant before: CHINA CONSTRUCTION BANK Corp.

Applicant before: Jianxin Financial Science and Technology Co.,Ltd.

TA01 Transfer of patent application right