WO2020238989A1 - 一种调度任务处理实体的方法及装置 - Google Patents

一种调度任务处理实体的方法及装置 Download PDF

Info

Publication number
WO2020238989A1
WO2020238989A1 PCT/CN2020/092718 CN2020092718W WO2020238989A1 WO 2020238989 A1 WO2020238989 A1 WO 2020238989A1 CN 2020092718 W CN2020092718 W CN 2020092718W WO 2020238989 A1 WO2020238989 A1 WO 2020238989A1
Authority
WO
WIPO (PCT)
Prior art keywords
task processing
entity
resource
information
cluster
Prior art date
Application number
PCT/CN2020/092718
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 WO2020238989A1 publication Critical patent/WO2020238989A1/zh
Priority to US17/538,617 priority Critical patent/US20220083375A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/63Routing a service request depending on the request content or context
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5044Allocation 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 hardware capabilities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/501Performance criteria
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5011Pool
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/503Resource availability
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/505Clust
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/509Offload

Definitions

  • This application relates to the field of communications, and in particular to a method and device for scheduling task processing entities.
  • edge computing In scenarios that face the perception of all things and connect all things, edge computing has become a trend, and edge computing has gradually been applied in industries such as the Internet of Things, big data, and artificial intelligence. Edge computing uses clusters close to the data source to process data, and edge computing is closer to users. Clusters at the edge realize data filtering and analysis, and have the characteristics of high effect and low latency.
  • the cluster located at the edge includes a cluster list, and the cluster list includes an identifier of at least one other cluster.
  • the cluster receives a task for processing data, if its own free resources cannot meet the resources required for processing the task, a cluster is randomly selected from the cluster corresponding to the identifier of each cluster included in the cluster list; query selection Whether the idle resources in the cluster meet the resources required to process the task, if so, schedule the selected cluster to process the task, if not, reselect a cluster ID from the cluster list, and then query according to the above steps The selected cluster.
  • a cluster that satisfies the resources required by the task may be queried after multiple selections, and it takes a long time to query the cluster, which leads to a high delay required to successfully schedule the cluster.
  • the embodiments of the present application provide a method and device for scheduling a task processing entity to improve the efficiency of the scheduling task processing entity.
  • the technical solution is as follows:
  • this application provides a method for scheduling a task processing entity.
  • a first task processing entity receives a task processing request message, and the task processing request message carries resource requirement information required by the task to be processed, so
  • the resource demand information includes at least the resource type and resource demand required for processing the task to be processed, the first task processing entity is a cluster or a device; the idle resources included in the first task processing entity do not satisfy the For resource requirement information, the first task processing entity determines m second task processing entities according to the entity status information table and the resource requirement information, and the entity status information table includes at least one item received by the first task processing entity
  • the entity information sent by the second task processing entity, the entity information sent by the second task processing entity includes the identity, status and idle resource information of the second task processing entity, and the idle resource information includes at least the second task processing entity
  • the resource type and the number of free resources in the idle resources in the table, the state of each second task processing entity in the m second task processing entities recorded in the entity state information table is in the idle state and each The
  • the query range can be reduced, and The probability of finding the second task processing entity whose idle resources meet the resource demand information is increased, which improves the query efficiency and further improves the scheduling efficiency.
  • the first task processing entity obtains entity information of the first task processing entity, and sends the entity information to each task processing entity in the entity list, and the entity list includes An identification of at least one task processing entity other than the first task processing entity. So that other task processing entities establish an entity state information table based on the entity information of the first task processing entity.
  • the first task processing entity obtains each resource type included in the first task processing entity, the number of free resources and the total amount of resources corresponding to each resource type; A task processing entity determines the state of the first task processing entity according to the number of idle resources and the total amount of resources corresponding to each resource type.
  • the number of idle resources and the total amount of resources corresponding to each resource type included in each node in the cluster are obtained; according to each resource type included in each node, the total amount of resources
  • the number of idle resources and the total amount of resources corresponding to each resource type determine the status of each node; determine the status of the cluster according to the status of each node.
  • the resource usage rate corresponding to each resource type in the node is obtained according to the number of free resources and the total amount of resources corresponding to each resource type included in the node;
  • the maximum resource utilization rate in the corresponding resource utilization rate is greater than or equal to the preset utilization rate threshold, it is determined that the state of the node is busy; when the maximum resource utilization rate is less than the preset utilization rate threshold, the node is determined The status is idle.
  • the number of busy nodes and the total number of nodes in the cluster are obtained; according to the number of busy nodes and the total number of nodes, the ratio of busy nodes and the total number of idle nodes are obtained.
  • the first task processing entity sends a query request message to each of the m second task processing entities, and the query request message carries the resource requirement Information, the query request message is used by the second task processing entity to query whether the idle resources it includes meets the resource requirement information; receive the query result sent by each of the second task processing entities; select the first received idle The resource satisfies the query result of the resource requirement information; the second task processing entity sending the selected query result is scheduled to process the to-be-processed task.
  • the scheduling efficiency is further improved.
  • the first task processing entity receives entity information of at least one second task processing entity; the first task processing entity obtains entity information of the at least one second task processing entity The entity information of the n second task processing entities in the idle state, where n is an integer greater than or equal to 1; the first task processing entity processes each second task according to the n second task processing entities The entity information of the entity, the second task processing entity whose status is about to become busy is determined through a predictive model; the first task processing entity removes those that are about to become busy from the entity information of the n second task processing entities The entity information of the second task processing entity forms the entity state information table with the remaining entity information of the second task processing entity.
  • m second task processing entities are determined according to the entity state information table, the m second task processing entities are queried, and the free resources are queried to satisfy the resources The probability of the second task processing entity requiring information will be greatly improved.
  • this application provides an apparatus for scheduling a task processing entity, which is used to execute one aspect or any one of the optional implementation methods of the aspect.
  • the device includes a unit for executing one aspect or any optional implementation method of the aspect.
  • the present application provides an apparatus for scheduling a task processing entity.
  • the apparatus includes: at least one processor, at least one memory, and at least one transceiver.
  • the at least one processor is connected to the at least one memory via a bus.
  • Connected to at least one transceiver; the at least one memory stores one or more programs, the one or more programs are configured to be executed by the at least one processor, and the one or more programs include Instructions for one aspect or any one of the possible implementation manners.
  • the present application provides a computer-readable storage medium with instructions stored in the computer-readable storage medium, which when run on a computer, cause the computer to execute any optional implementation of the above-mentioned aspect or aspects method.
  • the present application provides a computer program product containing instructions, which when run on a computer, causes the computer to execute the above-mentioned aspect or any optional implementation method of the aspect.
  • FIG. 1 is a schematic diagram of a network architecture provided by an embodiment of the present application.
  • FIG. 2 is a schematic diagram of another network architecture provided by an embodiment of the present application.
  • FIG. 3 is a schematic diagram of another network architecture provided by an embodiment of the present application.
  • FIG. 4 is a flowchart of a method for obtaining a cluster state information table provided by an embodiment of the present application
  • Fig. 5 is a flowchart of a method for scheduling a cluster provided by an embodiment of the present application.
  • Fig. 6 is a flowchart of a method for obtaining a device status information table provided by an embodiment of the present application
  • FIG. 7 is a flowchart of a method for scheduling equipment provided by an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of an apparatus for scheduling a task processing entity provided by an embodiment of the present application.
  • Fig. 9 is a schematic structural diagram of another apparatus for scheduling a task processing entity provided by an embodiment of the present application.
  • an embodiment of the present application provides a network architecture, which is a distributed network architecture including multiple task processing entities.
  • the multiple task processing entities are distributed in the same local area network, or the multiple task processing entities are distributed in different local area networks, and the multiple task processing entities are connected through a network.
  • the task processing entity is called the first task processing entity.
  • the first task processing entity may receive entity information sent by at least one second task processing entity, and entity information sent by the second task processing entity Including the identification, status and idle resource information of the second task processing entity, the idle resource information including at least the resource type and the number of idle resources of each idle resource in the second task processing entity, according to the entity sent by at least one second task processing entity
  • the information generates an entity state information table, and the entity state information table is used to store the entity information of the second task processing entity in the idle state.
  • the first task processing entity can receive a task processing request message, the task processing request message carrying resource demand information required by the task to be processed, and the resource demand information includes the resource type and resource demand required by the task to be processed.
  • the first task processing entity determines m second task processing entities according to the entity state information table and the resource demand information, and the m second task processing entities
  • the state of each second task processing entity in is an idle state and the number of idle resources corresponding to the resource type in each second task processing entity is greater than the resource demand, and m is an integer greater than or equal to 1.
  • the first task processing entity queries from the m second task processing entities the second task processing entity that includes idle resources that meet the resource requirement information, and schedules the queried second task processing entity to process the pending tasks.
  • the information that the idle resources included in the first task processing entity meet the resource requirement information means that the amount of idle resources corresponding to the resource type in the first task processing entity is greater than the resource requirement amount.
  • the information that the idle resources included in the first task processing entity do not meet the resource requirement means that the amount of idle resources corresponding to the resource type in the first task processing entity is less than or equal to the resource requirement amount.
  • the task processing entity may be a cluster or a device, the cluster may be an edge cluster, and the device may be an edge device or an end-side device.
  • the network architecture includes multiple clusters, and a network connection is established between any two clusters in the multiple clusters.
  • the cluster is called the first cluster.
  • the first cluster includes at least one node. There is a master node in the at least one node.
  • the master node is called the first cluster.
  • the master node, the first master node can establish a network connection with each other node.
  • the first master node is used to manage at least one node included in the first cluster.
  • the first master node may receive a task processing request message from a terminal, select a node from the at least one node, and trigger the selected node to process the task processing request The task corresponding to the message.
  • the first master node may obtain the number of idle resources and the total amount of resources corresponding to each resource type currently included by each node in the first cluster.
  • the first master node can obtain the number of idle resources and the total amount of resources corresponding to each resource type included in the node, and save each type of resource included in the node The number of free resources and total resources corresponding to the resource type. After that, the first master node can periodically or irregularly query the number of free resources corresponding to each resource type currently included in the node, and update the stored number of free resources corresponding to each resource type in the node to the currently queried number of free resources. The number of free resources corresponding to each resource type.
  • the node sends the resource type and the current idle resource quantity to the first master node, and the first master node receives the resource type and the current idle resource quantity,
  • the number of idle resources corresponding to the resource type in the node saved is updated to the received current number of idle resources.
  • the first master node receives the task processing request message, the task processing request message carries the resource demand information required by the task to be processed, and the resource demand information includes at least the resource type and resource demand amount, etc., according to the information currently included in each node
  • the number of free resources corresponding to the resource type and the resource demand are determined to determine whether there is a target node in the first cluster.
  • the target node is the node whose free resource corresponding to the resource type included in the first cluster meets the resource demand information. If there is a target, Node, select a node from the target nodes, and trigger the selected node to process the task corresponding to the task processing request message.
  • the first master node can query other clusters that include the idle resource corresponding to the resource type to meet the resource demand information, forward the task processing request message to the other cluster, and the other cluster will process the task processing request message The corresponding task.
  • the first master node may determine m second clusters according to the cluster status information table and the resource demand information, the cluster status information table includes cluster information of at least one second cluster other than the first cluster, and the cluster information of the second cluster includes The identifier of the second cluster, the state of the second cluster, and the number of idle resources corresponding to each resource type included in the nodes in the second cluster, and the states of the m second clusters recorded in the cluster state information table are all idle State and the number of free resources corresponding to the resource type included in each second cluster of the m second clusters is greater than the resource demand, and m is an integer greater than or equal to 1; query each of the m second clusters Whether the idle resources actually included in the second cluster currently meet the resource requirement information, when the second cluster meeting the resource requirement information is queried, the queried second cluster is scheduled to process the pending tasks.
  • each second cluster in the m second clusters recorded in the cluster status information table is greater than the resource demand, and the states of the m second clusters are all idle states . This can reduce the scope of the query, and each second cluster in the m second clusters currently actually includes the number of free resources corresponding to the resource type is greater than the resource demand, so the probability of querying the m In the second cluster, the second cluster in which the current actual idle resources meet the resource demand information can be quickly queried, thereby improving query efficiency and further improving scheduling efficiency.
  • the first master node may obtain the cluster information of the first cluster, and broadcast the cluster information of the first cluster to other clusters.
  • the first master node may acquire and broadcast the cluster information of the first cluster periodically, randomly, or in situations such as event triggering.
  • the cluster information of the first cluster includes the identification and status of the first cluster, and the number of free resources corresponding to each resource type included in the nodes in the first cluster.
  • the first master node obtains the cluster information of the first cluster in the following manner, which can be:
  • the first master node obtains the identifier of the first cluster it saves, and obtains the number of free resources and the total amount of resources corresponding to each type of resource currently included in each node in the first cluster; The number of free resources corresponding to the resource type and the total amount of resources determine the status of each node; determine the status of the first cluster according to the status of each node, thereby obtaining cluster information of the first cluster.
  • the node For each node, for the convenience of explanation, the node is called the target node.
  • the first master node is determined in the following way, which can be:
  • the first master node can obtain the resource usage rate corresponding to each resource type in the target node according to the number of free resources corresponding to each resource type included in the target node and the total amount of resources; among the resource usage rates corresponding to each resource type When the maximum resource usage rate is greater than or equal to the preset usage rate threshold, the status of the target node is determined to be busy; when the maximum resource usage rate among the resource usage rates corresponding to each resource type is less than the preset usage rate threshold, the target node is determined The status is idle.
  • the first master node is determined in the following way, which can be:
  • the first master node obtains the number of busy nodes included in the first cluster and the total number of nodes included in the first cluster; according to the number of busy nodes and the total number of nodes, obtains the ratio of busy nodes and the number of idle nodes.
  • the number of nodes in the state when the ratio is greater than or equal to the preset ratio threshold and the number of nodes in the idle state is less than the preset number threshold, it is determined that the state of the first cluster is busy; when the ratio is greater than or equal to the preset ratio threshold and When the number of nodes in the idle state is greater than or equal to the preset number threshold or when the ratio is less than the preset ratio threshold, it is determined that the state of the first cluster is the idle state.
  • the first master node may include a cluster resource pool, and the cluster resource pool includes an identifier of at least one second cluster other than the first cluster, and the first master node may be based on each second cluster included in the cluster resource pool.
  • the cluster identifier broadcasts the acquired cluster information to each second cluster.
  • the master node of each cluster in the network architecture broadcasts the cluster information of the cluster where it is located in the above manner.
  • the first master node obtains the cluster state information table in the following manner, which may be:
  • the first master node receives the cluster information of at least one second cluster other than the first cluster.
  • the cluster information of the second cluster includes the identification and status of the second cluster, and the corresponding resource types included in the nodes in the second cluster The amount of free resources; the cluster information of n second clusters whose state of the second cluster is idle is obtained from the cluster information of the at least one second cluster, where n is an integer greater than or equal to m; according to the n second clusters
  • the cluster information of each second cluster in the second cluster is determined by the predictive model; the second cluster that is about to become busy is removed from the cluster information of the n second clusters
  • the cluster information of the cluster composes the cluster status information table of the remaining cluster information of the second cluster.
  • the prediction model may be a machine learning algorithm or a convolutional neural network that has been trained in advance.
  • a plurality of first sample data can be preset in advance.
  • the first sample data is cluster information of a cluster, and the state of the cluster is an idle state.
  • the technician analyzes the cluster information of the cluster to find whether the cluster is about to become busy, and saves the analysis result to the first sample data to obtain the second sample data.
  • Use the obtained second sample data to train a machine learning algorithm or a convolutional neural network to obtain a prediction model.
  • the first master node can input the cluster information of the n second clusters into the prediction model.
  • the prediction model is used according to each of the nodes included in the cluster information of the second cluster.
  • the number of free resources corresponding to the resource type predicts whether the status of the second cluster is about to become busy; the first master node obtains the prediction result of the second cluster output by the prediction model, and if the prediction result is the first If the status of the second cluster is about to change to a busy status, the cluster information of the second cluster is discarded; otherwise, the cluster information of the second cluster is added to the cluster status information table.
  • the cluster may broadcast the cluster information of the cluster periodically, randomly, or triggered by an event.
  • the first master node can continuously receive cluster information sent by different second clusters, and construct a cluster state information table periodically or irregularly according to the received cluster information.
  • the first master node may also replace the cluster state information table constructed last time with the cluster state information table currently constructed.
  • the network architecture includes multiple devices, and a network connection is established between any two devices of the multiple devices.
  • the first device may receive a task processing request message, which carries resource demand information required by the task to be processed, and the resource demand information includes the resource type and resource demand required by the task to be processed, and when it includes idle When the resource meets the resource requirement information, the task corresponding to the task processing request message is processed.
  • the second device whose idle resources are included to meet the resource requirement information may be queried, and the queried second device may be scheduled to process the task to be processed.
  • the first device may determine m second devices according to the device status information table and the resource requirement information.
  • the device status information table includes device information of at least one second device other than the first device, and the device information of the second device includes the first device.
  • the identification of the second device, the state of the second device, and the resource type and the number of free resources corresponding to each kind of free resource included in the second device, and the states of the m second devices recorded in the device state information table are all in the idle state And the number of free resources corresponding to the resource type in the m second devices is greater than the resource demand, and m is an integer greater than or equal to 1; query each second device in the m second devices actually includes Whether idle resources meet the resource requirement information, when a second device that meets the resource requirement information is queried, the queried second device is scheduled to process the pending task.
  • the number of idle resources corresponding to the resource type in the m second devices recorded in the device status information table is greater than the resource demand and the states of the m second devices are all idle, this can reduce the query Range, and each second device of the m second devices currently actually includes the number of free resources of the resource type that is greater than the resource demand. Therefore, it is possible to query the m second devices quickly The second device whose current actual idle resource meets the resource demand information is queried, thereby improving query efficiency and further improving scheduling efficiency.
  • the first device can obtain its device information and broadcast the device information to other devices.
  • the first device may acquire and broadcast its device information periodically, randomly, or in situations such as event triggering.
  • the device information of the first device includes the identification and status of the first device, and the number of idle resources corresponding to each resource type included in the first device.
  • the first device may include a device list, and the device list includes the identification of at least one other device except the first device.
  • the first device may report to each device according to the identification of each device included in the device list. Broadcast the device information it obtains.
  • Each device in the network architecture broadcasts its own device information in the above manner.
  • the first device obtains the device state information table in the following manner, which may be:
  • the first device receives device information of at least one second device other than the first device, the device information of the second device includes the identification and status of the second device, and the resource type and idle resource of each idle resource included in the second device Quantity; obtain the device information of the n second devices in the idle state from the device information of the at least one second device, where n is an integer greater than or equal to m; according to each second device in the n second devices The device information of the device is used to determine the second device whose status is about to become busy through the prediction model; the device information of the second device that is about to become busy is removed from the device information of the n second devices, and the remaining second device
  • the device information of the second device constitutes the device status information table.
  • the first device can input the device information of the n second devices into the prediction model, and for each second device, the prediction model uses the number of free resources corresponding to each resource type included in the device information of the second device, Predict whether the state of the second device is about to become busy; the first device obtains the prediction result obtained by predicting the second device output by the prediction model, and if the prediction result is that the state of the second device is about to become busy , The device information of the second device is discarded, otherwise, the device information of the second device is added to the device status information table.
  • a plurality of first sample data can be preset in advance.
  • the first sample data is device information of a device, and the state of the device is an idle state.
  • the technician analyzes the device information of the device to find whether the device is about to become busy, and saves the analysis result to the first sample data to obtain the second sample data.
  • Use the obtained second sample data to train a machine learning algorithm or a convolutional neural network to obtain a prediction model.
  • the device may broadcast its device information periodically, randomly, or triggered by an event.
  • the first device may receive the device information of the at least one device each time, and construct the device state information table in the above-mentioned manner based on the device information received each time.
  • the first device may also replace the device state information table constructed last time with the device state information table currently constructed.
  • the master node in the cluster needs to obtain and save the cluster state information table, so as to ensure that the idle resources included in the cluster where the master node is located cannot meet the resource demand information required for processing tasks ,
  • the master node can efficiently query other clusters whose idle resources meet the resource demand information based on the cluster status information table, and schedule the queried cluster to process pending tasks.
  • the present application provides a method for obtaining a cluster state information table. The method can be applied to the network architecture shown in Fig. 1 or Fig. 2, and the method includes:
  • Step 101 The first master node of the first cluster obtains the resource type and the number of free resources of each idle resource currently included in each node in the first cluster, and the total amount of resources corresponding to each resource type.
  • the first cluster is any cluster in the network architecture.
  • the resource type included in the node may be a central processing unit (CPU), a graphics processing unit (GPU), and/or memory.
  • the number and total amount of each kind of free resources currently included in the node may be the number of free CPUs currently included in the node and the total number of CPUs, the number of free GPUs and the total number of GPUs, and/or the free memory size and the total memory size, etc.
  • the master node executes this step periodically, randomly, or when triggered by an event.
  • the first implementation manner the first master node can query the number of free resources corresponding to each resource type currently included in each node in the first cluster, and obtain the total amount of resources corresponding to each resource type included in each node.
  • the first master node may send a query request message to each node in the first cluster. For any node in the first cluster, when the node receives the query request message, it obtains the number of free resources corresponding to each resource type it currently includes, and sends a query response message to the first master node.
  • the query response message includes every Resource types and the number of free resources corresponding to each resource type.
  • the node may also obtain the total amount of resources corresponding to each resource type it includes, and the query response message sent to the master node may also include the total amount of resources corresponding to each resource type.
  • the first master node receives the query response message, and extracts each resource type currently included in the node and the total amount of free resources corresponding to each resource type from the query response message.
  • the first master node extracts the total amount of resources corresponding to each resource type in the node from the query response message .
  • the first master node may, according to the identifier of the node, from the corresponding relationship between the identifier, the resource type, and the total amount of resources Get the total amount of resources corresponding to each resource type included in the node.
  • each resource type included in the nodes in the first cluster and the total amount of resources corresponding to each resource type may be manually input to the first master node, or the first master node Query each resource type included in the node in the first cluster and the total amount of resources corresponding to each resource type, or, the node in the first cluster actively sends each resource type and each resource it includes to the first master node The total amount of resources corresponding to the type.
  • the first master node obtains each resource type included in the node and the total amount of resources corresponding to each resource type, it can save the identification of the node, each resource type included in the node, and the total amount of resources corresponding to each resource type. In the correspondence between identification, resource type and total resource.
  • the first master node may manually input each resource type included in the node and the total amount of resources corresponding to each resource type to the first master node, or the first master node queries the Each resource type included in the node and the total amount of resources corresponding to each resource type, or the node sends each included resource type and the total amount of resources corresponding to each resource type to the first master node.
  • the first master node correspondingly saves the identifier of the node, each resource type included in the node, and the total amount of resources corresponding to each resource type in the corresponding relationship between the identifier, the resource type, and the total resource.
  • the first master node can receive the query response message sent by each node in the first cluster, so as to obtain each resource type and each resource type included in each node based on the query response message of each node.
  • the second implementation mode the first master node can store the corresponding relationship between the identifier, the resource type, the number of free resources, and the total amount of resources.
  • the corresponding relationship is used to store the identifier of the node in the first cluster and the resources currently included in the node Type, the number of free resources and total resources corresponding to the resource type.
  • the first master node may obtain, from the correspondence relationship, each resource type in each node included in the first cluster, the number of idle resources and the total amount of resources corresponding to each resource type.
  • the corresponding relationship between the identifier, the resource type, the number of idle resources, and the total amount of resources saved by the first master node may be established when the first cluster is created.
  • the first master node can query each resource type included in the nodes in the first cluster, the number of free resources and the total amount of resources corresponding to each resource type, or, the nodes in the first cluster report to the first The master node sends each resource type it includes, and each resource type corresponds to the number of idle resources and the total amount of resources.
  • the first master node When the first master node obtains each resource type included in the node, the number of free resources corresponding to each resource type, and the total amount of resources, it can identify the node's identity, each resource type included in the node, and the free resource type corresponding to each resource type.
  • the number of resources and the total amount of resources are correspondingly stored in the corresponding relationship between the identifier, the resource type, the number of free resources, and the total amount of resources.
  • the first master node After the first master node establishes the corresponding relationship between the identifier, the resource type, the number of free resources, and the total amount of resources, it can update the corresponding relationship between the identifier, the resource type, the number of free resources, and the total amount of resources in the following situations.
  • the several situations are:
  • the first master node can query the number of free resources and the total amount of resources corresponding to each resource type included in the node, or the node sends the information to the first master node.
  • the first master node correspondingly stores the identifier of the node, each resource type included in the node, the number of free resources corresponding to each resource type, and the total amount of resources in the corresponding relationship between the identifier, resource type, number of free resources, and total resource in.
  • the first master node can periodically query the number of free resources corresponding to each resource type currently included in the nodes in the first cluster, and the corresponding relationship between the identifier, the resource type, the number of free resources, and the total amount of resources
  • the number of free resources corresponding to each resource type corresponding to the identifier of the node is updated to the number of free resources corresponding to each resource type currently included in the node.
  • the node when the idle resource corresponding to a certain resource type included in the node in the first cluster changes, the node sends the resource type and the current idle resource quantity to the first master node.
  • the first master node receives the resource type and the current number of free resources, and updates the number of free resources corresponding to the resource type corresponding to the node's identifier in the corresponding relationship between the identifier, resource type, number of free resources, and total resource to the current The number of free resources.
  • Step 102 The first master node determines the status of each node according to the number of idle resources and the total amount of resources corresponding to each resource type included in each node.
  • the status of the node can be busy or idle.
  • the resource usage rate corresponding to each resource type in the node is obtained according to the number of free resources and total resources corresponding to each resource type included in the node;
  • the maximum resource utilization rate in the resource utilization rate is greater than or equal to the preset utilization rate threshold, the node is determined to be busy; the maximum resource utilization rate in the resource utilization rate corresponding to each resource type is less than the preset utilization rate threshold When the node is in the idle state.
  • the resource usage rate corresponding to each resource type in the node can be obtained by the following first formula, and The state of the node is determined by the following second formula.
  • the first formula is:
  • P i is the resource utilization rate corresponding to the i-th resource type
  • Idle i is the number of idle resources corresponding to the i-th resource type
  • Total i is the number of idle resources and the total resource corresponding to the i-th resource type. the amount.
  • the second formula is:
  • State(Node) is the state of the node
  • M is the preset usage rate threshold
  • max(P i ) is the maximum resource usage rate among the resource usage rates corresponding to each resource type.
  • the second formula indicates: when max(P i ) is greater than or equal to M, State(Node) is equal to the busy state; when max(P i ) is less than M, State(Node) is equal to the idle state.
  • the node may also determine its own state through the above first formula and second formula, and send its own state to the first master node.
  • Step 103 The first master node determines the state of the first cluster according to the state of each node included in the first cluster.
  • the state of the first cluster may be a busy state or an idle state.
  • the first master node obtains the number of busy nodes and the total number of nodes in the first cluster; according to the number of busy nodes and the total number of nodes, obtain the ratio of busy nodes and the number of idle nodes ;
  • the state of the first cluster is determined to be busy; when the ratio is greater than or equal to the preset ratio threshold and the number of nodes in the idle state When it is greater than or equal to the preset number threshold or when the ratio is less than the preset ratio threshold, it is determined that the state of the first cluster is an idle state.
  • the first master node stores the corresponding relationship between the identifier, the resource type, the number of free resources, and the total resource, or the corresponding relationship between the identifier, the resource type, and the total resource.
  • the first master node may count the number of node identifiers included in any one of the above-mentioned two corresponding relationships stored therein to obtain the total number of nodes in the first cluster.
  • the ratio of busy nodes and the number of idle nodes are obtained by the following third formula, and the state of the first cluster is determined.
  • the third formula is:
  • State(cluster) is the state of the first cluster
  • q is the ratio of nodes in the busy state
  • x is the number of nodes in the busy state
  • y is the total number of nodes in the first cluster
  • W is the preset Ratio threshold
  • u is the preset ratio threshold.
  • the third formula says: when q is greater than or equal to W and yx is less than u, State(cluster) is equal to the busy state; when q is greater than or equal to W and yx is greater than or equal to u, State(cluster) is equal to the idle state; when q is less than When W, State (cluster) is equal to the idle state.
  • Step 104 The first master node broadcasts the cluster information of the first cluster to each second cluster in the cluster resource pool.
  • the cluster information includes the identifier, status, and free resource information of the first cluster, and the free resource information includes at least the first cluster.
  • the resource type and the number of idle resources of each kind of idle resources included in the nodes in the cluster, and the cluster resource pool includes at least one identifier of the second cluster except the first cluster.
  • the identification of the first cluster is stored in the first master node, and the identification of the first cluster in the cluster information may be the identification of the first cluster saved by the master node.
  • the first master node may also store the cluster type of the first cluster, and the cluster information may further include information such as the cluster type and/or the number of idle nodes included in the first cluster.
  • the first master node includes a cluster resource pool
  • the cluster resource pool may be established in advance by the first master node, or may be configured in the first master node in advance by a technician.
  • the first master node may periodically broadcast a detection message, and the detection message may include the identifier of the first cluster. Similarly, the first master node may also receive detection messages sent by master nodes of other clusters, and add the identifiers of other clusters included in the detection message to the cluster resource pool.
  • a time is randomly selected between the start time of each cycle and the first time, and the detection message is broadcast at the selected time, where the first The length of time between the time and the starting time is a first preset length, and the first preset length is less than the period length of the period.
  • the first master node randomly selects a time between the start of each cycle and the first time and broadcasts the detection message at the selected time, this prevents the master nodes in all clusters in the local area network from broadcasting detection messages at the same time. Avoid causing conflicts and broadcast storms.
  • the period length of the period may remain unchanged, or the first master node may gradually increase the period length of the period, so as to reduce the number of broadcast detection messages and the communication volume of messages to reduce the number of Occupation of network resources.
  • the first master node After the first master node broadcasts the probe message for the first time, it increases the period length of the period at regular intervals.
  • the length of the period of time is greater than the period length of the period.
  • the time length of the period of time may be equal to z times the period length of the period, z is a value greater than 1, and z may be an integer or a non-integer.
  • the time length of a period of time in each interval may be equal, and the time length may be a second preset length, or a length determined by the first master node itself.
  • the time length of a period of time in each interval may not be equal, and the time length may be set by the first master node.
  • the user can configure the cluster resource pool in the first master node.
  • Step 105 The first master node receives the cluster information of at least one second cluster other than the first cluster, and composes the cluster information table of the second cluster in the idle state in the at least one second cluster.
  • the master node in each cluster in the network architecture shown in FIG. 1 broadcasts the cluster information of the respective cluster according to steps 101 to 104. Therefore, for the first master node of the first cluster, the first master node will receive cluster information of at least one second cluster except the first cluster.
  • the first master node can obtain the cluster information of the n second clusters in the idle state from the cluster information of the at least one second cluster, where n is an integer greater than 0, and the n second clusters
  • the cluster information constitutes the cluster status information table.
  • the first master node determines the second cluster whose status is about to become busy according to the cluster information of each second cluster in the n second clusters, from the cluster information of the n second clusters
  • the cluster information of the second cluster that is about to become busy is removed, and the remaining cluster information of the second cluster forms a cluster state information table.
  • the first master node of each cluster in the network architecture shown in FIG. 1 or FIG. 2 broadcasts the cluster information of the cluster where it is located randomly, periodically, or triggered by an event. Therefore, the first master node can obtain the cluster status information table according to the received cluster information whenever it receives the cluster information of each second cluster in the cluster resource pool; or, the first master node can generate the cluster every time interval.
  • the time length of each interval can be equal or unequal.
  • the time length of the interval can be set by the first master node or can be a preset value.
  • the first master node can be based on the difference between the first time and the current time.
  • the cluster information received in time generates a cluster state information table, and the first time is the time when the cluster state information table was last generated.
  • the cluster state information table includes cluster information of the cluster whose current state is idle, so that when the first master node queries the cluster, the cluster state information table
  • the information table can first determine m second clusters.
  • the cluster status information table the status of the m second clusters is idle and the m second clusters include the number of free resources corresponding to the resource type required by the task. More than the resource demand required by the task, and then query the m second clusters, the query efficiency can be improved.
  • an embodiment of the present application provides a method for scheduling a task processing entity.
  • the method can be applied to the network architecture shown in FIG. 1 or FIG. 2, and the task processing entity is a cluster in the method, including:
  • Step 201 The first master node in the first cluster receives a task processing request message sent by a terminal, and the task processing request message carries resource requirement information required by the task to be processed.
  • the first cluster is any cluster in the network architecture, and the resource demand information may include resource type and resource demand.
  • Step 202 The first master node determines whether there is a node in the first cluster whose idle resources meet the resource requirement information, and if not, execute step 203.
  • the first master node may obtain the number of free resources corresponding to the resource type included in each node in the first cluster, and determine whether there is a node with a greater number of free resources corresponding to the resource type than the resource demand, and if the node does not exist, It is determined that there is no node in the first cluster whose idle resource satisfies the resource requirement information, and if the node exists, it is determined that there is a node in the first cluster whose idle resource satisfies the resource requirement information.
  • the first master node can select a node from the determined nodes, send the task processing request message to the selected node, and the selected node will process it. Processing tasks.
  • Step 203 The first master node determines m second clusters according to the cluster status information table and the resource demand information, the status of the m second clusters is in an idle state, and each second cluster in the m second clusters The included amount of free resources corresponding to the resource type is greater than the resource demand, and m is an integer greater than or equal to 1.
  • a cluster state information table is stored in the first master node, the cluster state information table includes cluster information of at least one second cluster other than the first cluster, and the cluster information of the second cluster includes the identifier of the second cluster and the state of the second cluster And free resource information, the free resource information includes information such as the resource type and the number of free resources of each kind of free resources included in the nodes in the second cluster.
  • the first master node may obtain and store the cluster state information table through the method shown in FIG. 4, which will not be described in detail here.
  • the first master node determines the second cluster in the idle state from the cluster status information table. For each determined second cluster, if a node in the second cluster includes the idle state corresponding to the resource type The number of resources is greater than the resource demand corresponding to the resource type, and it is determined that the number of idle resources corresponding to the resource type included in the second cluster is greater than the resource demand. Select m second clusters from the second clusters in which the number of free resources corresponding to the resource type is greater than the resource demand.
  • Step 204 The first master node queries the second clusters in the m second clusters whose current actual idle resources meet the resource demand information, and schedules the queried second clusters to process the pending tasks.
  • the first master node reads the identifier of each second cluster from the cluster information of each second cluster in the m second clusters, and concurrently sends each second cluster to each The second cluster sends a query request message, which carries resource requirement information required by the task to be processed.
  • the resource demand information includes resource type and resource demand amount.
  • the second master node of the second cluster receives the query request message, and queries whether the second cluster has the number of idle resources corresponding to the resource type included in a certain node Whether it is greater than the resource demand; if it is found that the number of free resources corresponding to the resource type included in the existing node is greater than the resource demand, the query result is sent to the first master node, and the query result is that the free resources included in the second cluster satisfy The resource demand letter; if it is found that the number of free resources corresponding to the resource type included in the non-existent node is greater than the resource demand, the query result is sent to the first master node, and the query result is that the free resources included in the second cluster are not satisfied The resource demand letter.
  • the first master node receives the query result sent by each second cluster, selects the sent query result as the second cluster whose idle resources meet the resource demand information, and schedules the selected second cluster to process the pending tasks.
  • the first master node may select a query result in which the idle resource received for the first time satisfies the resource requirement information, determine a second cluster that sends the selected query result, and schedule the determined second cluster to process pending tasks.
  • the cluster status information table includes cluster information of the second cluster in the idle state, so that the first master node queries the cluster for the task to be processed
  • the second cluster that is idle and includes the resource demand information required by the task can be determined first, and then the determined cluster is queried, and the query range becomes smaller, because each second cluster Including the current actual idle resources have a greater probability of meeting the resource demand information, so when querying the m second clusters, the second cluster whose current actual idle resources meet the resource demand information can be quickly queried, which can improve query efficiency , Thereby improving scheduling efficiency.
  • the device in the network architecture obtains and saves the device state information table, so as to ensure that when the idle resources included in the device cannot meet the idle resources of the resource type required for processing tasks,
  • the device can efficiently query and schedule other devices that have idle resources to satisfy processing tasks based on the device status information table.
  • the present application provides a method for obtaining a device status information table. The method can be applied to the network architecture shown in FIG. 1 or FIG. 3. The method includes:
  • Step 301 The first device obtains the resource type and the number of free resources of each type of free resource currently included, and the total amount of resources corresponding to each resource type.
  • the first device is any device in the network architecture.
  • the type of resources included in the first device may be CPU, GPU, and/or memory.
  • the number and total amount of each kind of free resources currently included in the first device may be the number of free CPUs currently included in the first device and the total number of CPUs, the number of free GPUs and the total number of GPUs, and/or the size of free memory and the total size of memory Wait.
  • the first device may obtain its device information periodically, randomly, or in situations such as event triggering. When the first device determines to obtain its device information, it starts to perform this step.
  • Step 302 The first device determines the state of the first device according to the number of idle resources and the total amount of resources corresponding to each resource type.
  • the state of the first device may be a busy state or an idle state.
  • the resource usage rate corresponding to each resource type is obtained according to the number of free resources and total resources corresponding to each resource type; the maximum resource usage rate in the resource usage rate corresponding to each resource type is greater than or equal to the expected
  • the utilization rate threshold is set, the state of the first device is determined to be the busy state; when the maximum resource utilization rate among the resource utilization rates corresponding to each resource type is less than the preset utilization rate threshold, the state of the first device is determined to be the idle state.
  • Step 303 The first device broadcasts the device information of the first device to each second device in the device list.
  • the device information of the first device includes the identification, status and idle resource information of the first device, and the idle resource information includes at least the first device.
  • the resource type and the number of free resources of each kind of idle resource in a device, and the device list includes an identifier of at least one second device other than the first device.
  • the first device includes a device list
  • the device list may be established by the first device before performing this step, or may be configured in the first device by a technician in advance.
  • the first device may periodically broadcast a detection message, and the detection message may include the identification of the first device. Similarly, the first device may also receive a detection message sent by another device, and add the identification of the other device included in the detection message to the device list.
  • the first device may periodically broadcast the detection message, randomly select a time between the start time of each cycle and the first time, and broadcast the detection message at the selected time, where the first time and the first time
  • the length of time between the start moments is the first preset length and the first predicted length is less than the period length of the period.
  • the first device Since the first device randomly selects a time between the start of each cycle and the first time and broadcasts the detection message at the selected time, it can prevent all devices in the LAN from broadcasting detection messages at the same time, thereby avoiding conflicts and broadcasting storm.
  • the period length of the period may remain unchanged, or the first device may gradually increase the period length of the period to reduce the number of broadcast detection messages and the number of messages to reduce network resources Of occupation.
  • the period length of the period is increased at regular intervals.
  • the period of time in each interval is longer than the period length of the period.
  • the time length of the interval may be equal to z times the period length of the period, z is a value greater than 1, and z may be an integer or a non-integer.
  • the time length of the interval may be equal, and the time length of the interval may be a second preset length or a length determined by the first device itself. Or, the time length of the interval may not be equal, and the time length of the interval may be set by the first device.
  • the user can configure the device list in the first device.
  • Step 304 The first device receives the device information of at least one second device, and composes the device status information table of the device information of the second device in the idle state in the second device.
  • Each device in the network architecture shown in Figure 3 broadcasts its device information according to steps 301 to 303. Therefore, the first device will receive the device information of at least one second device other than itself.
  • the first device can obtain the device information of n second devices in the idle state from the device information of the second device, where n is an integer greater than 0, and the device information of the n second devices is composed Cluster status information table.
  • the first device determines the second device whose status is about to become busy according to the device information of the n second devices through a predictive model, and removes the first device that is about to become busy from the device information of the n second devices.
  • the device information of the second device, and the remaining device information of the second device constitutes a device status information table.
  • the first device can obtain the device status information table according to the received device information whenever it receives the device information of each second device in the device list; or, the first device can generate the device status information every time interval.
  • Table, the time length of the interval may be equal or unequal.
  • the time length of the interval may be set by the first device or may be a preset value.
  • the device status information table since the first device generates the device status information table, the device status information table includes the device information of the second device whose current status is idle, so that when the first device queries the device for the task to be processed, According to the device status information table, it is possible to first determine the idle state and include the second device whose idle resources belonging to the resource type required by the task meet the resource demand required by the task, and then query and schedule the determined second device, which can improve Query efficiency, thereby improving the efficiency of scheduling equipment.
  • an embodiment of the present application provides a method for scheduling a task processing entity.
  • the method can be applied to the network architecture shown in FIG. 1 or FIG. 3, and the task processing entity in the method is a device, including:
  • Step 401 The first device obtains a task processing request message.
  • the task processing request message carries resource demand information required by the task to be processed, and the resource demand information includes the resource type and resource demand amount of the task to be processed.
  • the first device may be an edge device or an end-side device connected to the terminal, and the first device may receive a task processing request message sent by the terminal connected to it.
  • Step 402 The first device determines whether the idle resources it includes meet the resource requirement information, if not, execute step 403, and if so, process the task to be processed.
  • Step 403 The first device determines m second devices according to the device status information table and the resource requirement information, the states of the m second devices are all in the idle state, and the m second devices include those corresponding to the resource type Idle resources meet the resource demand corresponding to the resource type, and m is an integer greater than or equal to 1.
  • a device state information table is stored in the first device.
  • the device state information table includes device information of a second device other than the first device.
  • the device information of the second device includes the identification of the second device, the status of the second device, and the first device. 2.
  • Information such as the number of free resources corresponding to each resource type included in the device.
  • the first device may obtain and store the device status information table through the method shown in FIG. 6, which will not be described in detail here.
  • the first device determines the second device in the idle state from the device status information table, and determines the corresponding resource type from each determined second device according to the device information of each second device.
  • the second device with the number of idle resources greater than the resource requirement selects m second devices from the included second devices with the number of idle resources corresponding to the resource type greater than the resource requirement.
  • Step 404 The first device queries the second devices whose idle resources currently included in the m second devices meet the resource demand information, and schedules the queried second devices to process the pending tasks.
  • the first device reads the identification of each second device from the device information of the m second devices, and concurrently sends a query request message to each second device according to the identification of each second device,
  • the query request message carries resource requirement information required by the task to be processed.
  • the second device uses the query request message to query whether the amount of free resources corresponding to the resource type actually included currently is greater than the resource demand; if the query actually includes The number of free resources corresponding to the resource type is greater than the resource demand, and the query result is sent to the first device.
  • the query result is that the free resource meets the resource demand information; if the number of free resources corresponding to the resource type actually included currently is not If it is greater than the resource demand, the query result is sent, and the query result is information that the idle resource does not meet the resource demand.
  • the first device receives the query result sent by each second device, selects the sent query result as the second device whose idle resources meet the resource requirement information, and schedules the selected second device to process the task to be processed.
  • the first master node may select a query result that the idle resource received for the first time satisfies the resource requirement information, determine a second device that sends the selected query result, and schedule the determined second device to process the task to be processed.
  • the device status information table includes the device information of the second device whose current status is idle, so the first device is querying the second device for the task to be processed
  • the second device in the idle state and including the idle resource to meet the resource demand information required by the task can be determined first, and then the determined device is queried, and the query range becomes smaller.
  • the idle resources actually included in the device currently have a high probability of meeting the resource requirement information. Therefore, when querying the m second devices, the second device whose actual idle resources meet the resource requirement information can be quickly queried, which can improve the query Efficiency, which in turn improves scheduling efficiency.
  • the embodiment of the present application provides an apparatus 500 for scheduling a task processing entity.
  • the apparatus 500 may be deployed in the first task processing entity in the foregoing embodiment, and may be deployed in the foregoing first master node or In the first device.
  • the device 500 includes:
  • the receiving unit 501 is configured to receive a task processing request message, the task processing request message carrying resource demand information required by the task to be processed, the resource demand information including at least the resource type and resource demand required to process the task to be processed ,
  • the first task processing entity is a cluster or a device;
  • the processing unit 502 is configured to determine m second task processing entities according to the entity status information table and the resource requirement information when the idle resources included in the device 500 do not meet the resource requirement information, the entity status information table Includes entity information sent by at least one second task processing entity received by the first task processing entity, and the entity information sent by the second task processing entity includes the identity, status, and free resource information of the second task processing entity, The free resource information includes at least the resource type and the number of free resources in the second task processing entity, and each second task in the m second task processing entities recorded in the entity state information table
  • the states of the processing entities are all idle states, and the number of idle resources corresponding to the resource types in each second task processing entity is greater than the resource demand, and m is an integer greater than or equal to 1;
  • the processing unit 502 is further configured to query, from the m second task processing entities, a second task processing entity that currently includes idle resources that meet the resource demand information, and schedule the queried second task processing entity Process the pending task.
  • the device 500 further includes a sending unit 503;
  • the processing unit 502 is further configured to obtain entity information of the device
  • the sending unit 503 is configured to send the entity information to each task processing entity in an entity list, where the entity list includes an identifier of at least one task processing entity other than the apparatus 500.
  • processing unit 502 is configured to:
  • the apparatus 500 is a cluster, and the processing unit 502 is configured to:
  • the state of the cluster is determined according to the state of each node.
  • processing unit 502 is configured to:
  • the maximum resource utilization rate in the resource utilization rate corresponding to each resource type is greater than or equal to the preset utilization rate threshold, it is determined that the state of the node is busy; when the maximum resource utilization rate is less than the preset utilization rate When the threshold is set, it is determined that the state of the node is an idle state.
  • the sending unit 503 is configured to send a query request message to each of the m second task processing entities, where the query request message carries the resource requirement information, and The query request message is used by the second task processing entity to query whether the idle resources it includes meet the resource requirement information;
  • the receiving unit 501 is further configured to receive a query result sent by each second task processing entity;
  • the processing unit 502 is further configured to select a query result in which the idle resource received for the first time satisfies the resource requirement information; and schedule a second task processing entity that sends the selected query result to process the task to be processed.
  • processing unit 502 is configured to:
  • the ratio is greater than or equal to the preset ratio threshold and the number of nodes in the idle state is less than the preset number threshold, it is determined that the state of the cluster is busy; when the ratio is greater than or equal to the preset ratio threshold and the When the number of nodes in the idle state is greater than or equal to the preset number threshold or when the ratio is less than the preset ratio threshold, it is determined that the state of the cluster is the idle state.
  • the receiving unit 501 is further configured to receive entity information of at least one second task processing entity;
  • the processing unit 502 is further configured to obtain entity information of n second task processing entities in the idle state from the entity information of the at least one second task processing entity, where n is an integer greater than or equal to 1;
  • the entity information of each second task processing entity in the n second task processing entities is determined by the prediction model of the second task processing entity whose status is about to become busy; from the information of the n second task processing entities
  • the entity information of the second task processing entity that is about to become busy is removed from the entity information, and the remaining entity information of the second task processing entity constitutes an entity state information table.
  • the entity state information table since the processing unit generates the entity state information table, the entity state information table includes the entity information of the second task processing entity whose current state is idle, so the processing unit is querying the second task for the task to be processed
  • the entity state information table When processing entities, according to the entity state information table, a second task processing entity in an idle state and including resource demand information required by idle resources to satisfy the task can be determined first, which can improve query efficiency and thus scheduling efficiency.
  • FIG. 9 is a schematic diagram of an apparatus 600 for scheduling a task processing entity according to an embodiment of the application.
  • the device 600 includes at least one processor 601, a bus system 602, a memory 603, and at least one transceiver 604.
  • the device 600 is a device with a hardware structure and can be used to implement the functional modules in the device described in FIG. 8.
  • the processing unit 502 in the device 500 shown in FIG. 8 can be implemented by calling the code in the memory 603 by the at least one processor 601.
  • the sending unit 503 may be implemented by the transceiver 604.
  • processor 601 may be a general-purpose central processing unit (central processing unit, CPU), microprocessor, application-specific integrated circuit (ASIC), or one or more control units Apply for integrated circuits for program execution.
  • CPU central processing unit
  • ASIC application-specific integrated circuit
  • the above-mentioned bus system 602 may include a path for transferring information between the above-mentioned components.
  • the aforementioned transceiver 604 is used to communicate with other devices or communication networks.
  • the aforementioned memory 603 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, random access memory (RAM), or other types that can store information and instructions.
  • the type of dynamic storage device can also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM), or other optical disk storage, CD-ROM Storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store desired program codes in the form of instructions or data structures and can be used by Any other medium accessed by the computer, but not limited to this.
  • the memory can exist independently and is connected to the processor through a bus.
  • the memory can also be integrated with the processor.
  • the memory 603 is used to store application program codes for executing the solutions of the present application, and the processor 601 controls the execution.
  • the processor 601 is configured to execute the application program code stored in the memory 603, so as to realize the functions in the method of the present patent.
  • the processor 601 may include one or more CPUs, such as CPU0 and CPU1 in FIG. 9.
  • the apparatus 600 may include multiple processors, for example, the processor 601 and the processor 607 in FIG. 9. Each of these processors can be a single-CPU (single-CPU) processor or a multi-core (multi-CPU) processor.
  • the processor here may refer to one or more devices, circuits, and/or processing cores for processing data (for example, computer program instructions).
  • the apparatus 600 may further include an output device 605 and an input device 606.
  • the output device 605 communicates with the processor 601, and can display information in a variety of ways.
  • the output device 605 may be a liquid crystal display (LCD) or the like.
  • the input device 606 communicates with the processor 601 and can accept user input in various ways.
  • the input device 606 may be a touch screen device or a sensor device or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本申请公开了一种调度任务处理实体的方法及装置,属于通信领域。所述方法包括:第一任务处理实体接收待处理任务所要的资源需求信息;根据实体状态信息表和所述资源需求信息确定m个第二任务处理实体,所述实体状态信息表包括至少一个第二任务处理实体的实体信息,在所述实体状态信息表中记录的所述m个第二任务处理实体中的每个第二任务处理实体的状态均为闲状态且所述每个第二任务处理实体的空闲资源信息满足所述资源需求信息;从所述m个第二任务处理实体中查询出包括的空闲资源满足所述资源需求信息的第二任务处理实体,调度所述查询的第二任务处理实体处理所述待处理任务。本申请能够提高调度任务处理实体的效率。

