WO2021258988A1 - 分布式计算系统任务分配方法及相关设备 - Google Patents

分布式计算系统任务分配方法及相关设备 Download PDF

Info

Publication number
WO2021258988A1
WO2021258988A1 PCT/CN2021/096643 CN2021096643W WO2021258988A1 WO 2021258988 A1 WO2021258988 A1 WO 2021258988A1 CN 2021096643 W CN2021096643 W CN 2021096643W WO 2021258988 A1 WO2021258988 A1 WO 2021258988A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
computing
task
weight parameter
layer node
Prior art date
Application number
PCT/CN2021/096643
Other languages
English (en)
French (fr)
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 WO2021258988A1 publication Critical patent/WO2021258988A1/zh

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/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks

Definitions

  • This application relates to artificial intelligence, and specifically relates to a distributed computing system task allocation method and related equipment.
  • the first aspect of the present application provides a distributed computing system task allocation method, wherein the method includes:
  • (b) Construct a neural network model, which includes an input layer, a hidden layer, and an output layer.
  • Each input layer node of the input layer and each hidden layer node of the hidden layer correspond to a computing task, so
  • Each output layer node of the output layer corresponds to a computing node, the input layer node and the hidden layer node are connected one-to-one, the hidden layer node and the output layer node are fully connected, the
  • the first weight parameter between the input layer node and the hidden layer node is initialized to 1, the first weight parameter takes a value of 1 or 0, and the first weight parameter is 1 to indicate that the input layer node
  • the corresponding computing task participates in task allocation, and the first weight parameter being 0 means that the computing task corresponding to the input layer node does not participate in task allocation;
  • (c) Determine a second weight parameter between the hidden layer node and the output layer node according to the first weight parameter, the second weight parameter takes a value of 1 or 0, and the second A weight parameter of 1 indicates that the computing task corresponding to the hidden layer node is allocated to the computing node corresponding to the output layer node, and the second weight parameter of 0 indicates that the computing task corresponding to the hidden layer node is not allocated to all nodes.
  • the second weight parameter satisfies the following constraint: the sum of the second weight parameter corresponding to each hidden layer node is 1, and the second weight parameter corresponding to each output layer node The sum is smaller than the product of the sum of the first weight parameter and the weight ratio of the computing node corresponding to the output layer node;
  • a second aspect of the present application provides a computer device, wherein the computer device includes a processor, and the processor is configured to execute computer-readable instructions stored in a memory to implement the following steps:
  • (b) Construct a neural network model, which includes an input layer, a hidden layer, and an output layer.
  • Each input layer node of the input layer and each hidden layer node of the hidden layer correspond to a computing task, so
  • Each output layer node of the output layer corresponds to a computing node, the input layer node and the hidden layer node are connected one-to-one, the hidden layer node and the output layer node are fully connected, the
  • the first weight parameter between the input layer node and the hidden layer node is initialized to 1, the first weight parameter takes a value of 1 or 0, and the first weight parameter is 1 to indicate that the input layer node
  • the corresponding computing task participates in task allocation, and the first weight parameter being 0 means that the computing task corresponding to the input layer node does not participate in task allocation;
  • (c) Determine a second weight parameter between the hidden layer node and the output layer node according to the first weight parameter, the second weight parameter takes a value of 1 or 0, and the second A weight parameter of 1 indicates that the computing task corresponding to the hidden layer node is allocated to the computing node corresponding to the output layer node, and the second weight parameter of 0 indicates that the computing task corresponding to the hidden layer node is not allocated to all nodes.
  • the second weight parameter satisfies the following constraint: the sum of the second weight parameter corresponding to each hidden layer node is 1, and the second weight parameter corresponding to each output layer node The sum is smaller than the product of the sum of the first weight parameter and the weight ratio of the computing node corresponding to the output layer node;
  • a third aspect of the present application provides a storage medium with computer-readable instructions stored on the storage medium, where the computer-readable instructions implement the following steps when executed by a processor:
  • (b) Construct a neural network model, which includes an input layer, a hidden layer, and an output layer.
  • Each input layer node of the input layer and each hidden layer node of the hidden layer correspond to a computing task, so
  • Each output layer node of the output layer corresponds to a computing node, the input layer node and the hidden layer node are connected one-to-one, the hidden layer node and the output layer node are fully connected, the
  • the first weight parameter between the input layer node and the hidden layer node is initialized to 1, the first weight parameter takes a value of 1 or 0, and the first weight parameter is 1 to indicate that the input layer node
  • the corresponding computing task participates in task allocation, and the first weight parameter being 0 means that the computing task corresponding to the input layer node does not participate in task allocation;
  • (c) Determine a second weight parameter between the hidden layer node and the output layer node according to the first weight parameter, the second weight parameter takes a value of 1 or 0, and the second A weight parameter of 1 indicates that the computing task corresponding to the hidden layer node is allocated to the computing node corresponding to the output layer node, and the second weight parameter of 0 indicates that the computing task corresponding to the hidden layer node is not allocated to all nodes.
  • the second weight parameter satisfies the following constraint: the sum of the second weight parameter corresponding to each hidden layer node is 1, and the second weight parameter corresponding to each output layer node The sum is smaller than the product of the sum of the first weight parameter and the weight ratio of the computing node corresponding to the output layer node;
  • a fourth aspect of the present application provides a distributed computing system task allocation device, the device includes:
  • the first calculation module is configured to determine the weight of each computing node according to the performance influencing factors of each computing node in the distributed computing system, and calculate the weight proportion of each computing node according to the weight of each computing node;
  • the building module is used to build a neural network model
  • the neural network model includes an input layer, a hidden layer, and an output layer.
  • Each input layer node of the input layer and each hidden layer node of the hidden layer corresponds to a computing task
  • Each output layer node of the output layer corresponds to a computing node
  • the input layer node and the hidden layer node are connected one-to-one
  • the hidden layer node and the output layer node are fully connected
  • the first weight parameter between the input layer node and the hidden layer node is initialized to 1, the first weight parameter takes a value of 1 or 0, and the first weight parameter is 1 to indicate that the input
  • the computing task corresponding to the layer node participates in task allocation, and the first weight parameter being 0 means that the computing task corresponding to the input layer node does not participate in task allocation;
  • the determining module is configured to determine a second weight parameter between the hidden layer node and the output layer node according to the first weight parameter, and the second weight parameter takes a value of 1 or 0, and the A second weight parameter of 1 indicates that the computing task corresponding to the hidden layer node is allocated to the computing node corresponding to the output layer node, and the second weight parameter of 0 indicates that the computing task corresponding to the hidden layer node is not allocated
  • the second weight parameter satisfies the following constraint: the sum of the second weight parameter corresponding to each hidden layer node is 1, and the second weight parameter corresponding to each output layer node The sum of the value parameters is less than the product of the sum of the first weight parameters and the weight ratio of the computing node corresponding to the output layer node;
  • the second calculation module is configured to calculate the task allocation error of each computing node according to the second weight parameter
  • the judgment module is used to judge whether the task allocation error satisfies the convergence condition
  • An adjustment module configured to adjust the second weight parameter according to the task allocation error if the task allocation error does not meet the convergence condition
  • the modification module is used to modify the first weight parameter.
  • This application uses a neural network model for task allocation.
  • the neural network model filters out the content that affects the allocation result (that is, no allocation), so that the task allocation is more balanced, and the calculation tasks are evenly allocated to the various calculations in the distributed computing system. node.
  • 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) , Programmable Gate Array (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.
  • the computer device may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server.
  • the computer device can interact with the user through a keyboard, a mouse, a remote control, a touch panel, or a voice control device.
  • FIG. 1 is a flowchart of a method for assigning tasks in a distributed computing system according to Embodiment 1 of the present application.
  • the distributed computing system task allocation method is applied to computer equipment.
  • the distributed computing system task distribution method balances the distribution of computing tasks to each computing node in the distributed computing system.
  • the distributed computing system task allocation method includes:
  • the performance influencing factors of a computing node refer to factors that have an impact on the computing performance of a computing node. The stronger the computing performance of a computing node, the greater the weight of the computing node.
  • the performance influencing factors of a computing node may include the memory size, memory access speed, number of CPUs, main frequency, hard disk size, response time, throughput rate, etc. of the computing node.
  • a weight value range for each performance influencing factor such as 1-10
  • the neural network model includes an input layer, a hidden layer, and an output layer.
  • Each input layer node of the input layer and each hidden layer node of the hidden layer correspond to a computing task.
  • Each output layer node of the output layer corresponds to a computing node, the input layer node and the hidden layer node are connected one-to-one, the hidden layer node and the output layer node are fully connected, and the input layer node is fully connected to the output layer node.
  • the first weight parameter between the layer node and the hidden layer node is initialized to 1, the first weight parameter takes a value of 1 or 0, and the first weight parameter is 1 to indicate that the input layer node corresponds to The computing task of is involved in task allocation, and the first weight parameter being 0 indicates that the computing task corresponding to the input layer node does not participate in task allocation.
  • the neural network model includes three layers: an input layer, a hidden layer, and an output layer, and each layer includes multiple nodes.
  • Each input layer node and each hidden layer node represents a computing task.
  • Each output layer node represents a computing node.
  • n input layer nodes there are m input layer nodes and m hidden layer nodes, which means that there are m computing tasks.
  • n output layer nodes which means that computing tasks are allocated to n computing nodes.
  • the first weight parameter between the input layer node and the hidden layer node takes the value 0 or 1. 0 means that the computing node corresponding to the input layer node does not participate in task distribution, and 1 means The computing node corresponding to the input layer node participates in task allocation.
  • the input layer nodes and the hidden layer nodes are arranged according to the task amount of the corresponding computing task.
  • the first input layer node/hidden layer node represents the computing task with the largest amount of tasks
  • the second input The layer node/hidden layer node represents the computing task with the second largest amount of tasks,..., and so on.
  • the input layer nodes and the hidden layer nodes are arranged according to the task amount of the corresponding computing task from small to large, the first input layer node/hidden layer node represents the computing task with the smallest task amount, and the second input The layer node/hidden layer node represents the second-smallest computing task,..., and so on.
  • the task amount represents the workload of the computing task.
  • the computing tasks to be allocated can be sorted in ascending or descending order according to the size of the tasks.
  • the task amount may be the calculation amount of the calculation task, and the calculation tasks to be allocated are sorted according to the amount of calculation, for example, the calculation tasks to be allocated are sorted in descending order according to the amount of calculation.
  • the method is used to allocate audio correction tasks
  • the calculation task is an audio correction task
  • the task amount of the audio correction task is an audio correction calculation amount
  • the audio correction calculation amount may include a voice feature Extraction calculation amount, speech recognition calculation amount, template matching calculation amount, voice change calculation amount.
  • the calculation time of each calculation task is different due to factors such as calculation process, thread switching, and pre-task dependence.
  • the calculation amount of the calculation task can be determined according to the calculation time of each calculation task.
  • the calculation time of each calculation task can be used as the calculation amount of the calculation task. For example, if the computing time for a computing node to run a computing task is preset to be 20 minutes, then the computing amount of the computing task is 20.
  • a preset computing node can be used to run each computing task in advance to determine the computing time of each computing task.
  • the number of instructions of different types for each computing task can be counted, and the operating time of the computing task can be calculated based on the number of instructions of different types and the operating time of a single instruction.
  • the task amount may be the data amount of the calculation task.
  • the method is used for task assignment of text processing
  • the calculation task is a text processing task
  • the task amount 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 computing tasks to be allocated.
  • 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 calculation tasks to be assigned.
  • the second weight parameter takes a value of 1 or 0, and the second weight parameter A value parameter of 1 indicates that the computing task corresponding to the hidden layer node is allocated to the computing node corresponding to the output layer node, and the second weight parameter being 0 indicates that the computing task corresponding to the hidden layer node is not allocated to the
  • the second weight parameter satisfies the following constraints: the sum of the second weight parameter corresponding to each hidden layer node is 1, and the second weight parameter corresponding to each output layer node The sum is less than the product of the sum of the first weight parameter and the weight ratio of the computing node corresponding to the output layer node.
  • the sum of the first weight parameters is the sum of all the first weight parameters. If the computing task corresponding to an input layer node participates in task allocation, the first weight parameter between the input layer node and the corresponding hidden layer node is equal to 1. If the computing task corresponding to the input layer node does not participate in task allocation, then The first weight parameter between the input layer node and the corresponding hidden layer node is equal to zero. Therefore, the sum of the first weight parameter is the number of tasks actually participating in the task allocation. The product of the sum of the first weight parameter and the weight ratio of the computing node corresponding to the output layer node is the number of tasks that the computing node should allocate.
  • Each hidden layer node is connected to each output layer node.
  • a second weight parameter of 1 indicates that the calculation task corresponding to the hidden layer node is assigned to the calculation node corresponding to the output layer node.
  • a second weight parameter of 0 indicates that the hidden layer node corresponds to The computing task of is not allocated to the computing node corresponding to the output layer node. Each computing task is only assigned to one computing node. Therefore, the sum of the second weight parameters corresponding to each hidden layer node is 1. For example, there are four computing nodes A, B, C, and D.
  • computing task M1 When computing task M1 is assigned to computing node A, it represents the second weight parameter between the hidden layer node of computing task M1 and the output layer node of computing node A Is 1, the second weight parameter between the hidden layer node representing the computing task M1 and the output layer node representing the computing nodes B, C, and D are all 0, that is, the second weight parameter corresponding to the hidden layer node representing the computing task M1 is satisfied.
  • the sum of the weight parameters is 1.
  • the sum of the second weight parameters corresponding to each output layer node is the sum of all the second weight parameters corresponding to the output layer node.
  • the hidden layer is fully connected to the output layer.
  • the second weight parameter between a hidden layer node and an output layer node is 0 or 1. If the second weight parameter from the hidden layer node to the output layer node is 0, it means that the computing task corresponding to the hidden layer node is not allocated to the computing node corresponding to the output layer node; if the hidden layer node reaches the output layer node
  • the second weight parameter of the node is 1, which means that the computing task corresponding to the hidden layer node is allocated to the computing node corresponding to the output layer node. Therefore, to determine the weight parameter from each hidden layer node to each output layer node is to determine which computing node each computing task is assigned to.
  • the computing tasks are randomly allocated when the constraint conditions are met.
  • the task can be allocated according to a certain allocation strategy when the constraint conditions are met. For example, after each round of allocation is completed, the ratio of the amount of tasks actually allocated by each computing node to the amount of tasks that should be allocated can be calculated, and computing tasks with a large amount of tasks can be assigned to computing nodes with a smaller ratio in priority. For another example, computing tasks with a large amount of tasks can be preferentially allocated to computing nodes with a relatively large weight in each round of allocation.
  • the task allocation error of each computing node e (y(n)-y′(n)) 2/2, where y(n) is the number of tasks actually allocated by the computing node, y′ (n) is the number of tasks that the computing node should allocate.
  • the number of tasks actually allocated by the computing node is the sum of the second weight parameters corresponding to the computing node.
  • the number of tasks that each computing node should allocate is equal to the product of the number of tasks actually allocated by all computing nodes and the weight ratio of the computing nodes.
  • the number of tasks actually allocated by all computing nodes is the sum of the first weight parameter.
  • the first weight parameter from the input layer node to the hidden layer node, and the second weight parameter from the hidden layer node to the output layer node represent the final task distribute.
  • the difference between the task assignment error and the previous task assignment error can be calculated, and it is determined whether the difference is less than or equal to the first preset threshold, and if the difference is less than or equal to the first preset threshold, the convergence condition is satisfied .
  • a back propagation algorithm may be used to adjust the second weight parameter from the hidden layer node to the output layer node.
  • the back-propagation algorithm can refer to the prior art, which will not be repeated here.
  • the constraint condition needs to be satisfied. That is, the sum of the second weight parameters corresponding to each hidden layer node is 1, and the sum of the second weight parameters corresponding to each output layer node is less than the sum of the first weight parameters and the computing node corresponding to the output layer node The weight of the product of the proportion.
  • the second weight parameter from the hidden layer node to the output layer node may be adjusted multiple times (that is, repeated 104-106 multiple times), for example, adjusted ten times.
  • the second weight parameter from the hidden layer node to the output layer node After adjusting the second weight parameter from the hidden layer node to the output layer node, modify the first weight parameter from the input layer node to the hidden layer node and return to 103. For example, after multiple adjustments are made to the second weight parameter from the hidden layer node to the output layer node, the first weight parameter from the input layer node to the hidden layer node is modified and 103 is returned.
  • the first weight parameter from the input layer node to the hidden layer node is modified according to the task amount of the computing task currently participating in the distribution.
  • the calculation task with the largest or smallest amount of tasks among the calculation tasks currently participating in the distribution is determined, and the calculation task with the largest or smallest amount of tasks corresponds to the calculation task
  • the first weight parameter of is changed from 1 to 0.
  • the first weight parameter corresponding to the computing task with the largest or smallest amount of tasks can be modified alternately.
  • the first modification changes the first weight parameter corresponding to the computing task with the largest amount of current tasks from 1 to 0
  • the second modification changes the first weight parameter corresponding to the computing task with the smallest amount of current tasks from 1 to 0.
  • the third modification changes the first weight parameter corresponding to the calculation task with the largest amount of current tasks from 1 to 0.
  • the fourth modification changes the first weight parameter corresponding to the calculation task with the smallest amount of current tasks from 1 to 0 0, and so on.
  • the distributed computing system task allocation method uses a neural network model to perform task allocation.
  • the neural network model screens out the content that affects the allocation result (that is, does not allocate), so that the task allocation is more balanced, and the calculation tasks are evenly allocated to the distribution.
  • Each computing node in a formula computing system Each computing node in a formula computing system.
  • 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 computer equipment.
  • the distributed computing system task distribution device 20 distributes computing tasks to each computing node in the distributed computing system in a balanced manner.
  • the distributed computing system task distribution device 20 may include a first calculation module 201, a construction module 202, a determination module 203, a second calculation module 204, a judgment module 205, an adjustment module 206, and a modification module 207.
  • the first calculation module 201 is configured to determine the weight of each computing node according to the performance influencing factors of each computing node in the distributed computing system, and calculate the weight proportion of each computing node according to the weight of each computing node.
  • the performance influencing factors of a computing node refer to factors that have an impact on the computing performance of a computing node. The stronger the computing performance of a computing node, the greater the weight of the computing node.
  • the performance influencing factors of a computing node may include the memory size, memory access speed, number of CPUs, main frequency, hard disk size, response time, throughput rate, etc. of the computing node.
  • a weight value range for each performance influencing factor such as 1-10
  • the construction module 202 is used to construct a neural network model, the neural network model includes an input layer, a hidden layer, and an output layer.
  • Each input layer node of the input layer and each hidden layer node of the hidden layer correspond to a calculation Task
  • each output layer node of the output layer corresponds to a computing node
  • the input layer node and the hidden layer node are connected one-to-one
  • the hidden layer node and the output layer node are fully connected
  • the first weight parameter between the input layer node and the hidden layer node is initialized to 1, the first weight parameter takes a value of 1 or 0, and the first weight parameter is 1 to indicate that the The computing task corresponding to the input layer node participates in task allocation, and the first weight parameter being 0 indicates that the computing task corresponding to the input layer node does not participate in task allocation.
  • the neural network model includes three layers: an input layer, a hidden layer, and an output layer, and each layer includes multiple nodes.
  • Each input layer node and each hidden layer node represents a computing task.
  • Each output layer node represents a computing node.
  • n input layer nodes there are m input layer nodes and m hidden layer nodes, which means that there are m computing tasks.
  • n output layer nodes which means that computing tasks are allocated to n computing nodes.
  • the first weight parameter between the input layer node and the hidden layer node takes the value 0 or 1. 0 means that the computing node corresponding to the input layer node does not participate in task distribution, and 1 means The computing node corresponding to the input layer node participates in task allocation.
  • the input layer nodes and the hidden layer nodes are arranged according to the task amount of the corresponding computing task.
  • the first input layer node/hidden layer node represents the computing task with the largest amount of tasks
  • the second input The layer node/hidden layer node represents the computing task with the second largest amount of tasks,..., and so on.
  • the input layer nodes and the hidden layer nodes are arranged according to the task amount of the corresponding computing task from small to large, the first input layer node/hidden layer node represents the computing task with the smallest task amount, and the second input The layer node/hidden layer node represents the second-smallest computing task,..., and so on.
  • the task amount represents the workload of the calculation task.
  • the computing tasks to be allocated can be sorted in ascending or descending order according to the size of the tasks.
  • the task amount may be the calculation amount of the calculation task, and the calculation tasks to be allocated are sorted according to the amount of calculation, for example, the calculation tasks to be allocated are sorted in descending order according to the amount of calculation.
  • the device 20 is configured to allocate audio correction tasks, the calculation task is an audio correction task, the task amount of the audio correction task is an audio correction calculation amount, and the audio correction calculation amount may include voice Feature extraction calculation amount, speech recognition calculation amount, template matching calculation amount, voice change calculation amount.
  • the calculation time of each calculation task is different due to factors such as calculation process, thread switching, and pre-task dependence.
  • the calculation amount of the calculation task can be determined according to the calculation time of each calculation task.
  • the calculation time of each calculation task can be used as the calculation amount of the calculation task. For example, if the computing time for a computing node to run a computing task is preset to be 20 minutes, then the computing amount of the computing task is 20.
  • a preset computing node can be used to run each computing task in advance to determine the computing time of each computing task.
  • the number of instructions of different types for each computing task can be counted, and the operating time of the computing task can be calculated based on the number of instructions of different types and the operating time of a single instruction.
  • the task amount may be the data amount of the calculation task.
  • the method is used for task assignment of text processing
  • the calculation task is a text processing task
  • the task amount 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 computing tasks to be allocated.
  • the device 20 is configured to perform task assignment of audio correction, and divide the long audio audio correction task into a plurality of short audio audio correction tasks as computing tasks to be assigned.
  • the determining module 203 is configured to determine a second weight parameter between the hidden layer node and the output layer node according to the first weight parameter, and the second weight parameter takes a value of 1 or 0, so
  • the second weight parameter being 1 indicates that the computing task corresponding to the hidden layer node is allocated to the computing node corresponding to the output layer node
  • the second weight parameter being 0 indicates that the computing task corresponding to the hidden layer node is not Assigned to the computing node corresponding to the output layer node
  • the second weight parameter satisfies the following constraint: the sum of the second weight parameter corresponding to each hidden layer node is 1, and the second weight parameter corresponding to each output layer node
  • the sum of the weight parameters is smaller than the product of the sum of the first weight parameters and the weight ratio of the computing node corresponding to the output layer node.
  • the sum of the first weight parameters is the sum of all the first weight parameters. If the computing task corresponding to an input layer node participates in task allocation, the first weight parameter between the input layer node and the corresponding hidden layer node is equal to 1. If the computing task corresponding to the input layer node does not participate in task allocation, then The first weight parameter between the input layer node and the corresponding hidden layer node is equal to zero. Therefore, the sum of the first weight parameter is the number of tasks actually participating in the task allocation. The product of the sum of the first weight parameter and the weight ratio of the computing node corresponding to the output layer node is the number of tasks that the computing node should allocate.
  • Each hidden layer node is connected to each output layer node.
  • a second weight parameter of 1 indicates that the calculation task corresponding to the hidden layer node is assigned to the calculation node corresponding to the output layer node.
  • a second weight parameter of 0 indicates that the hidden layer node corresponds to The computing task of is not allocated to the computing node corresponding to the output layer node. Each computing task is only assigned to one computing node. Therefore, the sum of the second weight parameters corresponding to each hidden layer node is 1. For example, there are four computing nodes A, B, C, and D.
  • computing task M1 When computing task M1 is assigned to computing node A, it represents the second weight parameter between the hidden layer node of computing task M1 and the output layer node of computing node A Is 1, the second weight parameter between the hidden layer node representing the computing task M1 and the output layer node representing the computing nodes B, C, and D are all 0, that is, the second weight parameter corresponding to the hidden layer node representing the computing task M1 is satisfied.
  • the sum of the weight parameters is 1.
  • the sum of the second weight parameters corresponding to each output layer node is the sum of all the second weight parameters corresponding to the output layer node.
  • the hidden layer is fully connected to the output layer.
  • the second weight parameter between a hidden layer node and an output layer node is 0 or 1. If the second weight parameter from the hidden layer node to the output layer node is 0, it means that the computing task corresponding to the hidden layer node is not allocated to the computing node corresponding to the output layer node; if the hidden layer node reaches the output layer node
  • the second weight parameter of the node is 1, which means that the computing task corresponding to the hidden layer node is allocated to the computing node corresponding to the output layer node. Therefore, to determine the weight parameter from each hidden layer node to each output layer node is to determine which computing node each computing task is assigned to.
  • the computing tasks are randomly allocated when the constraint conditions are met.
  • the task can be allocated according to a certain allocation strategy when the constraint conditions are met. For example, after each round of allocation is completed, the ratio of the amount of tasks actually allocated by each computing node to the amount of tasks that should be allocated can be calculated, and computing tasks with a large amount of tasks can be assigned to computing nodes with a smaller ratio in priority. For another example, computing tasks with a large amount of tasks can be preferentially allocated to computing nodes with a relatively large weight in each round of allocation.
  • the second calculation module 204 is configured to calculate the task allocation error of each computing node according to the second weight parameter.
  • the task allocation error of each computing node e (y(n)-y′(n)) 2/2, where y(n) is the number of tasks actually allocated by the computing node, y′ (n) is the number of tasks that the computing node should allocate.
  • the number of tasks actually allocated by the computing node is the sum of the second weight parameters corresponding to the computing node.
  • the number of tasks that each computing node should allocate is equal to the product of the number of tasks actually allocated by all computing nodes and the weight ratio of the computing nodes.
  • the number of tasks actually allocated by all computing nodes is the sum of the first weight parameter.
  • the judging module 205 is used to judge whether the task allocation error satisfies the convergence condition.
  • the first weight parameter from the input layer node to the hidden layer node, and the second weight parameter from the hidden layer node to the output layer node represent the final task distribute.
  • the difference between the task assignment error and the previous task assignment error can be calculated, and it is determined whether the difference is less than or equal to the first preset threshold, and if the difference is less than or equal to the first preset threshold, the convergence condition is satisfied .
  • the adjustment module 206 is configured to adjust the second weight parameter according to the task allocation error if the task allocation error does not meet the convergence condition.
  • a back propagation algorithm may be used to adjust the second weight parameter from the hidden layer node to the output layer node.
  • the back-propagation algorithm can refer to the prior art, which will not be repeated here.
  • the constraint condition needs to be satisfied. That is, the sum of the second weight parameters corresponding to each hidden layer node is 1, and the sum of the second weight parameters corresponding to each output layer node is less than the sum of the first weight parameters and the computing node corresponding to the output layer node The weight of the product of the proportion.
  • the second weight parameter from the hidden layer node to the output layer node may be adjusted multiple times, for example, adjusted ten times.
  • the modification module 207 is configured to modify the first weight parameter.
  • the second weight parameter from the hidden layer node to the output layer node After adjusting the second weight parameter from the hidden layer node to the output layer node, modify the first weight parameter from the input layer node to the hidden layer node. For example, after multiple adjustments are made to the second weight parameter from the hidden layer node to the output layer node, the first weight parameter from the input layer node to the hidden layer node is modified.
  • the first weight parameter from the input layer node to the hidden layer node is modified according to the task amount of the computing task currently participating in the distribution.
  • the calculation task with the largest or smallest amount of tasks among the calculation tasks currently participating in the distribution is determined, and the calculation task with the largest or smallest amount of tasks corresponds to the calculation task
  • the first weight parameter of is changed from 1 to 0.
  • the first weight parameter corresponding to the computing task with the largest or smallest amount of tasks can be modified alternately.
  • the first modification changes the first weight parameter corresponding to the computing task with the largest amount of current tasks from 1 to 0
  • the second modification changes the first weight parameter corresponding to the computing task with the smallest amount of current tasks from 1 to 0.
  • the third modification changes the first weight parameter corresponding to the calculation task with the largest amount of current tasks from 1 to 0.
  • the fourth modification changes the first weight parameter corresponding to the calculation task with the smallest amount of current tasks from 1 to 0 0, and so on.
  • the distributed computing system task distribution device 20 uses a neural network model to perform task distribution.
  • the neural network model screens out the content that affects the distribution result (that is, no distribution), so that the task distribution is more balanced, and the calculation tasks are evenly distributed to Each computing node in a distributed computing system.
  • This embodiment provides a storage medium that stores computer-readable instructions on which, when executed by a processor, implements the steps in the foregoing embodiment of the distributed computing system task allocation method, for example, as shown in FIG. 1 Of 101-107. Or, when the computer-readable instruction is executed by the processor, the function of each module in the above-mentioned device embodiment is realized, for example, the modules 201-207 in FIG. 2.
  • FIG. 3 is a schematic diagram of the computer equipment provided in the fourth embodiment of the application.
  • the computer device 30 includes a memory 301, a processor 302, and a computer program 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 program 303, the steps in the embodiment of the task allocation method for the distributed computing system are implemented, for example, 101-107 shown in FIG. 1.
  • the computer-readable instruction is executed by the processor, the function of each module in the above-mentioned device embodiment is realized, for example, the modules 201-207 in FIG. 2.
  • the computer program 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 one or more modules may be a series of computer-readable instruction segments capable of completing specific functions, and the computer-readable instruction segments are used to describe the execution process of the computer program 303 in the computer device 30.
  • the computer program 303 can be divided into the first calculation module 201, the construction module 202, the determination module 203, the second calculation module 204, the judgment module 205, the adjustment module 206, and the modification module 207 in FIG. See the second embodiment for functions.
  • 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 different components.
  • the computer device 30 may also include input and output devices, network access devices, buses, and so on.
  • the memory 301 may be used to store the computer program 303, and the processor 302 implements the computer device by running or executing the computer program or module stored in the memory 301 and calling data stored in the memory 301 30 various functions.
  • 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.; the storage data area may The data created according to the use of the computer device 30 is stored.
  • the memory 301 may include non-volatile memory or volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), and a Secure Digital (SD) card.
  • Flash Card at least one magnetic disk storage device, flash memory device, random access memory, or other storage device.
  • the integrated module of the computer device 30 may be stored in a computer-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 a computer program.
  • the computer program can be stored in a storage medium. When executed by the processor, the steps of the foregoing method embodiments can be implemented.
  • the computer program includes computer-readable instructions, and the computer-readable instructions may be in the form of source code, object code, executable files, or some intermediate forms.
  • the computer-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, computer memory, read-only memory (ROM, Read-Only Memory), random access memory.
  • the computer-readable storage medium may be non-volatile or volatile.
  • modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware, or in the form of hardware plus software functional modules.
  • the above-mentioned integrated modules implemented in the form of software functional modules may be stored in a computer-readable storage medium.
  • the above-mentioned software function module is stored in a storage medium and includes several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) execute the method described in each embodiment of the present application. Part of the steps.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Biophysics (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Biomedical Technology (AREA)
  • Artificial Intelligence (AREA)
  • Mathematical Physics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本申请涉及人工智能,提供一种分布式计算系统任务分配方法及相关设备。所述方法包括:确定每个计算节点的权重,计算每个计算节点的权重占比;构建包括输入层、隐藏层和输出层的神经网络模型,每个输入层节点和每个隐藏层节点对应一个计算任务,每个输出层节点对应一个计算节点;计算输入层节点和隐藏层节点之间的第一权值参数之和,根据第一权值参数之和确定隐藏层节点和输出层节点之间的第二权值参数;根据第二权值参数计算每个计算节点的任务分配误差;判断任务分配误差是否满足收敛条件;若任务分配误差不满足收敛条件,则调整第二权值参数;修改第一权值参数。本申请可以将计算任务均衡分配给各个计算节点。

Description

分布式计算系统任务分配方法及相关设备
本申请要求于2020年6月23日提交中国专利局、申请号为202010583551.0、发明名称为“分布式计算系统任务分配方法及相关设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及人工智能,具体涉及一种分布式计算系统任务分配方法及相关设备。
背景技术
随着信息技术的飞速发展,基于数据处理和数据分析的应用受到了广泛的欢迎和关注。发明人意识到,对数据(如海量数据)进行复杂计算已经远远超过单台计算机的处理能力,由此对分布式系统及其关键技术进行了研究。分布式计算中把需要进行复杂计算的数据切分成小块后,分交由多个计算节点并行处理,并将局部计算结果整合得出最终结果。因此,如何合理地对分布式计算系统的资源进行分配,使得分布式计算系统的资源的利用率最大化,成了亟待解决的问题。
发明内容
鉴于以上内容,有必要提出一种分布式计算系统任务分配方法、装置、计算机设备及存储介质,其可以将计算任务均衡分配给分布式计算系统中的各个计算节点。
本申请的第一方面提供一种分布式计算系统任务分配方法,其中,所述方法包括:
(a)根据分布式计算系统中每个计算节点的性能影响因素确定每个计算节点的权重,根据每个计算节点的权重计算每个计算节点的权重占比;
(b)构建神经网络模型,所述神经网络模型包括输入层、隐藏层和输出层,所述输入层的每个输入层节点和所述隐藏层的每个隐藏层节点对应一个计算任务,所述输出层的每个输出层节点对应一个计算节点,所述输入层节点和所述隐藏层节点之间一对一连接,所述隐藏层节点和所述输出层节点之间全连接,所述输入层节点和所述隐藏层节点之间的第一权值参数初始化为1,所述第一权值参数取值为1或0,所述第一权值参数为1表示所述输入层节点对应的计算任务参与任务分配,所述第一权值参数为0表示所述输入层节点对应的计算任务不参与任务分配;
(c)根据所述第一权值参数确定所述隐藏层节点和所述输出层节点之间的第二权值参数,所述第二权值参数取值为1或0,所述第二权值参数为1表示所述隐藏层节点对 应的计算任务分配给所述输出层节点对应的计算节点,所述第二权值参数为0表示所述隐藏层节点对应的计算任务不分配给所述输出层节点对应的计算节点,所述第二权值参数满足如下约束条件:每个隐藏层节点对应的第二权值参数之和为1,每个输出层节点对应的第二权值参数之和小于第一权值参数之和与所述输出层节点对应的计算节点的权重占比的乘积;
(d)根据所述第二权值参数计算每个计算节点的任务分配误差;
(e)判断所述任务分配误差是否满足收敛条件;
(f)若所述任务分配误差不满足收敛条件,则根据所述任务分配误差调整所述第二权值参数;
(g)修改所述第一权值参数,返回(c)。
本申请的第二方面提供一种计算机设备,其中,所述计算机设备包括处理器,所述处理器用于执行存储器中存储的计算机可读指令以实现以下步骤:
(a)根据分布式计算系统中每个计算节点的性能影响因素确定每个计算节点的权重,根据每个计算节点的权重计算每个计算节点的权重占比;
(b)构建神经网络模型,所述神经网络模型包括输入层、隐藏层和输出层,所述输入层的每个输入层节点和所述隐藏层的每个隐藏层节点对应一个计算任务,所述输出层的每个输出层节点对应一个计算节点,所述输入层节点和所述隐藏层节点之间一对一连接,所述隐藏层节点和所述输出层节点之间全连接,所述输入层节点和所述隐藏层节点之间的第一权值参数初始化为1,所述第一权值参数取值为1或0,所述第一权值参数为1表示所述输入层节点对应的计算任务参与任务分配,所述第一权值参数为0表示所述输入层节点对应的计算任务不参与任务分配;
(c)根据所述第一权值参数确定所述隐藏层节点和所述输出层节点之间的第二权值参数,所述第二权值参数取值为1或0,所述第二权值参数为1表示所述隐藏层节点对应的计算任务分配给所述输出层节点对应的计算节点,所述第二权值参数为0表示所述隐藏层节点对应的计算任务不分配给所述输出层节点对应的计算节点,所述第二权值参数满足如下约束条件:每个隐藏层节点对应的第二权值参数之和为1,每个输出层节点对应的第二权值参数之和小于第一权值参数之和与所述输出层节点对应的计算节点的权重占比的乘积;
(d)根据所述第二权值参数计算每个计算节点的任务分配误差;
(e)判断所述任务分配误差是否满足收敛条件;
(f)若所述任务分配误差不满足收敛条件,则根据所述任务分配误差调整所述第二权值参数;
(g)修改所述第一权值参数,返回(c)。
本申请的第三方面提供一种存储介质,所述存储介质上存储有计算机可读指令,其中,所述计算机可读指令被处理器执行时实现以下步骤:
(a)根据分布式计算系统中每个计算节点的性能影响因素确定每个计算节点的权重,根据每个计算节点的权重计算每个计算节点的权重占比;
(b)构建神经网络模型,所述神经网络模型包括输入层、隐藏层和输出层,所述输入层的每个输入层节点和所述隐藏层的每个隐藏层节点对应一个计算任务,所述输出层的每个输出层节点对应一个计算节点,所述输入层节点和所述隐藏层节点之间一对一连接,所述隐藏层节点和所述输出层节点之间全连接,所述输入层节点和所述隐藏层节点之间的第一权值参数初始化为1,所述第一权值参数取值为1或0,所述第一权值参数为1表示所述输入层节点对应的计算任务参与任务分配,所述第一权值参数为0表示所述输入层节点对应的计算任务不参与任务分配;
(c)根据所述第一权值参数确定所述隐藏层节点和所述输出层节点之间的第二权值参数,所述第二权值参数取值为1或0,所述第二权值参数为1表示所述隐藏层节点对应的计算任务分配给所述输出层节点对应的计算节点,所述第二权值参数为0表示所述隐藏层节点对应的计算任务不分配给所述输出层节点对应的计算节点,所述第二权值参数满足如下约束条件:每个隐藏层节点对应的第二权值参数之和为1,每个输出层节点对应的第二权值参数之和小于第一权值参数之和与所述输出层节点对应的计算节点的权重占比的乘积;
(d)根据所述第二权值参数计算每个计算节点的任务分配误差;
(e)判断所述任务分配误差是否满足收敛条件;
(f)若所述任务分配误差不满足收敛条件,则根据所述任务分配误差调整所述第二权值参数;
(g)修改所述第一权值参数,返回(c)。
本申请的第四方面提供一种分布式计算系统任务分配装置,所述装置包括:
第一计算模块,用于根据分布式计算系统中每个计算节点的性能影响因素确定每个计算节点的权重,根据每个计算节点的权重计算每个计算节点的权重占比;
构建模块,用于构建神经网络模型,所述神经网络模型包括输入层、隐藏层和输出层,所述输入层的每个输入层节点和所述隐藏层的每个隐藏层节点对应一个计算任务,所述输出层的每个输出层节点对应一个计算节点,所述输入层节点和所述隐藏层节点之间一对一连接,所述隐藏层节点和所述输出层节点之间全连接,所述输入层节点和所述隐藏层节点之间的第一权值参数初始化为1,所述第一权值参数取值为1或0,所述第一权值参数为1表示所述输入层节点对应的计算任务参与任务分配,所述第一权值参数为0表示所述输入层节点对应的计算任务不参与任务分配;
确定模块,用于根据所述第一权值参数确定所述隐藏层节点和所述输出层节点之间的第二权值参数,所述第二权值参数取值为1或0,所述第二权值参数为1表示所述隐藏层节点对应的计算任务分配给所述输出层节点对应的计算节点,所述第二权值参数为0表示所述隐藏层节点对应的计算任务不分配给所述输出层节点对应的计算节点,所述第二权值参数满足如下约束条件:每个隐藏层节点对应的第二权值参数之和为1,每个输出层节点对应的第二权值参数之和小于第一权值参数之和与所述输出层节点对应的计算节点的权重占比的乘积;
第二计算模块,用于根据所述第二权值参数计算每个计算节点的任务分配误差;
判断模块,用于判断所述任务分配误差是否满足收敛条件;
调整模块,用于若所述任务分配误差不满足收敛条件,则根据所述任务分配误差调整所述第二权值参数;
修改模块,用于修改所述第一权值参数。
本申请利用神经网络模型进行任务分配,神经网络模型将影响分配结果的内容筛选出来(即不进行分配),使得任务分配更为均衡,实现将计算任务均衡分配给分布式计算系统中的各个计算节点。
附图说明
图1是本申请实施例提供的分布式计算系统任务分配方法的流程图。
图2是本申请实施例提供的分布式计算系统任务分配装置的结构图。
图3是本申请实施例提供的计算机设备的示意图。
具体实施方式
为了能够更清楚地理解本申请的上述目的、特征和优点,下面结合附图和具体实施例对本申请进行详细描述。需要说明的是,在不冲突的情况下,本申请的实施例及实施例中的特征可以相互组合。
在下面的描述中阐述了很多具体细节以便于充分理解本申请,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中在本申请的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本申请。
优选地,本申请的分布式计算系统任务分配方法应用在一个或者多个计算机设备中。所述计算机设备是一种能够按照事先设定或存储的指令,自动进行数值计算和/或信息处理的设备,其硬件包括但不限于微处理器、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程门阵列(Field-Programmable Gate Array,FPGA)、数字处理器(Digital Signal Processor,DSP)、嵌入式设备等。
所述计算机设备可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。所述计算机设备可以与用户通过键盘、鼠标、遥控器、触摸板或声控设备等方式进行人机交互。
实施例一
图1是本申请实施例一提供的分布式计算系统任务分配方法的流程图。所述分布式计算系统任务分配方法应用于计算机设备。所述分布式计算系统任务分配方法将计算任务均衡分配给分布式计算系统中的各个计算节点。
如图1所示,所述分布式计算系统任务分配方法包括:
101,根据分布式计算系统中每个计算节点的性能影响因素确定每个计算节点的权重,根据每个计算节点的权重计算每个计算节点的权重占比。
计算节点的性能影响因素是指对计算节点的计算性能有影响的因素。计算节点的计算性能越强,则该计算节点的权重越大。
计算节点的性能影响因素可以包括计算节点的内存大小、内存存取速度、CPU数量、主频、硬盘大小、响应时间、吞吐率等。
可以对每个性能影响因素设置一个权重值范围,例如1-10,确定每个计算节点的每个性能影响因素的权重值,将该计算节点的所有性能影响因素的权重值进行预设运算(例如相加或相乘),得到该计算节点的权重。
每个计算节点的权重占比等于所述计算节点的权重除以所有计算节点的总权重。例如,共有四个计算节点A、B、C、D,权重分别是30、40、20、10(即总权重为100),则计算节点A的权重占比为30/100=0.3,计算节点B的权重占比为40/100=0.4,计算节点C应该的权重占比为20/100=0.2,计算节点D的权重占比为10/100=0.1。
102,构建神经网络模型,所述神经网络模型包括输入层、隐藏层和输出层,所述输入层的每个输入层节点和所述隐藏层的每个隐藏层节点对应一个计算任务,所述输出层的每个输出层节点对应一个计算节点,所述输入层节点和所述隐藏层节点之间一对一连接,所述隐藏层节点和所述输出层节点之间全连接,所述输入层节点和所述隐藏层节点之间的第一权值参数初始化为1,所述第一权值参数取值为1或0,所述第一权值参数为1表示所述输入层节点对应的计算任务参与任务分配,所述第一权值参数为0表示所述输入层节点对应的计算任务不参与任务分配。
所述神经网络模型包括输入层、隐藏层和输出层三层,每一层包括多个节点。每个输入层节点和每个隐藏层节点表示一个计算任务。每个输出层节点表示一个计算节点。
例如,有m个输入层节点和m个隐藏层节点,表示有m个计算任务。有n个输出层节点,表示将计算任务分配给n个计算节点。
从输入层到隐藏层是一对一连接,输入层节点和隐藏层节点之间的第一权值参数取值为0或1。0代表输入层节点对应的计算节点不参与任务分配,1代表输入层节点对应的计算节点参与任务分配。
在一实施例中,在构建所述神经网络模型时,将所述输入层节点和所述隐藏层节点根据对应的计算任务的任务量进行排列。
例如,将所述输入层节点和所述隐藏层节点根据对应的计算任务的任务量从大到小排列,第一个输入层节点/隐藏层节点表示任务量最大的计算任务,第二个输入层节点/隐藏层节点表示任务量第二大的计算任务,……,依此类推。
又如,将所述输入层节点和所述隐藏层节点根据对应的计算任务的任务量从小到大排列,第一个输入层节点/隐藏层节点表示任务量最小的计算任务,第二个输入层节点/隐藏层节点表示任务量第二小的计算任务,……,依此类推。
所述任务量表示计算任务的工作量。可以将待分配的计算任务根据任务量的大小进行升序排序或降序排序。
在一实施例中,所述任务量可以是计算任务的计算量,将待分配的计算任务根据计算量的大小进行排序,例如将待分配的计算任务根据计算量的大小进行降序排序。
在一实施例中,所述方法用于进行音频修正任务分配,所述计算任务为音频修正任务,所述音频修正任务的任务量为音频修正计算量,所述音频修正计算量可以包括语音特征提取计算量、语音识别计算量、模板匹配计算量、变声计算量。
每个计算任务因计算流程、线程的切换、前置任务的依赖等因素,造成运算时间的差异,可以根据每个计算任务的计算时间确定该计算任务的计算量。可以将每个计算任务的计算时间作为该计算任务的计算量。例如,预设计算节点运行一个计算任务的计算时间为20分钟,则该计算任务的计算量为20。
可以利用预设计算节点预先运行每个计算任务来确定每个计算任务的运算时间。
或者,可以统计每个计算任务不同类型的指令的数量,根据不同类型的指令的数量和单指令运算时间计算所述计算任务的运算时间。
在另一实施例中,所述任务量可以是计算任务的数据量。例如,所述方法用于进行文本处理的任务分配,所述计算任务为文本处理任务,所述文本处理任务的任务量为文本大小。
在一具体实施例中,可以将复杂计算任务划分为多个独立计算任务,将所述多个独立计算任务作为待分配的计算任务。例如,所述方法用于进行音频修正的任务分配,将长音频音频修正任务划分为多个短音频音频修正任务作为待分配的计算任务。
103,根据所述第一权值参数确定所述隐藏层节点和所述输出层节点之间的第二权值参数,所述第二权值参数取值为1或0,所述第二权值参数为1表示所述隐藏层节点对应的计算任务分配给所述输出层节点对应的计算节点,所述第二权值参数为0表示所述隐藏层节点对应的计算任务不分配给所述输出层节点对应的计算节点,所述第二权值参数满足如下约束条件:每个隐藏层节点对应的第二权值参数之和为1,每个输出层节点对应的第二权值参数之和小于第一权值参数之和与所述输出层节点对应的计算节点的权重占比的乘积。
第一权值参数之和就是所有的第一权值参数的和。若一个输入层节点对应的计算任务参与任务分配,则该输入层节点和对应的隐藏层节点之间的第一权值参数等于1,若该输入层节点对应的计算任务不参与任务分配,则该输入层节点和对应的隐藏层节点之间的第一权值参数等于0。因此,第一权值参数之和就是实际参与任务分配的计算任务的任务数。第一权值参数之和与所述输出层节点对应的计算节点的权重占比的乘积为所述计算节点应该分配的任务数。
若一个隐藏层节点对应的第一权值参数为0,则该隐藏层节点对应的所有第二权值参数均为0。
每个隐藏层节点与每个输出层节点相连,第二权值参数为1表示隐藏层节点对应的 计算任务分配给输出层节点对应的计算节点,第二权值参数为0表示隐藏层节点对应的计算任务不分配给输出层节点对应的计算节点。每个计算任务只分配给一个计算节点,因此,每个隐藏层节点对应的第二权值参数的之和为1。例如,共有四个计算节点A、B、C、D,计算任务M1分配给计算节点A,则代表计算任务M1的隐藏层节点和代表计算节点A的输出层节点之间的第二权值参数为1,代表计算任务M1的隐藏层节点和代表计算节点B、C、D的输出层节点之间的第二权值参数均为0,即满足代表计算任务M1的隐藏层节点对应的第二权值参数之和为1。
每个输出层节点对应的第二权值参数之和就是与所述输出层节点对应的所有第二权值参数的和。
隐藏层到输出层是全连接。一个隐藏层节点和一个输出层节点之间的第二权值参数为0或1。若该隐藏层节点到该输出层节点的第二权值参数为0,则表示该隐藏层节点对应的计算任务不分配给该输出层节点对应的计算节点;若该隐藏层节点到该输出层节点的第二权值参数为1,则表示该隐藏层节点对应的计算任务分配给该输出层节点对应的计算节点。因此,确定每个隐藏层节点到每个输出层节点的权重参数,就是确定每个计算任务分配给哪一个计算节点。
在一实施例中,在满足所述约束条件的情况下对计算任务进行随机分配。
在其他的实施例中,可以在满足所述约束条件的情况下按照一定的分配策略进行任务分配。例如,可以每一轮分配完成后计算每个计算节点实际分配的任务量与应该分配的任务量的比值,将大任务量的计算任务优先分配给所述比值较小的计算节点。又如,可以每一轮分配将大任务量的计算任务优先分配给所述权重占比较大的计算节点。
104,根据所述第二权值参数计算每个计算节点的任务分配误差。
在一实施例中,每个计算节点的任务分配误差e=(y(n)-y′(n))2/2,其中y(n)为所述计算节点实际分配的任务数,y′(n)为所述计算节点应该分配的任务数。所述计算节点实际分配的任务数也就是所述计算节点对应的第二权值参数之和。
每个计算节点应该分配的任务数等于所有计算节点实际分配的任务数与所述计算节点的权重占比的乘积。所有计算节点实际分配的任务数也就是所述第一权值参数之和。
105,判断所述任务分配误差是否满足收敛条件,若所述任务分配误差满足收敛条件,流程结束。
当所述任务分配误差满足收敛条件时,所述输入层节点到所述隐藏层节点的第一权值参数、所述隐藏层节点到所述输出层节点的第二权值参数表示最终的任务分配。
可以计算所述任务分配误差与前一任务分配误差的差值,判断所述差值是否小于或等于第一预设阈值,若所述差值小于或等于第一预设阈值,则满足收敛条件。或者,可以判断所述任务分配误差是否小于或等于第二预设阈值,若所述任务分配误差小于或等于第二预设阈值,则满足收敛条件。
106,若所述任务分配误差不满足收敛条件,则根据所述任务分配误差调整所述第二权值参数。
若所述任务分配误差满足收敛条件,则流程结束。
可以采用反向传播算法调整所述隐藏层节点到所述输出层节点的第二权值参数。反向传播算法可以参看现有技术,此处不再赘述。
在对所述隐藏层节点到所述输出层节点的第二权值参数进行调整时,需要满足所述约束条件。即每个隐藏层节点对应的第二权值参数之和为1,每个输出层节点对应的第二权值参数之和小于第一权值参数之和与所述输出层节点对应的计算节点的权重占比的乘积。
可以对所述隐藏层节点到所述输出层节点的第二权值参数进行多次调整(即重复104-106多次),例如进行十次调整。
107,修改所述第一权值参数,返回103。
在对所述隐藏层节点到所述输出层节点的第二权值参数进行调整之后,修改输入层节点到隐藏层节点的第一权值参数并返回103。例如,对所述隐藏层节点到所述输出层节点的第二权值参数进行多次调整之后,修改输入层节点到隐藏层节点的第一权值参数并返回103。
在一实施例中,根据当前参与分配的计算任务的任务量修改所述输入层节点到所述隐藏层节点的第一权值参数。每次修改所述输入层节点到所述隐藏层节点的第一权值参数时,确定当前参与分配的计算任务中任务量最大或最小的计算任务,将该任务量最大或最小的计算任务对应的第一权值参数从1修改为0。可以交替地修改任务量最大或最小的计算任务对应的第一权值参数。例如,第一次修改将当前任务量最大的计算任务对应的第一权值参数从1修改为0,第二次修改将当前任务量最小的计算任务对应的第一权值参数从1修改为0,第三次修改将当前任务量最大的计算任务对应的第一权值参数从1修改为0,第四次修改将当前任务量最小的计算任务对应的第一权值参数从1修改为0,依此类推。
在修改所述输入层节点到所述隐藏层节点的第一权值参数之后,返回104,重新确定所述隐藏层节点到所述输出层节点的第二权值参数。
所述分布式计算系统任务分配方法利用神经网络模型进行任务分配,神经网络模型将影响分配结果的内容筛选出来(即不进行分配),使得任务分配更为均衡,实现将计算任务均衡分配给分布式计算系统中的各个计算节点。
实施例二
图2是本申请实施例二提供的分布式计算系统任务分配装置的结构图。所述分布式计算系统任务分配装置20应用于计算机设备。所述分布式计算系统任务分配装置20将计算任务均衡分配给分布式计算系统中的各个计算节点。
如图2所示,所述分布式计算系统任务分配装置20可以包括第一计算模块201、构建模块202、确定模块203、第二计算模块204、判断模块205、调整模块206、修改模块207。
第一计算模块201,用于根据分布式计算系统中每个计算节点的性能影响因素确定每个计算节点的权重,根据每个计算节点的权重计算每个计算节点的权重占比。
计算节点的性能影响因素是指对计算节点的计算性能有影响的因素。计算节点的计算性能越强,则该计算节点的权重越大。
计算节点的性能影响因素可以包括计算节点的内存大小、内存存取速度、CPU数量、主频、硬盘大小、响应时间、吞吐率等。
可以对每个性能影响因素设置一个权重值范围,例如1-10,确定每个计算节点的每个性能影响因素的权重值,将该计算节点的所有性能影响因素的权重值进行预设运算(例如相加或相乘),得到该计算节点的权重。
每个计算节点的权重占比等于所述计算节点的权重除以所有计算节点的总权重。例如,共有四个计算节点A、B、C、D,权重分别是30、40、20、10(即总权重为100),则计算节点A的权重占比为30/100=0.3,计算节点B的权重占比为40/100=0.4,计算节点C应该的权重占比为20/100=0.2,计算节点D的权重占比为10/100=0.1。
构建模块202,用于构建神经网络模型,所述神经网络模型包括输入层、隐藏层和输出层,所述输入层的每个输入层节点和所述隐藏层的每个隐藏层节点对应一个计算任务,所述输出层的每个输出层节点对应一个计算节点,所述输入层节点和所述隐藏层节点之间一对一连接,所述隐藏层节点和所述输出层节点之间全连接,所述输入层节点和所述隐藏层节点之间的第一权值参数初始化为1,所述第一权值参数取值为1或0,所述第一权值参数为1表示所述输入层节点对应的计算任务参与任务分配,所述第一权值参数为0表示所述输入层节点对应的计算任务不参与任务分配。
所述神经网络模型包括输入层、隐藏层和输出层三层,每一层包括多个节点。每个输入层节点和每个隐藏层节点表示一个计算任务。每个输出层节点表示一个计算节点。
例如,有m个输入层节点和m个隐藏层节点,表示有m个计算任务。有n个输出层节点,表示将计算任务分配给n个计算节点。
从输入层到隐藏层是一对一连接,输入层节点和隐藏层节点之间的第一权值参数取值为0或1。0代表输入层节点对应的计算节点不参与任务分配,1代表输入层节点对应的计算节点参与任务分配。
在一实施例中,在构建所述神经网络模型时,将所述输入层节点和所述隐藏层节点根据对应的计算任务的任务量进行排列。
例如,将所述输入层节点和所述隐藏层节点根据对应的计算任务的任务量从大到小排列,第一个输入层节点/隐藏层节点表示任务量最大的计算任务,第二个输入层节点/隐藏层节点表示任务量第二大的计算任务,…….,依此类推。
又如,将所述输入层节点和所述隐藏层节点根据对应的计算任务的任务量从小到大排列,第一个输入层节点/隐藏层节点表示任务量最小的计算任务,第二个输入层节点/隐藏层节点表示任务量第二小的计算任务,…….,依此类推。
所述任务量表示计算任务的工作量。可以将待分配的计算任务根据任务量的大小进 行升序排序或降序排序。
在一实施例中,所述任务量可以是计算任务的计算量,将待分配的计算任务根据计算量的大小进行排序,例如将待分配的计算任务根据计算量的大小进行降序排序。
在一实施例中,所述装置20用于进行音频修正任务分配,所述计算任务为音频修正任务,所述音频修正任务的任务量为音频修正计算量,所述音频修正计算量可以包括语音特征提取计算量、语音识别计算量、模板匹配计算量、变声计算量。
每个计算任务因计算流程、线程的切换、前置任务的依赖等因素,造成运算时间的差异,可以根据每个计算任务的计算时间确定该计算任务的计算量。可以将每个计算任务的计算时间作为该计算任务的计算量。例如,预设计算节点运行一个计算任务的计算时间为20分钟,则该计算任务的计算量为20。
可以利用预设计算节点预先运行每个计算任务来确定每个计算任务的运算时间。
或者,可以统计每个计算任务不同类型的指令的数量,根据不同类型的指令的数量和单指令运算时间计算所述计算任务的运算时间。
在另一实施例中,所述任务量可以是计算任务的数据量。例如,所述方法用于进行文本处理的任务分配,所述计算任务为文本处理任务,所述文本处理任务的任务量为文本大小。
在一具体实施例中,可以将复杂计算任务划分为多个独立计算任务,将所述多个独立计算任务作为待分配的计算任务。例如,所述装置20用于进行音频修正的任务分配,将长音频音频修正任务划分为多个短音频音频修正任务作为待分配的计算任务。
确定模块203,用于根据所述第一权值参数确定所述隐藏层节点和所述输出层节点之间的第二权值参数,所述第二权值参数取值为1或0,所述第二权值参数为1表示所述隐藏层节点对应的计算任务分配给所述输出层节点对应的计算节点,所述第二权值参数为0表示所述隐藏层节点对应的计算任务不分配给所述输出层节点对应的计算节点,所述第二权值参数满足如下约束条件:每个隐藏层节点对应的第二权值参数之和为1,每个输出层节点对应的第二权值参数之和小于第一权值参数之和与所述输出层节点对应的计算节点的权重占比的乘积。
第一权值参数之和就是所有的第一权值参数的和。若一个输入层节点对应的计算任务参与任务分配,则该输入层节点和对应的隐藏层节点之间的第一权值参数等于1,若该输入层节点对应的计算任务不参与任务分配,则该输入层节点和对应的隐藏层节点之间的第一权值参数等于0。因此,第一权值参数之和就是实际参与任务分配的计算任务的任务数。第一权值参数之和与所述输出层节点对应的计算节点的权重占比的乘积为所述计算节点应该分配的任务数。
若一个隐藏层节点对应的第一权值参数为0,则该隐藏层节点对应的所有第二权值参数均为0。
每个隐藏层节点与每个输出层节点相连,第二权值参数为1表示隐藏层节点对应的计算任务分配给输出层节点对应的计算节点,第二权值参数为0表示隐藏层节点对应的 计算任务不分配给输出层节点对应的计算节点。每个计算任务只分配给一个计算节点,因此,每个隐藏层节点对应的第二权值参数的之和为1。例如,共有四个计算节点A、B、C、D,计算任务M1分配给计算节点A,则代表计算任务M1的隐藏层节点和代表计算节点A的输出层节点之间的第二权值参数为1,代表计算任务M1的隐藏层节点和代表计算节点B、C、D的输出层节点之间的第二权值参数均为0,即满足代表计算任务M1的隐藏层节点对应的第二权值参数之和为1。
每个输出层节点对应的第二权值参数之和就是与所述输出层节点对应的所有第二权值参数的和。
隐藏层到输出层是全连接。一个隐藏层节点和一个输出层节点之间的第二权值参数为0或1。若该隐藏层节点到该输出层节点的第二权值参数为0,则表示该隐藏层节点对应的计算任务不分配给该输出层节点对应的计算节点;若该隐藏层节点到该输出层节点的第二权值参数为1,则表示该隐藏层节点对应的计算任务分配给该输出层节点对应的计算节点。因此,确定每个隐藏层节点到每个输出层节点的权重参数,就是确定每个计算任务分配给哪一个计算节点。
在一实施例中,在满足所述约束条件的情况下对计算任务进行随机分配。
在其他的实施例中,可以在满足所述约束条件的情况下按照一定的分配策略进行任务分配。例如,可以每一轮分配完成后计算每个计算节点实际分配的任务量与应该分配的任务量的比值,将大任务量的计算任务优先分配给所述比值较小的计算节点。又如,可以每一轮分配将大任务量的计算任务优先分配给所述权重占比较大的计算节点。
第二计算模块204,用于根据所述第二权值参数计算每个计算节点的任务分配误差。
在一实施例中,每个计算节点的任务分配误差e=(y(n)-y′(n))2/2,其中y(n)为所述计算节点实际分配的任务数,y′(n)为所述计算节点应该分配的任务数。所述计算节点实际分配的任务数也就是所述计算节点对应的第二权值参数之和。
每个计算节点应该分配的任务数等于所有计算节点实际分配的任务数与所述计算节点的权重占比的乘积。所有计算节点实际分配的任务数也就是所述第一权值参数之和。
判断模块205,用于判断所述任务分配误差是否满足收敛条件。
当所述任务分配误差满足收敛条件时,所述输入层节点到所述隐藏层节点的第一权值参数、所述隐藏层节点到所述输出层节点的第二权值参数表示最终的任务分配。
可以计算所述任务分配误差与前一任务分配误差的差值,判断所述差值是否小于或等于第一预设阈值,若所述差值小于或等于第一预设阈值,则满足收敛条件。或者,可以判断所述任务分配误差是否小于或等于第二预设阈值,若所述任务分配误差小于或等于第二预设阈值,则满足收敛条件。
调整模块206,用于若所述任务分配误差不满足收敛条件,则根据所述任务分配误差调整所述第二权值参数。
可以采用反向传播算法调整所述隐藏层节点到所述输出层节点的第二权值参数。反向传播算法可以参看现有技术,此处不再赘述。
在对所述隐藏层节点到所述输出层节点的第二权值参数进行调整时,需要满足所述约束条件。即每个隐藏层节点对应的第二权值参数之和为1,每个输出层节点对应的第二权值参数之和小于第一权值参数之和与所述输出层节点对应的计算节点的权重占比的乘积。
可以对所述隐藏层节点到所述输出层节点的第二权值参数进行多次调整,例如进行十次调整。
修改模块207,用于修改所述第一权值参数。
在对所述隐藏层节点到所述输出层节点的第二权值参数进行调整之后,修改输入层节点到隐藏层节点的第一权值参数。例如,对所述隐藏层节点到所述输出层节点的第二权值参数进行多次调整之后,修改输入层节点到隐藏层节点的第一权值参数。
在一实施例中,根据当前参与分配的计算任务的任务量修改所述输入层节点到所述隐藏层节点的第一权值参数。每次修改所述输入层节点到所述隐藏层节点的第一权值参数时,确定当前参与分配的计算任务中任务量最大或最小的计算任务,将该任务量最大或最小的计算任务对应的第一权值参数从1修改为0。可以交替地修改任务量最大或最小的计算任务对应的第一权值参数。例如,第一次修改将当前任务量最大的计算任务对应的第一权值参数从1修改为0,第二次修改将当前任务量最小的计算任务对应的第一权值参数从1修改为0,第三次修改将当前任务量最大的计算任务对应的第一权值参数从1修改为0,第四次修改将当前任务量最小的计算任务对应的第一权值参数从1修改为0,依此类推。
在修改所述输入层节点到所述隐藏层节点的第一权值参数之后,返回104,重新确定所述隐藏层节点到所述输出层节点的第二权值参数。
所述分布式计算系统任务分配装置20利用神经网络模型进行任务分配,神经网络模型将影响分配结果的内容筛选出来(即不进行分配),使得任务分配更为均衡,实现将计算任务均衡分配给分布式计算系统中的各个计算节点。
实施例三
本实施例提供一种存储介质,该存储介质上存储有计算机可读指令,该计算机可读指令被处理器执行时实现上述分布式计算系统任务分配方法实施例中的步骤,例如图1所示的101-107。或者,该计算机可读指令被处理器执行时实现上述装置实施例中各模块的功能,例如图2中的模块201-207。
实施例四
图3为本申请实施例四提供的计算机设备的示意图。所述计算机设备30包括存储器301、处理器302以及存储在所述存储器301中并可在所述处理器302上运行的计算机程序303,例如分布式计算系统任务分配程序。所述处理器302执行所述计算机程序303时实现上述分布式计算系统任务分配方法实施例中的步骤,例如图1所示的101-107。 或者,该计算机可读指令被处理器执行时实现上述装置实施例中各模块的功能,例如图2中的模块201-207。
示例性的,所述计算机程序303可以被分割成一个或多个模块,所述一个或者多个模块被存储在所述存储器301中,并由所述处理器302执行,以完成本方法。所述一个或多个模块可以是能够完成特定功能的一系列计算机可读指令段,该计算机可读指令段用于描述所述计算机程序303在所述计算机设备30中的执行过程。例如,所述计算机程序303可以被分割成图2中的第一计算模块201、构建模块202、确定模块203、第二计算模块204、判断模块205、调整模块206、修改模块207,各模块具体功能参见实施例二。
所述计算机设备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)、随机存取存储器。所述计算机可读存储介质可以是非易失性,也可以是易失性的。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。
上述以软件功能模块的形式实现的集成的模块,可以存储在一个计算机可读存储介质中。上述软件功能模块存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本申请各个实施例所述方法的部分步骤。
最后应说明的是,以上实施例仅用以说明本申请的技术方案而非限制,尽管参照较佳实施例对本申请进行了详细说明,本领域的普通技术人员应当理解,可以对本申请的技术方案进行修改或等同替换,而不脱离本申请技术方案的精神和范围。

