[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN113590298B - Resource scheduling method, device, server and storage medium - Google Patents

Resource scheduling method, device, server and storage medium Download PDF

Info

Publication number
CN113590298B
CN113590298B CN202110911937.4A CN202110911937A CN113590298B CN 113590298 B CN113590298 B CN 113590298B CN 202110911937 A CN202110911937 A CN 202110911937A CN 113590298 B CN113590298 B CN 113590298B
Authority
CN
China
Prior art keywords
target mac
information
resource scheduling
server
task
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.)
Active
Application number
CN202110911937.4A
Other languages
Chinese (zh)
Other versions
CN113590298A (en
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.)
Ping An Bank Co Ltd
Original Assignee
Ping An Bank 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 Ping An Bank Co Ltd filed Critical Ping An Bank Co Ltd
Priority to CN202110911937.4A priority Critical patent/CN113590298B/en
Publication of CN113590298A publication Critical patent/CN113590298A/en
Application granted granted Critical
Publication of CN113590298B publication Critical patent/CN113590298B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system

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)
  • Small-Scale Networks (AREA)

Abstract

The embodiment of the invention relates to the field of big data and discloses a resource scheduling method, a device, a server and a storage medium, wherein the method comprises the following steps: acquiring a resource scheduling request; determining one or more target Mac servers and resource processing information on each target Mac server from each Mac server in a server cluster according to resource scheduling information carried by a resource scheduling request; determining the resource scheduling task quantity of each target Mac server according to the resource processing information and the resource scheduling information on each target Mac server; and generating a resource scheduling allocation instruction according to the resource scheduling task quantity, and sending the resource scheduling allocation instruction to a target Mac server serving as a main node in the server cluster to allocate the resource scheduling task quantity, so that the resource scheduling can be efficiently and reasonably performed, and the efficiency of the resource scheduling and the utilization rate of the resource are improved. The present invention relates to blockchain techniques, such as writing resource information into blockchains for use in data forensics and other scenarios.

Description