Description

一种调度任务处理实体的方法及装置
本申请要求于2019年5月30日提交的申请号为201910465639.X、发明名称为“一种调度任务处理实体的方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信领域,特别涉及一种调度任务处理实体的方法及装置。
背景技术
在面向万物感知,万物互联的场景中,边缘计算成为趋势,边缘计算已经逐步在物联网、大数据和人工智能等行业有所应用。边缘计算利用靠近数据源的集群来处理数据,边缘计算距离用户更近,在边缘的集群实现了对数据的过滤和分析,具有效果高、低时延等特征。
位于边缘的集群中包括集群列表,该集群列表中包括至少一个其他集群的标识。该集群在接收到一个用于处理数据的任务时,如果自身的空闲资源无法满足处理该任务所需要的资源,从集群列表包括的每个集群的标识对应的集群中随机选择一个集群;查询选择的集群中的空闲资源是否满足处理该任务所需要的资源,如果满足,调度选择的集群来处理该任务,如果不满足,则从集群列表中重新选择一个集群的标识,然后再按上述步骤查询选择的该集群。
在实现本申请的过程中,发明人发现现有技术至少存在以下问题:
有时可能经过多次选择才能查询到满足任务所需要资源的集群,查询集群所花费的时间较长,导致成功调度集群所需要的时延高。
发明内容
本申请实施例提供了一种调度任务处理实体的方法及装置,以提高调度任务处理实体的效率。所述技术方案如下:
一方面,本申请提供了一种调度任务处理实体的方法,在所述方法中:第一任务处理实体接收任务处理请求消息,所述任务处理请求消息携带待处理任务所要的资源需求信息,所述资源需求信息至少包括处理所述待处理任务所需要的资源类型和资源需求量,所述第一任务处理实体为集群或设备;在所述第一任务处理实体包括的空闲资源不满足所述资源需求信息时,所述第一任务处理实体根据实体状态信息表和所述资源需求信息确定m个第二任务处理实体,所述实体状态信息表包括所述第一任务处理实体接收的至少一个第二任务处理实体发送的实体信息,第二任务处理实体发送的实体信息包括所述第二任务处理实体的标识、状态和空闲资源信息,所述空闲资源信息至少包括所述第二任务处理实体中的空闲资源的资源类型和空闲资源数量,在所述实体状态信息表中记录的所述m个第二任务处理实体中的每个第二任务处理实体的状态均为闲状态且所述每个第二任务处理实体中的所述资源类型对应的空闲资源数量大于所述资源需求量,m为大于或等于1的整数;所述第一任务处理实体从所 述m个第二任务处理实体中查询出当前包括的空闲资源满足所述资源需求信息的第二任务处理实体,调度所述查询的第二任务处理实体处理所述待处理任务。由于m个第二任务处理实体中的每个第二任务处理实体的状态均为闲状态且所述每个第二任务处理实体的空闲资源信息满足所述资源需求信息,可以减少查询范围,且查询到空闲资源满足资源需求信息的第二任务处理实体的概率变大,提高了查询效率,进而提高调度效率。
在一种可能的实现方式中,所述第一任务处理实体获取所述第一任务处理实体的实体信息,向实体列表中的每个任务处理实体发送所述实体信息,所述实体列表包括除所述第一任务处理实体以外的至少一个任务处理实体的标识。以便其他的任务处理实体基于第一任务处理实体的实体信息建立实体状态信息表。
在一种可能的实现方式中,所述第一任务处理实体获取所述第一任务处理实体包括的每种资源类型、所述每种资源类型对应的空闲资源数量和资源总量;所述第一任务处理实体根据所述每种资源类型对应的空闲资源数量和资源总量确定所述第一任务处理实体的状态。
在一种可能的实现方式中,获取所述集群中的每个节点包括的每种资源类型对应的空闲资源数量和资源总量;根据所述每个节点包括的每种资源类型、所述每种资源类型对应的空闲资源数量和资源总量确定所述每个节点的状态;根据所述每个节点的状态确定所述集群的状态。
在一种可能的实现方式中,根据节点包括的每种资源类型对应的空闲资源数量和资源总量,获取所述节点中的每种资源类型对应的资源使用率;在所述每种资源类型对应的资源使用率中的最大资源使用率大于或等于预设使用率阈值时,确定所述节点的状态为忙状态;在所述最大资源使用率小于预设使用率阈值时,确定所述节点的状态为闲状态。
在一种可能的实现方式中,获取忙状态的节点数目和所述集群的节点总数目;根据所述忙状态的节点数目和所述节点总数目,获取忙状态的节点所占的比率和闲状态的节点数目;在所述比率大于或等于预设比率阈值且所述闲状态的节点数目小于预设数目阈值时,确定所述集群的状态为忙状态;在所述比率大于或等于预设比率阈值且所述闲状态的节点数目大于或等于预设数目阈值时或者在所述比率小于预设比率阈值时,确定所述集群的状态为闲状态。
在一种可能的实现方式中,所述第一任务处理实体向所述m个第二任务处理实体中的每个第二任务处理实体发送查询请求消息,所述查询请求消息携带所述资源需求信息,所述查询请求消息用于第二任务处理实体查询其包括的空闲资源是否满足所述资源需求信息;接收所述每个第二任务处理实体发送的查询结果;选择第一次接收的空闲资源满足所述资源需求信息的查询结果;调度发送所述选择的查询结果的第二任务处理实体处理所述待处理任务。由于并发向m个第二任务处理实体发送查询请求消息,并选择第一次接收的空闲资源满足所述资源需求信息的查询结果,这样不需要等待接收完每个第二任务处理实体发送的查询结果,进一步提高了调度效率。
在一种可能的实现方式中,所述第一任务处理实体接收至少一个第二任务处理实体的实体信息;所述第一任务处理实体从所述至少一个第二任务处理实体的实体信息中获取状态为闲状态的n个第二任务处理实体的实体信息,n为大于或等于1的整数;所述第一任务处理实体根据所述n个第二任务处理实体中的每个第二任务处理实体的实体信息,通过预测模型确定状态即将变为忙状态的第二任务处理实体;所述第一任务处理实体从所述n个第二任务处理实体的实体信息中去除即将变为忙状态的第二任务处理实体的实体信息,将剩下的第二任务处理实体的实体信息构成实体状态信息表。由于去除了即将变为忙状态的第二任务处理实体的实体信息,这样根据实体状态信息表确定m个第二任务处理实体,查询该m个第二任务处理实体,且查询到空闲资源满足资源需求信息的第二任务处理实体的概率会得到大幅提高。
另一方面,本申请提供了一种调度任务处理实体的装置,用于执行一方面或一方面的任意一种可选的实现方式中的方法。具体地,所述装置包括用于执行一方面或一方面的任意一种可选的实现方式的方法的单元。
另一方面,本申请提供了一种调度任务处理实体的装置,所述装置包括:至少一个处理器,至少一个存储器和至少一个收发器,所述至少一个处理器通过总线与所述至少一个存储器和至少一个收发器连接;所述至少一个存储器存储有一个或多个程序,所述一个或多个程序被配置成由所述至少一个处理器执行,所述一个或多个程序包含用于执行一方面或一方面的任意一种可能的实现方式的方法的指令。
另一方面,本申请提供了一种计算机可读存储介质,计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述一方面或个方面任意可选的实现方式的方法。
另一方面,本申请提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述一方面或一方面任意可选的实现方式的方法。
附图说明
图1是本申请实施例提供的一种网络架构示意图;
图2是本申请实施例提供的另一种网络架构示意图;
图3是本申请实施例提供的另一种网络架构示意图;
图4是本申请实施例提供的一种获取集群状态信息表的方法流程图;
图5是本申请实施例提供的一种调度集群的方法流程图;
图6是本申请实施例提供的一种获取设备状态信息表的方法流程图;
图7是本申请实施例提供的一种调度设备的方法流程图;
图8是本申请实施例提供的一种调度任务处理实体的装置结构示意图;
图9是本申请实施例提供的另一种调度任务处理实体的装置结构示意图。
具体实施方式
下面将结合附图对本申请实施方式作进一步地详细描述。
参见图1,本申请实施例提供了一种网络架构,该网络架构是一个分布式的网络架构,包括多个任务处理实体。该多个任务处理实体分布在同一个局域网,或该多个任务处理实体分布在不同的局域网,该多个任务处理实体之间通过网络连接。
对于任一个任务处理实体,为了便于说明称该任务处理实体为第一任务处理实体,第一任务处理实体可以接收至少一个第二任务处理实体发送的实体信息,第二任务处理实体发送的实体信息包括第二任务处理实体的标识、状态和空闲资源信息,该空闲资源信息至少包括第二任务处理实体中的各空闲资源的资源类型和空闲资源数量,根据至少一个第二任务处理实体发送的实体信息生成实体状态信息表,该实体状态信息表用于保存状态为闲状态的第二任务处理实体的实体信息。
这样,第一任务处理实体可以接收任务处理请求消息,该任务处理请求消息携带待处理任务所需要的资源需求信息,该资源需求信息包括待处理任务所需要的资源类型和资源需求量。在第一任务处理实体包括的空闲资源不满足该资源需求信息时,第一任务处理实体根据实体状态信息表和该资源需求信息确定m个第二任务处理实体,该m个第二任务处理实体中的每个第二任务处理实体的状态均为闲状态且每个第二任务处理实体中的该资源类型对应的空闲资源数量大于该资源需求量,m为大于或等于1的整数。
第一任务处理实体从该m个第二任务处理实体中查询出包括的空闲资源满足该资源需求信息的第二任务处理实体,调度查询的第二任务处理实体处理待处理任务。
第一任务处理实体包括的空闲资源满足该资源需求信息是指:第一任务处理实体中的该资源类型对应的空闲资源数量大于该资源需求量。第一任务处理实体包括的空闲资源不满足该资源需求信息是指:第一任务处理实体中的该资源类型对应的空闲资源数量小于或等于该资源需求量。
任务处理实体可以为集群或设备,集群可以为边缘集群,该设备可以为边缘设备或端侧设备。
在任务处理实体为集群的情况时,参见图2,该网络架构包括多个集群,该多个集群中的任意两个集群之间建立有网络连接。
对于该多个集群中的任一个集群,为了便于说明称该集群为第一集群,第一集群包括至少一个节点,该至少一个节点中存在一个主节点,为了便于说明称该主节点为第一主节点,第一主节点可以与其他的每个节点之间建立有网络连接。
第一主节点用于管理第一集群包括的至少一个节点,例如,第一主节点可以接收来自终端的任务处理请求消息,从该至少一个节点中选择节点,触发选择的节点处理该任务处理请求消息对应的任务。
可选的,第一主节点可以获取第一集群中的每个节点当前包括的每种资源类型对应的空闲资源数量和资源总量。
对于第一集群中的任一个节点,在该节点上电启动时,第一主节点可以获取该节点包括的每种资源类型对应的空闲资源数量和资源总量,并保存该节点包括的每种资源类型对应的 空闲资源数量和资源总量。之后,第一主节点可以定期或不定期地查询该节点当前包括的每种资源类型对应的空闲资源数量,将保存的该节点中的每种资源类型对应的空闲资源数量分别更新为当前查询的每种资源类型对应的空闲资源数量。或者,在该节点包括的某种资源类型对应的空闲资源发生变化时,该节点向第一主节点发送该资源类型和当前空闲资源数量,第一主节点接收该资源类型和当前空闲资源数量,将保存的该节点中的该资源类型对应的空闲资源数量更新为接收的当前空闲资源数量。
这样,第一主节点接收任务处理请求消息,该任务处理请求消息携带待处理任务所需要的资源需求信息,该资源需求信息至少包括资源类型和资源需求量等,根据每个节点当前包括的该资源类型对应的空闲资源数量和该资源需求量,确定第一集群中是否存在目标节点,目标节点是第一集群中包括的该资源类型对应的空闲资源满足该资源需求信息的节点,如果存在目标节点,则从目标节点中选择一个节点,触发选择的节点处理该任务处理请求消息对应的任务。
如果不存在目标节点,第一主节点可以查询包括该资源类型对应的空闲资源满足该资源需求信息的其他集群,向该其他集群转发该任务处理请求消息,由该其他集群处理该任务处理请求消息对应的任务。
第一主节点可以根据集群状态信息表和该资源需求信息确定m个第二集群,该集群状态信息表包括除第一集群以外的至少一个第二集群的集群信息,第二集群的集群信息包括第二集群的标识、第二集群的状态和第二集群中的节点包括的每个资源类型对应的空闲资源数量,在该集群状态信息表中记录的该m个第二集群的状态均为闲状态且该m个第二集群中的每个第二集群包括的该资源类型对应的空闲资源数量大于该资源需求量,m为大于或等于1的整数;查询该m个第二集群中的每个第二集群当前实际包括的空闲资源是否满足该资源需求信息,在查询出满足该资源需求信息的第二集群时,调度查询出的第二集群处理待处理任务。
由于在集群状态信息表中记录的该m个第二集群中的每个第二集群包括的该资源类型对应的空闲资源数量大于该资源需求量且该m个第二集群的状态均为闲状态,这样可以减少查询的范围,且该m个第二集群中的每个第二集群当前实际包括的该资源类型对应的空闲资源数量大于该资源需求量的概率较大,所以在查询该m个第二集群时能够很快查询到当前实际空闲资源满足该资源需求信息的第二集群,从而提高了查询效率,进而提高了调度效率。
第一主节点可以获取第一集群的集群信息,向其他集群广播第一集群的集群信息。可选的,第一主节点可以周期性地、随机地或在事件触发等情况下获取并广播第一集群的集群信息。
第一集群的集群信息包括第一集群的标识、状态和第一集群中的节点包括的每种资源类型对应的空闲资源数量。第一主节点通过如下方式获取第一集群的集群信息,可以为:
第一主节点获取其保存的第一集群的标识,以及,获取第一集群中的每个节点当前包括的每种资源类型对应的空闲资源数量和资源总量;根据每个节点包括的每种资源类型对应的空闲资源数量和资源总量确定每个节点的状态;根据每个节点的状态确定第一集群的状态,从而得到第一集群的集群信息。
对于每个节点,为了便于说明称该节点为目标节点,对于目标节点的状态,第一主节点通过如下方式来确定,可以为:
第一主节点可以根据目标节点包括的每种资源类型对应的空闲资源数量和资源总量获取 目标节点中的每种资源类型对应的资源使用率;在每个资源类型对应的资源使用率中的最大资源使用率大于或等于预设使用率阈值时,确定目标节点的状态为忙状态;在每个资源类型对应的资源使用率中的最大资源使用率小于预设使用率阈值时,确定目标节点的状态为闲状态。
对于第一集群的状态,第一主节点通过如下方式来确定,可以为:
第一主节点获取第一集群包括的忙状态的节点数目和第一集群包括的总节点数目;根据该忙状态的节点数目和该总节点数目,获取该忙状态的节点所占的比率和闲状态的节点数目;在该比率大于或等于预设比率阈值且该闲状态的节点数目小于预设数目阈值时,确定第一集群的状态为忙状态;在该比率大于或等于预设比率阈值且该闲状态的节点数目大于或等于预设数目阈值时或者在该比率小于预设比率阈值时,确定第一集群的状态为闲状态。
可选的,第一主节点中可以包括集群资源池,该集群资源池包括除第一集群以外的至少一个第二集群的标识,第一主节点可以根据该集群资源池包括的每个第二集群的标识,向每个第二集群广播其获取的集群信息。
该网络架构中的每个集群的主节点均按上述方式广播其所在的集群的集群信息。这样对于第一主节点中的集群状态信息表,第一主节点通过如下方式获取到该集群状态信息表,可以为:
第一主节点接收除第一集群以外的至少一个第二集群的集群信息,第二集群的集群信息包括第二集群的标识和状态,以及第二集群中的节点包括的每种资源类型对应的空闲资源量;从该至少一个第二集群的集群信息中获取第二集群的状态为闲状态的n个第二集群的集群信息,n为大于或等于m的整数;根据该n个第二集群中的每个第二集群的集群信息,通过预测模型确定第二集群的状态即将变为忙状态的第二集群;从该n个第二集群的集群信息中去除即将变为忙状态的第二集群的集群信息,将剩下的第二集群的集群信息构成集群状态信息表。
可选的,预测模型可以是事先经过训练的机器学习算法或卷积神经网络等。事先可以预设多个第一样本数据,对于每个第一样本数据,该第一样本数据为一个群集的集群信息,该集群的状态为闲状态。技术人员对该群集的集群信息进行分析,得出该集群是否即将变为忙状态,将分析的结果保存到该第一样本数据中得到第二样本数据。使用得到的第二样本数据训练机器学习算法或卷积神经网络,得到预测模型。
第一主节点可以将该n个第二集群的集群信息输入到预测模型,对于任一个第二集群的集群信息,由该预测模型根据该第二集群的集群信息中包括的节点中的每种资源类型对应的空闲资源数量,预测该第二集群的状态是否即将变为忙状态;第一主节点获取预测模型输出的对该第二集群进行预测得到的预测结果,如果该预测结果是该第二集群的状态即将变为忙状态,则丢弃该第二集群的集群信息,否则,将该第二集群的集群信息添加到集群状态信息表中。
对于该网络架构中的每个集群,该集群可以周期性地、随机地或在事件触发下广播该集群的集群信息。
所以第一主节点可以持续性地接收到不同的第二集群发送的集群信息,并根据接收的集群信息定期或不定期地构建集群状态信息表。
可选的,第一主节点还可以将上一次构建的集群状态信息表替换为当前构成的集群状态 信息表。
在任务处理实体为设备的情况时,参见图3,该网络架构包括多个设备,该多个设备中的任意两个设备之间建立有网络连接。
对该多个设备中的任一个设备,为了便于说明称为第一设备。第一设备可以接收任务处理请求消息,该任务处理请求消息携带待处理任务所需要的资源需求信息,该资源需求信息包括待处理任务所需要的资源类型和资源需求量等,当自身包括的空闲资源满足该资源需求信息时,处理该任务处理请求消息对应的任务。当自身包括的空闲资源不满足该资源需求信息时,可以查询包括的空闲资源满足该资源需求信息的第二设备,调度查询的第二设备处理待处理任务。
第一设备可以根据设备状态信息表和该资源需求信息确定m个第二设备,该设备状态信息表包括除第一设备以外的至少一个第二设备的设备信息,第二设备的设备信息包括第二设备的标识、第二设备的状态和第二设备包括的每种空闲资源对应的资源类型和空闲资源数量,在该设备状态信息表中记录的该m个第二设备的状态均为闲状态且该m个第二设备中的该资源类型对应的空闲资源数量大于该资源需求量,m为大于或等于1的整数;查询该m个第二设备中的每个第二设备当前实际包括的空闲资源是否满足该资源需求信息,在查询出满足该资源需求信息的第二设备时,调度查询出的第二设备处理待处理任务。
由于在设备状态信息表中记录的该m个第二设备中的该资源类型对应的空闲资源数量大于该资源需求量且该m个第二设备的状态均为闲状态,这样可以减小查询的范围,且该m个第二设备中的每个第二设备当前实际包括的该资源类型的空闲资源数量大于该资源需求量的概率较大,所以在查询该m个第二设备时能够很快查询到当前实际的空闲资源满足该资源需求信息的第二设备,从而提高了查询效率,进而提高了调度效率。
第一设备可以获取其设备信息,向其他设备广播该设备信息。可选的,第一设备可以周期性地、随机地或在事件触发等情况下获取并广播其设备信息。
第一设备的设备信息包括第一设备的标识、状态和第一设备包括的每种资源类型对应的空闲资源数量。
可选的,第一设备中可以包括设备列表,该设备列表包括除第一设备以外的至少一个其他设备的标识,第一设备可以根据该设备列表包括的每个设备的标识,向每个设备广播其获取的设备信息。
该网络架构中的每个设备均按上述方式广播各自的设备信息。这样对于第一设备的设备状态信息表,第一设备通过如下方式获取到该设备状态信息表,可以为:
第一设备接收除第一设备以外的至少一个第二设备的设备信息,第二设备的设备信息包括第二设备的标识和状态,以及第二设备包括的每种空闲资源的资源类型和空闲资源数量;从该至少一个第二设备的设备信息中获取状态为闲状态的n个第二设备的设备信息,n为大于或等于m的整数;根据该n个第二设备中的每个第二设备的设备信息,通过预测模型确定状态即将变为忙状态的第二设备;从该n个第二设备的设备信息中去除即将变为忙状态的第二设备的设备信息,将剩下的第二设备的设备信息构成设备状态信息表。
第一设备可以将该n个第二设备的设备信息输入到预测模型,对于每个第二设备,由该预测模型根据该第二设备的设备信息包括的每种资源类型对应的空闲资源数量,预测该第二设备的状态是否即将变为忙状态;第一设备获取预测模型输出的对该第二设备进行预测得到 的预测结果,如果该预测结果是该第二设备的状态即将变为忙状态,则丢弃该第二设备的设备信息,否则,将该第二设备的设备信息添加到设备状态信息表中。
事先可以预设多个第一样本数据,对于每个第一样本数据,该第一样本数据为一个设备的设备信息,该设备的状态为闲状态。技术人员对该设备的设备信息进行分析,得出该设备是否即将变为忙状态,将分析的结果保存到该第一样本数据中得到第二样本数据。使用得到的第二样本数据训练机器学习算法或卷积神经网络,得到预测模型。
对于除第一设备以外的至少一个设备中的每个设备,该设备可以周期性地、随机地或在事件触发下广播其设备信息。
第一设备可以每次接收到该至少一个设备的设备信息,基于每次接收的设备信息按上述方式构成设备状态信息表。
可选的,第一设备还可以将上一次构建的设备状态信息表替换为当前构成的设备状态信息表。
在图1或图2所示的网络架构中,集群中的主节点需要获取并保存集群状态信息表,这样才能保证在主节点所在集群包括的空闲资源无法满足处理任务所需的资源需求信息时,主节点才可以基于该集群状态信息表高效地查询空闲资源满足该资源需求信息的其他集群,并调度查询的集群处理待处理任务。参见图4,本申请提供了一种获取集群状态信息表的方法,该方法可以应用于图1或图2所示的网络架构,该方法包括:
步骤101:第一集群的第一主节点获取第一集群中的每个节点当前包括的每种空闲资源的资源类型和空闲资源数量,以及每个资源类型对应的资源总量。
第一集群是该网络架构中的任一个集群。
可选的,节点包括的资源类型可以为中央处理器(central processing unit,CPU)、图形处理器(graphics processing unit,GPU)和/或内存等。节点当前包括的每种空闲资源数量和资源总量可以为节点当前包括的空闲CPU数量和CPU总数量、空闲GPU数量和GPU总数量、和/或,空闲内存大小和内存总大小等。
对于图1或图2所示的网络架构中的任一个集群中的主节点,该主节点周期性地、随机地或在事件触发等情况下执行本步骤。
在本步骤中,列举了如下两种实现方式,对于其他实现方式在本步骤中不一一列举。该两实现方式分别为:
第一种实现方式:第一主节点可以查询第一集群中的每个节点当前包括的每种资源类型对应的空闲资源数量,以及获取每个节点包括的每种资源类型对应的资源总量。
在第一种实现方式中,第一主节点在确定获取第一集群的集群信息时,可以向第一集群中的每个节点发送查询请求消息。对于第一集群中的任一个节点,该节点在接收该查询请求消息时获取其当前包括的每种资源类型对应的空闲资源数量,向第一主节点发送查询响应消息,该查询响应消息包括每种资源类型和每种资源类型对应的空闲资源数量。
可选的,该节点也可以获取其包括的每种资源类型对应的资源总量,发送给主节点的查询响应消息也可以包括每种资源类型对应的资源总量。
第一主节点接收该查询响应消息,从该查询响应消息中提取该节点当前包括的每种资源类型和每种资源类型对应的空闲资源总量。
可选的,在该查询响应消息还包括该节点中的每种资源类型对应的资源总量时,第一主节点从该查询响应消息中提取该节点中的每种资源类型对应的资源总量。
可选的,在该查询响应消息不包括该节点中的每种资源类型对应的资源总量时,第一主节点可以根据该节点的标识,从标识、资源类型和资源总量的对应关系中获取该节点包括的每种资源类型对应的资源总量。
可选的,当第一集群创建时,可以采用人工方式向第一主节点输入第一集群中的节点包括的每种资源类型和每种资源类型对应的资源总量,或者,第一主节点查询第一集群中的节点包括的每种资源类型和每种资源类型对应的资源总量,或者,第一集群中的节点主动向第一主节点发送其包括的每种资源类型和每种资源类型对应的资源总量。第一主节点在得到节点包括的每种资源类型和每种资源类型对应的资源总量时,可以将节点的标识、节点包括的每种资源类型和每种资源类型对应的资源总量对应保存在标识、资源类型和资源总量的对应关系中。
可选的,当存在节点加入第一集群时,可以采用人工方式向第一主节点输入该节点包括的每种资源类型和每种资源类型对应的资源总量,或者,第一主节点查询该节点包括的每种资源类型和每种资源类型对应的资源总量,或者,该节点向第一主节点发送其包括的每种资源类型和每种资源类型对应的资源总量。第一主节点将该节点的标识、该节点包括的每种资源类型和每种资源类型对应的资源总量对应保存在标识、资源类型和资源总量的对应关系中。
在第一种方式中,第一主节点可以接收到第一集群中的每个节点发送的查询响应消息,从而基于每个节点的查询响应消息得到每个节点包括的每种资源类型、每种资源类型对应的空闲资源数量和资源总量。
第二种实现方式:第一主节点可以保存有标识、资源类型、空闲资源数量和资源总量的对应关系,该对应关系用于保存第一集群中的节点的标识、该节点当前包括的资源类型、该资源类型对应的空闲资源数量和资源总量。第一主节点可以从该对应关系中获取第一集群包括的每个节点中的每种资源类型、每种资源类型对应的空闲资源数量和资源总量。
第一主节点保存的标识、资源类型、空闲资源数量和资源总量的对应关系可以是在第一集群创建时建立的。当第一集群创建时,第一主节点可以查询第一集群中的节点包括的每种资源类型、每种资源类型对应空闲资源数量和资源总量,或者,第一集群中的节点向第一主节点发送其包括的每种资源类型、每种资源类型对应空闲资源数量和资源总量。第一主节点在得到节点包括的每种资源类型、每种资源类型对应的空闲资源数量和资源总量时,可以将节点的标识、节点包括的每种资源类型、每种资源类型对应的空闲资源数量和资源总量对应保存在标识、资源类型、空闲资源数量和资源总量的对应关系中。
第一主节点在建立标识、资源类型、空闲资源数量和资源总量的对应关系后,可以在如下几个种情况下对标识、资源类型、空闲资源数量和资源总量的对应关系进行更新。该几种情况分别为:
第一种情况,当存在节点加入第一集群时,第一主节点可以查询该节点包括的每种资源类型对应的空闲资源数量和资源总量,或者,该节点向第一主节点发送其包括的每种资源类型对应的空闲资源数量和资源总量。第一主节点将该节点的标识、该节点包括的每种资源类型、每种资源类型对应的空闲资源数量和资源总量对应保存在标识、资源类型、空闲资源数量和资源总量的对应关系中。
第二种情况,第一主节点可以周期性地查询第一集群中的节点当前包括的每种资源类型对应的空闲资源数量,将该标识、资源类型、空闲资源数量和资源总量的对应关系中该节点的标识对应的每种资源类型对应的空闲资源数量分别更新为节点当前包括的每种资源类型对应的空闲资源数量。
第三种情况,在第一集群中的节点包括的某种资源类型对应的空闲资源发生变化时,该节点向第一主节点发送该资源类型和当前空闲资源数量。第一主节点接收该资源类型和当前空闲资源数量,将该标识、资源类型、空闲资源数量和资源总量的对应关系中该节点的标识对应的该资源类型对应的空闲资源数量更新为该当前空闲资源数量。
步骤102:第一主节点根据每个节点包括的每种资源类型对应的空闲资源数量和资源总量确定每个节点的状态。
节点的状态可以为忙状态或闲状态。在本步骤中,对于每个节点,根据该节点包括的每种资源类型对应的空闲资源数量和资源总量获取该节点中的每种资源类型对应的资源使用率;在每种资源类型对应的资源使用率中的最大资源使用率大于或等于预设使用率阈值时,确定该节点的状态为忙状态;在每种资源类型对应的资源使用率中的最大资源使用率小于预设使用率阈值时,确定该节点的状态为闲状态。
可选的,在本步骤中,根据该节点包括的每种资源类型对应的空闲资源数量和资源总量,可以通过如下第一公式获取该节点中的每种资源类型对应的资源使用率,以及通过如下第二公式确定该节点的状态。
第一公式为:
Figure PCTCN2020092718-appb-000001
在第一公式中,P i为第i种资源类型对应的资源使用率,Idle i为第i种资源类型对应的空闲资源数量,Total i为第i种资源类型对应的空闲资源数量和资源总量。
第二公式为:
Figure PCTCN2020092718-appb-000002
在第一公式中,State(Node)为节点的状态,M为预设使用率阈值,max(P i)为每种资源类型对应的资源使用率中的最大资源使用率。
第二公式表示:当max(P i)大于或等于M时,State(Node)等于忙状态;当max(P i)小于M时,State(Node)等于闲状态。
对于该集群中的每个节点,该节点也可以通过上述第一公式和第二公式确定自身的状态,向第一主节点发送其自身的状态。
步骤103:第一主节点根据第一集群包括的每个节点的状态确定第一集群的状态。
第一集群的状态可以为忙状态或闲状态。在本步骤中,第一主节点获取忙状态的节点数目和第一集群的总节点数目;根据忙状态的节点数目和节点总数目,获取忙状态的节点所占的比率和闲状态的节点数目;在该比率大于或等于预设比率阈值且闲状态的节点数目小于预 设数目阈值时,确定第一集群的状态为忙状态;在该比率大于或等于预设比率阈值且闲状态的节点数目大于或等于预设数目阈值时或者在比率小于预设比率阈值时,确定第一集群的状态为闲状态。
可选的,第一主节点中保存有标识、资源类型、空闲资源数量和资源总量的对应关系,或,保存有标识、资源类型和资源总量的对应关系。第一主节点可以统计其保存的上述两个对应关系中的任一个对应关系中包括的节点的标识数目,得到第一集群的节点总数目。
可选的,在本步骤中,根据忙状态的节点数目和节点总数目,通过如下第三公式获取忙状态的节点所占的比率和闲状态的节点数目,以及确定第一集群的状态。
第三公式为:
Figure PCTCN2020092718-appb-000003
在第三公式中,State(cluster)为第一集群的状态,q为忙状态的节点所占的比率,x为忙状态的节点数目,y为第一集群的总节点数目,W为预设比率阈值,u为预设比率阈值。
第三公式表示:当q大于或等于W且y-x小于u时,State(cluster)等于忙状态;当q大于或等于W且y-x大于或等于u时,State(cluster)等于闲状态;当q小于W时,State(cluster)等于闲状态。
步骤104:第一主节点向集群资源池中的每个第二集群广播第一集群的集群信息,该集群信息包括第一集群的标识、状态和空闲资源信息,该空闲资源信息至少包括第一集群中的节点包括的每种空闲资源的资源类型和空闲资源数量,集群资源池包括除第一集群以外的至少一个第二集群的标识。
可选的,第一主节点中保存有第一集群的标识,该集群信息中的第一集群的标识可以是主节点获取其保存的第一集群的标识。
可选的,第一主节点还可以保存有第一集群的集群类型,该集群信息还可以包括该集群类型和/或第一集群包括的闲状态的节点数目等信息。
可选的,第一主节点中包括集群资源池,该集群资源池可以是第一主节点事先建立的,或者,可以是技术人员事先在第一主节点中配置的。
当图1或图2所示网络架构中的多个集群位于同一个局域网内,第一主节点可以周期性地广播探测消息,该探测消息可以包括第一集群的标识。同样,第一主节点也可以接收其他集群的主节点发送的探测消息,将该探测消息包括的其他集群的标识添加到集群资源池中。
可选的,在第一主节点周期性的广播探测消息的情况下,在每个周期的起始时刻至第一时刻之间随机选择一个时刻,在选择的时刻广播探测消息,其中,第一时刻与该起始时刻之间的时间长度为第一预设长度,第一预设长度小于该周期的周期长度。
由于第一主节点在每个周期的起始时刻至第一时刻之间随机选择一个时刻并在选择的时刻广播探测消息,这样可以防止局域网内的所有集群内的主节点同时广播探测消息,从而避免造成冲突和广播风暴。
可选的,该周期的周期长度可以保持不变,或者,第一主节点可以逐渐地增大该周期的周期长度,以实现减小广播探测消息的数量,减少消息的通信量,以减少对网络资源的占用。
例如,第一主节点在第一次广播探测消息后,每隔一段时间增加该周期的周期长度。该一段时间的时间长度大于该周期的周期长度。
可选的,该一段时间的时间长度可以等于该周期的周期长度的z倍,z为大于1的数值,且z可以为整数或为非整数。
可选的,每次间隔的一段时间的时间长度可以相等,该时间长度可以是第二预设长度,也可以是第一主节点自己确定的长度。或者,每次间隔的一段时间的时间长度也可以不相等,该时间长度可以由第一主节点设置。
当图1或图2所示网络架构中的多个集群跨局域网,可以由用户在第一主节点中配置集群资源池。
步骤105:第一主节点接收除第一集群以外的至少一个第二集群的集群信息,将该至少一个第二集群中的状态为闲状态的第二集群的集群信息组成集群状态信息表。
在图1所示的网络架构中的每个集群内的主节点均按101至104的步骤广播各自所在集群的集群信息。所以对于第一集群的第一主节点,第一主节点会接收到除第一集群以外的至少一个第二集群的集群信息。
在本步骤中,第一主节点可以从该至少一个第二集群的集群信息中获取状态为闲状态的n个第二集群的集群信息,n为大于0的整数,将该n个第二集群的集群信息组成集群状态信息表。或者,第一主节点根据该n个第二集群中的每个第二集群的集群信息,通过预测模型确定状态即将变为忙状态的第二集群,从该n个第二集群的集群信息中去除即将变为忙状态的第二集群的集群信息,将剩下的第二集群的集群信息构成集群状态信息表。
由于图1或图2所示网络架构中的每个集群的主节点随机、周期性或事件触发等情况下广播各自所在集群的集群信息。所以第一主节点可以在每当接收到集群资源池中的每个第二集群的集群信息时,根据接收的集群信息得到集群状态信息表;或者,第一主节点可以每间隔一段时间生成集群状态信息表,每次间隔的时间长度可以相等也可以不相等,该间隔的时间长度可以是第一主节点设置的或可以是预设值,第一主节点可以根据第一时间到当前时间之间接收的集群信息生成集群状态信息表,第一时间为上次生成集群状态信息表的时间。
在本申请实施例中,由于第一主节点生成了集群状态信息表,该集群状态信息表包括当前状态为闲状态的集群的集群信息,这样第一主节点在查询集群时,根据该集群状态信息表,可以先确定出m个第二集群,在集群状态信息表中该m个第二集群的状态为闲状态且该m个第二集群包括的该任务所需要资源类型对应的空闲资源数量大于该任务所需要的资源需求量,再查询该m个第二集群,可以提高查询效率。
参见图5,本申请实施例提供了一种调度任务处理实体的方法,该方法可以应用于图1或图2所示的网络架构,且在该方法中任务处理实体为集群,包括:
步骤201:第一集群中的第一主节点接收终端发送任务处理请求消息,该任务处理请求消息携带待处理任务所需的资源需求信息。
第一集群是该网络架构中的任一个集群,该资源需求信息可以包括资源类型和资源需求量。
步骤202:第一主节点确定第一集群中是否存在空闲资源满足该资源需要信息的节点,如果不存在,则执行步骤203。
第一主节点可以获取第一集群中的每个节点包括的该资源类型对应的空闲资源数量,确定是否存在该资源类型对应的空闲资源数量大于该资源需求量的节点,如果不存在该节点,则确定第一集群中不存在空闲资源满足该资源需要信息的节点,如果存在该节点,则确定第一集群中存在空闲资源满足该资源需要信息的节点。
如果确定出第一集群中存在空闲资源满足该资源需要信息的节点,则第一主节点可以在该确定的节点中选择节点,向选择的节点发送该任务处理请求消息,由选择的节点处理待处理任务。
步骤203:第一主节点根据集群状态信息表和该资源需求信息确定m个第二集群,该m个第二集群的状态均为闲状态且该m个第二集群中的每个第二集群包括的该资源类型对应的空闲资源数量大于该资源需求量,m为大于或等于1的整数。
第一主节点中存储有集群状态信息表,该集群状态信息表包括第一集群以外的至少一个第二集群的集群信息,第二集群的集群信息包括第二集群的标识、第二集群的状态和空闲资源信息,该空闲资源信息包括第二集群中的节点包括的每种空闲资源的资源类型和空闲资源数量等信息。第一主节点可以通过图4所示的方法获取并存储该集群状态信息表,在此不再详细说明。
在本步骤中,第一主节点从集群状态信息表中确定闲状态的第二集群,对于确定的每个第二集群,如果该第二集群中的某个节点包括的该资源类型对应的空闲资源数量大于该资源类型对应的资源需求量,则确定该第二集群包括的该资源类型对应的空闲资源数量大于该资源需求量。从该资源类型对应的空闲资源数量大于该资源需求量的第二集群中选择m个第二集群。
步骤204:第一主节点查询该m个第二集群中当前实际的空闲资源满足该资源需求信息的第二集群,调度查询的第二集群处理待处理任务。
在本步骤中,第一主节点从该m个第二集群中的每个第二集群的集群信息中读取每个第二集群的标识,根据每个第二集群的标识并发地向每个第二集群发送查询请求消息,该查询请求消息携带待处理任务所需的资源需求信息。
该资源需求信息包括资源类型和资源需求量。对于该m个第二集群中的每个第二集群,该第二集群的第二主节点接收该查询请求消息,查询该第二集群是否存在某个节点包括的该资源类型对应的空闲资源数量是否大于该资源需求量;如果查询出存在节点包括的该资源类型对应的空闲资源数量大于该资源需求量,向第一主节点发送查询结果,该查询结果是该第二集群包括的空闲资源满足该资源需求信;如果查询出不存在节点包括的该资源类型对应的空闲资源数量大于该资源需求量,向第一主节点发送查询结果,该查询结果是该第二集群包括的空闲资源不满足该资源需求信。
第一主节点接收每个第二集群发送的查询结果,选择发送的查询结果为空闲资源满足该资源需求信息的第二集群,调度选择的第二集群处理待处理任务。
可选的,第一主节点可以选择第一次接收的空闲资源满足该资源需求信息的查询结果,确定发送选择的查询结果的第二集群,调度确定的第二集群处理待处理任务。
在本申请实施例中,由于第一主节点生成了集群状态信息表,该集群状态信息表包括状态为闲状态的第二集群的集群信息,这样第一主节点在为待处理任务查询集群时,根据该集群状态信息表,可以先确定出闲状态且包括空闲资源满足该任务所需要的资源需求信息的第 二集群,再查询确定的集群,查询的范围变小,由于每个第二集群包括当前实际的空闲资源满足该资源需求信息的概率较大,所以在查询该m个第二集群时能够很快查询到当前实际的空闲资源满足该资源需求信息的第二集群,可以提高查询效率,进而提高了调度效率。
在图1或图3所示的网络架构中,该网络架构中的设备获取并保存设备状态信息表,这样才能保证在该设备包括的空闲资源无法满足处理任务所需资源类型的空闲资源时,该设备才可以基于该设备状态信息表高效地查询并调度空闲资源满足处理任务所需要的其他设备。参见图6,本申请提供了一种获取设备状态信息表的方法,该方法可以应用于图1或图3所示的网络架构,该方法包括:
步骤301:第一设备获取其当前包括的每种空闲资源的资源类型和空闲资源数量,以及每个资源类型对应的资源总量,第一设备是该网络架构中的任一设备。
可选的,第一设备包括的资源类型可以为CPU、GPU和/或内存等。第一设备当前包括的每种空闲资源数量和资源总量可以为第一设备当前包括的空闲CPU数量和CPU总数量、空闲GPU数量和GPU总数量、和/或,空闲内存大小和内存总大小等。
第一设备可以周期性地、随机地或在事件触发等情况下获取其设备信息,在第一设备确定获取其设备信息时,开始执行本步骤。
步骤302:第一设备根据每种资源类型对应的空闲资源数量和资源总量确定第一设备的状态。
第一设备的状态可以为忙状态或闲状态。在本步骤中,根据每种资源类型对应的空闲资源数量和资源总量获取每种资源类型对应的资源使用率;在每种资源类型对应的资源使用率中的最大资源使用率大于或等于预设使用率阈值时,确定第一设备的状态为忙状态;在每种资源类型对应的资源使用率中的最大资源使用率小于预设使用率阈值时,确定第一设备的状态为闲状态。
步骤303:第一设备向设备列表中的每个第二设备广播第一设备的设备信息,第一设备的设备信息包括第一设备的标识、状态和空闲资源信息,该空闲资源信息至少包括第一设备中的每种空闲资源的资源类型和空闲资源数量,该设备列表包括除第一设备以外的至少一个第二设备的标识。
可选的,第一设备包括设备列表,该设备列表可以是在执行本步骤之前由第一设备建立的,或者,可以是技术人员事先在第一设备中配置的。
当图3所示网络架构中的多个设备位于同一个局域网内,第一设备可以周期性地广播探测消息,该探测消息可以包括第一设备的标识。同样,第一设备也可以接收其他设备发送的探测消息,将该探测消息包括的其他设备的标识添加到设备列表中。
可选的,第一设备可以周期性地广播探测消息,在每个周期的起始时刻至第一时刻之间随机选择一个时刻,在选择的时刻广播探测消息,其中,第一时刻与该起始时刻之间的时间长度为第一预设长度且第一预测长度小于该周期的周期长度。
由于第一设备在每个周期的起始时刻至第一时刻之间随机选择一个时刻并在选择的时刻广播探测消息,这样可以防止局域网内的所有设备同时广播探测消息,从而避免造成冲突和广播风暴。
可选的,该周期的周期长度可以保持不变,或者,第一设备可以逐渐地增大该周期的周 期长度,以实现减小广播探测消息的数量,减少消息的数量,以减少对网络资源的占用。
例如,第一设备在第一次广播探测消息后,每隔一段时间增加该周期的周期长度。每次间隔的一段时间的时间长度大于该周期的周期长度。
可选的,该间隔的时间长度可以等于该周期的周期长度的z倍,z为大于1的数值,且z可以为整数或为非整数。
可选的,该间隔的时间长度可以相等,间隔的时间长度可以是第二预设长度,也可以是第一设备自己确定的长度。或者,该间隔的时间长度也可以不相等,该间隔的时间长度可以由第一设备设置。
当图1或图3所示网络架构中的多个设备跨局域网,可以由用户在第一设备中配置设备列表。
步骤304:第一设备接收至少一个第二设备的设备信息,将第二设备中的状态为闲状态的第二设备的设备信息组成设备状态信息表。
在图3所示的网络架构中的每个设备均按301至303的步骤广播各自的设备信息。所以第一设备会接收到除自身以外的至少一个第二设备的设备信息。
在本步骤中,第一设备可以从第二设备的设备信息中获取状态为闲状态的n个第二设备的设备信息,n为大于0的整数,将该n个第二设备的设备信息组成集群状态信息表。或者,第一设备根据该n个第二设备的设备信息,通过预测模型确定状态即将变为忙状态的第二设备,从该n个第二设备的设备信息中去除即将变为忙状态的第二设备的设备信息,将剩下的第二设备的设备信息构成设备状态信息表。
由于图1所示网络架构中的每个设备随机、周期性或事件触发等情况下广播各自的设备信息。所以对于第一设备可以在每当接收到设备列表中的每个第二设备的设备信息时,根据接收的设备信息得到设备状态信息表;或者,第一设备可以每间隔一段时间生成设备状态信息表,该间隔的时间长度可以相等也可以不相等,该间隔的时间长度可以是第一设备设置的或可以是预设值,第一设备在生成设备状态信息表时,根据第一时间到当前时间之间接收的设备信息生成设备状态信息表。第一时间是上次生成设备状态信息表的时间。
在本申请实施例中,由于第一设备生成了设备状态信息表,该设备状态信息表包括当前状态为闲状态的第二设备的设备信息,这样第一设备在为待处理任务查询设备时,根据该设备状态信息表,可以先确定出闲状态且包括属于该任务所需要资源类型的空闲资源满足该任务所需要资源需求量的第二设备,再查询并调度确定的第二设备,可以提高查询效率,进而提高调度设备的效率。
参见图7,本申请实施例提供了一种调度任务处理实体的方法,该方法可以应用于图1或图3所示的网络架构,且该方法中的任务处理实体为设备,包括:
步骤401:第一设备获取任务处理请求消息,该任务处理请求消息携带待处理任务所需的资源需求信息,该资源需求信息包括待处理任务的资源类型和资源需求量。
第一设备可以是与终端相连的边缘设备或端侧设备,第一设备可以接收与其相连的终端发送的任务处理请求消息。
步骤402:第一设备确定其包括的空闲资源是否满足该资源需求信息,如果不满足,则执行步骤403,如果满足,则处理待处理任务。
步骤403:第一设备根据设备状态信息表和该资源需求信息确定m个第二设备,该m个第二设备的状态均为闲状态且该m个第二设备中存在包括该资源类型对应的空闲资源满足该资源类型对应的资源需求量,m为大于或等于1的整数。
第一设备中存储有设备状态信息表,该设备状态信息表包括除第一设备以外的第二设备的设备信息,第二设备的设备信息包括第二设备的标识、第二设备的状态和第二设备包括的每种资源类型对应的空闲资源数量等信息。第一设备可以通过图6所示的方法获取并存储设备状态信息表,在此不再详细说明。
在本步骤中,第一设备从设备状态信息表中确定闲状态的第二设备,根据确定每个第二设备的设备信息,从确定的每个第二设备中确定包括的该资源类型对应的空闲资源数量大于该资源需求量的第二设备,从包括的该资源类型对应的空闲资源数量大于该资源需求量的第二设备中选择m个第二设备。
步骤404:第一设备查询该m个第二设备中当前包括的空闲资源满足该资源需求信息的第二设备,调度查询到的第二设备处理待处理任务。
在本步骤中,第一设备从该m个第二设备的设备信息中读取每个第二设备的标识,根据每个第二设备的标识并发地向每个第二设备发送查询请求消息,该查询请求消息携带待处理任务所需的资源需求信息。
对于该m个第二中的任一个第二设备,该第二设备该查询请求消息,查询当前实际包括的该资源类型对应的空闲资源数量是否大于该资源需求量;如果查询出当前实际包括的该资源类型对应的空闲资源数量大于该资源需求量,向第一设备发送查询结果,该查询结果为空闲资源满足该资源需求信息;如果查询出当前实际包括的该资源类型对应的空闲资源数量不大于该资源需求量,发送查询结果,该查询结果为空闲资源不满足该资源需求信息。
第一设备接收每个第二设备发送的查询结果,选择发送的查询结果为空闲资源满足该资源需求信息的第二设备,调度选择的第二设备处理待处理任务。
可选的,第一主节点可以选择第一次接收的空闲资源满足该资源需求信息的查询结果,确定发送选择的查询结果的第二设备,调度确定的第二设备处理待处理任务。
在本申请实施例中,由于第一设备生成了设备状态信息表,该设备状态信息表包括当前状态为闲状态的第二设备的设备信息,这样第一设备在为待处理任务查询第二设备时,根据该设备状态信息表,可以先确定出闲状态且包括空闲资源满足该任务所需要的资源需求信息的第二设备,再查询确定的设备,查询的范围变小,由于每个第二设备当前实际包括的空闲资源满足该资源需求信息的概率较大,所以在查询该m个第二设备时能够很快查询到当前实际的空闲资源满足该资源需求信息的第二设备,可以提高查询效率,进而提高了调度效率。
参见图8,本申请实施列提供了一种调度任务处理实体的装置500,所述装置500可以部署在上述实施例中的第一任务处理实体,在实现时可以部署在上述第一主节点或第一设备中。所述装置500包括:
接收单元501,用于接收任务处理请求消息,所述任务处理请求消息携带待处理任务所要的资源需求信息,所述资源需求信息至少包括处理所述待处理任务所需要的资源类型和资源需求量,所述第一任务处理实体为集群或设备;
处理单元502,用于在所述装置500包括的空闲资源不满足所述资源需求信息时,根据 实体状态信息表和所述资源需求信息确定m个第二任务处理实体,所述实体状态信息表包括所述第一任务处理实体接收的至少一个第二任务处理实体发送的实体信息,第二任务处理实体发送的实体信息包括所述第二任务处理实体的标识、状态和空闲资源信息,所述空闲资源信息至少包括所述第二任务处理实体中的空闲资源的资源类型和空闲资源数量,在所述实体状态信息表中记录的所述m个第二任务处理实体中的每个第二任务处理实体的状态均为闲状态且所述每个第二任务处理实体中的所述资源类型对应的空闲资源数量大于所述资源需求量,m为大于或等于1的整数;
所述处理单元502,还用于从所述m个第二任务处理实体中查询出当前包括的空闲资源满足所述资源需求信息的第二任务处理实体,调度所述查询的第二任务处理实体处理所述待处理任务。
可选的,所述装置500还包括发送单元503;
所述处理单元502,还用于获取所述装置的实体信息;
所述发送单元503,用于向实体列表中的每个任务处理实体发送所述实体信息,所述实体列表包括除所述装置500以外的至少一个任务处理实体的标识。
可选的,所述处理单元502,用于:
获取所述装置包括的每种资源类型对应的空闲资源数量和资源总量;根据所述每种资源类型对应的空闲资源数量和资源总量确定所述装置的状态。
可选的,所述装置500为集群,所述处理单元502,用于:
获取所述集群中的每个节点包括的每种资源类型、所述每种资源类型对应的空闲资源数量和资源总量;
根据所述每个节点包括的每种资源类型对应的空闲资源数量和资源总量确定所述每个节点的状态;
根据所述每个节点的状态确定所述集群的状态。
可选的,所述处理单元502,用于:
根据节点包括的每种资源类型、所述每种资源类型对应的空闲资源数量和资源总量,获取所述节点中的每种资源类型对应的资源使用率;
在所述每种资源类型对应的资源使用率中的最大资源使用率大于或等于预设使用率阈值时,确定所述节点的状态为忙状态;在所述最大资源使用率小于预设使用率阈值时,确定所述节点的状态为闲状态。
可选的,所述发送单元503,用于向所述m个第二任务处理实体中的每个第二任务处理实体发送查询请求消息,所述查询请求消息携带所述资源需求信息,所述查询请求消息用于第二任务处理实体查询其包括的空闲资源是否满足所述资源需求信息;
所述接收单元501,还用于接收所述每个第二任务处理实体发送的查询结果;
所述处理单元502,还用于选择第一次接收的空闲资源满足所述资源需求信息的查询结果;调度发送所述选择的查询结果的第二任务处理实体处理所述待处理任务。
可选的,所述处理单元502,用于:
获取忙状态的节点数目和所述集群的节点总数目;
根据所述忙状态的节点数目和所述节点总数目,获取忙状态的节点所占的比率和闲状态的节点数目;
在所述比率大于或等于预设比率阈值且所述闲状态的节点数目小于预设数目阈值时,确定所述集群的状态为忙状态;在所述比率大于或等于预设比率阈值且所述闲状态的节点数目大于或等于预设数目阈值时或者在所述比率小于预设比率阈值时,确定所述集群的状态为闲状态。
可选的,所述接收单元501,还用于接收至少一个第二任务处理实体的实体信息;
所述处理单元502,还用于从所述至少一个第二任务处理实体的实体信息中获取状态为闲状态的n个第二任务处理实体的实体信息,n为大于或等于1的整数;根据所述n个第二任务处理实体中的每个第二任务处理实体的实体信息,通过预测模型确定状态即将变为忙状态的第二任务处理实体;从所述n个第二任务处理实体的实体信息中去除即将变为忙状态的第二任务处理实体的实体信息,将剩下的第二任务处理实体的实体信息构成实体状态信息表。
在本申请实施例中,由于处理单元生成了实体状态信息表,该实体状态信息表包括当前状态为闲状态的第二任务处理实体的实体信息,这样处理单元在为待处理任务查询第二任务处理实体时,根据该实体状态信息表,可以先确定出闲状态且包括空闲资源满足该任务所需要的资源需求信息的第二任务处理实体,可以提高查询效率,进而提高了调度效率。
参见图9,图9所示为本申请实施例提供的一种调度任务处理实体的装置600示意图。该装置600包括至少一个处理器601,总线系统602,存储器603以及至少一个收发器604。
该装置600是一种硬件结构的装置,可以用于实现图8所述的装置中的功能模块。例如,本领域技术人员可以想到图8所示的装置500中的处理单元502可以通过该至少一个处理器601调用存储器603中的代码来实现,图8所示的装置500中的接收单元501和发送单元503可以通过该收发器604来实现。
可选的,上述处理器601可以是一个通用中央处理器(central processing unit,CPU),微处理器,特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制本申请方案程序执行的集成电路。
上述总线系统602可包括一通路,在上述组件之间传送信息。
上述收发器604,用于与其他设备或通信网络通信。
上述存储器603可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可以是独立存在,通过总线与处理器相连接。存储器也可以和处理器集成在一起。
其中,存储器603用于存储执行本申请方案的应用程序代码,并由处理器601来控制执行。处理器601用于执行存储器603中存储的应用程序代码,从而实现本专利方法中的功能。
在具体实现中,作为一种实施例,处理器601可以包括一个或多个CPU,例如图9中的CPU0和CPU1。
在具体实现中,作为一种实施例,该装置600可以包括多个处理器,例如图9中的处理 器601和处理器607。这些处理器中的每一个可以是一个单核(single-CPU)处理器,也可以是一个多核(multi-CPU)处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。
在具体实现中,作为一种实施例,该装置600还可以包括输出设备605和输入设备606。输出设备605和处理器601通信,可以以多种方式来显示信息。例如,输出设备605可以是液晶显示器(liquid crystal display,LCD)等。输入设备606和处理器601通信,可以以多种方式接受用户的输入。例如,输入设备606可以是触摸屏设备或传感设备等。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
以上所述仅为本申请的可选实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (16)

  1. 一种调度任务处理实体的方法,其特征在于,所述方法包括:
    第一任务处理实体接收任务处理请求消息,所述任务处理请求消息携带待处理任务所需要的资源需求信息,所述资源需求信息至少包括处理所述待处理任务所需要的资源类型和资源需求量,所述第一任务处理实体为集群或设备;
    在所述第一任务处理实体包括的空闲资源不满足所述资源需求信息时,所述第一任务处理实体根据实体状态信息表和所述资源需求信息确定m个第二任务处理实体,所述实体状态信息表包括所述第一任务处理实体接收的至少一个第二任务处理实体发送的实体信息,第二任务处理实体发送的实体信息包括所述第二任务处理实体的标识、状态和空闲资源信息,所述空闲资源信息至少包括所述第二任务处理实体中的空闲资源的资源类型和空闲资源数量,在所述实体状态信息表中记录的所述m个第二任务处理实体中的每个第二任务处理实体的状态均为闲状态且所述每个第二任务处理实体中的所述资源类型对应的空闲资源数量大于所述资源需求量,m为大于或等于1的整数;
    所述第一任务处理实体从所述m个第二任务处理实体中查询出当前包括的空闲资源满足所述资源需求信息的第二任务处理实体,调度所述查询的第二任务处理实体处理所述待处理任务。
  2. 如权利要求1所述的方法,其特征在于,所述第一任务处理实体根据实体状态信息表和所述资源需求信息确定m个第二任务处理实体之前,还包括:
    所述第一任务处理实体获取所述第一任务处理实体的实体信息,向实体列表中的每个任务处理实体发送所述实体信息,所述实体列表包括除所述第一任务处理实体以外的至少一个任务处理实体的标识。
  3. 如权利要求2所述的方法,其特征在于,所述第一任务处理实体获取所述第一任务处理实体的实体信息,包括:
    所述第一任务处理实体获取所述第一任务处理实体包括的每种资源类型、所述每种资源类型对应的空闲资源数量和资源总量;
    所述第一任务处理实体根据所述每种资源类型对应的空闲资源数量和资源总量确定所述第一任务处理实体的状态。
  4. 如权利要求3所述的方法,其特征在于,所述第一任务处理实体为集群,所述第一任务处理实体获取所述第一任务处理实体包括的每种资源类型对应的空闲资源数量和资源总量,包括:
    获取所述集群中的每个节点包括的每种资源类型、所述每种资源类型对应的空闲资源数量和资源总量;
    所述第一任务处理实体根据所述每种资源类型对应的空闲资源数量和资源总量确定第一任务处理实体的状态,包括:
    根据所述每个节点包括的每种资源类型对应的空闲资源数量和资源总量确定所述每个节点的状态;
    根据所述每个节点的状态确定所述集群的状态。
  5. 如权利要求4所述的方法,其特征在于,所述根据所述每个节点包括的每种资源类型对应的空闲资源数量和资源总量确定所述每个节点的状态,包括:
    根据节点包括的每种资源类型对应的空闲资源数量和资源总量,获取所述节点中的每种资源类型对应的资源使用率;
    在所述每种资源类型对应的资源使用率中的最大资源使用率大于或等于预设使用率阈值时,确定所述节点的状态为忙状态;在所述最大资源使用率小于预设使用率阈值时,确定所述节点的状态为闲状态。
  6. 如权利要求4或5所述的方法,其特征在于,所述根据所述每个节点的状态确定所述集群的状态,包括:
    获取忙状态的节点数目和所述集群的节点总数目;
    根据所述忙状态的节点数目和所述节点总数目,获取忙状态的节点所占的比率和闲状态的节点数目;
    在所述比率大于或等于预设比率阈值且所述闲状态的节点数目小于预设数目阈值时,确定所述集群的状态为忙状态;在所述比率大于或等于预设比率阈值且所述闲状态的节点数目大于或等于预设数目阈值时或者在所述比率小于预设比率阈值时,确定所述集群的状态为闲状态。
  7. 如权利要求1-6任一项所述的方法,其特征在于,所述第一任务处理实体从所述m个第二任务处理实体中查询出当前包括的空闲资源满足所述资源需求信息的第二任务处理实体,调度所述查询的第二任务处理实体处理所述待处理任务,包括:
    所述第一任务处理实体向所述m个第二任务处理实体中的每个第二任务处理实体发送查询请求消息,所述查询请求消息携带所述资源需求信息,所述查询请求消息用于第二任务处理实体查询其包括的空闲资源是否满足所述资源需求信息;
    所述第一任务处理实体接收所述每个第二任务处理实体发送的查询结果;
    所述第一任务处理实体选择第一次接收的空闲资源满足所述资源需求信息的查询结果;
    所述第一任务处理实体调度发送所述选择的查询结果的第二任务处理实体处理所述待处理任务。
  8. 如权利要求1-7任一项所述的方法,其特征在于,所述第一任务处理实体根据实体状态信息表和所述资源需求信息确定m个第二任务处理实体之前,还包括:
    所述第一任务处理实体接收至少一个第二任务处理实体的实体信息;
    所述第一任务处理实体从所述至少一个第二任务处理实体的实体信息中获取状态为闲状态的n个第二任务处理实体的实体信息,n为大于或等于1的整数;
    所述第一任务处理实体根据所述n个第二任务处理实体中的每个第二任务处理实体的实 体信息,通过预测模型确定状态即将变为忙状态的第二任务处理实体;
    所述第一任务处理实体从所述n个第二任务处理实体的实体信息中去除即将变为忙状态的第二任务处理实体的实体信息,将剩下的第二任务处理实体的实体信息构成实体状态信息表。
  9. 一种调度任务处理实体的装置,其特征在于,所述装置包括:
    接收单元,用于接收任务处理请求消息,所述任务处理请求消息携带待处理任务所要的资源需求信息,所述资源需求信息至少包括处理所述待处理任务所需要的资源类型和资源需求量,所述第一任务处理实体为集群或设备;
    处理单元,用于在所述装置包括的空闲资源不满足所述资源需求信息时,根据实体状态信息表和所述资源需求信息确定m个第二任务处理实体,所述实体状态信息表包括所述第一任务处理实体接收的至少一个第二任务处理实体发送的实体信息,第二任务处理实体发送的实体信息包括所述第二任务处理实体的标识、状态和空闲资源信息,所述空闲资源信息至少包括所述第二任务处理实体中的空闲资源的资源类型和空闲资源数量,在所述实体状态信息表中记录的所述m个第二任务处理实体中的每个第二任务处理实体的状态均为闲状态且所述每个第二任务处理实体中的所述资源类型对应的空闲资源数量大于所述资源需求量,m为大于或等于1的整数;
    所述处理单元,还用于从所述m个第二任务处理实体中查询出当前包括的空闲资源满足所述资源需求信息的第二任务处理实体,调度所述查询的第二任务处理实体处理所述待处理任务。
  10. 如权利要求9所述的装置,其特征在于,所述装置还包括第一发送单元;
    所述处理单元,还用于获取所述装置的实体信息;
    所述发送单元,用于向实体列表中的每个任务处理实体发送所述实体信息,所述实体列表包括除所述装置以外的至少一个任务处理实体的标识。
  11. 如权利要求10所述的装置,其特征在于,所述处理单元,用于:
    获取所述装置包括的每种资源类型对应的空闲资源数量和资源总量;根据所述每种资源类型对应的空闲资源数量和资源总量确定所述装置的状态。
  12. 如权利要求11所述的装置,其特征在于,所述装置为集群,所述处理单元,用于:
    获取所述集群中的每个节点包括的每种资源类型、所述每种资源类型对应的空闲资源数量和资源总量;
    根据所述每个节点包括的每种资源类型对应的空闲资源数量和资源总量确定所述每个节点的状态;
    根据所述每个节点的状态确定所述集群的状态。
  13. 如权利要求12所述的装置,其特征在于,所述处理单元,用于:
    根据节点包括的每种资源类型、所述每种资源类型对应的空闲资源数量和资源总量,获 取所述节点中的每种资源类型对应的资源使用率;
    在所述每种资源类型对应的资源使用率中的最大资源使用率大于或等于预设使用率阈值时,确定所述节点的状态为忙状态;在所述最大资源使用率小于预设使用率阈值时,确定所述节点的状态为闲状态。
  14. 如权利要求12或13所述的装置,其特征在于,所述处理单元,用于:
    获取忙状态的节点数目和所述集群的节点总数目;
    根据所述忙状态的节点数目和所述节点总数目,获取忙状态的节点所占的比率和闲状态的节点数目;
    在所述比率大于或等于预设比率阈值且所述闲状态的节点数目小于预设数目阈值时,确定所述集群的状态为忙状态;在所述比率大于或等于预设比率阈值且所述闲状态的节点数目大于或等于预设数目阈值时或者在所述比率小于预设比率阈值时,确定所述集群的状态为闲状态。
  15. 如权利要求9-14任一项所述的装置,其特征在于,所述装置还包括:第二发送单元;
    所述第二发送单元,用于向所述m个第二任务处理实体中的每个第二任务处理实体发送查询请求消息,所述查询请求消息携带所述资源需求信息,所述查询请求消息用于第二任务处理实体查询其包括的空闲资源是否满足所述资源需求信息;
    所述接收单元,还用于接收所述每个第二任务处理实体发送的查询结果;
    所述处理单元,还用于选择第一次接收的空闲资源满足所述资源需求信息的查询结果;调度发送所述选择的查询结果的第二任务处理实体处理所述待处理任务。
  16. 如权利要求9-15任一项所述的装置,其特征在于,
    所述接收单元,还用于接收至少一个第二任务处理实体的实体信息;
    所述处理单元,还用于从所述至少一个第二任务处理实体的实体信息中获取状态为闲状态的n个第二任务处理实体的实体信息,n为大于或等于1的整数;根据所述n个第二任务处理实体中的每个第二任务处理实体的实体信息,通过预测模型确定状态即将变为忙状态的第二任务处理实体;从所述n个第二任务处理实体的实体信息中去除即将变为忙状态的第二任务处理实体的实体信息,将剩下的第二任务处理实体的实体信息构成实体状态信息表。
