WO2022078347A1 - Task scheduling method and apparatus, electronic device, and storage medium - Google Patents

Task scheduling method and apparatus, electronic device, and storage medium Download PDF

Info

Publication number
WO2022078347A1
WO2022078347A1 PCT/CN2021/123361 CN2021123361W WO2022078347A1 WO 2022078347 A1 WO2022078347 A1 WO 2022078347A1 CN 2021123361 W CN2021123361 W CN 2021123361W WO 2022078347 A1 WO2022078347 A1 WO 2022078347A1
Authority
WO
WIPO (PCT)
Prior art keywords
task
server
schedulable
fragmentation
queue
Prior art date
Application number
PCT/CN2021/123361
Other languages
French (fr)
Chinese (zh)
Inventor
刘根生
Original Assignee
深圳壹账通智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳壹账通智能科技有限公司 filed Critical 深圳壹账通智能科技有限公司
Publication of WO2022078347A1 publication Critical patent/WO2022078347A1/en

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/5038Allocation 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 execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
    • 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
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5017Task decomposition
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present application relates to the technical field of data processing, and in particular, to a task scheduling method, apparatus, electronic device and storage medium.
  • a task in order to improve efficiency, a task can be divided into multiple task shards and processed by multiple servers at the same time, but the inventor realized that the performance of different servers may be inconsistent, and the processing task The efficiency of the server is inconsistent, and the division of task shards is not uniform. When some servers complete the task, other servers are still processing the task, which leads to the waste of some resources and the task processing efficiency is not high.
  • a first aspect of the present application provides a task scheduling method, the task scheduling method includes:
  • the task to be processed is fragmented to obtain a fragmentation queue, wherein the fragmentation queue is composed of a plurality of task fragments with a uniform amount of data;
  • the task shards in the sharding queue are scheduled to each of the schedulable servers;
  • a second aspect of the present application provides an electronic device, the electronic device includes a processor and a memory, the processor is configured to execute computer-readable instructions stored in the memory to implement the following steps:
  • the task to be processed is fragmented to obtain a fragmentation queue, wherein the fragmentation queue is composed of a plurality of task fragments with a uniform amount of data;
  • the task shards in the sharding queue are scheduled to each of the schedulable servers;
  • a third aspect of the present application provides a computer-readable storage medium on which at least one computer-readable instruction is stored, and the at least one computer-readable instruction is executed by a processor to implement the following steps:
  • the task to be processed is subjected to fragmentation processing to obtain a fragmentation queue, wherein the fragmentation queue is composed of multiple task fragments with an even amount of data;
  • the task shards in the sharding queue are scheduled to each of the schedulable servers;
  • a fourth aspect of the present application provides a task scheduling apparatus, and the task scheduling apparatus includes:
  • the acquisition module is used to acquire and count the task parallelism of all schedulable servers when the pending task is received, and obtain the total parallelism of the task;
  • a processing module configured to perform fragmentation processing on the to-be-processed task according to the total parallelism of the task to obtain a fragmentation queue, wherein the fragmentation queue is composed of a plurality of task fragments with a uniform amount of data;
  • a scheduling module configured to schedule the task shards in the sharding queue to each schedulable server according to the task parallelism of each schedulable server;
  • the transfer module is configured to perform task transfer on the task fragment of the abnormal server according to the fragment queue when it is detected that there is an abnormal server in all the schedulable servers.
  • a task can be divided into multiple task slices with a uniform amount of data according to the total task parallelism, and the task slices processed by each schedulable server have their own task parallelism. Consistent, that is, each schedulable server can simultaneously complete its own task fragmentation, so that the resources of different servers can be fully utilized, and the efficiency of task processing is improved.
  • the task transfer is performed according to the task queue, that is, any server obtains the slice array by registering the task in the task queue and executes it to ensure the normal execution of the task.
  • FIG. 1 is a flowchart of a preferred embodiment of the task scheduling method of the present application.
  • FIG. 2 is a functional block diagram of a preferred embodiment of the task scheduling apparatus of the present application.
  • FIG. 3 is a schematic structural diagram of an electronic device implementing a preferred embodiment of the task scheduling method of the present application.
  • the task scheduling method of the embodiment of the present application is applied to an electronic device, and can also be applied to a hardware environment composed of an electronic device and a server connected to the electronic device through a network, and is jointly executed by the server and the electronic device.
  • the network includes, but is not limited to: a wide area network, a metropolitan area network or a local area network.
  • the server may refer to a computer system that can provide services to other devices (eg, electronic devices) in the network. If a personal computer can provide a file transfer protocol (File Transfer Protocol, referred to as FTP) service, it can also be called a server.
  • FTP File Transfer Protocol
  • a server refers to some high-performance computers that can provide services to the outside world through a network. Compared with ordinary personal computers, servers have higher requirements in terms of stability, security, and performance. , chipset, memory, disk system, network and other hardware are different from ordinary personal computers.
  • the electronic device is a device that can automatically perform numerical calculation and/or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application-specific integrated circuits (ASICs), field programmable gates Arrays (FPGA), digital processors (DSP), embedded devices, etc.
  • the electronic equipment may also include network equipment and/or user equipment.
  • the network device includes but is not limited to a single network device, a server group composed of multiple network devices, or a cloud composed of a large number of hosts or network devices based on cloud computing, wherein cloud computing is distributed computing A super virtual computer consisting of a group of loosely coupled sets of computers.
  • the user equipment includes but is not limited to any electronic product that can interact with the user through a keyboard, a mouse, a remote control, a touchpad or a voice-activated device, for example, a personal computer, a tablet computer, a smart phone, a personal digital Assistant PDA etc.
  • FIG. 1 is a flowchart of a preferred embodiment of a task scheduling method disclosed in the present application. Wherein, according to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted. Wherein, the executing subject of the task scheduling method may be an electronic device.
  • the degree of task parallelism refers to the number of tasks that can be processed at the same time.
  • the total task parallelism may refer to the sum of the task parallelisms of all schedulable servers, that is, the total number of tasks that can be simultaneously processed by all schedulable servers.
  • the schedulable server may refer to a currently available server.
  • the status information of all servers in the registration list can be obtained regularly by using a preset server (such as a server with a task scheduling center system) using an Internet packet explorer (Packet Internet Groper, ping).
  • a preset server such as a server with a task scheduling center system
  • an Internet packet explorer Packet Internet Groper, ping.
  • a response from a server can be received normally, it can be determined that the server is online and is a schedulable server that can be used; if a response from a server cannot be received, it can be determined that the server is offline, yes Unavailable server.
  • Each schedulable server may send its own task parallelism to the preset server, and the preset server may collect statistics on the task parallelism of all schedulable servers to obtain the total task parallelism.
  • the Internet packet explorer is a program used to test the amount of network connections. It can send a request message to a specific destination host through a service command Ping to determine whether it can successfully exchange data with another host. package to determine whether the other host is running normally, whether the network is smooth, etc.
  • S12 According to the total parallelism of the tasks, perform sharding processing on the to-be-processed task to obtain a sharding queue, wherein the sharding queue is composed of a plurality of task shards with an even amount of data.
  • the above-mentioned fragmented queue can also be stored in a node of a blockchain.
  • the task to be processed may be fragmented to obtain a fragmented queue. For example, there are 1 million pieces of data that need to be processed for the task to be processed. After fragmentation processing, 10 task scores are obtained. Each task shard has 100,000 pieces of data, and the shard queue composed of these task shards can be expressed as: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].
  • performing fragmentation processing on the to-be-processed task, and obtaining a fragmented queue includes:
  • the fragmentation queue is generated according to the plurality of task fragments.
  • the tasks to be processed may be segmented according to the total parallelism of the tasks. Assuming that the total parallelism of the tasks is M, the tasks to be processed may be processed into M pieces Task fragmentation, and generate the fragmentation queue [0,1,2,...,M-1], the data volume of each task fragment is consistent with the data volume of any other task fragment.
  • scheduling the task shards in the sharding queue to each of the schedulable servers includes:
  • For each schedulable server according to the arrangement order of the task shards in the shard queue, determine from the task shards a number of target task shards that are consistent with the task parallelism of the schedulable server ;
  • the target task is sharded and scheduled to the schedulable server.
  • the number of tasks of the schedulable server may be sequentially obtained from the shard queue according to the arrangement order of the task shards in the shard queue.
  • Target task shards with the same degree of parallelism schedule the target task shards to the schedulable server, for example: assuming that the task parallelism of the schedulable server is 2, and the shard queue is [0,1 ,2,3,4], according to the sorting order from left to right, the obtained task shards are "0" and "1", that is, [0,1], at this time, the sharding queue becomes [ 2, 3, 4], assuming that the task parallelism of the next schedulable server is 1, the task shard obtained by the next schedulable server is "2", namely [2].
  • the target task fragment can be stored in the task fragment scheduling record corresponding to the fragment queue in the form of an array, such as "A: [0,1]", which can be used to indicate that the server A last The obtained task shards are "0" and "1". If server A is scheduled with task shards "5" and “6", the "A: [0,1]” in the task shard scheduling record will be changed. Overwritten by "A:[5,6]".
  • the method further includes:
  • For each schedulable server determine whether there is scheduling information corresponding to the schedulable server in the second task segment scheduling record, where the scheduling information is the task segment scheduled to the schedulable server. film information;
  • the scheduling information is replaced with the task fragmentation information scheduled to the schedulable server.
  • the information of the task fragmentation last obtained by each server may be recorded to obtain the task fragmentation scheduling record.
  • the task fragment scheduling record needs to be updated.
  • the task fragment scheduling record only saves the task fragment information obtained by the schedulable server for the last time, and the amount of information is small. , which can be read quickly.
  • the task fragmentation scheduling record at the current moment of the fragmentation queue is obtained, that is, the second task fragmentation scheduling record. For each schedulable server, this embodiment first determines the second task fragmentation scheduling record.
  • Whether there is scheduling information corresponding to the schedulable server in the task fragmentation scheduling record if there is no scheduling information corresponding to the schedulable server in the second task fragmentation scheduling record, it will be scheduled to the schedulable server.
  • the task fragmentation information in the server is written into the second task fragmentation scheduling record; if there is scheduling information corresponding to the schedulable server in the second task fragmentation scheduling record, replace the scheduling information with Task fragmentation information scheduled to the schedulable server.
  • all the schedulable servers can be monitored, and when an abnormal server with an exception is monitored, the task transfer can be performed on the task fragment of the abnormal server according to the fragment queue in time, Improve system stability.
  • performing task transfer on the task fragmentation of the abnormal server includes:
  • the first task fragmentation scheduling record determine the task fragmentation scheduled to the abnormal server
  • the task shards of the abnormal server are added to the shard queue, so as to reschedule the task shards of the abnormal server.
  • the task fragment scheduling record of the fragment queue at the current moment may be obtained, that is, the first task fragment Slice scheduling record, obtain the information of the last task slice obtained by the abnormal server from the first task slice scheduling record to determine the task slice scheduled to the abnormal server, and then assign the abnormal server to the
  • the last obtained task shard is added to the shard queue, for example, the task shards of the abnormal server are "3" and "4", assuming that the shard queue at this time is empty, that is, the task of the shard queue All shards have been scheduled.
  • the shard queue After adding the task shard of the exception server to the shard queue, the shard queue can be expressed as [3, 4].
  • the server in the idle state can schedule the task shards in the shard queue according to the task parallelism of the server in the idle state. For example, if the task parallelism of the server in the idle state is 2, then Both task shards "3" and "4" can be scheduled to this idle server.
  • the The method when it is detected that there is an abnormal server with an abnormality in all the schedulable servers, according to the fragmentation queue, after the task fragmentation of the abnormal server is transferred, the The method also includes:
  • the scheduling information of the abnormal server is deleted from the scheduling record of the third task segment.
  • the task fragmentation scheduling record at the current moment in the fragmentation queue may be maintained, that is, the third task fragmentation scheduling may be performed.
  • the record is maintained, the scheduling information of the abnormal server is deleted from the third task fragmentation scheduling record, and redundant data is deleted in time to improve system performance.
  • the method further include:
  • the to-be-scheduled task segment is scheduled to the target server.
  • a task can be divided into multiple task slices with uniform data volume according to the total task parallelism, and the task slices processed by each schedulable server are consistent with its own task parallelism. That is, each schedulable server can simultaneously complete its own task fragmentation, so that the resources of different servers can be fully utilized, and the efficiency of task processing is improved.
  • the task transfer is performed according to the task queue, that is, any server obtains the slice array by registering the task in the task queue and executes it to ensure the normal execution of the task.
  • FIG. 2 is a functional block diagram of a preferred embodiment of a task scheduling apparatus disclosed in the present application.
  • the task scheduling apparatus 20 can run in an electronic device.
  • the task scheduling apparatus 20 may include a plurality of functional modules composed of program code segments.
  • the program codes of each program segment in the task scheduling apparatus 20 may be stored in a memory and executed by at least one processor to perform some or all of the steps in the task scheduling method described in FIG. 1 .
  • the task scheduling apparatus 20 may be divided into multiple functional modules according to the functions performed by the task scheduling apparatus 20 .
  • the functional modules may include: an acquisition module 201 , a processing module 202 , a scheduling module 203 and a transfer module 204 .
  • a module referred to in this application refers to a series of computer program segments that can be executed by at least one processor and can perform fixed functions, and are stored in a memory.
  • the obtaining module 201 is configured to obtain and count the task parallelism of all schedulable servers when the task to be processed is received, and obtain the total parallelism of the task.
  • the degree of task parallelism refers to the number of tasks that can be processed at the same time.
  • the total task parallelism may refer to the sum of the task parallelisms of all schedulable servers, that is, the total number of tasks that can be simultaneously processed by all schedulable servers.
  • the schedulable server may refer to a currently available server.
  • the status information of all servers in the registration list can be obtained regularly by using a preset server (such as a server with a task scheduling center system) using an Internet packet explorer (Packet Internet Groper, ping).
  • a preset server such as a server with a task scheduling center system
  • an Internet packet explorer Packet Internet Groper, ping.
  • a response from a server can be received normally, it can be determined that the server is online and is a schedulable server that can be used; if a response from a server cannot be received, it can be determined that the server is offline, yes Unavailable server.
  • Each schedulable server may send its own task parallelism to the preset server, and the preset server may collect statistics on the task parallelism of all schedulable servers to obtain the total task parallelism.
  • the Internet packet explorer is a program used to test the amount of network connections. It can send a request message to a specific destination host through a service command Ping to determine whether it can successfully exchange data with another host. package to determine whether the other host is running normally, whether the network is smooth, etc.
  • the processing module 202 is configured to perform fragmentation processing on the to-be-processed task according to the total parallelism of the tasks to obtain a fragmentation queue, wherein the fragmentation queue is composed of a plurality of task fragments with a uniform amount of data.
  • the above-mentioned fragmented queue can also be stored in a node of a blockchain.
  • the task to be processed may be fragmented to obtain a fragmented queue. For example, there are 1 million pieces of data that need to be processed for the task to be processed. After fragmentation processing, 10 task scores are obtained. Each task shard has 100,000 pieces of data, and the shard queue composed of these task shards can be expressed as: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].
  • the scheduling module 203 is configured to schedule the task shards in the sharding queue to each schedulable server according to the task parallelism of each schedulable server.
  • the transfer module 204 is configured to perform task transfer on the task shards of the abnormal server according to the shard queue when it is detected that there is an abnormal server with an exception among all the schedulable servers.
  • all the schedulable servers can be monitored, and when an abnormal server with an exception is monitored, the task transfer can be performed on the task fragment of the abnormal server according to the fragment queue in time, Improve system stability.
  • the transfer module 204 performs task transfer on the task fragmentation of the abnormal server specifically as follows:
  • the first task fragmentation scheduling record determine the task fragmentation scheduled to the abnormal server
  • the task shards of the abnormal server are added to the shard queue, so as to reschedule the task shards of the abnormal server.
  • the task fragment scheduling record of the fragment queue at the current moment may be obtained, that is, the first task fragment Slice scheduling record, obtain the information of the last task slice obtained by the abnormal server from the first task slice scheduling record to determine the task slice scheduled to the abnormal server, and then assign the abnormal server to the
  • the last obtained task shard is added to the shard queue, for example, the task shards of the abnormal server are "3" and "4", assuming that the shard queue at this time is empty, that is, the task of the shard queue All shards have been scheduled.
  • the shard queue After adding the task shard of the exception server to the shard queue, the shard queue can be expressed as [3, 4].
  • the server in the idle state can schedule the task shards in the shard queue according to the task parallelism of the server in the idle state. For example, if the task parallelism of the server in the idle state is 2, then Both task shards "3" and "4" can be scheduled to this idle server.
  • the task scheduling apparatus 20 further includes:
  • the first judgment module is used for the scheduling module 203 to schedule the tasks in the sharding queue to each schedulable server according to the task parallelism of each schedulable server. When there are target servers with completed tasks in all the schedulable servers, determine whether there are remaining task fragments in the fragmentation queue;
  • a determination module for if there are remaining task fragments in the fragmentation queue, then according to the task parallelism of the target server, determine the task fragmentation to be scheduled from the remaining task fragments;
  • the scheduling module 203 is further configured to schedule the to-be-scheduled task segments to the target server.
  • the scheduling module 203 schedules the task shards in the sharding queue to each schedulable server according to the task parallelism of each schedulable server Specifically:
  • For each schedulable server according to the arrangement order of the task shards in the shard queue, determine from the task shards a number of target task shards that are consistent with the task parallelism of the schedulable server ;
  • the target task is sharded and scheduled to the schedulable server.
  • the number of tasks of the schedulable server may be sequentially obtained from the shard queue according to the arrangement order of the task shards in the shard queue.
  • Target task shards with the same degree of parallelism schedule the target task shards to the schedulable server, for example: assuming that the task parallelism of the schedulable server is 2, and the shard queue is [0,1 ,2,3,4], according to the sorting order from left to right, the obtained task shards are "0" and "1", that is, [0,1], at this time, the sharding queue becomes [ 2, 3, 4], assuming that the task parallelism of the next schedulable server is 1, the task shard obtained by the next schedulable server is "2", namely [2].
  • the target task fragment can be stored in the task fragment scheduling record corresponding to the fragment queue in the form of an array, such as "A: [0,1]", which can be used to indicate that the server A last The obtained task shards are "0" and "1". If server A is scheduled with task shards "5" and “6", the "A: [0,1]” in the task shard scheduling record will be changed. Overwritten by "A:[5,6]".
  • the processing module 202 performs fragmentation processing on the to-be-processed task according to the total parallelism of the tasks, and the method for obtaining a fragmented queue is as follows:
  • the fragmentation queue is generated according to the plurality of task fragments.
  • the tasks to be processed may be segmented according to the total parallelism of the tasks. Assuming that the total parallelism of the tasks is M, the tasks to be processed may be processed into M pieces Task fragmentation, and generate the fragmentation queue [0,1,2,...,M-1], the data volume of each task fragment is consistent with the data volume of any other task fragment.
  • the obtaining module 201 is further configured to, according to the task parallelism of each schedulable server, the scheduling module 203 schedule the task shards in the sharding queue to each After each of the schedulable servers, and when the transfer module 204 detects that there is an abnormal server with an exception in all the schedulable servers, the transfer module 204 performs the task fragmentation on the abnormal server according to the fragmentation queue. Before the task transfer, obtain the second task fragmentation scheduling record of the fragmentation queue;
  • the task scheduling device 20 further includes:
  • a second judging module configured to judge, for each schedulable server, whether there is scheduling information corresponding to the schedulable server in the second task fragmentation scheduling record, wherein the scheduling information is the scheduling information to the schedulable server. Describe the task fragmentation information of the schedulable server;
  • a writing module configured to write the task fragmentation information scheduled to the schedulable server into the second task fragmentation scheduling record if the scheduling information corresponding to the schedulable server does not exist in the second task fragmentation scheduling record In the task shard scheduling record;
  • the scheduling module 203 is further configured to replace the scheduling information with the task segment scheduled to the schedulable server if there is scheduling information corresponding to the schedulable server in the second task slice scheduling record. slice information.
  • the information of the task fragmentation last obtained by each server may be recorded to obtain the task fragmentation scheduling record.
  • the task fragment scheduling record needs to be updated.
  • the task fragment scheduling record only saves the task fragment information obtained by the schedulable server for the last time, and the amount of information is small. , which can be read quickly.
  • the task fragmentation scheduling record at the current moment of the fragmentation queue is obtained, that is, the second task fragmentation scheduling record. For each schedulable server, this embodiment first determines the second task fragmentation scheduling record.
  • Whether there is scheduling information corresponding to the schedulable server in the task fragmentation scheduling record if there is no scheduling information corresponding to the schedulable server in the second task fragmentation scheduling record, it will be scheduled to the schedulable server.
  • the task fragmentation information in the server is written into the second task fragmentation scheduling record; if there is scheduling information corresponding to the schedulable server in the second task fragmentation scheduling record, replace the scheduling information with Task fragmentation information scheduled to the schedulable server.
  • the acquisition module 201 is further configured to, when the transfer module 204 detects that there is an abnormal server with an exception in all the schedulable servers, according to the fragmentation queue, to After the task fragmentation of the abnormal server performs task transfer, obtain the third task fragmentation scheduling record of the fragmentation queue;
  • the task scheduling device 20 further includes:
  • a deletion module configured to delete the scheduling information of the abnormal server from the third task fragmentation scheduling record.
  • the task fragmentation scheduling record at the current moment in the fragmentation queue may be maintained, that is, the third task fragmentation scheduling may be performed.
  • the record is maintained, the scheduling information of the abnormal server is deleted from the third task fragmentation scheduling record, and redundant data is deleted in time to improve system performance.
  • a task can be divided into a plurality of task slices with an even amount of data according to the total task parallelism, and the task slices processed by each schedulable server and its own task parallelism Consistent, that is, each schedulable server can simultaneously complete its own task fragmentation, so that the resources of different servers can be fully utilized, and the efficiency of task processing is improved.
  • the task transfer is performed according to the task queue, that is, any server obtains the slice array by registering the task in the task queue and executes it to ensure the normal execution of the task.
  • FIG. 3 is a schematic structural diagram of an electronic device implementing a preferred embodiment of the task scheduling method of the present application.
  • the electronic device 3 includes a memory 31 , at least one processor 32 , a computer program 33 stored in the memory 31 and executable on the at least one processor 32 , and at least one communication bus 34 .
  • FIG. 3 is only an example of the electronic device 3, and does not constitute a limitation on the electronic device 3, and may include more or less components than those shown, or combinations thereof Certain components, or different components, for example, the electronic device 3 may also include input and output devices, network access devices, and the like.
  • the electronic device 3 also includes, but is not limited to, any electronic product that can interact with the user through a keyboard, a mouse, a remote control, a touchpad or a voice-activated device, for example, a personal computer, a tablet computer, a smart phone, Personal Digital Assistant (PDA), game console, Internet Protocol Television (IPTV), smart wearable devices, etc.
  • the network where the electronic device 3 is located includes but is not limited to the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (Virtual Private Network, VPN) and the like.
  • the at least one processor 32 may be a central processing unit (Central Processing Unit, CPU), or other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC) ), Field-Programmable Gate Array (FPGA) or other programmable logic devices, transistor logic devices, discrete hardware components, etc.
  • the processor 32 can be a microprocessor or the processor 32 can also be any conventional processor, etc.
  • the processor 32 is the control center of the electronic device 3, and uses various interfaces and lines to connect the entire electronic device 3 of each part.
  • the memory 31 can be used to store the computer program 33 and/or modules/units, and the processor 32 executes or executes the computer programs and/or modules/units stored in the memory 31 and calls the computer programs and/or modules/units stored in the memory 31. 31 to realize various functions of the electronic device 3 .
  • the memory 31 may mainly include a stored program area and a stored data area, wherein the stored program area may store an operating system, an application program (such as a sound playback function, an image playback function, etc.) required for at least one function, and the like; the storage data area may Data and the like created according to the use of the electronic device 3 are stored.
  • the memory 31 may include volatile and non-volatile memory, such as hard disk, internal memory, plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, flash memory card ( Flash Card), at least one disk storage device, flash memory device, etc.
  • volatile and non-volatile memory such as hard disk, internal memory, plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, flash memory card ( Flash Card), at least one disk storage device, flash memory device, etc.
  • the computer program 33 may be divided into one or more modules/units, and the one or more modules/units are stored in the memory 31 and executed by the processor 32 to complete the this application.
  • the one or more modules/units may be a series of computer-readable instruction segments capable of performing specific functions, and the computer-readable instruction segments are used to describe the execution process of the computer-readable instructions in the electronic device 3 .
  • the computer program 33 can be divided into an acquisition module 201 , a processing module 202 , a scheduling module 203 , and a transfer module 204 .
  • the memory 31 in the electronic device 3 stores multiple computer-readable instructions to implement a task scheduling method
  • the processor 32 can execute the multiple computer-readable instructions to implement:
  • the task to be processed is fragmented to obtain a fragmentation queue, wherein the fragmentation queue is composed of a plurality of task fragments with a uniform amount of data;
  • the task shards in the sharding queue are scheduled to each of the schedulable servers;
  • a task can be divided into multiple task slices with a uniform amount of data according to the total task parallelism, and the task slice processed by each schedulable server is consistent with its own task parallelism , that is, each schedulable server can simultaneously complete the obtained task fragmentation, so that the resources of different servers can be fully utilized, and the efficiency of task processing is improved.
  • the task transfer is performed according to the task queue, that is, any server obtains the slice array by registering the task in the task queue and executes it to ensure the normal execution of the task.
  • modules/units integrated in the electronic device 3 are implemented in the form of software functional units and are sold or used as independent products, they can be stored in a computer-readable storage medium, and the computer-readable storage medium may be a non-volatile storage medium.
  • a volatile storage medium can also be a volatile storage medium.
  • the present application can implement all or part of the processes in the methods of the above embodiments, and can also be completed by instructing the relevant hardware through a computer program.
  • the computer program can be stored in a computer-readable storage medium, and the computer When the program is executed by the processor, the steps of the foregoing method embodiments can be implemented.
  • the computer program code may be in the form of source code, object code, executable file or some intermediate form, and so on.
  • the computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, removable hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory) , Random Access Memory (RAM, Random Access Memory), etc.
  • modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional module in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware, or can be implemented in the form of hardware plus software function modules.

