WO2020119117A1 - Distributed computing method, apparatus and system, device and readable storage medium - Google Patents

Distributed computing method, apparatus and system, device and readable storage medium Download PDF

Info

Publication number
WO2020119117A1
WO2020119117A1 PCT/CN2019/096075 CN2019096075W WO2020119117A1 WO 2020119117 A1 WO2020119117 A1 WO 2020119117A1 CN 2019096075 W CN2019096075 W CN 2019096075W WO 2020119117 A1 WO2020119117 A1 WO 2020119117A1
Authority
WO
WIPO (PCT)
Prior art keywords
task
node
executed
execution
task execution
Prior art date
Application number
PCT/CN2019/096075
Other languages
French (fr)
Chinese (zh)
Inventor
阚勇
Original Assignee
平安医疗健康管理股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安医疗健康管理股份有限公司 filed Critical 平安医疗健康管理股份有限公司
Publication of WO2020119117A1 publication Critical patent/WO2020119117A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/16Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs
    • G06F15/163Interprocessor communication
    • G06F15/173Interprocessor communication using an interconnection network, e.g. matrix, shuffle, pyramid, star, snowflake
    • G06F15/17337Direct connection machines, e.g. completely connected computers, point to point communication networks
    • 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
    • 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/5061Partitioning or combining of resources
    • G06F9/5066Algorithms for mapping a plurality of inter-dependent sub-tasks onto a plurality of physical CPUs
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Mathematical Physics (AREA)
  • Computer And Data Communications (AREA)
  • Multi Processors (AREA)

Abstract

A distributed computing method, apparatus and system, a device, and a computer-readable storage medium, wherein same relate to the field of cloud computing, and can effectively improve the utilization rate of computing resources in a distributed computing network. The method comprises: when receiving a registration request sent by each terminal device, registering each terminal device as a task execution node or a task initiation node according to a node tag in the registration request (S101); when a task execution request sent by the task initiation node is received, scheduling, according to a pre-set task scheduling policy, a task to be executed in the task execution request to a corresponding task execution node for execution (S102); and receiving a task execution result returned by the corresponding task execution node, and sending the task execution result to the corresponding task initiation node (S103).

Description