PCT/CN2020/092718 2019-05-30 2020-05-27 一种调度任务处理实体的方法及装置 WO2020238989A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/538,617 US20220083375A1 (en) 2019-05-30 2021-11-30 Method and apparatus for scheduling task processing entity

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910465639.XA CN112019581B (zh) 2019-05-30 2019-05-30 一种调度任务处理实体的方法及装置
CN201910465639.X 2019-05-30

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/538,617 Continuation US20220083375A1 (en) 2019-05-30 2021-11-30 Method and apparatus for scheduling task processing entity

Publications (1)

Publication Number Publication Date
WO2020238989A1 true WO2020238989A1 (zh) 2020-12-03

Family

ID=73500964

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/092718 WO2020238989A1 (zh) 2019-05-30 2020-05-27 一种调度任务处理实体的方法及装置

Country Status (3)

Country Link
US (1) US20220083375A1 (zh)
CN (1) CN112019581B (zh)
WO (1) WO2020238989A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112422633B (zh) * 2020-10-27 2023-09-08 京东方科技集团股份有限公司 用户请求响应方法、装置、计算机可读存储介质及设备
US11909818B2 (en) * 2021-11-19 2024-02-20 Avaya Management L.P. Reaching a quorum with a number of master nodes
CN115379019B (zh) * 2022-08-19 2024-07-09 济南浪潮数据技术有限公司 一种服务调度方法、装置、设备及存储介质
CN115391018A (zh) * 2022-09-30 2022-11-25 中国建设银行股份有限公司 任务调度方法、装置和设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101488977A (zh) * 2009-03-09 2009-07-22 杭州华三通信技术有限公司 多点处理资源的调度方法及多点控制单元
CN103458052A (zh) * 2013-09-16 2013-12-18 北京搜狐新媒体信息技术有限公司 一种基于IaaS云平台的资源调度方法和装置
CN104901989A (zh) * 2014-03-07 2015-09-09 中国科学院声学研究所 一种现场服务提供系统及方法
WO2017162075A1 (zh) * 2016-03-25 2017-09-28 阿里巴巴集团控股有限公司 任务调度方法和装置

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101741912A (zh) * 2009-12-30 2010-06-16 中兴通讯股份有限公司 一种处理计算任务的方法、网络设备及分布式网络系统
CN102469126B (zh) * 2010-11-10 2014-08-06 中国移动通信集团公司 一种应用调度系统、方法和相关装置
US9870269B1 (en) * 2013-09-05 2018-01-16 Amazon Technologies, Inc. Job allocation in a clustered environment
CN103560943B (zh) * 2013-10-31 2017-01-11 北京邮电大学 支持海量数据实时处理的网络分析系统和方法
CN105868222A (zh) * 2015-09-17 2016-08-17 乐视网信息技术(北京)股份有限公司 一种任务调度方法及装置
CN106878356B (zh) * 2015-12-11 2020-08-04 中国移动通信集团公司 一种调度方法及计算节点
CN108206768A (zh) * 2016-12-20 2018-06-26 阿里巴巴集团控股有限公司 集群监测和切换方法及装置
CN106777371B (zh) * 2017-01-23 2019-12-06 北京齐尔布莱特科技有限公司 日志收集系统和方法
CN107807815B (zh) * 2017-10-19 2020-11-24 北京京东尚科信息技术有限公司 分布式处理任务的方法和装置
CN107832204A (zh) * 2017-11-29 2018-03-23 郑州云海信息技术有限公司 一种基于mdc的服务器cpu能耗预测方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101488977A (zh) * 2009-03-09 2009-07-22 杭州华三通信技术有限公司 多点处理资源的调度方法及多点控制单元
CN103458052A (zh) * 2013-09-16 2013-12-18 北京搜狐新媒体信息技术有限公司 一种基于IaaS云平台的资源调度方法和装置
CN104901989A (zh) * 2014-03-07 2015-09-09 中国科学院声学研究所 一种现场服务提供系统及方法
WO2017162075A1 (zh) * 2016-03-25 2017-09-28 阿里巴巴集团控股有限公司 任务调度方法和装置