Abstract

The present application relates to the technical field of data processing, and provides a task scheduling method and apparatus, an electronic device, and a storage medium. The method comprises: upon receiving a task to be processed, acquiring the respective degrees of task parallelism of all schedulable servers and performing computation, so as to obtain the total degree of task parallelism; partitioning the task according to the total degree of task parallelism, so as to obtain a partition queue, wherein the partition queue consists of multiple task partitions having equal amounts of data; scheduling the task partitions in the partition queue according to the degree of task parallelism of each of the schedulable servers, such that the task partitions are distributed to the schedulable servers; and upon detecting, from all the schedulable servers, an abnormal server having experienced an abnormality, performing, according to the partition queue, a task transfer operation with respect to a task partition of the abnormal server. The present application can improve the efficiency of task processing. In addition, the partition queue can be stored in a blockchain.

Description

任务调度方法、装置、电子设备及存储介质Task scheduling method, device, electronic device and storage medium
本申请要求于2020年10月13日提交中国专利局,申请号为202011092091.8,发明名称为“任务调度方法、装置、电子设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed on October 13, 2020 with the application number 202011092091.8 and the invention title is "task scheduling method, device, electronic device and storage medium", the entire contents of which are incorporated by reference in this application.
技术领域technical field
本申请涉及数据处理技术领域,尤其涉及一种任务调度方法、装置、电子设备及存储介质。The present application relates to the technical field of data processing, and in particular, to a task scheduling method, apparatus, electronic device and storage medium.
背景技术Background technique
目前,在进行大量数据的处理过程中,为了提高效率,可以将一个任务拆分为多个任务分片,由多个服务器同时进行处理,但发明人意识到,不同服务器可能性能不一致,处理任务的效率不一致,且任务分片的划分也不均匀,存在一些服务器完成任务的时候,另外一些服务器还在处理任务,导致了部分资源的浪费,任务处理的效率不高。At present, in the process of processing a large amount of data, in order to improve efficiency, a task can be divided into multiple task shards and processed by multiple servers at the same time, but the inventor realized that the performance of different servers may be inconsistent, and the processing task The efficiency of the server is inconsistent, and the division of task shards is not uniform. When some servers complete the task, other servers are still processing the task, which leads to the waste of some resources and the task processing efficiency is not high.
因此,如何进行任务调度以提高任务处理的效率是一个需要解决的技术问题。Therefore, how to perform task scheduling to improve the efficiency of task processing is a technical problem that needs to be solved.
发明内容SUMMARY OF THE INVENTION
鉴于以上内容,有必要提供一种任务调度方法,能够提高任务处理的效率。In view of the above content, it is necessary to provide a task scheduling method, which can improve the efficiency of task processing.
本申请的第一方面提供一种任务调度方法,所述任务调度方法包括:A first aspect of the present application provides a task scheduling method, the task scheduling method includes:
当接收到待处理任务时,获取并统计所有可调度服务器的任务并行度,获得任务总并行度;When a pending task is received, obtain and count the task parallelism of all schedulable servers, and obtain the total parallelism of the task;
根据所述任务总并行度,对所述待处理任务进行分片处理,获得分片队列,其中,所述分片队列由多个数据量均匀的任务分片组成;According to the total degree of parallelism of the task, the task to be processed is fragmented to obtain a fragmentation queue, wherein the fragmentation queue is composed of a plurality of task fragments with a uniform amount of data;
根据每个所述可调度服务器的任务并行度,将所述分片队列中的任务分片调度至每个所述可调度服务器中;According to the task parallelism of each of the schedulable servers, the task shards in the sharding queue are scheduled to each of the schedulable servers;
当检测到所有所述可调度服务器中存在发生异常的异常服务器时,根据所述分片队列,对所述异常服务器的任务分片进行任务转移。When it is detected that there is an abnormal server with an abnormality among all the schedulable servers, task transfer is performed on the task fragment of the abnormal server according to the fragmentation queue.
本申请的第二方面提供一种电子设备,所述电子设备包括处理器和存储器,所述处理器用于执行所述存储器中存储的计算机可读指令以实现以下步骤:A second aspect of the present application provides an electronic device, the electronic device includes a processor and a memory, the processor is configured to execute computer-readable instructions stored in the memory to implement the following steps:
当接收到待处理任务时,获取并统计所有可调度服务器的任务并行度,获得任务总并行度;When a pending task is received, obtain and count the task parallelism of all schedulable servers, and obtain the total parallelism of the task;
根据所述任务总并行度,对所述待处理任务进行分片处理,获得分片队列,其中,所述分片队列由多个数据量均匀的任务分片组成;According to the total degree of parallelism of the task, the task to be processed is fragmented to obtain a fragmentation queue, wherein the fragmentation queue is composed of a plurality of task fragments with a uniform amount of data;
根据每个所述可调度服务器的任务并行度,将所述分片队列中的任务分片调度至每个所述可调度服务器中;According to the task parallelism of each of the schedulable servers, the task shards in the sharding queue are scheduled to each of the schedulable servers;
当检测到所有所述可调度服务器中存在发生异常的异常服务器时,根据所述分片队列,对所述异常服务器的任务分片进行任务转移。When it is detected that there is an abnormal server with an abnormality among all the schedulable servers, task transfer is performed on the task fragment of the abnormal server according to the fragmentation queue.
本申请的第三方面提供一种计算机可读存储介质,所述计算机可读存储介质上存储有至少一个计算机可读指令,所述至少一个计算机可读指令被处理器执行以实现以下步骤:A third aspect of the present application provides a computer-readable storage medium on which at least one computer-readable instruction is stored, and the at least one computer-readable instruction is executed by a processor to implement the following steps:
当接收到待处理任务时,获取并统计所有可调度服务器的任务并行度,获得任务总并行度;When a pending task is received, obtain and count the task parallelism of all schedulable servers, and obtain the total parallelism of the task;
根据所述任务总并行度,对所述待处理任务进行分片处理,获得分片队列,其中,所 述分片队列由多个数据量均匀的任务分片组成;According to the total degree of parallelism of the task, the task to be processed is subjected to fragmentation processing to obtain a fragmentation queue, wherein the fragmentation queue is composed of multiple task fragments with an even amount of data;
根据每个所述可调度服务器的任务并行度,将所述分片队列中的任务分片调度至每个所述可调度服务器中;According to the task parallelism of each of the schedulable servers, the task shards in the sharding queue are scheduled to each of the schedulable servers;
当检测到所有所述可调度服务器中存在发生异常的异常服务器时,根据所述分片队列,对所述异常服务器的任务分片进行任务转移。When it is detected that there is an abnormal server with an abnormality among all the schedulable servers, task transfer is performed on the task fragment of the abnormal server according to the fragmentation queue.
本申请的第四方面提供一种任务调度装置,所述任务调度装置包括:A fourth aspect of the present application provides a task scheduling apparatus, and the task scheduling apparatus includes:
获取模块,用于当接收到待处理任务时,获取并统计所有可调度服务器的任务并行度,获得任务总并行度;The acquisition module is used to acquire and count the task parallelism of all schedulable servers when the pending task is received, and obtain the total parallelism of the task;
处理模块,用于根据所述任务总并行度,对所述待处理任务进行分片处理,获得分片队列,其中,所述分片队列由多个数据量均匀的任务分片组成;a processing module, configured to perform fragmentation processing on the to-be-processed task according to the total parallelism of the task to obtain a fragmentation queue, wherein the fragmentation queue is composed of a plurality of task fragments with a uniform amount of data;
调度模块,用于根据每个所述可调度服务器的任务并行度,将所述分片队列中的任务分片调度至每个所述可调度服务器中;a scheduling module, configured to schedule the task shards in the sharding queue to each schedulable server according to the task parallelism of each schedulable server;
转移模块,用于当检测到所有所述可调度服务器中存在发生异常的异常服务器时,根据所述分片队列,对所述异常服务器的任务分片进行任务转移。The transfer module is configured to perform task transfer on the task fragment of the abnormal server according to the fragment queue when it is detected that there is an abnormal server in all the schedulable servers.
由以上技术方案可以看出,本申请中,可以根据总任务并行度,将一个任务切割为多个数据量均匀的任务分片,每个可调度服务器处理的任务分片与自身的任务并行度一致,即每个可调度服务器可以同时完成各自得到的任务分片,使得不同服务器的资源可以得到充分利用,提高了任务处理的效率。同时,如果正在执行任务的服务器出现了异常,根据任务队列进行任务转移,即任意一台服务器在所述任务队列中通过注册任务获取分片数组再执行即可,确保任务的正常执行。It can be seen from the above technical solutions that in this application, a task can be divided into multiple task slices with a uniform amount of data according to the total task parallelism, and the task slices processed by each schedulable server have their own task parallelism. Consistent, that is, each schedulable server can simultaneously complete its own task fragmentation, so that the resources of different servers can be fully utilized, and the efficiency of task processing is improved. At the same time, if an exception occurs on the server that is executing the task, the task transfer is performed according to the task queue, that is, any server obtains the slice array by registering the task in the task queue and executes it to ensure the normal execution of the task.
附图说明Description of drawings
图1是本申请任务调度方法的较佳实施例的流程图。FIG. 1 is a flowchart of a preferred embodiment of the task scheduling method of the present application.
图2是本申请任务调度装置的较佳实施例的功能模块图。FIG. 2 is a functional block diagram of a preferred embodiment of the task scheduling apparatus of the present application.
图3是本申请实现任务调度方法的较佳实施例的电子设备的结构示意图。FIG. 3 is a schematic structural diagram of an electronic device implementing a preferred embodiment of the task scheduling method of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中在本申请的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本申请。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field to which this application belongs. The terms used herein in the specification of the application are for the purpose of describing specific embodiments only, and are not intended to limit the application.
本申请实施例的任务调度方法应用在电子设备中,也可以应用在电子设备和通过网络与所述电子设备进行连接的服务器所构成的硬件环境中,由服务器和电子设备共同执行。网络包括但不限于:广域网、城域网或局域网。The task scheduling method of the embodiment of the present application is applied to an electronic device, and can also be applied to a hardware environment composed of an electronic device and a server connected to the electronic device through a network, and is jointly executed by the server and the electronic device. The network includes, but is not limited to: a wide area network, a metropolitan area network or a local area network.
其中,服务器可以是指能对网络中其它设备(如电子设备)提供服务的计算机系统。如果一个个人电脑能够对外提供文件传输协议(File Transfer Protocol,简称FTP)服务,也可以叫服务器。从狭义范围上讲,服务器专指某些高性能计算机,能通过网络,对外提供服务,其相对于普通的个人电脑来说,稳定性、安全性、性能等方面都要求更高,因此在CPU、芯片组、内存、磁盘系统、网络等硬件和普通的个人电脑有所不同。The server may refer to a computer system that can provide services to other devices (eg, electronic devices) in the network. If a personal computer can provide a file transfer protocol (File Transfer Protocol, referred to as FTP) service, it can also be called a server. In a narrow sense, a server refers to some high-performance computers that can provide services to the outside world through a network. Compared with ordinary personal computers, servers have higher requirements in terms of stability, security, and performance. , chipset, memory, disk system, network and other hardware are different from ordinary personal computers.
所述电子设备是一种能够按照事先设定或存储的指令,自动进行数值计算和/或信息处理的设备,其硬件包括但不限于微处理器、专用集成电路(ASIC)、现场可编程门阵列(FPGA)、数字处理器(DSP)、嵌入式设备等。所述电子设备还可包括网络设备和/或用户设备。其中,所述网络设备包括但不限于单个网络设备、多个网络设备组成的服务器组或基于云计算(Cloud  Computing)的由大量主机或网络设备构成的云,其中,云计算是分布式计算的一种,由一群松散耦合的计算机集组成的一个超级虚拟计算机。所述用户设备包括但不限于任何一种可与用户通过键盘、鼠标、遥控器、触摸板或声控设备等方式进行人机交互的电子产品,例如,个人计算机、平板电脑、智能手机、个人数字助理PDA等。The electronic device is a device that can automatically perform numerical calculation and/or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application-specific integrated circuits (ASICs), field programmable gates Arrays (FPGA), digital processors (DSP), embedded devices, etc. The electronic equipment may also include network equipment and/or user equipment. Wherein, the network device includes but is not limited to a single network device, a server group composed of multiple network devices, or a cloud composed of a large number of hosts or network devices based on cloud computing, wherein cloud computing is distributed computing A super virtual computer consisting of a group of loosely coupled sets of computers. The user equipment includes but is not limited to any electronic product that can interact with the user through a keyboard, a mouse, a remote control, a touchpad or a voice-activated device, for example, a personal computer, a tablet computer, a smart phone, a personal digital Assistant PDA etc.
请参见图1,图1是本申请公开的一种任务调度方法的较佳实施例的流程图。其中,根据不同的需求,该流程图中步骤的顺序可以改变,某些步骤可以省略。其中,所述任务调度方法的执行主体可以是电子设备。Please refer to FIG. 1. FIG. 1 is a flowchart of a preferred embodiment of a task scheduling method disclosed in the present application. Wherein, according to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted. Wherein, the executing subject of the task scheduling method may be an electronic device.
S11、当接收到待处理任务时,获取并统计所有可调度服务器的任务并行度,获得任务总并行度。S11. When the task to be processed is received, obtain and count the task parallelism of all schedulable servers, and obtain the total parallelism of the task.
其中,所述任务并行度是指可以同时处理的任务数量。The degree of task parallelism refers to the number of tasks that can be processed at the same time.
其中,所述任务总并行度可以是指所述所有可调度服务器的任务并行度的总和,即所述所有可调度服务器可以同时处理的任务的总数量。The total task parallelism may refer to the sum of the task parallelisms of all schedulable servers, that is, the total number of tasks that can be simultaneously processed by all schedulable servers.
其中,所述可调度服务器可以是指当前可以使用的服务器。The schedulable server may refer to a currently available server.
在该可选的实施方式中,可以通过预设的服务器(比如布置有任务调度中心系统的服务器)定时使用因特网包探索器(Packet Internet Groper,ping)获取所有在注册列表中的服务器的状态信息,如果可以正常接收到某个服务器的响应,则可以确定该服务器处于在线状态,是可以使用的可调度服务器;如果不能接收到某个服务器的响应,则可以确定该服务器处于下线状态,是不能使用的服务器。每个所述可调度服务器可以发送自身的任务并行度到所述预设的服务器中,所述预设的服务器可以对所有可调度服务器的任务并行度进行统计,获得所述任务总并行度。In this optional implementation manner, the status information of all servers in the registration list can be obtained regularly by using a preset server (such as a server with a task scheduling center system) using an Internet packet explorer (Packet Internet Groper, ping). , if a response from a server can be received normally, it can be determined that the server is online and is a schedulable server that can be used; if a response from a server cannot be received, it can be determined that the server is offline, yes Unavailable server. Each schedulable server may send its own task parallelism to the preset server, and the preset server may collect statistics on the task parallelism of all schedulable servers to obtain the total task parallelism.
其中,所述因特网包探索器是一种用于测试网络连接量的程序,可以通过一个服务命令Ping,向特定的目的主机发送请求报文,用于确定是否能与另一台主机成功交换数据包,判断另一条主机的运行是否正常、网络是否通畅等。The Internet packet explorer is a program used to test the amount of network connections. It can send a request message to a specific destination host through a service command Ping to determine whether it can successfully exchange data with another host. package to determine whether the other host is running normally, whether the network is smooth, etc.
S12、根据所述任务总并行度,对所述待处理任务进行分片处理,获得分片队列,其中,所述分片队列由多个数据量均匀的任务分片组成。S12. According to the total parallelism of the tasks, perform sharding processing on the to-be-processed task to obtain a sharding queue, wherein the sharding queue is composed of a plurality of task shards with an even amount of data.
需要强调的是,为进一步保证上述分片队列的私密和安全性,上述分片队列还可以存储于一区块链的节点中。It should be emphasized that, in order to further ensure the privacy and security of the above-mentioned fragmented queue, the above-mentioned fragmented queue can also be stored in a node of a blockchain.
本申请实施例中,可以对所述待处理任务进行分片处理,获得分片队列,比如所述待处理任务需要进行处理的数据有100万条,进行分片处理后,获得10个任务分片,每个任务分片有10万条数据,这些任务分片组成的分片队列可以表示为:[0,1,2,3,4,5,6,7,8,9]。In this embodiment of the present application, the task to be processed may be fragmented to obtain a fragmented queue. For example, there are 1 million pieces of data that need to be processed for the task to be processed. After fragmentation processing, 10 task scores are obtained. Each task shard has 100,000 pieces of data, and the shard queue composed of these task shards can be expressed as: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].
具体的,所述根据所述任务总并行度,对所述待处理任务进行分片处理,获得分片队列包括:Specifically, according to the total parallelism of the tasks, performing fragmentation processing on the to-be-processed task, and obtaining a fragmented queue includes:
对所述待处理任务进行划分,获得数量与所述任务总并行度一致的多个任务分片;Divide the task to be processed, and obtain a plurality of task fragments whose number is consistent with the total parallelism of the task;
根据所述多个任务分片,生成所述分片队列。The fragmentation queue is generated according to the plurality of task fragments.
在该可选的实施方式中,可以根据所述任务总并行度对所述待处理任务进行分片处理,假设所述任务总并行度为M,则可以将所述待处理任务处理为M个任务分片,并生成所述分片队列[0,1,2,…,M-1],每个任务分片的数据量均与其他任意一个任务分片的数据量一致。In this optional implementation manner, the tasks to be processed may be segmented according to the total parallelism of the tasks. Assuming that the total parallelism of the tasks is M, the tasks to be processed may be processed into M pieces Task fragmentation, and generate the fragmentation queue [0,1,2,...,M-1], the data volume of each task fragment is consistent with the data volume of any other task fragment.
S13、根据每个所述可调度服务器的任务并行度,将所述分片队列中的任务分片调度至每个所述可调度服务器中。S13. Schedule the task shards in the sharding queue to each schedulable server according to the task parallelism of each schedulable server.
具体的,所述根据每个所述可调度服务器的任务并行度,将所述分片队列中的任务分片调度至每个所述可调度服务器中包括:Specifically, according to the task parallelism of each of the schedulable servers, scheduling the task shards in the sharding queue to each of the schedulable servers includes:
针对每个所述可调度服务器,根据所述任务分片在所述分片队列的排列顺序,从所述任务分片中确定数量与所述可调度服务器的任务并行度一致的目标任务分片;For each schedulable server, according to the arrangement order of the task shards in the shard queue, determine from the task shards a number of target task shards that are consistent with the task parallelism of the schedulable server ;
将所述目标任务分片调度至所述可调度服务器中。The target task is sharded and scheduled to the schedulable server.
在该可选的实施方式中,针对每个所述可调度服务器,可以按照任务分片在分片队列中 的排列顺序,依次从所述分片队列中获取数量与所述可调度服务器的任务并行度一致的目标任务分片,将所述目标任务分片调度至所述可调度服务器中,比如:假设所述可调度服务器的任务并行度为2,所述分片队列为[0,1,2,3,4],按照从左到右的排序顺序,获取到的任务分片为“0”和“1”,即[0,1],此时,所述分片队列变为[2,3,4],假设下一个可调度服务器的任务并行度为1,则下一个可调度服务器获取到的任务分片为“2”,即[2]。In this optional implementation manner, for each of the schedulable servers, the number of tasks of the schedulable server may be sequentially obtained from the shard queue according to the arrangement order of the task shards in the shard queue. Target task shards with the same degree of parallelism, schedule the target task shards to the schedulable server, for example: assuming that the task parallelism of the schedulable server is 2, and the shard queue is [0,1 ,2,3,4], according to the sorting order from left to right, the obtained task shards are "0" and "1", that is, [0,1], at this time, the sharding queue becomes [ 2, 3, 4], assuming that the task parallelism of the next schedulable server is 1, the task shard obtained by the next schedulable server is "2", namely [2].
可选的,所述目标任务分片可以以数组的形式保存在与所述分片队列对应的任务分片调度记录中,比如“A:[0,1]”,可以用来表示服务器A最后获得的任务分片为“0”和“1”,若服务器A又被调度了任务分片“5”和“6”,则任务分片调度记录中的“A:[0,1]”会被“A:[5,6]”覆盖掉。Optionally, the target task fragment can be stored in the task fragment scheduling record corresponding to the fragment queue in the form of an array, such as "A: [0,1]", which can be used to indicate that the server A last The obtained task shards are "0" and "1". If server A is scheduled with task shards "5" and "6", the "A: [0,1]" in the task shard scheduling record will be changed. Overwritten by "A:[5,6]".
作为一种可选的实施方式,所述根据每个所述可调度服务器的任务并行度,将所述分片队列中的任务分片调度至每个所述可调度服务器中之后,以及所述当检测到所有所述可调度服务器中存在发生异常的异常服务器时,根据所述分片队列,对所述异常服务器的任务分片进行任务转移之前,所述方法还包括:As an optional implementation manner, after the task sharding in the sharding queue is scheduled to each schedulable server according to the task parallelism of each schedulable server, and the When detecting that there is an abnormal server with an abnormality in all the schedulable servers, according to the fragmentation queue, before performing task transfer on the task fragment of the abnormal server, the method further includes:
获取所述分片队列的第二任务分片调度记录;obtaining the second task fragmentation scheduling record of the fragmentation queue;
针对每个所述可调度服务器,判断所述第二任务分片调度记录中是否存在与所述可调度服务器对应的调度信息,其中,所述调度信息为调度至所述可调度服务器的任务分片信息;For each schedulable server, determine whether there is scheduling information corresponding to the schedulable server in the second task segment scheduling record, where the scheduling information is the task segment scheduled to the schedulable server. film information;
若所述第二任务分片调度记录中不存在与所述可调度服务器对应的调度信息,将调度至所述可调度服务器中的任务分片信息写入所述第二任务分片调度记录中;或If there is no scheduling information corresponding to the schedulable server in the second task fragmentation scheduling record, write the task fragmentation information scheduled to the schedulable server into the second task fragmentation scheduling record ;or
若所述第二任务分片调度记录中存在与所述可调度服务器对应的调度信息,将所述调度信息替换为调度至所述可调度服务器中的任务分片信息。If there is scheduling information corresponding to the schedulable server in the second task fragmentation scheduling record, the scheduling information is replaced with the task fragmentation information scheduled to the schedulable server.
在该可选的实施方式中,可以将每个服务器最后获取的任务分片的信息进行记录,获得任务分片调度记录。当将任务分片调度至可调度服务器中时,需要对所述任务分片调度记录进行更新,所述任务分片调度记录中只保存可调度服务器最后一次获得的任务分片信息,信息量少,可以快速读取。本实施方式中,获取所述分片队列当前时刻的任务分片调度记录,即所述第二任务分片调度记录,针对每个所述可调度服务器,本实施方式要先判断所述第二任务分片调度记录中是否存在与所述可调度服务器对应的调度信息,如果所述第二任务分片调度记录中不存在与所述可调度服务器对应的调度信息,将调度至所述可调度服务器中的任务分片信息写入所述第二任务分片调度记录中;如果所述第二任务分片调度记录中存在与所述可调度服务器对应的调度信息,将所述调度信息替换为调度至所述可调度服务器中的任务分片信息。In this optional implementation manner, the information of the task fragmentation last obtained by each server may be recorded to obtain the task fragmentation scheduling record. When the task fragment is scheduled to the schedulable server, the task fragment scheduling record needs to be updated. The task fragment scheduling record only saves the task fragment information obtained by the schedulable server for the last time, and the amount of information is small. , which can be read quickly. In this embodiment, the task fragmentation scheduling record at the current moment of the fragmentation queue is obtained, that is, the second task fragmentation scheduling record. For each schedulable server, this embodiment first determines the second task fragmentation scheduling record. Whether there is scheduling information corresponding to the schedulable server in the task fragmentation scheduling record, if there is no scheduling information corresponding to the schedulable server in the second task fragmentation scheduling record, it will be scheduled to the schedulable server. The task fragmentation information in the server is written into the second task fragmentation scheduling record; if there is scheduling information corresponding to the schedulable server in the second task fragmentation scheduling record, replace the scheduling information with Task fragmentation information scheduled to the schedulable server.
S14、当检测到所有所述可调度服务器中存在发生异常的异常服务器时,根据所述分片队列,对所述异常服务器的任务分片进行任务转移。S14. When it is detected that there is an abnormal server with an abnormality among all the schedulable servers, according to the fragment queue, perform task transfer on the task fragment of the abnormal server.
本申请实施例中,可以对所有所述可调度服务器进行监控,当监控到存在发生异常的异常服务器时,能够及时根据所述分片队列,对所述异常服务器的任务分片进行任务转移,提高系统的稳定性。In the embodiment of the present application, all the schedulable servers can be monitored, and when an abnormal server with an exception is monitored, the task transfer can be performed on the task fragment of the abnormal server according to the fragment queue in time, Improve system stability.
具体的,所述根据所述分片队列,对所述异常服务器的任务分片进行任务转移包括:Specifically, according to the fragmentation queue, performing task transfer on the task fragmentation of the abnormal server includes:
获取所述分片队列的第一任务分片调度记录;obtaining the first task fragmentation scheduling record of the fragmentation queue;
根据所述第一任务分片调度记录,确定调度至所述异常服务器的任务分片;According to the first task fragmentation scheduling record, determine the task fragmentation scheduled to the abnormal server;
将所述异常服务器的任务分片添加至所述分片队列中,以重新对所述异常服务器的任务分片进行调度。The task shards of the abnormal server are added to the shard queue, so as to reschedule the task shards of the abnormal server.
在该可选的实施方式中,当检测到所有所述可调度服务器中存在发生异常的异常服务器时,可以获取所述分片队列当前时刻的任务分片调度记录,即所述第一任务分片调度记录,从所述第一任务分片调度记录中获取所述异常服务器最后一次获得的任务分片的信息,以确定调度至所述异常服务器的任务分片,然后,将所述异常服务器最后一次获得的任务分片添加至所述分片队列中,比如所述异常服务器的任务分片为“3”和“4”,假设此时的分片队列为空,即分片队列的任务分片都已经被调度出去,将所述异常服务器的任务分片添加至所 述分片队列中后,所述分片队列可以表示为[3,4],这时,如果任务注册表中存在处于空闲状态的服务器,可以根据处于空闲状态的服务器的任务并行度,来将所述分片队列中的任务分片调度出去,比如,假设这个处于空闲状态的服务器的任务并行度为2,则可以将任务分片“3”和“4”都调度至这个处于空闲状态的服务器中。In this optional implementation manner, when it is detected that there is an abnormal server in all the schedulable servers that has an exception, the task fragment scheduling record of the fragment queue at the current moment may be obtained, that is, the first task fragment Slice scheduling record, obtain the information of the last task slice obtained by the abnormal server from the first task slice scheduling record to determine the task slice scheduled to the abnormal server, and then assign the abnormal server to the The last obtained task shard is added to the shard queue, for example, the task shards of the abnormal server are "3" and "4", assuming that the shard queue at this time is empty, that is, the task of the shard queue All shards have been scheduled. After adding the task shard of the exception server to the shard queue, the shard queue can be expressed as [3, 4]. At this time, if the task registry exists The server in the idle state can schedule the task shards in the shard queue according to the task parallelism of the server in the idle state. For example, if the task parallelism of the server in the idle state is 2, then Both task shards "3" and "4" can be scheduled to this idle server.
作为一可选的实施方式,所述当检测到所有所述可调度服务器中存在发生异常的异常服务器时,根据所述分片队列,对所述异常服务器的任务分片进行任务转移之后,所述方法还包括:As an optional implementation manner, when it is detected that there is an abnormal server with an abnormality in all the schedulable servers, according to the fragmentation queue, after the task fragmentation of the abnormal server is transferred, the The method also includes:
获取所述分片队列的第三任务分片调度记录;obtaining the third task fragmentation scheduling record of the fragmentation queue;
从所述第三任务分片调度记录中删除所述异常服务器的调度信息。The scheduling information of the abnormal server is deleted from the scheduling record of the third task segment.
在该可选的实施方式中,在根据所述分片队列,进行任务转移之后,可以对所述分片队列当前时刻的任务分片调度记录进行维护,即对所述第三任务分片调度记录进行维护,从所述第三任务分片调度记录中删除所述异常服务器的调度信息,及时删除掉冗余的数据,提高系统性能。In this optional implementation manner, after the task transfer is performed according to the fragmentation queue, the task fragmentation scheduling record at the current moment in the fragmentation queue may be maintained, that is, the third task fragmentation scheduling may be performed. The record is maintained, the scheduling information of the abnormal server is deleted from the third task fragmentation scheduling record, and redundant data is deleted in time to improve system performance.
作为一可选的实施方式,所述根据每个所述可调度服务器的任务并行度,将所述分片队列中的任务分片调度至每个所述可调度服务器中之后,所述方法还包括:As an optional implementation manner, after the task shards in the sharding queue are scheduled to each schedulable server according to the task parallelism of each schedulable server, the method further include:
当检测到所有所述可调度服务器中存在已完成任务的目标服务器时,判断所述分片队列中是否存在剩余的任务分片;When detecting that there are target servers with completed tasks in all the schedulable servers, determine whether there are remaining task fragments in the fragmentation queue;
若所述分片队列中存在剩余的任务分片,则根据所述目标服务器的任务并行度,从所述剩余的任务分片中确定待调度任务分片;If there are remaining task fragments in the fragmentation queue, then according to the task parallelism of the target server, determine the task fragment to be scheduled from the remaining task fragments;
将所述待调度任务分片调度至所述目标服务器中。The to-be-scheduled task segment is scheduled to the target server.
在该可选的实施方式中,当检测到所有所述可调度服务器中存在已完成任务的目标服务器时或者存在新的空闲的目标服务器启动后变为可调度服务器时,确定所述目标服务器可以继续领取任务,若所述分片队列中存在剩余的任务分片,可以根据所述目标服务器的任务并行度,从所述剩余的任务分片中确定待调度任务分片,并将所述待调度任务分片调度至所述目标服务器中。In this optional implementation manner, when it is detected that among all the schedulable servers there is a target server that has completed tasks or when a new idle target server is started and becomes a schedulable server, it is determined that the target server can Continue to receive tasks. If there are remaining task shards in the shard queue, you can determine the to-be-scheduled task shards from the remaining task shards according to the task parallelism of the target server, and assign the to-be-scheduled task shards. Scheduling task segments are scheduled to the target server.
在图1所描述的方法流程中,可以根据总任务并行度,将一个任务切割为多个数据量均匀的任务分片,每个可调度服务器处理的任务分片与自身的任务并行度一致,即每个可调度服务器可以同时完成各自得到的任务分片,使得不同服务器的资源可以得到充分利用,提高了任务处理的效率。同时,如果正在执行任务的服务器出现了异常,根据任务队列进行任务转移,即任意一台服务器在所述任务队列中通过注册任务获取分片数组再执行即可,确保任务的正常执行。In the method flow described in Figure 1, a task can be divided into multiple task slices with uniform data volume according to the total task parallelism, and the task slices processed by each schedulable server are consistent with its own task parallelism. That is, each schedulable server can simultaneously complete its own task fragmentation, so that the resources of different servers can be fully utilized, and the efficiency of task processing is improved. At the same time, if an exception occurs on the server that is executing the task, the task transfer is performed according to the task queue, that is, any server obtains the slice array by registering the task in the task queue and executes it to ensure the normal execution of the task.
图2是本申请公开的一种任务调度装置的较佳实施例的功能模块图。FIG. 2 is a functional block diagram of a preferred embodiment of a task scheduling apparatus disclosed in the present application.
请参见图2,所述任务调度装置20可运行于电子设备中。所述任务调度装置20可以包括多个由程序代码段所组成的功能模块。所述任务调度装置20中的各个程序段的程序代码可以存储于存储器中,并由至少一个处理器所执行,以执行图1所描述的任务调度方法中的部分或全部步骤。Referring to FIG. 2 , the task scheduling apparatus 20 can run in an electronic device. The task scheduling apparatus 20 may include a plurality of functional modules composed of program code segments. The program codes of each program segment in the task scheduling apparatus 20 may be stored in a memory and executed by at least one processor to perform some or all of the steps in the task scheduling method described in FIG. 1 .
本实施例中,所述任务调度装置20根据其所执行的功能,可以被划分为多个功能模块。所述功能模块可以包括:获取模块201、处理模块202、调度模块203及转移模块204。本申请所称的模块是指一种能够被至少一个处理器所执行并且能够完成固定功能的一系列计算机程序段,其存储在存储器中。In this embodiment, the task scheduling apparatus 20 may be divided into multiple functional modules according to the functions performed by the task scheduling apparatus 20 . The functional modules may include: an acquisition module 201 , a processing module 202 , a scheduling module 203 and a transfer module 204 . A module referred to in this application refers to a series of computer program segments that can be executed by at least one processor and can perform fixed functions, and are stored in a memory.
获取模块201,用于当接收到待处理任务时,获取并统计所有可调度服务器的任务并行度,获得任务总并行度。The obtaining module 201 is configured to obtain and count the task parallelism of all schedulable servers when the task to be processed is received, and obtain the total parallelism of the task.
其中,所述任务并行度是指可以同时处理的任务数量。The degree of task parallelism refers to the number of tasks that can be processed at the same time.
其中,所述任务总并行度可以是指所述所有可调度服务器的任务并行度的总和,即所述所有可调度服务器可以同时处理的任务的总数量。The total task parallelism may refer to the sum of the task parallelisms of all schedulable servers, that is, the total number of tasks that can be simultaneously processed by all schedulable servers.
其中,所述可调度服务器可以是指当前可以使用的服务器。The schedulable server may refer to a currently available server.
在该可选的实施方式中,可以通过预设的服务器(比如布置有任务调度中心系统的服务器)定时使用因特网包探索器(Packet Internet Groper,ping)获取所有在注册列表中的服务器的状态信息,如果可以正常接收到某个服务器的响应,则可以确定该服务器处于在线状态,是可以使用的可调度服务器;如果不能接收到某个服务器的响应,则可以确定该服务器处于下线状态,是不能使用的服务器。每个所述可调度服务器可以发送自身的任务并行度到所述预设的服务器中,所述预设的服务器可以对所有可调度服务器的任务并行度进行统计,获得所述任务总并行度。In this optional implementation manner, the status information of all servers in the registration list can be obtained regularly by using a preset server (such as a server with a task scheduling center system) using an Internet packet explorer (Packet Internet Groper, ping). , if a response from a server can be received normally, it can be determined that the server is online and is a schedulable server that can be used; if a response from a server cannot be received, it can be determined that the server is offline, yes Unavailable server. Each schedulable server may send its own task parallelism to the preset server, and the preset server may collect statistics on the task parallelism of all schedulable servers to obtain the total task parallelism.
其中,所述因特网包探索器是一种用于测试网络连接量的程序,可以通过一个服务命令Ping,向特定的目的主机发送请求报文,用于确定是否能与另一台主机成功交换数据包,判断另一条主机的运行是否正常、网络是否通畅等。The Internet packet explorer is a program used to test the amount of network connections. It can send a request message to a specific destination host through a service command Ping to determine whether it can successfully exchange data with another host. package to determine whether the other host is running normally, whether the network is smooth, etc.
处理模块202,用于根据所述任务总并行度,对所述待处理任务进行分片处理,获得分片队列,其中,所述分片队列由多个数据量均匀的任务分片组成。The processing module 202 is configured to perform fragmentation processing on the to-be-processed task according to the total parallelism of the tasks to obtain a fragmentation queue, wherein the fragmentation queue is composed of a plurality of task fragments with a uniform amount of data.
需要强调的是,为进一步保证上述分片队列的私密和安全性,上述分片队列还可以存储于一区块链的节点中。It should be emphasized that, in order to further ensure the privacy and security of the above-mentioned fragmented queue, the above-mentioned fragmented queue can also be stored in a node of a blockchain.
本申请实施例中,可以对所述待处理任务进行分片处理,获得分片队列,比如所述待处理任务需要进行处理的数据有100万条,进行分片处理后,获得10个任务分片,每个任务分片有10万条数据,这些任务分片组成的分片队列可以表示为:[0,1,2,3,4,5,6,7,8,9]。In this embodiment of the present application, the task to be processed may be fragmented to obtain a fragmented queue. For example, there are 1 million pieces of data that need to be processed for the task to be processed. After fragmentation processing, 10 task scores are obtained. Each task shard has 100,000 pieces of data, and the shard queue composed of these task shards can be expressed as: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].
调度模块203,用于根据每个所述可调度服务器的任务并行度,将所述分片队列中的任务分片调度至每个所述可调度服务器中。The scheduling module 203 is configured to schedule the task shards in the sharding queue to each schedulable server according to the task parallelism of each schedulable server.
转移模块204,用于当检测到所有所述可调度服务器中存在发生异常的异常服务器时,根据所述分片队列,对所述异常服务器的任务分片进行任务转移。The transfer module 204 is configured to perform task transfer on the task shards of the abnormal server according to the shard queue when it is detected that there is an abnormal server with an exception among all the schedulable servers.
本申请实施例中,可以对所有所述可调度服务器进行监控,当监控到存在发生异常的异常服务器时,能够及时根据所述分片队列,对所述异常服务器的任务分片进行任务转移,提高系统的稳定性。In the embodiment of the present application, all the schedulable servers can be monitored, and when an abnormal server with an exception is monitored, the task transfer can be performed on the task fragment of the abnormal server according to the fragment queue in time, Improve system stability.
作为一种可选的实施方式,所述转移模块204根据所述分片队列,对所述异常服务器的任务分片进行任务转移的方式具体为:As an optional implementation manner, according to the fragmentation queue, the transfer module 204 performs task transfer on the task fragmentation of the abnormal server specifically as follows:
获取所述分片队列的第一任务分片调度记录;obtaining the first task fragmentation scheduling record of the fragmentation queue;
根据所述第一任务分片调度记录,确定调度至所述异常服务器的任务分片;According to the first task fragmentation scheduling record, determine the task fragmentation scheduled to the abnormal server;
将所述异常服务器的任务分片添加至所述分片队列中,以重新对所述异常服务器的任务分片进行调度。The task shards of the abnormal server are added to the shard queue, so as to reschedule the task shards of the abnormal server.
在该可选的实施方式中,当检测到所有所述可调度服务器中存在发生异常的异常服务器时,可以获取所述分片队列当前时刻的任务分片调度记录,即所述第一任务分片调度记录,从所述第一任务分片调度记录中获取所述异常服务器最后一次获得的任务分片的信息,以确定调度至所述异常服务器的任务分片,然后,将所述异常服务器最后一次获得的任务分片添加至所述分片队列中,比如所述异常服务器的任务分片为“3”和“4”,假设此时的分片队列为空,即分片队列的任务分片都已经被调度出去,将所述异常服务器的任务分片添加至所述分片队列中后,所述分片队列可以表示为[3,4],这时,如果任务注册表中存在处于空闲状态的服务器,可以根据处于空闲状态的服务器的任务并行度,来将所述分片队列中的任务分片调度出去,比如,假设这个处于空闲状态的服务器的任务并行度为2,则可以将任务分片“3”和“4”都调度至这个处于空闲状态的服务器中。In this optional implementation manner, when it is detected that there is an abnormal server in all the schedulable servers that has an exception, the task fragment scheduling record of the fragment queue at the current moment may be obtained, that is, the first task fragment Slice scheduling record, obtain the information of the last task slice obtained by the abnormal server from the first task slice scheduling record to determine the task slice scheduled to the abnormal server, and then assign the abnormal server to the The last obtained task shard is added to the shard queue, for example, the task shards of the abnormal server are "3" and "4", assuming that the shard queue at this time is empty, that is, the task of the shard queue All shards have been scheduled. After adding the task shard of the exception server to the shard queue, the shard queue can be expressed as [3, 4]. At this time, if the task registry exists The server in the idle state can schedule the task shards in the shard queue according to the task parallelism of the server in the idle state. For example, if the task parallelism of the server in the idle state is 2, then Both task shards "3" and "4" can be scheduled to this idle server.
作为一种可选的实施方式,所述任务调度装置20还包括:As an optional implementation manner, the task scheduling apparatus 20 further includes:
第一判断模块,用于所述调度模块203根据每个所述可调度服务器的任务并行度,将所述分片队列中的任务分片调度至每个所述可调度服务器中之后,当检测到所有所述可调度服务器中存在已完成任务的目标服务器时,判断所述分片队列中是否存在剩余的任务分片;The first judgment module is used for the scheduling module 203 to schedule the tasks in the sharding queue to each schedulable server according to the task parallelism of each schedulable server. When there are target servers with completed tasks in all the schedulable servers, determine whether there are remaining task fragments in the fragmentation queue;
确定模块,用于若所述分片队列中存在剩余的任务分片,则根据所述目标服务器的任务 并行度,从所述剩余的任务分片中确定待调度任务分片;A determination module, for if there are remaining task fragments in the fragmentation queue, then according to the task parallelism of the target server, determine the task fragmentation to be scheduled from the remaining task fragments;
所述调度模块203,还用于将所述待调度任务分片调度至所述目标服务器中。The scheduling module 203 is further configured to schedule the to-be-scheduled task segments to the target server.
在该可选的实施方式中,当检测到所有所述可调度服务器中存在已完成任务的目标服务器时或者存在新的空闲的目标服务器启动后变为可调度服务器时,确定所述目标服务器可以继续领取任务,若所述分片队列中存在剩余的任务分片,可以根据所述目标服务器的任务并行度,从所述剩余的任务分片中确定待调度任务分片,并将所述待调度任务分片调度至所述目标服务器中。In this optional implementation manner, when it is detected that among all the schedulable servers there is a target server that has completed tasks or when a new idle target server is started and becomes a schedulable server, it is determined that the target server can Continue to receive tasks. If there are remaining task shards in the shard queue, you can determine the to-be-scheduled task shards from the remaining task shards according to the task parallelism of the target server, and assign the to-be-scheduled task shards. Scheduling task segments are scheduled to the target server.
作为一种可选的实施方式,所述调度模块203根据每个所述可调度服务器的任务并行度,将所述分片队列中的任务分片调度至每个所述可调度服务器中的方式具体为:As an optional implementation manner, the scheduling module 203 schedules the task shards in the sharding queue to each schedulable server according to the task parallelism of each schedulable server Specifically:
针对每个所述可调度服务器,根据所述任务分片在所述分片队列的排列顺序,从所述任务分片中确定数量与所述可调度服务器的任务并行度一致的目标任务分片;For each schedulable server, according to the arrangement order of the task shards in the shard queue, determine from the task shards a number of target task shards that are consistent with the task parallelism of the schedulable server ;
将所述目标任务分片调度至所述可调度服务器中。The target task is sharded and scheduled to the schedulable server.
在该可选的实施方式中,针对每个所述可调度服务器,可以按照任务分片在分片队列中的排列顺序,依次从所述分片队列中获取数量与所述可调度服务器的任务并行度一致的目标任务分片,将所述目标任务分片调度至所述可调度服务器中,比如:假设所述可调度服务器的任务并行度为2,所述分片队列为[0,1,2,3,4],按照从左到右的排序顺序,获取到的任务分片为“0”和“1”,即[0,1],此时,所述分片队列变为[2,3,4],假设下一个可调度服务器的任务并行度为1,则下一个可调度服务器获取到的任务分片为“2”,即[2]。In this optional implementation manner, for each of the schedulable servers, the number of tasks of the schedulable server may be sequentially obtained from the shard queue according to the arrangement order of the task shards in the shard queue. Target task shards with the same degree of parallelism, schedule the target task shards to the schedulable server, for example: assuming that the task parallelism of the schedulable server is 2, and the shard queue is [0,1 ,2,3,4], according to the sorting order from left to right, the obtained task shards are "0" and "1", that is, [0,1], at this time, the sharding queue becomes [ 2, 3, 4], assuming that the task parallelism of the next schedulable server is 1, the task shard obtained by the next schedulable server is "2", namely [2].
可选的,所述目标任务分片可以以数组的形式保存在与所述分片队列对应的任务分片调度记录中,比如“A:[0,1]”,可以用来表示服务器A最后获得的任务分片为“0”和“1”,若服务器A又被调度了任务分片“5”和“6”,则任务分片调度记录中的“A:[0,1]”会被“A:[5,6]”覆盖掉。Optionally, the target task fragment can be stored in the task fragment scheduling record corresponding to the fragment queue in the form of an array, such as "A: [0,1]", which can be used to indicate that the server A last The obtained task shards are "0" and "1". If server A is scheduled with task shards "5" and "6", the "A: [0,1]" in the task shard scheduling record will be changed. Overwritten by "A:[5,6]".
作为一种可选的实施方式,所述处理模块202根据所述任务总并行度,对所述待处理任务进行分片处理,获得分片队列的方式具体为:As an optional implementation manner, the processing module 202 performs fragmentation processing on the to-be-processed task according to the total parallelism of the tasks, and the method for obtaining a fragmented queue is as follows:
对所述待处理任务进行划分,获得数量与所述任务总并行度一致的多个任务分片;Divide the task to be processed, and obtain a plurality of task shards whose number is consistent with the total parallelism of the task;
根据所述多个任务分片,生成所述分片队列。The fragmentation queue is generated according to the plurality of task fragments.
在该可选的实施方式中,可以根据所述任务总并行度对所述待处理任务进行分片处理,假设所述任务总并行度为M,则可以将所述待处理任务处理为M个任务分片,并生成所述分片队列[0,1,2,…,M-1],每个任务分片的数据量均与其他任意一个任务分片的数据量一致。In this optional implementation manner, the tasks to be processed may be segmented according to the total parallelism of the tasks. Assuming that the total parallelism of the tasks is M, the tasks to be processed may be processed into M pieces Task fragmentation, and generate the fragmentation queue [0,1,2,...,M-1], the data volume of each task fragment is consistent with the data volume of any other task fragment.
作为一种可选的实施方式,所述获取模块201,还用于所述调度模块203根据每个所述可调度服务器的任务并行度,将所述分片队列中的任务分片调度至每个所述可调度服务器中之后,以及所述转移模块204当检测到所有所述可调度服务器中存在发生异常的异常服务器时,根据所述分片队列,对所述异常服务器的任务分片进行任务转移之前,获取所述分片队列的第二任务分片调度记录;As an optional implementation manner, the obtaining module 201 is further configured to, according to the task parallelism of each schedulable server, the scheduling module 203 schedule the task shards in the sharding queue to each After each of the schedulable servers, and when the transfer module 204 detects that there is an abnormal server with an exception in all the schedulable servers, the transfer module 204 performs the task fragmentation on the abnormal server according to the fragmentation queue. Before the task transfer, obtain the second task fragmentation scheduling record of the fragmentation queue;
所述任务调度装置20还包括:The task scheduling device 20 further includes:
第二判断模块,用于针对每个所述可调度服务器,判断所述第二任务分片调度记录中是否存在与所述可调度服务器对应的调度信息,其中,所述调度信息为调度至所述可调度服务器的任务分片信息;A second judging module, configured to judge, for each schedulable server, whether there is scheduling information corresponding to the schedulable server in the second task fragmentation scheduling record, wherein the scheduling information is the scheduling information to the schedulable server. Describe the task fragmentation information of the schedulable server;
写入模块,用于若所述第二任务分片调度记录中不存在与所述可调度服务器对应的调度信息,将调度至所述可调度服务器中的任务分片信息写入所述第二任务分片调度记录中;或A writing module, configured to write the task fragmentation information scheduled to the schedulable server into the second task fragmentation scheduling record if the scheduling information corresponding to the schedulable server does not exist in the second task fragmentation scheduling record In the task shard scheduling record; or
所述调度模块203,还用于若所述第二任务分片调度记录中存在与所述可调度服务器对应的调度信息,将所述调度信息替换为调度至所述可调度服务器中的任务分片信息。The scheduling module 203 is further configured to replace the scheduling information with the task segment scheduled to the schedulable server if there is scheduling information corresponding to the schedulable server in the second task slice scheduling record. slice information.
在该可选的实施方式中,可以将每个服务器最后获取的任务分片的信息进行记录,获得任务分片调度记录。当将任务分片调度至可调度服务器中时,需要对所述任务分片调度记录进行更新,所述任务分片调度记录中只保存可调度服务器最后一次获得的任务分片信息,信息量少,可以快速读取。本实施方式中,获取所述分片队列当前时刻的任务分片调度记录, 即所述第二任务分片调度记录,针对每个所述可调度服务器,本实施方式要先判断所述第二任务分片调度记录中是否存在与所述可调度服务器对应的调度信息,如果所述第二任务分片调度记录中不存在与所述可调度服务器对应的调度信息,将调度至所述可调度服务器中的任务分片信息写入所述第二任务分片调度记录中;如果所述第二任务分片调度记录中存在与所述可调度服务器对应的调度信息,将所述调度信息替换为调度至所述可调度服务器中的任务分片信息。In this optional implementation manner, the information of the task fragmentation last obtained by each server may be recorded to obtain the task fragmentation scheduling record. When the task fragment is scheduled to the schedulable server, the task fragment scheduling record needs to be updated. The task fragment scheduling record only saves the task fragment information obtained by the schedulable server for the last time, and the amount of information is small. , which can be read quickly. In this embodiment, the task fragmentation scheduling record at the current moment of the fragmentation queue is obtained, that is, the second task fragmentation scheduling record. For each schedulable server, this embodiment first determines the second task fragmentation scheduling record. Whether there is scheduling information corresponding to the schedulable server in the task fragmentation scheduling record, if there is no scheduling information corresponding to the schedulable server in the second task fragmentation scheduling record, it will be scheduled to the schedulable server. The task fragmentation information in the server is written into the second task fragmentation scheduling record; if there is scheduling information corresponding to the schedulable server in the second task fragmentation scheduling record, replace the scheduling information with Task fragmentation information scheduled to the schedulable server.
作为一种可选的实施方式,所述获取模块201,还用于所述转移模块204当检测到所有所述可调度服务器中存在发生异常的异常服务器时,根据所述分片队列,对所述异常服务器的任务分片进行任务转移之后,获取所述分片队列的第三任务分片调度记录;As an optional implementation manner, the acquisition module 201 is further configured to, when the transfer module 204 detects that there is an abnormal server with an exception in all the schedulable servers, according to the fragmentation queue, to After the task fragmentation of the abnormal server performs task transfer, obtain the third task fragmentation scheduling record of the fragmentation queue;
所述任务调度装置20还包括:The task scheduling device 20 further includes:
删除模块,用于从所述第三任务分片调度记录中删除所述异常服务器的调度信息。A deletion module, configured to delete the scheduling information of the abnormal server from the third task fragmentation scheduling record.
在该可选的实施方式中,在根据所述分片队列,进行任务转移之后,可以对所述分片队列当前时刻的任务分片调度记录进行维护,即对所述第三任务分片调度记录进行维护,从所述第三任务分片调度记录中删除所述异常服务器的调度信息,及时删除掉冗余的数据,提高系统性能。In this optional implementation manner, after the task transfer is performed according to the fragmentation queue, the task fragmentation scheduling record at the current moment in the fragmentation queue may be maintained, that is, the third task fragmentation scheduling may be performed. The record is maintained, the scheduling information of the abnormal server is deleted from the third task fragmentation scheduling record, and redundant data is deleted in time to improve system performance.
在图2所描述的任务调度装置20中,可以根据总任务并行度,将一个任务切割为多个数据量均匀的任务分片,每个可调度服务器处理的任务分片与自身的任务并行度一致,即每个可调度服务器可以同时完成各自得到的任务分片,使得不同服务器的资源可以得到充分利用,提高了任务处理的效率。同时,如果正在执行任务的服务器出现了异常,根据任务队列进行任务转移,即任意一台服务器在所述任务队列中通过注册任务获取分片数组再执行即可,确保任务的正常执行。In the task scheduling device 20 described in FIG. 2 , a task can be divided into a plurality of task slices with an even amount of data according to the total task parallelism, and the task slices processed by each schedulable server and its own task parallelism Consistent, that is, each schedulable server can simultaneously complete its own task fragmentation, so that the resources of different servers can be fully utilized, and the efficiency of task processing is improved. At the same time, if an exception occurs on the server that is executing the task, the task transfer is performed according to the task queue, that is, any server obtains the slice array by registering the task in the task queue and executes it to ensure the normal execution of the task.
如图3所示,图3是本申请实现任务调度方法的较佳实施例的电子设备的结构示意图。所述电子设备3包括存储器31、至少一个处理器32、存储在所述存储器31中并可在所述至少一个处理器32上运行的计算机程序33及至少一条通讯总线34。As shown in FIG. 3 , FIG. 3 is a schematic structural diagram of an electronic device implementing a preferred embodiment of the task scheduling method of the present application. The electronic device 3 includes a memory 31 , at least one processor 32 , a computer program 33 stored in the memory 31 and executable on the at least one processor 32 , and at least one communication bus 34 .
本领域技术人员可以理解,图3所示的示意图仅仅是所述电子设备3的示例,并不构成对所述电子设备3的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述电子设备3还可以包括输入输出设备、网络接入设备等。Those skilled in the art can understand that the schematic diagram shown in FIG. 3 is only an example of the electronic device 3, and does not constitute a limitation on the electronic device 3, and may include more or less components than those shown, or combinations thereof Certain components, or different components, for example, the electronic device 3 may also include input and output devices, network access devices, and the like.
所述电子设备3还包括但不限于任何一种可与用户通过键盘、鼠标、遥控器、触摸板或声控设备等方式进行人机交互的电子产品,例如,个人计算机、平板电脑、智能手机、个人数字助理(Personal Digital Assistant,PDA)、游戏机、交互式网络电视(Internet Protocol Television,IPTV)、智能式穿戴式设备等。所述电子设备3所处的网络包括但不限于互联网、广域网、城域网、局域网、虚拟专用网络(Virtual Private Network,VPN)等。The electronic device 3 also includes, but is not limited to, any electronic product that can interact with the user through a keyboard, a mouse, a remote control, a touchpad or a voice-activated device, for example, a personal computer, a tablet computer, a smart phone, Personal Digital Assistant (PDA), game console, Internet Protocol Television (IPTV), smart wearable devices, etc. The network where the electronic device 3 is located includes but is not limited to the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (Virtual Private Network, VPN) and the like.
所述至少一个处理器32可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、晶体管逻辑器件、分立硬件组件等。该处理器32可以是微处理器或者该处理器32也可以是任何常规的处理器等,所述处理器32是所述电子设备3的控制中心,利用各种接口和线路连接整个电子设备3的各个部分。The at least one processor 32 may be a central processing unit (Central Processing Unit, CPU), or other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC) ), Field-Programmable Gate Array (FPGA) or other programmable logic devices, transistor logic devices, discrete hardware components, etc. The processor 32 can be a microprocessor or the processor 32 can also be any conventional processor, etc. The processor 32 is the control center of the electronic device 3, and uses various interfaces and lines to connect the entire electronic device 3 of each part.
所述存储器31可用于存储所述计算机程序33和/或模块/单元,所述处理器32通过运行或执行存储在所述存储器31内的计算机程序和/或模块/单元,以及调用存储在存储器31内的数据,实现所述电子设备3的各种功能。所述存储器31可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据电子设备3的使用所创建的数据等。此外,存储器31可以包括易失性和非易失性存储器,例如硬盘、内存、插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)、至少一个 磁盘存储器件、闪存器件等。The memory 31 can be used to store the computer program 33 and/or modules/units, and the processor 32 executes or executes the computer programs and/or modules/units stored in the memory 31 and calls the computer programs and/or modules/units stored in the memory 31. 31 to realize various functions of the electronic device 3 . The memory 31 may mainly include a stored program area and a stored data area, wherein the stored program area may store an operating system, an application program (such as a sound playback function, an image playback function, etc.) required for at least one function, and the like; the storage data area may Data and the like created according to the use of the electronic device 3 are stored. In addition, the memory 31 may include volatile and non-volatile memory, such as hard disk, internal memory, plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, flash memory card ( Flash Card), at least one disk storage device, flash memory device, etc.
示例性的,所述计算机程序33可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在所述存储器31中,并由所述处理器32执行,以完成本申请。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机可读指令段,该计算机可读指令段用于描述所述计算机可读指令在所述电子设备3中的执行过程。例如,所述计算机程序33可以被分割成获取模块201、处理模块202、调度模块203、转移模块204。Exemplarily, the computer program 33 may be divided into one or more modules/units, and the one or more modules/units are stored in the memory 31 and executed by the processor 32 to complete the this application. The one or more modules/units may be a series of computer-readable instruction segments capable of performing specific functions, and the computer-readable instruction segments are used to describe the execution process of the computer-readable instructions in the electronic device 3 . For example, the computer program 33 can be divided into an acquisition module 201 , a processing module 202 , a scheduling module 203 , and a transfer module 204 .
结合图1,所述电子设备3中的所述存储器31存储多个计算机可读指令以实现一种任务调度方法,所述处理器32可执行所述多个计算机可读指令从而实现:1, the memory 31 in the electronic device 3 stores multiple computer-readable instructions to implement a task scheduling method, and the processor 32 can execute the multiple computer-readable instructions to implement:
当接收到待处理任务时,获取并统计所有可调度服务器的任务并行度,获得任务总并行度;When a pending task is received, obtain and count the task parallelism of all schedulable servers, and obtain the total parallelism of the task;
根据所述任务总并行度,对所述待处理任务进行分片处理,获得分片队列,其中,所述分片队列由多个数据量均匀的任务分片组成;According to the total degree of parallelism of the task, the task to be processed is fragmented to obtain a fragmentation queue, wherein the fragmentation queue is composed of a plurality of task fragments with a uniform amount of data;
根据每个所述可调度服务器的任务并行度,将所述分片队列中的任务分片调度至每个所述可调度服务器中;According to the task parallelism of each of the schedulable servers, the task shards in the sharding queue are scheduled to each of the schedulable servers;
当检测到所有所述可调度服务器中存在发生异常的异常服务器时,根据所述分片队列,对所述异常服务器的任务分片进行任务转移。When it is detected that there is an abnormal server with an abnormality among all the schedulable servers, task transfer is performed on the task fragment of the abnormal server according to the fragmentation queue.
具体地,所述处理器32对上述指令的具体实现方法可参考图1对应实施例中相关步骤的描述,在此不赘述。Specifically, for the specific implementation method of the above-mentioned instruction by the processor 32, reference may be made to the description of the relevant steps in the corresponding embodiment of FIG. 1, and details are not described herein.
在图3所描述的电子设备3中,可以根据总任务并行度,将一个任务切割为多个数据量均匀的任务分片,每个可调度服务器处理的任务分片与自身的任务并行度一致,即每个可调度服务器可以同时完成各自得到的任务分片,使得不同服务器的资源可以得到充分利用,提高了任务处理的效率。同时,如果正在执行任务的服务器出现了异常,根据任务队列进行任务转移,即任意一台服务器在所述任务队列中通过注册任务获取分片数组再执行即可,确保任务的正常执行。In the electronic device 3 depicted in FIG. 3 , a task can be divided into multiple task slices with a uniform amount of data according to the total task parallelism, and the task slice processed by each schedulable server is consistent with its own task parallelism , that is, each schedulable server can simultaneously complete the obtained task fragmentation, so that the resources of different servers can be fully utilized, and the efficiency of task processing is improved. At the same time, if an exception occurs on the server that is executing the task, the task transfer is performed according to the task queue, that is, any server obtains the slice array by registering the task in the task queue and executes it to ensure the normal execution of the task.
所述电子设备3集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中,所述计算机可读存储介质可以是非易失性的存储介质,也可以是易失性的存储介质。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存储器(RAM,Random Access Memory)等。If the modules/units integrated in the electronic device 3 are implemented in the form of software functional units and are sold or used as independent products, they can be stored in a computer-readable storage medium, and the computer-readable storage medium may be a non-volatile storage medium. A volatile storage medium can also be a volatile storage medium. Based on this understanding, the present application can implement all or part of the processes in the methods of the above embodiments, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer When the program is executed by the processor, the steps of the foregoing method embodiments can be implemented. Wherein, the computer program code may be in the form of source code, object code, executable file or some intermediate form, and so on. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, removable hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory) , Random Access Memory (RAM, Random Access Memory), etc.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In the several embodiments provided in this application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of the modules is only a logical function division, and there may be other division manners in actual implementation.
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。In addition, each functional module in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware, or can be implemented in the form of hardware plus software function modules.
对于本领域技术人员而言,显然本申请不限于上述示范性实施例的细节,而且在不背离本申请的精神或基本特征的情况下,能够以其他的具体形式实现本申请。因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本申请的范围由所附权利要求 而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本申请内。不应将权利要求中的任何附关联图标记视为限制所涉及的权利要求。此外,显然“包括”一词不排除其他单元或步骤,单数不排除复数。系统权利要求中陈述的多个单元或装置也可以由一个单元或装置通过软件或者硬件来实现。第二等词语用来表示名称,而并不表示任何特定的顺序。It will be apparent to those skilled in the art that the present application is not limited to the details of the above-described exemplary embodiments, but that the present application can be implemented in other specific forms without departing from the spirit or essential characteristics of the present application. Accordingly, the embodiments are to be regarded in all respects as illustrative and not restrictive, and the scope of the application is to be defined by the appended claims rather than the foregoing description, which is therefore intended to fall within the scope of the claims. All changes within the meaning and scope of the equivalents of , are included in this application. Any reference signs in the claims shall not be construed as limiting the involved claim. Furthermore, it is clear that the word "comprising" does not exclude other units or steps and the singular does not exclude the plural. Several units or means recited in the system claims can also be realized by one unit or means by means of software or hardware. Second-class terms are used to denote names and do not denote any particular order.
最后应说明的是,以上实施例仅用以说明本申请的技术方案而非限制,尽管参照较佳实施例对本申请进行了详细说明,本领域的普通技术人员应当理解,可以对本申请的技术方案进行修改或等同替换,而不脱离本申请技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and not to limit them. Although the present application has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present application can be Modifications or equivalent substitutions can be made without departing from the spirit and scope of the technical solutions of the present application.

