CN105049268A - Distributed computing resource allocation system and task processing method - Google Patents
Distributed computing resource allocation system and task processing method Download PDFInfo
- Publication number
- CN105049268A CN105049268A CN201510544350.9A CN201510544350A CN105049268A CN 105049268 A CN105049268 A CN 105049268A CN 201510544350 A CN201510544350 A CN 201510544350A CN 105049268 A CN105049268 A CN 105049268A
- Authority
- CN
- China
- Prior art keywords
- computing unit
- task
- node
- server
- video image
- 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.)
- Granted
Links
- 238000013468 resource allocation Methods 0.000 title claims abstract description 57
- 238000003672 processing method Methods 0.000 title claims abstract description 33
- 238000000034 method Methods 0.000 claims abstract description 68
- 238000012545 processing Methods 0.000 claims description 86
- 238000012217 deletion Methods 0.000 claims description 54
- 230000037430 deletion Effects 0.000 claims description 54
- 238000004364 calculation method Methods 0.000 description 28
- 238000010586 diagram Methods 0.000 description 12
- 238000005516 engineering process Methods 0.000 description 11
- 238000011161 development Methods 0.000 description 9
- 239000002699 waste material Substances 0.000 description 8
- 238000010276 construction Methods 0.000 description 6
- 230000006870 function Effects 0.000 description 6
- 238000004422 calculation algorithm Methods 0.000 description 4
- 238000007405 data analysis Methods 0.000 description 4
- 238000013461 design Methods 0.000 description 4
- 238000012423 maintenance Methods 0.000 description 4
- 238000007726 management method Methods 0.000 description 4
- 238000010191 image analysis Methods 0.000 description 3
- 239000012634 fragment Substances 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000001133 acceleration Effects 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000005094 computer simulation Methods 0.000 description 1
- 230000002354 daily effect Effects 0.000 description 1
- 230000003203 everyday effect Effects 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Landscapes
- Information Transfer Between Computers (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
本发明提供了一种分布式计算资源分配系统和任务处理方法,所述系统,包括:中心服务器用于接收用户发送的视频图像任务,根据视频图像任务的类型,以及多个节点服务器当前的任务数量和负载情况,将视频图像任务通过计算单元中心端分配给对应的节点服务器;节点服务器用于通过视频图像任务对应的计算单元节点端对视频图像任务进行处理。本发明提供的分布式计算资源分配系统和任务处理方法,可以使用一个服务器集群的多个服务器处理不同类型的视频图像任务,提高服务器集群的利用率。
The present invention provides a distributed computing resource allocation system and task processing method. The system includes: a central server is used to receive video image tasks sent by users, and according to the type of video image tasks, and the current tasks of multiple node servers According to the quantity and load conditions, the video image task is distributed to the corresponding node server through the central end of the computing unit; the node server is used to process the video image task through the corresponding computing unit node end of the video image task. The distributed computing resource allocation system and task processing method provided by the present invention can use multiple servers of a server cluster to process different types of video image tasks, thereby improving the utilization rate of the server cluster.
Description
技术领域technical field
本发明涉及多媒体播放领域,具体而言,涉及一种分布式计算资源分配系统和任务处理方法。The invention relates to the field of multimedia playing, in particular to a distributed computing resource allocation system and task processing method.
背景技术Background technique
目前,在日常生活中,基于视频的应用越来越广泛,对视频进行处理的方式也越来越多,比如视频的图像转换、视频中图片的旋转、视频中实时图像的对比等,针对视频不同的处理方式,为了加快对视频或者图像的处理速度,会采用不同的计算模式对视频进行处理,比如:针对视频的转换处理时,由于处理的数据量较大,所以一般会采用并行计算方式(如MapReduce)将视频分块后处理;而针对视频中实时图像的对比时,由于需要在短时间内确定视频图像中的图像内容,所以采用内存内计算方式进行海量图片的对比。所以就会部署不同的服务器集群来实现不同的计算方式。At present, in daily life, video-based applications are more and more widely used, and there are more and more ways to process videos, such as image conversion of videos, rotation of pictures in videos, comparison of real-time images in videos, etc. For video Different processing methods, in order to speed up the processing speed of videos or images, different computing modes will be used to process videos, for example: when converting and processing videos, due to the large amount of processed data, parallel computing methods are generally used (such as MapReduce) divide the video into blocks and then process it; and for the comparison of real-time images in the video, since the image content in the video image needs to be determined in a short time, the comparison of massive images is performed using the in-memory computing method. Therefore, different server clusters will be deployed to achieve different computing methods.
在现有的对视频的处理过程中,当需要对视频的图像进行转换时,就会把视频文件分配到具有并行计算方式的服务器集群中进行处理,当需要对视频中实时图像进行对比时,就会把视频图像分配到具有内存内计算方式的服务器集群中进行处理。In the existing video processing process, when the image of the video needs to be converted, the video file will be distributed to a server cluster with parallel computing mode for processing. When it is necessary to compare the real-time images in the video, The video image will be distributed to the server cluster with in-memory computing method for processing.
现有的以服务器集群为单位对视频进行处理的方式中,一个服务器集群只能实现一种视频处理方式,当对视频的处理方式有很多时,就必须部署数量很多的服务器集群才可以满足视频的处理需求,所以就大大增加了服务器集群的建设成本,而且,每个服务器集群的利用率不同,而利用率低的服务器集群中的服务器资源又不能被其他的视频处理方式所使用,造成了资源的浪费。In the existing method of processing video in units of server clusters, one server cluster can only implement one video processing method. When there are many video processing methods, a large number of server clusters must be deployed to meet the requirements of video processing. Therefore, the construction cost of the server cluster is greatly increased, and the utilization rate of each server cluster is different, and the server resources in the server cluster with low utilization rate cannot be used by other video processing methods, resulting in Waste of resources.
发明内容Contents of the invention
本发明的目的在于提供一种分布式计算资源分配系统和任务处理方法,可以使用一个服务器集群的多个服务器处理不同类型的视频图像任务,提高服务器集群的利用率。The purpose of the present invention is to provide a distributed computing resource allocation system and a task processing method, which can use multiple servers of a server cluster to process different types of video image tasks, and improve the utilization rate of the server cluster.
第一方面,本发明实施例提供了一种分布式计算资源分配系统,包括:中心服务器和多个节点服务器,其中,所述中心服务器中设置有针对不同任务类型的计算单元中心端,每个所述节点服务器分别设置有与所述计算单元中心端对应的计算单元节点端,所述计算单元中心端和对应的所述计算单元节点端组成一个计算单元;In the first aspect, the embodiment of the present invention provides a distributed computing resource allocation system, including: a central server and a plurality of node servers, wherein the central server is provided with computing unit central ends for different task types, each The node servers are respectively provided with computing unit node terminals corresponding to the computing unit central terminals, and the computing unit central terminal and the corresponding computing unit node terminals form a computing unit;
所述中心服务器用于接收用户发送的视频图像任务,根据所述视频图像任务的类型,以及所述多个节点服务器当前的任务数量和负载情况,将所述视频图像任务通过计算单元中心端分配给对应的节点服务器;The central server is used to receive the video image task sent by the user, and distribute the video image task through the computing unit center according to the type of the video image task, and the current task quantity and load situation of the plurality of node servers to the corresponding node server;
所述节点服务器用于通过所述视频图像任务对应的计算单元节点端对所述视频图像任务进行处理。The node server is configured to process the video image task through a computing unit node end corresponding to the video image task.
结合第一方面,本发明实施例提供了第一方面的第一种可能的实施方式,其中,所述中心服务器包括:任务数量确定模块,用于根据当前服务器集群中各节点服务器的已分配任务数量,确定已分配任务数量最少的节点服务器;第一选择模块,用于选择任务数量最少的节点服务器作为所述视频图像任务对应的节点服务器;第二选择模块,用于当有多个节点服务器的已分配任务数量均最少时,选择所述多个节点服务器中资源利用率最低的节点服务器作为所述视频图像任务对应的节点服务器,所述资源利用率包括以下至少一种服务器硬件资源的利用率:中央处理器、内存和网络带宽;In combination with the first aspect, the embodiment of the present invention provides a first possible implementation manner of the first aspect, wherein the central server includes: a task number determination module configured to determine the number of tasks according to the assigned tasks of each node server in the current server cluster Quantity, to determine the node server with the smallest number of assigned tasks; the first selection module is used to select the node server with the smallest number of tasks as the node server corresponding to the video image task; the second selection module is used when there are multiple node servers When the number of assigned tasks is the least, select the node server with the lowest resource utilization rate among the plurality of node servers as the node server corresponding to the video image task, and the resource utilization rate includes the utilization of at least one of the following server hardware resources Rate: CPU, memory and network bandwidth;
所述节点服务器包括:信息上报模块,用于周期性向所述中心服务器反馈当前的资源利用率。The node server includes: an information reporting module, configured to periodically feed back the current resource utilization rate to the central server.
结合第一方面,本发明实施例提供了第一方面的第二种可能的实施方式,其中,所述中心服务器包括:任务添加模块,用于查找所述视频图像任务对应的节点服务器的任务列表,在所述任务列表的已分配任务数量中添加所述视频图像任务;任务删除模块,用于当接收到所述计算单元节点端发送的所述视频图像任务已完成的信息时,将所述任务列表的已分配任务数量中所述视频图像任务删除;In combination with the first aspect, the embodiment of the present invention provides a second possible implementation manner of the first aspect, wherein the central server includes: a task adding module configured to search for the task list of the node server corresponding to the video image task , adding the video image task to the number of assigned tasks in the task list; the task deletion module is configured to delete the video image task when receiving the information that the video image task sent by the computing unit node has been completed Deletion of the video image task described in the number of assigned tasks in the task list;
所述节点服务器包括:任务反馈模块,用于当所述视频图像任务完成时,通过所述视频图像任务对应的计算单元节点端向所述中心服务器发送任务已完成的信息,所述任务已完成的信息携带有对应的计算单元所在节点服务器的标识。The node server includes: a task feedback module, which is used to send information that the task has been completed to the central server through the computing unit node corresponding to the video image task when the video image task is completed, and the task has been completed The information carries the identifier of the node server where the corresponding computing unit is located.
结合第一方面,本发明实施例提供了第一方面的第三种可能的实施方式,所述中心服务器包括:指令获取模块,用于获取计算单元添加指令,所述计算单元添加指令携带有计算单元数据包;中心端设置模块,用于根据所述计算单元数据包,设置对应的计算单元中心端,并为设置的所述计算单元中心端分配端口;发送模块,用于将所述计算单元数据包和分配给所述计算单元中心端的端口的端口号发送给所述多个节点服务器;In combination with the first aspect, the embodiment of the present invention provides a third possible implementation manner of the first aspect. The central server includes: an instruction acquiring module, configured to acquire an instruction to add a computing unit, and the instruction to add a computing unit carries a calculation The unit data packet; the central terminal setting module is used to set the corresponding calculation unit central terminal according to the calculation unit data package, and allocates ports for the set calculation unit central terminal; the sending module is used to configure the calculation unit The data packet and the port number assigned to the port at the central end of the computing unit are sent to the plurality of node servers;
所述节点服务器包括:节点端设置模块,用于接收到所述计算单元数据包后,设置对应的计算单元节点端;连接建立模块,用于通过所述端口号对应的端口为设置的所述计算单元节点端与所述计算单元中心端建立连接。The node server includes: a node end setting module, configured to set the corresponding computing unit node end after receiving the computing unit data packet; a connection establishment module, used to set the port through the port corresponding to the port number The computing unit node end establishes a connection with the computing unit central end.
结合第一方面,本发明实施例提供了第一方面的第四种可能的实施方式,所述中心服务器包括:删除指令获取模块,用于获取计算单元删除指令,所述计算单元删除指令中携带有计算单元的标识;计算单元中心端卸载模块,用于根据所述计算单元删除指令中携带的计算单元的标识,卸载计算单元的标识对应的计算单元中心端;删除指令下发模块,用于向所述多个节点服务器发送所述计算单元删除指令;In combination with the first aspect, the embodiment of the present invention provides a fourth possible implementation manner of the first aspect. The central server includes: a deletion instruction acquisition module, configured to acquire a computing unit deletion instruction, and the computing unit deletion instruction carries There is an identification of the computing unit; the unloading module of the computing unit central terminal is used to unload the computing unit central end corresponding to the computing unit identification according to the computing unit identification carried in the computing unit deletion instruction; the deletion instruction issuing module is used for sending the computing unit deletion instruction to the plurality of node servers;
所述节点服务器包括:计算单元节点端卸载模块,用于当接收到所述计算单元删除指令时,根据所述计算单元删除命令中的计算单元的标识,卸载所述计算单元的标识对应的计算单元节点端。The node server includes: a computing unit node-end unloading module, configured to, when receiving the computing unit deletion instruction, unload the computation corresponding to the computing unit identifier according to the computing unit identifier in the computing unit deletion command unit node.
结合第一方面,本发明实施例提供了第一方面的第五种可能的实施方式,所述中心服务器包括:通用任务接口,通过所述通用任务接口,获取用户发送的具有不同任务类型的所述视频图像任务。In combination with the first aspect, the embodiment of the present invention provides a fifth possible implementation manner of the first aspect. The central server includes: a general task interface, through which all tasks sent by users with different task types are obtained. described video image tasks.
第二方面,本发明实施例提供一种应用上述分布式计算资源分配系统实现的任务处理方法,包括:In the second aspect, an embodiment of the present invention provides a task processing method implemented by applying the above-mentioned distributed computing resource allocation system, including:
所述中心服务器接收用户发送的视频图像任务,根据所述视频图像任务的类型,以及所述多个节点服务器当前的视频图像任务数量和负载情况,将所述视频图像任务通过计算单元中心端分配给对应的节点服务器;The central server receives the video image task sent by the user, and according to the type of the video image task, and the current video image task quantity and load situation of the plurality of node servers, distributes the video image task through the central terminal of the computing unit to the corresponding node server;
所述节点服务器接收到所述视频图像任务后,通过所述视频图像任务对应的计算单元节点端对所述视频图像任务进行处理。After receiving the video image task, the node server processes the video image task through a computing unit node corresponding to the video image task.
结合第二方面,本发明实施例提供了第二方面的第一种可能的实施方式,其中,所述中心服务器根据所述视频图像任务的类型,以及所述多个节点服务器当前的视频图像任务数量和负载情况,将所述视频图像任务通过计算单元中心端分配给对应的节点服务器包括:With reference to the second aspect, the embodiment of the present invention provides a first possible implementation manner of the second aspect, wherein, the central server bases on the type of the video image task and the current video image task of the plurality of node servers Quantity and load situation, distributing the video image task to the corresponding node server through the central end of the computing unit includes:
所述中心服务器根据当前服务器集群中各节点服务器的已分配任务数量,确定已分配任务数量最少的节点服务器;The central server determines the node server with the least number of assigned tasks according to the number of assigned tasks of each node server in the current server cluster;
所述中心服务器选择任务数量最少的节点服务器作为所述视频图像任务对应的节点服务器;The central server selects the node server with the least number of tasks as the node server corresponding to the video image task;
当有多个节点服务器的已分配任务数量均最少时,所述中心服务器选择所述多个节点服务器中资源利用率最低的节点服务器作为所述视频图像任务对应的节点服务器,所述资源利用率包括以下至少一种服务器硬件资源的利用率:中央处理器、内存和网络带宽;其中,所述节点服务器周期性向所述中心服务器反馈当前的资源利用率。When there are multiple node servers with the least number of assigned tasks, the central server selects the node server with the lowest resource utilization rate among the multiple node servers as the node server corresponding to the video image task, and the resource utilization rate Including the utilization rate of at least one of the following server hardware resources: central processing unit, memory and network bandwidth; wherein, the node server periodically feeds back the current resource utilization rate to the central server.
结合第二方面,本发明实施例提供了第二方面的第二种可能的实施方式,其中,所述方法还包括:With reference to the second aspect, the embodiment of the present invention provides a second possible implementation manner of the second aspect, wherein the method further includes:
所述中心服务器查找所述视频图像任务对应的节点服务器的任务列表,在所述任务列表的已分配任务数量中添加所述视频图像任务;The central server searches the task list of the node server corresponding to the video image task, and adds the video image task to the number of assigned tasks in the task list;
当接收到所述计算单元节点端发送的所述视频图像任务已完成的信息时,所述中心服务器将所述任务列表的已分配任务数量中所述视频图像任务删除;When receiving the information that the video image task has been completed sent by the computing unit node, the central server deletes the video image task from the number of assigned tasks in the task list;
当所述视频图像任务完成时,所述节点服务器通过所述视频图像任务对应的计算单元节点端向所述中心服务器发送任务已完成的信息,所述任务已完成的信息携带有对应的计算单元所在节点服务器的标识。When the video image task is completed, the node server sends the information that the task has been completed to the central server through the computing unit node end corresponding to the video image task, and the information that the task has been completed carries the corresponding computing unit The ID of the node server where it resides.
结合第二方面,本发明实施例提供了第二方面的第三种可能的实施方式,其中,所述方法还包括:In combination with the second aspect, the embodiment of the present invention provides a third possible implementation manner of the second aspect, wherein the method further includes:
所述中心服务器获取计算单元添加指令,所述计算单元添加指令携带有计算单元数据包;The central server acquires an instruction to add a computing unit, and the instruction to add a computing unit carries a data packet of a computing unit;
所述中心服务器根据所述计算单元数据包,设置对应的计算单元中心端,并为设置的所述计算单元中心端分配端口;The central server sets a corresponding computing unit central terminal according to the computing unit data packet, and allocates a port for the set computing unit central terminal;
所述中心服务器将所述计算单元数据包和分配给所述计算单元中心端的端口的端口号发送给所述多个节点服务器;The central server sends the computing unit data packet and the port number assigned to the central port of the computing unit to the plurality of node servers;
所述节点服务器接收到所述计算单元数据包后,设置对应的计算单元节点端;After the node server receives the computing unit data packet, it sets the corresponding computing unit node end;
所述节点服务器通过所述端口号对应的端口为设置的所述计算单元节点端与所述计算单元中心端建立连接。The node server establishes a connection between the set computing unit node end and the computing unit central end through the port corresponding to the port number.
结合第二方面,本发明实施例提供了第二方面的第四种可能的实施方式,其中,所述方法还包括:In combination with the second aspect, the embodiment of the present invention provides a fourth possible implementation manner of the second aspect, wherein the method further includes:
所述中心服务器获取计算单元删除指令,所述计算单元删除指令中携带有计算单元的标识;The central server acquires a computing unit deletion instruction, and the computing unit deletion instruction carries a computing unit identifier;
所述中心服务器根据所述计算单元删除指令中携带的计算单元的标识,卸载所述计算单元的标识对应的计算单元中心端;The central server uninstalls the computing unit central end corresponding to the computing unit identifier according to the computing unit identifier carried in the computing unit deletion instruction;
所述中心服务器向所述多个节点服务器发送所述计算单元删除指令;The central server sends the computing unit deletion instruction to the plurality of node servers;
当接收到所述计算单元删除指令时,所述节点服务器根据所述计算单元删除命令中的计算单元的标识,卸载所述计算单元的标识对应的计算单元节点端。When receiving the computing unit deletion instruction, the node server uninstalls the computing unit node end corresponding to the computing unit identifier according to the computing unit identifier in the computing unit deletion command.
结合第二方面,本发明实施例提供了第二方面的第五种可能的实施方式,其中,所述中心服务器通过所述通用任务接口,获取用户发送的具有不同任务类型的所述视频图像任务。In combination with the second aspect, the embodiment of the present invention provides a fifth possible implementation manner of the second aspect, wherein the central server acquires the video image tasks with different task types sent by the user through the general task interface. .
本发明实施例提供的一种分布式计算资源分配系统和任务处理方法,通过设置的中心服务器接收用户发送的视频图像任务,根据服务器集群中多个节点服务器当前的任务数量和负载情况,将视频图像任务通过中心服务器设置的计算单元中心端分配给服务器集群中任一节点服务器中与该计算单元中心端对应的计算单元节点端中,通过视频图像任务对应的计算单元节点端对视频图像任务进行处理;通过在中心服务器中设置对视频图像任务进行分配的计算单元中心端,以及在服务器集群的每个服务器中设置可以处理相应类型视频图像任务的计算单元节点端,从而可以使用一个服务器集群的多个服务器就可以处理不同类型的视频图像任务,无需部署多个服务器集群才能满足视频图像任务的处理需求,提高了服务器集群的利用率,降低了服务器集群的建设成本,而且通过一个服务器集群的多个服务器处理不同类型的视频图像任务,提高了服务器集群中服务器资源的利用率,避免了资源的浪费。In the distributed computing resource allocation system and task processing method provided by the embodiments of the present invention, the set central server receives video image tasks sent by users, and according to the current number of tasks and load conditions of multiple node servers in the server cluster, video The image task is assigned to the computing unit node end corresponding to the computing unit center end of any node server in the server cluster through the computing unit center end set by the central server, and the video image task is performed through the computing unit node end corresponding to the video image task Processing; by setting the computing unit central terminal for distributing video image tasks in the central server, and setting the computing unit node end that can handle corresponding types of video image tasks in each server of the server cluster, so that a server cluster can be used Multiple servers can process different types of video and image tasks, and it is not necessary to deploy multiple server clusters to meet the processing requirements of video image tasks, which improves the utilization of server clusters and reduces the construction cost of server clusters. Multiple servers process different types of video image tasks, which improves the utilization rate of server resources in the server cluster and avoids waste of resources.
为使本发明的上述目的、特征和优点能更明显易懂,下文特举较佳实施例,并配合所附附图,作详细说明如下。In order to make the above-mentioned objects, features and advantages of the present invention more comprehensible, preferred embodiments will be described in detail below together with the accompanying drawings.
附图说明Description of drawings
为了更清楚地说明本发明实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,应当理解,以下附图仅示出了本发明的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。In order to illustrate the technical solutions of the embodiments of the present invention more clearly, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention, and thus It should be regarded as a limitation on the scope, and those skilled in the art can also obtain other related drawings based on these drawings without creative work.
图1示出了本发明实施例1提供的一种分布式计算资源分配系统的结构示意图;FIG. 1 shows a schematic structural diagram of a distributed computing resource allocation system provided by Embodiment 1 of the present invention;
图2示出了本发明实施例1提供的一种分布式计算资源分配系统中计算单元处理的任务类型的示意图;FIG. 2 shows a schematic diagram of task types processed by computing units in a distributed computing resource allocation system provided by Embodiment 1 of the present invention;
图3示出了本发明实施例2所提供的另一种分布式计算资源分配系统的架构示意图;FIG. 3 shows a schematic architecture diagram of another distributed computing resource allocation system provided by Embodiment 2 of the present invention;
图4示出了本发明实施例2提供的分布式计算资源分配系统中对视频图像任务进行历史数据计算的计算单元节点端示意图;FIG. 4 shows a schematic diagram of a computing unit node end for performing historical data calculation on a video image task in the distributed computing resource allocation system provided by Embodiment 2 of the present invention;
图5示出了本发明实施例2提供的分布式计算资源分配系统中对视频图像任务进行内存内计算的计算单元节点端示意图;FIG. 5 shows a schematic diagram of a computing unit node end for in-memory computing of video image tasks in the distributed computing resource allocation system provided by Embodiment 2 of the present invention;
图6示出了本发明实施例2提供的分布式计算资源分配系统中对视频图像任务进行实时数据并行计算的计算单元节点端示意图;6 shows a schematic diagram of a computing unit node end for performing real-time data parallel computing on video image tasks in the distributed computing resource allocation system provided by Embodiment 2 of the present invention;
图7示出了本发明实施例2提供的分布式计算资源分配系统中对视频图像任务进行高并发小块数据计算的计算单元节点端示意图;Fig. 7 shows a schematic diagram of a node end of a computing unit for performing high-concurrency small-block data calculation on a video image task in the distributed computing resource allocation system provided by Embodiment 2 of the present invention;
图8示出了本发明实施例3提供的任务处理方法的流程图。FIG. 8 shows a flow chart of the task processing method provided by Embodiment 3 of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。通常在此处附图中描述和示出的本发明实施例的组件可以以各种不同的配置来布置和设计。因此,以下对在附图中提供的本发明的实施例的详细描述并非旨在限制要求保护的本发明的范围,而是仅仅表示本发明的选定实施例。基于本发明的实施例,本领域技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. The components of the embodiments of the invention generally described and illustrated in the figures herein may be arranged and designed in a variety of different configurations. Accordingly, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts belong to the protection scope of the present invention.
考虑到相关技术中,现有的以服务器集群为单位对视频进行处理的方式中,一个服务器集群只能实现一种视频处理方式,当对视频的处理方式有很多时,就必须部署数量很多的服务器集群才可以满足视频的处理需求,所以就大大增加了服务器集群的建设成本,而且,每个服务器集群的利用率不同,而利用率低的服务器集群中的服务器资源又不能被其他的视频处理方式所使用,造成了资源的浪费。基于此,本发明实施例提供了一种分布式计算资源分配系统和分布式处理方法。Considering that in related technologies, in the existing methods of processing video in units of server clusters, one server cluster can only implement one video processing method. When there are many video processing methods, a large number of video processing methods must be deployed. Only the server cluster can meet the video processing requirements, so the construction cost of the server cluster is greatly increased, and the utilization rate of each server cluster is different, and the server resources in the server cluster with low utilization rate cannot be processed by other video way, resulting in a waste of resources. Based on this, an embodiment of the present invention provides a distributed computing resource allocation system and a distributed processing method.
实施例1Example 1
参见图1,本实施例提供一种分布式计算资源分配系统,包括:中心服务器100和多个节点服务器110,其中,中心服务器100中设置有针对不同任务类型的计算单元中心端101,每个节点服务器110分别设置有与计算单元中心端101对应的计算单元节点端111,计算单元中心端和对应的计算单元节点端组成一个计算单元;Referring to Fig. 1, the present embodiment provides a distributed computing resource allocation system, including: a central server 100 and a plurality of node servers 110, wherein, the central server 100 is provided with computing unit central terminals 101 for different task types, each The node server 110 is respectively provided with a computing unit node end 111 corresponding to the computing unit central end 101, and the computing unit central end and the corresponding computing unit node end form a computing unit;
中心服务器100用于接收用户发送的视频图像任务,根据视频图像任务的类型,以及多个节点服务器110当前的任务数量和负载情况,将视频图像任务通过计算单元中心端101分配给对应的节点服务器110;The central server 100 is used to receive the video image task sent by the user, and according to the type of the video image task, and the current task quantity and load situation of multiple node servers 110, distribute the video image task to the corresponding node server through the computing unit central terminal 101 110;
节点服务器110用于通过视频图像任务对应的计算单元节点端111对视频图像任务进行处理。The node server 110 is configured to process the video image task through the computing unit node end 111 corresponding to the video image task.
从计算单元处理的任务类型的示意图如图2所示,每个计算单元都会对特定类型的视频图像任务进行处理,所以中心服务器100在接收到用户发送的视频图像任务时,都会先获取接收到的视频图像任务中携带的任务类型,根据视频图像任务的任务类型,将接收到的视频图像任务分配给处理相应任务类型的计算单元的计算单元中心端101。The schematic diagram of the task types processed by the computing unit is shown in Figure 2. Each computing unit will process a specific type of video image task, so when the central server 100 receives the video image task sent by the user, it will first obtain the received According to the task type carried in the video image task, the received video image task is distributed to the computing unit central end 101 of the computing unit processing the corresponding task type according to the task type of the video image task.
中心服务器100和节点服务器110可以使用现有的任何可以进行分布式计算资源分配以及进行分布式计算处理的服务器和终端,这里不再一一赘述。The central server 100 and the node server 110 can use any existing servers and terminals that can perform distributed computing resource allocation and distributed computing processing, and will not be repeated here.
视频图像任务,包括视频任务和图像任务,其中视频任务是指用户发出的对视频或者视频图像进行处理的任务;图像任务是指用户发出的对视频或者视频图像进行处理的任务;由于视频任务和图像任务在处理上比较类似,所以分布式计算资源分配系统中设置的计算单元可以对视频任务和图像任务进行同时处理。Video and image tasks include video tasks and image tasks, where video tasks refer to tasks issued by users to process videos or video images; image tasks refer to tasks issued by users to process videos or video images; due to video tasks and Image tasks are relatively similar in processing, so the computing units set in the distributed computing resource allocation system can simultaneously process video tasks and image tasks.
视频图像任务包括但不限于:车型比对、人脸比对、视频转码、图像旋转、图像去雾和视频布防。其中,图像旋转和图像去雾两项处理可以是对视频任务中的视频图像,也可以是对图像任务中的图像进行的处理。Video image tasks include but are not limited to: car model comparison, face comparison, video transcoding, image rotation, image defogging and video arming. Wherein, the two processings of image rotation and image defogging may be performed on video images in a video task, or on images in an image task.
视频图像任务所处理的视频和图像的内容都是通过摄像头或者摄影机获取到的,这里不再一一赘述。The content of the video and image processed by the video image task is acquired through a camera or a video camera, so details will not be repeated here.
可以按照对视频图像的处理方式的不同,将视频图像任务分为不同的任务类型。当有多种视频图像任务的处理方式相同时,可以将该多种视频图像任务划分为一类视频图像任务。Video image tasks can be divided into different task types according to different processing methods for video images. When there are multiple video image tasks that are processed in the same manner, the multiple video image tasks may be divided into one type of video image tasks.
对视频图像任务进行的任务类型的划分,可以在开发分布式计算资源分配系统时进行预先设置,也可以由分布式计算资源分配系统的用户在使用一顿时间后,发现对有些视频图像任务的任务类型划分不准确时,可以通过分布式计算资源分配系统的选项对这些视频图像任务的任务类型进行重新划分。The division of task types for video image tasks can be pre-set when developing the distributed computing resource allocation system, or users of the distributed computing resource allocation system can find that some video image tasks are not suitable after a while. When the division of task types is inaccurate, the task types of these video image tasks can be re-divided through the options of the distributed computing resource allocation system.
比如由于对视频图像中的人脸对比和车型对比时,都需要将获取的图像中的人脸或者车型与存储在数据库中的人脸和车型进行对比,那么为了保证对比的速度,数据库中的人脸和车型数据应该长期保留在内存中,以在需要人脸和车型比对时,可以实时进行人脸和车型的分析,从而快速的向用户反馈比对的结果,那么可以设置视频图像中的人脸对比和车型对比的任务类型是相同的任务类型,由可以进行内存内计算的计算单元进行处理。For example, when comparing the face and car model in the video image, it is necessary to compare the face or car model in the acquired image with the face and car model stored in the database, so in order to ensure the speed of comparison, the data in the database The face and car model data should be kept in memory for a long time, so that when the face and car model comparison is required, the face and car model can be analyzed in real time, so as to quickly feed back the comparison results to the user, then you can set the video image The task types of face comparison and car model comparison are the same task type, which are processed by the computing unit that can perform in-memory calculations.
任务类型包括但不限于:内存内计算类型、历史数据并行计算类型、实时数据并行计算类型和高并发小块数据计算类型。Task types include, but are not limited to: in-memory computing, historical data parallel computing, real-time data parallel computing, and high-concurrency small-block data computing.
针对不同类型的视频图像任务,通过不同的计算单元分别进行处理。当分布式计算资源分配系统可以处理的任务类型包括内存内计算类型、历史数据并行计算类型、实时数据并行计算类型和高并发小块数据计算类型时,分布式计算资源分配系统中就会包括:用于内存内计算处理的第一计算单元、用于历史数据并行计算的第二计算单元、用于实时数据并行计算的第三计算单元和用于高并发小块数据计算的第四计算单元。For different types of video image tasks, they are processed separately by different computing units. When the types of tasks that the distributed computing resource allocation system can handle include in-memory computing, historical data parallel computing, real-time data parallel computing, and high-concurrency small-block data computing, the distributed computing resource allocation system will include: The first computing unit for in-memory computing processing, the second computing unit for parallel computing of historical data, the third computing unit for parallel computing of real-time data, and the fourth computing unit for high concurrent small block data computing.
每个计算单元,均包括一个用于分配视频图像任务的计算单元中心端101和一个用于对视频图像任务进行处理的计算单元节点端111;每个计算单元中的计算单元节点端111通过预定的端口与对应的计算单元中心端101连接,以接收计算单元中心端101发送的视频图像任务,并在视频图像任务完成时,向计算单元中心端101反馈任务完成信息。Each computing unit includes a computing unit central terminal 101 for distributing video image tasks and a computing unit node terminal 111 for processing video image tasks; the computing unit node terminal 111 in each computing unit passes a predetermined The port of the corresponding computing unit central terminal 101 is connected to receive the video image task sent by the computing unit central terminal 101, and when the video image task is completed, the task completion information is fed back to the computing unit central terminal 101.
本实施例提供的分布式计算资源分配系统,通过设置的中心服务器接收用户发送的视频图像任务,根据服务器集群中多个节点服务器当前的任务数量和负载情况,将视频图像任务通过中心服务器设置的计算单元中心端分配给服务器集群中任一节点服务器中与该计算单元中心端对应的计算单元节点端中,通过视频图像任务对应的计算单元节点端对视频图像任务进行处理;通过在中心服务器中设置对视频图像任务进行分配的计算单元中心端,以及在服务器集群的每个服务器中设置可以处理相应类型视频图像任务的计算单元节点端,从而可以使用一个服务器集群的多个服务器就可以处理不同类型的视频图像任务,无需部署多个服务器集群才能满足视频图像任务的处理需求,提高了服务器集群的利用率,降低了服务器集群的建设成本,而且通过一个服务器集群的多个服务器处理不同类型的视频图像任务,提高了服务器集群中服务器资源的利用率,避免了资源的浪费。The distributed computing resource allocation system provided in this embodiment receives the video image task sent by the user through the set central server, and according to the current task quantity and load situation of multiple node servers in the server cluster, the video image task is set by the central server. The central end of the computing unit is assigned to any node in the server cluster, and in the computing unit node end corresponding to the central end of the computing unit in the server, the video image task is processed through the computing unit node end corresponding to the video image task; Set up the computing unit central end that distributes video image tasks, and set the computing unit node end that can handle corresponding types of video image tasks in each server of the server cluster, so that multiple servers in one server cluster can be used to process different type of video image tasks, it is not necessary to deploy multiple server clusters to meet the processing requirements of video image tasks, improve the utilization of server clusters, reduce the construction cost of server clusters, and process different types of video images through multiple servers in a server cluster The video image task improves the utilization rate of server resources in the server cluster and avoids waste of resources.
相关技术中,对任务进行分配的服务器会根据接收的视频图像任务的任务类型的不同,通过不同的接口来接收用户发送过来的不同种类的任务,所以在服务器的前期开发时,需要针对不同的任务类型来开发出不同的接口,为了减少开发的接口的数量,中心服务器预设有用于获取户发送的具有不同任务类型的视频图像任务的通用任务接口,用户发送的视频图像任务可以通过通用任务接口被中心服务器获取。In related technologies, the server that allocates tasks will receive different types of tasks sent by users through different interfaces according to the different task types of video image tasks received, so in the early development of the server, it is necessary to target different tasks Different types of tasks are used to develop different interfaces. In order to reduce the number of developed interfaces, the central server is preset with a general task interface for obtaining video image tasks with different task types sent by users. The video image tasks sent by users can be passed through the general task The interface is obtained by the central server.
通过以上的描述可以看出,通过设置的通用任务接口,接收用户发送的具有不同任务类型的任务,无需对各个计算单元分别设计接口,提高了软件的开发速度。It can be seen from the above description that through the set general task interface, tasks with different task types sent by the user are received, and there is no need to design interfaces for each computing unit separately, which improves the development speed of the software.
在用户向中心服务器发送视频图像任务时,用户通过使用的终端向中心服务器发送需要处理的视频图像任务,视频图像任务中携带有视频图像任务的任务类型,中心服务器在获取到用户发送的视频图像任务时,会根据视频图像任务中携带的视频图像任务的任务类型,在中心服务器中预设的任务类型和计算单元的标识的对应关系中,确定处理该任务类型视频图像任务的计算单元,然后将该视频图像任务分配给处理该任务类型的视频图像任务的计算单元中心端;而该计算单元中心端就会向中心服务器发送服务器资源申请请求,中心服务器在获取到该计算单元中心端发送的服务器资源申请请求后,就会根据多个节点服务器当前的任务数量和负载情况,将视频图像任务通过计算单元中心端分配给对应的节点服务器。When the user sends a video image task to the central server, the user sends the video image task to the central server through the terminal used. The video image task carries the task type of the video image task, and the central server obtains the video image task sent by the user. During the task, according to the task type of the video image task carried in the video image task, in the corresponding relationship between the task type preset in the central server and the identification of the computing unit, determine the computing unit that processes the video image task of the task type, and then Assign the video image task to the computing unit central terminal that processes the video image task of this task type; and the computing unit central terminal will send a server resource application request to the central server, and the central server will obtain the information sent by the computing unit central terminal. After the server resource application request, the video image task will be assigned to the corresponding node server through the central terminal of the computing unit according to the current task quantity and load situation of multiple node servers.
相关技术中,对任务进行分配的服务器在分配任务时,只会随机将任务分配给服务器集群中的任意服务器中,会导致服务器集群中各服务器的负载不均衡,从而降低服务器集群的任务处理能力,中心服务器通过设置任务数量确定模块、第一选择模块和第二选择模块以及节点服务器中设置的信息上报模块来缓解服务器集群中各服务器的负载不均衡情况,中心服务器具体包括:任务数量确定模块,用于根据当前服务器集群中各节点服务器的已分配任务数量,确定已分配任务数量最少的节点服务器;第一选择模块,用于选择任务数量最少的节点服务器作为视频图像任务对应的节点服务器;第二选择模块,用于当有多个节点服务器的已分配任务数量均最少时,选择多个节点服务器中资源利用率最低的节点服务器作为视频图像任务对应的节点服务器,资源利用率包括以下至少一种服务器硬件资源的利用率:中央处理器、内存和网络带宽。In related technologies, when assigning tasks, the server that allocates tasks will only randomly assign the tasks to any server in the server cluster, which will lead to unbalanced load of each server in the server cluster, thereby reducing the task processing capacity of the server cluster , the central server alleviates the load imbalance of each server in the server cluster by setting the task quantity determination module, the first selection module and the second selection module, and the information reporting module set in the node server. The central server specifically includes: a task quantity determination module , used to determine the node server with the smallest number of assigned tasks according to the number of assigned tasks of each node server in the current server cluster; the first selection module is used to select the node server with the smallest number of tasks as the node server corresponding to the video image task; The second selection module is used to select the node server with the lowest resource utilization rate among the multiple node servers as the node server corresponding to the video image task when there are a plurality of node servers with the least number of assigned tasks, and the resource utilization rate includes at least the following A utilization of server hardware resources: CPU, memory, and network bandwidth.
节点服务器具体包括:信息上报模块,用于周期性向中心服务器反馈当前的资源利用率。The node server specifically includes: an information reporting module, which is used to periodically feed back the current resource utilization rate to the central server.
中心服务器在接收到节点服务器周期性反馈的当前各服务器的资源利用率数据后,会将接收到的当前各服务器的资源利用率的数据缓存起来。由于节点服务器是周期性向中心服务器反馈当前的资源利用率,那么当预设的时长到达时,中心服务器会再一次接收到节点服务器反馈的当前各服务器的资源利用率的数据,此时中心服务器会将缓存的资源利用率的数据擦除掉,然后将当前接收到的各服务器的资源利用率的数据写入缓存中。After receiving the current resource utilization data of each server periodically fed back by the node server, the central server will cache the received current resource utilization data of each server. Since the node server periodically feeds back the current resource utilization rate to the central server, when the preset time period arrives, the central server will receive the data of the current resource utilization rate of each server fed back by the node server again. At this time, the central server will The cached resource utilization data is erased, and then the currently received resource utilization data of each server is written into the cache.
任务数量确定模块,具体包括:任务数量获取单元,用于获取服务器集群中各节点服务器的已分配任务数量;任务数量比对单元,用于对比各节点服务器的已分配任务数量,确定已分配任务数量的最小值;节点服务器确定单元,用于选择已分配任务数量的最小值对应的节点服务器作为已分配任务数量最少的节点服务器。The module for determining the number of tasks specifically includes: a task number acquisition unit for obtaining the number of assigned tasks of each node server in the server cluster; a task number comparison unit for comparing the number of assigned tasks of each node server to determine the number of assigned tasks The minimum value of the number; the node server determination unit is used to select the node server corresponding to the minimum value of the number of assigned tasks as the node server with the smallest number of assigned tasks.
当任务数量确定模块确定当前有多个节点服务器的已分配任务数量均最少时,第二选择模块,具体包括:资源利用率获取单元,用于获取中心服务器中缓存的已分配任务数量均最少的多个节点服务器的资源利用率的数据;资源利用率对比单元,用于对比已分配任务数量均最少的多个节点服务器的资源利用率的高低,确定资源利用率的最低值;节点服务器确定单元,用于选择资源利用率的最低值对应的节点服务器作为已分配任务数量最少的节点服务器。When the task number determination module determines that there are currently multiple node servers with the least number of assigned tasks, the second selection module specifically includes: a resource utilization acquisition unit, which is used to obtain the least number of assigned tasks cached in the central server The resource utilization rate data of multiple node servers; the resource utilization rate comparison unit is used to compare the resource utilization rate of multiple node servers with the least number of assigned tasks to determine the minimum value of resource utilization rate; the node server determination unit , which is used to select the node server corresponding to the lowest value of resource utilization as the node server with the least number of assigned tasks.
服务器主要通过中央处理器对视频图像任务进行处理,则资源利用率对比单元在对比已分配任务数量均最少的多个节点服务器的资源利用率的高低时,优选通过对比各服务器中的中央处理器各核心的使用率来确定资源利用率最低的节点服务器。The server mainly processes video image tasks through the central processing unit, and the resource utilization rate comparison unit preferably compares the resource utilization rates of multiple node servers with the least number of assigned tasks by comparing the central processing units in each server. The utilization rate of each core is used to determine the node server with the lowest resource utilization.
任务数量比对单元和资源利用率对比单元可以采用现有的任何比较数量大小的方法来分别确定已分配任务数量的最小值和资源利用率的最低值,这里不再一一赘述。The task quantity comparing unit and the resource utilization comparing unit may adopt any existing quantity comparison method to respectively determine the minimum value of the allocated task quantity and the minimum resource utilization rate, which will not be repeated here.
通过以上的描述可以看出,在向各服务器分配任务时,通过负载均衡的原则对任务进行分配,可以根据服务器集群中各服务器的使用情况,在分配任务时,对服务器集群中的各个服务器进行统一的管理和分配。From the above description, it can be seen that when assigning tasks to each server, the tasks are assigned based on the principle of load balancing. According to the usage of each server in the server cluster, when assigning tasks, each server in the server cluster can be assigned. Unified management and distribution.
为了根据服务器的负载情况向各服务器分配处理的任务,中心服务器通过设置任务添加模块和任务删除模块以及节点服务器设置的任务反馈模块来实时掌握各服务器的负载情况。中心服务器具体包括:任务添加模块,用于查找视频图像任务对应的节点服务器的任务列表,在任务列表的已分配任务数量中添加视频图像任务;任务删除模块,用于当接收到计算单元节点端发送的视频图像任务已完成的信息时,将任务列表的已分配任务数量中视频图像任务删除;In order to allocate processing tasks to each server according to the load of the server, the central server grasps the load of each server in real time by setting a task adding module and a task deleting module and a task feedback module set by the node server. The central server specifically includes: a task adding module, which is used to find the task list of the node server corresponding to the video image task, and adds the video image task to the number of assigned tasks in the task list; When sending the information that the video image task has been completed, delete the video image task from the assigned task number in the task list;
节点服务器包括:任务反馈模块,用于当视频图像任务完成时,通过视频图像任务对应的计算单元节点端向中心服务器发送任务已完成的信息,任务已完成的信息携带有对应的计算单元所在节点服务器的标识。The node server includes: a task feedback module, which is used to send information that the task has been completed to the central server through the computing unit node corresponding to the video image task when the video image task is completed, and the information that the task has been completed carries the node where the corresponding computing unit is located The server's ID.
每个任务列表中记录有每个节点服务器的标识和节点服务器的标识对应的节点服务器已分配任务数量,当中心服务器确定由已分配任务数量最少的节点服务器处理视频图像任务时,中心服务器就会在已分配任务数量最少的节点服务器的任务列表中添加视频图像任务,从而对已分配任务数量最少的节点服务器的任务列表进行更新。The identification of each node server and the number of tasks assigned to the node server corresponding to the identification of the node server are recorded in each task list. When the central server determines that the node server with the least number of assigned tasks processes the video image task, the central server will The video image task is added to the task list of the node server with the smallest number of assigned tasks, thereby updating the task list of the node server with the smallest number of assigned tasks.
当接收到计算单元节点端发送的视频图像任务已完成的信息时,任务删除模块根据视频图像任务已完成的信息中记录的节点服务器的标识,查询到节点服务器的标识对应的节点服务器的任务列表,在节点服务器的标识对应的节点服务器的任务列表中将任务列表的已分配任务数量中视频图像任务删除,从而对任务列表进行更新。When receiving the information that the video image task sent by the node end of the computing unit has been completed, the task deletion module queries the node server’s task list corresponding to the node server’s identification according to the identification of the node server recorded in the information that the video image task has been completed In the task list of the node server corresponding to the identifier of the node server, the video image task is deleted from the number of assigned tasks in the task list, so as to update the task list.
在接收到视频图像任务已完成的信息后,中心服务器会通过通用任务接口向用户发送视频图像任务完成的消息,并通知用户处理完毕后视频图像任务处理结果的存储地址,使用户可以通过存储地址获取视频图像任务的处理结果。After receiving the information that the video image task has been completed, the central server will send the message that the video image task is completed to the user through the general task interface, and notify the user of the storage address of the video image task processing result after the processing is completed, so that the user can pass the storage address Get the processing result of the video image task.
通过以上的描述可以看出,通过预设的任务列表记录各服务器所分配的任务数量,就可以实时的确定各服务器的负载情况,从而根据服务器的负载情况向各服务器分配处理的任务,可以使服务器的负载更加均衡。From the above description, it can be seen that by recording the number of tasks assigned by each server in the preset task list, the load of each server can be determined in real time, and the processing tasks can be allocated to each server according to the load of the server, which can make Server load is more balanced.
随着视频处理和视频图像处理技术的发展,用户对视频图像任务的处理需求越来越多,分布式计算资源分配系统中现有设置的计算单元不能对用户发出的某些任务类型的视频图像任务进行有效处理时,就需要在中心服务器中设置新的计算单元来对这些视频图像任务进行处理,所以通过在中心服务器设置指令获取模块、中心端设置模块和发送模块,以及在节点服务器设置节点端设置模块和连接建立模块在中心服务器和节点服务器中设置新的计算单元,中心服务器具体包括:指令获取模块,用于获取计算单元添加指令,计算单元添加指令携带有计算单元数据包;中心端设置模块,用于根据计算单元数据包,设置对应的计算单元中心端,并为设置的计算单元中心端分配端口;发送模块,用于将计算单元数据包和分配给计算单元中心端的端口的端口号发送给多个节点服务器。With the development of video processing and video image processing technology, users have more and more processing requirements for video image tasks, and the existing computing units in the distributed computing resource allocation system cannot process video images of certain types of tasks sent by users. When the task is effectively processed, it is necessary to set up a new computing unit in the central server to process these video image tasks. The terminal setting module and the connection establishment module set a new computing unit in the central server and the node server, and the central server specifically includes: an instruction acquisition module, which is used to obtain a computing unit adding instruction, and the computing unit adding instruction carries a computing unit data packet; the central terminal The setting module is used to set the corresponding computing unit central terminal according to the computing unit data packet, and allocate ports for the set computing unit central terminal; the sending module is used to assign the computing unit data packet and the port assigned to the port of the computing unit central terminal The number is sent to multiple node servers.
节点服务器具体包括:节点端设置模块,用于接收到计算单元数据包后,设置对应的计算单元节点端;连接建立模块,用于通过端口号对应的端口为设置的计算单元节点端与计算单元中心端建立连接。The node server specifically includes: a node end setting module, which is used to set the corresponding computing unit node end after receiving the computing unit data packet; The center establishes a connection.
当分布式计算资源分配系统的维护人员发现某种类型的视频图像任务由分布式计算资源分配系统中现有的所有计算单元处理时所耗费的处理时间均较长,不能向用户及时反馈处理结果时,就会根据这种类型的视频图像任务的处理特点,确定可以有效处理该种类型的视频图像任务的计算单元,然后获取处理该种类型的视频图像任务的计算单元的计算单元数据包,并通过获取到的计算单元数据包形成计算单元添加指令,将形成的计算单元添加指令发送给中心服务器,以使中心服务器根据计算单元数据包,设置对应的计算单元中心端。When the maintenance personnel of the distributed computing resource allocation system find that a certain type of video image task is processed by all the existing computing units in the distributed computing resource allocation system, the processing time is relatively long, and the processing results cannot be fed back to the user in time When, according to the processing characteristics of this type of video image task, determine the computing unit that can effectively process this type of video image task, and then obtain the computing unit data packet of the computing unit processing this type of video image task, And form a computing unit adding instruction through the obtained computing unit data packet, and send the formed computing unit adding instruction to the central server, so that the central server can set the corresponding computing unit central terminal according to the computing unit data packet.
分布式计算资源分配系统的维护人员可以从系统后台服务器中获取处理该种类型的视频图像任务的计算单元的计算单元数据包,也可以通过网络下载处理该种类型的视频图像任务的计算单元的计算单元数据包,还可以通过现有的任何数据包获取方式,来获取计算单元数据包,这里不再一一赘述。The maintenance personnel of the distributed computing resource allocation system can obtain the computing unit data package of the computing unit processing this type of video image task from the system background server, or download the computing unit data packet of the computing unit processing this type of video image task through the network. The computing unit data packet can also be acquired through any existing data packet acquisition method, which will not be repeated here.
当然,中心服务器中设置的各计算单元的计算单元中心端也可以对所处理的视频图像任务的处理时间进行记录,并在任务处理完成时,将视频图像任务的处理时间和任务已完成的信息一起反馈给中心服务器,中心服务器可以将视频图像任务的处理时间与预设的处理时间阈值进行对比,当该视频图像任务的处理时间大于预设的处理时间阈值时,说明当前的计算单元不适合对这种类型的视频图像任务进行处理,那么中心服务器会将该视频图像任务的任务类型与其他的计算单元进行关联,使得下一次对这种类型的视频图像任务进行处理时,可用其他的计算单元进行处理,当中心服务器确定当前设置的计算单元均不适合对这种类型的视频图像任务进行处理时,就会从系统后台服务器中确定并获取处理该种类型的视频图像任务的计算单元的计算单元数据包,并通过获取到的计算单元数据包形成计算单元添加指令,将形成的计算单元添加指令发送给中心服务器,以使中心服务器根据计算单元数据包,设置对应的计算单元中心端。Of course, the computing unit central end of each computing unit provided in the central server can also record the processing time of the processed video image task, and when the task processing is completed, the processing time of the video image task and the information that the task has been completed Feedback to the central server together, the central server can compare the processing time of the video image task with the preset processing time threshold, when the processing time of the video image task is greater than the preset processing time threshold, it means that the current computing unit is not suitable To process this type of video image task, the central server will associate the task type of the video image task with other computing units, so that the next time this type of video image task is processed, other computing units can be used When the central server determines that none of the currently set computing units are suitable for processing this type of video image task, it will determine and obtain the information of the computing unit processing this type of video image task from the system background server. Computing unit data packets, and form computing unit adding instructions through the obtained computing unit data packets, and send the formed computing unit adding instructions to the central server, so that the central server can set corresponding computing unit central terminals according to the computing unit data packets.
通过以上的描述可以看出,中心服务器根据获取计算单元添加指令设置计算单元,而且添加计算单元的过程简单方便快捷,使用灵活方便,而且在添加新的计算单元后,可以减少视频图像任务的处理时间并可以及时对任务进行处理。From the above description, it can be seen that the central server sets the computing unit according to the command to add the computing unit, and the process of adding the computing unit is simple, convenient and fast, flexible and convenient to use, and after adding the new computing unit, the processing of video image tasks can be reduced time and can handle tasks in a timely manner.
随着视频处理和视频图像处理技术的发展,分布式计算资源分配系统中现有设置的一些计算单元所处理的视频图像任务越来越少,甚至有些计算单元已不再被使用,但是这些不再被使用的计算单元仍然会占用中心服务器和节点服务器的资源造成服务器资源的浪费,所以通过在中心服务器中设置删除指令获取模块、计算单元中心端卸载模块和删除指令下发模块以及节点服务器中设置的计算单元节点端卸载模块来卸载不再使用的计算单元。中心服务器具体包括:删除指令获取模块,用于获取计算单元删除指令,计算单元删除指令中携带有计算单元的标识;计算单元中心端卸载模块,用于根据计算单元删除指令中携带的计算单元的标识,卸载计算单元的标识对应的计算单元中心端;删除指令下发模块,用于向多个节点服务器发送计算单元删除指令。With the development of video processing and video image processing technology, some computing units in the distributed computing resource allocation system handle fewer and fewer video image tasks, and even some computing units are no longer used, but these are not The computing unit that is used again will still occupy the resources of the central server and node server, resulting in a waste of server resources. Therefore, by setting the deletion command acquisition module in the central server, the computing unit central end Set the computing unit node-side unloading module to uninstall computing units that are no longer in use. The central server specifically includes: a deletion instruction acquisition module, which is used to obtain a computing unit deletion instruction, and the computing unit deletion instruction carries the identification of the computing unit; The identification is to unload the computing unit central terminal corresponding to the identification of the computing unit; the deletion command sending module is used to send a computing unit deletion command to multiple node servers.
节点服务器包括:计算单元节点端卸载模块,用于当接收到计算单元删除指令时,根据计算单元删除命令中的计算单元的标识,卸载计算单元的标识对应的计算单元节点端。The node server includes: a computing unit node end unloading module, configured to uninstall the computing unit node corresponding to the computing unit identifier according to the computing unit identifier in the computing unit deletion command when receiving the computing unit deletion command.
当分布式计算资源分配系统的维护人员发现某种类型的视频图像任务长时间不再处理任务时,就会向中心服务器发送携带有计算单元的标识的计算单元删除指令,使得中心服务器和节点服务器删除计算单元的标识对应的计算单元。When the maintenance personnel of the distributed computing resource allocation system find that a certain type of video image task is no longer processed for a long time, they will send a computing unit deletion command carrying the identification of the computing unit to the central server, so that the central server and the node server Delete the computing unit corresponding to the identifier of the computing unit.
当然,中心服务器也可以对最近一次向计算单元分配视频图像任务的任务分配时间进行记录,并会周期性的判断最近一次向计算单元分配视频图像任务的任务分配时间与当前时间的时间间隔是否达到了计算单元的删除时间,如果达到了计算单元的删除时间,那么就向中心服务器发送携带有可以删除的计算单元的标识的计算单元删除指令,使得中心服务器和节点服务器删除计算单元的标识对应的计算单元。Of course, the central server can also record the task assignment time of the latest video image task assignment to the computing unit, and periodically judge whether the time interval between the latest task assignment time of the video image task assignment to the computing unit and the current time reaches If the deletion time of the computing unit is reached, if the deletion time of the computing unit is reached, then a computing unit deletion command carrying the identifier of the computing unit that can be deleted is sent to the central server, so that the central server and the node server delete the corresponding computing unit.
分布式计算资源分配系统的维护人员可以通过中心服务器的输入设备或者与中心服务器连接的系统后台服务器的输入设备向中心服务器发送计算单元添加指令和计算单元删除指令。The maintenance personnel of the distributed computing resource allocation system can send computing unit addition instructions and computing unit deletion instructions to the central server through the input device of the central server or the input device of the system background server connected to the central server.
通过以上的描述可以看出,对于不在使用的计算单元,可以根据任务处理的需要进行删除,使用灵活方便,而且卸载计算单元方便快捷,使得中心服务器和节点服务器中的资源可以被合理运用,也不会影响到其它处理单元对任务的处理过程。From the above description, it can be seen that the computing units that are not in use can be deleted according to the needs of task processing. Processing of tasks by other processing units will not be affected.
实施例2Example 2
参见图3,本实施例提供了另一种分布式计算资源分配系统,以CUMN架构的形式表现出来,分布式计算资源分配系统包括中心(Center)、用户(User)、模块(Module)、模型(Model)和节点(Node)5个部分。不同的业务需求对于数据的处理方式也会不同,本系统采用模型来定义不同的计算方式,有建模之意。例如,Hadoop采用的就是Map/Reduce计算模型。CUMN架构规定每种计算模型由一个或几个中心和若干个节点组成。框架中的模型是“热插拔”的,可以在运行状态下任意添加或者删除模型,这大大的提升了分布式计算资源分配系统的扩展性和兼容性。Referring to Fig. 3, this embodiment provides another distributed computing resource allocation system, which is expressed in the form of CUMN architecture. The distributed computing resource allocation system includes a center (Center), a user (User), a module (Module), a model (Model) and node (Node) 5 parts. Different business requirements will have different processing methods for data. This system uses models to define different calculation methods, which means modeling. For example, Hadoop uses the Map/Reduce computing model. The CUMN architecture stipulates that each computing model consists of one or several centers and several nodes. The models in the framework are "hot-swappable", and models can be added or deleted arbitrarily in the running state, which greatly improves the scalability and compatibility of the distributed computing resource allocation system.
模型只是一种计算方式,具体计算什么本方案将其定义为模块,可以想象成一种算法。例如采用网格实现视频结构化、视频浓缩、视频检索等,每一种功能都是一个模块。网格模型中只是定义了采用Map/Reduce的方式拆分作业,但拆分后如何计算则是模块的功能。在本方案中,模块也是“热插拔”设计,可以动态的添加和删除模块,为系统扩容、升级提供了便利。The model is just a calculation method. What is the specific calculation? This solution defines it as a module, which can be imagined as an algorithm. For example, the grid is used to realize video structure, video concentration, video retrieval, etc., and each function is a module. The grid model only defines the splitting of jobs by means of Map/Reduce, but how to calculate after splitting is the function of the module. In this solution, the modules are also "hot-swappable" design, which can dynamically add and delete modules, which provides convenience for system expansion and upgrade.
在本方案中的所有模型是可以独立成为产品的,例如网格。在访问系统时可以采用框架的公有接口,也可以采用模型自身提供的私有接口。本方案将与用户交互的部分定义为U,大写的U代表框架公共的接口,小写的u代表模型私有接口。框架公有接口有时无法满足需求时,可以采用模型的私有接口。All models in this program can be independently produced, such as grids. When accessing the system, you can use the public interface of the framework, or you can use the private interface provided by the model itself. In this solution, the part that interacts with the user is defined as U, the uppercase U represents the public interface of the framework, and the lowercase u represents the private interface of the model. When the public interface of the framework cannot meet the requirements sometimes, the private interface of the model can be used.
CUMN架构使得分布式计算资源分配系统成为了通用的框架,实际的计算则是由模型和模块实现的。视频、图像分析的特点如下:The CUMN architecture makes the distributed computing resource allocation system a general framework, and the actual computing is realized by models and modules. The characteristics of video and image analysis are as follows:
数据量大:视频监控、交通卡口等每个城市每天产生几十T到几P的数据不等,公安处理案件是也会圈定几十路摄像头的视频需要快速分析;Large amount of data: Every city, such as video surveillance and traffic checkpoints, generates tens of terabytes to several petabytes of data every day. When handling cases, the police will delineate the videos of dozens of cameras and need to quickly analyze them;
数据类型与处理方式多:历史视频、图像分析,实时视频、图像分析。There are many data types and processing methods: historical video, image analysis, real-time video, image analysis.
模型是一种计算的处理模型,例如主流的Hadoop的MapReduce就是一种处理大数据的计算模型。但在视频应用领域,由于数据类型的多样性(视频、图像、目标特征)使得某一种计算模型无法适应全部数据类型,例如Hadoop适合处理一个较大的文件(GB~TB级别),一张只有几百KB级别的图片就无能为力了。同时不同的业务对于数据处理的响应速度要求也不同(如图像处理、人脸比对要快速返回,视频检索可以慢一点出结果),为了应对多种数据与业务类型,本方案提出了模型的概念。在本方案中,模型是处理某一种数据或业务的计算方法,所有的计算模型都定义了中心端(用小写c)和节点端(用小写c),模型的中心端由计算框架的中心(用大写C)管理,并为其分配唯一的端口号用于与模型的节点端连接;模型的节点端有框架的节点端(用大写的N)管理。A model is a computational processing model. For example, the mainstream Hadoop MapReduce is a computational model for processing big data. However, in the field of video applications, due to the diversity of data types (videos, images, and target features), a certain computing model cannot adapt to all data types. For example, Hadoop is suitable for processing a large file (GB-TB level). There is nothing that can be done with pictures of only a few hundred KB. At the same time, different businesses have different requirements for the response speed of data processing (for example, image processing and face comparison should be returned quickly, and video retrieval can be slower to produce results). In order to cope with various data and business types, this solution proposes a model concept. In this solution, a model is a calculation method for processing a certain data or business. All calculation models define a central terminal (in lowercase c) and a node terminal (in lowercase c). The central terminal of the model is defined by the center of the calculation framework (Uppercase C) management, and assign a unique port number for connection with the node side of the model; the node side of the model is managed by the node side of the framework (with uppercase N).
假设模型1将每个任务切分后给每个节点计算;模型2是每个节点计算一个任务;模型3是所有计算必须要将数据加载到内存中;这样就比较好理解为什么有模型的概念了。Assume that model 1 divides each task and calculates it for each node; model 2 calculates a task for each node; model 3 means that all calculations must load data into memory; this makes it easier to understand why there is a concept of model up.
本方案采用模型热插拔模式,可以根据需要在线添加模型,新添加的模型的中心端被自动部署到中心节点服务器并启动,模型中心端启动是被分配一个端口号,模型中心端程序监听该端口号,等待模型的节点端连接;模型的节点段程序会被自动部署到框架管辖范围的全部节点服务器中,启动模型节点端程序时会被告知模型中心端监听的端口号,这样就完成了模型的自动添加与部署。This solution adopts the model hot-swapping mode, and models can be added online as needed. The central end of the newly added model is automatically deployed to the central node server and started. The model central end is started by being assigned a port number, and the model central end program monitors the Port number, waiting for the connection of the node side of the model; the node segment program of the model will be automatically deployed to all node servers within the jurisdiction of the framework. Automatic addition and deployment of models.
该方案中心服务器和节点服务器时n:N模式,即大量的节点服务器与不少于一个的中心服务器,中心服务器大于1个可以避免单点故障问题;每个中心服务器需要部署本方案框架的中心管理软件,每个节点服务器需要部署本方案框架的节点管理软件;中心管理软件负责管理所有模型的中心端程序(包括为中心端程序分配唯一的端口),节点管理软件负责管理所有模型的节点端程序。The central server and node server of this scheme are in n:N mode, that is, a large number of node servers and no less than one central server, and the central server is more than one to avoid the problem of single point of failure; each central server needs to deploy the center of this scheme framework Management software, each node server needs to deploy the node management software of this solution framework; the center management software is responsible for managing the center-end programs of all models (including assigning a unique port for the center-end program), and the node management software is responsible for managing the node ends of all models program.
模型定义的数据如何利用集群工作,但具体要干什么本方案提出了模块的概念。为了提升模型的利用率,这样对于模型来说无论如何计算流程都是相同,只是加载的模块不同而已(例如图像增强与图像旋转)。有了模块的概念,模型不在关心自己是做什么的了,只是根据需要调用不同的模块处理,具体怎么处理则不关心。这样,根据增加新业务只需要增加一个模块即可,这也是本方案称之为框架的原因。The model defines how to use the cluster to work, but what to do specifically. This solution proposes the concept of modules. In order to improve the utilization rate of the model, the calculation process is the same for the model anyway, but the loaded modules are different (such as image enhancement and image rotation). With the concept of modules, the model no longer cares about what it does, but just calls different modules for processing according to needs, and does not care about how to handle it. In this way, only one module needs to be added according to the addition of new services, which is why this solution is called a framework.
模型管理中的C和N不仅实现了自动部署的功能,同时会主动的搜集各个模型的资源使用状态,从而实现集群内资源的统一负载均衡。各个模型在调度资源的时候都要参看集群内的统一负载,将任务下发到负载相对较低的节点上运行。C and N in model management not only realize the function of automatic deployment, but also actively collect the resource usage status of each model, so as to realize the unified load balancing of resources in the cluster. Each model must refer to the unified load in the cluster when scheduling resources, and send tasks to nodes with relatively low loads to run.
传统方式将多种计算模型部署在同一套集群内,由于模型之间没有通信,模型自认为节点A比较空闲,殊不知节点A的资源已经被其他模型使用满了。In the traditional way, multiple computing models are deployed in the same cluster. Since there is no communication between the models, the model thinks that node A is relatively idle, but it does not know that the resources of node A have been fully used by other models.
分布式计算资源分配系统对外提供了一套使用接口,让用户使用框架内的所有模块。为了提升本方案的友好性,用户无须知道模型和模块的概念,通过接口能够看到框架内的有哪些公司的那些算法,并且利用该算法实现自己的请求。这就要求框架能够自动识别算法的所属的模型和主干,这点在上文已经说明,此处不再赘述。The distributed computing resource allocation system provides a set of user interfaces to allow users to use all modules in the framework. In order to improve the friendliness of this solution, users do not need to know the concept of models and modules, and can see which companies' algorithms are in the framework through the interface, and use the algorithms to realize their own requests. This requires the framework to automatically identify the model and backbone of the algorithm, which has been explained above and will not be repeated here.
这点也相比于简单的堆叠多种计算模型集群来的更友好,因为多种计算模型集群的接口方式、语言都可能不同,不仅使用不方便,同时每次增加新的模型都需要外的开发工作,而本方案则只需要开发一次,增加模型接口也是不变的。This is also more friendly than simply stacking multiple computing model clusters, because the interface methods and languages of multiple computing model clusters may be different, which is not only inconvenient to use, but also requires an external interface every time a new model is added. development work, but this solution only needs to be developed once, and the addition of model interfaces remains unchanged.
分布式计算资源分配系统可以对视频图像任务进行以下计算处理:The distributed computing resource allocation system can perform the following computing processing on video image tasks:
图4是对视频图像任务进行历史数据计算的计算单元节点端示意图,历史数据计算是本框架中默认集成的计算模型,它研究如何把一个需要非常巨大的计算能力才能解决的问题分成许多小的部分,然后把这些部分分配给许多计算机进行处理,最后把这些计算结果综合起来得到最终结果,对应本方案中网格计算模型。网格计算模型还有一个特性是充分利用闲置计算能力,即使在不添加新的计算能力的前提下,通常也能有效地提高物理机硬件利用率。Figure 4 is a schematic diagram of the node side of the computing unit that performs historical data calculation for video image tasks. Historical data calculation is the default integrated computing model in this framework. It studies how to divide a problem that requires a very large computing power to be solved into many small ones. part, and then assign these parts to many computers for processing, and finally combine these calculation results to obtain the final result, which corresponds to the grid computing model in this scheme. Another characteristic of the grid computing model is to make full use of idle computing power, even without adding new computing power, it can usually effectively improve the utilization of physical machine hardware.
图5是对视频图像任务进行内存内计算的计算单元节点端示意图,内存内计算(In-MemoryComputing)是本框架默认集成的计算模型,实质上就是CPU直接从内存而非硬盘上读取数据,并对数据进行计算、分析。此项技术是对传统数据处理方式的一种加速,是实现智能海量数据分析和实施数据分析的关键应用技术。Figure 5 is a schematic diagram of the computing unit node side for in-memory computing of video image tasks. In-Memory Computing is the default integrated computing model of this framework. In essence, the CPU directly reads data from the memory instead of the hard disk. And calculate and analyze the data. This technology is an acceleration of traditional data processing methods, and is a key application technology for realizing intelligent mass data analysis and implementing data analysis.
内存内计算非常适合处理海量的数据,以及需要实时获得结果的数据。比如可以将常驻人口库的人脸特征、被盗车辆信息等各方面的数据一次性地保存在内存里,并在此基础上进行数据的分析。当需要做快速的数据分析,内存计算就能够快速的按照需求完成。In-memory computing is very suitable for processing massive amounts of data and data that requires real-time results. For example, the face features of the resident population database, stolen vehicle information and other data can be stored in the memory at one time, and data analysis can be performed on this basis. When fast data analysis is required, in-memory computing can be quickly completed as required.
在计算实时性方面,为了降低数据搬移带来的开销,内存采用数据常驻内存的方法。同时,每个计算节点只计算本节点内存的数据,基本保证系统响应周期内的0数据加载过程。为了提升计算吞吐量,每个节点尽可能只是计算本节点内存储的数据,最大限度的降低节点间的数据搬移开销。本方案的数据采用冗余的存储策略,在节点异常时其他节点可以自动的加载副本保证系统的可用性。由于适合内存计算的数据量先对不太大,一般在几十G到几百G左右,采用副本存储的方式不会给存储系统带来压力。In terms of real-time computing, in order to reduce the overhead caused by data movement, the memory adopts the method of data resident memory. At the same time, each computing node only calculates the data stored in its own memory, which basically guarantees zero data loading process within the system response cycle. In order to improve the computing throughput, each node only calculates the data stored in the node as much as possible, so as to minimize the data movement overhead between nodes. The data in this solution adopts a redundant storage strategy. When a node is abnormal, other nodes can automatically load a copy to ensure the availability of the system. Since the amount of data suitable for in-memory computing is not too large, generally around tens of gigabytes to hundreds of gigabytes, the use of copy storage will not bring pressure to the storage system.
图6是对视频图像任务进行实时数据并行计算的计算单元节点端示意图,实时数据并行计算是本框架默认集成的计算模型,实时分析视频(图片)流,例如视频布防。实时视频(图片)分析专注于解决实时视频流中各种事件的及时提取。Figure 6 is a schematic diagram of the computing unit node side for real-time data parallel computing for video image tasks. Real-time data parallel computing is the default integrated computing model of this framework, which analyzes video (picture) streams in real time, such as video arming. Real-time video (picture) analysis focuses on the timely extraction of various events in real-time video streams.
图7是对视频图像任务进行高并发小块数据计算的计算单元节点端示意图,高并发小块数据计算是本框架默认集成的计算模型,与并行计算处理的数据和方式不同,系统中还存在着海量的小块数据需要处理。这些数据处理的时效性要求较高,同时存在着高并发的可能,典型的应用是图像处理。本方案为此类计算设计了一致性哈希的调度、均衡的处理方式,既能保证数据的及时处理,又能解决高并发请求问题。Figure 7 is a schematic diagram of the node side of the computing unit that performs high-concurrency small-block data calculation for video image tasks. High-concurrency small-block data calculation is the default integrated calculation model of this framework. It is different from the data and methods of parallel computing processing. There are still There are huge amounts of small pieces of data that need to be processed. The timeliness requirements for these data processing are high, and there is a possibility of high concurrency at the same time. A typical application is image processing. This solution designs consistent hash scheduling and balanced processing methods for such calculations, which can not only ensure timely data processing, but also solve the problem of high concurrent requests.
本实施例提出的分布式计算资源分配系统,可以对计算节点中的物理资源进行监控与动态分配,每个计算节点都会安装框架的节点后台程序,该程序会获取计算节点的属性信息,包括CPU主频、CPU核数、CPU线程数、内存总量、操作系统类型、网络带宽等,并汇报给框架的中心。同时,节点程序还会定时(默认为1秒,可配置)向中心汇报节点CPU、内存、网络的使用率,为中心调配资源提供参考数据。The distributed computing resource allocation system proposed in this embodiment can monitor and dynamically allocate the physical resources in the computing nodes. Each computing node will install the node background program of the framework, and the program will obtain the attribute information of the computing node, including the CPU Main frequency, number of CPU cores, number of CPU threads, total memory, type of operating system, network bandwidth, etc., and report to the center of the framework. At the same time, the node program will also periodically (default is 1 second, configurable) report the utilization rate of the node's CPU, memory, and network to the center, providing reference data for the center to allocate resources.
用户每次提交的请求在框架中定义为作业,作业被拆分成多个分片在多个物理机中执行,每个分片框架定义为任务。框架的调度最小单元为任务,框架对于物理资源的切分为CPU核(包括超线程),每个任务以独立的进程运行在一个CPU核上(操作系统虽然会将进程在多核中切换,但是从资源的使用情况上只是一个核的计算能力)Each request submitted by the user is defined as a job in the frame, and the job is split into multiple fragments to be executed on multiple physical machines, and each fragment frame is defined as a task. The smallest unit of framework scheduling is a task. The framework divides physical resources into CPU cores (including hyperthreading), and each task runs on a CPU core as an independent process (although the operating system will switch processes between multiple cores, but In terms of resource usage, it is only the computing power of one core)
分布式计算资源分配系统,可以运行在物理机和虚拟机中,同时可以运行在Windows、Linux、Unix操作系统中。物理机范围从大型机、小型机、服务器、个人PC、笔记本、平板电脑、智能手机等计算设备,同时还会利用物理机中集成的显卡、协处理器加速运算。The distributed computing resource allocation system can run on physical machines and virtual machines, and can also run on Windows, Linux, and Unix operating systems. Physical machines range from computing devices such as mainframes, minicomputers, servers, personal PCs, notebooks, tablet computers, and smart phones. At the same time, integrated graphics cards and coprocessors in physical machines are used to accelerate calculations.
下面对分布式计算资源分配系统中各个部分的连接关系和所实现的功能作进一步的描述。The connection relationship and realized functions of each part in the distributed computing resource allocation system will be further described below.
分布式计算资源分配系统包括:中心(以下称中心服务器)、计算节点(以下称节点服务器)、计算单元中心端和计算单元节点端。The distributed computing resource allocation system includes: a center (hereinafter referred to as a central server), a computing node (hereinafter referred to as a node server), a computing unit central terminal and a computing unit node terminal.
中心服务器,用于通过设置的任务接口接收用户发送的待处理任务,并根据待处理任务的任务类型,将待处理任务发送给处理相应任务的计算单元中心端;在接收到计算单元中心端发送的资源分配请求时,根据当前分布式计算集群中各节点服务器的处理任务数量和负载情况,确定分配的节点服务器,并将分配好的节点服务器反馈给计算单元中心端,并根据本次资源分配的结果,更新预设的任务分配列表;当接收到计算单元中心端反馈的任务释放请求时,根据任务释放请求中携带的节点服务器的标识,更新任务列表,并通过任务接口向用户发送任务已完成信息;当根据任务处理的需要,需要添加新的计算单元时,中心服务器会获取到计算单元添加指令,根据计算单元添加指令中携带的计算单元数据包,安装新添加的计算单元中心端,并向新添加的计算单元中心端分配计算单元标识,然后将计算单元标识和数据包发送到各节点服务器,使得各节点服务器可以安装该新添加的计算单元节点端,并向该新添加的计算单元中心端分配端口,以建立计算单元中心端和计算单元节点端的连接。当某种计算单元不再使用而需要删除该计算单元时,中心服务器会获取到计算单元删除指令,根据计算单元删除指令中携带的计算单元标识,删除计算单元标识对应的计算单元中心端,然后向各节点服务器发送携带有计算单元标识的计算单元删除命令,使得各节点服务器删除计算单元标识对应的计算单元。The central server is used to receive the pending task sent by the user through the set task interface, and send the pending task to the computing unit central terminal that processes the corresponding task according to the task type of the pending task; upon receiving the task, the central terminal of the computing unit sends When requesting resource allocation, the allocated node servers are determined according to the number of processing tasks and load conditions of each node server in the current distributed computing cluster, and the allocated node servers are fed back to the computing unit center, and according to the current resource allocation As a result, the preset task allocation list is updated; when the task release request fed back by the computing unit center is received, the task list is updated according to the node server identification carried in the task release request, and the task is sent to the user through the task interface. Complete the information; when a new computing unit needs to be added according to the needs of task processing, the central server will obtain the computing unit addition command, and install the newly added computing unit central terminal according to the computing unit data package carried in the computing unit addition command, And assign the computing unit identification to the central end of the newly added computing unit, and then send the computing unit identification and data packets to each node server, so that each node server can install the newly added computing unit node end, and add to the newly added computing unit Ports are assigned to the central end of the unit to establish a connection between the central end of the computing unit and the node end of the computing unit. When a computing unit is no longer in use and needs to be deleted, the central server will obtain the computing unit deletion instruction, and delete the computing unit central terminal corresponding to the computing unit identifier according to the computing unit identifier carried in the computing unit deletion instruction, and then A computing unit deletion command carrying the computing unit identifier is sent to each node server, so that each node server deletes the computing unit corresponding to the computing unit identifier.
计算单元中心端,设置在中心服务器中,用于接收中心服务器发送的待处理任务,在接收到待处理任务后,向中心服务器发送资源分配请求,接收中心服务器发送的资源分配信息,并将待处理的任务通过预设的端口发送到资源分配信息中指定的节点服务器中与该计算单元中心端对应的计算单元节点端进行任务的处理;当接收到计算单元节点端发送的任务完成请求时,向中心服务器发送携带的节点服务器的标识的任务释放请求,以更新中心服务器中预存的任务分配列表;当新添加计算单元时,新添加的计算单元中心端会通过中心服务器分配的端口监测各节点服务器安装的计算单元节点端的连接建立指令,在接收到各节点服务器中计算单元节点端发送的连接建立指令后,建立与各节点服务器中计算单元节点端的连接。The central terminal of the computing unit is set in the central server and is used to receive the pending tasks sent by the central server. After receiving the pending tasks, it sends a resource allocation request to the central server, receives the resource allocation information sent by the central server, and The processed task is sent to the node server specified in the resource allocation information through the preset port to the computing unit node corresponding to the computing unit center to process the task; when the task completion request sent by the computing unit node is received, Send a task release request carrying the identity of the node server to the central server to update the pre-stored task assignment list in the central server; when a new computing unit is added, the central end of the newly added computing unit will monitor each node through the port assigned by the central server The connection establishment instruction of the computing unit node end installed on the server, after receiving the connection establishment instruction sent by the computing unit node end of each node server, establishes the connection with the computing unit node end of each node server.
节点服务器,用于对分配的任务进行处理,并周期性的向中心服务器反馈当前节点服务器中的负载情况,使得中心服务器可以根据各节点服务器的负载情况,向各节点服务器分配任务;当新添加计算单元时,会根据中心服务器发送的数据包,安装新添加的计算单元的计算单元节点端,并向安装的计算单元节点端分配中心服务器发送的计算单元标识,并告知新添加的计算单元的节点端在与具有相同计算单元标识的计算单元中心端建立连接时的端口,使得新添加的计算单元节点端通过指定的端口;当删除计算单元时,节点服务器根据中心服务器发送的计算单元删除命令中携带的计算单元标识,删除相应的计算单元节点端。The node server is used to process the assigned tasks, and periodically feed back the load status of the current node server to the central server, so that the central server can assign tasks to each node server according to the load status of each node server; When computing a unit, it will install the computing unit node of the newly added computing unit according to the data packet sent by the central server, and distribute the computing unit identifier sent by the central server to the installed computing unit node, and inform the newly added computing unit of The port of the node terminal when establishing a connection with the central terminal of the computing unit with the same identification of the computing unit, so that the node side of the newly added computing unit passes through the specified port; when deleting the computing unit, the node server deletes the computing unit according to the command sent by the central server The computing unit identifier carried in , delete the corresponding computing unit node.
计算单元节点端,设置在各节点服务器中,用于对分配的任务进行处理,在任务处理完毕时,向相应的计算单元中心端发送任务完成信息;在添加新的计算单元的计算单元节点端时,新添加的计算单元节点端通过节点服务器指定的端口与计算单元中心端建立连接。The computing unit node end is set in each node server and is used to process the assigned tasks. When the task processing is completed, the task completion information is sent to the corresponding computing unit central end; at the computing unit node end where a new computing unit is added , the newly added computing unit node side establishes a connection with the computing unit central side through the port specified by the node server.
本实施例提供的分布式计算资源分配系统,通过设置的中心服务器接收用户发送的视频图像任务,根据服务器集群中多个节点服务器当前的任务数量和负载情况,将视频图像任务通过中心服务器设置的计算单元中心端分配给服务器集群中任一节点服务器中与该计算单元中心端对应的计算单元节点端中,通过视频图像任务对应的计算单元节点端对视频图像任务进行处理;通过在中心服务器中设置对视频图像任务进行分配的计算单元中心端,以及在服务器集群的每个服务器中设置可以处理相应类型视频图像任务的计算单元节点端,从而可以使用一个服务器集群的多个服务器就可以处理不同类型的视频图像任务,无需部署多个服务器集群才能满足视频图像任务的处理需求,提高了服务器集群的利用率,降低了服务器集群的建设成本,而且通过一个服务器集群的多个服务器处理不同类型的视频图像任务,提高了服务器集群中服务器资源的利用率,避免了资源的浪费。The distributed computing resource allocation system provided in this embodiment receives the video image task sent by the user through the set central server, and according to the current task quantity and load situation of multiple node servers in the server cluster, the video image task is set by the central server. The central end of the computing unit is assigned to any node in the server cluster, and in the computing unit node end corresponding to the central end of the computing unit in the server, the video image task is processed through the computing unit node end corresponding to the video image task; Set up the computing unit central end that distributes video image tasks, and set the computing unit node end that can handle corresponding types of video image tasks in each server of the server cluster, so that multiple servers in one server cluster can be used to process different type of video image tasks, it is not necessary to deploy multiple server clusters to meet the processing requirements of video image tasks, improve the utilization of server clusters, reduce the construction cost of server clusters, and process different types of video images through multiple servers in a server cluster The video image task improves the utilization rate of server resources in the server cluster and avoids waste of resources.
实施例3Example 3
参见图8,本实施例提供一种任务处理方法,可以由上述实施例中的分布式计算资源分配系统实施,该任务处理方法包括以下步骤:Referring to FIG. 8, this embodiment provides a task processing method, which can be implemented by the distributed computing resource allocation system in the above embodiment, and the task processing method includes the following steps:
步骤800、中心服务器接收用户发送的视频图像任务,根据视频图像任务的类型,以及多个节点服务器当前的视频图像任务数量和负载情况,将视频图像任务通过计算单元中心端分配给对应的节点服务器;Step 800, the central server receives the video image task sent by the user, and distributes the video image task to the corresponding node server through the central end of the computing unit according to the type of the video image task, and the current video image task quantity and load situation of multiple node servers ;
步骤802、节点服务器接收到视频图像任务后,通过视频图像任务对应的计算单元节点端对视频图像任务进行处理。Step 802: After receiving the video image task, the node server processes the video image task through the computing unit node corresponding to the video image task.
相关技术中,对任务进行分配的服务器会根据接收的视频图像任务的任务类型的不同,通过不同的接口来接收用户发送过来的不同种类的任务,所以在服务器的前期开发时,需要针对不同的任务类型来开发出不同的接口,为了减少开发的接口的数量,中心服务器预设有用于获取户发送的具有不同任务类型的视频图像任务的通用任务接口,用户发送的视频图像任务可以通过通用任务接口被中心服务器获取。In related technologies, the server that allocates tasks will receive different types of tasks sent by users through different interfaces according to the different task types of video image tasks received, so in the early development of the server, it is necessary to target different tasks Different types of tasks are used to develop different interfaces. In order to reduce the number of developed interfaces, the central server is preset with a general task interface for obtaining video image tasks with different task types sent by users. The video image tasks sent by users can be passed through the general task The interface is obtained by the central server.
通过以上的描述可以看出,通过设置的通用任务接口,接收用户发送的具有不同任务类型的任务,无需对各个计算单元分别设计接口,提高了软件的开发速度。It can be seen from the above description that through the set general task interface, tasks with different task types sent by the user are received, and there is no need to design interfaces for each computing unit separately, which improves the development speed of the software.
相关技术中,对任务进行分配的服务器在分配任务时,只会随机将任务分配给服务器集群中的任意服务器中,会导致服务器集群中各服务器的负载不均衡,从而降低服务器集群的任务处理能力,为了保证各节点服务器的负载均衡,中心服务器根据视频图像任务的类型,以及多个节点服务器当前的视频图像任务数量和负载情况,将视频图像任务通过计算单元中心端分配给对应的节点服务器步骤包括以下步骤(1)至步骤(3):In related technologies, when assigning tasks, the server that allocates tasks will only randomly assign the tasks to any server in the server cluster, which will lead to unbalanced load of each server in the server cluster, thereby reducing the task processing capacity of the server cluster , in order to ensure the load balance of each node server, the central server assigns the video image task to the corresponding node server through the central end of the computing unit according to the type of video image task, and the current number and load of multiple node servers. Including the following steps (1) to (3):
(1)中心服务器根据当前服务器集群中各节点服务器的已分配任务数量,确定已分配任务数量最少的节点服务器;(1) The central server determines the node server with the least number of assigned tasks according to the number of assigned tasks of each node server in the current server cluster;
(2)中心服务器选择任务数量最少的节点服务器作为视频图像任务对应的节点服务器;(2) The central server selects the node server with the least number of tasks as the node server corresponding to the video image task;
(3)当有多个节点服务器的已分配任务数量均最少时,中心服务器选择多个节点服务器中资源利用率最低的节点服务器作为视频图像任务对应的节点服务器,资源利用率包括以下至少一种服务器硬件资源的利用率:中央处理器、内存和网络带宽;其中,节点服务器周期性向中心服务器反馈当前的资源利用率。(3) When there are multiple node servers with the least number of assigned tasks, the central server selects the node server with the lowest resource utilization rate among the multiple node servers as the node server corresponding to the video image task, and the resource utilization rate includes at least one of the following Utilization of server hardware resources: central processing unit, memory and network bandwidth; among them, the node server periodically feeds back the current resource utilization to the central server.
通过以上的描述可以看出,在向各服务器分配任务时,通过负载均衡的原则对任务进行分配,可以根据服务器集群中各服务器的使用情况,在分配任务时,对服务器集群中的各个服务器进行统一的管理和分配。From the above description, it can be seen that when assigning tasks to each server, the tasks are assigned based on the principle of load balancing. According to the usage of each server in the server cluster, when assigning tasks, each server in the server cluster can be assigned. Unified management and distribution.
为了根据服务器的负载情况向各服务器分配处理的任务,中心服务器根据视频图像任务的类型,以及多个节点服务器当前的视频图像任务数量和负载情况,将视频图像任务通过计算单元中心端分配给对应的节点服务器步骤还包括包括以下步骤(4)至步骤(6):In order to allocate processing tasks to each server according to the load of the server, the central server assigns the video image tasks to the corresponding nodes through the central end of the computing unit according to the type of video image tasks, and the current number and load of multiple node servers. The node server step also includes the following steps (4) to (6):
(4)中心服务器查找视频图像任务对应的节点服务器的任务列表,在任务列表的已分配任务数量中添加视频图像任务;(4) the central server searches for the task list of the node server corresponding to the video image task, and adds the video image task in the assigned task quantity of the task list;
(5)当接收到计算单元节点端发送的视频图像任务已完成的信息时,中心服务器将任务列表的已分配任务数量中视频图像任务删除;(5) When receiving the information that the video image task sent by the computing unit node end has been completed, the central server deletes the video image task from the assigned task quantity in the task list;
(6)节点服务器当视频图像任务完成时,通过视频图像任务对应的计算单元节点端向中心服务器发送任务已完成的信息,任务已完成的信息携带有对应的计算单元所在节点服务器的标识。(6) Node server When the video image task is completed, the node terminal of the computing unit corresponding to the video image task sends the information that the task has been completed to the central server, and the information that the task has been completed carries the identification of the node server where the corresponding computing unit is located.
通过以上的描述可以看出,通过预设的任务列表记录各服务器所分配的任务数量,就可以实时的确定各服务器的负载情况,从而根据服务器的负载情况向各服务器分配处理的任务,可以使服务器的负载更加均衡。From the above description, it can be seen that by recording the number of tasks assigned by each server in the preset task list, the load of each server can be determined in real time, and the processing tasks can be allocated to each server according to the load of the server, which can make Server load is more balanced.
随着视频处理和视频图像处理技术的发展,用户对视频图像任务的处理需求越来越多,分布式计算资源分配系统中现有设置的计算单元不能对用户发出的某些任务类型的视频图像任务进行有效处理时,就需要在中心服务器中设置新的计算单元来对这些视频图像任务进行处理,所以为了添加计算单元,任务处理方法还包括以下步骤(1)至步骤(5):With the development of video processing and video image processing technology, users have more and more processing requirements for video image tasks, and the existing computing units in the distributed computing resource allocation system cannot process video images of certain types of tasks sent by users. When tasks are effectively processed, new computing units need to be set in the central server to process these video image tasks, so in order to add computing units, the task processing method also includes the following steps (1) to (5):
(1)中心服务器获取计算单元添加指令,计算单元添加指令携带有计算单元数据包;(1) The central server obtains the instruction to add the computing unit, and the instruction to add the computing unit carries the data packet of the computing unit;
(2)中心服务器根据计算单元数据包,设置对应的计算单元中心端,并为设置的计算单元中心端分配端口;(2) The central server sets the corresponding computing unit central end according to the computing unit data packet, and allocates ports for the set computing unit central end;
(3)中心服务器将计算单元数据包和分配给计算单元中心端的端口的端口号发送给多个节点服务器;(3) the central server sends the computing unit data packet and the port number assigned to the port of the computing unit central end to a plurality of node servers;
(4)节点服务器接收到计算单元数据包后,设置对应的计算单元节点端;(4) After receiving the computing unit data packet, the node server sets the corresponding computing unit node end;
(5)节点服务器通过端口号对应的端口为设置的计算单元节点端与计算单元中心端建立连接。(5) The node server establishes a connection between the set computing unit node end and the computing unit central end through the port corresponding to the port number.
通过以上的描述可以看出,中心服务器根据获取计算单元添加指令设置计算单元,而且添加计算单元的过程简单方便快捷,使用灵活方便,而且在添加新的计算单元后,可以减少视频图像任务的处理时间并可以及时对任务进行处理。From the above description, it can be seen that the central server sets the computing unit according to the command to add the computing unit, and the process of adding the computing unit is simple, convenient and fast, flexible and convenient to use, and after adding the new computing unit, the processing of video image tasks can be reduced time and can handle tasks in a timely manner.
随着视频处理和视频图像处理技术的发展,分布式计算资源分配系统中现有设置的一些计算单元所处理的视频图像任务越来越少,甚至有些计算单元已不再被使用,但是这些不再被使用的计算单元仍然会占用中心服务器和节点服务器的资源造成服务器资源的浪费,为了合理使用中心服务器和节点服务器的资源,任务处理方法还包括以下步骤(1)至步骤(4):With the development of video processing and video image processing technology, some computing units in the distributed computing resource allocation system handle fewer and fewer video image tasks, and even some computing units are no longer used, but these are not The computing unit used again will still occupy the resources of the central server and the node server and cause a waste of server resources. In order to reasonably use the resources of the central server and the node server, the task processing method also includes the following steps (1) to (4):
(1)中心服务器获取计算单元删除指令,计算单元删除指令中携带有计算单元的标识;(1) The central server obtains the computing unit deletion instruction, and the computing unit deletion command carries the identification of the computing unit;
(2)中心服务器根据计算单元删除指令中携带的计算单元的标识,卸载计算单元的标识对应的计算单元中心端;(2) The central server unloads the central end of the computing unit corresponding to the computing unit identifier according to the computing unit identifier carried in the computing unit deletion instruction;
(3)中心服务器向多个节点服务器发送计算单元删除指令。(3) The central server sends computing unit deletion instructions to multiple node servers.
(4)当接收到计算单元删除指令时,节点服务器根据计算单元删除命令中的计算单元的标识,卸载计算单元的标识对应的计算单元节点端。(4) When receiving the computing unit deletion instruction, the node server uninstalls the computing unit node end corresponding to the computing unit identifier according to the computing unit identifier in the computing unit deletion command.
通过以上的描述可以看出,对于不在使用的计算单元,可以根据任务处理的需要进行删除,使用灵活方便,而且卸载计算单元方便快捷,使得中心服务器和节点服务器中的资源可以被合理运用,也不会影响到其它处理单元对任务的处理过程。From the above description, it can be seen that the computing units that are not in use can be deleted according to the needs of task processing. Processing of tasks by other processing units will not be affected.
本实施例提供的任务处理方法,通过设置的中心服务器接收用户发送的视频图像任务,根据服务器集群中多个节点服务器当前的任务数量和负载情况,将视频图像任务通过中心服务器设置的计算单元中心端分配给服务器集群中任一节点服务器中与该计算单元中心端对应的计算单元节点端中,通过视频图像任务对应的计算单元节点端对视频图像任务进行处理;通过在中心服务器中设置对视频图像任务进行分配的计算单元中心端,以及在服务器集群的每个服务器中设置可以处理相应类型视频图像任务的计算单元节点端,从而可以使用一个服务器集群的多个服务器就可以处理不同类型的视频图像任务,无需部署多个服务器集群才能满足视频图像任务的处理需求,提高了服务器集群的利用率,降低了服务器集群的建设成本,而且通过一个服务器集群的多个服务器处理不同类型的视频图像任务,提高了服务器集群中服务器资源的利用率,避免了资源的浪费。The task processing method provided by this embodiment receives the video image task sent by the user through the set central server, and sends the video image task through the computing unit center set by the central server according to the current task quantity and load situation of multiple node servers in the server cluster. end assigned to any node in the server cluster in the computing unit node end corresponding to the computing unit center end in the server cluster, the video image task is processed through the computing unit node end corresponding to the video image task; by setting the video image task in the central server The central end of the computing unit that distributes image tasks, and the computing unit node end that can handle the corresponding type of video image tasks are set in each server of the server cluster, so that multiple servers in a server cluster can be used to process different types of video For image tasks, there is no need to deploy multiple server clusters to meet the processing requirements of video image tasks, which improves the utilization of server clusters, reduces the construction cost of server clusters, and processes different types of video image tasks through multiple servers in a server cluster , improve the utilization rate of server resources in the server cluster, and avoid waste of resources.
本发明实施例所提供的任务处理方法的计算机程序产品,包括存储了程序代码的计算机可读存储介质,程序代码包括的指令可用于执行前面方法实施例中的方法,具体实现可参见方法实施例,在此不再赘述。The computer program product of the task processing method provided by the embodiments of the present invention includes a computer-readable storage medium storing program codes, and the instructions included in the program codes can be used to execute the methods in the foregoing method embodiments. For specific implementation, please refer to the method embodiments , which will not be repeated here.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods may be implemented in other ways. The device embodiments described above are only illustrative. For example, the division of units is only a logical function division, and there may be other division methods in actual implementation. In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-OnlyMemory)、随机存取存储器(RAM,RandomAccessMemory)、磁碟或者光盘等各种可以存储程序代码的介质。If the functions are realized in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods in various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-OnlyMemory), random access memory (RAM, RandomAccessMemory), magnetic disk or optical disk and other media that can store program codes.
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应所述以权利要求的保护范围为准。The above is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Anyone skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present invention. Should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims (12)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510544350.9A CN105049268B (en) | 2015-08-28 | 2015-08-28 | distributed computing resource allocation system and task processing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510544350.9A CN105049268B (en) | 2015-08-28 | 2015-08-28 | distributed computing resource allocation system and task processing method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105049268A true CN105049268A (en) | 2015-11-11 |
CN105049268B CN105049268B (en) | 2018-12-28 |
Family
ID=54455490
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510544350.9A Active CN105049268B (en) | 2015-08-28 | 2015-08-28 | distributed computing resource allocation system and task processing method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105049268B (en) |
Cited By (40)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106131185A (en) * | 2016-07-13 | 2016-11-16 | 腾讯科技(深圳)有限公司 | The processing method of a kind of video data, Apparatus and system |
CN106815070A (en) * | 2016-12-30 | 2017-06-09 | 中国科学院计算技术研究所 | A kind of high-performance calculation frame method and system for graphical analysis |
CN106897149A (en) * | 2017-03-01 | 2017-06-27 | 深圳市博信诺达经贸咨询有限公司 | Process the method and system of big data |
CN107015767A (en) * | 2017-04-06 | 2017-08-04 | 南京三宝弘正视觉科技有限公司 | A kind of NAS device, distributed processing system(DPS) and method |
CN107145384A (en) * | 2017-04-17 | 2017-09-08 | 广州孩教圈信息科技股份有限公司 | Method for allocating tasks and system |
CN107241577A (en) * | 2017-07-03 | 2017-10-10 | 华中科技大学 | A kind of processing system for video based on collaborative group mechanism |
CN107329834A (en) * | 2017-07-04 | 2017-11-07 | 北京百度网讯科技有限公司 | Method and apparatus for performing calculating task |
CN107343045A (en) * | 2017-07-04 | 2017-11-10 | 北京百度网讯科技有限公司 | Cloud computing system and cloud computing method and device for controlling server |
CN107622117A (en) * | 2017-09-15 | 2018-01-23 | 广东欧珀移动通信有限公司 | Image processing method and device, computer equipment, computer-readable storage medium |
CN107832150A (en) * | 2017-11-07 | 2018-03-23 | 清华大学 | A kind of calculating task dynamic partition strategy |
CN107864215A (en) * | 2017-11-21 | 2018-03-30 | 中国科学院上海微系统与信息技术研究所 | Peer-to-peer network file system, access control/management method/system and terminal |
CN107968836A (en) * | 2017-12-06 | 2018-04-27 | 北京星河星云信息技术有限公司 | A kind of task distribution method and device |
CN108023957A (en) * | 2017-12-07 | 2018-05-11 | 温州中壹技术服务有限公司 | A kind of collaborative computer network management system for the processing of information Quick Acquisition |
CN108062243A (en) * | 2016-11-08 | 2018-05-22 | 杭州海康威视数字技术股份有限公司 | Generation method, task executing method and the device of executive plan |
CN108229260A (en) * | 2016-12-21 | 2018-06-29 | 杭州海康威视系统技术有限公司 | A kind of identity information checking method and system |
CN109144690A (en) * | 2018-07-06 | 2019-01-04 | 麒麟合盛网络技术股份有限公司 | task processing method and device |
CN109194919A (en) * | 2018-09-19 | 2019-01-11 | 图普科技(广州)有限公司 | A kind of camera data flow distribution system, method and its computer storage medium |
CN109615869A (en) * | 2018-12-29 | 2019-04-12 | 重庆集诚汽车电子有限责任公司 | Distributed locomotive real-time intelligent is violating the regulations to capture reporting system |
CN109639840A (en) * | 2019-02-25 | 2019-04-16 | 网宿科技股份有限公司 | A kind of data processing method and edge calculations system based on edge calculations |
CN109670932A (en) * | 2018-09-25 | 2019-04-23 | 平安科技(深圳)有限公司 | Credit data calculate method, apparatus, system and computer storage medium |
CN109714439A (en) * | 2019-02-25 | 2019-05-03 | 网宿科技股份有限公司 | Data processing method and system based on edge calculations |
CN110192393A (en) * | 2016-11-06 | 2019-08-30 | 微软技术许可有限责任公司 | Large-scale real-time video analysis |
CN110209496A (en) * | 2019-05-20 | 2019-09-06 | 中国平安财产保险股份有限公司 | Task sharding method, device and sliced service device based on data processing |
CN110308944A (en) * | 2019-05-15 | 2019-10-08 | 广州供电局有限公司 | Configuration file processing method, system, computer equipment and storage medium |
CN110460682A (en) * | 2019-09-18 | 2019-11-15 | 深圳市网心科技有限公司 | A data processing method, device, system and storage medium |
CN110489224A (en) * | 2018-05-15 | 2019-11-22 | 北京京东尚科信息技术有限公司 | A kind of method and apparatus of task schedule |
CN110764892A (en) * | 2019-10-22 | 2020-02-07 | 北京字节跳动网络技术有限公司 | Task processing method, device and computer readable storage medium |
CN110941493A (en) * | 2019-11-21 | 2020-03-31 | 中国联合网络通信集团有限公司 | Task scheduling method and device |
CN111212264A (en) * | 2019-12-27 | 2020-05-29 | 中移(杭州)信息技术有限公司 | Image processing method and device based on edge calculation and storage medium |
WO2020211718A1 (en) * | 2019-04-18 | 2020-10-22 | 阿里巴巴集团控股有限公司 | Data processing method, apparatus and device |
CN111898546A (en) * | 2020-07-31 | 2020-11-06 | 深圳市商汤科技有限公司 | Data processing method and device, electronic equipment and storage medium |
CN112905350A (en) * | 2021-03-22 | 2021-06-04 | 北京市商汤科技开发有限公司 | Task scheduling method and device, electronic equipment and storage medium |
CN113176940A (en) * | 2021-03-29 | 2021-07-27 | 新华三信息安全技术有限公司 | Data flow splitting method and device and network equipment |
CN113342665A (en) * | 2021-06-17 | 2021-09-03 | 北京百度网讯科技有限公司 | Task allocation method and device, electronic equipment and computer readable medium |
CN113393367A (en) * | 2021-07-08 | 2021-09-14 | 北京百度网讯科技有限公司 | Image processing method, apparatus, device and medium |
CN113590335A (en) * | 2021-08-11 | 2021-11-02 | 南京大学 | A Task Load Balancing Method Based on Packet and Delay Estimation in Tree Edge Networks |
CN114554079A (en) * | 2022-01-11 | 2022-05-27 | 浙江大华技术股份有限公司 | Intelligent service management method and intelligent service management system |
CN114710680A (en) * | 2022-03-16 | 2022-07-05 | 中星电子股份有限公司 | Distributed server cluster for video coding and decoding |
CN114968507A (en) * | 2021-04-27 | 2022-08-30 | 中移互联网有限公司 | Image processing task scheduling method and device |
CN116156121A (en) * | 2023-02-20 | 2023-05-23 | 北京贝思科技术有限公司 | Resource allocation method and system for distributed collaborative computing cluster system, computer readable storage medium and electronic device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103516807A (en) * | 2013-10-14 | 2014-01-15 | 中国联合网络通信集团有限公司 | Cloud computing platform server load balancing system and method |
CN103677994A (en) * | 2012-09-19 | 2014-03-26 | 中国银联股份有限公司 | Distributed data processing system, device and method |
CN103941662A (en) * | 2014-03-19 | 2014-07-23 | 华存数据信息技术有限公司 | Task scheduling system and method based on cloud computing |
CN104850576A (en) * | 2015-03-02 | 2015-08-19 | 武汉烽火众智数字技术有限责任公司 | Fast characteristic extraction system based on mass videos |
-
2015
- 2015-08-28 CN CN201510544350.9A patent/CN105049268B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103677994A (en) * | 2012-09-19 | 2014-03-26 | 中国银联股份有限公司 | Distributed data processing system, device and method |
CN103516807A (en) * | 2013-10-14 | 2014-01-15 | 中国联合网络通信集团有限公司 | Cloud computing platform server load balancing system and method |
CN103941662A (en) * | 2014-03-19 | 2014-07-23 | 华存数据信息技术有限公司 | Task scheduling system and method based on cloud computing |
CN104850576A (en) * | 2015-03-02 | 2015-08-19 | 武汉烽火众智数字技术有限责任公司 | Fast characteristic extraction system based on mass videos |
Cited By (56)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106131185A (en) * | 2016-07-13 | 2016-11-16 | 腾讯科技(深圳)有限公司 | The processing method of a kind of video data, Apparatus and system |
CN106131185B (en) * | 2016-07-13 | 2020-03-17 | 腾讯科技(深圳)有限公司 | Video data processing method, device and system |
CN110192393A (en) * | 2016-11-06 | 2019-08-30 | 微软技术许可有限责任公司 | Large-scale real-time video analysis |
CN108062243A (en) * | 2016-11-08 | 2018-05-22 | 杭州海康威视数字技术股份有限公司 | Generation method, task executing method and the device of executive plan |
CN108062243B (en) * | 2016-11-08 | 2022-01-04 | 杭州海康威视数字技术股份有限公司 | Execution plan generation method, task execution method and device |
CN108229260B (en) * | 2016-12-21 | 2020-12-29 | 杭州海康威视系统技术有限公司 | Identity information verification method and system |
CN108229260A (en) * | 2016-12-21 | 2018-06-29 | 杭州海康威视系统技术有限公司 | A kind of identity information checking method and system |
CN106815070A (en) * | 2016-12-30 | 2017-06-09 | 中国科学院计算技术研究所 | A kind of high-performance calculation frame method and system for graphical analysis |
CN106897149A (en) * | 2017-03-01 | 2017-06-27 | 深圳市博信诺达经贸咨询有限公司 | Process the method and system of big data |
CN107015767A (en) * | 2017-04-06 | 2017-08-04 | 南京三宝弘正视觉科技有限公司 | A kind of NAS device, distributed processing system(DPS) and method |
CN107015767B (en) * | 2017-04-06 | 2020-06-23 | 南京三宝弘正视觉科技有限公司 | NAS device, distributed processing system and method |
CN107145384A (en) * | 2017-04-17 | 2017-09-08 | 广州孩教圈信息科技股份有限公司 | Method for allocating tasks and system |
CN107241577B (en) * | 2017-07-03 | 2019-08-13 | 华中科技大学 | A kind of processing system for video based on collaborative group mechanism |
CN107241577A (en) * | 2017-07-03 | 2017-10-10 | 华中科技大学 | A kind of processing system for video based on collaborative group mechanism |
CN107329834A (en) * | 2017-07-04 | 2017-11-07 | 北京百度网讯科技有限公司 | Method and apparatus for performing calculating task |
CN107343045B (en) * | 2017-07-04 | 2021-03-19 | 北京百度网讯科技有限公司 | Cloud computing system and cloud computing method and device for controlling server |
CN107343045A (en) * | 2017-07-04 | 2017-11-10 | 北京百度网讯科技有限公司 | Cloud computing system and cloud computing method and device for controlling server |
WO2019052355A1 (en) * | 2017-09-15 | 2019-03-21 | Oppo广东移动通信有限公司 | Image processing method, computer device, and computer readable storage medium |
CN107622117A (en) * | 2017-09-15 | 2018-01-23 | 广东欧珀移动通信有限公司 | Image processing method and device, computer equipment, computer-readable storage medium |
CN107832150A (en) * | 2017-11-07 | 2018-03-23 | 清华大学 | A kind of calculating task dynamic partition strategy |
CN107864215B (en) * | 2017-11-21 | 2020-10-20 | 中国科学院上海微系统与信息技术研究所 | Peer-to-peer network file system, access control/management method/system, and terminal |
CN107864215A (en) * | 2017-11-21 | 2018-03-30 | 中国科学院上海微系统与信息技术研究所 | Peer-to-peer network file system, access control/management method/system and terminal |
CN107968836A (en) * | 2017-12-06 | 2018-04-27 | 北京星河星云信息技术有限公司 | A kind of task distribution method and device |
CN107968836B (en) * | 2017-12-06 | 2020-12-18 | 北京微网通联股份有限公司 | Task distribution method and device |
CN108023957A (en) * | 2017-12-07 | 2018-05-11 | 温州中壹技术服务有限公司 | A kind of collaborative computer network management system for the processing of information Quick Acquisition |
CN110489224A (en) * | 2018-05-15 | 2019-11-22 | 北京京东尚科信息技术有限公司 | A kind of method and apparatus of task schedule |
CN109144690A (en) * | 2018-07-06 | 2019-01-04 | 麒麟合盛网络技术股份有限公司 | task processing method and device |
CN109194919A (en) * | 2018-09-19 | 2019-01-11 | 图普科技(广州)有限公司 | A kind of camera data flow distribution system, method and its computer storage medium |
CN109670932A (en) * | 2018-09-25 | 2019-04-23 | 平安科技(深圳)有限公司 | Credit data calculate method, apparatus, system and computer storage medium |
CN109670932B (en) * | 2018-09-25 | 2024-02-20 | 平安科技(深圳)有限公司 | Credit data accounting method, apparatus, system and computer storage medium |
CN109615869A (en) * | 2018-12-29 | 2019-04-12 | 重庆集诚汽车电子有限责任公司 | Distributed locomotive real-time intelligent is violating the regulations to capture reporting system |
CN109639840A (en) * | 2019-02-25 | 2019-04-16 | 网宿科技股份有限公司 | A kind of data processing method and edge calculations system based on edge calculations |
CN109714439A (en) * | 2019-02-25 | 2019-05-03 | 网宿科技股份有限公司 | Data processing method and system based on edge calculations |
WO2020211718A1 (en) * | 2019-04-18 | 2020-10-22 | 阿里巴巴集团控股有限公司 | Data processing method, apparatus and device |
CN110308944A (en) * | 2019-05-15 | 2019-10-08 | 广州供电局有限公司 | Configuration file processing method, system, computer equipment and storage medium |
CN110209496A (en) * | 2019-05-20 | 2019-09-06 | 中国平安财产保险股份有限公司 | Task sharding method, device and sliced service device based on data processing |
WO2021051839A1 (en) * | 2019-09-18 | 2021-03-25 | 深圳市网心科技有限公司 | Data processing method, apparatus and system and storage medium |
CN110460682A (en) * | 2019-09-18 | 2019-11-15 | 深圳市网心科技有限公司 | A data processing method, device, system and storage medium |
CN110764892A (en) * | 2019-10-22 | 2020-02-07 | 北京字节跳动网络技术有限公司 | Task processing method, device and computer readable storage medium |
CN110941493A (en) * | 2019-11-21 | 2020-03-31 | 中国联合网络通信集团有限公司 | Task scheduling method and device |
CN111212264A (en) * | 2019-12-27 | 2020-05-29 | 中移(杭州)信息技术有限公司 | Image processing method and device based on edge calculation and storage medium |
CN111898546A (en) * | 2020-07-31 | 2020-11-06 | 深圳市商汤科技有限公司 | Data processing method and device, electronic equipment and storage medium |
CN111898546B (en) * | 2020-07-31 | 2022-02-18 | 深圳市商汤科技有限公司 | Data processing method and device, electronic equipment and storage medium |
CN112905350A (en) * | 2021-03-22 | 2021-06-04 | 北京市商汤科技开发有限公司 | Task scheduling method and device, electronic equipment and storage medium |
CN113176940A (en) * | 2021-03-29 | 2021-07-27 | 新华三信息安全技术有限公司 | Data flow splitting method and device and network equipment |
CN114968507A (en) * | 2021-04-27 | 2022-08-30 | 中移互联网有限公司 | Image processing task scheduling method and device |
CN114968507B (en) * | 2021-04-27 | 2023-08-15 | 中移互联网有限公司 | Image processing task scheduling method and device |
CN113342665A (en) * | 2021-06-17 | 2021-09-03 | 北京百度网讯科技有限公司 | Task allocation method and device, electronic equipment and computer readable medium |
CN113342665B (en) * | 2021-06-17 | 2023-10-20 | 北京百度网讯科技有限公司 | Task allocation method and device, electronic equipment and computer readable medium |
CN113393367A (en) * | 2021-07-08 | 2021-09-14 | 北京百度网讯科技有限公司 | Image processing method, apparatus, device and medium |
CN113393367B (en) * | 2021-07-08 | 2022-06-03 | 北京百度网讯科技有限公司 | Image processing method, apparatus, device and medium |
CN113590335A (en) * | 2021-08-11 | 2021-11-02 | 南京大学 | A Task Load Balancing Method Based on Packet and Delay Estimation in Tree Edge Networks |
CN113590335B (en) * | 2021-08-11 | 2023-11-17 | 南京大学 | Task load balancing method based on grouping and delay estimation in tree edge network |
CN114554079A (en) * | 2022-01-11 | 2022-05-27 | 浙江大华技术股份有限公司 | Intelligent service management method and intelligent service management system |
CN114710680A (en) * | 2022-03-16 | 2022-07-05 | 中星电子股份有限公司 | Distributed server cluster for video coding and decoding |
CN116156121A (en) * | 2023-02-20 | 2023-05-23 | 北京贝思科技术有限公司 | Resource allocation method and system for distributed collaborative computing cluster system, computer readable storage medium and electronic device |
Also Published As
Publication number | Publication date |
---|---|
CN105049268B (en) | 2018-12-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105049268A (en) | Distributed computing resource allocation system and task processing method | |
CN108431796B (en) | Distributed resource management system and method | |
US10873623B2 (en) | Dynamically modifying a cluster of computing nodes used for distributed execution of a program | |
CN103092698B (en) | Cloud computing application automatic deployment system and method | |
CN110941481A (en) | Resource scheduling method, device and system | |
CN103036946B (en) | A kind of method and system processing file backup task for cloud platform | |
CN109684074B (en) | Physical machine resource allocation method and terminal equipment | |
CN111385114A (en) | VNF service instantiation method and device | |
US11249790B1 (en) | Scheduling usage of oversubscribed computing resources | |
CN110706148B (en) | Face image processing method, device, equipment and storage medium | |
CN115033340B (en) | A host selection method and related device | |
US20200272526A1 (en) | Methods and systems for automated scaling of computing clusters | |
US12143312B2 (en) | On-demand resource capacity in a serverless function-as-a-service infrastructure | |
CN114296891A (en) | Task scheduling method, system, computing device, storage medium and program product | |
Saravanakumar et al. | An Efficient On-Demand Virtual Machine Migration in Cloud Using Common Deployment Model. | |
CN114598706A (en) | Elastic scaling method of storage system based on serverless function | |
CN114546587A (en) | A method for expanding and shrinking capacity of online image recognition service and related device | |
US10348814B1 (en) | Efficient storage reclamation for system components managing storage | |
CN118051166A (en) | Storage processing method and related device | |
CN117827365A (en) | Port allocation method, device, equipment, medium and product for application container | |
CN116069493A (en) | Data processing method, device, equipment and readable storage medium | |
CN114489985A (en) | Data processing method, device and storage medium | |
CN114237902A (en) | Service deployment method and device, electronic equipment and computer readable medium | |
CN113934525A (en) | Hadoop cluster task scheduling method based on positive and negative feedback load scheduling algorithm | |
WO2024148864A1 (en) | Virtual machine memory adjustment method and device, non-volatile readable storage medium, and electronic device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
PP01 | Preservation of patent right | ||
PP01 | Preservation of patent right |
Effective date of registration: 20220726 Granted publication date: 20181228 |