分布式计算方法、装置、系统、设备及可读存储介质 Distributed computing method, device, system, equipment and readable storage medium The
本申请要求于2018年12月14日提交中国专利局、申请号为201811531908.X、发明名称为“分布式计算方法、装置、系统、设备及可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在申请中。This application requires the priority of the Chinese patent application submitted to the Chinese Patent Office on December 14, 2018, with the application number 201811531908.X and the invention titled "distributed computing methods, devices, systems, equipment, and readable storage media," The entire contents are incorporated into the application by reference.
技术领域Technical field
本申请涉及分布式计算的技术领域,尤其涉及一种分布式计算方法、装置、系统、设备及可读存储介质。The present application relates to the technical field of distributed computing, and in particular, to a distributed computing method, device, system, device, and readable storage medium.
背景技术Background technique
分布式计算是利用网络把成千上万台计算机连接起来,组成一台虚拟的超级计算机,完成单台计算机无法完成的超大规模的问题求解。目前,现有的分布式计算框架对运行的机器所处环境要求较高,一般都要求几种节点,如调度节点、执行节点和任务节点均在同一局域网内,无形中限制了这些机器只能是使用者自有,而无法充分利用现有互联网上的计算资源,因此,如何提高分布式计算网络中计算资源的利用率是目前亟待解决的问题。Distributed computing is the use of networks to connect tens of thousands of computers to form a virtual supercomputer to complete ultra-large-scale problem solving that cannot be completed by a single computer. At present, the existing distributed computing framework places high requirements on the environment where the machines are running, and generally requires several types of nodes, such as scheduling nodes, execution nodes, and task nodes are all in the same local area network, which invisibly restricts these machines to only It is the user's own and cannot fully utilize the computing resources on the existing Internet. Therefore, how to increase the utilization rate of computing resources in the distributed computing network is a problem that needs to be solved urgently.
发明内容Summary of the invention
本申请的主要目的在于提供一种分布式计算方法、装置、系统、设备及可读存储介质,旨在提高分布式计算网络中计算资源的利用率。The main purpose of the present application is to provide a distributed computing method, device, system, device, and readable storage medium, aiming to improve the utilization rate of computing resources in a distributed computing network.
为实现上述目的,本申请提供一种分布式计算方法,所述分布式计算方法包括以下步骤:To achieve the above objective, the present application provides a distributed computing method, which includes the following steps:
当接收到各终端设备发送的注册请求时,依据所述注册请求中的节点标签,将所述各终端设备注册为任务执行节点或任务发起节点;When receiving the registration request sent by each terminal device, according to the node label in the registration request, register each terminal device as a task execution node or a task initiation node;
当接收到任务发起节点发送的任务执行请求时,依据预设任务调度策略,将所述任务执行请求中的待执行任务调度至对应的任务执行节点进行执行;When receiving the task execution request sent by the task initiating node, according to the preset task scheduling strategy, the task to be executed in the task execution request is scheduled to the corresponding task execution node for execution;
接收对应的任务执行节点返回的任务执行结果,并将所述任务执行结果发送至对应的任务发起节点。Receiving the task execution result returned by the corresponding task execution node, and sending the task execution result to the corresponding task initiation node.
可选地,依据所述注册请求中的节点标签,将所述各终端设备注册为任务执行节点或任务发起节点的步骤包括:Optionally, the step of registering each terminal device as a task execution node or a task initiation node according to the node label in the registration request includes:
从所述注册请求中读取节点标签,并判断所述节点标签是执行节点标签,还是发起节点标签;Reading a node label from the registration request, and determining whether the node label is an execution node label or an initiating node label;
若所述节点标签是执行节点标签,则将对应的终端设备注册为任务执行节点;If the node label is an execution node label, register the corresponding terminal device as a task execution node;
若所述节点标签是发起节点标签,则将对应的终端设备注册为任务发起节点。If the node label is an initiating node label, the corresponding terminal device is registered as a task initiating node.
可选地,依据预设任务调度策略,将所述任务执行请求中的待执行任务调度至对应的任务执行节点进行执行的步骤包括:Optionally, according to a preset task scheduling strategy, the step of scheduling the task to be executed in the task execution request to a corresponding task execution node for execution includes:
从所述任务执行请求中读取待执行任务的编写语言标签;Reading the writing language tag of the task to be executed from the task execution request;
将已注册的全部任务执行节点中包含有所述编写语言标签的任务执行节点,确定为候选任务执行节点;Determine all the registered task execution nodes that contain the writing language tags as candidate task execution nodes;
获取各候选任务执行节点的当前运行状态和当前可用计算资源,并将当前运行状态为空闲状态,且当前可用计算资源最多的候选任务执行节点确定为目标任务执行节点;Obtain the current running state and currently available computing resources of each candidate task execution node, and determine the candidate task execution node with the current running state as idle and the most currently available computing resources as the target task execution node;
将所述待执行任务调度至所述目标任务执行节点进行执行。Scheduling the task to be executed to the target task execution node for execution.
可选地,依据预设任务调度策略,将所述任务执行请求中的待执行任务调度至对应的任务执行节点进行执行的步骤包括:Optionally, according to a preset task scheduling strategy, the step of scheduling the task to be executed in the task execution request to a corresponding task execution node for execution includes:
判断所述任务执行请求中是否存在包含至少两个待执行任务的待执行任务组;Determine whether there is a task group to be executed including at least two tasks to be executed in the task execution request;
若所述任务执行请求中存在包含至少两个待执行任务的待执行任务组,则判断所述待执行任务组中的待执行任务之间是否存在依赖关系;If there is a task group to be executed including at least two tasks to be executed in the task execution request, it is determined whether there is a dependency relationship between the tasks to be executed in the task group to be executed;
若所述待执行任务组中的待执行任务之间存在依赖关系,则依据所述待执行任务组中各待执行任务的编写语言标签,确定目标任务执行节点;If there is a dependency relationship between the tasks to be executed in the task group to be executed, the target task execution node is determined according to the writing language tags of each task to be executed in the task group to be executed;
将所述待执行任务组中的各待执行任务均调度至所述目标任务执行节点执行。All tasks to be executed in the task to-be-executed group are scheduled to be executed by the target task execution node.
可选地,判断所述待执行任务组中的待执行任务之间是否存在依赖关系的步骤之后,还包括:Optionally, after the step of determining whether there is a dependency relationship between the tasks to be executed in the task to be executed group, the method further includes:
若所述待执行任务组中的待执行任务之间不存在依赖关系,则依据所述待执行任务组中各待执行任务的编写语言标签,将所述待执行任务组中的各待执行任务分别调度至对应的任务执行节点进行执行。If there is no dependency relationship between the tasks to be executed in the task group to be executed, then according to the writing language tags of the tasks to be executed in the task group to be executed, each task to be executed in the task group to be executed Dispatched to the corresponding task execution node for execution.
可选地,依据所述注册请求中的节点标签,将所述各终端设备注册为任务执行节点或任务发起节点的步骤包括:Optionally, the step of registering each terminal device as a task execution node or a task initiation node according to the node label in the registration request includes:
获取当前CPU空闲资源,并判断所述当前CPU空闲资源是否大于或等于预设CPU空闲资源;Obtain the current CPU idle resources, and determine whether the current CPU idle resources are greater than or equal to the preset CPU idle resources;
若当前CPU空闲资源大于或等于预设CPU空闲资源,则依据当前CPU空闲资源,确定同步注册设备数;If the current CPU idle resource is greater than or equal to the preset CPU idle resource, the number of synchronized registered devices is determined according to the current CPU idle resource;
依据所述注册请求中的节点标签,每次同时执行所述同步注册设备数的终端设备的注册操作,以将所述各终端设备注册为任务执行节点或任务发起节点。According to the node label in the registration request, the registration operation of the terminal devices with the number of synchronously registered devices is simultaneously executed each time to register each terminal device as a task execution node or a task initiation node.
此外,为实现上述目的,本申请还提供一种分布式计算装置,所述分布式计算装置包括:In addition, to achieve the above object, the present application also provides a distributed computing device, the distributed computing device includes:
节点注册模块,用于当接收到各终端设备发送的注册请求时,依据所述注册请求中的节点标签,将所述各终端设备注册为任务执行节点或任务发起节点;The node registration module is used to register each terminal device as a task execution node or a task initiation node according to the node label in the registration request when receiving the registration request sent by each terminal device;
任务调度模块,用于当接收到任务发起节点发送的任务执行请求时,依据预设任务调度策略,将所述任务执行请求中的待执行任务调度至对应的任务执行节点进行执行;The task scheduling module is used to schedule the task to be executed in the task execution request to the corresponding task execution node for execution according to the preset task scheduling strategy when receiving the task execution request sent by the task initiating node;
发送模块,用于接收对应的任务执行节点返回的任务执行结果,并将所述任务执行结果发送至对应的任务发起节点。The sending module is configured to receive the task execution result returned by the corresponding task execution node, and send the task execution result to the corresponding task initiation node.
此外,为实现上述目的,本发申请还提供一种分布式计算系统,所述分布式计算系统包括任务调度节点、任务执行节点和任务发起节点,所述任务调度节点部署于公网,所述任务执行节点和所述任务发起节点部署于公网或私网,其中,In addition, in order to achieve the above purpose, the present application also provides a distributed computing system. The distributed computing system includes a task scheduling node, a task execution node, and a task initiation node. The task scheduling node is deployed on the public network. The task execution node and the task initiation node are deployed on a public network or a private network, where,
所述任务调度节点,用于当接收到各终端设备发送的注册请求时,依据所述注册请求中的节点标签,将所述各终端设备注册为任务执行节点或任务发起节点;The task scheduling node is used to register each terminal device as a task execution node or a task initiation node according to the node label in the registration request when receiving the registration request sent by each terminal device;
所述任务调度节点,还用于当接收到任务发起节点发送的任务执行请求时,依据预设任务调度策略,将所述任务执行请求中的待执行任务调度至对应的任务执行节点进行执行;The task scheduling node is also used to schedule the task to be executed in the task execution request to the corresponding task execution node for execution according to a preset task scheduling strategy when receiving the task execution request sent by the task initiating node;
所述任务调度节点,还用于接收对应的任务执行节点返回的任务执行结果,并将所述任务执行结果发送至对应的任务发起节点;The task scheduling node is also used to receive the task execution result returned by the corresponding task execution node, and send the task execution result to the corresponding task initiation node;
所述任务执行节点,用于接收所述任务调度节点调度的待执行任务,并执行所述待执行任务,且将所述待执行任务的任务执行结果返回给所述任务调度节点;The task execution node is configured to receive the task to be executed scheduled by the task scheduling node, execute the task to be executed, and return the task execution result of the task to the task scheduling node;
所述任务发起节点,用于当监测到触发的任务发起指令时,生成携带有待执行任务和编写语言标签的任务执行请求,并将所述任务执行请求发送至所述任务调度节点。The task initiation node is used to generate a task execution request carrying a task to be executed and a writing language tag when a triggered task initiation instruction is detected, and send the task execution request to the task scheduling node.
此外,为实现上述目的,本申请还提供一种分布式计算设备,所述分布式计算设备包括处理器、存储器、以及存储在所述存储器上并可被所述处理器执行的计算机可读指令,其中所述计算机可读指令被所述处理器执行时,实现如上述的分布式计算方法的步骤。In addition, to achieve the above object, the present application also provides a distributed computing device, the distributed computing device includes a processor, a memory, and computer readable instructions stored on the memory and executable by the processor Where the computer-readable instructions are executed by the processor to implement the steps of the distributed computing method as described above.
此外,为实现上述目的,本申请还提供一种可读存储介质,所述可读存储介质上存储有计算机可读指令,其中所述计算机可读指令被处理器执行时,实现如上述的分布式计算方法的步骤。In addition, in order to achieve the above object, the present application also provides a readable storage medium on which computer-readable instructions are stored, wherein when the computer-readable instructions are executed by a processor, the distribution as described above is achieved Of the formula calculation method.
本申请提供一种分布式计算方法、装置、系统、设备及可读存储介质,本申请将各终端设备注册为任务执行节点和任务发起节点,然后当接收到任务发起节点发送的任务执行请求时,依据预设任务调度策略,将任务执行请求中的待执行任务调度至对应的任务执行节点进行执行,并接收对应的任务执行节点返回的任务执行结果,且将该任务执行结果发送至对应的任务发起节点,通过上述方式,可以将待执行任务调度至对应的任务执行节点,由对应的任务执行节点执行待执行任务,可以有效的提高分布式计算网络中计算资源的利用率。This application provides a distributed computing method, device, system, device, and readable storage medium. This application registers each terminal device as a task execution node and a task initiation node, and then receives a task execution request sent by the task initiation node , According to the preset task scheduling strategy, schedule the task to be executed in the task execution request to the corresponding task execution node for execution, and receive the task execution result returned by the corresponding task execution node, and send the task execution result to the corresponding The task initiating node can schedule the task to be executed to the corresponding task execution node in the above manner, and the corresponding task execution node can execute the task to be executed, which can effectively improve the utilization rate of computing resources in the distributed computing network.
附图说明BRIEF DESCRIPTION
图1为本申请各实施例涉及的分布式计算设备的硬件结构示意图;FIG. 1 is a schematic diagram of a hardware structure of a distributed computing device involved in various embodiments of this application;
图2为本申请分布式计算方法第一实施例的流程示意图;2 is a schematic flowchart of a first embodiment of a distributed computing method of this application;
图3为本申请分布式计算装置第一实施例的功能模块示意图;3 is a schematic diagram of functional modules of a first embodiment of a distributed computing device of the present application;
图4为本申请分布式计算系统第一实施例的功能模块示意图。4 is a schematic diagram of functional modules of the first embodiment of the distributed computing system of the present application.
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The implementation, functional characteristics and advantages of the present application will be further described in conjunction with the embodiments and with reference to the drawings.
具体实施方式detailed description
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
本申请实施例涉及的分布式计算方法主要应用于分布式计算设备,该分布式计算设备可以是PC(个人计算机personal computer)、便携计算机、移动终端等具有显示和处理功能的设备。The distributed computing method involved in the embodiments of the present application is mainly applied to a distributed computing device, and the distributed computing device may be a PC (personal computer personal computer), portable computers, mobile terminals and other devices with display and processing functions.
参照图1,图1为本申请实施例方案中涉及的分布式计算设备的硬件结构示意图。本申请实施例中,分布式计算设备可以包括处理器1001(例如中央处理器Central Processing Unit、CPU),通信总线1002,用户接口1003,网络接口1004,存储器1005。其中,通信总线1002用于实现这些组件之间的连接通信;用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard);网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口);存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器,存储器1005可选的还可以是独立于前述处理器1001的存储装置。本领域技术人员可以理解,图1中示出的硬件结构并不构成对本申请的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Referring to FIG. 1, FIG. 1 is a schematic diagram of a hardware structure of a distributed computing device involved in an embodiment of the present application. In the embodiment of the present application, the distributed computing device may include a processor 1001 (for example, a central processor Central Processing Unit, CPU), communication bus 1002, user interface 1003, network interface 1004, memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components; the user interface 1003 may include a display (Display), an input unit such as a keyboard (Keyboard); the network interface 1004 may optionally include a standard wired interface, a wireless interface (Such as WI-FI interface); the memory 1005 can be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk storage, the storage 1005 may optionally be a storage device independent of the foregoing processor 1001. Those skilled in the art may understand that the hardware structure shown in FIG. 1 does not constitute a limitation on the present application, and may include more or less components than those illustrated, or combine certain components, or arrange different components.
继续参照图1,图1中作为一种可读存储介质的存储器1005可以包括操作系统、网络通信模块以及计算机可读指令。在图1中,网络通信模块主要用于连接服务器,与服务器进行数据通信;而处理器1001可以调用存储器1005中存储的计算机可读指令,并执行本申请实施例提供的分布式计算方法。With continued reference to FIG. 1, the memory 1005 in FIG. 1 as a readable storage medium may include an operating system, a network communication module, and computer-readable instructions. In FIG. 1, the network communication module is mainly used to connect to a server and perform data communication with the server; and the processor 1001 can call computer-readable instructions stored in the memory 1005 and execute the distributed computing method provided by the embodiments of the present application.
本申请实施例提供了一种分布式计算方法。The embodiments of the present application provide a distributed computing method.
参照图2,图2为本申请分布式计算方法第一实施例的流程示意图。Referring to FIG. 2, FIG. 2 is a schematic flowchart of a first embodiment of a distributed computing method according to this application.
本实施例中,该分布式计算方法包括:In this embodiment, the distributed computing method includes:
步骤S101,当接收到各终端设备发送的注册请求时,依据所述注册请求中的节点标签,将所述各终端设备注册为任务执行节点或任务发起节点;Step S101: When receiving a registration request sent by each terminal device, register each terminal device as a task execution node or a task initiation node according to the node label in the registration request;
本实施例中,该分布式计算方法应用于分布式计算系统,包括任务调度节点、任务执行节点和任务发起节点,该任务调度节点部署于公网,该任务执行节点和任务发起节点部署于公网或私网,部署的条件需要满足任务执行节点和任务发起节点均可以访问任务调度节点,其中,任务调度节点用于接收任务执行节点和任务发起节点的注册、指令转发、数据转发,以及为每个任务执行节点和任务发起节点动态生成ngrok(反向代理)子域名,且将待执行任务分发给任务执行节点;任务执行节点包含虚拟机和任务执行环境,该虚拟机包括但不限于JVM(Java Virtual Machine,Java虚拟机)、Linux虚拟机和SUN虚拟机,该运行环境包括但不限于JS运行环境、JAVA运行环境、Python运行环境和C/C++语言运行环境,任务执行节点用于执行任务调度节点分发的待执行任务;任务发起节点用于发起待执行任务,并将待执行任务发送至任务调度节点。In this embodiment, the distributed computing method is applied to a distributed computing system, including a task scheduling node, a task execution node, and a task initiation node. The task scheduling node is deployed on the public network, and the task execution node and task initiation node are deployed on the public network. Internet or private network, the deployment conditions need to meet the task execution node and task initiation node can access the task scheduling node, where the task scheduling node is used to receive the task execution node and task initiation node registration, instruction forwarding, data forwarding, and Each task execution node and task initiation node dynamically generate the ngrok (reverse proxy) subdomain name, and distribute the tasks to be executed to the task execution node; the task execution node contains a virtual machine and a task execution environment, the virtual machine includes but is not limited to JVM (Java Virtual Machine, Java virtual machine), Linux virtual machine and SUN virtual machine, the operating environment includes but is not limited to JS operating environment, JAVA operating environment, Python operating environment and C/C++ language operating environment, task execution node is used to execute task scheduling node The task to be executed is distributed; the task initiating node is used to initiate the task to be executed and send the task to be executed to the task scheduling node.
当监测到触发的节点注册指令时,终端设备显示包含有任务执行节点注册选项和任务发起节点注册选项的节点注册界面,通过该节点注册界面接收用户选择的节点注册选项,当选择的节点注册选项为任务执行节点注册选项时,获取执行节点标签,并生成包含有该执行节点标签的注册请求,且将该注册请求发送至任务调度节点;当选择的节点注册选项为任务发起节点注册选项时,获取发起节点标签,并生成包含有该安发起节点标签的注册请求,且将该注册请求发送至任务调度节点;当选择的节点注册选项包含任务执行节点注册选项和任务发起节点注册选项时,生成包含执行节点标签和发起节点标签的注册请求,且将该注册请求发送至任务调度节点。其中,终端设备可以注册为任务执行节点和/或任务发起节点。When the triggered node registration instruction is detected, the terminal device displays a node registration interface that includes the task execution node registration option and the task initiation node registration option, and receives the node registration option selected by the user through the node registration interface, when the selected node registration option When registering options for a task execution node, obtain the execution node label, and generate a registration request containing the execution node label, and send the registration request to the task scheduling node; when the selected node registration option is the task initiating node registration option, Obtain the initiating node label, and generate a registration request containing the initiating node label, and send the registration request to the task scheduling node; when the selected node registration option includes task execution node registration option and task initiation node registration option, generate It contains the registration request of the execution node label and the initiation node label, and sends the registration request to the task scheduling node. The terminal device may be registered as a task execution node and/or a task initiation node.
当接收到各终端设备发送的注册请求时,分布式计算系统中的任务调度节点依据该注册请求中的节点标签,将各终端设备注册为任务执行节点或任务发起节点。具体地,从该注册请求中读取节点标签,如果该节点标签为执行节点标签,则将对应的终端设备注册为任务执行节点,即生成终端设备的ngrok(反向代理)子域名,将对应终端设备的ngrok子域名写入执行节点列表中;如果该节点标签为发起节点标签,则将对应的终端设备注册为发起任务节点,即生成终端设备的ngrok子域名,将对应终端设备的ngrok子域名写入发起节点列表中;如果该节点标签有两个,且分别为执行节点标签和发起节点标签,则将对应的终端设备注册为双功能的节点,即终端设备即为任务执行节点,也为任务发起节点,具体为生成终端设备的ngrok子域名,将对应终端设备的ngrok子域名写入执行节点列表和发起节点列表中。When receiving the registration request sent by each terminal device, the task scheduling node in the distributed computing system registers each terminal device as a task execution node or a task initiation node according to the node label in the registration request. Specifically, the node label is read from the registration request, and if the node label is the execution node label, the corresponding terminal device is registered as the task execution node, that is, the ngrok (reverse proxy) subdomain name of the terminal device is generated, and the corresponding The ngrok subdomain name of the terminal device is written into the execution node list; if the node label is the initiating node label, the corresponding terminal device is registered as the initiating task node, that is, the ngrok subdomain name of the terminal device is generated, and the ngrok subdomain of the terminal device is generated. The domain name is written into the initiating node list; if there are two node labels, and they are the executing node label and the initiating node label, the corresponding terminal device is registered as a dual-function node, that is, the terminal device is the task execution node, and For the task initiation node, specifically generating the ngrok subdomain name of the terminal device, the ngrok subdomain name of the corresponding terminal device is written into the execution node list and the initiation node list.
步骤S102,当接收到任务发起节点发送的任务执行请求时,依据预设任务调度策略,将任务执行请求中的待执行任务调度至对应的任务执行节点进行执行;Step S102, when a task execution request sent by the task initiating node is received, the task to be executed in the task execution request is scheduled to the corresponding task execution node for execution according to a preset task scheduling strategy;
本实施例中,当监测到触发的任务发起指令时,任务发起节点获取待执行任务,并获取该待执行任务对应的编写语言标签,然后生成包含有待执行任务和编写语言标签的任务执行请求,并将该任务执行请求发送至任务调度节点,其中,编写语言标签包括但不限于JS标签、JAVA标签和Python标签。当任务调度节点接收到该任务发起节点发送的任务执行请求时,依据预设任务调度策略,将任务执行请求中的待执行任务调度至对应的任务执行节点进行执行。需要说明的是,执行待执行任务的任务执行节点的运行环境与编写语言标签存在对应关系,例如,具备JS运行环境的任务执行节点,仅具备执行编写语言标签为JS标签的待执行任务的功能,而具备JAVA运行环境的任务执行节点,仅具备执行编写语言标签为JAVA标签的待执行任务的功能。In this embodiment, when the triggered task initiation instruction is detected, the task initiation node obtains the task to be executed, and obtains the writing language tag corresponding to the task to be executed, and then generates a task execution request including the task to be executed and the writing language tag, And send the task execution request to the task scheduling node, where the writing language tags include but are not limited to JS tags, JAVA tags, and Python tags. When the task scheduling node receives the task execution request sent by the task initiating node, the task to be executed in the task execution request is scheduled to the corresponding task execution node for execution according to a preset task scheduling strategy. It should be noted that the execution environment of the task execution node that executes the task to be executed has a corresponding relationship with the writing language tag. For example, the task execution node with the JS running environment only has the function of executing the to-be-executed task whose writing language tag is JS tag , And the task execution node with JAVA running environment only has the function of executing the task to be executed whose writing language tag is JAVA tag.
具体地,预设任务调度策略为从该任务执行请求中读取待执行任务的编写语言标签,并将已注册的全部任务执行节点中包含有该编写语言标签的任务执行节点,确定为候选任务执行节点,然后获取各候选任务执行节点的当前运行状态和当前可用计算资源,并将当前运行状态为空闲状态,且当前可用计算资源最多的候选任务执行节点确定为目标任务执行节点,最后将待执行任务调度至目标任务执行节点进行执行,即任务调度节点通过修改本地host方式,获取目标任务执行节点对应的ngrok子域名,并依据该ngrok子域名将该待执行任务调度至该目标任务执行节点进行执行。例如,ngrok子域名为abc.ng.com,任务调度节点的公网域名为www.my.com,ngrok的主域名为 ng.com,则当任务发起节点通过www.my.com/abc向任务调度节点发送任务执行请求时,将任务执行请求重写到abc.my.com,并将abc.my.com解析到abc.ng.com,然后再通过abc.ng.com将待执行任务调度至目标任务执行节点。Specifically, the preset task scheduling strategy is to read the writing language tag of the task to be executed from the task execution request, and determine the task execution node containing the writing language tag among all registered task execution nodes as the candidate task Execute the node, then obtain the current running state and currently available computing resources of each candidate task executing node, and determine the current running state to be idle, and the candidate task executing node with the most currently available computing resources is determined as the target task executing node. Perform task scheduling to the target task execution node for execution, that is, the task scheduling node obtains the ngrok subdomain name corresponding to the target task execution node by modifying the local host, and schedules the task to be executed to the target task execution node according to the ngrok subdomain name To execute. For example, the ngrok subdomain name is abc.ng.com, the task scheduling node's public domain name is www.my.com, and the ngrok main domain name is ng.com, when the task initiating node sends a task execution request to the task scheduling node through www.my.com/abc, rewrite the task execution request to abc.my.com, and parse abc.my.com to abc .ng.com, and then schedule the task to be executed to the target task execution node through abc.ng.com.
步骤S103,接收对应的任务执行节点返回的任务执行结果,并将所述任务执行结果发送至对应的任务发起节点。Step S103: Receive the task execution result returned by the corresponding task execution node, and send the task execution result to the corresponding task initiation node.
本实施例中,当任务执行节点接收到任务调度节点分发的待执行任务时,任务执行节点启动虚拟机和运行环境,执行该待执行任务,并将任务执行结果返回给任务调度节点,任务调度节点接收该任务执行节点返回的任务执行结果,并将该任务执行结果发送至任务发起节点,由该任务发起节点显示任务执行结果。具体实施中,如果待执行任务被拆分为若干子任务,则各任务执行节点在执行各子任务后,将各子任务的执行结果发送至任务调度节点,由任务调度节点汇总各子任务的执行结果,从而等到总执行结果。In this embodiment, when the task execution node receives the pending task distributed by the task scheduling node, the task execution node starts the virtual machine and the running environment, executes the pending task, and returns the task execution result to the task scheduling node, task scheduling The node receives the task execution result returned by the task execution node, and sends the task execution result to the task initiation node, and the task initiation node displays the task execution result. In specific implementation, if the task to be executed is split into several subtasks, each task execution node sends the execution result of each subtask to the task scheduling node after executing each subtask, and the task scheduling node summarizes the Execution results, thus waiting for the total execution results.
本实施例中,将各终端设备注册为任务执行节点和任务发起节点,然后当接收到任务发起节点发送的任务执行请求时,依据预设任务调度策略,将任务执行请求中的待执行任务调度至对应的任务执行节点进行执行,并接收对应的任务执行节点返回的任务执行结果,且将该任务执行结果发送至对应的任务发起节点,通过上述方式,可以将待执行任务调度至对应的任务执行节点,由对应的任务执行节点执行待执行任务,可以有效的提高分布式计算网络中计算资源的利用率。In this embodiment, each terminal device is registered as a task execution node and a task initiation node, and then when a task execution request sent by the task initiation node is received, the task to be executed in the task execution request is scheduled according to a preset task scheduling strategy Go to the corresponding task execution node for execution, and receive the task execution result returned by the corresponding task execution node, and send the task execution result to the corresponding task initiation node. In the above manner, the task to be executed can be scheduled to the corresponding task Execution node, the corresponding task execution node executes the task to be executed, which can effectively improve the utilization rate of computing resources in the distributed computing network.
进一步地,基于上述第一实施例,提出了本申请分布式计算方法的第二实施例,与前述实施例的区别在于,任务发起节点发起多个待执行任务时,任务调度节点基于待执行任务之间的依赖关系的有无,确定不同的任务调度策略,具体地,任务调度节点当接收到任务发起节点发送的任务执行请求时,判断该任务执行请求中是否存在包含至少两个待执行任务的待执行任务组,如果任务执行请求中仅存在一个待执行任务,则依据待执行任务的编写语言标签,将该待执行任务调度至对应的任务执行节点执行;如果任务执行请求中存在包含至少两个待执行任务的待执行任务组,则判断待执行任务组中的待执行任务之间是否存在依赖关系,如果待执行任务组中的待执行任务之间存在依赖关系,则依据该待执行任务组中各待执行任务的编写语言标签,确定目标任务执行节点,并将待执行任务组中的各待执行任务均调度至目标任务执行节点执行;如果待执行任务组中的待执行任务之间不存在依赖关系,依据待执行任务组中各待执行任务的编写语言标签,将待执行任务组中的各待执行任务分别调度至对应的任务执行节点进行执行。在存在多个待执行任务时,可以在多个待执行任务之间存在依赖关系时,将多个待执行任务调度至同一任务执行节点执行,而在多个待执行任务之间不存在依赖关系时,可将多个待执行任务分别调度至不同的任务执行节点执行,以提高任务执行效率。Further, based on the above first embodiment, a second embodiment of the distributed computing method of the present application is proposed. The difference from the foregoing embodiment is that when a task initiating node initiates multiple tasks to be executed, the task scheduling node is based on the tasks to be executed Whether there is a dependency relationship, determine different task scheduling strategies, specifically, when the task scheduling node receives the task execution request sent by the task initiating node, determine whether the task execution request contains at least two tasks to be executed If there is only one task to be executed in the task execution request, the task to be executed will be scheduled to the corresponding task execution node for execution according to the writing language tag of the task to be executed; if the task execution request contains at least Two task groups to be executed, to determine whether there is a dependency relationship between tasks to be executed in the task group to be executed, if there is a dependency relationship between tasks to be executed in the task group to be executed, according to the to be executed Write language tags for each task to be executed in the task group, determine the target task execution node, and schedule each task to be executed in the task group to be executed to the target task execution node; if the task to be executed in the task group to be executed There is no dependency relationship, and each task to be executed in the task group to be executed is scheduled to the corresponding task execution node for execution according to the writing language tags of each task to be executed in the task group to be executed. When there are multiple tasks to be executed, when there are dependencies between the multiple tasks to be executed, the multiple tasks to be executed can be scheduled to be executed by the same task execution node, and there is no dependency relationship between the multiple tasks to be executed At this time, multiple tasks to be executed can be scheduled to be executed by different task execution nodes to improve the efficiency of task execution.
进一步地,基于上述第一或第二实施例,提出了本申请分布式计算方法的第三实施例,与前述实施例的区别在于,在任务调度节点的CPU空闲资源足够时,可以同时执行多个终端设备的注册操作,具体地,任务调度节点获取当前CPU空闲资源,并判断当前CPU空闲资源是否大于或等于预设CPU空闲资源,如果当前CPU空闲资源大于或等于预设CPU空闲资源,则依据当前CPU空闲资源,确定同步注册设备数,即CPU可同时注册的终端设备数量,并依据该注册请求中的节点标签,每次同时执行同步注册设备数的终端设备的注册操作,以将各终端设备注册为任务执行节点或任务发起节点。其中,CPU空闲资源与同步注册设备数的映射关系可由本领域技术人员基于实际情况进行设置,本专利提案对此不作具体限定。例如,当CPU空闲资源小于A时,对应CPU可同时注册的终端设备数量为2;当CPU空闲资源大于或者等于A,小于B时,对应CPU可同时注册的终端设备数量为3;当CPU空闲资源大于或者等于B,小于C时,对应CPU可同时注册的终端设备数量为4,其中,A<B<C。需要说明的是,上述预设CPU空闲资源可由本领域技术人员基于实际情况进行设置,本实施例对此不作具体限定。通过上述方式,可以同时执行多个终端设备的注册操作,提高注册效率。Further, based on the above first or second embodiment, a third embodiment of the distributed computing method of the present application is proposed. The difference from the foregoing embodiment is that when the CPU idle resources of the task scheduling node are sufficient, multiple executions can be performed simultaneously. The registration operation of each terminal device, specifically, the task scheduling node obtains the current CPU idle resource and determines whether the current CPU idle resource is greater than or equal to the preset CPU idle resource, if the current CPU idle resource is greater than or equal to the preset CPU idle resource, then According to the current CPU idle resources, determine the number of synchronized registered devices, that is, the number of terminal devices that the CPU can register at the same time, and according to the node label in the registration request, perform the simultaneous registration operation of the terminal devices with the number of synchronized registered devices each time The terminal device is registered as a task execution node or a task initiation node. The mapping relationship between the CPU idle resources and the number of synchronized registered devices can be set by those skilled in the art based on actual conditions, and this patent proposal does not specifically limit this. For example, when the CPU idle resource is less than A, the number of terminal devices that the corresponding CPU can simultaneously register is 2; when the CPU idle resource is greater than or equal to A and less than B, the number of terminal devices that the corresponding CPU can simultaneously register is 3; when the CPU is idle When the resource is greater than or equal to B and less than C, the corresponding number of terminal devices that the corresponding CPU can simultaneously register is 4, where A<B<C. It should be noted that the above-mentioned preset CPU idle resources can be set by those skilled in the art based on actual conditions, which is not specifically limited in this embodiment. In the above manner, registration operations of multiple terminal devices can be performed simultaneously, improving registration efficiency.
此外,本申请实施例还提供一种分布式计算装置。In addition, embodiments of the present application also provide a distributed computing device.
参照图3,图3为本申请分布式计算装置第一实施例的功能模块示意图。Referring to FIG. 3, FIG. 3 is a schematic diagram of functional modules of a first embodiment of a distributed computing device of the present application.
本申请分布式计算装置为虚拟装置,存储于图1所示分布式计算设备的存储器1005中,用于实现分布式计算机可读指令的所有功能;当接收到各终端设备发送的注册请求时,依据所述注册请求中的节点标签,将所述各终端设备注册为任务执行节点或任务发起节点;当接收到任务发起节点发送的任务执行请求时,依据预设任务调度策略,将所述任务执行请求中的待执行任务调度至对应的任务执行节点进行执行;接收对应的任务执行节点返回的任务执行结果,并将所述任务执行结果发送至对应的任务发起节点。。The distributed computing device of the present application is a virtual device, which is stored in the memory 1005 of the distributed computing device shown in FIG. 1 and is used to implement all functions of the distributed computer-readable instructions; when a registration request sent by each terminal device is received, According to the node label in the registration request, register each terminal device as a task execution node or a task initiation node; when receiving a task execution request sent by the task initiation node, according to a preset task scheduling strategy, the task The task to be executed in the execution request is scheduled to the corresponding task execution node for execution; the task execution result returned by the corresponding task execution node is received, and the task execution result is sent to the corresponding task initiation node. .
具体的,本实施例中,所述分布式计算装置包括:Specifically, in this embodiment, the distributed computing device includes:
节点注册模块101,用于当接收到各终端设备发送的注册请求时,依据所述注册请求中的节点标签,将所述各终端设备注册为任务执行节点或任务发起节点;The node registration module 101 is configured to, when receiving the registration request sent by each terminal device, register each terminal device as a task execution node or a task initiation node according to the node label in the registration request;
任务调度模块102,用于当接收到任务发起节点发送的任务执行请求时,依据预设任务调度策略,将所述任务执行请求中的待执行任务调度至对应的任务执行节点进行执行;The task scheduling module 102 is configured to, when receiving the task execution request sent by the task initiating node, schedule the tasks to be executed in the task execution request to the corresponding task execution node for execution according to a preset task scheduling strategy;
发送模块103,用于接收对应的任务执行节点返回的任务执行结果,并将所述任务执行结果发送至对应的任务发起节点。The sending module 103 is configured to receive the task execution result returned by the corresponding task execution node, and send the task execution result to the corresponding task initiation node.
进一步地,所述节点注册模块101还用于:Further, the node registration module 101 is also used to:
从所述注册请求中读取节点标签,并判断所述节点标签是执行节点标签,还是发起节点标签;Reading a node label from the registration request, and determining whether the node label is an execution node label or an initiating node label;
若所述节点标签是执行节点标签,则将对应的终端设备注册为任务执行节点;If the node label is an execution node label, register the corresponding terminal device as a task execution node;
若所述节点标签是发起节点标签,则将对应的终端设备注册为任务发起节点。If the node label is an initiating node label, the corresponding terminal device is registered as a task initiating node.
进一步地,所述任务调度模块102还用于:Further, the task scheduling module 102 is also used to:
从所述任务执行请求中读取待执行任务的编写语言标签;Reading the writing language tag of the task to be executed from the task execution request;
将已注册的全部任务执行节点中包含有所述编写语言标签的任务执行节点,确定为候选任务执行节点;Determine all the registered task execution nodes that contain the writing language tags as candidate task execution nodes;
获取各候选任务执行节点的当前运行状态和当前可用计算资源,并将当前运行状态为空闲状态,且当前可用计算资源最多的候选任务执行节点确定为目标任务执行节点;Obtain the current running state and currently available computing resources of each candidate task execution node, and determine the candidate task execution node with the current running state as idle and the most currently available computing resources as the target task execution node;
将所述待执行任务调度至所述目标任务执行节点进行执行。Scheduling the task to be executed to the target task execution node for execution.
进一步地,所述任务调度模块102还用于:Further, the task scheduling module 102 is also used to:
判断所述任务执行请求中是否存在包含至少两个待执行任务的待执行任务组;Determine whether there is a task group to be executed including at least two tasks to be executed in the task execution request;
若所述任务执行请求中存在包含至少两个待执行任务的待执行任务组,则判断所述待执行任务组中的待执行任务之间是否存在依赖关系;If there is a task group to be executed including at least two tasks to be executed in the task execution request, it is determined whether there is a dependency relationship between the tasks to be executed in the task group to be executed;
若所述待执行任务组中的待执行任务之间存在依赖关系,则依据所述待执行任务组中各待执行任务的编写语言标签,确定目标任务执行节点;If there is a dependency relationship between the tasks to be executed in the task group to be executed, the target task execution node is determined according to the writing language tags of each task to be executed in the task group to be executed;
将所述待执行任务组中的各待执行任务均调度至所述目标任务执行节点执行。All the tasks to be executed in the task group to be executed are scheduled to be executed by the target task execution node.
进一步地,所述任务调度模块102还用于:Further, the task scheduling module 102 is also used to:
若所述待执行任务组中的待执行任务之间不存在依赖关系,则依据所述待执行任务组中各待执行任务的编写语言标签,将所述待执行任务组中的各待执行任务分别调度至对应的任务执行节点进行执行。If there is no dependency relationship between the tasks to be executed in the task group to be executed, then according to the writing language tags of the tasks to be executed in the task group to be executed, each task to be executed in the task group to be executed Dispatched to the corresponding task execution node for execution.
进一步地,所述节点注册模块101还用于:Further, the node registration module 101 is also used to:
获取当前CPU空闲资源,并判断所述当前CPU空闲资源是否大于或等于预设CPU空闲资源;Obtain the current CPU idle resources, and determine whether the current CPU idle resources are greater than or equal to the preset CPU idle resources;
若当前CPU空闲资源大于或等于预设CPU空闲资源,则依据当前CPU空闲资源,确定同步注册设备数;If the current CPU idle resource is greater than or equal to the preset CPU idle resource, the number of synchronized registered devices is determined according to the current CPU idle resource;
依据所述注册请求中的节点标签,每次同时执行所述同步注册设备数的终端设备的注册操作,以将所述各终端设备注册为任务执行节点或任务发起节点。According to the node label in the registration request, the registration operation of the terminal devices with the number of synchronously registered devices is simultaneously executed each time to register each terminal device as a task execution node or a task initiation node.
其中,上述分布式计算装置中各个模块的功能实现与上述分布式计算方法实施例中各步骤相对应,其功能和实现过程在此处不再一一赘述。Wherein, the function realization of each module in the above-mentioned distributed computing device corresponds to each step in the above-mentioned embodiment of the distributed computing method, and its function and implementation process will not be repeated here one by one.
此外,本申请实施例还提供一种分布式计算系统。In addition, the embodiments of the present application also provide a distributed computing system.
参照图4,图4为本申请分布式计算系统第一实施例的功能模块示意图。Referring to FIG. 4, FIG. 4 is a schematic diagram of functional modules of the first embodiment of the distributed computing system of the present application.
该分布式计算系统包括任务调度节点201、任务执行节点202和任务发起节点203,所述任务调度节点部署于公网,所述任务执行节点和所述任务发起节点部署于公网或私网,其中,The distributed computing system includes a task scheduling node 201, a task execution node 202, and a task initiation node 203, the task scheduling node is deployed on a public network, the task execution node and the task initiation node are deployed on a public network or a private network, among them,
所述任务调度节点201,用于当接收到各终端设备发送的注册请求时,依据所述注册请求中的节点标签,将所述各终端设备注册为任务执行节点或任务发起节点;The task scheduling node 201 is configured to, when receiving a registration request sent by each terminal device, register each terminal device as a task execution node or a task initiation node according to the node label in the registration request;
所述任务调度节点201,还用于当接收到任务发起节点发送的任务执行请求时,依据预设任务调度策略,将所述任务执行请求中的待执行任务调度至对应的任务执行节点进行执行;The task scheduling node 201 is also used to schedule the task to be executed in the task execution request to the corresponding task execution node for execution according to a preset task scheduling strategy when receiving the task execution request sent by the task initiating node ;
所述任务调度节点201,还用于接收对应的任务执行节点返回的任务执行结果,并将所述任务执行结果发送至对应的任务发起节点;The task scheduling node 201 is also used to receive the task execution result returned by the corresponding task execution node, and send the task execution result to the corresponding task initiation node;
所述任务执行节点202,用于接收所述任务调度节点调度的待执行任务,并执行所述待执行任务,且将所述待执行任务的任务执行结果返回给所述任务调度节点;The task execution node 202 is configured to receive the task to be executed scheduled by the task scheduling node, execute the task to be executed, and return the task execution result of the task to be executed to the task scheduling node;
所述任务发起节点203,用于当监测到触发的任务发起指令时,生成携带有待执行任务和编写语言标签的任务执行请求,并将所述任务执行请求发送至所述任务调度节点。The task initiating node 203 is configured to generate a task execution request carrying a task to be executed and writing language tags when a triggered task initiation instruction is detected, and send the task execution request to the task scheduling node.
进一步地,所述任务调度节点201,还用于:Further, the task scheduling node 201 is also used to:
从所述注册请求中读取节点标签,并判断所述节点标签是执行节点标签,还是发起节点标签;Reading a node label from the registration request, and determining whether the node label is an execution node label or an initiating node label;
若所述节点标签是执行节点标签,则将对应的终端设备注册为任务执行节点;If the node label is an execution node label, register the corresponding terminal device as a task execution node;
若所述节点标签是发起节点标签,则将对应的终端设备注册为任务发起节点。If the node label is an initiating node label, the corresponding terminal device is registered as a task initiating node.
进一步地,所述任务调度节点201,还用于:Further, the task scheduling node 201 is also used to:
从所述任务执行请求中读取待执行任务的编写语言标签;Reading the writing language tag of the task to be executed from the task execution request;
将已注册的全部任务执行节点中包含有所述编写语言标签的任务执行节点,确定为候选任务执行节点;Determine all the registered task execution nodes that contain the writing language tags as candidate task execution nodes;
获取各候选任务执行节点的当前运行状态和当前可用计算资源,并将当前运行状态为空闲状态,且当前可用计算资源最多的候选任务执行节点确定为目标任务执行节点;Obtain the current running state and currently available computing resources of each candidate task execution node, and determine the candidate task execution node with the current running state as idle and the most currently available computing resources as the target task execution node;
将所述待执行任务调度至所述目标任务执行节点进行执行。Scheduling the task to be executed to the target task execution node for execution.
进一步地,所述任务调度节点201,还用于:Further, the task scheduling node 201 is also used to:
判断所述任务执行请求中是否存在包含至少两个待执行任务的待执行任务组;Determine whether there is a task group to be executed including at least two tasks to be executed in the task execution request;
若所述任务执行请求中存在包含至少两个待执行任务的待执行任务组,则判断所述待执行任务组中的待执行任务之间是否存在依赖关系;If there is a task group to be executed including at least two tasks to be executed in the task execution request, it is determined whether there is a dependency relationship between the tasks to be executed in the task group to be executed;
若所述待执行任务组中的待执行任务之间存在依赖关系,则依据所述待执行任务组中各待执行任务的编写语言标签,确定目标任务执行节点;If there is a dependency relationship between the tasks to be executed in the task group to be executed, the target task execution node is determined according to the writing language tags of each task to be executed in the task group to be executed;
将所述待执行任务组中的各待执行任务均调度至所述目标任务执行节点执行。All the tasks to be executed in the task group to be executed are scheduled to be executed by the target task execution node.
进一步地,所述任务调度节点201,还用于:Further, the task scheduling node 201 is also used to:
若所述待执行任务组中的待执行任务之间不存在依赖关系,则依据所述待执行任务组中各待执行任务的编写语言标签,将所述待执行任务组中的各待执行任务分别调度至对应的任务执行节点进行执行。If there is no dependency relationship between the tasks to be executed in the task group to be executed, then according to the writing language tags of the tasks to be executed in the task group to be executed, each task to be executed in the task group to be executed Dispatched to the corresponding task execution node for execution.
进一步地,所述任务调度节点201,还用于:Further, the task scheduling node 201 is also used to:
获取当前CPU空闲资源,并判断所述当前CPU空闲资源是否大于或等于预设CPU空闲资源;Obtain the current CPU idle resources, and determine whether the current CPU idle resources are greater than or equal to the preset CPU idle resources;
若当前CPU空闲资源大于或等于预设CPU空闲资源,则依据当前CPU空闲资源,确定同步注册设备数;If the current CPU idle resource is greater than or equal to the preset CPU idle resource, the number of synchronized registered devices is determined according to the current CPU idle resource;
依据所述注册请求中的节点标签,每次同时执行所述同步注册设备数的终端设备的注册操作,以将所述各终端设备注册为任务执行节点或任务发起节点。According to the node label in the registration request, the registration operation of the terminal devices with the number of synchronized registered devices is simultaneously executed each time to register each terminal device as a task execution node or a task initiation node.
其中,上述分布式计算系统中各个模块的功能实现与上述分布式计算方法实施例中各步骤相对应,其功能和实现过程在此处不再一一赘述。Wherein, the function implementation of each module in the above-mentioned distributed computing system corresponds to each step in the above-mentioned embodiment of the distributed computing method, and its function and implementation process will not be repeated here one by one.
此外,本申请实施例还提供一种可读存储介质,所述可读存储介质可以为非易失性可读存储介质。In addition, the embodiments of the present application further provide a readable storage medium, and the readable storage medium may be a non-volatile readable storage medium.
本申请可读存储介质上存储有计算机可读指令,其中所述计算机可读指令被处理器执行时,实现如上述的分布式计算方法的步骤。Computer-readable instructions are stored on a readable storage medium of the present application, where the computer-readable instructions are executed by a processor to implement the steps of the distributed computing method as described above.
其中,该计算机可读指令被执行时所实现的方法可参照本申请分布式计算方法的各个实施例,此处不再赘述。The method implemented when the computer-readable instructions are executed can refer to various embodiments of the distributed computing method of the present application, and details are not described herein again.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。It should be noted that in this article, the terms "include", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system that includes a series of elements includes not only those elements, It also includes other elements that are not explicitly listed, or include elements inherent to this process, method, article, or system. Without more restrictions, the element defined by the sentence "include one..." does not exclude that there are other identical elements in the process, method, article or system that includes the element.
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The sequence numbers of the above embodiments of the present application are for description only, and do not represent the advantages and disadvantages of the embodiments.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the methods in the above embodiments can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware, but in many cases the former is better Implementation. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence or part that contributes to the existing technology, and the computer software product is stored in a storage medium (such as ROM/RAM as described above) , Magnetic disk, optical disk), including several instructions to make a terminal device (which can be a mobile phone, computer, server, air conditioner, or network equipment, etc.) to perform the method described in each embodiment of the present application.
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above are only the preferred embodiments of the present application, and do not limit the scope of the patent of the present application. Any equivalent structure or equivalent process transformation made by the description and drawings of this application, or directly or indirectly used in other related technical fields , The same reason is included in the scope of patent protection in this application.