Claims (20)

  1. 一种任务调度方法,其中,所述任务调度方法包括:A task scheduling method, wherein the task scheduling method comprises:
    当接收到待处理任务时,获取并统计所有可调度服务器的任务并行度,获得任务总并行度;When a pending task is received, obtain and count the task parallelism of all schedulable servers, and obtain the total parallelism of the task;
    根据所述任务总并行度,对所述待处理任务进行分片处理,获得分片队列,其中,所述分片队列由多个数据量均匀的任务分片组成;According to the total degree of parallelism of the task, the task to be processed is fragmented to obtain a fragmentation queue, wherein the fragmentation queue is composed of a plurality of task fragments with a uniform amount of data;
    根据每个所述可调度服务器的任务并行度,将所述分片队列中的任务分片调度至每个所述可调度服务器中;According to the task parallelism of each of the schedulable servers, the task shards in the sharding queue are scheduled to each of the schedulable servers;
    当检测到所有所述可调度服务器中存在发生异常的异常服务器时,根据所述分片队列,对所述异常服务器的任务分片进行任务转移。When it is detected that there is an abnormal server with an abnormality among all the schedulable servers, task transfer is performed on the task fragment of the abnormal server according to the fragmentation queue.
  2. 根据权利要求1所述的任务调度方法,其中,所述根据所述分片队列,对所述异常服务器的任务分片进行任务转移包括:The task scheduling method according to claim 1, wherein, according to the fragmentation queue, performing task transfer on the task fragmentation of the abnormal server comprises:
    获取所述分片队列的第一任务分片调度记录;obtaining the first task fragmentation scheduling record of the fragmentation queue;
    根据所述第一任务分片调度记录,确定调度至所述异常服务器的任务分片;According to the first task fragmentation scheduling record, determine the task fragmentation scheduled to the abnormal server;
    将所述异常服务器的任务分片添加至所述分片队列中,以重新对所述异常服务器的任务分片进行调度。The task shards of the abnormal server are added to the shard queue, so as to reschedule the task shards of the abnormal server.
  3. 根据权利要求1所述的任务调度方法,其中,所述根据每个所述可调度服务器的任务并行度,将所述分片队列中的任务分片调度至每个所述可调度服务器中之后,所述任务调度方法还包括:The task scheduling method according to claim 1, wherein after the task sharding in the sharding queue is scheduled to each schedulable server according to the task parallelism of each schedulable server , the task scheduling method further includes:
    当检测到所有所述可调度服务器中存在已完成任务的目标服务器时,判断所述分片队列中是否存在剩余的任务分片;When detecting that there are target servers with completed tasks in all the schedulable servers, determine whether there are remaining task fragments in the fragmentation queue;
    若所述分片队列中存在剩余的任务分片,则根据所述目标服务器的任务并行度,从所述剩余的任务分片中确定待调度任务分片;If there are remaining task fragments in the fragmentation queue, then according to the task parallelism of the target server, determine the task fragment to be scheduled from the remaining task fragments;
    将所述待调度任务分片调度至所述目标服务器中。The to-be-scheduled task segment is scheduled to the target server.
  4. 根据权利要求1所述的任务调度方法,其中,所述根据每个所述可调度服务器的任务并行度,将所述分片队列中的任务分片调度至每个所述可调度服务器中包括:The task scheduling method according to claim 1, wherein, according to the task parallelism of each of the schedulable servers, scheduling the task shards in the sharding queue to each of the schedulable servers comprises: :
    针对每个所述可调度服务器,根据所述任务分片在所述分片队列的排列顺序,从所述任务分片中确定数量与所述可调度服务器的任务并行度一致的目标任务分片;For each schedulable server, according to the arrangement order of the task shards in the shard queue, determine from the task shards a number of target task shards that are consistent with the task parallelism of the schedulable server ;
    将所述目标任务分片调度至所述可调度服务器中。The target task is sharded and scheduled to the schedulable server.
  5. 根据权利要求1至4中任一项所述的任务调度方法,其中,所述根据所述任务总并行度,对所述待处理任务进行分片处理,获得分片队列包括:The task scheduling method according to any one of claims 1 to 4, wherein, according to the total parallelism of the tasks, performing fragmentation processing on the to-be-processed task, and obtaining a fragmented queue comprises:
    对所述待处理任务进行划分,获得数量与所述任务总并行度一致的多个任务分片;Divide the task to be processed, and obtain a plurality of task fragments whose number is consistent with the total parallelism of the task;
    根据所述多个任务分片,生成所述分片队列。The fragmentation queue is generated according to the plurality of task fragments.
  6. 根据权利要求1至4中任一项所述的任务调度方法,其中,所述根据每个所述可调度服务器的任务并行度,将所述分片队列中的任务分片调度至每个所述可调度服务器中之后,以及所述当检测到所有所述可调度服务器中存在发生异常的异常服务器时,根据所述分片队列,对所述异常服务器的任务分片进行任务转移之前,所述任务调度方法还包括:The task scheduling method according to any one of claims 1 to 4, wherein, according to the task parallelism of each schedulable server, the task sharding in the sharding queue is scheduled to each After the schedulable server, and when it is detected that there is an abnormal server with an abnormality in all the schedulable servers, according to the fragmentation queue, before the task transfer is performed on the task fragment of the abnormal server, the The task scheduling method further includes:
    获取所述分片队列的第二任务分片调度记录;obtaining the second task fragmentation scheduling record of the fragmentation queue;
    针对每个所述可调度服务器,判断所述第二任务分片调度记录中是否存在与所述可调度服务器对应的调度信息,其中,所述调度信息为调度至所述可调度服务器的任务分片信息;For each schedulable server, determine whether there is scheduling information corresponding to the schedulable server in the second task segment scheduling record, where the scheduling information is the task segment scheduled to the schedulable server. film information;
    若所述第二任务分片调度记录中不存在与所述可调度服务器对应的调度信息,将调度至所述可调度服务器中的任务分片信息写入所述第二任务分片调度记录中;或If there is no scheduling information corresponding to the schedulable server in the second task fragmentation scheduling record, write the task fragmentation information scheduled to the schedulable server into the second task fragmentation scheduling record ;or
    若所述第二任务分片调度记录中存在与所述可调度服务器对应的调度信息,将所述 调度信息替换为调度至所述可调度服务器中的任务分片信息。If there is scheduling information corresponding to the schedulable server in the second task fragmentation scheduling record, the scheduling information is replaced with the task fragmentation information scheduled to the schedulable server.
  7. 根据权利要求1至4中任一项所述的任务调度方法,其中,所述当检测到所有所述可调度服务器中存在发生异常的异常服务器时,根据所述分片队列,对所述异常服务器的任务分片进行任务转移之后,所述任务调度方法还包括:The task scheduling method according to any one of claims 1 to 4, wherein when it is detected that there is an abnormal server in all the schedulable servers that has an abnormality, according to the fragmentation queue, the abnormality After the task fragmentation of the server performs the task transfer, the task scheduling method further includes:
    获取所述分片队列的第三任务分片调度记录;obtaining the third task fragmentation scheduling record of the fragmentation queue;
    从所述第三任务分片调度记录中删除所述异常服务器的调度信息。The scheduling information of the abnormal server is deleted from the scheduling record of the third task segment.
  8. 一种任务调度装置,其中,所述任务调度装置包括:A task scheduling device, wherein the task scheduling device comprises:
    获取模块,用于当接收到待处理任务时,获取并统计所有可调度服务器的任务并行度,获得任务总并行度;The acquisition module is used to acquire and count the task parallelism of all schedulable servers when the pending task is received, and obtain the total parallelism of the task;
    处理模块,用于根据所述任务总并行度,对所述待处理任务进行分片处理,获得分片队列,其中,所述分片队列由多个数据量均匀的任务分片组成;a processing module, configured to perform fragmentation processing on the to-be-processed task according to the total parallelism of the task to obtain a fragmentation queue, wherein the fragmentation queue is composed of a plurality of task fragments with a uniform amount of data;
    调度模块,用于根据每个所述可调度服务器的任务并行度,将所述分片队列中的任务分片调度至每个所述可调度服务器中;a scheduling module, configured to schedule the task shards in the sharding queue to each schedulable server according to the task parallelism of each schedulable server;
    转移模块,用于当检测到所有所述可调度服务器中存在发生异常的异常服务器时,根据所述分片队列,对所述异常服务器的任务分片进行任务转移。The transfer module is configured to perform task transfer on the task fragment of the abnormal server according to the fragment queue when it is detected that there is an abnormal server in all the schedulable servers.
  9. 一种电子设备,其中,所述电子设备包括处理器和存储器,所述处理器用于执行存储器中存储的至少一个计算机可读指令以实现以下步骤:An electronic device, wherein the electronic device includes a processor and a memory, and the processor is configured to execute at least one computer-readable instruction stored in the memory to implement the following steps:
    当接收到待处理任务时,获取并统计所有可调度服务器的任务并行度,获得任务总并行度;When a pending task is received, obtain and count the task parallelism of all schedulable servers, and obtain the total parallelism of the task;
    根据所述任务总并行度,对所述待处理任务进行分片处理,获得分片队列,其中,所述分片队列由多个数据量均匀的任务分片组成;According to the total degree of parallelism of the task, the task to be processed is fragmented to obtain a fragmentation queue, wherein the fragmentation queue is composed of a plurality of task fragments with a uniform amount of data;
    根据每个所述可调度服务器的任务并行度,将所述分片队列中的任务分片调度至每个所述可调度服务器中;According to the task parallelism of each of the schedulable servers, the task shards in the sharding queue are scheduled to each of the schedulable servers;
    当检测到所有所述可调度服务器中存在发生异常的异常服务器时,根据所述分片队列,对所述异常服务器的任务分片进行任务转移。When it is detected that there is an abnormal server with an abnormality among all the schedulable servers, task transfer is performed on the task fragment of the abnormal server according to the fragmentation queue.
  10. 根据权利要求9所述的电子设备,其中,在所述根据所述分片队列,对所述异常服务器的任务分片进行任务转移时,所述处理器执行所述至少一个计算机可读指令以实现以下步骤:The electronic device according to claim 9, wherein when the task transfer is performed on the task shard of the exception server according to the shard queue, the processor executes the at least one computer-readable instruction to Implement the following steps:
    获取所述分片队列的第一任务分片调度记录;obtaining the first task fragmentation scheduling record of the fragmentation queue;
    根据所述第一任务分片调度记录,确定调度至所述异常服务器的任务分片;According to the first task fragmentation scheduling record, determine the task fragmentation scheduled to the abnormal server;
    将所述异常服务器的任务分片添加至所述分片队列中,以重新对所述异常服务器的任务分片进行调度。The task shards of the abnormal server are added to the shard queue, so as to reschedule the task shards of the abnormal server.
  11. 根据权利要求9所述的电子设备,其中,在所述根据每个所述可调度服务器的任务并行度,将所述分片队列中的任务分片调度至每个所述可调度服务器中之后,所述处理器还执行所述至少一个计算机可读指令以实现以下步骤:The electronic device according to claim 9, wherein after the task sharding in the sharding queue is scheduled to each schedulable server according to the task parallelism of each schedulable server , the processor also executes the at least one computer-readable instruction to implement the following steps:
    当检测到所有所述可调度服务器中存在已完成任务的目标服务器时,判断所述分片队列中是否存在剩余的任务分片;When detecting that there are target servers with completed tasks in all the schedulable servers, determine whether there are remaining task fragments in the fragmentation queue;
    若所述分片队列中存在剩余的任务分片,则根据所述目标服务器的任务并行度,从所述剩余的任务分片中确定待调度任务分片;If there are remaining task fragments in the fragmentation queue, then according to the task parallelism of the target server, determine the task fragment to be scheduled from the remaining task fragments;
    将所述待调度任务分片调度至所述目标服务器中。The to-be-scheduled task segment is scheduled to the target server.
  12. 根据权利要求9所述的电子设备,其中,在所述根据每个所述可调度服务器的任务并行度,将所述分片队列中的任务分片调度至每个所述可调度服务器中时,所述处理器执行所述至少一个计算机可读指令以实现以下步骤:The electronic device according to claim 9, wherein when the task shards in the sharding queue are scheduled to each of the schedulable servers according to the task parallelism of each of the schedulable servers , the processor executes the at least one computer-readable instruction to implement the following steps:
    针对每个所述可调度服务器,根据所述任务分片在所述分片队列的排列顺序,从所述任务分片中确定数量与所述可调度服务器的任务并行度一致的目标任务分片;For each schedulable server, according to the arrangement order of the task shards in the shard queue, determine from the task shards a number of target task shards that are consistent with the task parallelism of the schedulable server ;
    将所述目标任务分片调度至所述可调度服务器中。The target task is sharded and scheduled to the schedulable server.
  13. 根据权利要求9至12中任一项所述的电子设备,其中,在所述根据所述任务总并行度,对所述待处理任务进行分片处理,获得分片队列时,所述处理器执行所述至少一个计算机可读指令以实现以下步骤:The electronic device according to any one of claims 9 to 12, wherein, when the to-be-processed task is sharded according to the total parallelism of the tasks to obtain a sharded queue, the processor The at least one computer-readable instruction is executed to implement the following steps:
    对所述待处理任务进行划分,获得数量与所述任务总并行度一致的多个任务分片;Divide the task to be processed, and obtain a plurality of task fragments whose number is consistent with the total parallelism of the task;
    根据所述多个任务分片,生成所述分片队列。The fragmentation queue is generated according to the plurality of task fragments.
  14. 根据权利要求9至12中任一项所述的电子设备,其中,在所述根据每个所述可调度服务器的任务并行度,将所述分片队列中的任务分片调度至每个所述可调度服务器中之后,以及所述当检测到所有所述可调度服务器中存在发生异常的异常服务器时,根据所述分片队列,对所述异常服务器的任务分片进行任务转移之前,所述处理器还执行所述至少一个计算机可读指令以实现以下步骤:The electronic device according to any one of claims 9 to 12, wherein, in the task parallelism of each of the schedulable servers, the task shards in the sharding queue are scheduled to each of the sharded servers. After the schedulable server, and when it is detected that there is an abnormal server with an abnormality in all the schedulable servers, according to the fragmentation queue, before the task transfer of the task fragment of the abnormal server is performed, the The processor also executes the at least one computer-readable instruction to implement the following steps:
    获取所述分片队列的第二任务分片调度记录;obtaining the second task fragmentation scheduling record of the fragmentation queue;
    针对每个所述可调度服务器,判断所述第二任务分片调度记录中是否存在与所述可调度服务器对应的调度信息,其中,所述调度信息为调度至所述可调度服务器的任务分片信息;For each schedulable server, determine whether there is scheduling information corresponding to the schedulable server in the second task segment scheduling record, where the scheduling information is the task segment scheduled to the schedulable server. film information;
    若所述第二任务分片调度记录中不存在与所述可调度服务器对应的调度信息,将调度至所述可调度服务器中的任务分片信息写入所述第二任务分片调度记录中;或If there is no scheduling information corresponding to the schedulable server in the second task fragmentation scheduling record, write the task fragmentation information scheduled to the schedulable server into the second task fragmentation scheduling record ;or
    若所述第二任务分片调度记录中存在与所述可调度服务器对应的调度信息,将所述调度信息替换为调度至所述可调度服务器中的任务分片信息。If there is scheduling information corresponding to the schedulable server in the second task fragmentation scheduling record, the scheduling information is replaced with the task fragmentation information scheduled to the schedulable server.
  15. 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有至少一个计算机可读指令,所述至少一个计算机可读指令被处理器执行时实现以下步骤:A computer-readable storage medium, wherein the computer-readable storage medium stores at least one computer-readable instruction, and the at least one computer-readable instruction implements the following steps when executed by a processor:
    当接收到待处理任务时,获取并统计所有可调度服务器的任务并行度,获得任务总并行度;When a pending task is received, obtain and count the task parallelism of all schedulable servers, and obtain the total parallelism of the task;
    根据所述任务总并行度,对所述待处理任务进行分片处理,获得分片队列,其中,所述分片队列由多个数据量均匀的任务分片组成;According to the total degree of parallelism of the task, the task to be processed is fragmented to obtain a fragmentation queue, wherein the fragmentation queue is composed of a plurality of task fragments with a uniform amount of data;
    根据每个所述可调度服务器的任务并行度,将所述分片队列中的任务分片调度至每个所述可调度服务器中;According to the task parallelism of each of the schedulable servers, the task shards in the sharding queue are scheduled to each of the schedulable servers;
    当检测到所有所述可调度服务器中存在发生异常的异常服务器时,根据所述分片队列,对所述异常服务器的任务分片进行任务转移。When it is detected that there is an abnormal server with an abnormality among all the schedulable servers, task transfer is performed on the task fragment of the abnormal server according to the fragmentation queue.
  16. 根据权利要求15所述的存储介质,其中,在所述根据所述分片队列,对所述异常服务器的任务分片进行任务转移时,所述至少一个计算机可读指令被处理器执行以实现以下步骤:The storage medium according to claim 15, wherein when the task transfer is performed on the task shard of the exception server according to the shard queue, the at least one computer-readable instruction is executed by the processor to implement The following steps:
    获取所述分片队列的第一任务分片调度记录;obtaining the first task fragmentation scheduling record of the fragmentation queue;
    根据所述第一任务分片调度记录,确定调度至所述异常服务器的任务分片;According to the first task fragmentation scheduling record, determine the task fragmentation scheduled to the abnormal server;
    将所述异常服务器的任务分片添加至所述分片队列中,以重新对所述异常服务器的任务分片进行调度。The task shards of the abnormal server are added to the shard queue, so as to reschedule the task shards of the abnormal server.
  17. 根据权利要求15所述的存储介质,其中,在所述根据每个所述可调度服务器的任务并行度,将所述分片队列中的任务分片调度至每个所述可调度服务器中之后,所述至少一个计算机可读指令被处理器执行还以实现以下步骤:The storage medium according to claim 15, wherein after the task sharding in the sharding queue is scheduled to each of the schedulable servers according to the task parallelism of each schedulable server , the at least one computer-readable instruction is executed by the processor to further implement the following steps:
    当检测到所有所述可调度服务器中存在已完成任务的目标服务器时,判断所述分片队列中是否存在剩余的任务分片;When detecting that there are target servers with completed tasks in all the schedulable servers, determine whether there are remaining task fragments in the fragmentation queue;
    若所述分片队列中存在剩余的任务分片,则根据所述目标服务器的任务并行度,从所述剩余的任务分片中确定待调度任务分片;If there are remaining task fragments in the fragmentation queue, then according to the task parallelism of the target server, determine the task fragment to be scheduled from the remaining task fragments;
    将所述待调度任务分片调度至所述目标服务器中。The to-be-scheduled task segment is scheduled to the target server.
  18. 根据权利要求15所述的存储介质,其中,在所述根据每个所述可调度服务器的任务并行度,将所述分片队列中的任务分片调度至每个所述可调度服务器中时,所述至少一个计算机可读指令被处理器执行以实现以下步骤:The storage medium according to claim 15, wherein when the task shards in the sharding queue are scheduled to each of the schedulable servers according to the task parallelism of each of the schedulable servers , the at least one computer-readable instruction is executed by the processor to implement the following steps:
    针对每个所述可调度服务器,根据所述任务分片在所述分片队列的排列顺序,从所述任 务分片中确定数量与所述可调度服务器的任务并行度一致的目标任务分片;For each schedulable server, according to the arrangement order of the task shards in the shard queue, determine from the task shards a number of target task shards that are consistent with the task parallelism of the schedulable server ;
    将所述目标任务分片调度至所述可调度服务器中。The target task is sharded and scheduled to the schedulable server.
  19. 根据权利要求15至18中任一项所述的存储介质,其中,在所述根据所述任务总并行度,对所述待处理任务进行分片处理,获得分片队列时,所述至少一个计算机可读指令被处理器执行时以实现以下步骤:The storage medium according to any one of claims 15 to 18, wherein when the to-be-processed task is sharded according to the total parallelism of the tasks to obtain a sharded queue, the at least one The computer readable instructions, when executed by a processor, perform the following steps:
    对所述待处理任务进行划分,获得数量与所述任务总并行度一致的多个任务分片;Divide the task to be processed, and obtain a plurality of task shards whose number is consistent with the total parallelism of the task;
    根据所述多个任务分片,生成所述分片队列。The fragmentation queue is generated according to the plurality of task fragments.
  20. 根据权利要求15至18中任一项所述的存储介质,其中,在所述根据每个所述可调度服务器的任务并行度,将所述分片队列中的任务分片调度至每个所述可调度服务器中之后,以及所述当检测到所有所述可调度服务器中存在发生异常的异常服务器时,根据所述分片队列,对所述异常服务器的任务分片进行任务转移之前,所述至少一个计算机可读指令被处理器执行还以实现以下步骤:The storage medium according to any one of claims 15 to 18, wherein in the task parallelism of each of the schedulable servers, the task shards in the sharding queue are scheduled to each of the sharded servers. After the schedulable server, and when it is detected that there is an abnormal server with an abnormality in all the schedulable servers, according to the fragmentation queue, before the task transfer is performed on the task fragment of the abnormal server, the The at least one computer-readable instruction is executed by the processor to further implement the following steps:
    获取所述分片队列的第二任务分片调度记录;obtaining the second task fragmentation scheduling record of the fragmentation queue;
    针对每个所述可调度服务器,判断所述第二任务分片调度记录中是否存在与所述可调度服务器对应的调度信息,其中,所述调度信息为调度至所述可调度服务器的任务分片信息;For each schedulable server, determine whether there is scheduling information corresponding to the schedulable server in the second task segment scheduling record, where the scheduling information is the task segment scheduled to the schedulable server. film information;
    若所述第二任务分片调度记录中不存在与所述可调度服务器对应的调度信息,将调度至所述可调度服务器中的任务分片信息写入所述第二任务分片调度记录中;或If there is no scheduling information corresponding to the schedulable server in the second task fragmentation scheduling record, write the task fragmentation information scheduled to the schedulable server into the second task fragmentation scheduling record ;or
    若所述第二任务分片调度记录中存在与所述可调度服务器对应的调度信息,将所述调度信息替换为调度至所述可调度服务器中的任务分片信息。If there is scheduling information corresponding to the schedulable server in the second task fragmentation scheduling record, the scheduling information is replaced with the task fragmentation information scheduled to the schedulable server.
