[go: up one dir, main page]

WO2018137611A1 - Task processing method, node, medium, device and content distribution network - Google Patents

Task processing method, node, medium, device and content distribution network Download PDF

Info

Publication number
WO2018137611A1
WO2018137611A1 PCT/CN2018/073799 CN2018073799W WO2018137611A1 WO 2018137611 A1 WO2018137611 A1 WO 2018137611A1 CN 2018073799 W CN2018073799 W CN 2018073799W WO 2018137611 A1 WO2018137611 A1 WO 2018137611A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
type
data
task
child
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2018/073799
Other languages
French (fr)
Chinese (zh)
Inventor
李逸骏
苗辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guizhou Baishancloud Technology Co Ltd
Original Assignee
Guizhou Baishancloud Technology Co Ltd
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 Guizhou Baishancloud Technology Co Ltd filed Critical Guizhou Baishancloud Technology Co Ltd
Publication of WO2018137611A1 publication Critical patent/WO2018137611A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • 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
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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

Definitions

  • the embodiments of the present invention are not limited to the field of computing technologies, and particularly relate to a task processing method, a node, a medium, a device, and a content distribution network.
  • a video transcoding task is often assigned to multiple processing nodes for transcoding.
  • each processing node needs to obtain complete pending data from the storage system separately, and then select some data for processing, which undoubtedly increases the network burden.
  • a processing node fails to process data, another processing node needs to re-acquire complete pending data from the storage system, which also increases the network burden.
  • An object of the embodiments of the present invention is to provide a task processing method, a node, a medium, a device, and a content distribution network, so as to reduce network load.
  • a task processing method is provided in a content distribution network, where the content distribution network includes: a storage node, a task scheduling node, and a plurality of task processing nodes, each task processing node includes: a first type of child node And a plurality of second type of child nodes, wherein the devices corresponding to the second type of child nodes are different, and the method includes:
  • the first type of child node obtains a to-be-processed task assigned by the task scheduling node to the task processing node where the first type of child node is located;
  • the first type of child node acquires to-be-processed data corresponding to the to-be-processed task from the storage node;
  • the first type of child node splits the data to be processed into a plurality of child data; the first type of child node allocates a plurality of child data to at least one second type of child node in the task processing node where the first type of child node is located. data processing;
  • the first type of child node merges the sub-data processed by each second type of child node in the task processing node where the first type of child node is located.
  • the method further includes: the first type of child node sends the merged data to the storage node.
  • the task scheduling node is assigned to the first type in the first type of child node.
  • the method further includes:
  • the task scheduling node obtains working state information of each task processing node and distance information of each task processing node to the storage node;
  • the task scheduling node determines a task processing node that executes the to-be-processed task according to the working state information and the distance information, and allocates the to-be-processed task to the determined task processing node.
  • the distance between each child node in each task processing node is less than the first preset distance.
  • the method further includes:
  • the first type of child node obtains a processing result of data processing of each second type of child node in the task processing node where the first type of child node is located;
  • the first type of child node allocates data processed by the failed second type of child node to the task processing node where the first type of child node is located, except for the second type of child node whose processing result is a failure.
  • Two types of child nodes perform data processing.
  • the embodiment of the present invention further provides a task processing node, which is located in a content distribution network, and each task processing node includes: a first type of child node and a plurality of second type of child nodes, wherein each second type of child node corresponds to
  • the devices of the first type include: a task obtaining unit, a data obtaining unit, a data splitting unit, a data distributing unit, and a data combining unit.
  • a task obtaining unit configured to obtain a task to be processed that is allocated by the task scheduling node to the task processing node where the first type of child node is located;
  • a data obtaining unit configured to acquire, from the storage node, data to be processed corresponding to the task to be processed
  • a data splitting unit configured to split the to-be-processed data into multiple sub-data
  • a data distribution unit configured to allocate multiple sub-data to the first-type sub-node
  • At least one second type of child node in the task processing node performs data processing
  • the data merging unit is configured to merge the sub-data processed by each second type of child node in the task processing node where the first type of child node is located.
  • the first type of child node further includes: a data sending unit, configured to send the merged data to the storage node.
  • the distance between each child node in each task processing node is less than the first preset distance.
  • the first type of child node further includes: a processing result obtaining unit and a redistribution unit,
  • a processing result obtaining unit configured to obtain, after the data distribution unit allocates the plurality of sub-data to the at least one second type of child node in the task processing node where the first type of child node is located, to obtain the first type of child node The processing result of data processing by each second type of child node in the task processing node;
  • a redistribution unit configured to allocate, to the task processing node where the first type of child node is located, the data processed by the failed second type child node, other than the second type child node whose processing result is a failure
  • a content distribution network provided by an embodiment of the present invention includes: a storage node, a task scheduling node, and a plurality of the foregoing task processing nodes,
  • the task scheduling node obtains load information of each task processing node and distance information of each task processing node to the storage node, determines a task processing node that executes the to-be-processed task according to the load information and the distance information, and allocates the to-be-processed task to the determined task processing. node;
  • the storage node stores the to-be-processed data corresponding to the task to be processed.
  • the embodiment of the present invention provides a computer readable storage medium, where the computer program stores a computer program, and when the program is executed by the processor, the steps of the foregoing method are implemented.
  • a computer device provided by an embodiment of the present invention includes a memory, a processor, and a computer program stored on the memory and operable on the processor, and the processor implements the steps of the foregoing method when executing the program.
  • the embodiment of the present invention provides a task processing method, a node, and a content distribution network.
  • the first type of child node obtains a task to be processed that is assigned by the task scheduling node to the task processing node where the first type of child node is located; Data to be processed corresponding to the task to be processed; splitting the data to be processed into a plurality of sub-data; assigning a plurality of sub-data to at least one second-type sub-node in the task processing node where the first-type sub-node is located for data processing And merging the processed sub-data of each second type of child node in the task processing node where the first type of child node is located.
  • the invention adopts the setting of the first type of child node, so that the second type of child node can directly acquire data from the first type of child node, and since the first type of child node performs data splitting, each second type of child node only You need to get the data you need to process from the first type of child nodes, which reduces the network burden.
  • the probability that the data transmission process is affected by the network instability factor is smaller, and the stability of the data transmission is improved.
  • FIG. 1 is a schematic structural diagram of a content distribution network according to an embodiment of the present disclosure
  • FIG. 2 is a flowchart of a task processing method according to an embodiment of the present invention.
  • FIG. 3 is a flowchart of another task processing method according to an embodiment of the present invention.
  • FIG. 4 is a flowchart of another task processing method according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a first type of child node according to an embodiment of the present invention.
  • a task processing method provided by an embodiment of the present invention is applied to a content distribution network, where the content distribution network may include: a storage node 001, a task scheduling node 003, and a plurality of task processing nodes 002, each task
  • the processing node 002 includes: a first type of child node 100 and a plurality of second type child nodes 200.
  • the devices corresponding to the second type of child nodes 200 are different.
  • the method may include:
  • the first type of child node 100 obtains a task to be processed that the task scheduling node 003 assigns to the task processing node 002 where the first type of child node 100 is located;
  • the storage node 001, the task scheduling node 003, and the plurality of task processing nodes 002 can be connected to each other.
  • each sub-node in each task processing node may be smaller than the first preset distance, or each sub-node in each task processing node is located in the same local area network. In this way, each sub-node within each task processing node can communicate efficiently.
  • the task processing node may be a cache node in the content distribution network.
  • multiple devices in a certain area may be planned as multiple child nodes in a task processing node according to service requirements, for example, planning a communication device of a telecommunication carrier in a certain city as multiple tasks in a task processing node. node.
  • each task processing node 002 there may be multiple task processing nodes 002 that are in communication with the storage node 001.
  • the first type of child nodes 100 and the plurality of second type of child nodes 200 in each task processing node 002 may be located in a preset geographic area. in.
  • the first type of child node 100 acquires to-be-processed data corresponding to the to-be-processed task from the storage node 001.
  • the to-be-processed task may be a video transcoding task, and the to-be-processed data may be a video file.
  • the distance between the storage node 001 and the task processing node 002 may be greater than the second preset distance. It may be understood that, for cost reasons, the storage node 001 and the task processing node 002 are often not disposed in the same area, and the distance between the two is far. .
  • the first-type child node 100 of the embodiment of the present invention can directly allocate the split to each second-type child node 200 without using each second.
  • the type sub-node 200 obtains the data to be processed from the storage node 001, respectively, which reduces the amount of data transmitted and the occupation of the network bandwidth.
  • the first type of child node 100 splits the to-be-processed data into multiple sub-data.
  • the first type of child node 100 allocates a plurality of sub-data to at least one second type of child node 200 in the task processing node 002 where the first type of child node 100 is located for data processing;
  • the first type of child node 100 merges the sub-data processed by each second type of child node 200 in the task processing node 002 where the first type of child node 100 is located.
  • the first type of child node 100 may send the merged data to the storage node 001.
  • the task processing method provided by the embodiment of the present invention enables the second type of child node to directly acquire data from the first type of child node through the setting of the first type of child node, and at the same time, the data is removed due to the first type of child node. Therefore, each second type of child node only needs to obtain the data that it needs to process from the first type of child node, which greatly reduces the network burden. At the same time, since the number of data transmissions between the node and the storage system is greatly reduced, the probability that the data transmission process is affected by the network instability factor is smaller, and the stability of the data transmission is improved.
  • the method may further include:
  • the task scheduling node 003 obtains the working state information of each task processing node 002 and the distance information of each task processing node 002 to the storage node 001;
  • the task scheduling node 003 determines, according to the working state information and the distance information, a task processing node that executes the to-be-processed task, and allocates the to-be-processed task to the determined task processing node.
  • the first type of child node 100 determines that the second type of child node is a child node of the unexecutable task.
  • the situation that the first type of child node 100 cannot obtain the working state information of the second type of child node is different, for example, the network connection of the first type child node 100 and the second type child node has a problem, or The second type of child node is down.
  • the working state of the second type child node 200 may include: load information of the second type child node 200, and the like.
  • the second type of child node 200 may be determined to be a second type of child node of the executable task and the task to be processed is allocated to the child node.
  • the processing result of the task processing node that processes the to-be-processed task may be obtained.
  • the process returns to step S001. In this way, the feedback mechanism ensures the successful execution of the task and improves the reliability of the system.
  • another task processing method provided by the embodiment of the present invention may further include: after step S400:
  • the first type of child node obtains a processing result of data processing of each second type of child node in the task processing node where the first type of child node is located;
  • the first type of child node allocates data processed by the failed second type of child node to the task processing node where the first type of child node is located, except for the second type of child node whose processing result is a failure.
  • the second type of child node performs data processing.
  • step S410 receives the processing results of the other second type of child nodes and continues to determine whether the processing results are all successful. Through this feedback mechanism, the data is successfully processed, the reliability of the system is improved, and the success rate of task execution is improved.
  • the task processing method provided by the embodiment of the present invention when the second type of child node fails to process data, the other second type of child node does not need to acquire data from the storage node, but directly fails the previous processing by the first type of child node.
  • the sub-data is sent to another second type of sub-node, which greatly reduces the amount of data transmitted, reduces the network burden, improves the concurrent execution of the task, and improves the data throughput capability of the system.
  • the embodiment of the present invention further provides a computer readable storage medium, where the computer program stores a computer program, and when the program is executed by the processor, the steps of the foregoing method are implemented.
  • a computer device further includes a memory, a processor, and a computer program stored on the memory and operable on the processor, and the processor implements the steps of the method when executing the program.
  • the embodiment of the present invention further provides a task processing node.
  • a task processing node is provided in the content distribution network.
  • the content distribution network may include: a storage node 001, a task scheduling node 003, and a plurality of task processing nodes 002, each task processing.
  • the node 002 includes: a first type of child node 100 and a plurality of second type child nodes 200, wherein each second type of child node 200 corresponds to different devices.
  • the first type of child node 100 may include : task obtaining unit 110, data obtaining unit 120, data splitting unit 130, data allocating unit 140, and data combining unit 150,
  • the task obtaining unit 110 is configured to obtain a task to be processed that the task scheduling node 003 assigns to the task processing node 002 where the first type of child node 100 is located;
  • the storage node 001, the task scheduling node 003, and the plurality of task processing nodes 002 can be connected to each other.
  • each sub-node in each task processing node may be smaller than the first preset distance, such as a CDN edge node of the same content distribution network, or the same equipment room, or the same area, or each task processing node.
  • Each child node is located in the same local area network. In this way, each sub-node within each task processing node can communicate efficiently.
  • the task processing node may be a cache node in the content distribution network.
  • multiple devices in a certain area may be planned as multiple child nodes in a task processing node according to service requirements, for example, planning a communication device of a telecommunication carrier in a certain city as multiple tasks in a task processing node. node.
  • each task processing node 002 there may be multiple task processing nodes 002 that are in communication with the storage node 001.
  • the first type of child nodes 100 and the plurality of second type of child nodes 200 in each task processing node 002 may be located in a preset geographic area. in.
  • the data obtaining unit 120 is configured to acquire, from the storage node 001, data to be processed corresponding to the task to be processed;
  • the to-be-processed task may be a video transcoding task, and the to-be-processed data may be a video file.
  • the distance between the storage node 001 and the task processing node 002 may be greater than the second preset distance. It may be understood that, for cost reasons, the storage node 001 and the task processing node 002 are often not disposed in the same area, and the distance between the two is far. .
  • the first-type child node 100 of the embodiment of the present invention can directly allocate the split to each second-type child node 200 without using each second.
  • the type sub-node 200 obtains the data to be processed from the storage node 001, respectively, which reduces the amount of data transmitted and the occupation of the network bandwidth.
  • a data splitting unit 130 configured to split the data to be processed into multiple sub-data
  • a data distribution unit 140 configured to allocate a plurality of sub-data to at least one second-type sub-node 200 in the task processing node 002 where the first-type child node 100 is located for data processing;
  • the data merging unit 150 is configured to merge the sub-data processed by the second type sub-nodes 200 in the task processing node 002 where the first-type child node 100 is located.
  • the first type of child node 100 may further include: a processing result obtaining unit and a redistribution unit.
  • a processing result obtaining unit configured to obtain the first type of child node after the data distribution unit 140 allocates the plurality of sub-data to the at least one second type of child node in the task processing node where the first type of child node is located for data processing The processing result of data processing performed by each second type of child node in the task processing node;
  • a redistribution unit configured to allocate, to the task processing node where the first type of child node is located, the data processed by the failed second type child node, other than the second type child node whose processing result is a failure
  • the processing result obtaining unit receives the processing result of the other second type of child nodes and continues to determine whether the processing result is successful.
  • the first type of child node 100 may further include: a data sending unit, configured to send the merged data to the storage node 001.
  • the task processing node provided by the embodiment of the present invention enables the second type of child node to directly acquire data from the first type of child node through the setting of the first type of child node, and at the same time, the data is removed due to the first type of child node. Therefore, each second type of child node only needs to obtain the data that it needs to process from the first type of child node, which greatly reduces the network burden.
  • an embodiment of the present invention further provides a content distribution network, which may include: a storage node 001, a task scheduling node 003, and a plurality of task processing nodes 002 described in the foregoing embodiments.
  • the task scheduling node 003 obtains the working state information of each task processing node 002 and the distance information of each task processing node 002 to the storage node 001, and determines the task processing node 002 that executes the to-be-processed task according to the load information and the distance information, and allocates the to-be-processed task. Processing node 002 for the determined task;
  • the storage node 001 stores the to-be-processed data corresponding to the task to be processed.
  • the first type of child node 100 determines that the second type of child node is a child node of the unexecutable task.
  • the situation that the first type of child node 100 cannot obtain the working state information of the second type of child node is different, for example, the network connection of the first type child node 100 and the second type child node has a problem, or The second type of child node is down.
  • the working state of the second type child node 200 may include: load information of the second type child node 200, and the like.
  • the second type of child node 200 may be determined to be a second type of child node of the executable task and the task to be processed is allocated to the child node.
  • the task scheduling node 003 can allocate a to-be-processed task to each task processing node according to the network condition, the geographical distribution, the number of processing nodes, the processing power of the processing node, and the load condition of each task processing node.
  • the content distribution network provided by the embodiment of the present invention enables the second type of child node to directly acquire data from the first type of child node through the setting of the first type of child node, and at the same time, the data is removed due to the first type of child node. Therefore, each second type of child node only needs to obtain the data that it needs to process from the first type of child node, which greatly reduces the network burden.
  • computer storage medium includes volatile and nonvolatile, implemented in any method or technology for storing information, such as computer readable instructions, data structures, program modules or other data. Sex, removable and non-removable media.
  • Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridge, magnetic tape, magnetic disk storage or other magnetic storage device, or may Any other medium used to store the desired information and that can be accessed by the computer.
  • communication media typically includes computer readable instructions, data structures, program modules, or other data in a modulated data signal, such as a carrier wave or other transport mechanism, and can include any information delivery media. .
  • the setting of the first type of child node enables the second type of child node to directly obtain data from the first type of child node, and since the first type of child node performs data splitting, each second The type child node only needs to obtain the data that it needs to process from the first type of child node, which effectively reduces the network burden.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multi Processors (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

Disclosed are a task processing method, a node, a medium, a device and a content distribution network. The method comprising a sub-node of a first type acquiring a task to be processed allocated by a task scheduling node to a task processing node where the sub-node of the first type is located; acquiring data to be processed corresponding to the task to be processed from a storage node; splitting the data to be processed into a plurality of pieces of sub-data; allocating the plurality of pieces of sub-data to at least one sub-node of a second type in the task processing node where the sub-node of the first type is located, for data processing; and merging the sub-data processed by each sub-node of the second type in the task processing node where the sub-node of the first type is located. By arranging the sub-node of the first type, the present invention means that the sub-node of the second type can directly acquire data from the sub-node of the first type. Since the sub-node of the first type split the data, each sub-node of the second type only needs to acquire, from the sub-node of the first type, data they themselves need to process, reducing network load.

Description

任务处理方法、节点、介质、设备及内容分发网络Task processing methods, nodes, media, devices, and content distribution networks

本申请要求在2017年1月24日提交中国专利局、申请号为201710059992.9发明名称为“任务处理方法、节点、介质、设备及内容分发网络”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese Patent Application entitled "Task Processing Method, Node, Medium, Equipment, and Content Distribution Network" submitted by the Chinese Patent Office on January 24, 2017, with the application number of 201710059992.9, the entire contents of which are incorporated by reference. Combined in this application.

技术领域Technical field

本发明实施例但不限于涉及计算技术领域,尤其涉及任务处理方法、节点、介质、设备及内容分发网络。The embodiments of the present invention are not limited to the field of computing technologies, and particularly relate to a task processing method, a node, a medium, a device, and a content distribution network.

背景技术Background technique

随着科技的发展,分布式计算技术也得到了广泛应用。例如:在视频转码领域,常将一部视频的转码任务分配给多个处理节点进行转码。With the development of technology, distributed computing technology has also been widely used. For example, in the field of video transcoding, a video transcoding task is often assigned to multiple processing nodes for transcoding.

现有的分布式计算技术进行任务处理时,各处理节点都需要分别从存储系统中获取完整的待处理数据,然后从中选取部分数据进行处理,这无疑增加了网络负担。当某处理节点对数据处理失败时,就需要另一处理节点重新从存储系统中获取完整的待处理数据,同样增加了网络负担。When the existing distributed computing technology performs task processing, each processing node needs to obtain complete pending data from the storage system separately, and then select some data for processing, which undoubtedly increases the network burden. When a processing node fails to process data, another processing node needs to re-acquire complete pending data from the storage system, which also increases the network burden.

如何解决该技术问题仍旧是一个亟待解决的技术难题。How to solve this technical problem is still a technical problem that needs to be solved urgently.

发明内容Summary of the invention

以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。The following is an overview of the topics detailed in this document. This Summary is not intended to limit the scope of the claims.

本发明实施例的目的在于提供一种任务处理方法、节点、介质、设备及内容分发网络,以实现降低网络负担。An object of the embodiments of the present invention is to provide a task processing method, a node, a medium, a device, and a content distribution network, so as to reduce network load.

具体技术方案如下:The specific technical solutions are as follows:

本发明实施例提供的一种任务处理方法,应用于内容分发网络中,内容分发网络包括:存储节点、任务调度节点及多个任务处理节点,每个任务处理节点均包括:第一类型子节点及多个第二类型子节点,其中,各第二类型子节点对应的设备均不同,此方法包括:A task processing method is provided in a content distribution network, where the content distribution network includes: a storage node, a task scheduling node, and a plurality of task processing nodes, each task processing node includes: a first type of child node And a plurality of second type of child nodes, wherein the devices corresponding to the second type of child nodes are different, and the method includes:

第一类型子节点获得任务调度节点分配给该第一类型子节点所在的任务处 理节点的待处理任务;The first type of child node obtains a to-be-processed task assigned by the task scheduling node to the task processing node where the first type of child node is located;

该第一类型子节点从存储节点中获取与待处理任务对应的待处理数据;The first type of child node acquires to-be-processed data corresponding to the to-be-processed task from the storage node;

该第一类型子节点将待处理数据拆分为多个子数据;该第一类型子节点将多个子数据分配给该第一类型子节点所在的任务处理节点内的至少一个第二类型子节点进行数据处理;The first type of child node splits the data to be processed into a plurality of child data; the first type of child node allocates a plurality of child data to at least one second type of child node in the task processing node where the first type of child node is located. data processing;

该第一类型子节点将该第一类型子节点所在的任务处理节点内的各第二类型子节点处理后的子数据进行合并。The first type of child node merges the sub-data processed by each second type of child node in the task processing node where the first type of child node is located.

上述方法还具有以下特点:The above method also has the following characteristics:

此方法还包括:该第一类型子节点将合并后得到的数据发送到存储节点。可选的,在第一类型子节点获得任务调度节点分配给该第一类型The method further includes: the first type of child node sends the merged data to the storage node. Optionally, the task scheduling node is assigned to the first type in the first type of child node.

子节点所在的任务处理节点的待处理任务之前,方法还包括:Before the task of the task node of the child node is processed, the method further includes:

任务调度节点获得各任务处理节点的工作状态信息及各任务处理节点到存储节点的距离信息;The task scheduling node obtains working state information of each task processing node and distance information of each task processing node to the storage node;

任务调度节点根据工作状态信息和距离信息确定执行待处理任务的任务处理节点,将待处理任务分配给所确定的任务处理节点。The task scheduling node determines a task processing node that executes the to-be-processed task according to the working state information and the distance information, and allocates the to-be-processed task to the determined task processing node.

上述方法还具有以下特点:The above method also has the following characteristics:

每个任务处理节点内的各子节点之间的距离小于第一预设距离。The distance between each child node in each task processing node is less than the first preset distance.

上述方法还具有以下特点:The above method also has the following characteristics:

在该第一类型子节点将多个子数据分配给该第一类型子节点所在的任务处理节点内的至少一个第二类型子节点进行数据处理后,方法还包括:After the first type of child node allocates the plurality of child data to the at least one second type of child node in the task processing node where the first type of child node is located, the method further includes:

该第一类型子节点获得该第一类型子节点所在的任务处理节点内的各第二类型子节点进行数据处理的处理结果;The first type of child node obtains a processing result of data processing of each second type of child node in the task processing node where the first type of child node is located;

该第一类型子节点将处理结果为失败的第二类型子节点所处理的数据分配给该第一类型子节点所在的任务处理节点内除处理结果为失败的第二类型子节点外的其他第二类型子节点进行数据处理。The first type of child node allocates data processed by the failed second type of child node to the task processing node where the first type of child node is located, except for the second type of child node whose processing result is a failure. Two types of child nodes perform data processing.

本发明实施例还提供一种任务处理节点,位于内容分发网络中,每个任务处理节点均包括:第一类型子节点及多个第二类型子节点,其中,各第二类型子节点对应的设备均不同,第一类型子节点包括:任务获得单元、数据获得单元、数据拆分单元、数据分配单元和数据合并单元,The embodiment of the present invention further provides a task processing node, which is located in a content distribution network, and each task processing node includes: a first type of child node and a plurality of second type of child nodes, wherein each second type of child node corresponds to The devices of the first type include: a task obtaining unit, a data obtaining unit, a data splitting unit, a data distributing unit, and a data combining unit.

任务获得单元,用于获得任务调度节点分配给该第一类型子节点所在的任务处理节点的待处理任务;a task obtaining unit, configured to obtain a task to be processed that is allocated by the task scheduling node to the task processing node where the first type of child node is located;

数据获得单元,用于从存储节点中获取与待处理任务对应的待处理数据;a data obtaining unit, configured to acquire, from the storage node, data to be processed corresponding to the task to be processed;

数据拆分单元,用于将待处理数据拆分为多个子数据;数据分配单元,用于将多个子数据分配给该第一类型子节点所在a data splitting unit, configured to split the to-be-processed data into multiple sub-data; and a data distribution unit, configured to allocate multiple sub-data to the first-type sub-node

的任务处理节点内的至少一个第二类型子节点进行数据处理;At least one second type of child node in the task processing node performs data processing;

数据合并单元,用于将该第一类型子节点所在的任务处理节点内的各第二类型子节点处理后的子数据进行合并。The data merging unit is configured to merge the sub-data processed by each second type of child node in the task processing node where the first type of child node is located.

上述节点还具有以下特点:The above nodes also have the following characteristics:

第一类型子节点还包括:数据发送单元,用于将合并后得到的数据发送到存储节点。The first type of child node further includes: a data sending unit, configured to send the merged data to the storage node.

上述节点还具有以下特点:The above nodes also have the following characteristics:

每个任务处理节点内的各子节点之间的距离小于第一预设距离。The distance between each child node in each task processing node is less than the first preset distance.

上述节点还具有以下特点:The above nodes also have the following characteristics:

第一类型子节点还包括:处理结果获得单元和再分配单元,The first type of child node further includes: a processing result obtaining unit and a redistribution unit,

处理结果获得单元,用于在数据分配单元将多个子数据分配给该第一类型子节点所在的任务处理节点内的至少一个第二类型子节点进行数据处理后,获得该第一类型子节点所在的任务处理节点内的各第二类型子节点进行数据处理的处理结果;a processing result obtaining unit, configured to obtain, after the data distribution unit allocates the plurality of sub-data to the at least one second type of child node in the task processing node where the first type of child node is located, to obtain the first type of child node The processing result of data processing by each second type of child node in the task processing node;

再分配单元,用于将处理结果为失败的第二类型子节点所处理的数据分配给该第一类型子节点所在的任务处理节点内除处理结果为失败的第二类型子节点外的其他第二类型子节点进行数据处理。a redistribution unit, configured to allocate, to the task processing node where the first type of child node is located, the data processed by the failed second type child node, other than the second type child node whose processing result is a failure Two types of child nodes perform data processing.

本发明实施例提供的一种内容分发网络,内容分发网络包括:存储节点、任务调度节点及多个上述的任务处理节点,A content distribution network provided by an embodiment of the present invention includes: a storage node, a task scheduling node, and a plurality of the foregoing task processing nodes,

任务调度节点获得各任务处理节点的负载信息及各任务处理节点到存储节点的距离信息,根据负载信息和距离信息确定执行待处理任务的任务处理节点,将待处理任务分配给所确定的任务处理节点;The task scheduling node obtains load information of each task processing node and distance information of each task processing node to the storage node, determines a task processing node that executes the to-be-processed task according to the load information and the distance information, and allocates the to-be-processed task to the determined task processing. node;

存储节点存储与待处理任务对应的待处理数据。The storage node stores the to-be-processed data corresponding to the task to be processed.

本发明实施例提供的一种计算机可读存储介质,此存储介质上存储有计算机程序,所述程序被处理器执行时实现上述方法的步骤。The embodiment of the present invention provides a computer readable storage medium, where the computer program stores a computer program, and when the program is executed by the processor, the steps of the foregoing method are implemented.

本发明实施例提供的一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器执行程序时实现上述方法的步骤。A computer device provided by an embodiment of the present invention includes a memory, a processor, and a computer program stored on the memory and operable on the processor, and the processor implements the steps of the foregoing method when executing the program.

本发明实施例提供了一种任务处理方法、节点及内容分发网络,第一类型子节点获得任务调度节点分配给该第一类型子节点所在的任务处理节点的待处 理任务;从存储节点中获取与待处理任务对应的待处理数据;将待处理数据拆分为多个子数据;将多个子数据分配给该第一类型子节点所在的任务处理节点内的至少一个第二类型子节点进行数据处理;将该第一类型子节点所在的任务处理节点内的各第二类型子节点处理后的子数据进行合并。本发明通过第一类型子节点的设置,使得第二类型子节点可以直接从该第一类型子节点处获取数据,由于第一类型子节点进行了数据拆分,因此各第二类型子节点只需从第一类型子节点处获取自己所需处理的数据即可,降低了网络负担。同时,由于节点和存储系统之间数据传输次数大大减少,使得数据传输过程受网络不稳定因素影响的概率更小,提高了数据传输的稳定性。The embodiment of the present invention provides a task processing method, a node, and a content distribution network. The first type of child node obtains a task to be processed that is assigned by the task scheduling node to the task processing node where the first type of child node is located; Data to be processed corresponding to the task to be processed; splitting the data to be processed into a plurality of sub-data; assigning a plurality of sub-data to at least one second-type sub-node in the task processing node where the first-type sub-node is located for data processing And merging the processed sub-data of each second type of child node in the task processing node where the first type of child node is located. The invention adopts the setting of the first type of child node, so that the second type of child node can directly acquire data from the first type of child node, and since the first type of child node performs data splitting, each second type of child node only You need to get the data you need to process from the first type of child nodes, which reduces the network burden. At the same time, since the number of data transmissions between the node and the storage system is greatly reduced, the probability that the data transmission process is affected by the network instability factor is smaller, and the stability of the data transmission is improved.

当然,实施本发明的任一产品或方法必不一定需要同时达到以上所述的所有优点。Of course, any product or method embodying the present invention necessarily does not necessarily require all of the advantages described above to be achieved at the same time.

附图说明DRAWINGS

此处所说明的附图用来提供对本发明实施例的进一步理解,构成本申请的一部分,本发明实施例的示意性实施例及其说明用于解释本发明实施例,并不构成对本发明实施例的不当限定。在附图中:The accompanying drawings are intended to provide a further understanding of the embodiments of the embodiments of the invention Improper limitations. In the drawing:

图1为本发明实施例提供的一种内容分发网络的结构示意图;FIG. 1 is a schematic structural diagram of a content distribution network according to an embodiment of the present disclosure;

图2为本发明实施例提供的一种任务处理方法的流程图;2 is a flowchart of a task processing method according to an embodiment of the present invention;

图3为本发明实施例提供的另一种任务处理方法的流程图;FIG. 3 is a flowchart of another task processing method according to an embodiment of the present invention;

图4为本发明实施例提供的另一种任务处理方法的流程图;FIG. 4 is a flowchart of another task processing method according to an embodiment of the present invention;

图5为本发明实施例提供的一种第一类型子节点的结构示意图。FIG. 5 is a schematic structural diagram of a first type of child node according to an embodiment of the present invention.

具体实施方式detailed description

现结合附图和具体实施方式对本发明实施例进一步说明。The embodiments of the present invention will be further described with reference to the drawings and specific embodiments.

如图1所示,本发明实施例提供的一种任务处理方法,应用于内容分发网络中,内容分发网络可以包括:存储节点001、任务调度节点003及多个任务处理节点002,每个任务处理节点002均包括:第一类型子节点100及多个第二类型子节点200,其中,各第二类型子节点200对应的设备均不同,如图2所示,该方法可以包括:As shown in FIG. 1 , a task processing method provided by an embodiment of the present invention is applied to a content distribution network, where the content distribution network may include: a storage node 001, a task scheduling node 003, and a plurality of task processing nodes 002, each task The processing node 002 includes: a first type of child node 100 and a plurality of second type child nodes 200. The devices corresponding to the second type of child nodes 200 are different. As shown in FIG. 2, the method may include:

S100、第一类型子节点100获得任务调度节点003分配给该第一类型子节点100所在的任务处理节点002的待处理任务;S100, the first type of child node 100 obtains a task to be processed that the task scheduling node 003 assigns to the task processing node 002 where the first type of child node 100 is located;

其中,存储节点001、任务调度节点003及多个任务处理节点002之间可以互相通信连接。The storage node 001, the task scheduling node 003, and the plurality of task processing nodes 002 can be connected to each other.

具体的,每个任务处理节点内的各子节点之间的距离可以小于第一预设距离,或者,每个任务处理节点内的各子节点位于同一局域网中。这样,每个任务处理节点内的各子节点之间就可以高效率的进行通信。其中,任务处理节点可以为内容分发网络中的缓存节点。Specifically, the distance between each sub-node in each task processing node may be smaller than the first preset distance, or each sub-node in each task processing node is located in the same local area network. In this way, each sub-node within each task processing node can communicate efficiently. The task processing node may be a cache node in the content distribution network.

具体的,可以根据业务需要将某区域内的多个设备规划为一个任务处理节点内的多个子节点,例如:将某城市内某电信运营商的通信设备规划为一个任务处理节点内的多个子节点。Specifically, multiple devices in a certain area may be planned as multiple child nodes in a task processing node according to service requirements, for example, planning a communication device of a telecommunication carrier in a certain city as multiple tasks in a task processing node. node.

可选的,与存储节点001通信连接的任务处理节点002可以有多个,每个任务处理节点002中的第一类型子节点100和多个第二类型子节点200可以均位于预设地理区域中。Optionally, there may be multiple task processing nodes 002 that are in communication with the storage node 001. The first type of child nodes 100 and the plurality of second type of child nodes 200 in each task processing node 002 may be located in a preset geographic area. in.

S200、第一类型子节点100从存储节点001中获取与待处理任务对应的待处理数据;S200. The first type of child node 100 acquires to-be-processed data corresponding to the to-be-processed task from the storage node 001.

其中,待处理任务可以为视频转码任务,待处理数据可以为视频文件。其中,存储节点001与任务处理节点002的距离可以大于第二预设距离,可以理解的是,出于成本考虑,存储节点001与任务处理节点002常不设置在同一区域,二者距离较远。在这种情况下,本发明实施例的第一类型子节点100在从存储节点001中获取待处理数据后,就可以直接将拆分后分配至各第二类型子节点200,无需各第二类型子节点200分别从存储节点001获得待处理数据,减少了传输的数据量及对网络带宽的占用。The to-be-processed task may be a video transcoding task, and the to-be-processed data may be a video file. The distance between the storage node 001 and the task processing node 002 may be greater than the second preset distance. It may be understood that, for cost reasons, the storage node 001 and the task processing node 002 are often not disposed in the same area, and the distance between the two is far. . In this case, after obtaining the to-be-processed data from the storage node 001, the first-type child node 100 of the embodiment of the present invention can directly allocate the split to each second-type child node 200 without using each second. The type sub-node 200 obtains the data to be processed from the storage node 001, respectively, which reduces the amount of data transmitted and the occupation of the network bandwidth.

S300、第一类型子节点100将待处理数据拆分为多个子数据;S300. The first type of child node 100 splits the to-be-processed data into multiple sub-data.

S400、第一类型子节点100将多个子数据分配给该第一类型子节点100所在的任务处理节点002内的至少一个第二类型子节点200进行数据处理;S400, the first type of child node 100 allocates a plurality of sub-data to at least one second type of child node 200 in the task processing node 002 where the first type of child node 100 is located for data processing;

S500、第一类型子节点100将该第一类型子节点100所在的任务处理节点002内的各第二类型子节点200处理后的子数据进行合并。S500. The first type of child node 100 merges the sub-data processed by each second type of child node 200 in the task processing node 002 where the first type of child node 100 is located.

在本发明其他实施例中,步骤S500后还可以包括:第一类型子节点100将合并后得到的数据发送到存储节点001。In other embodiments of the present invention, after the step S500, the first type of child node 100 may send the merged data to the storage node 001.

本发明实施例提供的任务处理方法,通过第一类型子节点的设置,使得第二类型子节点可以直接从该第一类型子节点处获取数据,同时,由于第一类型子节点进行了数据拆分,因此各第二类型子节点只需从第一类型子节点处获取自己所需处理的数据即可,大大降低了网络负担。同时,由于节点和存储系统之间数据传输次数大大减少,使得数据传输过程受网络不稳定因素影响的概率更小,提高了数据传输的稳定性。The task processing method provided by the embodiment of the present invention enables the second type of child node to directly acquire data from the first type of child node through the setting of the first type of child node, and at the same time, the data is removed due to the first type of child node. Therefore, each second type of child node only needs to obtain the data that it needs to process from the first type of child node, which greatly reduces the network burden. At the same time, since the number of data transmissions between the node and the storage system is greatly reduced, the probability that the data transmission process is affected by the network instability factor is smaller, and the stability of the data transmission is improved.

如图3所示,本发明实施例提供的另一种任务处理方法中,在步骤S100前,还可以包括:As shown in FIG. 3, in another task processing method provided by the embodiment of the present invention, before the step S100, the method may further include:

S001、任务调度节点003获得各任务处理节点002的工作状态信息及各任务处理节点002到存储节点001的距离信息;S001, the task scheduling node 003 obtains the working state information of each task processing node 002 and the distance information of each task processing node 002 to the storage node 001;

S002、任务调度节点003根据工作状态信息和距离信息确定执行待处理任务的任务处理节点,将待处理任务分配给所确定的任务处理节点。S002. The task scheduling node 003 determines, according to the working state information and the distance information, a task processing node that executes the to-be-processed task, and allocates the to-be-processed task to the determined task processing node.

具体的,当第一类型子节点100无法获得某第二类型子节点的工作状态信息时,则第一类型子节点100确定该第二类型子节点为不可执行任务的子节点。其中,第一类型子节点100无法获得某第二类型子节点的工作状态信息的情况有多种,如:第一类型子节点100和该第二类型子节点的网络连接出现问题,或,该第二类型子节点宕机。Specifically, when the first type of child node 100 cannot obtain the working state information of a certain type of child node, the first type of child node 100 determines that the second type of child node is a child node of the unexecutable task. The situation that the first type of child node 100 cannot obtain the working state information of the second type of child node is different, for example, the network connection of the first type child node 100 and the second type child node has a problem, or The second type of child node is down.

其中,第二类型子节点200的工作状态可以包括:第二类型子节点200的负载信息等。可选的,当第二类型子节点200的负载低于预设负载时,可以确定该第二类型子节点200为可执行任务的第二类型子节点并将待处理任务分配给该子节点。The working state of the second type child node 200 may include: load information of the second type child node 200, and the like. Optionally, when the load of the second type of child node 200 is lower than the preset load, the second type of child node 200 may be determined to be a second type of child node of the executable task and the task to be processed is allocated to the child node.

可选的,任务调度节点003将所述待处理任务分配给所确定的任务处理节点后,可以获得处理待处理任务的任务处理节点的处理结果,当处理结果为失败时,返回执行步骤S001。这样,通过这种反馈机制就保障任务成功执行,提高了系统的可靠性。Optionally, after the task scheduling node 003 assigns the to-be-processed task to the determined task processing node, the processing result of the task processing node that processes the to-be-processed task may be obtained. When the processing result is a failure, the process returns to step S001. In this way, the feedback mechanism ensures the successful execution of the task and improves the reliability of the system.

如图4所示,本发明实施例提供的另一种任务处理方法,在步骤S400以后,还可以包括:As shown in FIG. 4, another task processing method provided by the embodiment of the present invention may further include: after step S400:

S410、第一类型子节点获得第一类型子节点所在的任务处理节点内的各第二类型子节点进行数据处理的处理结果;S410. The first type of child node obtains a processing result of data processing of each second type of child node in the task processing node where the first type of child node is located;

S420、第一类型子节点将处理结果为失败的第二类型子节点所处理的数据 分配给该第一类型子节点所在的任务处理节点内除处理结果为失败的第二类型子节点外的其他第二类型子节点进行数据处理。S420. The first type of child node allocates data processed by the failed second type of child node to the task processing node where the first type of child node is located, except for the second type of child node whose processing result is a failure. The second type of child node performs data processing.

在步骤S420将数据重新分配给其他第二类型子节点后,步骤S410会收到该其他第二类型子节点的处理结果并继续判断处理结果是否均为成功。通过这种反馈机制就保障数据成功处理,提高了系统的可靠性,提高了任务执行的成功率。After the data is reassigned to the other second type of child nodes in step S420, step S410 receives the processing results of the other second type of child nodes and continues to determine whether the processing results are all successful. Through this feedback mechanism, the data is successfully processed, the reliability of the system is improved, and the success rate of task execution is improved.

本发明实施例提供的任务处理方法,当第二类型子节点处理数据失败时,另一第二类型子节点无需从存储节点中再获取数据,而是直接由第一类型子节点将之前处理失败的子数据发送到另一第二类型子节点即可,大大减少了传输的数据量,降低了网络负担,提高了任务的并发执行量,提高了系统的数据吞吐能力。The task processing method provided by the embodiment of the present invention, when the second type of child node fails to process data, the other second type of child node does not need to acquire data from the storage node, but directly fails the previous processing by the first type of child node. The sub-data is sent to another second type of sub-node, which greatly reduces the amount of data transmitted, reduces the network burden, improves the concurrent execution of the task, and improves the data throughput capability of the system.

本发明实施例还提供一种计算机可读存储介质,此存储介质上存储有计算机程序,所述程序被处理器执行时实现上述方法的步骤。The embodiment of the present invention further provides a computer readable storage medium, where the computer program stores a computer program, and when the program is executed by the processor, the steps of the foregoing method are implemented.

本发明实施例还提供的一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器执行程序时实现上述方法的步骤。A computer device further includes a memory, a processor, and a computer program stored on the memory and operable on the processor, and the processor implements the steps of the method when executing the program.

与上述方法实施例相对应,本发明实施例还提供了一种任务处理节点。本发明实施例提供的一种任务处理节点,位于内容分发网络中,如图1所示,内容分发网络可以包括:存储节点001、任务调度节点003及多个任务处理节点002,每个任务处理节点002均包括:第一类型子节点100及多个第二类型子节点200,其中,各第二类型子节点200对应的设备均不同,如图5所示,第一类型子节点100可以包括:任务获得单元110、数据获得单元120、数据拆分单元130、数据分配单元140和数据合并单元150,Corresponding to the foregoing method embodiment, the embodiment of the present invention further provides a task processing node. A task processing node is provided in the content distribution network. As shown in FIG. 1 , the content distribution network may include: a storage node 001, a task scheduling node 003, and a plurality of task processing nodes 002, each task processing. The node 002 includes: a first type of child node 100 and a plurality of second type child nodes 200, wherein each second type of child node 200 corresponds to different devices. As shown in FIG. 5, the first type of child node 100 may include : task obtaining unit 110, data obtaining unit 120, data splitting unit 130, data allocating unit 140, and data combining unit 150,

任务获得单元110,用于获得任务调度节点003分配给该第一类型子节点100所在的任务处理节点002的待处理任务;The task obtaining unit 110 is configured to obtain a task to be processed that the task scheduling node 003 assigns to the task processing node 002 where the first type of child node 100 is located;

其中,存储节点001、任务调度节点003及多个任务处理节点002之间可以互相通信连接。The storage node 001, the task scheduling node 003, and the plurality of task processing nodes 002 can be connected to each other.

具体的,每个任务处理节点内的各子节点之间的距离可以小于第一预设距离,如位于同一内容分发网络CDN边缘节点,或同一机房,或者同一地域,或者,每个任务处理节点内的各子节点位于同一局域网中。这样,每个任务处理 节点内的各子节点之间就可以高效率的进行通信。其中,任务处理节点可以为内容分发网络中的缓存节点。Specifically, the distance between each sub-node in each task processing node may be smaller than the first preset distance, such as a CDN edge node of the same content distribution network, or the same equipment room, or the same area, or each task processing node. Each child node is located in the same local area network. In this way, each sub-node within each task processing node can communicate efficiently. The task processing node may be a cache node in the content distribution network.

具体的,可以根据业务需要将某区域内的多个设备规划为一个任务处理节点内的多个子节点,例如:将某城市内某电信运营商的通信设备规划为一个任务处理节点内的多个子节点。Specifically, multiple devices in a certain area may be planned as multiple child nodes in a task processing node according to service requirements, for example, planning a communication device of a telecommunication carrier in a certain city as multiple tasks in a task processing node. node.

可选的,与存储节点001通信连接的任务处理节点002可以有多个,每个任务处理节点002中的第一类型子节点100和多个第二类型子节点200可以均位于预设地理区域中。Optionally, there may be multiple task processing nodes 002 that are in communication with the storage node 001. The first type of child nodes 100 and the plurality of second type of child nodes 200 in each task processing node 002 may be located in a preset geographic area. in.

数据获得单元120,用于从存储节点001中获取与待处理任务对应的待处理数据;The data obtaining unit 120 is configured to acquire, from the storage node 001, data to be processed corresponding to the task to be processed;

其中,待处理任务可以为视频转码任务,待处理数据可以为视频文件。其中,存储节点001与任务处理节点002的距离可以大于第二预设距离,可以理解的是,出于成本考虑,存储节点001与任务处理节点002常不设置在同一区域,二者距离较远。在这种情况下,本发明实施例的第一类型子节点100在从存储节点001中获取待处理数据后,就可以直接将拆分后分配至各第二类型子节点200,无需各第二类型子节点200分别从存储节点001获得待处理数据,减少了传输的数据量及对网络带宽的占用。The to-be-processed task may be a video transcoding task, and the to-be-processed data may be a video file. The distance between the storage node 001 and the task processing node 002 may be greater than the second preset distance. It may be understood that, for cost reasons, the storage node 001 and the task processing node 002 are often not disposed in the same area, and the distance between the two is far. . In this case, after obtaining the to-be-processed data from the storage node 001, the first-type child node 100 of the embodiment of the present invention can directly allocate the split to each second-type child node 200 without using each second. The type sub-node 200 obtains the data to be processed from the storage node 001, respectively, which reduces the amount of data transmitted and the occupation of the network bandwidth.

数据拆分单元130,用于将待处理数据拆分为多个子数据;a data splitting unit 130, configured to split the data to be processed into multiple sub-data;

数据分配单元140,用于将多个子数据分配给该第一类型子节点100所在的任务处理节点002内的至少一个第二类型子节点200进行数据处理;a data distribution unit 140, configured to allocate a plurality of sub-data to at least one second-type sub-node 200 in the task processing node 002 where the first-type child node 100 is located for data processing;

数据合并单元150,用于将该第一类型子节点100所在的任务处理节点002内的各第二类型子节点200处理后的子数据进行合并。The data merging unit 150 is configured to merge the sub-data processed by the second type sub-nodes 200 in the task processing node 002 where the first-type child node 100 is located.

其中,第一类型子节点100还可以包括:处理结果获得单元和再分配单元。The first type of child node 100 may further include: a processing result obtaining unit and a redistribution unit.

处理结果获得单元,用于在数据分配单元140将多个子数据分配给该第一类型子节点所在的任务处理节点内的至少一个第二类型子节点进行数据处理后,获得该第一类型子节点所在的任务处理节点内的各第二类型子节点进行数据处理的处理结果;a processing result obtaining unit, configured to obtain the first type of child node after the data distribution unit 140 allocates the plurality of sub-data to the at least one second type of child node in the task processing node where the first type of child node is located for data processing The processing result of data processing performed by each second type of child node in the task processing node;

再分配单元,用于将处理结果为失败的第二类型子节点所处理的数据分配给该第一类型子节点所在的任务处理节点内除处理结果为失败的第二类型子节点外的其他第二类型子节点进行数据处理。a redistribution unit, configured to allocate, to the task processing node where the first type of child node is located, the data processed by the failed second type child node, other than the second type child node whose processing result is a failure Two types of child nodes perform data processing.

在再分配单元将数据重新分配给其他第二类型子节点后,处理结果获得单元会收到该其他第二类型子节点的处理结果并继续判断处理结果是否均为成功。After the redistribution unit reassigns the data to the other second type of child nodes, the processing result obtaining unit receives the processing result of the other second type of child nodes and continues to determine whether the processing result is successful.

在本发明其他实施例中,第一类型子节点100还可以包括:数据发送单元,用于将合并后得到的数据发送到存储节点001。In other embodiments of the present invention, the first type of child node 100 may further include: a data sending unit, configured to send the merged data to the storage node 001.

本发明实施例提供的任务处理节点,通过第一类型子节点的设置,使得第二类型子节点可以直接从该第一类型子节点处获取数据,同时,由于第一类型子节点进行了数据拆分,因此各第二类型子节点只需从第一类型子节点处获取自己所需处理的数据即可,大大降低了网络负担。The task processing node provided by the embodiment of the present invention enables the second type of child node to directly acquire data from the first type of child node through the setting of the first type of child node, and at the same time, the data is removed due to the first type of child node. Therefore, each second type of child node only needs to obtain the data that it needs to process from the first type of child node, which greatly reduces the network burden.

如图1所示,本发明实施例还提供了一种内容分发网络,可以包括:存储节点001、任务调度节点003及多个上述实施例所述的任务处理节点002,As shown in FIG. 1 , an embodiment of the present invention further provides a content distribution network, which may include: a storage node 001, a task scheduling node 003, and a plurality of task processing nodes 002 described in the foregoing embodiments.

任务调度节点003获得各任务处理节点002的工作状态信息及各任务处理节点002到存储节点001的距离信息,根据负载信息和距离信息确定执行待处理任务的任务处理节点002,将待处理任务分配给所确定的任务处理节点002;The task scheduling node 003 obtains the working state information of each task processing node 002 and the distance information of each task processing node 002 to the storage node 001, and determines the task processing node 002 that executes the to-be-processed task according to the load information and the distance information, and allocates the to-be-processed task. Processing node 002 for the determined task;

存储节点001存储与待处理任务对应的待处理数据。The storage node 001 stores the to-be-processed data corresponding to the task to be processed.

具体的,当第一类型子节点100无法获得某第二类型子节点的工作状态信息时,则第一类型子节点100确定该第二类型子节点为不可执行任务的子节点。其中,第一类型子节点100无法获得某第二类型子节点的工作状态信息的情况有多种,如:第一类型子节点100和该第二类型子节点的网络连接出现问题,或,该第二类型子节点宕机。Specifically, when the first type of child node 100 cannot obtain the working state information of a certain type of child node, the first type of child node 100 determines that the second type of child node is a child node of the unexecutable task. The situation that the first type of child node 100 cannot obtain the working state information of the second type of child node is different, for example, the network connection of the first type child node 100 and the second type child node has a problem, or The second type of child node is down.

其中,第二类型子节点200的工作状态可以包括:第二类型子节点200的负载信息等。可选的,当第二类型子节点200的负载低于预设负载时,可以确定该第二类型子节点200为可执行任务的第二类型子节点并将待处理任务分配给该子节点。The working state of the second type child node 200 may include: load information of the second type child node 200, and the like. Optionally, when the load of the second type of child node 200 is lower than the preset load, the second type of child node 200 may be determined to be a second type of child node of the executable task and the task to be processed is allocated to the child node.

具体的,任务调度节点003可以根据各任务处理节点的网络情况、地域分布、处理节点数量、处理节点计算能力、负载情况等为各任务处理节点分配待处理任务。Specifically, the task scheduling node 003 can allocate a to-be-processed task to each task processing node according to the network condition, the geographical distribution, the number of processing nodes, the processing power of the processing node, and the load condition of each task processing node.

本发明实施例提供的内容分发网络,通过第一类型子节点的设置,使得第二类型子节点可以直接从该第一类型子节点处获取数据,同时,由于第一类型子节点进行了数据拆分,因此各第二类型子节点只需从第一类型子节点处获取 自己所需处理的数据即可,大大降低了网络负担。The content distribution network provided by the embodiment of the present invention enables the second type of child node to directly acquire data from the first type of child node through the setting of the first type of child node, and at the same time, the data is removed due to the first type of child node. Therefore, each second type of child node only needs to obtain the data that it needs to process from the first type of child node, which greatly reduces the network burden.

本领域的普通技术人员应当理解,可以对本发明的技术方案进行修改或者等同替换,而不脱离本发明技术方案的精神和范围,均应涵盖在权利要求范围当中。A person skilled in the art should understand that the technical solutions of the present invention may be modified or equivalent, without departing from the spirit and scope of the present invention, and should be included in the scope of the claims.

本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统、装置中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些组件或所有组件可以被实施为由处理器,如数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。Those of ordinary skill in the art will appreciate that all or some of the steps, systems, and functional blocks/units of the methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be composed of several physical The components work together. Some or all of the components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer readable medium, which may include computer storage media (or non-transitory media) and communication media (or transitory media). As is well known to those of ordinary skill in the art, the term computer storage medium includes volatile and nonvolatile, implemented in any method or technology for storing information, such as computer readable instructions, data structures, program modules or other data. Sex, removable and non-removable media. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridge, magnetic tape, magnetic disk storage or other magnetic storage device, or may Any other medium used to store the desired information and that can be accessed by the computer. Moreover, it is well known to those skilled in the art that communication media typically includes computer readable instructions, data structures, program modules, or other data in a modulated data signal, such as a carrier wave or other transport mechanism, and can include any information delivery media. .

工业实用性Industrial applicability

在本发明实施例中通过第一类型子节点的设置,使得第二类型子节点可以直接从该第一类型子节点处获取数据,由于第一类型子节点进行了数据拆分,因此各第二类型子节点只需从第一类型子节点处获取自己所需处理的数据即可,有效降低网络负担。In the embodiment of the present invention, the setting of the first type of child node enables the second type of child node to directly obtain data from the first type of child node, and since the first type of child node performs data splitting, each second The type child node only needs to obtain the data that it needs to process from the first type of child node, which effectively reduces the network burden.

Claims (12)

一种任务处理方法,应用于内容分发网络,所述内容分发网络包括:存储节点、任务调度节点及多个任务处理节点,每个所述任务处理节点均包括:第一类型子节点及多个第二类型子节点,其中,各所述第二类型子节点对应的设备均不同,所述方法包括:A task processing method is applied to a content distribution network, where the content distribution network includes: a storage node, a task scheduling node, and a plurality of task processing nodes, each of the task processing nodes includes: a first type of child node and a plurality of a second type of child node, wherein each device of the second type of child node is different, and the method includes: 所述第一类型子节点获得所述任务调度节点分配给所述第一类型子节点所在的任务处理节点的待处理任务;Obtaining, by the first type of child node, a task to be processed that is allocated by the task scheduling node to a task processing node where the first type of child node is located; 所述第一类型子节点从所述存储节点中获取与所述待处理任务对应的待处理数据;The first type of child node acquires to-be-processed data corresponding to the to-be-processed task from the storage node; 所述第一类型子节点将所述待处理数据拆分为多个子数据;所述第一类型子节点将所述多个子数据分配给该第一类型子节点所在的任务处理节点内的至少一个所述第二类型子节点进行数据处理;The first type of child node splits the to-be-processed data into a plurality of child data; the first type of child node allocates the plurality of child data to at least one of task processing nodes where the first type of child node is located The second type of child node performs data processing; 所述第一类型子节点将所述第一类型子节点所在的任务处理节点内的各所述第二类型子节点处理后的子数据进行合并。The first type of child node merges the sub-data processed by each of the second type of child nodes in the task processing node where the first type of child node is located. 根据权利要求1所述的方法,其中,所述方法还包括:所述第一类型子节点将合并后得到的数据发送到所述存储节点。The method of claim 1, wherein the method further comprises the first type of child node transmitting the combined data to the storage node. 根据权利要求1所述的方法,其中,在所述第一类型子节点获得所述任务调度节点分配给该第一类型子节点所在的任务处理节点的待处理任务之前,所述方法还包括:The method according to claim 1, wherein before the first type of child node obtains a task to be processed that is allocated to the task processing node where the first type of child node is located, the method further includes: 所述任务调度节点获得各任务处理节点的工作状态信息及各任务处理节点到所述存储节点的距离信息;The task scheduling node obtains working state information of each task processing node and distance information of each task processing node to the storage node; 所述任务调度节点根据所述工作状态信息和所述距离信息确定执行待处理任务的任务处理节点,将所述待处理任务分配给所确定的任务处理节点。The task scheduling node determines, according to the working state information and the distance information, a task processing node that executes a task to be processed, and allocates the to-be-processed task to the determined task processing node. 根据权利要求1所述的方法,其中,每个所述任务处理节点内的各子节点之间的距离小于第一预设距离。The method of claim 1 wherein the distance between each of the child nodes within each of the task processing nodes is less than a first predetermined distance. 根据权利要求1至4中任一项所述的方法,其中,在该第一类型子节点将所述多个子数据分配给该第一类型子节点所在的任务处理节点内的至少一个所述第二类型子节点进行数据处理后,所述方法还包括:The method according to any one of claims 1 to 4, wherein the first type of child node assigns the plurality of child data to at least one of the task processing nodes in which the first type of child node is located After the data processing of the two types of child nodes, the method further includes: 所述第一类型子节点获得该第一类型子节点所在的任务处理节点内的各所述第二类型子节点进行数据处理的处理结果;Obtaining, by the first type of child node, a processing result of performing data processing by each of the second type of child nodes in the task processing node where the first type of child node is located; 所述第一类型子节点将所述处理结果为失败的第二类型子节点所处理的数据分配给该第一类型子节点所在的任务处理节点内除所述处理结果为失败的第二类型子节点外的其他第二类型子节点进行数据处理。The first type of child node allocates data processed by the failed second type of child node to the second type of child in the task processing node where the first type of child node is located, except that the processing result is a failure. Other second types of child nodes outside the node perform data processing. [根据细则26改正09.02.2018] 
一种任务处理节点,位于内容分发网络中,所述任务处理节点包括:第一类型子节点及多个第二类型子节点,其中,各所述第二类型子节点对应的设备均不同,所述第一类型子节点包括:任务获得单元、数据获得单元、数据拆分单元、数据分配单元和数据合并单元,所述任务获得单元,用于获得所述任务调度节点分配给该第一类型子节点所在的任务处理节点的待处理任务;所述数据获得单元,用于从所述存储节点中获取与所述待处理任务对应的待处理数据;所述数据拆分单元,用于将所述待处理数据拆分为多个子数据;所述数据分配单元,用于将所述多个子数据分配给该第一类型子节点所在的任务处理节点内的至少一个所述第二类型子节点进行数据处理;所述数据合并单元,用于将该第一类型子节点所在的任务处理节点内的各所述第二类型子节点处理后的子数据进行合并。
[Correct according to Rule 26 09.02.2018]
A task processing node is located in a content distribution network, where the task processing node includes: a first type of child node and a plurality of second type of child nodes, wherein each of the second type of child nodes corresponds to different devices. The first type of child node includes: a task obtaining unit, a data obtaining unit, a data splitting unit, a data assigning unit, and a data combining unit, and the task obtaining unit is configured to obtain the task scheduling node and assign the first type to the child. a task to be processed by the task processing node where the node is located; the data obtaining unit is configured to acquire data to be processed corresponding to the to-be-processed task from the storage node; the data splitting unit is configured to: The data to be processed is split into a plurality of sub-data; the data distribution unit is configured to allocate the plurality of sub-data to at least one of the second-type sub-nodes in the task processing node where the first-type sub-node is located to perform data The data merging unit is configured to: each of the second type of child nodes in the task processing node where the first type of child node is located After processing the sub-data merging.
根据权利要求6所述的任务处理节点,其中,所述第一类型子节点还包括:数据发送单元,用于将合并后得到的数据发送到所述存储节点。The task processing node according to claim 6, wherein the first type of child node further comprises: a data sending unit, configured to send the merged data to the storage node. 根据权利要求6所述的任务处理节点,其中,每个所述任务处理节点内的各子节点之间的距离小于第一预设距离。The task processing node of claim 6, wherein a distance between each of the child nodes within the task processing node is less than a first predetermined distance. 根据权利要求6至8中任一项所述的任务处理节点,其中,所述第一类型子节点还包括:处理结果获得单元和再分配单元;The task processing node according to any one of claims 6 to 8, wherein the first type of child node further comprises: a processing result obtaining unit and a redistributing unit; 所述处理结果获得单元,用于在所述数据分配单元将所述多个子数据分配给该第一类型子节点所在的任务处理节点内的至少一个所述第二类型子节点进行数据处理后,获得该第一类型子节点所在的任务处理节点内的各所述第二类型子节点进行数据处理的处理结果;The processing result obtaining unit is configured to: after the data distribution unit allocates the plurality of sub-data to at least one of the second type of child nodes in the task processing node where the first type of child node is located, perform data processing, Obtaining a processing result of data processing by each of the second type of child nodes in the task processing node where the first type of child node is located; 所述再分配单元,用于将所述处理结果为失败的第二类型子节点所处理的数 据分配给该第一类型子节点所在的任务处理节点内除所述处理结果为失败的第二类型子节点外的其他第二类型子节点进行数据处理。The redistribution unit is configured to allocate data processed by the failed second type of child node to the second type of the task processing node where the first type of child node is located, except that the processing result is a failure. Other second types of child nodes outside the child node perform data processing. 一种内容分发网络,其中,所述内容分发网络包括:存储节点、任务调度节点及多个权利要求6至9中任一项所述的任务处理节点,A content distribution network, wherein the content distribution network includes: a storage node, a task scheduling node, and a plurality of task processing nodes according to any one of claims 6 to 所述任务调度节点获得各任务处理节点的负载信息及各任务处理节点到所述存储节点的距离信息,根据所述负载信息和所述距离信息确定执行待处理任务的任务处理节点,将所述待处理任务分配给所确定的任务处理节点;The task scheduling node obtains load information of each task processing node and distance information of each task processing node to the storage node, and determines a task processing node that executes a task to be processed according to the load information and the distance information, and the The pending task is assigned to the determined task processing node; 所述存储节点存储与所述待处理任务对应的待处理数据。The storage node stores to-be-processed data corresponding to the to-be-processed task. 一种计算机可读存储介质,所述存储介质上存储有计算机程序,所述程序被处理器执行时实现权利要求1至5中任意一项所述方法的步骤。A computer readable storage medium having stored thereon a computer program, the program being executed by a processor to perform the steps of the method of any one of claims 1 to 5. 一种计算机设备,其特征在于,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述程序时实现权利要求1至5中任意一项所述方法的步骤。A computer device, comprising: a memory, a processor, and a computer program stored on the memory and operable on the processor, the processor executing the program to implement the claims 1 to 5 The steps of any of the methods described.
PCT/CN2018/073799 2017-01-24 2018-01-23 Task processing method, node, medium, device and content distribution network Ceased WO2018137611A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710059992.9A CN107707592A (en) 2017-01-24 2017-01-24 Task processing method, node and content distributing network
CN201710059992.9 2017-01-24

Publications (1)

Publication Number Publication Date
WO2018137611A1 true WO2018137611A1 (en) 2018-08-02

Family

ID=61169448

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/073799 Ceased WO2018137611A1 (en) 2017-01-24 2018-01-23 Task processing method, node, medium, device and content distribution network

Country Status (2)

Country Link
CN (1) CN107707592A (en)
WO (1) WO2018137611A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109214132B (en) * 2018-10-30 2023-06-30 中国运载火箭技术研究院 LVC simulation-oriented uncoupled streaming type large-flux asynchronous task processing system
CN111506400A (en) * 2020-03-13 2020-08-07 平安国际智慧城市科技股份有限公司 Computing resource allocation system, method, device and computer equipment
CN114845141A (en) * 2022-04-18 2022-08-02 上海哔哩哔哩科技有限公司 Edge transcoding method and device
CN116743752A (en) * 2023-08-11 2023-09-12 山东恒宇电子有限公司 System for realizing data processing load balance by distributed network communication

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102638456A (en) * 2012-03-19 2012-08-15 杭州海康威视系统技术有限公司 Intelligent analysis method for mass real-time video code stream based on cloud computation and system thereof
CN103685558A (en) * 2013-12-30 2014-03-26 常州大学 Wireless sensor network and task processing method thereof
CN104239144A (en) * 2014-09-22 2014-12-24 珠海许继芝电网自动化有限公司 Multilevel distributed task processing system
CN104244025A (en) * 2013-06-09 2014-12-24 北京同步科技有限公司 Cluster transcoding system and method thereof
CN104378665A (en) * 2014-11-24 2015-02-25 深圳市天威视讯股份有限公司 Distributed transcoding system and method based on digital television

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104102475B (en) * 2013-04-11 2018-10-02 腾讯科技(深圳)有限公司 The method, apparatus and system of distributed parallel task processing
CN103279351B (en) * 2013-05-31 2016-06-29 北京高森明晨信息科技有限公司 A kind of method of task scheduling and device
CN105893497A (en) * 2016-03-29 2016-08-24 杭州数梦工场科技有限公司 Task processing method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102638456A (en) * 2012-03-19 2012-08-15 杭州海康威视系统技术有限公司 Intelligent analysis method for mass real-time video code stream based on cloud computation and system thereof
CN104244025A (en) * 2013-06-09 2014-12-24 北京同步科技有限公司 Cluster transcoding system and method thereof
CN103685558A (en) * 2013-12-30 2014-03-26 常州大学 Wireless sensor network and task processing method thereof
CN104239144A (en) * 2014-09-22 2014-12-24 珠海许继芝电网自动化有限公司 Multilevel distributed task processing system
CN104378665A (en) * 2014-11-24 2015-02-25 深圳市天威视讯股份有限公司 Distributed transcoding system and method based on digital television

Also Published As

Publication number Publication date
CN107707592A (en) 2018-02-16

Similar Documents

Publication Publication Date Title
US11762703B2 (en) Multi-region request-driven code execution system
US10372499B1 (en) Efficient region selection system for executing request-driven code
US8671134B2 (en) Method and system for data distribution in high performance computing cluster
CN106445473B (en) container deployment method and device
US20190260827A1 (en) Edge computing system, edge server, and system control method
US11831562B2 (en) Distributed database-driven resource management and locking in a cloud native mobile core network node architecture
WO2018149221A1 (en) Device management method and network management system
WO2018137611A1 (en) Task processing method, node, medium, device and content distribution network
CN105808323A (en) Virtual machine creation method and system
CN110244901B (en) Task allocation method and device and distributed storage system
CN103744719A (en) Lock management method, lock management system, lock management system configuration method and lock management system configuration device
CN112532674A (en) Method, device and medium for establishing network edge computing system
US10802896B2 (en) Rest gateway for messaging
US9672073B2 (en) Non-periodic check-pointing for fine granular retry of work in a distributed computing environment
CN105893497A (en) Task processing method and device
US10164904B2 (en) Network bandwidth sharing in a distributed computing system
CN111163140A (en) Method, apparatus and computer readable storage medium for resource acquisition and allocation
US20160337470A1 (en) Method and server for assigning relative order to message by using vector clock and delivering the message based on the assigned relative order under distributed environment
US8903871B2 (en) Dynamic management of log persistence
EP3672203A1 (en) Distribution method for distributed data computing, device, server and storage medium
CN112099728A (en) Method and device for executing write operation and read operation
WO2017045640A1 (en) Associated stream bandwidth scheduling method and apparatus in data center
WO2018072450A1 (en) Method for elastic geographical database replication
US10951732B2 (en) Service processing method and device
CN105607955A (en) Calculation task distribution method and apparatus

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

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

Country of ref document: EP

Kind code of ref document: A1