Claims (20)

  1. 一种分布式计算方法,其特征在于,所述分布式计算方法包括以下步骤: A distributed computing method, characterized in that the distributed computing method includes the following steps:
    当接收到各终端设备发送的注册请求时,依据所述注册请求中的节点标签,将所述各终端设备注册为任务执行节点或任务发起节点;When receiving the registration request sent by each terminal device, according to the node label in the registration request, register each terminal device as a task execution node or a task initiation node;
    当接收到任务发起节点发送的任务执行请求时,依据预设任务调度策略,将所述任务执行请求中的待执行任务调度至对应的任务执行节点进行执行;When receiving the task execution request sent by the task initiating node, according to the preset task scheduling strategy, the task to be executed in the task execution request is scheduled to the corresponding task execution node for execution;
    接收对应的任务执行节点返回的任务执行结果,并将所述任务执行结果发送至对应的任务发起节点。Receiving the task execution result returned by the corresponding task execution node, and sending the task execution result to the corresponding task initiation node.
  2. 如权利要求1所述的分布式计算方法,其特征在于,依据所述注册请求中的节点标签,将所述各终端设备注册为任务执行节点或任务发起节点的步骤包括:The distributed computing method according to claim 1, wherein the step of registering each terminal device as a task execution node or a task initiation node according to the node label in the registration request includes:
    从所述注册请求中读取节点标签,并判断所述节点标签是执行节点标签,还是发起节点标签;Reading a node label from the registration request, and determining whether the node label is an execution node label or an initiating node label;
    若所述节点标签是执行节点标签,则将对应的终端设备注册为任务执行节点;If the node label is an execution node label, register the corresponding terminal device as a task execution node;
    若所述节点标签是发起节点标签,则将对应的终端设备注册为任务发起节点。If the node label is an initiating node label, the corresponding terminal device is registered as a task initiating node.
  3. 如权利要求1所述的分布式计算方法,其特征在于,依据预设任务调度策略,将所述任务执行请求中的待执行任务调度至对应的任务执行节点进行执行的步骤包括:The distributed computing method according to claim 1, wherein the step of scheduling the task to be executed in the task execution request to the corresponding task execution node for execution according to a preset task scheduling strategy includes:
    从所述任务执行请求中读取待执行任务的编写语言标签;Reading the writing language tag of the task to be executed from the task execution request;
    将已注册的全部任务执行节点中包含有所述编写语言标签的任务执行节点,确定为候选任务执行节点;Determine all the registered task execution nodes that contain the writing language tags as candidate task execution nodes;
    获取各候选任务执行节点的当前运行状态和当前可用计算资源,并将当前运行状态为空闲状态,且当前可用计算资源最多的候选任务执行节点确定为目标任务执行节点;Obtain the current running state and currently available computing resources of each candidate task execution node, and determine the candidate task execution node with the current running state as idle and the most currently available computing resources as the target task execution node;
    将所述待执行任务调度至所述目标任务执行节点进行执行。Scheduling the task to be executed to the target task execution node for execution.
  4. 如权利要求1所述的分布式计算方法,其特征在于,依据预设任务调度策略,将所述任务执行请求中的待执行任务调度至对应的任务执行节点进行执行的步骤包括:The distributed computing method according to claim 1, wherein the step of scheduling the task to be executed in the task execution request to a corresponding task execution node for execution according to a preset task scheduling strategy includes:
    判断所述任务执行请求中是否存在包含至少两个待执行任务的待执行任务组;Determine whether there is a task group to be executed including at least two tasks to be executed in the task execution request;
    若所述任务执行请求中存在包含至少两个待执行任务的待执行任务组,则判断所述待执行任务组中的待执行任务之间是否存在依赖关系;If there is a task group to be executed including at least two tasks to be executed in the task execution request, it is determined whether there is a dependency relationship between the tasks to be executed in the task group to be executed;
    若所述待执行任务组中的待执行任务之间存在依赖关系,则依据所述待执行任务组中各待执行任务的编写语言标签,确定目标任务执行节点;If there is a dependency relationship between the tasks to be executed in the task group to be executed, the target task execution node is determined according to the writing language tags of each task to be executed in the task group to be executed;
    将所述待执行任务组中的各待执行任务均调度至所述目标任务执行节点执行。All the tasks to be executed in the task group to be executed are scheduled to be executed by the target task execution node.
  5. 如权利要求4所述的分布式计算方法,其特征在于,判断所述待执行任务组中的待执行任务之间是否存在依赖关系的步骤之后,还包括:The distributed computing method according to claim 4, wherein after the step of determining whether there is a dependency relationship between the tasks to be executed in the task group to be executed, the method further includes:
    若所述待执行任务组中的待执行任务之间不存在依赖关系,则依据所述待执行任务组中各待执行任务的编写语言标签,将所述待执行任务组中的各待执行任务分别调度至对应的任务执行节点进行执行。If there is no dependency relationship between the tasks to be executed in the task group to be executed, then according to the writing language tags of the tasks to be executed in the task group to be executed, each task to be executed in the task group to be executed Dispatched to the corresponding task execution node for execution.
  6. 如权利要求1所述的分布式计算方法,其特征在于,依据所述注册请求中的节点标签,将所述各终端设备注册为任务执行节点或任务发起节点的步骤包括:The distributed computing method according to claim 1, wherein the step of registering each terminal device as a task execution node or a task initiation node according to the node label in the registration request includes:
    获取当前CPU空闲资源,并判断所述当前CPU空闲资源是否大于或等于预设CPU空闲资源;Obtain the current CPU idle resources, and determine whether the current CPU idle resources are greater than or equal to the preset CPU idle resources;
    若当前CPU空闲资源大于或等于预设CPU空闲资源,则依据当前CPU空闲资源,确定同步注册设备数;If the current CPU idle resource is greater than or equal to the preset CPU idle resource, the number of synchronized registered devices is determined according to the current CPU idle resource;
    依据所述注册请求中的节点标签,每次同时执行所述同步注册设备数的终端设备的注册操作,以将所述各终端设备注册为任务执行节点或任务发起节点。According to the node label in the registration request, the registration operation of the terminal devices with the number of synchronized registered devices is simultaneously executed each time to register each terminal device as a task execution node or a task initiation node.
  7. 一种分布式计算装置,其特征在于,所述分布式计算装置包括:A distributed computing device, characterized in that the distributed computing device includes:
    节点注册模块,用于当接收到各终端设备发送的注册请求时,依据所述注册请求中的节点标签,将所述各终端设备注册为任务执行节点或任务发起节点;The node registration module is used to register each terminal device as a task execution node or a task initiation node according to the node label in the registration request when receiving the registration request sent by each terminal device;
    任务调度模块,用于当接收到任务发起节点发送的任务执行请求时,依据预设任务调度策略,将所述任务执行请求中的待执行任务调度至对应的任务执行节点进行执行;The task scheduling module is used to schedule the task to be executed in the task execution request to the corresponding task execution node for execution according to the preset task scheduling strategy when receiving the task execution request sent by the task initiating node;
    发送模块,用于接收对应的任务执行节点返回的任务执行结果,并将所述任务执行结果发送至对应的任务发起节点。The sending module is configured to receive the task execution result returned by the corresponding task execution node, and send the task execution result to the corresponding task initiation node.
  8. 如权利要求7所述的分布式计算装置,其特征在于,所述节点注册模块,还用于:The distributed computing device according to claim 7, wherein the node registration module is further used to:
    从所述注册请求中读取节点标签,并判断所述节点标签是执行节点标签,还是发起节点标签;Reading a node label from the registration request, and determining whether the node label is an execution node label or an initiating node label;
    若所述节点标签是执行节点标签,则将对应的终端设备注册为任务执行节点;If the node label is an execution node label, register the corresponding terminal device as a task execution node;
    若所述节点标签是发起节点标签,则将对应的终端设备注册为任务发起节点。If the node label is an initiating node label, the corresponding terminal device is registered as a task initiating node.
  9. 如权利要求7所述的分布式计算装置,其特征在于,所述任务调度模块,还用于:The distributed computing device according to claim 7, wherein the task scheduling module is further used to:
    从所述任务执行请求中读取待执行任务的编写语言标签;Reading the writing language tag of the task to be executed from the task execution request;
    将已注册的全部任务执行节点中包含有所述编写语言标签的任务执行节点,确定为候选任务执行节点;Determine all the registered task execution nodes that contain the writing language tags as candidate task execution nodes;
    获取各候选任务执行节点的当前运行状态和当前可用计算资源,并将当前运行状态为空闲状态,且当前可用计算资源最多的候选任务执行节点确定为目标任务执行节点;Obtain the current running state and currently available computing resources of each candidate task execution node, and determine the candidate task execution node with the current running state as idle and the most currently available computing resources as the target task execution node;
    将所述待执行任务调度至所述目标任务执行节点进行执行。Scheduling the task to be executed to the target task execution node for execution.
  10. 如权利要求7所述的分布式计算装置,其特征在于,所述任务调度模块,还用于:The distributed computing device according to claim 7, wherein the task scheduling module is further used to:
    判断所述任务执行请求中是否存在包含至少两个待执行任务的待执行任务组;Determine whether there is a task group to be executed including at least two tasks to be executed in the task execution request;
    若所述任务执行请求中存在包含至少两个待执行任务的待执行任务组,则判断所述待执行任务组中的待执行任务之间是否存在依赖关系;If there is a task group to be executed including at least two tasks to be executed in the task execution request, it is determined whether there is a dependency relationship between the tasks to be executed in the task group to be executed;
    若所述待执行任务组中的待执行任务之间存在依赖关系,则依据所述待执行任务组中各待执行任务的编写语言标签,确定目标任务执行节点;If there is a dependency relationship between the tasks to be executed in the task group to be executed, the target task execution node is determined according to the writing language tags of each task to be executed in the task group to be executed;
    将所述待执行任务组中的各待执行任务均调度至所述目标任务执行节点执行。All the tasks to be executed in the task group to be executed are scheduled to be executed by the target task execution node.
  11. 如权利要求10所述的分布式计算装置,其特征在于,所述任务调度模块,还用于:The distributed computing device of claim 10, wherein the task scheduling module is further configured to:
    若所述待执行任务组中的待执行任务之间不存在依赖关系,则依据所述待执行任务组中各待执行任务的编写语言标签,将所述待执行任务组中的各待执行任务分别调度至对应的任务执行节点进行执行。If there is no dependency relationship between the tasks to be executed in the task group to be executed, then according to the writing language tags of the tasks to be executed in the task group to be executed, each task to be executed in the task group to be executed Dispatched to the corresponding task execution node for execution.
  12. 一种分布式计算系统,其特征在于,所述分布式计算系统包括任务调度节点、任务执行节点和任务发起节点,所述任务调度节点部署于公网,所述任务执行节点和所述任务发起节点部署于公网或私网,其中,A distributed computing system, characterized in that the distributed computing system includes a task scheduling node, a task execution node and a task initiation node, the task scheduling node is deployed on the public network, the task execution node and the task initiation Nodes are deployed on public or private networks, where,
    所述任务调度节点,用于当接收到各终端设备发送的注册请求时,依据所述注册请求中的节点标签,将所述各终端设备注册为任务执行节点或任务发起节点;The task scheduling node is used to register each terminal device as a task execution node or a task initiation node according to the node label in the registration request when receiving the registration request sent by each terminal device;
    所述任务调度节点,还用于当接收到任务发起节点发送的任务执行请求时,依据预设任务调度策略,将所述任务执行请求中的待执行任务调度至对应的任务执行节点进行执行;The task scheduling node is also used to schedule the task to be executed in the task execution request to the corresponding task execution node for execution according to a preset task scheduling strategy when receiving the task execution request sent by the task initiating node;
    所述任务调度节点,还用于接收对应的任务执行节点返回的任务执行结果,并将所述任务执行结果发送至对应的任务发起节点;The task scheduling node is also used to receive the task execution result returned by the corresponding task execution node, and send the task execution result to the corresponding task initiation node;
    所述任务执行节点,用于接收所述任务调度节点调度的待执行任务,并执行所述待执行任务,且将所述待执行任务的任务执行结果返回给所述任务调度节点;The task execution node is configured to receive the task to be executed scheduled by the task scheduling node, execute the task to be executed, and return the task execution result of the task to the task scheduling node;
    所述任务发起节点,用于当监测到触发的任务发起指令时,生成携带有待执行任务和编写语言标签的任务执行请求,并将所述任务执行请求发送至所述任务调度节点。The task initiation node is used to generate a task execution request carrying a task to be executed and a writing language tag when a triggered task initiation instruction is detected, and send the task execution request to the task scheduling node.
  13. 一种分布式计算设备,其特征在于,所述分布式计算设备包括处理器、存储器、以及存储在所述存储器上并可被所述处理器执行的计算机可读指令,其中所述计算机可读指令被所述处理器执行时,实现如下步骤:A distributed computing device, characterized in that the distributed computing device includes a processor, a memory, and computer readable instructions stored on the memory and executable by the processor, wherein the computer is readable When the instruction is executed by the processor, the following steps are implemented:
    当接收到各终端设备发送的注册请求时,依据所述注册请求中的节点标签,将所述各终端设备注册为任务执行节点或任务发起节点;When receiving the registration request sent by each terminal device, according to the node label in the registration request, register each terminal device as a task execution node or a task initiation node;
    当接收到任务发起节点发送的任务执行请求时,依据预设任务调度策略,将所述任务执行请求中的待执行任务调度至对应的任务执行节点进行执行;When receiving the task execution request sent by the task initiating node, according to the preset task scheduling strategy, the task to be executed in the task execution request is scheduled to the corresponding task execution node for execution;
    接收对应的任务执行节点返回的任务执行结果,并将所述任务执行结果发送至对应的任务发起节点。Receiving the task execution result returned by the corresponding task execution node, and sending the task execution result to the corresponding task initiation node.
  14. 如权利要求13所述的分布式计算设备,其特征在于,所述依据所述注册请求中的节点标签,将所述各终端设备注册为任务执行节点或任务发起节点的步骤包括:The distributed computing device according to claim 13, wherein the step of registering each terminal device as a task execution node or a task initiation node according to the node label in the registration request includes:
    从所述注册请求中读取节点标签,并判断所述节点标签是执行节点标签,还是发起节点标签;Reading a node label from the registration request, and determining whether the node label is an execution node label or an initiating node label;
    若所述节点标签是执行节点标签,则将对应的终端设备注册为任务执行节点;If the node label is an execution node label, register the corresponding terminal device as a task execution node;
    若所述节点标签是发起节点标签,则将对应的终端设备注册为任务发起节点。If the node label is an initiating node label, the corresponding terminal device is registered as a task initiating node.
  15. 如权利要求13所述的分布式计算设备,其特征在于,所述依据预设任务调度策略,将所述任务执行请求中的待执行任务调度至对应的任务执行节点进行执行的步骤包括:The distributed computing device according to claim 13, wherein the step of scheduling the task to be executed in the task execution request to a corresponding task execution node for execution according to a preset task scheduling strategy includes:
    从所述任务执行请求中读取待执行任务的编写语言标签;Reading the writing language tag of the task to be executed from the task execution request;
    将已注册的全部任务执行节点中包含有所述编写语言标签的任务执行节点,确定为候选任务执行节点;Determine all the registered task execution nodes that contain the writing language tags as candidate task execution nodes;
    获取各候选任务执行节点的当前运行状态和当前可用计算资源,并将当前运行状态为空闲状态,且当前可用计算资源最多的候选任务执行节点确定为目标任务执行节点;Obtain the current running state and currently available computing resources of each candidate task execution node, and determine the candidate task execution node with the current running state as idle and the most currently available computing resources as the target task execution node;
    将所述待执行任务调度至所述目标任务执行节点进行执行。Scheduling the task to be executed to the target task execution node for execution.
  16. 如权利要求13所述的分布式计算设备,其特征在于,所述依据预设任务调度策略,将所述任务执行请求中的待执行任务调度至对应的任务执行节点进行执行的步骤包括:The distributed computing device according to claim 13, wherein the step of scheduling the task to be executed in the task execution request to a corresponding task execution node for execution according to a preset task scheduling strategy includes:
    判断所述任务执行请求中是否存在包含至少两个待执行任务的待执行任务组;Determine whether there is a task group to be executed including at least two tasks to be executed in the task execution request;
    若所述任务执行请求中存在包含至少两个待执行任务的待执行任务组,则判断所述待执行任务组中的待执行任务之间是否存在依赖关系;If there is a task group to be executed including at least two tasks to be executed in the task execution request, it is determined whether there is a dependency relationship between the tasks to be executed in the task group to be executed;
    若所述待执行任务组中的待执行任务之间存在依赖关系,则依据所述待执行任务组中各待执行任务的编写语言标签,确定目标任务执行节点;If there is a dependency relationship between the tasks to be executed in the task group to be executed, the target task execution node is determined according to the writing language tags of each task to be executed in the task group to be executed;
    将所述待执行任务组中的各待执行任务均调度至所述目标任务执行节点执行。All the tasks to be executed in the task group to be executed are scheduled to be executed by the target task execution node.
  17. 如权利要求16所述的分布式计算设备,其特征在于,所述判断所述待执行任务组中的待执行任务之间是否存在依赖关系的步骤之后,还包括:The distributed computing device according to claim 16, wherein after the step of determining whether there is a dependency relationship between tasks to be executed in the task group to be executed, the method further includes:
    若所述待执行任务组中的待执行任务之间不存在依赖关系,则依据所述待执行任务组中各待执行任务的编写语言标签,将所述待执行任务组中的各待执行任务分别调度至对应的任务执行节点进行执行。If there is no dependency relationship between the tasks to be executed in the task group to be executed, then according to the writing language tags of the tasks to be executed in the task group to be executed, each task to be executed in the task group to be executed Dispatched to the corresponding task execution node for execution.
  18. 一种可读存储介质,其特征在于,所述可读存储介质上存储有计算机可读指令,其中所述计算机可读指令被处理器执行时,实现如下步骤:A readable storage medium, characterized in that computer readable instructions are stored on the readable storage medium, wherein when the computer readable instructions are executed by a processor, the following steps are implemented:
    当接收到各终端设备发送的注册请求时,依据所述注册请求中的节点标签,将所述各终端设备注册为任务执行节点或任务发起节点;When receiving the registration request sent by each terminal device, according to the node label in the registration request, register each terminal device as a task execution node or a task initiation node;
    当接收到任务发起节点发送的任务执行请求时,依据预设任务调度策略,将所述任务执行请求中的待执行任务调度至对应的任务执行节点进行执行;When receiving the task execution request sent by the task initiating node, according to the preset task scheduling strategy, the task to be executed in the task execution request is scheduled to the corresponding task execution node for execution;
    接收对应的任务执行节点返回的任务执行结果,并将所述任务执行结果发送至对应的任务发起节点。Receiving the task execution result returned by the corresponding task execution node, and sending the task execution result to the corresponding task initiation node.
  19. 如权利要求18所述的可读存储介质,其特征在于,所述依据所述注册请求中的节点标签,将所述各终端设备注册为任务执行节点或任务发起节点的步骤包括:The readable storage medium according to claim 18, wherein the step of registering each terminal device as a task execution node or a task initiation node according to the node label in the registration request includes:
    从所述注册请求中读取节点标签,并判断所述节点标签是执行节点标签,还是发起节点标签;Reading a node label from the registration request, and determining whether the node label is an execution node label or an initiating node label;
    若所述节点标签是执行节点标签,则将对应的终端设备注册为任务执行节点;If the node label is an execution node label, register the corresponding terminal device as a task execution node;
    若所述节点标签是发起节点标签,则将对应的终端设备注册为任务发起节点。If the node label is an initiating node label, the corresponding terminal device is registered as a task initiating node.
  20. 如权利要求18所述的可读存储介质,其特征在于,所述依据预设任务调度策略,将所述任务执行请求中的待执行任务调度至对应的任务执行节点进行执行的步骤包括:The readable storage medium according to claim 18, wherein the step of scheduling the task to be executed in the task execution request to a corresponding task execution node for execution according to a preset task scheduling strategy includes:
    从所述任务执行请求中读取待执行任务的编写语言标签;Reading the writing language tag of the task to be executed from the task execution request;
    将已注册的全部任务执行节点中包含有所述编写语言标签的任务执行节点,确定为候选任务执行节点;Determine all the registered task execution nodes that contain the writing language tags as candidate task execution nodes;
    获取各候选任务执行节点的当前运行状态和当前可用计算资源,并将当前运行状态为空闲状态,且当前可用计算资源最多的候选任务执行节点确定为目标任务执行节点;Obtain the current running state and currently available computing resources of each candidate task execution node, and determine the candidate task execution node with the current running state as idle and the most currently available computing resources as the target task execution node;
    将所述待执行任务调度至所述目标任务执行节点进行执行。 Scheduling the task to be executed to the target task execution node for execution.