PCT/CN2021/123361 2020-10-13 2021-10-12 Task scheduling method and apparatus, electronic device, and storage medium WO2022078347A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011092091.8 2020-10-13
CN202011092091.8A CN112181662B (en) 2020-10-13 2020-10-13 Task scheduling method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2022078347A1 true WO2022078347A1 (en) 2022-04-21

Family

ID=73949537

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/123361 WO2022078347A1 (en) 2020-10-13 2021-10-12 Task scheduling method and apparatus, electronic device, and storage medium

Country Status (2)

Country Link
CN (1) CN112181662B (en)
WO (1) WO2022078347A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112181662B (en) * 2020-10-13 2023-05-02 深圳壹账通智能科技有限公司 Task scheduling method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9274863B1 (en) * 2013-03-20 2016-03-01 Google Inc. Latency reduction in distributed computing systems
CN111158896A (en) * 2018-11-08 2020-05-15 中国移动通信集团上海有限公司 Distributed process scheduling method and system
CN111597033A (en) * 2019-02-20 2020-08-28 北京京东尚科信息技术有限公司 Task scheduling method and device
CN112181662A (en) * 2020-10-13 2021-01-05 深圳壹账通智能科技有限公司 Task scheduling method and device, electronic equipment and storage medium

Family Cites Families (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090077553A1 (en) * 2007-09-13 2009-03-19 Jian Tang Parallel processing of platform level changes during system quiesce
CN102243598B (en) * 2010-05-14 2015-09-16 深圳市腾讯计算机系统有限公司 Method for scheduling task in Distributed Data Warehouse and system
CN102279730B (en) * 2010-06-10 2014-02-05 阿里巴巴集团控股有限公司 Parallel data processing method, device and system
CN103365729A (en) * 2013-07-19 2013-10-23 哈尔滨工业大学深圳研究生院 Dynamic MapReduce dispatching method and system based on task type
CN104133724B (en) * 2014-04-03 2015-08-19 腾讯科技(深圳)有限公司 Concurrent tasks dispatching method and device
CN105095299A (en) * 2014-05-16 2015-11-25 北京奇虎科技有限公司 Picture capturing method and system
CN104216836B (en) * 2014-08-28 2018-01-23 华为技术有限公司 A kind of concurrent reading and concurrent writing method and apparatus of storage system
CN104615413A (en) * 2015-02-13 2015-05-13 赛诺威盛科技(北京)有限公司 Flow line task self-adaptation parallelization method
US10554577B2 (en) * 2017-03-14 2020-02-04 International Business Machines Corporation Adaptive resource scheduling for data stream processing
US10365949B2 (en) * 2017-08-24 2019-07-30 Dropbox, Inc. Large-scale asynchronous event processor
GB2566514B (en) * 2017-09-15 2020-01-08 Imagination Tech Ltd Resource allocation
CN108363615B (en) * 2017-09-18 2019-05-14 清华大学 Method for allocating tasks and system for reconfigurable processing system
CN107621978A (en) * 2017-09-29 2018-01-23 郑州云海信息技术有限公司 A kind of High Availabitity task processing Controlling model under parallel computation environment
CN109992382B (en) * 2017-12-29 2021-06-01 浙江宇视科技有限公司 Task scheduling method and device and task scheduler
CN109343941B (en) * 2018-08-14 2023-02-21 创新先进技术有限公司 Task processing method and device, electronic equipment and computer readable storage medium
CN110046042A (en) * 2019-04-18 2019-07-23 合肥天毅网络传媒有限公司 A kind of Computer Service scheduling system and method
CN110298685A (en) * 2019-05-22 2019-10-01 深圳壹账通智能科技有限公司 Information displaying method, device, computer equipment and storage medium
CN110458468A (en) * 2019-08-16 2019-11-15 北京百度网讯科技有限公司 A kind of task processing method, device, electronic equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9274863B1 (en) * 2013-03-20 2016-03-01 Google Inc. Latency reduction in distributed computing systems
CN111158896A (en) * 2018-11-08 2020-05-15 中国移动通信集团上海有限公司 Distributed process scheduling method and system
CN111597033A (en) * 2019-02-20 2020-08-28 北京京东尚科信息技术有限公司 Task scheduling method and device
CN112181662A (en) * 2020-10-13 2021-01-05 深圳壹账通智能科技有限公司 Task scheduling method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN112181662B (en) 2023-05-02
CN112181662A (en) 2021-01-05

Similar Documents

Publication Publication Date Title
US9143562B2 (en) Managing transfer of data from a source to a destination machine cluster
US9569245B2 (en) System and method for controlling virtual-machine migrations based on processor usage rates and traffic amounts
US10382380B1 (en) Workload management service for first-in first-out queues for network-accessible queuing and messaging services
US8495625B1 (en) Method and system for creation of streamed files on-demand
US20110191559A1 (en) System, method and computer program product for data processing and system deployment in a virtual environment
US20070168525A1 (en) Method for improved virtual adapter performance using multiple virtual interrupts
US20120102291A1 (en) System and Method for Storage Allocation in a Cloud Environment
US20170201580A1 (en) Methods and systems for determining performance capacity of a resource of a networked storage environment
US10970190B2 (en) Hybrid log viewer with thin memory usage
US8589917B2 (en) Techniques for transferring information between virtual machines
US8606975B2 (en) Managing interrupts in a virtualized input/output device supporting multiple hosts and functions
CN111475483B (en) Database migration method and device and computing equipment
US8935568B2 (en) System and method of replicating virtual machines for live migration between data centers
WO2013078583A1 (en) Method and apparatus for optimizing data access, method and apparatus for optimizing data storage
US20180364948A1 (en) Data Processing Method, Related Device, and Storage System
US11914894B2 (en) Using scheduling tags in host compute commands to manage host compute task execution by a storage device in a storage system
WO2019153702A1 (en) Interrupt processing method, apparatus and server
US11079968B1 (en) Queue management in multi-site storage systems
WO2021051589A1 (en) Data storage method and apparatus, electronic device, and storage medium
US20160234108A1 (en) Selective data collection using a management system
US9940269B2 (en) Conditionally releasing locks in response to requests
WO2022078347A1 (en) Task scheduling method and apparatus, electronic device, and storage medium
US20180183698A1 (en) Methods and systems for determining performance capacity of a resource of a networked storage environment
US20220404980A1 (en) Cross-site high-availability distributed cloud storage system to provide multiple virtual channels between storage nodes
WO2023093418A1 (en) Data migration method and apparatus, and electronic device

Legal Events

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

Ref document number: 21879391

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 180723)

122 Ep: pct application non-entry in european phase

Ref document number: 21879391

Country of ref document: EP

Kind code of ref document: A1