Claims (20)

  1. 一种分布式计算系统任务分配方法,其中,所述方法包括:
    (a)根据分布式计算系统中每个计算节点的性能影响因素确定每个计算节点的权重,根据每个计算节点的权重计算每个计算节点的权重占比;
    (b)构建神经网络模型,所述神经网络模型包括输入层、隐藏层和输出层,所述输入层的每个输入层节点和所述隐藏层的每个隐藏层节点对应一个计算任务,所述输出层的每个输出层节点对应一个计算节点,所述输入层节点和所述隐藏层节点之间一对一连接,所述隐藏层节点和所述输出层节点之间全连接,所述输入层节点和所述隐藏层节点之间的第一权值参数初始化为1,所述第一权值参数取值为1或0,所述第一权值参数为1表示所述输入层节点对应的计算任务参与任务分配,所述第一权值参数为0表示所述输入层节点对应的计算任务不参与任务分配;
    (c)根据所述第一权值参数确定所述隐藏层节点和所述输出层节点之间的第二权值参数,所述第二权值参数取值为1或0,所述第二权值参数为1表示所述隐藏层节点对应的计算任务分配给所述输出层节点对应的计算节点,所述第二权值参数为0表示所述隐藏层节点对应的计算任务不分配给所述输出层节点对应的计算节点,所述第二权值参数满足如下约束条件:每个隐藏层节点对应的第二权值参数之和为1,每个输出层节点对应的第二权值参数之和小于第一权值参数之和与所述输出层节点对应的计算节点的权重占比的乘积;
    (d)根据所述第二权值参数计算每个计算节点的任务分配误差;
    (e)判断所述任务分配误差是否满足收敛条件;
    (f)若所述任务分配误差不满足收敛条件,则根据所述任务分配误差调整所述第二权值参数;
    (g)修改所述第一权值参数,返回(c)。
  2. 如权利要求1所述的分布式计算系统任务分配方法,其中,所述构建神经网络模型包括:
    将所述输入层节点和所述隐藏层节点根据对应的计算任务的任务量进行排列。
  3. 如权利要求1所述的分布式计算系统任务分配方法,其中,所述根据所述第二权值参数计算每个计算节点的任务分配误差包括:
    计算每个计算节点的任务分配误差e=(y(n)-y′(n)) 2/2,其中y(n)为所述计算节点对应的第二权值参数之和,y′(n)为所述第一权值参数之和与所述计算节点的权重占比的乘积。
  4. 如权利要求1所述的分布式计算系统任务分配方法,其中,所述判断所述任务分配误差是否满足收敛条件包括:
    计算所述任务分配误差与前一任务分配误差的差值,判断所述差值是否小于或等于第一预设阈值;或者
    判断所述任务分配误差是否小于或等于第二预设阈值。
  5. 如权利要求1所述的分布式计算系统任务分配方法,其中,所述修改所述第一权值参数包括:
    根据当前参与分配的计算任务的任务量修改所述第一权值参数。
  6. 如权利要求5所述的分布式计算系统任务分配方法,其中,所述根据当前参与分配的计算任务的任务量修改所述第一权值参数包括:
    将当前参与分配的计算任务中任务量最大或最小的计算任务对应的第一权值参数从1修改为0。
  7. 如权利要求1所述的分布式计算系统任务分配方法,其中,所述计算节点的性能影响因素包括如下任意一项或多项:内存大小、内存存取速度、CPU数量、主频、硬盘大小、响应时间、吞吐率。
  8. 一种计算机设备,其中,所述计算机设备包括处理器,所述处理器用于执行存储器中存储的计算机可读指令以实现以下步骤:
    (a)根据分布式计算系统中每个计算节点的性能影响因素确定每个计算节点的权重,根据每个计算节点的权重计算每个计算节点的权重占比;
    (b)构建神经网络模型,所述神经网络模型包括输入层、隐藏层和输出层,所述输入层的每个输入层节点和所述隐藏层的每个隐藏层节点对应一个计算任务,所述输出层的每个输出层节点对应一个计算节点,所述输入层节点和所述隐藏层节点之间一对一连接,所述隐藏层节点和所述输出层节点之间全连接,所述输入层节点和所述隐藏层节点之间的第一权值参数初始化为1,所述第一权值参数取值为1或0,所述第一权值参数为1表示所述输入层节点对应的计算任务参与任务分配,所述第一权值参数为0表示所述输入层节点对应的计算任务不参与任务分配;
    (c)根据所述第一权值参数确定所述隐藏层节点和所述输出层节点之间的第二权值参数,所述第二权值参数取值为1或0,所述第二权值参数为1表示所述隐藏层节点对应的计算任务分配给所述输出层节点对应的计算节点,所述第二权值参数为0表示所述隐藏层节点对应的计算任务不分配给所述输出层节点对应的计算节点,所述第二权值参数满足如下约束条件:每个隐藏层节点对应的第二权值参数之和为1,每个输出层节点对应的第二权值参数之和小于第一权值参数之和与所述输出层节点对应的计算节点的权重占比的乘积;
    (d)根据所述第二权值参数计算每个计算节点的任务分配误差;
    (e)判断所述任务分配误差是否满足收敛条件;
    (f)若所述任务分配误差不满足收敛条件,则根据所述任务分配误差调整所述第二权值参数;
    (g)修改所述第一权值参数,返回(c)。
  9. 如权利要求8所述的计算机设备,其中,所述处理器执行所述计算机可读指令以实现所述构建神经网络模型,具体包括:
    将所述输入层节点和所述隐藏层节点根据对应的计算任务的任务量进行排列。
  10. 如权利要求8所述的计算机设备,其中,所述处理器执行所述计算机可读指令以实现所述根据所述第二权值参数计算每个计算节点的任务分配误差,具体包括:
    计算每个计算节点的任务分配误差e=(y(n)-y′(n)) 2/2,其中y(n)为所述计算节点对应的第二权值参数之和,y′(n)为所述第一权值参数之和与所述计算节点的权重占比的乘积。
  11. 如权利要求8所述的计算机设备,其中,所述处理器执行所述计算机可读指令以实现所述判断所述任务分配误差是否满足收敛条件,具体包括:
    计算所述任务分配误差与前一任务分配误差的差值,判断所述差值是否小于或等于第一预设阈值;或者
    判断所述任务分配误差是否小于或等于第二预设阈值。
  12. 如权利要求8所述的计算机设备,其中,所述处理器执行所述计算机可读指令以实现所述修改所述第一权值参数,具体包括:
    根据当前参与分配的计算任务的任务量修改所述第一权值参数。
  13. 如权利要求12所述的计算机设备,其中,所述处理器执行所述计算机可读指令以实现所述根据当前参与分配的计算任务的任务量修改所述第一权值参数,具体包括:
    将当前参与分配的计算任务中任务量最大或最小的计算任务对应的第一权值参数从1修改为0。
  14. 如权利要求8所述的计算机设备,其中,所述计算节点的性能影响因素包括如下任意一项或多项:内存大小、内存存取速度、CPU数量、主频、硬盘大小、响应时间、吞吐率。
  15. 一种存储介质,所述存储介质上存储有计算机可读指令,其中,所述计算机可读指令被处理器执行时实现以下步骤:
    (a)根据分布式计算系统中每个计算节点的性能影响因素确定每个计算节点的权重,根据每个计算节点的权重计算每个计算节点的权重占比;
    (b)构建神经网络模型,所述神经网络模型包括输入层、隐藏层和输出层,所述输入层的每个输入层节点和所述隐藏层的每个隐藏层节点对应一个计算任务,所述输出层的每个输出层节点对应一个计算节点,所述输入层节点和所述隐藏层节点之间一对一连接,所述隐藏层节点和所述输出层节点之间全连接,所述输入层节点和所述隐藏层节点之间的第一权值参数初始化为1,所述第一权值参数取值为1或0,所述第一权值参数为1表示所述输入层节点对应的计算任务参与任务分配,所述第一权值参数为0表示所述输入层节点对应的计算任务不参与任务分配;
    (c)根据所述第一权值参数确定所述隐藏层节点和所述输出层节点之间的第二权值参数,所述第二权值参数取值为1或0,所述第二权值参数为1表示所述隐藏层节点对应的计算任务分配给所述输出层节点对应的计算节点,所述第二权值参数为0表示所述隐藏层节点对应的计算任务不分配给所述输出层节点对应的计算节点,所述第二权值参数满足如下约束条件:每个隐藏层节点对应的第二权值参数之和为1,每个输出层节点对应的第二权值参数之和小于第一权值参数之和与所述输出层节点对应的计算节点的权重占比的乘积;
    (d)根据所述第二权值参数计算每个计算节点的任务分配误差;
    (e)判断所述任务分配误差是否满足收敛条件;
    (f)若所述任务分配误差不满足收敛条件,则根据所述任务分配误差调整所述第二权值参数;
    (g)修改所述第一权值参数,返回(c)。
  16. 如权利要求15所述的存储介质,其中,所述计算机可读指令被所述处理器执行以实现所述构建神经网络模型,具体包括:
    将所述输入层节点和所述隐藏层节点根据对应的计算任务的任务量进行排列。
  17. 如权利要求15所述的存储介质,其中,所述计算机可读指令被所述处理器执行以实现所述根据所述第二权值参数计算每个计算节点的任务分配误差,具体包括:
    计算每个计算节点的任务分配误差e=(y(n)-y′(n)) 2/2,其中y(n)为所述计算节点对应的第二权值参数之和,y′(n)为所述第一权值参数之和与所述计算节点的权重占比的乘积。
  18. 如权利要求15所述的存储介质,其中,所述计算机可读指令被所述处理器执行以实现所述判断所述任务分配误差是否满足收敛条件,具体包括:
    计算所述任务分配误差与前一任务分配误差的差值,判断所述差值是否小于或等于第一预设阈值;或者
    判断所述任务分配误差是否小于或等于第二预设阈值。
  19. 如权利要求15所述的存储介质,其中,所述计算机可读指令被所述处理器执行以实现所述修改所述第一权值参数,具体包括:
    根据当前参与分配的计算任务的任务量修改所述第一权值参数。
  20. 一种分布式计算系统任务分配装置,其中,所述装置包括:
    第一计算模块,用于根据分布式计算系统中每个计算节点的性能影响因素确定每个计算节点的权重,根据每个计算节点的权重计算每个计算节点的权重占比;
    构建模块,用于构建神经网络模型,所述神经网络模型包括输入层、隐藏层和输出层,所述输入层的每个输入层节点和所述隐藏层的每个隐藏层节点对应一个计算任务,所述输出层的每个输出层节点对应一个计算节点,所述输入层节点和所述隐藏层节点之间一对一连接,所述隐藏层节点和所述输出层节点之间全连接,所述输入层节点和所述隐藏层节点之间的第一权值参数初始化为1,所述第一权值参数取值为1或0,所述第一权值参数为1表示所述输入层节点对应的计算任务参与任务分配,所述第一权值参数为0表示所述输入层节点对应的计算任务不参与任务分配;
    确定模块,用于根据所述第一权值参数确定所述隐藏层节点和所述输出层节点之间的第二权值参数,所述第二权值参数取值为1或0,所述第二权值参数为1表示所述隐藏层节点对应的计算任务分配给所述输出层节点对应的计算节点,所述第二权值参数为0表示所述隐藏层节点对应的计算任务不分配给所述输出层节点对应的计算节点,所述第二权值参数满足如下约束条件:每个隐藏层节点对应的第二权值参数之和为1,每个输出层节点对应的第二权值参数之和小于第一权值参数之和与所述输出层节点对应的计算节点的权重占比的乘积;
    第二计算模块,用于根据所述第二权值参数计算每个计算节点的任务分配误差;
    判断模块,用于判断所述任务分配误差是否满足收敛条件;
    调整模块,用于若所述任务分配误差不满足收敛条件,则根据所述任务分配误差调整所述第二权值参数;
    修改模块,用于修改所述第一权值参数。
