WO2021022706A1 - 分布式计算系统任务分配方法及相关设备 - Google Patents
分布式计算系统任务分配方法及相关设备 Download PDFInfo
- Publication number
- WO2021022706A1 WO2021022706A1 PCT/CN2019/117418 CN2019117418W WO2021022706A1 WO 2021022706 A1 WO2021022706 A1 WO 2021022706A1 CN 2019117418 W CN2019117418 W CN 2019117418W WO 2021022706 A1 WO2021022706 A1 WO 2021022706A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- task
- computing device
- tasks
- difference
- processed
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/4881—Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation 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/5038—Allocation 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
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5061—Partitioning or combining of resources
- G06F9/5066—Algorithms for mapping a plurality of inter-dependent sub-tasks onto a plurality of physical CPUs
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE 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/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Definitions
- This application relates to the field of computer technology, in particular to a distributed computing system task allocation method, device, computer device and non-volatile readable storage medium.
- the first aspect of the application provides a method for assigning tasks to a distributed computing system.
- the method includes: acquiring a plurality of tasks to be processed in the distributed computing system; The tasks to be processed are sorted; the plurality of tasks to be processed are allocated to the plurality of computing devices of the distributed computing system in the sorted order to obtain the task allocation table of the plurality of computing devices; according to the task allocation
- the table calculates the sum of the attribute values of the assigned tasks of each computing device, and calculates the first difference M (n) between the largest attribute value sum and the smallest attribute value sum, where n is the loop variable and the initial value is 1 ;
- the computing device with the largest sum of attribute values is used as the first computing device, the computing device with the smallest sum of attribute values is used as the second computing device, and each of the first computing devices has been calculated
- the second difference between the attribute value of the assigned task and the attribute value of each assigned task of the second computing device Is the second difference between the attribute value of the i-th assigned task of the first
- a second aspect of the present application provides a distributed computing system task allocation device, the device includes:
- the obtaining module is used to obtain multiple to-be-processed tasks of the distributed computing system; the sorting module is used to sort the multiple to-be-processed tasks according to the attribute values of the multiple to-be-processed tasks; the allocation module is used to The multiple to-be-processed tasks are allocated to multiple computing devices of the distributed computing system in a sorted order to obtain a task allocation table of the multiple computing devices; the first calculation module is configured to allocate according to the tasks The table calculates the sum of the attribute values of the assigned tasks of each computing device, and calculates the first difference M (n) between the largest attribute value sum and the smallest attribute value sum, where n is the loop variable and the initial value is 1
- the second calculation module is configured to use the computing device with the largest sum of attribute values as the first computing device and the computing device with the smallest sum of attribute values as the second computing device to calculate the first
- the second difference between the attribute value of each assigned task of a computing device and the attribute value of each assigned task of the second computing device Is the second difference
- a third aspect of the present application provides a computer device that includes a processor configured to implement the distributed computing system task allocation method when executing computer-readable instructions stored in a memory.
- a fourth aspect of the present application provides a non-volatile readable storage medium having computer readable instructions stored thereon, and when the computer readable instructions are executed by a processor, the distributed computing system task allocation method is implemented.
- This application realizes the balanced distribution of tasks to be processed to multiple computing devices in a distributed computing system.
- Fig. 1 is a flowchart of a task allocation method for a distributed computing system provided by an embodiment of the present application.
- Fig. 2 is a structural diagram of a distributed computing system task allocation device provided by an embodiment of the present application.
- Fig. 3 is a schematic diagram of a computer device provided by an embodiment of the present application.
- the distributed computing system task allocation method of the present application is applied to one or more computer devices.
- the computer device is a device that can automatically perform numerical calculation and/or information processing in accordance with pre-set or stored instructions.
- Its hardware includes, but is not limited to, a microprocessor and an application specific integrated circuit (ASIC) , Field-Programmable Gate Array (FPGA), Digital Processor (Digital Signal Processor, DSP), embedded equipment, etc.
- ASIC application specific integrated circuit
- FPGA Field-Programmable Gate Array
- DSP Digital Processor
- embedded equipment etc.
- Fig. 1 is a flowchart of a method for assigning tasks to a distributed computing system according to Embodiment 1 of the present application.
- the distributed computing system task allocation method is applied to a computer device.
- the distributed computing system task distribution method can evenly distribute the tasks to be processed to multiple computing devices in the distributed computing system.
- the distributed computing system task allocation method includes:
- the tasks to be processed may be various types of tasks, such as audio processing tasks, image processing tasks, text processing tasks, and so on.
- Each task to be processed has an attribute value, and the attribute value is used to measure whether the task distribution is balanced.
- the attribute value may be the calculation amount of the task to be processed.
- the method is used for task assignment of audio correction
- the task to be processed is an audio correction task
- the attribute value of the audio correction task is an audio correction calculation amount
- the audio correction calculation amount may include voice feature extraction calculation Calculation amount, speech recognition calculation amount, template matching calculation amount, voice change calculation amount.
- the attribute value may be the amount of data of the task to be processed.
- the method is used for task assignment of text processing
- the task to be processed is a text processing task
- the attribute value of the text processing task is the text size.
- a complex computing task may be divided into multiple independent computing tasks, and the multiple independent computing tasks are regarded as the tasks to be processed.
- the method is used for task assignment of audio correction, and the long audio audio correction task is divided into multiple short audio audio correction tasks as the pending tasks.
- the multiple tasks to be processed include 50 audio correction tasks, and the 50 audio correction tasks are sorted according to the calculation amount of the 50 audio correction tasks.
- the multiple to-be-processed tasks may be sorted in ascending or descending order according to the attribute values of the multiple to-be-processed tasks. For example, according to the calculation amount of the 50 audio correction tasks, the 50 audio correction tasks are sorted in descending order to obtain the 50 audio correction tasks arranged in descending order of calculation amount. In another example, the 50 audio correction tasks are sorted in ascending order according to the calculation amount of the 50 audio correction tasks to obtain the 50 audio correction tasks arranged in ascending order of calculation amount.
- the number of the multiple computing devices is 4, the multiple pending tasks are 50 audio correction tasks, and the 50 audio correction tasks are sorted in descending order according to the calculation amount of the 50 audio correction tasks , The first 48 (4*12) audio correction tasks are allocated to the 4 computing devices. The remaining 2 audio correction tasks can be allocated in the next task assignment.
- the multiple tasks to be processed are allocated to the multiple computing devices in a sorted order, each time the same number of tasks to be processed as the multiple computing devices are acquired, the acquired tasks are compared with the multiple computing devices. The same number of the tasks to be processed are sequentially allocated to the multiple computing devices until all tasks to be processed are allocated.
- the 16 audio correction tasks after sorting are T1, T2, T3,..., T16, and the 16 audio correction tasks are assigned to 4 computing devices A1, A2, A3, A4: 4 audio correction tasks are acquired for the first time T1, T2, T3, T4 are allocated to 4 computing devices A1, A2, A3, A4, respectively, of which audio correction task T1 is allocated to computing device A1, audio correction task T2 is computing device A2, audio correction task T3 is computing device A3, Audio correction task T4: computing device A4; for the second time, 4 audio correction tasks T5, T6, T7, T8 are acquired, and they are allocated to 4 computing devices A1, A2, A3, A4, of which audio correction task T5 is allocated to computing device A1 , Audio correction task T6, computing device A2, audio correction task T7, computing device A3, audio correction task T8, computing device A4; for the third time, 4 audio correction tasks T9, T10, T11, T12 are acquired and assigned to 4 computing devices A1 , A2, A3, A4, of which audio correction task T9 is assigned to computing device
- the first column in the above table represents the sequence number of the assigned task of the computing device.
- the "1" in the first column represents the first assigned task of the computing device
- the "2" in the first column represents the second assigned task of the computing device.
- 105 Use a computing device with the largest sum of attribute values as a first computing device, and use a computing device with the smallest sum of attribute values as a second computing device, and calculate each of the first computing devices
- the second difference between the attribute value of the assigned task and the attribute value of each assigned task of the second computing device Is the second difference between the attribute value of the i-th assigned task of the first computing device and the attribute value of the j-th assigned task of the second computing device.
- the computing device A1 with the largest sum of attribute values is used as the first computing device, and the computing device A4 with the smallest sum of attribute values is used as the second computing device to calculate the The attribute value of each assigned task of a computing device A1 (ie 597, 424, 323, 190) and the attribute value of each assigned task of the second computing device A4 (ie 435, 339, 240, 25) Two difference.
- the calculation is calculated from the first difference M (n) and the second difference Determined third difference
- the a-th assigned task of the first computing device is taken as the first task to be exchanged for the first computing device, and the b-th assigned task of the second computing device is taken as the second computing device’s The second task to be exchanged.
- the smallest value greater than 0 is (That is, 127), therefore, it is determined that the second assigned task of the first computing device A1 (that is, the assigned task with an attribute value of 424) is the first task to be exchanged for the first computing device A1, and that of the second computing device A4
- the third assigned task (that is, the assigned task with an attribute value of 240) is the second task to be exchanged for the second computing device A4.
- To exchange the first task to be exchanged with the second task to be exchanged is to change the first task to be exchanged from being assigned to the first computing device to being assigned to the second computing device, and changing the second The task to be exchanged is changed from being allocated to the second computing device to being allocated to the first computing device.
- the first difference M (n) satisfies a preset condition as follows:
- the first difference value M (n) satisfies a preset condition that: M (n) is less than or equal to a preset threshold (for example, 10).
- the first difference M (1) obtained from the initial task allocation table is 495
- the first difference M (2) obtained from the task allocation table after the first update is 196
- the second update The first difference M (3) obtained from the task allocation table of , is 77
- the first difference M (4) obtained according to the task allocation table after the third update is 19, according to the task allocation table after the fourth update
- the obtained first difference value M (5) is 99
- the first difference value M (5) satisfies the preset condition
- the task allocation table obtained with the first difference value M (4) is taken as the final distribution result.
- the allocated tasks allocated to the multiple computing devices can be redistributed, so as to achieve the purpose of balanced task allocation.
- the task allocation table 48 audio correction tasks are allocated to 4 computing devices, so that 4 multiple computing devices process the allocated audio correction tasks.
- the multiple computing devices can be controlled to perform parallel processing on the assigned audio correction tasks.
- the distributed computing system task allocation method of the first embodiment evenly allocates the tasks to be processed to multiple computing devices in the distributed computing system, so as to maximize the utilization of resources of the distributed computing system and reduce the overhead time of processing tasks.
- the method further includes:
- the processing results of the assigned tasks to be processed by the multiple computing devices are combined into an overall processing result.
- receiving audio correction results of four computing devices for the assigned audio correction tasks and combining the audio correction results of the four computing devices according to the time corresponding to each audio correction task into an overall audio correction result.
- the method further includes:
- Fig. 2 is a structural diagram of a distributed computing system task allocation device provided in the second embodiment of the present application.
- the distributed computing system task allocation device 20 is applied to a computer device, and is used to evenly allocate tasks to be processed to multiple computing devices in the distributed computing system.
- the device 20 includes an acquisition module 201, a sorting module 202, an allocation module 203, a first calculation module 204, a second calculation module 205, a first determination module 206, an exchange module 207, a judgment module 208, and a 2.
- the determining module 209 and the issuing module 210 are included in the acquisition module 201, a sorting module 202, an allocation module 203, a first calculation module 204, a second calculation module 205, a first determination module 206, an exchange module 207, a judgment module 208, and a 2.
- the determining module 209 and the issuing module 210 The determining module 209 and the issuing module 210.
- the obtaining module 201 is used to obtain multiple tasks to be processed in the distributed computing system.
- the tasks to be processed may be various types of tasks, such as audio processing tasks, image processing tasks, text processing tasks, and so on.
- Each task to be processed has an attribute value, which is used to measure whether the task distribution is balanced.
- the attribute value may be the calculation amount of the task to be processed.
- the method is used for task assignment of audio correction
- the task to be processed is an audio correction task
- the attribute value of the audio correction task is an audio correction calculation amount
- the audio correction calculation amount may include voice feature extraction calculation Calculation amount, speech recognition calculation amount, template matching calculation amount, voice change calculation amount.
- the attribute value may be the amount of data of the task to be processed.
- the method is used for task assignment of text processing
- the task to be processed is a text processing task
- the attribute value of the text processing task is the text size.
- a complex computing task may be divided into multiple independent computing tasks, and the multiple independent computing tasks are regarded as the tasks to be processed.
- the method is used for task assignment of audio correction, and the long audio audio correction task is divided into multiple short audio audio correction tasks as the pending tasks.
- the sorting module 202 is configured to sort the multiple to-be-processed tasks according to the attribute values of the multiple to-be-processed tasks.
- the multiple tasks to be processed include 50 audio correction tasks, and the 50 audio correction tasks are sorted according to the calculation amount of the 50 audio correction tasks.
- the multiple to-be-processed tasks may be sorted in ascending or descending order according to the attribute values of the multiple to-be-processed tasks. For example, according to the calculation amount of the 50 audio correction tasks, the 50 audio correction tasks are sorted in descending order to obtain the 50 audio correction tasks arranged in descending order of calculation amount. In another example, the 50 audio correction tasks are sorted in ascending order according to the calculation amount of the 50 audio correction tasks to obtain the 50 audio correction tasks arranged in ascending order of calculation amount.
- the allocation module 203 is configured to allocate the multiple tasks to be processed to multiple computing devices of the distributed computing system in a sorted order to obtain a task allocation table of the multiple computing devices.
- the number of the multiple computing devices is 4, the multiple pending tasks are 50 audio correction tasks, and the 50 audio correction tasks are sorted in descending order according to the calculation amount of the 50 audio correction tasks , The first 48 (4*12) audio correction tasks are allocated to the 4 computing devices. The remaining 2 audio correction tasks can be allocated in the next task assignment.
- the multiple tasks to be processed are allocated to the multiple computing devices in a sorted order, each time the same number of tasks to be processed as the multiple computing devices are acquired, the acquired tasks are compared with the multiple computing devices. The same number of the tasks to be processed are sequentially allocated to the multiple computing devices until all tasks to be processed are allocated.
- the 16 audio correction tasks after sorting are T1, T2, T3,..., T16, and the 16 audio correction tasks are assigned to 4 computing devices A1, A2, A3, A4: 4 audio correction tasks are acquired for the first time T1, T2, T3, T4 are allocated to 4 computing devices A1, A2, A3, A4, respectively, of which audio correction task T1 is allocated to computing device A1, audio correction task T2 is computing device A2, audio correction task T3 is computing device A3, Audio correction task T4: computing device A4; for the second time, 4 audio correction tasks T5, T6, T7, T8 are acquired, and they are allocated to 4 computing devices A1, A2, A3, A4, of which audio correction task T5 is allocated to computing device A1 , Audio correction task T6, computing device A2, audio correction task T7, computing device A3, audio correction task T8, computing device A4; for the third time, 4 audio correction tasks T9, T10, T11, T12 are acquired and assigned to 4 computing devices A1 , A2, A3, A4, of which audio correction task T9 is assigned to computing device
- the first column in the above table represents the sequence number of the assigned task of the computing device. For example, “1" in the first column represents the first assigned task of the computing device, and “2" in the first column represents the second assigned task of the computing device.
- the first calculation module 204 is configured to calculate the sum of the attribute values of the assigned tasks of each computing device according to the task allocation table, and calculate the first difference between the maximum sum of attribute values and the minimum sum of attribute values M ( n) , n is the loop variable, the initial value is 1.
- the second calculation module 205 is configured to use the computing device with the largest sum of attribute values as the first computing device and the computing device with the smallest sum of attribute values as the second computing device to calculate the The second difference between the attribute value of each assigned task of a computing device and the attribute value of each assigned task of the second computing device Is the second difference between the attribute value of the i-th assigned task of the first computing device and the attribute value of the j-th assigned task of the second computing device.
- the computing device A1 with the largest sum of attribute values is used as the first computing device, and the computing device A4 with the smallest sum of attribute values is used as the second computing device to calculate the The attribute value of each assigned task of a computing device A1 (ie 597, 424, 323, 190) and the attribute value of each assigned task of the second computing device A4 (ie 435, 339, 240, 25) Two difference.
- the first determining module 206 is configured to determine the difference between the first difference M (n) and the second difference Determine the first task to be exchanged of the first computing device and the second task to be exchanged of the second computing device.
- the calculation is calculated from the first difference M (n) and the second difference Determined third difference
- a is a subset of i, and b is a subset of j;
- the a-th assigned task of the first computing device is taken as the first task to be exchanged for the first computing device, and the b-th assigned task of the second computing device is taken as the second computing device’s The second task to be exchanged.
- the smallest value greater than 0 is (That is, 127), therefore, it is determined that the second assigned task of the first computing device A1 (that is, the assigned task with an attribute value of 424) is the first task to be exchanged for the first computing device A1, and that of the second computing device A4
- the third assigned task (that is, the assigned task with an attribute value of 240) is the second task to be exchanged for the second computing device A4.
- the exchange module 207 is configured to exchange the first task to be exchanged and the second task to be exchanged in the task allocation table.
- To exchange the first task to be exchanged with the second task to be exchanged is to change the first task to be exchanged from being assigned to the first computing device to being assigned to the second computing device, and changing the second The task to be exchanged is changed from being allocated to the second computing device to being allocated to the first computing device.
- the first calculation module 204 After the number of cycles n is incremented, the first calculation module 204, the second calculation module 205, the first determination module 206, the exchange module 207, and the judgment module 208 realize that the assigned tasks assigned to the multiple computing devices are re- Allocation to achieve the goal of balanced assignment of tasks.
- the first calculation mode 204 re-calculates the sum of the attribute values of the assigned tasks of each computing device according to the task allocation table, and calculates the first difference between the maximum sum of attribute values and the minimum sum of attribute values M ( n) .
- the first difference M (n) satisfies a preset condition as follows:
- the first difference value M (n) satisfies a preset condition that: M (n) is less than or equal to a preset threshold (for example, 10).
- the second determining module 209 is configured to, if the first difference value M (n) satisfies a preset condition, use the task allocation table obtained with the first difference value M (n-1) as the final allocation result.
- the first difference M (1) obtained from the initial task allocation table is 495
- the first difference M (2) obtained from the task allocation table after the first update is 196
- the second update The first difference M (3) obtained from the task allocation table of , is 77
- the first difference M (4) obtained according to the task allocation table after the third update is 19, according to the task allocation table after the fourth update
- the obtained first difference value M (5) is 99
- the first difference value M (5) satisfies the preset condition
- the task allocation table obtained with the first difference value M (4) is taken as the final distribution result.
- the issuing module 210 is configured to issue the task to be processed to the multiple computing devices according to the task allocation table, so that the multiple computing devices process the allocated tasks to be processed.
- the task allocation table 48 audio correction tasks are allocated to 4 computing devices, so that 4 multiple computing devices process the allocated audio correction tasks.
- the multiple computing devices can be controlled to perform parallel processing on the assigned audio correction tasks.
- the distributed computing system task allocation device 20 of the second embodiment distributes the tasks to be processed to multiple computing devices in the distributed computing system in a balanced manner, so as to maximize the resource utilization of the distributed computing system while reducing processing tasks. Overhead time.
- the distributed computing system task allocation device 20 may further include: a synthesis module, configured to receive processing results of the allocated tasks to be processed by the multiple computing devices, and combine the multiple The processing result of the assigned task to be processed by the computing device is synthesized into an overall processing result.
- a synthesis module configured to receive processing results of the allocated tasks to be processed by the multiple computing devices, and combine the multiple The processing result of the assigned task to be processed by the computing device is synthesized into an overall processing result.
- receiving audio correction results of four computing devices for the assigned audio correction tasks and combining the audio correction results of the four computing devices according to the time corresponding to each audio correction task into an overall audio correction result.
- the distributed computing system task allocation device 20 may further include: a collection module, configured to collect the task load status of the multiple computing devices, and judge according to the task load status of the multiple computing devices Whether the current task loads of the multiple computing devices are balanced. If the current task load of the multiple computing devices is balanced, the issuing module 210 issues the to-be-processed task to the multiple computing devices according to the task allocation table.
- a collection module configured to collect the task load status of the multiple computing devices, and judge according to the task load status of the multiple computing devices Whether the current task loads of the multiple computing devices are balanced. If the current task load of the multiple computing devices is balanced, the issuing module 210 issues the to-be-processed task to the multiple computing devices according to the task allocation table.
- This embodiment provides a non-volatile readable storage medium having computer readable instructions stored on the non-volatile readable storage medium, and when the computer readable instructions are executed by a processor, the above distributed computing system task allocation Steps in the method embodiment, for example, steps 101-110 shown in Figure 1:
- 105 Use a computing device with the largest sum of attribute values as a first computing device, and use a computing device with the smallest sum of attribute values as a second computing device, and calculate each of the first computing devices
- the second difference between the attribute value of the assigned task and the attribute value of each assigned task of the second computing device Is the second difference between the attribute value of the i-th assigned task of the first computing device and the attribute value of the j-th assigned task of the second computing device;
- each module in the above-mentioned device embodiment is realized, for example, the modules 201-210 in FIG. 2:
- the obtaining module 201 is used to obtain multiple tasks to be processed in the distributed computing system
- the sorting module 202 is configured to sort the multiple to-be-processed tasks according to the attribute values of the multiple to-be-processed tasks;
- An allocation module 203 configured to allocate the multiple tasks to be processed to multiple computing devices of the distributed computing system in a sorted order to obtain a task allocation table of the multiple computing devices;
- the first calculation module 204 is configured to calculate the sum of the attribute values of the assigned tasks of each computing device according to the task allocation table, and calculate the first difference between the maximum sum of attribute values and the minimum sum of attribute values M ( n) , n is a loop variable, the initial value is 1;
- the second calculation module 205 is configured to use the computing device with the largest sum of attribute values as the first computing device and the computing device with the smallest sum of attribute values as the second computing device to calculate the The second difference between the attribute value of each assigned task of a computing device and the attribute value of each assigned task of the second computing device Is the second difference between the attribute value of the i-th assigned task of the first computing device and the attribute value of the j-th assigned task of the second computing device;
- the first determining module 206 is configured to determine the difference between the first difference M (n) and the second difference Determining the first task to be exchanged of the first computing device and the second task to be exchanged of the second computing device;
- An exchange module 207 configured to exchange the first task to be exchanged and the second task to be exchanged in the task allocation table;
- the second determining module 209 is configured to, if the first difference value M (n) satisfies a preset condition, use the task allocation table for obtaining the first difference value M (n-1) as the final allocation result;
- the issuing module 210 is configured to issue the task to be processed to the multiple computing devices according to the task allocation table, so that the multiple computing devices process the allocated tasks to be processed.
- FIG. 3 is a schematic diagram of a computer device provided in Embodiment 4 of this application.
- the computer device 30 includes a memory 301, a processor 302, and computer-readable instructions 303 stored in the memory 301 and running on the processor 302, such as a distributed computing system task allocation program.
- the processor 302 executes the computer-readable instructions 303, the steps in the embodiment of the task allocation method for the distributed computing system are implemented, such as steps 101-110 shown in FIG. 1.
- the computer-readable instruction realizes the functions of the modules in the foregoing device embodiments when executed by the processor, such as modules 201-210 in FIG. 2.
- the computer-readable instruction 303 may be divided into one or more modules, and the one or more modules are stored in the memory 301 and executed by the processor 302 to complete the method .
- the computer-readable instruction 303 can be divided into the acquisition module 201, the sorting module 202, the allocation module 203, the first calculation module 204, the second calculation module 205, the first determination module 206, and the exchange module 207 in FIG. , The judgment module 208, the second determination module 209, and the issuing module 210.
- the specific functions of each module refer to the second embodiment.
- the computer device 30 may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server.
- a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server.
- the schematic diagram 3 is only an example of the computer device 30 and does not constitute a limitation on the computer device 30. It may include more or less components than those shown in the figure, or combine certain components, or be different.
- the computer device 30 may also include input and output devices, network access devices, buses, etc.
- the so-called processor 302 may be a central processing unit (Central Processing Unit, CPU), other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
- the general-purpose processor can be a microprocessor or the processor 302 can also be any conventional processor, etc.
- the processor 302 is the control center of the computer device 30 and connects the entire computer device 30 with various interfaces and lines. Various parts.
- the memory 301 may be used to store the computer-readable instructions 303, and the processor 302 executes or executes the computer-readable instructions or modules stored in the memory 301, and calls data stored in the memory 301 to implement Various functions of the computer device 30.
- the memory 301 may mainly include a program storage area and a data storage area.
- the program storage area may store an operating system, an application program required by at least one function (such as a sound playback function, an image playback function, etc.), etc.; Data (such as audio data) created according to the use of the computer device 30 and the like are stored.
- the memory 301 may include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a Secure Digital (SD) card, a flash memory card (Flash Card), At least one magnetic disk storage device, flash memory device or other non-volatile solid state storage device.
- a non-volatile memory such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a Secure Digital (SD) card, a flash memory card (Flash Card), At least one magnetic disk storage device, flash memory device or other non-volatile solid state storage device.
- the integrated module of the computer device 30 may be stored in a non-volatile readable storage medium.
- this application implements all or part of the processes in the above-mentioned embodiments and methods, and can also be completed by instructing relevant hardware through computer-readable instructions.
- the computer-readable instructions can be stored in a non-volatile memory. In the read storage medium, when the computer-readable instructions are executed by the processor, the steps of the foregoing method embodiments can be implemented.
- the computer-readable instructions may be in the form of source code, object code, executable file, or some intermediate forms, etc.
- the non-volatile readable storage medium may include: any entity or device capable of carrying the computer readable instructions, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, read-only memory (ROM, Read-Only Memory).
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Multi Processors (AREA)
Abstract
一种分布式计算系统任务分配方法及相关设备。所述方法包括:获取多个待处理任务(101);根据多个待处理任务的属性值对多个待处理任务进行排序;将多个待处理任务分配给分布式计算系统的多个计算设备;计算每个计算设备的已分配任务的属性值之和,计算最大的属性值之和与最小的属性值之和的第一差值;计算第一计算设备的每个已分配任务的属性值与第二计算设备的每个已分配任务的属性值的第二差值;交换第一待交换任务与第二待交换任务;若第一差值满足预设条件,将取得第一差值的任务分配表作为最终的分配结果;根据任务分配表将待处理任务下发给所述多个计算设备(110)。所述方法能够将多个任务根据其属性值均衡分配给分布式计算系统的多个计算设备。
Description
本申请要求于2019年08月08日提交中国专利局,申请号为201910731711.9申请名称为“分布式计算系统任务分配方法及相关设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及计算机技术领域,具体涉及一种分布式计算系统任务分配方法、装置、计算机装置及非易失性可读存储介质。
随着信息技术的飞速发展,基于数据处理和数据分析的应用受到了广泛的欢迎和关注。对数据(如海量数据)进行复杂计算已经远远超过单台计算机的处理能力,由此推动了对分布式系统及其关键技术的研究。分布式计算中把需要进行复杂计算的数据切分成小块后,分交由多个计算设备并行处理,并将局部计算结果整合得出最终结果。因此,如何合理地对分布式计算系统的资源进行分配,使得分布式计算系统的资源的利用率最大化,同时减少处理任务的开销时间,成了亟待解决的问题。
发明内容
鉴于以上内容,有必要提出一种分布式计算系统任务分配方法、装置、计算机装置及非易失性可读存储介质,其可以将待处理任务均衡分配给所述分布式计算系统中的多个计算设备。
本申请的第一方面提供一种分布式计算系统任务分配方法,所述方法包括:获取分布式计算系统的多个待处理任务;根据所述多个待处理任务的属性值对所述多个待处理任务进行排序;将所述多个待处理任务按照排序后的顺序分配给所述分布式计算系统的多个计算设备,得到所述多个计算设备的任务分配表;根据所述任务分配表计算每个计算设备的已分配任务的属性值之和,计算最大的属性值之和与最小的属性值之和的第一差值M
(n),其中n为循环变量,初始值为1;将具有所述最大的属性值之和的计算设备作为第一计算设备,将具有所述最小的属性值之和的计算设备作为第二计算设备,计算所述第一计算设备的每个已分配任务的属性值与所述第二计算设备的每个已分配任务的属性值的第二差值
是所述第一 计算设备的第i个已分配任务的属性值与所述第二计算设备的第j个已分配任务的属性值的第二差值;根据所述第一差值M
(n)与所述第二差值
确定所述第一计算设备的第一待交换任务和所述第二计算设备的第二待交换任务;在所述任务分配表中交换所述第一待交换任务与所述第二待交换任务;判断所述第一差值M
(n)是否满足预设条件,若所述第一差值M
(n)不满足预设条件,则n=n+1,返回所述根据所述任务分配表计算每个计算设备的已分配任务的属性值之和,计算最大的属性值之和与最小的属性值之和的第一差值M
(n)的步骤;若所述第一差值M
(n)满足预设条件,则将取得第一差值M
(n-1)的任务分配表作为最终的分配结果;根据所述任务分配表将所述待处理任务下发给所述多个计算设备,使得所述多个计算设备对分配的待处理任务进行处理。
本申请的第二方面提供一种分布式计算系统任务分配装置,所述装置包括:
获取模块,用于获取分布式计算系统的多个待处理任务;排序模块,用于根据所述多个待处理任务的属性值对所述多个待处理任务进行排序;分配模块,用于将所述多个待处理任务按照排序后的顺序分配给所述分布式计算系统的多个计算设备,得到所述多个计算设备的任务分配表;第一计算模块,用于根据所述任务分配表计算每个计算设备的已分配任务的属性值之和,计算最大的属性值之和与最小的属性值之和的第一差值M
(n),其中n为循环变量,初始值为1;第二计算模块,用于将具有所述最大的属性值之和的计算设备作为第一计算设备,将具有所述最小的属性值之和的计算设备作为第二计算设备,计算所述第一计算设备的每个已分配任务的属性值与所述第二计算设备的每个已分配任务的属性值的第二差值
是所述第一计算设备的第i个已分配任务的属性值与所述第二计算设备的第j个已分配任务的属性值的第二差值;第一确定模块,用于根据所述第一差值M
(n)与所述第二差值
确定所述第一计算设备的第一待交换任务和所述第二计算设备的第二待交换任务;交换模块,用于在所述任务分配表中交换所述第一待交换任务与所述第二待交换任务;判断模块,用于判断所述第一差值M
(n)是否满足预设条件,若所述第一差值M
(n)不满足预设条件,则n=n+1;第二确定模块,用于若所述第一差值M
(n)满足预设条件,则将取得第一差值M
(n-1)的任务分配表作为最终的分配结果;下发模块,用于根据所述任务分配表将所述待处理任务下发给所述多个计算设备,使得所述多个计算设备对分配的待处理任务进行处理。
本申请的第三方面提供一种计算机装置,所述计算机装置包括处理器,所述处理器用于执行存储器中存储的计算机可读指令时实现所述分布式计算系统任务分配方法。
本申请的第四方面提供一种非易失性可读存储介质,其上存储有计算机可读指令,所述计算机可读指令被处理器执行时实现所述分布式计算系统任务分配方法。
本申请实现了将待处理任务均衡分配给分布式计算系统中的多个计算设备。
图1是本申请实施例提供的分布式计算系统任务分配方法的流程图。
图2是本申请实施例提供的分布式计算系统任务分配装置的结构图。
图3是本申请实施例提供的计算机装置的示意图。
优选地,本申请的分布式计算系统任务分配方法应用在一个或者多个计算机装置中。所述计算机装置是一种能够按照事先设定或存储的指令,自动进行数值计算和/或信息处理的设备,其硬件包括但不限于微处理器、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程门阵列(Field-Programmable Gate Array,FPGA)、数字处理器(Digital Signal Processor,DSP)、嵌入式设备等。
实施例一
图1是本申请实施例一提供的分布式计算系统任务分配方法的流程图。所述分布式计算系统任务分配方法应用于计算机装置。所述分布式计算系统任务分配方法能够将待处理任务均衡分配给分布式计算系统中的多个计算设备。
如图1所示,所述分布式计算系统任务分配方法包括:
101,获取分布式计算系统的多个待处理任务。
所述待处理任务可以是各种类型的任务,例如音频处理任务、图像处理任务、文本处理任务等。
每个待处理任务具有一个属性值,所述属性值用于衡量任务分配是否均衡。
在本实施例中,所述属性值可以是待处理任务的计算量。例如,所述方法用于进行音频修正的任务分配,所述待处理任务为音频修正任务,所述音频修正任务的属性值为音频修正计算量,所述音频修正计算量可以包括语音特征提取计算量、语音识别计算量、模板匹配计算量、变声计算量。
在另一实施例中,所述属性值可以是待处理任务的数据量。例如,所述方法用于进行文本处理的任务分配,所述待处理任务为文本处理任务,所述文本处理任务的属性值为文本大小。
在一具体实施例中,可以将复杂计算任务划分为多个独立计算任务,将所述多个独立计算任务作为所述待处理任务。例如,所述方法用于进行音频修正的任务分配,将长音频音频 修正任务划分为多个短音频音频修正任务作为所述待处理任务。
102,根据所述多个待处理任务的属性值对所述多个待处理任务进行排序。
例如,所述多个待处理任务包括50个音频修正任务,根据所述50个音频修正任务的计算量对所述50个音频修正任务进行排序。
可以根据所述多个待处理任务的属性值对所述多个待处理任务进行升序排序或降序排序。例如,根据所述50个音频修正任务的计算量对所述50个音频修正任务进行降序排序,得到计算量从大到小排列的所述50个音频修正任务。又如,根据所述50个音频修正任务的计算量对所述50个音频修正任务进行升序排序,得到计算量从小到大排列的所述50个音频修正任务。
103,将所述多个待处理任务按照排序后的顺序分配给所述分布式计算系统中的多个计算设备,得到所述多个计算设备的任务分配表。
在本实施例中,可以判断所述多个待处理任务的数量是否为所述多个计算设备的数量的整数倍,若所述多个待处理任务的数量不是所述多个计算设备的数量的整数倍,则从排序后的所述多个待处理任务中选取数量为所述多个计算设备的数量的整数倍的待处理任务进行分配,保证每个计算设备分配得到相同数量的任务。
例如,所述多个计算设备的数量为4,所述多个待处理任务为50个音频修正任务,根据所述50个音频修正任务的计算量对所述50个音频修正任务进行降序排序后,将前48(4*12)个音频修正任务分配给所述4个计算设备。余下的2个音频修正任务可以在下一次任务分配中进行分配。
在将所述多个待处理任务按照排序后的顺序分配给所述多个计算设备时,每次获取与所述多个计算设备相同数量的待处理任务,将获取的与所述多个计算设备相同数量的所述待处理任务依次分配给所述多个计算设备,直到所有的待处理任务分配完毕。
例如,排序后的16个音频修正任务为T1、T2、T3、…、T16,将16个音频修正任务分配给4个计算设备A1、A2、A3、A4:第一次获取4个音频修正任务T1、T2、T3、T4,分别分配给4个计算设备A1、A2、A3、A4,其中音频修正任务T1分配给计算设备A1,音频修正任务T2计算设备A2,音频修正任务T3计算设备A3,音频修正任务T4计算设备A4;第二次获取4个音频修正任务T5、T6、T7、T8,分别分配给4个计算设备A1、A2、A3、A4,其中音频修正任务T5分配给计算设备A1,音频修正任务T6计算设备A2,音频修正任务T7计算设备A3,音频修正任务T8计算设备A4;第三次获取4个音频修正任务T9、T10、T11、T12,分别分配给4个计算设备A1、A2、A3、A4,其中音频修正任务T9分配给计算设备A1,音频修正任务T10计算设备A2,音频修正任务T11计算设备A3,音频修正任务T12计算设 备A4;第四次获取4个音频修正任务T13、T14、T15、T16,分别分配给4个计算设备A1、A2、A3、A4,其中音频修正任务T13分配给计算设备A1,音频修正任务T14计算设备A2,音频修正任务T15计算设备A3,音频修正任务T16计算设备A4。得到的任务分配表如表1所示:
| A1 | A2 | A3 | A4 | |
| 1 | T1 | T2 | T3 | T4 |
| 2 | T5 | T6 | T7 | T8 |
| 3 | T9 | T10 | T11 | T12 |
| 4 | T13 | T14 | T15 | T16 |
表1
上表中第一列表示计算设备的已分配任务的序号。例如,第一列中的“1”表示计算设备的第1个已分配任务,第一列中的“2”表示计算设备的第2个已分配任务.
可以在任务分配表用属性值表示已分配任务。例如,降序排序后的16个音频修正任务的计算量分别为597、585、513、435、424、363、340、339、323、281、269、240、190、71、32、25,得到的任务分配表如表2所示:
| A1 | A2 | A3 | A4 | |
| 1 | 597 | 585 | 513 | 435 |
| 2 | 424 | 363 | 340 | 339 |
| 3 | 323 | 281 | 269 | 240 |
| 4 | 190 | 71 | 32 | 25 |
表2
104,根据所述任务分配表计算每个计算设备的已分配任务的属性值之和,计算最大的属性值之和与最小的属性值之和的第一差值M
(n),n为循环变量,初始值为1。
例如,参阅表2所示,计算设备A1的已分配任务的属性值之和为597+424+323+190=1534,计算设备A2的已分配任务的属性值之和为585+363+281+71=1300,计算设备A3的已分配任务的属性值之和为513+340+269+32=1154,计算设备A4的已分配任务的属性值之和为435+339+240+25=1039,最大的属性值之和(计算设备A1的已分配任务的属性值之和)与最小的属性值之和(计算设备A4的已分配任务的属性值之和)的第一差值M
(1)=1534-1039=495。
105,将具有所述最大的属性值之和的计算设备作为第一计算设备,将具有所述最小的属性值之和的计算设备作为第二计算设备,计算所述第一计算设备的每个已分配任务的属性值 与所述第二计算设备的每个已分配任务的属性值的第二差值
是所述第一计算设备的第i个已分配任务的属性值与所述第二计算设备的第j个已分配任务的属性值的第二差值。
例如,参阅表2所示,将具有所述最大的属性值之和的计算设备A1作为第一计算设备,将具有所述最小的属性值之和的计算设备A4作为第二计算设备,计算第一计算设备A1的每个已分配任务的属性值(即597、424、323、190)与第二计算设备A4的每个已分配任务的属性值(即435、339、240、25)的第二差值。
表示第一计算设备的第i个已分配任务的属性值与第二计算设备的第j个已分配任务的属性值的第二差值。例如,表2所示第一计算设备A1的每个已分配任务的属性值与第二计算设备A4的每个已分配任务的属性值的第二差值为:
将所述第一计算设备的第a个已分配任务作为所述第一计算设备的第一待交换任务,将所述第二计算设备的第b个已分配任务作为所述第二计算设备的第二待交换任务。
例如,表2所示的例子中,
中大于0的最小值为
(即127),因此,确定第一计算设备A1的第2个已分配任务(即属性值为424的已分配任务)为第一计算设备A1的第一待交换任务,第二计算设备A4的第3个已分配任务(即属性值为240的已分配任务)为第二计算设备A4的第二待交换任务。
107,在所述任务分配表中交换所述第一待交换任务与所述第二待交换任务。
交换所述第一待交换任务与所述第二待交换任务就是将所述第一待交换任务从分配给所述第一计算设备更改为分配给所述第二计算设备,将所述第二待交换任务从分配给所述第二计算设备更改为分配给所述第一计算设备。
例如,交换第一计算设备A1的第2个已分配任务(即属性值为424的已分配任务)和第二计算设备A4的第3个已分配任务(即属性值为240的已分配任务),得到表3所示的任务分配表:
| A1 | A2 | A3 | A4 | |
| 1 | 597 | 585 | 513 | 435 |
| 2 | 240 | 363 | 340 | 339 |
| 3 | 323 | 281 | 269 | 424 |
| 4 | 190 | 71 | 32 | 25 |
表3
通过交换所述第一待交换任务与所述第二待交换任务,可以在具有最小的属性值之和的计算设备和具有最大的属性值之和的计算设备之间进行调整,使得任务分配更快达到均衡。
108,判断所述第一差值M
(n)是否满足预设条件,若所述第一差值M
(n)不满足预设条件,则n=n+1,返回104。
在本实施例中,所述第一差值M
(n)满足预设条件为:
n≥2且M
(n)>M
(n-1)。
在另一实施例中,所述第一差值M
(n)满足预设条件为:M
(n)小于或等于预设阈值(例如10)。
109,若所述第一差值M
(n)满足预设条件,则将取得第一差值M
(n-1)的任务分配表作为最终的分配结果。
例如,根据初始的任务分配表得到的第一差值M
(1)为495,根据第一次更新后的任务分配表得到的第一差值M
(2)为196,根据第二次更新后的任务分配表得到的第一差值M
(3)为77,根据第三次更新后的任务分配表得到的第一差值M
(4)为19,根据第四次更新后的任务分配表得到的第一差值M
(5)为99,则第一差值M
(5)满足预设条件,将取得第一差值M
(4)的任务分配表作为最终的分配结果。
通过重复执行104-108,可以将分配给所述多个计算设备的已分配任务进行再分配,以达到任务均衡分配的目的。
110,根据所述任务分配表将所述待处理任务下发给所述多个计算设备,使得所述多个计 算设备对分配的待处理任务进行处理。
例如,根据所述任务分配表将48个音频修正任务分配给4个计算设备,使得4个多个计算设备对分配的音频修正任务进行处理。在本实施例中,可以控制所述多个计算设备对分配的音频修正任务进行并行处理。
实施例一的分布式计算系统任务分配方法将待处理任务均衡分配给分布式计算系统中的多个计算设备,使得分布式计算系统的资源的利用率最大化,同时减少处理任务的开销时间。
在另一实施例中,所述方法还包括:
接收所述多个计算设备对所述分配的待处理任务的处理结果;
将所述多个计算设备对所述分配的待处理任务的处理结果合成为整体处理结果。
例如,接收4个计算设备对分配的音频修正任务的音频修正结果,将4个计算设备的音频修正结果按照各个音频修正任务对应的时间组合为整体音频修正结果。
在另一实施例中,所述方法还包括:
采集所述多个计算设备的任务负载情况;
根据所述多个计算设备的任务负载情况判断所述多个计算设备当前的任务负载是否均衡;
若所述多个计算设备当前的任务负载均衡,则执行所述根据所述任务分配表将所述待处理任务下发给所述多个计算设备。
实施例二
图2是本申请实施例二提供的分布式计算系统任务分配装置的结构图。所述分布式计算系统任务分配装置20应用于计算机装置,用于将待处理任务均衡分配给分布式计算系统中的多个计算设备。
如图2所示,所述装置20包括获取模块201、排序模块202、分配模块203、第一计算模块204、第二计算模块205、第一确定模块206、交换模块207、判断模块208、第二确定模块209、下发模块210。
获取模块201,用于获取分布式计算系统的多个待处理任务。
所述待处理任务可以是各种类型的任务,例如音频处理任务、图像处理任务、文本处理任务等。
每个待处理任务具有一个属性值,用于衡量任务分配是否均衡。
在本实施例中,所述属性值可以是待处理任务的计算量。例如,所述方法用于进行音频修正的任务分配,所述待处理任务为音频修正任务,所述音频修正任务的属性值为音频修正计算量,所述音频修正计算量可以包括语音特征提取计算量、语音识别计算量、模板匹配计算量、变声计算量。
在另一实施例中,所述属性值可以是待处理任务的数据量。例如,所述方法用于进行文本处理的任务分配,所述待处理任务为文本处理任务,所述文本处理任务的属性值为文本大小。
在一具体实施例中,可以将复杂计算任务划分为多个独立计算任务,将所述多个独立计算任务作为所述待处理任务。例如,所述方法用于进行音频修正的任务分配,将长音频音频修正任务划分为多个短音频音频修正任务作为所述待处理任务。
排序模块202,用于根据所述多个待处理任务的属性值对所述多个待处理任务进行排序。
例如,所述多个待处理任务包括50个音频修正任务,根据所述50个音频修正任务的计算量对所述50个音频修正任务进行排序。
可以根据所述多个待处理任务的属性值对所述多个待处理任务进行升序排序或降序排序。例如,根据所述50个音频修正任务的计算量对所述50个音频修正任务进行降序排序,得到计算量从大到小排列的所述50个音频修正任务。又如,根据所述50个音频修正任务的计算量对所述50个音频修正任务进行升序排序,得到计算量从小到大排列的所述50个音频修正任务。
分配模块203,用于将所述多个待处理任务按照排序后的顺序分配给所述分布式计算系统的多个计算设备,得到所述多个计算设备的任务分配表。
在本实施例中,可以判断所述多个待处理任务的数量是否为所述多个计算设备的数量的整数倍,若所述多个待处理任务的数量不是所述多个计算设备的数量的整数倍,则从排序后的所述多个待处理任务中选取数量为所述多个计算设备的数量的整数倍的待处理任务进行分配,保证每个计算设备分配得到相同数量的任务。
例如,所述多个计算设备的数量为4,所述多个待处理任务为50个音频修正任务,根据所述50个音频修正任务的计算量对所述50个音频修正任务进行降序排序后,将前48(4*12)个音频修正任务分配给所述4个计算设备。余下的2个音频修正任务可以在下一次任务分配中进行分配。
在将所述多个待处理任务按照排序后的顺序分配给所述多个计算设备时,每次获取与所述多个计算设备相同数量的待处理任务,将获取的与所述多个计算设备相同数量的所述待处理任务依次分配给所述多个计算设备,直到所有的待处理任务分配完毕。
例如,排序后的16个音频修正任务为T1、T2、T3、…、T16,将16个音频修正任务分配给4个计算设备A1、A2、A3、A4:第一次获取4个音频修正任务T1、T2、T3、T4,分别分配给4个计算设备A1、A2、A3、A4,其中音频修正任务T1分配给计算设备A1,音频修正任务T2计算设备A2,音频修正任务T3计算设备A3,音频修正任务T4计算设备A4;第 二次获取4个音频修正任务T5、T6、T7、T8,分别分配给4个计算设备A1、A2、A3、A4,其中音频修正任务T5分配给计算设备A1,音频修正任务T6计算设备A2,音频修正任务T7计算设备A3,音频修正任务T8计算设备A4;第三次获取4个音频修正任务T9、T10、T11、T12,分别分配给4个计算设备A1、A2、A3、A4,其中音频修正任务T9分配给计算设备A1,音频修正任务T10计算设备A2,音频修正任务T11计算设备A3,音频修正任务T12计算设备A4;第四次获取4个音频修正任务T13、T14、T15、T16,分别分配给4个计算设备A1、A2、A3、A4,其中音频修正任务T13分配给计算设备A1,音频修正任务T14计算设备A2,音频修正任务T15计算设备A3,音频修正任务T16计算设备A4。得到的任务分配表如表1所示:
| A1 | A2 | A3 | A4 | |
| 1 | T1 | T2 | T3 | T4 |
| 2 | T5 | T6 | T7 | T8 |
| 3 | T9 | T10 | T11 | T12 |
| 4 | T13 | T14 | T15 | T16 |
表1
上表中第一列表示计算设备的已分配任务的序号。例如,第一列中的“1”表示计算设备的第1个已分配任务,第一列中的“2”表示计算设备的第2个已分配任务。
可以在任务分配表用属性值表示已分配任务。例如,降序排序后的16个音频修正任务的计算量分别为597、585、513、435、424、363、340、339、323、281、269、240、190、71、32、25,得到的任务分配表如表2所示:
| A1 | A2 | A3 | A4 | |
| 1 | 597 | 585 | 513 | 435 |
| 2 | 424 | 363 | 340 | 339 |
| 3 | 323 | 281 | 269 | 240 |
| 4 | 190 | 71 | 32 | 25 |
表2
第一计算模块204,用于根据所述任务分配表计算每个计算设备的已分配任务的属性值之和,计算最大的属性值之和与最小的属性值之和的第一差值M
(n),n为循环变量,初始值为1。
例如,参阅表2所示,计算设备A1的已分配任务的属性值之和为597+424+323+190=1534,计算设备A2的已分配任务的属性值之和为585+363+281+71=1300,计算设备A3的已分配任务的属性值之和为513+340+269+32=1154,计算设备A4的已分配任务的属性值之和为 435+339+240+25=1039,最大的属性值之和(计算设备A1的已分配任务的属性值之和)与最小的属性值之和(计算设备A4的已分配任务的属性值之和)的第一差值M
(1)=1534-1039=495。
第二计算模块205,用于将具有所述最大的属性值之和的计算设备作为第一计算设备,将具有所述最小的属性值之和的计算设备作为第二计算设备,计算所述第一计算设备的每个已分配任务的属性值与所述第二计算设备的每个已分配任务的属性值的第二差值
是所述第一计算设备的第i个已分配任务的属性值与所述第二计算设备的第j个已分配任务的属性值的第二差值。
例如,参阅表2所示,将具有所述最大的属性值之和的计算设备A1作为第一计算设备,将具有所述最小的属性值之和的计算设备A4作为第二计算设备,计算第一计算设备A1的每个已分配任务的属性值(即597、424、323、190)与第二计算设备A4的每个已分配任务的属性值(即435、339、240、25)的第二差值。
表示第一计算设备的第i个已分配任务的属性值与第二计算设备的第j个已分配任务的属性值的第二差值。例如,表2所示第一计算设备A1的每个已分配任务的属性值与第二计算设备A4的每个已分配任务的属性值的第二差值为:
将所述第一计算设备的第a个已分配任务作为所述第一计算设备的第一待交换任务,将所述第二计算设备的第b个已分配任务作为所述第二计算设备的第二待交换任务。
例如,表2所示的例子中,
中大于0的最小值为
(即127),因此,确定第一计算设备A1的第2个已分配任务(即属性值为424的已分配任务)为第一计算设备A1的第一待交换任务,第二计算设备A4的第3个已分配任务(即属性值为240的已分配任务)为第二计算设备A4的第二待交换任务。
交换模块207,用于在所述任务分配表中交换所述第一待交换任务与所述第二待交换任务。
交换所述第一待交换任务与所述第二待交换任务就是将所述第一待交换任务从分配给所述第一计算设备更改为分配给所述第二计算设备,将所述第二待交换任务从分配给所述第二计算设备更改为分配给所述第一计算设备。
例如,交换第一计算设备A1的第2个已分配任务(即属性值为424的已分配任务)和第二计算设备A4的第3个已分配任务(即属性值为240的已分配任务),得到表3所示的任务分配表:
| A1 | A2 | A3 | A4 | |
| 1 | 597 | 585 | 513 | 435 |
| 2 | 240 | 363 | 340 | 339 |
| 3 | 323 | 281 | 269 | 424 |
| 4 | 190 | 71 | 32 | 25 |
表3
通过交换所述第一待交换任务与所述第二待交换任务,可以在具有最小的属性值之和的计算设备和具有最大的属性值之和的计算设备之间进行调整,使得任务分配更快达到均衡。
判断模块208,用于判断所述第一差值M
(n)是否满足预设条件,若所述第一差值M
(n)不满足预设条件,则n=n+1。
在循环次数n递增后,第一计算模块204、第二计算模块205、第一确定模块206、交换模块207、判断模块208,从而实现将分配给所述多个计算设备的已分配任务进行再分配,以达到任务均衡分配的目的。例如,第一计算模式204重新根据所述任务分配表计算每个计算设备的已分配任务的属性值之和,计算最大的属性值之和与最小的属性值之和的第一差值M
(n)。
在本实施例中,所述第一差值M
(n)满足预设条件为:
n≥2且M
(n)>M
(n-1)。
在另一实施例中,所述第一差值M
(n)满足预设条件为:M
(n)小于或等于预设阈值(例如 10)。
第二确定模块209,用于若所述第一差值M
(n)满足预设条件,则将取得第一差值M
(n-1)的任务分配表作为最终的分配结果。
例如,根据初始的任务分配表得到的第一差值M
(1)为495,根据第一次更新后的任务分配表得到的第一差值M
(2)为196,根据第二次更新后的任务分配表得到的第一差值M
(3)为77,根据第三次更新后的任务分配表得到的第一差值M
(4)为19,根据第四次更新后的任务分配表得到的第一差值M
(5)为99,则第一差值M
(5)满足预设条件,将取得第一差值M
(4)的任务分配表作为最终的分配结果。
下发模块210,用于根据所述任务分配表将所述待处理任务下发给所述多个计算设备,使得所述多个计算设备对分配的待处理任务进行处理。
例如,根据所述任务分配表将48个音频修正任务分配给4个计算设备,使得4个多个计算设备对分配的音频修正任务进行处理。在本实施例中,可以控制所述多个计算设备对分配的音频修正任务进行并行处理。
实施例二的分布式计算系统任务分配装置20所述任务将待处理任务均衡分配给分布式计算系统中的多个计算设备,使得分布式计算系统的资源的利用率最大化,同时减少处理任务的开销时间。
在另一实施例中,所述分布式计算系统任务分配装置20还可以包括:合成模块,用于接收所述多个计算设备对所述分配的待处理任务的处理结果,将所述多个计算设备对所述分配的待处理任务的处理结果合成为整体处理结果。
例如,接收4个计算设备对分配的音频修正任务的音频修正结果,将4个计算设备的音频修正结果按照各个音频修正任务对应的时间组合为整体音频修正结果。
在另一实施例中,所述分布式计算系统任务分配装置20还可以包括:采集模块,用于采集所述多个计算设备的任务负载情况,根据所述多个计算设备的任务负载情况判断所述多个计算设备当前的任务负载是否均衡。若所述多个计算设备当前的任务负载均衡,则下发模块210根据所述任务分配表将所述待处理任务下发给所述多个计算设备。
实施例三
本实施例提供一种非易失性可读存储介质,该非易失性可读存储介质上存储有计算机可读指令,该计算机可读指令被处理器执行时实现上述分布式计算系统任务分配方法实施例中的步骤,例如图1所示的步骤101-110:
101,获取分布式计算系统的多个待处理任务;
102,根据所述多个待处理任务的属性值对所述多个待处理任务进行排序;
103,将所述多个待处理任务按照排序后的顺序分配给所述分布式计算系统的多个计算设备,得到所述多个计算设备的任务分配表;
104,根据所述任务分配表计算每个计算设备的已分配任务的属性值之和,计算最大的属性值之和与最小的属性值之和的第一差值M
(n),其中n为循环变量,初始值为1;
105,将具有所述最大的属性值之和的计算设备作为第一计算设备,将具有所述最小的属性值之和的计算设备作为第二计算设备,计算所述第一计算设备的每个已分配任务的属性值与所述第二计算设备的每个已分配任务的属性值的第二差值
是所述第一计算设备的第i个已分配任务的属性值与所述第二计算设备的第j个已分配任务的属性值的第二差值;
107,在所述任务分配表中交换所述第一待交换任务与所述第二待交换任务;
108,判断所述第一差值M
(n)是否满足预设条件,若所述第一差值M
(n)不满足预设条件,则n=n+1,返回104;
109,若所述第一差值M
(n)满足预设条件,则将取得第一差值M
(n-1)的任务分配表作为最终的分配结果;
110,根据所述任务分配表将所述待处理任务下发给所述多个计算设备,使得所述多个计算设备对分配的待处理任务进行处理。
或者,该计算机可读指令被处理器执行时实现上述装置实施例中各模块的功能,例如图2中的模块201-210:
获取模块201,用于获取分布式计算系统的多个待处理任务;
排序模块202,用于根据所述多个待处理任务的属性值对所述多个待处理任务进行排序;
分配模块203,用于将所述多个待处理任务按照排序后的顺序分配给所述分布式计算系统的多个计算设备,得到所述多个计算设备的任务分配表;
第一计算模块204,用于根据所述任务分配表计算每个计算设备的已分配任务的属性值之和,计算最大的属性值之和与最小的属性值之和的第一差值M
(n),n为循环变量,初始值为1;
第二计算模块205,用于将具有所述最大的属性值之和的计算设备作为第一计算设备,将具有所述最小的属性值之和的计算设备作为第二计算设备,计算所述第一计算设备的每个已分配任务的属性值与所述第二计算设备的每个已分配任务的属性值的第二差值
是所述第一计算设备的第i个已分配任务的属性值与所述第二计算设备的第j个已分配任务 的属性值的第二差值;
交换模块207,用于在所述任务分配表中交换所述第一待交换任务与所述第二待交换任务;
判断模块208,用于判断所述第一差值M
(n)是否满足预设条件,若所述第一差值M
(n)不满足预设条件,则n=n+1;
第二确定模块209,用于若所述第一差值M
(n)满足预设条件,则将取得第一差值M
(n-1)的任务分配表作为最终的分配结果;
下发模块210,用于根据所述任务分配表将所述待处理任务下发给所述多个计算设备,使得所述多个计算设备对分配的待处理任务进行处理。
实施例四
图3为本申请实施例四提供的计算机装置的示意图。所述计算机装置30包括存储器301、处理器302以及存储在所述存储器301中并可在所述处理器302上运行的计算机可读指令303,例如分布式计算系统任务分配程序。所述处理器302执行所述计算机可读指令303时实现上述分布式计算系统任务分配方法实施例中的步骤,例如图1所示的步骤101-110。或者,该计算机可读指令被处理器执行时实现上述装置实施例中各模块的功能,例如图2中的模块201-210。
示例性的,所述计算机可读指令303可以被分割成一个或多个模块,所述一个或者多个模块被存储在所述存储器301中,并由所述处理器302执行,以完成本方法。例如,所述计算机可读指令303可以被分割成图2中的获取模块201、排序模块202、分配模块203、第一计算模块204、第二计算模块205、第一确定模块206、交换模块207、判断模块208、第二确定模块209、下发模块210,各模块具体功能参见实施例二。
所述计算机装置30可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。本领域技术人员可以理解,所述示意图3仅仅是计算机装置30的示例,并不构成对计算机装置30的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述计算机装置30还可以包括输入输出设备、网络接入设备、总线等。
所称处理器302可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他 可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器302也可以是任何常规的处理器等,所述处理器302是所述计算机装置30的控制中心,利用各种接口和线路连接整个计算机装置30的各个部分。
所述存储器301可用于存储所述计算机可读指令303,所述处理器302通过运行或执行存储在所述存储器301内的计算机可读指令或模块,以及调用存储在存储器301内的数据,实现所述计算机装置30的各种功能。所述存储器301可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据计算机装置30的使用所创建的数据(比如音频数据)等。此外,存储器301可以包括非易失性存储器,例如硬盘、内存、插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)、至少一个磁盘存储器件、闪存器件或其他非易失性固态存储器件。
所述计算机装置30集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个非易失性可读存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性可读存储介质中,该计算机可读指令在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机可读指令可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述非易失性可读存储介质可以包括:能够携带所述计算机可读指令的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、只读存储器(ROM,Read-Only Memory)。
最后应说明的是,以上实施例仅用以说明本申请的技术方案而非限制,尽管参照较佳实施例对本申请进行了详细说明,本领域的普通技术人员应当理解,可以对本申请的技术方案进行修改或等同替换,而不脱离本申请技术方案的精神和范围。
Claims (20)
- 一种分布式计算系统任务分配方法,其特征在于,所述方法包括:获取分布式计算系统的多个待处理任务;根据所述多个待处理任务的属性值对所述多个待处理任务进行排序;将所述多个待处理任务按照排序后的顺序分配给所述分布式计算系统的多个计算设备,得到所述多个计算设备的任务分配表;根据所述任务分配表计算每个计算设备的已分配任务的属性值之和,计算最大的属性值之和与最小的属性值之和的第一差值M (n),其中n为循环变量,初始值为1;将具有所述最大的属性值之和的计算设备作为第一计算设备,将具有所述最小的属性值之和的计算设备作为第二计算设备,计算所述第一计算设备的每个已分配任务的属性值与所述第二计算设备的每个已分配任务的属性值的第二差值 是所述第一计算设备的第i个已分配任务的属性值与所述第二计算设备的第j个已分配任务的属性值的第二差值;在所述任务分配表中交换所述第一待交换任务与所述第二待交换任务;判断所述第一差值M (n)是否满足预设条件,若所述第一差值M (n)不满足预设条件,则n=n+1,返回所述根据所述任务分配表计算每个计算设备的已分配任务的属性值之和,计算最大的属性值之和与最小的属性值之和的第一差值M (n)的步骤;若所述第一差值M (n)满足预设条件,则将取得第一差值M (n-1)的任务分配表作为最终的分配结果;根据所述任务分配表将所述待处理任务下发给所述多个计算设备,使得所述多个计算设备对分配的待处理任务进行处理。
- 如权利要求1所述的方法,其特征在于,所述待处理任务为音频修正任务,所述属性值为音频修正计算量,所述音频修正计算量包括语音特征提取计算量、语音识别计算量、模板匹配计算量、变声计算量。
- 如权利要求1所述的方法,其特征在于,在所述将所述多个待处理任务按照排序后的顺序分配给所述分布式计算系统中的多个计算设备之前,所述方法还包括:判断所述多个待处理任务的数量是否为所述多个计算设备的数量的整数倍;若所述多个待处理任务的数量不是所述多个计算设备的数量的整数倍,则从排序后的所述多个待处理任务中选取数量为所述多个计算设备的数量的整数倍的待处理任务进行分配。
- 如权利要求1所述的方法,其特征在于,所述第一差值M (n)满足预设条件包括:n≥2且M (n)>M (n-1);或者M (n)小于或等于预设阈值。
- 如权利要求1-5中任一项所述的方法,其特征在于,所述方法还包括:采集所述多个计算设备的任务负载情况;根据所述多个计算设备的任务负载情况判断所述多个计算设备当前的任务负载是否均衡;若所述多个计算设备当前的任务负载均衡,则执行所述根据所述任务分配表将所述待处理任务下发给所述多个计算设备。
- 如权利要求1-5中任一项所述的方法,其特征在于,所述方法还包括:接收所述多个计算设备对所述分配的待处理任务的处理结果;将所述多个计算设备对所述分配的待处理任务的处理结果合成为整体处理结果。
- 一种分布式计算系统任务分配装置,其特征在于,所述装置包括:获取模块,用于获取分布式计算系统的多个待处理任务;排序模块,用于根据所述多个待处理任务的属性值对所述多个待处理任务进行排序;分配模块,用于将所述多个待处理任务按照排序后的顺序分配给所述分布式计算系统的多个计算设备,得到所述多个计算设备的任务分配表;第一计算模块,用于根据所述任务分配表计算每个计算设备的已分配任务的属性值之和,计算最大的属性值之和与最小的属性值之和的第一差值M (n),其中n为循环变量, 初始值为1;第二计算模块,用于将具有所述最大的属性值之和的计算设备作为第一计算设备,将具有所述最小的属性值之和的计算设备作为第二计算设备,计算所述第一计算设备的每个已分配任务的属性值与所述第二计算设备的每个已分配任务的属性值的第二差值 是所述第一计算设备的第i个已分配任务的属性值与所述第二计算设备的第j个已分配任务的属性值的第二差值;交换模块,用于在所述任务分配表中交换所述第一待交换任务与所述第二待交换任务;判断模块,用于判断所述第一差值M (n)是否满足预设条件,若所述第一差值M (n)不满足预设条件,则n=n+1;第二确定模块,用于若所述第一差值M (n)满足预设条件,则将取得第一差值M (n-n)的任务分配表作为最终的分配结果;下发模块,用于根据所述任务分配表将所述待处理任务下发给所述多个计算设备,使得所述多个计算设备对分配的待处理任务进行处理。
- 一种计算机装置,其特征在于,所述计算机装置包括处理器和存储器,所述处理器用于执行所述存储器中存储的计算机可读指令以实现以下步骤:获取分布式计算系统的多个待处理任务;根据所述多个待处理任务的属性值对所述多个待处理任务进行排序;将所述多个待处理任务按照排序后的顺序分配给所述分布式计算系统的多个计算设备,得到所述多个计算设备的任务分配表;根据所述任务分配表计算每个计算设备的已分配任务的属性值之和,计算最大的属性值之和与最小的属性值之和的第一差值M (n),其中n为循环变量,初始值为1;将具有所述最大的属性值之和的计算设备作为第一计算设备,将具有所述最小的属性值之和的计算设备作为第二计算设备,计算所述第一计算设备的每个已分配任务的属性值与所述第二计算设备的每个已分配任务的属性值的第二差值 是所述第一计算设备的第i个已分配任务的属性值与所述第二计算设备的第j个已分配任务的属性值的第二差值;在所述任务分配表中交换所述第一待交换任务与所述第二待交换任务;判断所述第一差值M (n)是否满足预设条件,若所述第一差值M (n)不满足预设条件,则n=n+1,返回所述根据所述任务分配表计算每个计算设备的已分配任务的属性值之和,计算最大的属性值之和与最小的属性值之和的第一差值M (n)的步骤;若所述第一差值M (n)满足预设条件,则将取得第一差值M (n-1)的任务分配表作为最终的分配结果;根据所述任务分配表将所述待处理任务下发给所述多个计算设备,使得所述多个计算设备对分配的待处理任务进行处理。
- 如权利要求9所述的计算机装置,其特征在于,在所述将所述多个待处理任务按照排序后的顺序分配给所述分布式计算系统中的多个计算设备之前,所述处理器执行所述计算机可读指令还用以实现以下步骤:判断所述多个待处理任务的数量是否为所述多个计算设备的数量的整数倍;若所述多个待处理任务的数量不是所述多个计算设备的数量的整数倍,则从排序后的所述多个待处理任务中选取数量为所述多个计算设备的数量的整数倍的待处理任务进行分配。
- 如权利要求9所述的计算机装置,其特征在于,所述第一差值M (n)满足预设条件包括:n≥2且M (n)>M (n-1);或者M (n)小于或等于预设阈值。
- 如权利要求9-12中任一项所述的计算机装置,其特征在于,所述处理器执行所述存储器中存储的计算机可读指令时还实现以下步骤:采集所述多个计算设备的任务负载情况,根据所述多个计算设备的任务负载情况判断所述多个计算设备当前的任务负载是否均衡;若所述多个计算设备当前的任务负载均衡,则根据所述任务分配表将所述待处理任务下发给所述多个计算设备。
- 如权利要求9-12中任一项所述的计算机装置,其特征在于,所述处理器执行所述存储器中存储的计算机可读指令时还实现以下步骤:接收所述多个计算设备对所述分配的待处理任务的处理结果;将所述多个计算设备对所述分配的待处理任务的处理结果合成为整体处理结果。
- 一种非易失性可读存储介质,所述非易失性可读存储介质上存储有计算机可读指令,其特征在于,所述计算机可读指令被处理器执行时实现以下步骤:获取分布式计算系统的多个待处理任务;根据所述多个待处理任务的属性值对所述多个待处理任务进行排序;将所述多个待处理任务按照排序后的顺序分配给所述分布式计算系统的多个计算设备,得到所述多个计算设备的任务分配表;根据所述任务分配表计算每个计算设备的已分配任务的属性值之和,计算最大的属性值之和与最小的属性值之和的第一差值M (n),其中n为循环变量,初始值为1;将具有所述最大的属性值之和的计算设备作为第一计算设备,将具有所述最小的属性值之和的计算设备作为第二计算设备,计算所述第一计算设备的每个已分配任务的属性值与所述第二计算设备的每个已分配任务的属性值的第二差值 是所述第一计算设备的第i个已分配任务的属性值与所述第二计算设备的第j个已分配任务的属性值的第二差值;在所述任务分配表中交换所述第一待交换任务与所述第二待交换任务;判断所述第一差值M (n)是否满足预设条件,若所述第一差值M (n)不满足预设条件,则n=n+1,返回所述根据所述任务分配表计算每个计算设备的已分配任务的属性值之和,计算最大的属性值之和与最小的属性值之和的第一差值M (n)的步骤;若所述第一差值M (n)满足预设条件,则将取得第一差值M (n-1)的任务分配表作为最终的分配结果;根据所述任务分配表将所述待处理任务下发给所述多个计算设备,使得所述多个计 算设备对分配的待处理任务进行处理。
- 如权利要求15所述的存储介质,其特征在于,在所述将所述多个待处理任务按照排序后的顺序分配给所述分布式计算系统中的多个计算设备之前,所述计算机可读指令被所述处理器执行还用以实现以下步骤:判断所述多个待处理任务的数量是否为所述多个计算设备的数量的整数倍;若所述多个待处理任务的数量不是所述多个计算设备的数量的整数倍,则从排序后的所述多个待处理任务中选取数量为所述多个计算设备的数量的整数倍的待处理任务进行分配。
- 如权利要求15所述的存储介质,其特征在于,所述第一差值M (n)满足预设条件包括:n≥2且M (n)>M (n-1);或者M (n)小于或等于预设阈值。
- 如权利要求15-18中任一项所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还实现以下步骤:采集所述多个计算设备的任务负载情况,根据所述多个计算设备的任务负载情况判断所述多个计算设备当前的任务负载是否均衡;若所述多个计算设备当前的任务负载均衡,则根据所述任务分配表将所述待处理任务下发给所述多个计算设备。
- 如权利要求15-18中任一项所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还实现以下步骤:接收所述多个计算设备对所述分配的待处理任务的处理结果;将所述多个计算设备对所述分配的待处理任务的处理结果合成为整体处理结果。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910731711.9 | 2019-08-08 | ||
| CN201910731711.9A CN110688204B (zh) | 2019-08-08 | 2019-08-08 | 分布式计算系统任务分配方法及相关设备 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2021022706A1 true WO2021022706A1 (zh) | 2021-02-11 |
Family
ID=69108189
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2019/117418 Ceased WO2021022706A1 (zh) | 2019-08-08 | 2019-11-12 | 分布式计算系统任务分配方法及相关设备 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN110688204B (zh) |
| WO (1) | WO2021022706A1 (zh) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113608851A (zh) * | 2021-08-03 | 2021-11-05 | 北京金山云网络技术有限公司 | 一种任务分配方法、装置、电子设备及存储介质 |
| CN117707770A (zh) * | 2023-12-14 | 2024-03-15 | 南方电网科学研究院有限责任公司 | 一种电力系统电磁暂态仿真并行计算加速方法和相关装置 |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20150215394A1 (en) * | 2012-08-10 | 2015-07-30 | Hitachi, Ltd. | Load distribution method taking into account each node in multi-level hierarchy |
| CN105975334A (zh) * | 2016-04-25 | 2016-09-28 | 深圳市永兴元科技有限公司 | 任务分布式调度方法及系统 |
| US20180060894A1 (en) * | 2016-08-28 | 2018-03-01 | Vmware, Inc. | Methods and systems that generated resource-provision bids in an automated resource-exchange system |
| CN107958349A (zh) * | 2017-12-19 | 2018-04-24 | 金蝶软件(中国)有限公司 | 任务分配方法、装置、计算机设备和存储介质 |
| CN109684080A (zh) * | 2018-12-10 | 2019-04-26 | 平安科技(深圳)有限公司 | 集中式任务调度方法、系统及存储介质 |
| CN109710407A (zh) * | 2018-12-21 | 2019-05-03 | 浪潮电子信息产业股份有限公司 | 分布式系统实时任务调度方法、装置、设备及存储介质 |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH04177457A (ja) * | 1990-11-08 | 1992-06-24 | Nec Corp | 多資源システムスケジューリング方式 |
| US9348651B2 (en) * | 2013-12-05 | 2016-05-24 | International Business Machines Corporation | Constructing a logical tree topology in a parallel computer |
| CN104331321B (zh) * | 2014-10-09 | 2017-04-19 | 冷明 | 基于禁忌搜索和负载均衡的云计算任务调度方法 |
| CN105159762B (zh) * | 2015-08-03 | 2018-09-07 | 冷子阳 | 基于贪心策略的启发式云计算任务调度方法 |
| CN107329815B (zh) * | 2017-06-26 | 2020-08-04 | 浙江工业大学 | 一种基于BP-Tabu搜索的云任务负载均衡调度方法 |
-
2019
- 2019-08-08 CN CN201910731711.9A patent/CN110688204B/zh active Active
- 2019-11-12 WO PCT/CN2019/117418 patent/WO2021022706A1/zh not_active Ceased
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20150215394A1 (en) * | 2012-08-10 | 2015-07-30 | Hitachi, Ltd. | Load distribution method taking into account each node in multi-level hierarchy |
| CN105975334A (zh) * | 2016-04-25 | 2016-09-28 | 深圳市永兴元科技有限公司 | 任务分布式调度方法及系统 |
| US20180060894A1 (en) * | 2016-08-28 | 2018-03-01 | Vmware, Inc. | Methods and systems that generated resource-provision bids in an automated resource-exchange system |
| CN107958349A (zh) * | 2017-12-19 | 2018-04-24 | 金蝶软件(中国)有限公司 | 任务分配方法、装置、计算机设备和存储介质 |
| CN109684080A (zh) * | 2018-12-10 | 2019-04-26 | 平安科技(深圳)有限公司 | 集中式任务调度方法、系统及存储介质 |
| CN109710407A (zh) * | 2018-12-21 | 2019-05-03 | 浪潮电子信息产业股份有限公司 | 分布式系统实时任务调度方法、装置、设备及存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN110688204B (zh) | 2022-08-26 |
| CN110688204A (zh) | 2020-01-14 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8726290B2 (en) | System and/or method for balancing allocation of data among reduce processes by reallocation | |
| CN108549583B (zh) | 大数据处理方法、装置、服务器及可读存储介质 | |
| JP7506096B2 (ja) | 計算資源の動的割り当て | |
| CN112068957B (zh) | 资源分配方法、装置、计算机设备及存储介质 | |
| US10565022B2 (en) | Systems for parallel processing of datasets with dynamic skew compensation | |
| WO2016078008A1 (zh) | 调度数据流任务的方法和装置 | |
| CN112000467A (zh) | 一种数据倾斜处理方法、装置、终端设备及存储介质 | |
| CN110321214A (zh) | 一种数据查询方法、装置及设备 | |
| CN102629219A (zh) | 并行计算框架中的Reduce端自适应负载均衡方法 | |
| CN110333945A (zh) | 一种动态负载均衡方法、系统及终端 | |
| CN107908479A (zh) | 一种节点资源分配方法及装置 | |
| CN110543279B (zh) | 一种数据存储、处理方法、装置及系统 | |
| CN107291720B (zh) | 一种实现批量数据处理的方法、系统和计算机集群 | |
| CN110688993B (zh) | 一种基于Spark作业的计算资源确定方法及装置 | |
| WO2021022706A1 (zh) | 分布式计算系统任务分配方法及相关设备 | |
| US20160125009A1 (en) | Parallelized execution of window operator | |
| CN114064260B (zh) | 数据去倾斜方法、装置、电子设备及存储介质 | |
| CN106934015A (zh) | 地址数据处理方法和装置 | |
| CN110362387B (zh) | 分布式任务的处理方法、装置、系统和存储介质 | |
| CN117314512A (zh) | 资源分配方法和装置、优惠券分配方法和装置 | |
| US20170344607A1 (en) | Apparatus and method for controlling skew in distributed etl job | |
| CN111857991A (zh) | 数据排序的方法、装置和计算机设备 | |
| CN111563250A (zh) | 权限管理方法、装置、计算机设备和存储介质 | |
| CN115344506B (zh) | 内存地址的映射方法、内存访问方法和装置、芯片、设备 | |
| CN110705884A (zh) | 清单处理方法、装置、设备及存储介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19940690 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 19940690 Country of ref document: EP Kind code of ref document: A1 |