Also Published As

Publication number Publication date
US20220083375A1 (en) 2022-03-17
CN112019581B (zh) 2022-02-25
CN112019581A (zh) 2020-12-01

Similar Documents

Publication Publication Date Title
WO2020238989A1 (zh) 一种调度任务处理实体的方法及装置
US20190324819A1 (en) Distributed-system task assignment method and apparatus
JP3944154B2 (ja) マルチスレッド・サーバ内のスレッド・プールを動的に調整する方法およびシステム
AU2010336363B2 (en) Managing queries
CN109697122B (zh) 任务处理方法、设备及计算机存储介质
US20150295970A1 (en) Method and device for augmenting and releasing capacity of computing resources in real-time stream computing system
JP6241300B2 (ja) ジョブスケジューリング装置、ジョブスケジューリング方法、およびジョブスケジューリングプログラム
US9374425B2 (en) Behavior based client selection for disparate treatment
CN109564528B (zh) 分布式计算中计算资源分配的系统和方法
US10521258B2 (en) Managing test services in a distributed production service environment
CN110609738A (zh) 自适应数据同步
JP2008152618A (ja) ジョブ割当プログラム、方法及び装置
JP2013218744A (ja) リソースに基づいたスケジューラ
US20210200765A1 (en) Connection pools for parallel processing applications accessing distributed databases
WO2016169189A1 (zh) 病毒扫描方法和病毒扫描装置
CN107911484B (zh) 一种消息处理的方法及装置
JP2000148513A (ja) タスク制御方法およびタスク制御装置
WO2022111466A1 (zh) 任务调度方法、控制方法、电子设备、计算机可读介质
CN114489978A (zh) 资源调度方法、装置、设备及存储介质
CN109062707B (zh) 电子装置及其限制进程间通信的方法、存储介质
CN113535361A (zh) 任务调度方法、装置、设备及存储介质
US20230418667A1 (en) Computing device for handling tasks in a multi-core processor, and method for operating computing device
Liu et al. Cooperative job scheduling and data allocation for busy data-intensive parallel computing clusters
US20220179687A1 (en) Information processing apparatus and job scheduling method
CN115904673B (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: 20815561

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

Country of ref document: EP

Kind code of ref document: A1