PCT/CN2021/096643 2020-06-23 2021-05-28 分布式计算系统任务分配方法及相关设备 WO2021258988A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010583551.0A CN111782359B (zh) 2020-06-23 2020-06-23 分布式计算系统任务分配方法及相关设备
CN202010583551.0 2020-06-23

Publications (1)

Publication Number Publication Date
WO2021258988A1 true WO2021258988A1 (zh) 2021-12-30

Family

ID=72757289

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/096643 WO2021258988A1 (zh) 2020-06-23 2021-05-28 分布式计算系统任务分配方法及相关设备

Country Status (2)

Country Link
CN (1) CN111782359B (zh)
WO (1) WO2021258988A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114860416A (zh) * 2022-06-06 2022-08-05 清华大学 对抗场景中的分布式多智能体探测任务分配方法及装置
CN114900518A (zh) * 2022-04-02 2022-08-12 中国光大银行股份有限公司 有向分布式网络的任务分配方法、装置、介质及电子设备

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111782359B (zh) * 2020-06-23 2022-03-11 平安科技(深圳)有限公司 分布式计算系统任务分配方法及相关设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120166514A1 (en) * 2010-12-28 2012-06-28 Canon Kabushiki Kaisha Task allocation in a distributed computing system
CN106844049A (zh) * 2017-01-13 2017-06-13 广西电网有限责任公司电力科学研究院 一种分布式计算系统的任务分配方法
CN109345108A (zh) * 2018-09-26 2019-02-15 湖南人文科技学院 任务分配方法、装置、设备及存储介质
CN111782359A (zh) * 2020-06-23 2020-10-16 平安科技(深圳)有限公司 分布式计算系统任务分配方法及相关设备

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007096954A1 (ja) * 2006-02-22 2007-08-30 Saga University ニューラルネットワーク装置及びその方法
CN106384153B (zh) * 2016-09-18 2019-03-15 河海大学常州校区 基于ba-bpnn数据融合的wsan执行器任务分配方法
US11551144B2 (en) * 2018-01-30 2023-01-10 Deepmind Technologies Limited Dynamic placement of computation sub-graphs
US11315014B2 (en) * 2018-08-16 2022-04-26 EMC IP Holding Company LLC Workflow optimization
CN110198280A (zh) * 2019-05-28 2019-09-03 华南理工大学 一种基于bp神经网络的sdn链路分配方法
CN110865878B (zh) * 2019-11-11 2023-04-28 广东石油化工学院 边云协同环境中基于任务多约束的智能调度方法
CN111176820B (zh) * 2019-12-31 2021-06-25 中科院计算技术研究所大数据研究院 一种基于深度神经网络的边缘计算任务的分配方法及装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120166514A1 (en) * 2010-12-28 2012-06-28 Canon Kabushiki Kaisha Task allocation in a distributed computing system
CN106844049A (zh) * 2017-01-13 2017-06-13 广西电网有限责任公司电力科学研究院 一种分布式计算系统的任务分配方法
CN109345108A (zh) * 2018-09-26 2019-02-15 湖南人文科技学院 任务分配方法、装置、设备及存储介质
CN111782359A (zh) * 2020-06-23 2020-10-16 平安科技(深圳)有限公司 分布式计算系统任务分配方法及相关设备

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114900518A (zh) * 2022-04-02 2022-08-12 中国光大银行股份有限公司 有向分布式网络的任务分配方法、装置、介质及电子设备
CN114860416A (zh) * 2022-06-06 2022-08-05 清华大学 对抗场景中的分布式多智能体探测任务分配方法及装置
CN114860416B (zh) * 2022-06-06 2024-04-09 清华大学 对抗场景中的分布式多智能体探测任务分配方法及装置