PCT/CN2019/096075 2018-12-14 2019-07-16 Distributed computing method, apparatus and system, device and readable storage medium WO2020119117A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811531908.X 2018-12-14
CN201811531908.XA CN109656699A (en) 2018-12-14 2018-12-14 Distributed computing method, device, system, equipment and readable storage medium storing program for executing

Publications (1)

Publication Number Publication Date
WO2020119117A1 true WO2020119117A1 (en) 2020-06-18

Family

ID=66114331

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/096075 WO2020119117A1 (en) 2018-12-14 2019-07-16 Distributed computing method, apparatus and system, device and readable storage medium

Country Status (2)

Country Link
CN (1) CN109656699A (en)
WO (1) WO2020119117A1 (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109656699A (en) * 2018-12-14 2019-04-19 平安医疗健康管理股份有限公司 Distributed computing method, device, system, equipment and readable storage medium storing program for executing
CN110134502A (en) * 2019-04-26 2019-08-16 北京迈格威科技有限公司 Task processing method, device, system, computer equipment and storage medium
CN110275762A (en) * 2019-04-30 2019-09-24 北京媒球信息科技有限公司 Calculation method, server, mobile terminal and device
CN110806930B (en) * 2019-10-29 2022-08-09 浙江大华技术股份有限公司 Micro-service scheduling method, device, equipment and storage device
CN111353709B (en) * 2020-02-29 2023-05-16 国网上海市电力公司 Method and system for producing electric power information product based on block chain
CN113703929B (en) * 2020-05-20 2023-08-01 中国移动通信集团浙江有限公司 Task scheduling method, system, computing device and storage medium
CN112416534A (en) * 2020-11-23 2021-02-26 北京中电普华信息技术有限公司 Agent-based task management method and device
CN113098854B (en) * 2021-03-26 2023-04-07 深信服科技股份有限公司 Task arranging method, system, storage medium and electronic equipment
CN113641493A (en) * 2021-08-11 2021-11-12 杭州安恒信息技术股份有限公司 Task pushing method, device and equipment and computer readable storage medium
CN114584627B (en) * 2022-05-09 2022-09-06 广州天越通信技术发展有限公司 Middle station dispatching system and method with network monitoring function

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104077188A (en) * 2013-03-29 2014-10-01 西门子公司 Method and device for scheduling tasks
CN105677467A (en) * 2015-12-31 2016-06-15 中国科学院深圳先进技术研究院 Yarn resource scheduler based on quantified labels
CN106708622A (en) * 2016-07-18 2017-05-24 腾讯科技(深圳)有限公司 Cluster resource processing method and system, and resource processing cluster
CN107038069A (en) * 2017-03-24 2017-08-11 北京工业大学 Dynamic labels match DLMS dispatching methods under Hadoop platform
CN109656699A (en) * 2018-12-14 2019-04-19 平安医疗健康管理股份有限公司 Distributed computing method, device, system, equipment and readable storage medium storing program for executing

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4605072B2 (en) * 2006-01-17 2011-01-05 株式会社日立製作所 Control device and information system control method
KR20140102478A (en) * 2013-02-14 2014-08-22 한국전자통신연구원 Workflow job scheduling apparatus and method
CN106330923B (en) * 2016-08-26 2019-10-25 中国联合网络通信集团有限公司 Node registering method and system based on Kubernetes system
CN108062243B (en) * 2016-11-08 2022-01-04 杭州海康威视数字技术股份有限公司 Execution plan generation method, task execution method and device
CN106909451A (en) * 2017-02-28 2017-06-30 郑州云海信息技术有限公司 A kind of distributed task dispatching system and method
CN107515786B (en) * 2017-08-04 2021-02-19 北京奇虎科技有限公司 Resource allocation method, master device, slave device and distributed computing system
CN108710537A (en) * 2018-04-09 2018-10-26 平安科技(深圳)有限公司 A kind of task processing method, storage medium and server
CN108737560A (en) * 2018-05-31 2018-11-02 南京邮电大学 Cloud computing task intelligent dispatching method and system, readable storage medium storing program for executing, terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104077188A (en) * 2013-03-29 2014-10-01 西门子公司 Method and device for scheduling tasks
CN105677467A (en) * 2015-12-31 2016-06-15 中国科学院深圳先进技术研究院 Yarn resource scheduler based on quantified labels
CN106708622A (en) * 2016-07-18 2017-05-24 腾讯科技(深圳)有限公司 Cluster resource processing method and system, and resource processing cluster
CN107038069A (en) * 2017-03-24 2017-08-11 北京工业大学 Dynamic labels match DLMS dispatching methods under Hadoop platform
CN109656699A (en) * 2018-12-14 2019-04-19 平安医疗健康管理股份有限公司 Distributed computing method, device, system, equipment and readable storage medium storing program for executing

Also Published As

Publication number Publication date
CN109656699A (en) 2019-04-19

Similar Documents

Publication Publication Date Title
WO2020119117A1 (en) Distributed computing method, apparatus and system, device and readable storage medium
WO2020147396A1 (en) Method for dynamically configuring service domain name, device, apparatus, and storage medium
WO2018076841A1 (en) Data sharing method, apparatus, storage medium and server
WO2013159639A1 (en) Method, terminal, server, system and storage medium for microblog topic presentation
WO2015041436A1 (en) Method of managing control right, client device therefor, and master device therefor
WO2020224246A1 (en) Block chain-based data management method and apparatus, device and storage medium
WO2020119115A1 (en) Data verification method, device, apparatus, and storage medium
WO2019103280A1 (en) Electronic device and method for managing computing resources of at least one cloud server for providing cloud service
WO2014042357A1 (en) Screen synchronization control system, and method and apparatus for synchronizing a screen using same
WO2018166098A1 (en) Data auditing method and apparatus, mobile terminal, and computer-readable storage medium
WO2021118125A1 (en) Secure container construction device and method executable by android application, and computer-readable recording medium on which program thereof is recorded
WO2018201774A1 (en) Data approval method, apparatus, device, and computer readable storage medium
WO2020077832A1 (en) Cloud desktop access method, apparatus and device, and storage medium
WO2020107591A1 (en) Double insurance limiting method, apparatus, device, and readable storage medium
WO2020052247A1 (en) Network-resource batch loading method, smart tv, storage medium, and device
WO2020237859A1 (en) Data migration method employing nbd device, apparatus, device, and storage medium
WO2020233060A1 (en) Event notification method and apparatus, event notification server, and storage medium
WO2018184302A1 (en) Data transmission method, system, virtual load balancer and readable storage medium
WO2020062658A1 (en) Contract generation method and apparatus, and device and storage medium
WO2021125502A1 (en) Container-based cloud service providing system and method therefor
WO2020098075A1 (en) Financial data processing method, apparatus and device, and storage medium
WO2020114184A1 (en) Joint modeling method, apparatus and device, and computer-readable storage medium
WO2020184827A1 (en) Electronic device and method of controlling same
WO2016035979A1 (en) Method and system for controlling operation of image forming apparatus by using wearable device
WO2019035660A1 (en) Method and apparatus for managing scheduling of services during boot-up

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

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

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

122 Ep: pct application non-entry in european phase

Ref document number: 19895142

Country of ref document: EP

Kind code of ref document: A1