Resource scheduling method, device, server and storage medium
Technical Field
The present invention relates to the field of big data, and in particular, to a method, an apparatus, a server, and a storage medium for scheduling resources.
Background
With the development of the mobile internet, more and more applications are used in the mobile internet, and most of the applications are android systems or iOS systems at present. The current industry also keeps on building application systems in a standalone script, however, this approach does not allow efficient scheduling of resources to build applications quickly. Therefore, how to efficiently schedule resources is important for quickly building applications.
Disclosure of Invention
The embodiment of the invention provides a resource scheduling method, a device, a server and a storage medium, which can efficiently and reasonably schedule resources and improve the efficiency of resource scheduling and the utilization rate of resources.
In a first aspect, an embodiment of the present invention provides a resource scheduling method, which is applied to a server cluster, where the server cluster is composed of a plurality of Mac servers, and the method includes:
acquiring a resource scheduling request, wherein the resource scheduling request carries resource scheduling information;
determining one or more target Mac servers and resource processing information on each target Mac server from each Mac server in the server cluster according to the resource scheduling information;
Determining the resource scheduling task amount of each target Mac server according to the resource processing information and the resource scheduling information on each target Mac server;
generating a resource scheduling allocation instruction according to the resource scheduling task quantity of each target Mac server, and sending the resource scheduling allocation instruction to the target Mac server serving as a master node in the server cluster to execute scheduling, so that the target Mac server serving as the master node allocates the corresponding resource scheduling task quantity to each target Mac server serving as an executing node according to the resource scheduling allocation instruction.
Further, the resource scheduling information includes development tool version information and/or certificate information; and determining one or more target Mac servers from the Mac servers in the server cluster according to the resource scheduling information, wherein the method comprises the following steps:
acquiring development tool version information and/or certificate information of each Mac server;
comparing the development tool version information and/or the certificate information in the resource scheduling information with the development tool version information and/or the certificate information of each Mac server, and determining one or more target Mac servers matched with the development tool version information and/or the certificate information in the resource scheduling information from each Mac server.
Further, the determining, according to the resource processing information and the resource scheduling information on the target Mac servers, the resource scheduling task amount of the target Mac servers includes:
determining the resource processing time of each target Mac server according to the resource processing information on each target Mac server;
and determining the resource scheduling task quantity of each target Mac server according to the resource scheduling information carried in the resource scheduling request and the resource processing time of each target Mac server.
Further, the resource processing information includes task information; the determining the resource processing time of each target Mac server according to the resource processing information on each target Mac server includes:
detecting whether task information on each target Mac server exists in the historical task information of the historical scheduling record;
and if the detection result is that the target Mac server does not exist, acquiring the code quantity of the task which is being processed and is to be processed by each target Mac server, and determining the resource processing time of each target Mac server according to the code quantity.
Further, the method further comprises:
If the task information on each target Mac server exists in the history task information of the history scheduling record, detecting whether the code information in the task information on each target Mac server is consistent with the code information in the corresponding history task information;
if the detection results are inconsistent, determining code variation amounts which are different from corresponding historical task information in the task information on each target Mac server, and determining the resource processing time of each target Mac server according to the code variation amounts.
Further, the resource scheduling information comprises task information to be scheduled; the determining the resource scheduling task amount of each target Mac server according to the resource scheduling information carried in the resource scheduling request and the resource processing time of each target Mac server includes:
determining the code quantity or the code variation quantity of the task to be scheduled according to the task information to be scheduled in the resource scheduling information;
determining the processing time of the task to be scheduled according to the code quantity or the code variation quantity of the task to be scheduled;
and determining the resource scheduling task quantity of each target Mac server according to the processing time of the task to be scheduled and the resource processing time of each target Mac server.
Further, the determining, according to the processing time of the task to be scheduled and the resource processing time of each target Mac server, the resource scheduling task amount of each target Mac server includes:
determining the time for processing the task to be scheduled by each target Mac server according to the processing time of the task to be scheduled and the resource processing time of each target Mac server;
and determining the resource scheduling task quantity of each target Mac server for processing the task to be scheduled according to the time of each target Mac server for processing the task to be scheduled.
In a second aspect, an embodiment of the present invention provides a resource scheduling apparatus, provided in a server cluster, where the server cluster is composed of a plurality of Mac servers, and the apparatus includes:
the resource scheduling device comprises an acquisition unit, a scheduling unit and a scheduling unit, wherein the acquisition unit is used for acquiring a resource scheduling request, and the resource scheduling request carries resource scheduling information;
the first determining unit is used for determining one or more target Mac servers from the Mac servers in the server cluster according to the resource scheduling information;
the second determining unit is used for acquiring the resource processing information on each Mac server in the server cluster and determining the resource scheduling task quantity of each target Mac server according to the resource processing information and the resource scheduling information on each target Mac server;
And the sending unit is used for generating a resource scheduling allocation instruction according to the resource scheduling task quantity of each target Mac server, and sending the resource scheduling allocation instruction to the target Mac server serving as a main node in the server cluster to execute scheduling, so that the target Mac server serving as the main node allocates the corresponding resource scheduling task quantity to each target Mac server serving as an executing node according to the resource scheduling allocation instruction.
In a third aspect, an embodiment of the present invention provides a server, including a processor, an input device, an output device, and a memory, where the processor, the input device, the output device, and the memory are connected to each other, and the memory is configured to store a computer program supporting a resource scheduling apparatus to execute the method described above, where the computer program includes a program, and where the processor is configured to invoke the program to execute the method of the first aspect described above.
In a fourth aspect, embodiments of the present invention provide a computer-readable storage medium storing a computer program for execution by a processor to implement the method of the first aspect.
The embodiment of the invention can acquire the resource scheduling request, wherein the resource scheduling request carries the resource scheduling information; determining one or more target Mac servers and resource processing information on each target Mac server from each Mac server in the server cluster according to the resource scheduling information; determining the resource scheduling task quantity of each target Mac server according to the resource processing information and the resource scheduling information on each target Mac server; generating a resource scheduling allocation instruction according to the determined resource scheduling task quantity of each target Mac server, and sending the resource scheduling allocation instruction to the target Mac server serving as a main node in the server cluster to execute scheduling, so that the target Mac server serving as the main node allocates the corresponding resource scheduling task quantity to each target Mac server serving as an executing node according to the resource scheduling allocation instruction. By the method, the resource scheduling can be efficiently and reasonably performed, and the efficiency of the resource scheduling and the utilization rate of the resource are improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a resource scheduling method provided by an embodiment of the present invention;
FIG. 2 is a schematic block diagram of a resource scheduling device according to an embodiment of the present invention;
fig. 3 is a schematic block diagram of a server according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The resource scheduling method provided by the embodiment of the invention can be applied to a resource scheduling device, and in some embodiments, the resource scheduling device is arranged in a server cluster, and the server cluster is composed of a plurality of Mac servers.
The embodiment of the invention can acquire the resource scheduling request, wherein the resource scheduling request carries the resource scheduling information; determining one or more target Mac servers and resource processing information on each target Mac server from each Mac server in the server cluster according to the resource scheduling information; determining the resource scheduling task amount of each target Mac server according to the resource processing information and the resource scheduling information on each target Mac server; generating a resource scheduling allocation instruction according to the determined resource scheduling task quantity of each target Mac server, and sending the resource scheduling allocation instruction to the target Mac server serving as a main node in the server cluster to execute scheduling, so that the target Mac server serving as the main node allocates the corresponding resource scheduling task quantity to each target Mac server serving as an executing node according to the resource scheduling allocation instruction.
According to the embodiment of the invention, the Mac server in the server cluster is used for carrying out resource scheduling, so that the resource scheduling can be carried out efficiently and reasonably, and the efficiency of the resource scheduling and the utilization rate of the resource are improved.
The resource scheduling method provided by the embodiment of the invention is schematically illustrated in the following with reference to fig. 1.
Referring to fig. 1, fig. 1 is a schematic flowchart of a resource scheduling method according to an embodiment of the present invention, and as shown in fig. 1, the method may be performed by a resource scheduling device, where the resource scheduling device is disposed in a server cluster. Specifically, the method of the embodiment of the invention comprises the following steps.
S101: and acquiring a resource scheduling request, wherein the resource scheduling request carries resource scheduling information.
In the embodiment of the invention, the resource scheduling device can acquire the resource scheduling request, and the resource scheduling request carries the resource scheduling information.
In some embodiments, the resource scheduling request may be generated according to resource scheduling information input by a user through a terminal device; in some embodiments, the resource scheduling information includes task information to be scheduled.
In certain embodiments, the resource scheduling information further includes, but is not limited to, one or more of development tool version information, certificate information, code information, and the like. In certain embodiments, the terminal device includes, but is not limited to, a cell phone, a notebook, a tablet, etc.
In some embodiments, different versions of development tools are deployed on each Mac server in the server cluster. Such as: the Mac server A node is provided with the Xcode12.4, the Mac server B node is provided with the Xcode12.1, the Mac server C node is provided with the Xcode11.0, and the Mac server D node is provided with the Xcode10.0.
In some embodiments, a master node and one or more execution nodes are deployed in each Mac server, where the master node is a Jenkins scheduler and the one or more execution nodes are Jenkins executors. Such as: the Mac server a deploys a master node Jenkins scheduler, and the Mac server B, C, D deploys execution node Jenkins executors, respectively.
S102: and determining one or more target Mac servers and resource processing information on each target Mac server from each Mac server in the server cluster according to the resource scheduling information.
In the embodiment of the invention, the resource scheduling device can determine one or more target Mac servers and resource processing information on each target Mac server from each Mac server in the server cluster according to the resource scheduling information.
In some embodiments, the resource processing information includes task information being processed by each Mac server, including, but not limited to, task volume, task progress, task type, etc.; in some embodiments, the task amounts include, but are not limited to, code amounts, code variation amounts, etc. for each task, the task types include, but are not limited to, development tool version information, certificate information, etc., and the task progress includes the case of the task currently being processed.
In one embodiment, the resource scheduling information includes development tool version information and/or credential information; the resource scheduling device can acquire development tool version information and/or certificate information of each Mac server when determining one or more target Mac servers from each Mac server in a server cluster according to the resource scheduling information; and comparing the development tool version information and/or the certificate information in the resource scheduling information with the development tool version information and/or the certificate information of each Mac server, and determining one or more target Mac servers matched with the development tool version information and/or the certificate information in the resource scheduling information from each Mac server.
In one example, it is assumed that the server cluster includes A, B, C, D Mac servers, where the development tool version information deployed on Mac server a is xcode1.2, the development tool version information deployed on Mac server B is xcode1.3, the development tool version information deployed on Mac server C is xcode1.4, and the development tool version information deployed on Mac server D is xcode1.5, and if the development tool version information in the obtained resource scheduling information carried in the resource scheduling request is xcode1.3, the xcode1.3, xcode1.4, and xcode1.5 all support xcode1.3, so that it may be determined that the Mac server that matches the development tool version information xcode1.3 in the resource scheduling information is Mac server B, C, D.
By deploying development tools of different versions in each Mac server, when a resource scheduling request is acquired, the development tool version information and/or certificate information in the resource scheduling information carried in the resource scheduling request can be compared with the development tool version information and/or certificate information of each Mac server, so that one or more target Mac servers matched with the development tool version information and/or certificate information in the resource scheduling information are determined from each Mac server, and resource scheduling can be performed by selecting the corresponding Mac servers according to the requirements of the development tools of different versions, thereby being beneficial to improving the efficiency of resource scheduling.
S103: and determining the resource scheduling task quantity of each target Mac server according to the resource processing information and the resource scheduling information on each target Mac server.
In the embodiment of the invention, the resource scheduling device can determine the resource scheduling task quantity of each target Mac server according to the resource processing information and the resource scheduling information on each target Mac server.
In one embodiment, when determining the resource scheduling task amount of each target Mac server according to the resource processing information on each target Mac server and the resource scheduling information, the resource scheduling device may determine the resource processing time of each target Mac server according to the resource processing information on each target Mac server; and determining the resource scheduling task quantity of each target Mac server according to the resource scheduling information carried in the resource scheduling request and the resource processing time of each target Mac server.
In one embodiment, the resource processing information includes task information; the resource scheduling device can detect whether task information on each target Mac server exists in historical task information of a historical scheduling record when determining the resource processing time of each target Mac server according to the resource processing information on each target Mac server; and if the detection result is that the target Mac server does not exist, acquiring the code quantity of the task which is being processed and is to be processed by each target Mac server, and determining the resource processing time of each target Mac server according to the code quantity.
In one example, assuming that the code amount of the task being processed and to be processed by the target Mac server B is X, the code amount of the task being processed and to be processed by the target Mac server C is Y, the code amount of the task being processed and to be processed by the target Mac server D is Z, if the processing speed of the code amount is a in seconds, it may be determined that the resource processing time of the target Mac server B is X/a, the resource processing time of the target Mac server C is Y/a, and the resource processing time of the target Mac server D is Z/a.
In one embodiment, if detecting that the task information on each target Mac server exists in the historical task information of the historical scheduling record, the resource scheduling device detects whether the code information in the task information on each target Mac server is consistent with the code information in the corresponding historical task information; if the detection results are inconsistent, determining code variation amounts which are different from corresponding historical task information in the task information on each target Mac server, and determining the resource processing time of each target Mac server according to the code variation amounts.
In one example, assuming that the code variation of the task being processed and to be processed by the target Mac server B is M, the code variation of the task being processed and to be processed by the target Mac server C is N, the code variation of the task being processed and to be processed by the target Mac server D is H, if the processing speed of the code amount is a in seconds, it may be determined that the resource processing time of the target Mac server B is M/a, the resource processing time of the target Mac server C is N/a, and the resource processing time of the target Mac server D is H/a.
In one embodiment, the resource scheduling information includes task information to be scheduled; the resource scheduling device can determine the code quantity or the code variation quantity of the task to be scheduled according to the task information to be scheduled in the resource scheduling information when determining the resource scheduling task quantity of each target Mac server according to the resource scheduling information carried in the resource scheduling request and the resource processing time of each target Mac server; determining the processing time of the task to be scheduled according to the code quantity or the code variation quantity of the task to be scheduled; and determining the resource scheduling task quantity of each target Mac server according to the processing time of the task to be scheduled and the resource processing time of each target Mac server.
In one embodiment, when determining the resource scheduling task amount of each target Mac server according to the processing time of the task to be scheduled and the resource processing time of each target Mac server, the resource scheduling device may determine the time of each target Mac server for processing the task to be scheduled according to the processing time of the task to be scheduled and the resource processing time of each target Mac server; and determining the resource scheduling task quantity of each target Mac server for processing the task to be scheduled according to the time of each target Mac server for processing the task to be scheduled.
In one example, assuming that the information of the task to be scheduled does not exist in the history scheduling record, the resource scheduling request includes 4 tasks to be scheduled, the code quantity of the 4 tasks to be scheduled is 20 for task 1, 40 for task 2, 40 for task 3, and 60 for task 4, and the processing speed of the code is 1/s, the processing time of the tasks to be scheduled can be determined to be 20s, 40s, and 60s, respectively, if the resource processing time of the target Mac server B is 10s, the resource processing time of the target Mac server C is 40s, and the resource processing time of the target Mac server D is 60s, the optimal scheme for allocating the tasks to be scheduled can be determined according to the processing time of each task to be scheduled and the resource processing time of each target Mac server: the target Mac server B processes the task 1 and the task 4 of the task to be scheduled, the target Mac server C processes the task 2 of the task to be scheduled, and the target Mac server D processes the task 3 of the task to be scheduled, wherein the total time for the target Mac server B to process the task is as follows: 10+20+60=90 s, the total time for the target Mac server C to process the task is: 40+40=80 s, the total time for the target Mac server D to process the task is: 60+40=100 s.
S104: generating a resource scheduling allocation instruction according to the resource scheduling task quantity of each target Mac server, and sending the resource scheduling allocation instruction to the target Mac server serving as a master node in the server cluster to execute scheduling, so that the target Mac server serving as the master node allocates the corresponding resource scheduling task quantity to each target Mac server serving as an executing node according to the resource scheduling allocation instruction.
In the embodiment of the invention, the resource scheduling device can generate the resource scheduling allocation instruction according to the resource scheduling task quantity of each target Mac server, and send the resource scheduling allocation instruction to the target Mac server serving as the master node in the server cluster to perform scheduling, so that the target Mac server serving as the master node allocates the corresponding resource scheduling task quantity to each target Mac server serving as the execution node according to the resource scheduling allocation instruction.
In one embodiment, when generating the resource scheduling allocation instruction according to the resource scheduling task amount of each target Mac server, the resource scheduling device may determine the resource processing time of each target Mac server according to the resource processing information on each target Mac server, and generate the resource scheduling allocation instruction according to the resource scheduling information and the resource processing time of each target Mac server.
In one embodiment, the resource scheduling information includes task information to be scheduled; when generating a resource scheduling allocation instruction according to the resource scheduling information and the resource processing time of each target Mac server, the resource scheduling device may determine the code amount or the code variation of the task to be scheduled according to the task information to be scheduled in the resource scheduling information, determine the processing time of the task to be scheduled according to the code amount or the code variation of the task to be scheduled, and generate the resource scheduling allocation instruction according to the processing time of the task to be scheduled and the resource processing time of each target Mac server.
In one embodiment, when generating the resource scheduling allocation instruction according to the processing time of the task to be scheduled and the resource processing time of each target Mac server, the resource scheduling device may determine the time of each target Mac server for processing the task to be scheduled according to the processing time of the task to be scheduled and the resource processing time of each target Mac server, and generate the resource scheduling allocation instruction according to the time of each target Mac server for processing the task to be scheduled.
In one embodiment, a master node and one or more execution nodes are deployed in each Mac server in the server cluster, and a target Mac server serving as the master node is communicatively connected to each target Mac server serving as the execution node.
In one embodiment, the target Mac server as the master node may receive the resource scheduling allocation instruction, and allocate, according to the time indicated by the resource scheduling allocation instruction for processing the task to be scheduled by each target Mac server as the execution node, the resource scheduling task amount corresponding to the time of each task to be scheduled to each target Mac server as the execution node. In some embodiments, the resource scheduling task amount may include, but is not limited to, a number of resource scheduling tasks determined according to a time when each target Mac server as an executing node allocates each task to be scheduled and a task processing speed.
In one example, assuming that the master node is disposed on the target Mac server a, the executing node is disposed on the target Mac server B, the target Mac server C, and the target Mac server D, the resource scheduling request includes 4 tasks to be scheduled, the code amount of the 4 tasks to be scheduled is 20 for task 1, 40 for task 2, 40 for task 3, and 60 for task 4, and the processing speed of the code is 1/s, it may be determined that the processing time of the tasks to be scheduled is 20s, 40s, and 60s, respectively, and if the resource processing time of the target Mac server B, the resource processing time of the target Mac server C, and the resource processing time of the target Mac server D are 10s, the optimal scheme for allocating the tasks to be scheduled may be determined according to the processing time of each task to be scheduled and the resource processing time of each target Mac server is 60 s: the total time for the target Mac server B to process the task is: 10+20+60=90 s, the total time for the target Mac server C to process the task is: 40+40=80 s, the total time for the target Mac server D to process the task is: 60+40=100 s, i.e., the target Mac server B processes task 1 and task 4 of the task to be scheduled, the target Mac server C processes task 2 of the task to be scheduled, and the target Mac server D processes task 3 of the task to be scheduled. Accordingly, the target Mac server a as the master node can allocate the task 1 and the task 4 to the target Mac server B as the execution node for processing, allocate the task 2 to the target Mac server C as the execution node for processing, and allocate the task 3 to the target Mac server D as the execution node for processing.
In one embodiment, the resource scheduling device may acquire result information for constructing each task to be scheduled returned by each target Mac server, and store the result information in the history scheduling record. In some embodiments, the resource scheduling device may further obtain log information returned by each target Mac server for subsequent problem querying.
In one embodiment, the resource scheduling device may send the obtained result information that is returned by each target Mac server and used for constructing each task to be scheduled to the distribution platform corresponding to each scheduling task, so that each distribution platform issues the result information.
In the embodiment of the invention, the resource scheduling device can acquire the resource scheduling request, and the resource scheduling request carries the resource scheduling information; determining one or more target Mac servers and resource processing information on each target Mac server from each Mac server in the server cluster according to the resource scheduling information; determining the resource scheduling task quantity of each target Mac server according to the resource processing information and the resource scheduling information on each target Mac server; generating a resource scheduling allocation instruction according to the resource scheduling task quantity of each target Mac server, and sending the resource scheduling allocation instruction to the target Mac server serving as a master node in the server cluster to execute scheduling, so that the target Mac server serving as the master node allocates the corresponding resource scheduling task quantity to each target Mac server serving as an execution node according to the resource scheduling allocation instruction. By the method, the resource scheduling can be efficiently and reasonably performed, and the efficiency of the resource scheduling and the utilization rate of the resource are improved.
The embodiment of the invention also provides a resource scheduling device which is used for executing the unit of the method. Specifically, referring to fig. 2, fig. 2 is a schematic block diagram of a resource scheduling apparatus according to an embodiment of the present invention. The resource scheduling apparatus of the present embodiment includes: an acquisition unit 201, a first determination unit 202, a second determination unit 203, and a transmission unit 204.
An obtaining unit 201, configured to obtain a resource scheduling request, where the resource scheduling request carries resource scheduling information;
a first determining unit 202, configured to determine, according to the resource scheduling information, one or more target Mac servers and resource processing information on each target Mac server from each Mac server in the server cluster;
a second determining unit 203, configured to determine a resource scheduling task amount of each target Mac server according to the resource processing information and the resource scheduling information on each target Mac server;
and the sending unit 204 is configured to generate a resource scheduling allocation instruction according to the resource scheduling task amounts of the target Mac servers, and send the resource scheduling allocation instruction to the target Mac servers serving as the master node in the server cluster to perform scheduling, so that the target Mac servers serving as the master node allocate corresponding resource scheduling task amounts to the target Mac servers serving as the execution nodes according to the resource scheduling allocation instruction.
Further, the resource scheduling information includes development tool version information and/or certificate information; the first determining unit 202 is specifically configured to, when determining one or more target Mac servers from among the Mac servers in the server cluster according to the resource scheduling information carried in the resource scheduling request:
acquiring development tool version information and/or certificate information of each Mac server;
comparing the development tool version information and/or the certificate information in the resource scheduling information with the development tool version information and/or the certificate information of each Mac server, and determining one or more target Mac servers matched with the development tool version information and/or the certificate information in the resource scheduling information from each Mac server.
Further, the second determining unit 203 is specifically configured to, when determining the resource scheduling task amount of each target Mac server according to the resource processing information on each target Mac server and the resource scheduling information:
determining the resource processing time of each target Mac server according to the resource processing information on each target Mac server;
And determining the resource scheduling task quantity of each target Mac server according to the resource scheduling information carried in the resource scheduling request and the resource processing time of each target Mac server.
Further, the resource processing information includes task information; the second determining unit 203 is specifically configured to, when determining the resource processing time of each target Mac server according to the resource processing information on each target Mac server:
detecting whether task information on each target Mac server exists in the historical task information of the historical scheduling record;
and if the detection result is that the target Mac server does not exist, acquiring the code quantity of the task which is being processed and is to be processed by each target Mac server, and determining the resource processing time of each target Mac server according to the code quantity.
Further, the second determining unit 203 is further configured to:
if the task information on each target Mac server exists in the history task information of the history scheduling record, detecting whether the code information in the task information on each target Mac server is consistent with the code information in the corresponding history task information;
If the detection results are inconsistent, determining code variation amounts which are different from corresponding historical task information in the task information on each target Mac server, and determining the resource processing time of each target Mac server according to the code variation amounts.
Further, the resource scheduling information comprises task information to be scheduled; the second determining unit 203 is specifically configured to, when determining the resource scheduling task amount of each target Mac server according to the resource scheduling information carried in the resource scheduling request and the resource processing time of each target Mac server:
determining the code quantity or the code variation quantity of the task to be scheduled according to the task information to be scheduled in the resource scheduling information;
determining the processing time of the task to be scheduled according to the code quantity or the code variation quantity of the task to be scheduled;
and determining the resource scheduling task quantity of each target Mac server according to the processing time of the task to be scheduled and the resource processing time of each target Mac server.
Further, the second determining unit 203 is specifically configured to, when determining the resource scheduling task amount of each target Mac server according to the processing time of the task to be scheduled and the resource processing time of each target Mac server:
Determining the time for processing the task to be scheduled by each target Mac server according to the processing time of the task to be scheduled and the resource processing time of each target Mac server;
and determining the resource scheduling task quantity of each target Mac server for processing the task to be scheduled according to the time of each target Mac server for processing the task to be scheduled.
In the embodiment of the invention, the resource scheduling device can acquire the resource scheduling request, and the resource scheduling request carries the resource scheduling information; determining one or more target Mac servers and resource processing information on each target Mac server from each Mac server in the server cluster according to the resource scheduling information; determining the resource scheduling task quantity of each target Mac server according to the resource processing information and the resource scheduling information on each target Mac server; generating a resource scheduling allocation instruction according to the resource scheduling task quantity of each target Mac server, and sending the resource scheduling allocation instruction to the target Mac server serving as a master node in the server cluster to execute scheduling, so that the target Mac server serving as the master node allocates the corresponding resource scheduling task quantity to each target Mac server serving as an execution node according to the resource scheduling allocation instruction. By the method, the resource scheduling can be efficiently and reasonably performed, and the efficiency of the resource scheduling and the utilization rate of the resource are improved.
Referring to fig. 3, fig. 3 is a schematic block diagram of a server provided in an embodiment of the present invention, and in some embodiments, the server is a Mac server in a server cluster, where the server in the embodiment shown in fig. 3 may include: one or more processors 301; one or more input devices 302, one or more output devices 303, and a memory 304. The processor 301, the input device 302, the output device 303, and the memory 304 are connected via a bus 305. The memory 304 is used for storing a computer program comprising a program, and the processor 301 is used for executing the program stored in the memory 304. Wherein the processor 301 is configured to invoke the program execution:
acquiring a resource scheduling request, wherein the resource scheduling request carries resource scheduling information;
determining one or more target Mac servers and resource processing information on each target Mac server from each Mac server in a server cluster according to the resource scheduling information;
determining the resource scheduling task amount of each target Mac server according to the resource processing information and the resource scheduling information on each target Mac server;
Generating a resource scheduling allocation instruction according to the resource scheduling task quantity of each target Mac server, and sending the resource scheduling allocation instruction to the target Mac server serving as a master node in the server cluster to execute scheduling, so that the target Mac server serving as the master node allocates the corresponding resource scheduling task quantity to each target Mac server serving as an executing node according to the resource scheduling allocation instruction.
Further, the resource scheduling information includes development tool version information and/or certificate information; the processor 301 is specifically configured to, when determining, according to the resource scheduling information, one or more target Mac servers from the Mac servers in the server cluster:
acquiring development tool version information and/or certificate information of each Mac server;
comparing the development tool version information and/or the certificate information in the resource scheduling information with the development tool version information and/or the certificate information of each Mac server, and determining one or more target Mac servers matched with the development tool version information and/or the certificate information in the resource scheduling information from each Mac server.
Further, when the processor 301 determines the resource scheduling task amount of each target Mac server according to the resource processing information and the resource scheduling information on each target Mac server, the processor is specifically configured to:
determining the resource processing time of each target Mac server according to the resource processing information on each target Mac server;
and determining the resource scheduling task quantity of each target Mac server according to the resource scheduling information carried in the resource scheduling request and the resource processing time of each target Mac server.
Further, the resource processing information includes task information; the processor 301 is specifically configured to, when determining the resource processing time of each target Mac server according to the resource processing information on each target Mac server:
detecting whether task information on each target Mac server exists in the historical task information of the historical scheduling record;
and if the detection result is that the target Mac server does not exist, acquiring the code quantity of the task which is being processed and is to be processed by each target Mac server, and determining the resource processing time of each target Mac server according to the code quantity.
Further, the processor 301 is further configured to:
if the task information on each target Mac server exists in the history task information of the history scheduling record, detecting whether the code information in the task information on each target Mac server is consistent with the code information in the corresponding history task information;
if the detection results are inconsistent, determining code variation amounts which are different from corresponding historical task information in the task information on each target Mac server, and determining the resource processing time of each target Mac server according to the code variation amounts.
Further, the resource scheduling information comprises task information to be scheduled; the processor 301 is specifically configured to, when determining the resource scheduling task amount of each target Mac server according to the resource scheduling information carried in the resource scheduling request and the resource processing time of each target Mac server:
determining the code quantity or the code variation quantity of the task to be scheduled according to the task information to be scheduled in the resource scheduling information;
determining the processing time of the task to be scheduled according to the code quantity or the code variation quantity of the task to be scheduled;
And determining the resource scheduling task quantity of each target Mac server according to the processing time of the task to be scheduled and the resource processing time of each target Mac server.
Further, when the processor 301 determines the resource scheduling task amount of each target Mac server according to the processing time of the task to be scheduled and the resource processing time of each target Mac server, the processor is specifically configured to:
determining the time for processing the task to be scheduled by each target Mac server according to the processing time of the task to be scheduled and the resource processing time of each target Mac server;
and determining the resource scheduling task quantity of each target Mac server for processing the task to be scheduled according to the time of each target Mac server for processing the task to be scheduled.
In the embodiment of the invention, the server can acquire the resource scheduling request, and the resource scheduling request carries the resource scheduling information; determining one or more target Mac servers and resource processing information on each target Mac server from each Mac server in the server cluster according to the resource scheduling information; determining the resource scheduling task quantity of each target Mac server according to the resource processing information and the resource scheduling information on each target Mac server; generating a resource scheduling allocation instruction according to the resource scheduling task quantity of each target Mac server, and sending the resource scheduling allocation instruction to the target Mac server serving as a master node in the server cluster to execute scheduling, so that the target Mac server serving as the master node allocates the corresponding resource scheduling task quantity to each target Mac server serving as an execution node according to the resource scheduling allocation instruction. By the method, the resource scheduling can be efficiently and reasonably performed, and the efficiency of the resource scheduling and the utilization rate of the resource are improved.
It should be appreciated that in embodiments of the present invention, the processor 301 may be a central processing unit (CenSral Processing UniS, CPU), which may also be other general purpose processors, digital signal processors (DigiSal Signal Processor, DSPs), application Specific Integrated Circuits (ASICs), off-the-shelf programmable gate arrays (Field-Programmable GaSe Array, FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The input device 302 may include a touch pad, a microphone, etc., and the output device 303 may include a display (LCD, etc.), a speaker, etc.
The memory 304 may include read only memory and random access memory and provides instructions and data to the processor 301. A portion of memory 304 may also include non-volatile random access memory. For example, the memory 304 may also store information of device type.
In a specific implementation, the processor 301, the input device 302, and the output device 303 described in the embodiments of the present invention may execute the implementation described in the embodiment of the method described in fig. 1 provided in the embodiments of the present invention, and may also execute the implementation of the resource scheduling apparatus described in fig. 2 in the embodiments of the present invention, which is not described herein again.
The embodiment of the present invention further provides a computer readable storage medium, where the computer readable storage medium stores a computer program, where the computer program when executed by a processor implements a resource scheduling method described in the embodiment corresponding to fig. 1, and may also implement a resource scheduling device in the embodiment corresponding to fig. 2 of the present invention, which is not described herein again.
The computer readable storage medium may be an internal storage unit of the resource scheduling device according to any of the foregoing embodiments, for example, a hard disk or a memory of the resource scheduling device. The computer readable storage medium may be an external storage device of the resource scheduling device, for example, a plug-in hard disk, a smart Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided in the resource scheduling device. Further, the computer readable storage medium may further include both an internal storage unit and an external storage device of the resource scheduling device. The computer readable storage medium is used for storing the computer program and other programs and data required by the resource scheduling device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention is essentially or a part contributing to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a computer-readable storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a terminal, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned computer-readable storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes. The computer readable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created from the use of blockchain nodes, and the like.
It is emphasized that to further guarantee the privacy and security of the data, the data may also be stored in a blockchain node. The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and the like. The Blockchain (Blockchain), which is essentially a decentralised database, is a string of data blocks that are generated by cryptographic means in association, each data block containing a batch of information of network transactions for verifying the validity of the information (anti-counterfeiting) and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, an application services layer, and the like.
While the invention has been described with reference to certain preferred embodiments, it will be understood by those skilled in the art that various changes and substitutions of equivalents may be made and equivalents will be apparent to those skilled in the art without departing from the scope of the invention.

Claims (7)

1. A resource scheduling method applied to a server cluster, where the server cluster is composed of a plurality of Mac servers, and a master node and one or more execution nodes are deployed in each Mac server, where the method includes:
Acquiring a resource scheduling request, wherein the resource scheduling request carries resource scheduling information;
determining one or more target Mac servers and resource processing information on each target Mac server from each Mac server in the server cluster according to the resource scheduling information;
determining the resource scheduling task amount of each target Mac server according to the resource processing information and the resource scheduling information on each target Mac server;
the determining the resource scheduling task amount of each target Mac server according to the resource processing information and the resource scheduling information on each target Mac server includes:
determining the resource processing time of each target Mac server according to the resource processing information on each target Mac server;
determining the resource scheduling task quantity of each target Mac server according to the resource scheduling information carried in the resource scheduling request and the resource processing time of each target Mac server;
the resource processing information comprises task information; the determining the resource processing time of each target Mac server according to the resource processing information on each target Mac server includes:
Detecting whether task information on each target Mac server exists in the historical task information of the historical scheduling record;
if the detection result is that the target Mac server does not exist, acquiring the code quantity of the task which is being processed and is to be processed by each target Mac server, and determining the resource processing time of each target Mac server according to the code quantity;
if the task information on each target Mac server exists in the history task information of the history scheduling record, detecting whether the code information in the task information on each target Mac server is consistent with the code information in the corresponding history task information;
if the detection results are inconsistent, determining code variation amounts which are different from corresponding historical task information in the task information on each target Mac server, and determining the resource processing time of each target Mac server according to the code variation amounts;
generating a resource scheduling allocation instruction according to the resource scheduling task quantity of each target Mac server, and sending the resource scheduling allocation instruction to the target Mac server serving as a master node in the server cluster to execute scheduling, so that the target Mac server serving as the master node allocates the corresponding resource scheduling task quantity to each target Mac server serving as an executing node according to the resource scheduling allocation instruction.
2. The method of claim 1, wherein the resource scheduling information includes development tool version information and/or certificate information; and determining one or more target Mac servers from the Mac servers in the server cluster according to the resource scheduling information, wherein the method comprises the following steps:
acquiring development tool version information and/or certificate information of each Mac server;
comparing the development tool version information and/or the certificate information in the resource scheduling information with the development tool version information and/or the certificate information of each Mac server, and determining one or more target Mac servers matched with the development tool version information and/or the certificate information in the resource scheduling information from each Mac server.
3. The method of claim 1, wherein the resource scheduling information includes task information to be scheduled; the determining the resource scheduling task amount of each target Mac server according to the resource scheduling information carried in the resource scheduling request and the resource processing time of each target Mac server includes:
determining the code quantity or the code variation quantity of the task to be scheduled according to the task information to be scheduled in the resource scheduling information;
Determining the processing time of the task to be scheduled according to the code quantity or the code variation quantity of the task to be scheduled;
and determining the resource scheduling task quantity of each target Mac server according to the processing time of the task to be scheduled and the resource processing time of each target Mac server.
4. A method according to claim 3, wherein said determining the resource scheduling task amount of each target Mac server according to the processing time of the task to be scheduled and the resource processing time of each target Mac server comprises:
determining the time for processing the task to be scheduled by each target Mac server according to the processing time of the task to be scheduled and the resource processing time of each target Mac server;
and determining the resource scheduling task quantity of each target Mac server for processing the task to be scheduled according to the time of each target Mac server for processing the task to be scheduled.
5. A resource scheduling device, provided in a server cluster, where the server cluster is composed of a plurality of Mac servers, and a master node and one or more execution nodes are deployed in each Mac server, where the device includes:
The resource scheduling device comprises an acquisition unit, a scheduling unit and a scheduling unit, wherein the acquisition unit is used for acquiring a resource scheduling request, and the resource scheduling request carries resource scheduling information;
the first determining unit is used for determining one or more target Mac servers and resource processing information on each target Mac server from each Mac server in the server cluster according to the resource scheduling information;
a second determining unit, configured to determine a resource scheduling task amount of each target Mac server according to the resource processing information and the resource scheduling information on each target Mac server;
the second determining unit is specifically configured to, when determining the resource scheduling task amount of each target Mac server according to the resource processing information and the resource scheduling information on each target Mac server:
determining the resource processing time of each target Mac server according to the resource processing information on each target Mac server;
determining the resource scheduling task quantity of each target Mac server according to the resource scheduling information carried in the resource scheduling request and the resource processing time of each target Mac server;
the resource processing information comprises task information; the second determining unit is specifically configured to, when determining the resource processing time of each target Mac server according to the resource processing information on each target Mac server:
Detecting whether task information on each target Mac server exists in the historical task information of the historical scheduling record;
if the detection result is that the target Mac server does not exist, acquiring the code quantity of the task which is being processed and is to be processed by each target Mac server, and determining the resource processing time of each target Mac server according to the code quantity;
if the task information on each target Mac server exists in the history task information of the history scheduling record, detecting whether the code information in the task information on each target Mac server is consistent with the code information in the corresponding history task information;
if the detection results are inconsistent, determining code variation amounts which are different from corresponding historical task information in the task information on each target Mac server, and determining the resource processing time of each target Mac server according to the code variation amounts;
and the sending unit is used for generating a resource scheduling allocation instruction according to the resource scheduling task quantity of each target Mac server, and sending the resource scheduling allocation instruction to the target Mac server serving as a main node in the server cluster to execute scheduling, so that the target Mac server serving as the main node allocates the corresponding resource scheduling task quantity to each target Mac server serving as an executing node according to the resource scheduling allocation instruction.
6. A server comprising a processor, an input device, an output device and a memory, the processor, the input device, the output device and the memory being interconnected, wherein the memory is adapted to store a computer program, the computer program comprising a program, the processor being configured to invoke the program to perform the method of any of claims 1-4.
7. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program, which is executed by a processor to implement the method of any of claims 1-4.
CN202110911937.4A 2021-08-09 2021-08-09 Resource scheduling method, device, server and storage medium Active CN113590298B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110911937.4A CN113590298B (en) 2021-08-09 2021-08-09 Resource scheduling method, device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110911937.4A CN113590298B (en) 2021-08-09 2021-08-09 Resource scheduling method, device, server and storage medium

Publications (2)

Publication Number Publication Date
CN113590298A CN113590298A (en) 2021-11-02
CN113590298B true CN113590298B (en) 2024-03-26

Family

ID=78256594

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110911937.4A Active CN113590298B (en) 2021-08-09 2021-08-09 Resource scheduling method, device, server and storage medium

Country Status (1)

Country Link
CN (1) CN113590298B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114091962A (en) * 2021-11-30 2022-02-25 中国建设银行股份有限公司 Resource scheduling management method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103309738A (en) * 2013-05-31 2013-09-18 中国联合网络通信集团有限公司 User job scheduling method and device
CN108156236A (en) * 2017-12-22 2018-06-12 平安养老保险股份有限公司 Service request processing method, device, computer equipment and storage medium
CN110287009A (en) * 2019-05-28 2019-09-27 北京大米科技有限公司 A kind of working node selection method, device, storage medium and server
WO2020199487A1 (en) * 2019-04-03 2020-10-08 平安科技(深圳)有限公司 Method, apparatus and device for responding to access request, and storage medium
CN111897638A (en) * 2020-07-27 2020-11-06 广州虎牙科技有限公司 Distributed task scheduling method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103309738A (en) * 2013-05-31 2013-09-18 中国联合网络通信集团有限公司 User job scheduling method and device
CN108156236A (en) * 2017-12-22 2018-06-12 平安养老保险股份有限公司 Service request processing method, device, computer equipment and storage medium
WO2020199487A1 (en) * 2019-04-03 2020-10-08 平安科技(深圳)有限公司 Method, apparatus and device for responding to access request, and storage medium
CN110287009A (en) * 2019-05-28 2019-09-27 北京大米科技有限公司 A kind of working node selection method, device, storage medium and server
CN111897638A (en) * 2020-07-27 2020-11-06 广州虎牙科技有限公司 Distributed task scheduling method and system

Also Published As

Publication number Publication date
CN113590298A (en) 2021-11-02

Similar Documents

Publication Publication Date Title
CN108053211B (en) Transaction processing method and device based on block chain
CN108462760B (en) Electronic device, automatic cluster access domain name generation method and storage medium
CN111368013B (en) Unified identification method, system, equipment and storage medium based on multiple accounts
CN110827002B (en) Approval method based on workflow and workflow engine
CN112581018B (en) Method, system, device and storage medium for managing process tasks
CN112631751A (en) Task scheduling method and device, computer equipment and storage medium
CN111309506A (en) Method, equipment, server and readable storage medium for positioning compiling errors
CN106257879B (en) Method and device for downloading application
CN113590298B (en) Resource scheduling method, device, server and storage medium
CN114237852A (en) Task scheduling method, device, server and storage medium
CN112860662A (en) Data blood relationship establishing method and device, computer equipment and storage medium
CN111752822A (en) Containerization pressure measurement scheduling method, computer equipment and readable storage medium
CN112529700A (en) Business handling and auditing method, system, equipment and readable storage medium
CN111813518A (en) Robot early warning method and device, computer equipment and storage medium
CN113254106B (en) Task execution method and device based on Flink, computer equipment and storage medium
CN113609226A (en) Data export method and device, computer equipment and storage medium
CN113419949B (en) Abnormality detection method, device, equipment and storage medium for data processing
CN113780580B (en) Data analysis method, device, equipment and storage medium based on machine learning
CN110175036B (en) Upgrading method and device for soft lock permission
CN108509773A (en) A kind of source code reinforcement means and device
CN114185752A (en) Application operation memory statistical analysis method, device, equipment and storage medium
CN114327673A (en) Task starting method and device, electronic equipment and storage medium
CN109246216B (en) Access request processing method and device
CN113434069A (en) Menu configuration method, device, equipment and storage medium
CN113343189A (en) Method and device for preventing malicious swiping of short message verification code

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
GR01 Patent grant
GR01 Patent grant