Also Published As

Publication number Publication date
CN111782359A (zh) 2020-10-16
CN111782359B (zh) 2022-03-11

Similar Documents

Publication Publication Date Title
WO2021258988A1 (zh) 分布式计算系统任务分配方法及相关设备
Ali et al. An automated task scheduling model using non-dominated sorting genetic algorithm II for fog-cloud systems
Ningning et al. Fog computing dynamic load balancing mechanism based on graph repartitioning
Jyoti et al. Dynamic provisioning of resources based on load balancing and service broker policy in cloud computing
Salimi et al. Task scheduling using NSGA II with fuzzy adaptive operators for computational grids
CN105824686B (zh) 一种虚拟机宿主机的选择方法和选择系统
Imene et al. A third generation genetic algorithm NSGAIII for task scheduling in cloud computing
CN103701886A (zh) 一种云计算环境下的服务及资源分层调度方法
Kaliaev Multiagent approach for building distributed adaptive computing system
Grosu et al. Cooperative load balancing in distributed systems
Gandomi et al. HybSMRP: a hybrid scheduling algorithm in Hadoop MapReduce framework
CN114625500A (zh) 云环境下拓扑感知的微服务应用调度的方法及应用
CN110109955A (zh) 数据调用量统计方法、系统、计算机装置及可读存储介质
Hamed et al. Task scheduling optimization in cloud computing based on genetic algorithms
TWI498758B (zh) 資料庫引擎調流
CN103997515A (zh) 一种分布式云中计算中心选择方法及其应用
Li et al. QoS-aware and multi-objective virtual machine dynamic scheduling for big data centers in clouds
Ben Alla et al. A priority based task scheduling in cloud computing using a hybrid MCDM model
CN113608858A (zh) 一种基于MapReduce架构的数据同步用块任务执行系统
Amer et al. An efficient multi-objective scheduling algorithm based on spider monkey and ant colony optimization in cloud computing
Khan et al. Intelligent cloud-based load balancing system empowered with fuzzy logic
Pu et al. MPEFT: A novel task scheduling method for workflows
Kumar et al. Hybrid genetic algorithm for task scheduling in distributed real-time system
Wan et al. Utility-driven share scheduling algorithm in hadoop
Chai et al. Profit-oriented task scheduling algorithm in Hadoop cluster

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

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

Country of ref document: EP

Kind code of ref document: A1