WO2017166501A1 - 转码任务分配方法及装置 - Google Patents

转码任务分配方法及装置 Download PDF

Info

Publication number
WO2017166501A1
WO2017166501A1 PCT/CN2016/088989 CN2016088989W WO2017166501A1 WO 2017166501 A1 WO2017166501 A1 WO 2017166501A1 CN 2016088989 W CN2016088989 W CN 2016088989W WO 2017166501 A1 WO2017166501 A1 WO 2017166501A1
Authority
WO
WIPO (PCT)
Prior art keywords
transcoding task
transcoder
processing units
allocated
standard processing
Prior art date
Application number
PCT/CN2016/088989
Other languages
English (en)
French (fr)
Inventor
白茂生
吕超
祁海
魏伟
Original Assignee
乐视控股(北京)有限公司
乐视云计算有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 乐视控股(北京)有限公司, 乐视云计算有限公司 filed Critical 乐视控股(北京)有限公司
Priority to US15/246,330 priority Critical patent/US20170289558A1/en
Publication of WO2017166501A1 publication Critical patent/WO2017166501A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • H04N21/234309Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements by transcoding between formats or standards, e.g. from MPEG-2 to MPEG-4 or from Quicktime to Realvideo
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440218Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by transcoding between formats or standards, e.g. from MPEG-2 to MPEG-4

Definitions

  • the present invention relates to the field of video transcoding technology, and more particularly to a transcoding task allocation method and a transcoding task allocation device capable of implementing the transcoding task allocation method.
  • the video website converts rich video resources into a format suitable for network playback, so that users can access various video websites to watch various videos through computer terminals, mobile terminals or networked TV terminals.
  • the video website needs to establish a transcoding task, and perform corresponding transcoding tasks through its internal transcoding system for video transcoding.
  • the live broadcast system has a higher timeliness requirement than the on-demand system, and the real-time transcoding task must ensure the encoding frame rate as its lowest coding performance index, so if the existing transcoding task allocation scheme mainly for the on-demand system is applied In the live broadcast system, there may be problems of transcoding stuck and/or underutilization due to uneven allocation of transcoding resources. Therefore, how to implement different video content, different resolutions, and simple and effective allocation schemes Real-time transcoding of video with different frame rates and different bit rates has become a technical problem to be solved.
  • a transcoding task allocation method comprising:
  • the load status is set to be characterized by an occupancy ratio, where the occupancy ratio is a number of standard processing units occupied by a transcoding task processed by the transcoder in the corresponding transcoder The proportion of the total number of standard processing units;
  • the determining, by the number of standard processing units that need to be occupied by the transcoding task to be allocated includes:
  • the number of standard processing units that need to be occupied by the calibration unit of the reference transcoding task that obtains the corresponding resolution is further determined as:
  • the calculating the code rate weight according to the code rate ratio is specifically:
  • the calculating the frame rate weight according to the frame rate ratio is specifically:
  • the frame rate weight is calculated to be equal to the frame rate ratio.
  • the calibration unit is a macroblock.
  • the selection target transcoder is:
  • the target transcoder is selected according to the principle of low occupancy, wherein the low occupancy principle is to use the transcoder with the lowest current load status as the target transcoder, or to minimize the load status after the transcoding task is to be allocated.
  • the transcoder is used as the target transcoder.
  • a transcoding task assigning apparatus comprising:
  • a task obtaining module configured to obtain a transcoding task to be assigned
  • a resource occupancy determining module configured to determine a quantity of standard processing units that need to be occupied by the transcoding task to be allocated
  • a load status obtaining module configured to acquire a current load status of each transcoder, wherein the load status is set to be characterized by an occupancy ratio, where the occupancy ratio is a standard processing unit occupied by a transcoding task processed by the transcoder The amount of the corresponding proportion of the total number of standard processing units that the transcoder has;
  • a selection module configured to use the number of standard processing units and each transcoder according to the to-be-allocated transcoding task The current load state, the target transcoder is selected, wherein the selection is set such that the load state after the target transcoder increases the transcoding task to be allocated is still a normal state;
  • An allocation module configured to allocate the to-be-allocated transcoding task to the target transcoder
  • an update module configured to update a current load status of the target transcoder.
  • the resource occupancy determining module includes:
  • a basic quantity obtaining unit configured to obtain, according to the resolution of the transcoding task to be allocated, the number of standard processing units that need to be occupied by the calibration unit of the reference transcoding task of the corresponding resolution as a basic quantity
  • a code rate weight calculation unit configured to calculate a code rate ratio between a code rate corresponding to the to-be-assigned transcoding task and a code rate corresponding to the reference transcoding task, and calculate a code rate weight according to the code rate ratio;
  • a frame rate weight calculation unit configured to calculate a frame rate ratio between a frame rate corresponding to the to-be-assigned transcoding task and a frame rate corresponding to the reference transcoding task, and calculate a frame rate weight according to the frame rate ratio; as well as,
  • a resource occupation determining unit configured to calculate, according to the basic quantity, the number of calibration units included in the to-be-allocated transcoding task, and the code rate weight and the frame rate weight, that the to-be-allocated transcoding task needs to be occupied The number of standard processing units.
  • the basic quantity obtaining unit is configured to search a comparison table that reflects a correspondence between a calibration unit of a reference transcoding task of each resolution and a quantity of standard processing units that need to be occupied, and determine a reference transcoding of the corresponding resolution.
  • the frame rate weight calculation unit is specifically configured to calculate that the frame rate weight is equal to the frame rate ratio.
  • the selecting module is specifically configured to select a target transcoder according to a low occupancy principle, where the low occupancy principle is to use a transcoder with the lowest current load status as the target transcoder, or The transcoder with the lowest load state after the transcoding task is to be assigned is used as the target transcoder.
  • a transcoding task allocating apparatus comprising a memory and a processor, the memory for storing instructions for controlling the processor to operate to perform the method according to the present invention The method described on the one hand.
  • the inventors of the present invention have found that in the prior art, there is a problem that the transcoding jam and the transcoder utilization are seriously insufficient due to the uneven distribution of transcoding resources.
  • the unified measurement standard that is, the standard processing unit, measures the processing capability of the transcoder and the processing resources that the transcoding task needs to occupy, thereby realizing the effective allocation of the real-time transcoding task in a simple manner. Improve the real-time of transcoding and the utilization of each transcoder.
  • FIG. 1 is a flow chart of an embodiment of a transcoding task allocation method according to the present invention.
  • FIG. 2 is a flow chart of an embodiment of determining the number of standard processing units that need to be occupied by the transcoding task to be allocated in FIG. 1;
  • FIG. 3 is a block schematic diagram of an implementation structure of a transcoding task distribution apparatus according to the present invention.
  • FIG. 4 is a block schematic diagram of an implementation structure of the resource occupancy determining module of FIG. 3;
  • FIG. 5 is a block schematic diagram showing another embodiment of a transcoding task assigning apparatus in accordance with the present invention.
  • the present invention provides a new technical solution for ensuring transcoding timeliness of transcoding task allocation.
  • FIG. 1 is a flow chart of one embodiment of a transcoding task assignment method in accordance with the present invention.
  • the method of the invention comprises the following steps:
  • Step S101 obtaining a transcoding task to be assigned.
  • the to-be-allocated transcoding task can be a live-type real-time transcoding task, and of course, other types of transcoding tasks, such as an on-demand transcoding task.
  • Step S102 Determine the number of standard processing units that need to be occupied by the transcoding task to be allocated.
  • the standard processing unit is a unified measurement standard used in the method of the present invention.
  • the processing capability of each transcoder is calibrated by the standard processing unit on the one hand, wherein different transcoders usually have different processing. Capability; on the other hand, the standard processing unit measures the processing resources that need to be occupied by each transcoding task. In this way, the load status of each transcoder can be simply and effectively counted through a unified standard.
  • the load status is set to be characterized by an occupancy ratio, and the occupancy ratio is the proportion of the number of standard processing units occupied by the transcoding task processed by the transcoder in the total number of standard processing units of the corresponding transcoder, the proportion It can be a ratio or a percentage. For example, if a transcoder has a total of 1 million standard processing units, and all current transcoding tasks being processed by the transcoder occupy 300,000 standard processing units, then The current load status of the transcoder is 30%.
  • the standard processing unit can be defined by the processing resources required by the calibration unit of the transcoding task of the specific transcoding of the specific resolution, that is, the processing resource required for the calibration unit of the transcoding task of the specific resolution of the transcoding is calibrated to a standard.
  • the processing unit, the specific resolution is, for example but not limited to, 1080P
  • the calibration unit may be a macroblock or a frame of data, where the video encoding algorithm usually encodes each macroblock one by one in units of macroblocks. A continuous video bitstream is formed, so the calibration unit is preferably set to be a macroblock.
  • the maximum number of macroblocks of the benchmark transcoding task of the 1080P resolution that can be transcoded by each transcoder can be the sum of the available processing resources of the corresponding transcoder, and the maximum number of macroblocks can be Obtained through stress testing.
  • the number of standard processing units that need to be occupied by the calibration unit of the reference transcoding task of other resolutions can be pre-calibrated, specifically, the reference transcoding of the resolution to be calibrated simultaneously on the same transcoder can be simultaneously transcoded.
  • the ratio between the maximum number of macroblocks of the task and the maximum number of macroblocks of a particular resolution that can be transcoded at the same time determining the number of standard processing units that the calibration unit of the reference transcoding task to be calibrated needs to occupy, such as one revolution.
  • the code machine has 1 million standard processing units, and the ratio is 0.5.
  • the calibration unit of the transcoding task of the transcoding to be calibrated needs to occupy 2 standard processing units.
  • the reference transcoding task of a specific resolution and The bit rate and frame rate corresponding to the reference transcoding task of other resolutions may be the same, partially the same, or different.
  • Step S103 Acquire a current load status of each transcoder.
  • the current load status may be provided by the transcoder, or may be recorded and updated according to the assignment of the transcoding task and the completion of the transcoding task.
  • the current load status of each transcoder can be recorded in the linked list.
  • Step S104 Select a target transcoder according to the number of standard processing units to be occupied by the transcoding task to be allocated and the current load status of each transcoder, wherein the selection is set such that the target transcoder increases the transcoding to be allocated. The load status after the task is still normal.
  • the normal state is that the occupancy ratio does not exceed the set processing upper limit, and the processing upper limit is, for example, 85%.
  • the selection method may be: randomly selecting the target transcoder under the premise of satisfying the requirement; or selecting the target transcoder under the premise of satisfying the requirement, the low occupancy principle is to minimize the current load state.
  • the transcoder is used as the target transcoder, or the transcoder with the lowest load status after adding the transcoding task to be assigned is the target
  • the code machine is used to further improve the utilization rate of each transcoder; or, under the premise of meeting the requirements, the target transcoder is selected according to the priority of the transcoding task of each transcoder, that is, according to the processing of each transcoder
  • the capability sets the priority assigned transcoding task to achieve reasonable utilization of the transcoder.
  • Step S105 assigning a transcoding task to be assigned to the target transcoder.
  • Step S106 updating the current load status of the target transcoder.
  • the standard processing unit uniformly calibrates the processing capability of the transcoder and the processing resources required for the transcoding task, thereby realizing the effective allocation of the transcoding task in a simple manner, and ensuring that each transcoder can be in The normal state avoids the problem of severely uneven transcoding and transcoding.
  • a resolution corresponding to a reference transcoding task may be set, and the code rate and frame rate of the reference transcoding task with respect to the same resolution according to the code rate and the frame rate of the transcoding task to be allocated during operation.
  • the difference is calculated by the number of standard processing units that need to be occupied by the transcoding task to be allocated.
  • FIG. 2 is a specific flowchart of implementing the above step S102 based on the operation mode.
  • the foregoing determining the number of standard processing units to be allocated for the transcoding task to be allocated may further include:
  • Step S201 According to the resolution of the transcoding task to be allocated, the number of standard processing units that need to be occupied by the calibration unit of the reference transcoding task corresponding to the resolution is obtained as the basic quantity.
  • a comparison table that reflects the correspondence between the calibration unit of the reference transcoding task of each resolution and the number of standard processing units that need to be occupied may be generally found, and the calibration unit of the reference transcoding task corresponding to the resolution needs to be determined. The number of standard processing units occupied.
  • Step S202 Calculate a code rate ratio between a code rate corresponding to the transcoding task to be allocated and a code rate corresponding to the reference transcoding task, and calculate a code rate weight according to the code rate ratio.
  • Step S203 Calculate a frame rate ratio between a frame rate corresponding to the transcoding task to be allocated and a frame rate corresponding to the reference transcoding task, and calculate a frame rate weight according to the frame rate ratio.
  • the relationship between the code frame rate ratio and the frame rate weight can be based on data measured on measured data at different frame rates.
  • the fitting method may be linear fitting, polynomial fitting, parabolic fitting, and the like. According to the measured data, linear fit has more valid data, and the corresponding fitting result is that the frame rate weight is equal to the frame rate ratio.
  • Step S204 Calculate, according to the basic quantity, the number of calibration units included in the transcoding task to be allocated, and the code rate weight and the frame rate weight, the number of standard processing units that need to be occupied by the transcoding task to be allocated.
  • the number of calibration units included in the transcoding task to be allocated may be: first determining the number of calibration units of each frame of data corresponding to the resolution, and in the case that the calibration unit is a macroblock, determining the corresponding resolution first.
  • the number of macroblocks per frame data, combined with the number of frames of the transcoding task to be allocated, can be used to obtain the number of calibration units included in the transcoding task to be allocated.
  • the basic number, the number of calibration units included, the code rate weight, and the frame rate weight are multiplied to obtain the number of standard processing units that need to be occupied by the transcoding task to be allocated.
  • the content of the calibration is the number of standard processing units that need to be occupied by the reference transcoding task of each macroblock at each resolution
  • the number of macroblocks included in each frame of data at the corresponding resolution needs to be calculated, and the corresponding resolution is calculated.
  • FIG. 3 is a block schematic diagram of an implementation structure of the device in accordance with an aspect of the present invention.
  • the apparatus 300 includes a task obtaining module 301, a resource occupancy determining module 302, a load status obtaining module 303, a selecting module 304, an allocating module 305, and an updating module 306.
  • the task obtaining module 301 is configured to obtain a transcoding task to be allocated.
  • the resource occupancy determining module 302 is configured to determine the number of standard processing units that need to be occupied by the transcoding task to be allocated.
  • the load status obtaining module 303 is configured to obtain a current load status of each transcoder, where the load status is set to be characterized by an occupancy ratio, which is a standard processing occupied by a transcoding task processed by the transcoder.
  • the number of units is the proportion of the total number of standard processing units that the transcoder has.
  • the selection module 304 is configured to select a target transcoder according to the number of standard processing units that need to be occupied by the transcoding task to be allocated and the current load status of each transcoder, wherein the selection is set to increase the target transcoder The load status after the transcoding task to be allocated is still in a normal state.
  • the foregoing allocation module 305 is configured to allocate a transcoding task to be allocated to the target transcoder.
  • the update module 306 is configured to update the current load status of the target transcoder.
  • FIG. 4 is a block schematic diagram of an implementation structure of the resource occupancy determining module 302.
  • the resource occupancy determining module 302 further includes a basic quantity obtaining unit 401, a code rate weight calculating unit 402, a frame rate weight calculating unit 403, and a resource occupying determining unit 404.
  • the basic quantity obtaining unit 401 is configured to obtain, according to the resolution of the transcoding task to be allocated, the number of standard processing units that need to be occupied by the calibration unit of the reference transcoding task of the corresponding resolution as the basic quantity.
  • the code rate weight calculation unit 402 is configured to calculate a code rate ratio between a code rate corresponding to the transcoding task to be allocated and a code rate corresponding to the reference transcoding task, and calculate a code rate weight according to the code rate ratio;
  • the frame rate weight calculation unit 403 is configured to calculate a frame rate ratio between a frame rate corresponding to the transcoding task to be allocated and a frame rate corresponding to the reference transcoding task, and calculate a frame rate weight according to the frame rate ratio.
  • the resource occupancy determining unit 404 is configured to calculate, according to the basic quantity, the number of calibration units included in the to-be-assigned transcoding task, and the code rate weight and the frame rate weight, to calculate the required transcoding task to be allocated. The number of standard processing units occupied.
  • the resource occupancy determining unit 402 may be specifically configured to search for a correspondence table between the calibration unit that reflects the reference transcoding task of each resolution and the number of standard processing units that need to be occupied, and determine a reference transcoding task of the corresponding resolution.
  • the number of standard processing units that the calibration unit needs to occupy is the basic quantity.
  • the selection module 304 may be specifically configured to select a target transcoder according to the principle of low occupancy.
  • the low occupancy principle is to use the transcoder with the lowest current load status as the target transcoder, or the post transcoding task to be added.
  • the transcoder with the lowest load status is used as the target transcoder.
  • FIG. 5 is a block schematic diagram of an implementation of the apparatus in accordance with another aspect of the present invention.
  • the apparatus includes a memory 501 and a processor 502 for storing instructions for controlling the processor 502 to operate to perform the transcoding task assignment method described above.
  • the apparatus may further include an interface device 503, an input device 504, a display device 505, a communication device 506, and the like.
  • an interface device 503 an input device 504
  • a display device 505 a communication device 506, and the like.
  • the present invention may relate only to some of the devices, such as processor 502 and memory 501, and the like.
  • the communication device 506 can be wired or wirelessly communicated, for example.
  • the above interface device 503 includes, for example, a USB interface, an RS232 interface, an RS485 interface, and the like.
  • the input device 504 described above may include, for example, a touch screen, a button, and the like.
  • the display device 505 described above is, for example, a liquid crystal display, a touch display, or the like.
  • the invention can be an apparatus, method and/or computer program product.
  • the computer program product can comprise a computer readable storage medium having computer readable program instructions embodied thereon for causing a processor to implement various aspects of the present invention.
  • the computer readable storage medium can be a tangible device that can hold and store the instructions used by the instruction execution device.
  • the computer readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing.
  • Non-exhaustive list of computer readable storage media include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), Erasable Programmable Read Only Memory (EPROM or Flash), Static Random Access Memory (SRAM), Compact Disc Read-Only Memory (CD-ROM), digital A Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punched card or a raised indentation structure on which instructions are stored, and any suitable combination of the above.
  • RAM random access memory
  • ROM read-only memory
  • EPROM or Flash Erasable Programmable Read Only Memory
  • SRAM Static Random Access Memory
  • CD-ROM Compact Disc Read-Only Memory
  • DVD digital A Digital Versatile Disc
  • memory stick such as a punched card or a raised indentation structure on which instructions are stored, and any suitable combination of the above.
  • a computer readable storage medium as used herein is not to be interpreted as a transient signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (eg, a light pulse through a fiber optic cable), or through a wire The electrical signal transmitted.
  • the computer readable program instructions described herein can be downloaded from a computer readable storage medium to various computing/processing devices or downloaded to an external computer or external storage device over a network, such as the Internet, a local area network, a wide area network, and/or a wireless network.
  • the network may include copper transmission cables, fiber optic transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and/or edge servers.
  • a network adapter card or network interface in each computing/processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium in each computing/processing device .
  • Computer program instructions for performing the operations of the present invention may be assembly instructions, Instruction set architecture (ISA) instructions, machine instructions, machine related instructions, microcode, firmware instructions, state setting data, or in one or more Source code or object code written in any combination of programming languages, including object oriented programming languages such as Smalltalk, C++, etc., as well as conventional procedural programming languages, such as the "C" language or similar programming languages.
  • the computer readable program instructions can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer, partly on the remote computer, or entirely on the remote computer or server. carried out.
  • the remote computer can be connected to the user computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or can be connected to an external computer (eg Use an Internet service provider to connect via the Internet).
  • the customized electronic circuitry such as a programmable logic circuit, a Field-Programmable Gate Array (FPGA), or a programmable logic array (Programmable), is personalized by utilizing state information of computer readable program instructions.
  • Logic Array PLA
  • the electronic circuit can execute computer readable program instructions to implement various aspects of the present invention.
  • the computer readable program instructions can be provided to a general purpose computer, a special purpose computer, or a processor of other programmable data processing apparatus to produce a machine such that when executed by a processor of a computer or other programmable data processing apparatus Means for implementing the functions/acts specified in one or more of the blocks of the flowcharts and/or block diagrams.
  • the computer readable program instructions can also be stored in a computer readable storage medium that causes the computer, programmable data processing device, and/or other device to operate in a particular manner, such that the computer readable medium storing the instructions includes An article of manufacture that includes instructions for implementing various aspects of the functions/acts recited in one or more of the flowcharts.
  • the computer readable program instructions can also be loaded onto a computer, other programmable data processing device, or other device to perform a series of operational steps on a computer, other programmable data processing device or other device to produce a computer-implemented process.
  • instructions executed on a computer, other programmable data processing apparatus, or other device implement the functions/acts recited in one or more of the flowcharts and/or block diagrams.
  • each block in the flowchart or block diagram can represent a module, a program segment, or a portion of an instruction that includes one or more components for implementing the specified logical functions.
  • Executable instructions can also occur in a different order than those illustrated in the drawings. For example, two consecutive blocks may be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowcharts, and combinations of blocks in the block diagrams and/or flowcharts can be implemented in a dedicated hardware-based system that performs the specified function or function. Or it can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that implementation by hardware, implementation by software, and implementation by a combination of software and hardware are equivalent.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明公开了一种转码任务分配方法及装置,该方法包括:获得待分配转码任务;确定待分配转码任务需要占用的标准处理单元的数量;获取各转码机的当前负载状态,其中,负载状态被设置为通过占用比表征,而占用比为转码机处理的转码任务所占用的标准处理单元的数量在对应转码机具有的标准处理单元的总数中的比重;根据待分配转码任务需要占用的标准处理单元的数量及各转码机的当前负载状态,选择目标转码机,该选择被设置为使得目标转码机增加待分配转码任务后的负载状态仍为正常状态;将待分配转码任务分配至目标转码机,并更新目标转码机的当前负载状态。本发明方法及装置以简单的方式实现了转码任务的有效分配,保证实时转码任务的时效性。

Description

转码任务分配方法及装置
本申请要求在2016年03月31日提交中国专利局、申请号为201610201287.3、发明名称为“转码任务分配方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及视频转码技术领域,更具体地,涉及一种转码任务分配方法、及能够实现该种转码任务分配方法的转码任务分配装置。
背景技术
视频网站将丰富的视频资源转换成适合于网络播放的格式,从而,用户便可以通过计算机终端、移动终端或者具有联网功能的电视终端访问相应的视频网站观看各类视频。
由于不同的视频资源可能具有不同的视频格式,为了适配不同网络带宽的场景,需要将视频以不同清晰度呈现给用户。因此,视频网站需要建立转码任务,通过其内部的转码系统执行相应的转码任务进行视频转码处理。
由于直播系统相对点播系统对时效性要求较高,而且实时转码任务必须保证以编码帧率作为其最低的编码性能指标,这样,如果将现有的主要针对点播系统的转码任务分配方案应用在直播系统中,会出现因转码资源分配不均导致的转码卡顿和/或转码机利用率不足的问题,因此,如何通过简单有效的分配方案实现不同视频内容、不同分辨率、不同帧率、不同码率的视频的实时转码,已成为亟待解决的技术问题。
发明内容
本发明实施例的一个目的是提供一种转码分配的新的技术方案,以提高转码系统维持较高转码效率的能力。
根据本发明的第一方面,提供了一种转码任务分配方法,其包括:
获得待分配转码任务;
确定所述待分配转码任务需要占用的标准处理单元的数量;
获取各转码机的当前负载状态,其中,所述负载状态被设置为通过占用比表征,所述占用比为转码机处理的转码任务所占用的标准处理单元的数量在对应转码机具有的标准处理单元的总数中的比重;
根据所述待分配转码任务需要占用的标准处理单元的数量及各转码机的当前负载状态,选择目标转码机,其中,所述选择被设置为使得目标转码机增加所述待分配转码任务 后的负载状态仍为正常状态;
将所述待分配转码任务分配至所述目标转码机,并更新所述目标转码机的当前负载状态。
可选的,所述确定所述待分配转码任务需要占用的标准处理单元的数量包括:
根据所述待分配转码任务的分辨率,获得对应分辨率的基准转码任务的标定单元需要占用的标准处理单元的数量作为基本数量;
计算所述待分配转码任务对应的码率与所述基准转码任务对应的码率间的码率比值,并根据所述码率比值计算得到码率权重;
计算所述待分配转码任务对应的帧率与所述基准转码任务对应的帧率间的帧率比值,并根据所述帧率比值计算得到帧率权重;
根据所述基本数量、所述待分配转码任务包括的标定单元的个数、及所述码率权重和帧率权重,计算得到所述待分配转码任务需要占用的标准处理单元的数量。
可选的,所述获得对应分辨率的基准转码任务的标定单元需要占用的标准处理单元的数量作为基本数量进一步为:
查找反映各分辨率的基准转码任务的标定单元与需要占用的标准处理单元的数量之间对应关系的对照表,确定对应分辨率的基准转码任务的标定单元需要占用的标准处理单元的数量。
可选的,所述根据所述码率比值计算得到码率权重具体为:
所述码率权重y与所述码率比值x之间的关系为:y=0.02x2-0.20x+1.17。
可选的,所述根据所述帧率比值计算得到帧率权重具体为:
计算所述帧率权重等于所述帧率比值。
可选的,所述标定单元为宏块。
可选的,所述选择目标转码机为:
以低占用原则选择目标转码机,其中,所述低占用原则为将当前负载状态最低的转码机作为目标转码机,或者为将增加所述待分配转码任务后的负载状态最低的转码机作为目标转码机。
根据本发明的第二方面,提供了一种转码任务分配装置,其包括:
任务获得模块,用于获得待分配转码任务;
资源占用确定模块,用于确定所述待分配转码任务需要占用的标准处理单元的数量;
负载状态获取模块,用于获取各转码机的当前负载状态,其中,所述负载状态被设置为通过占用比表征,所述占用比为转码机处理的转码任务所占用的标准处理单元的数量在对应转码机具有的标准处理单元的总数中的比重;
选择模块,用于根据所述待分配转码任务需要占用的标准处理单元的数量及各转码机 的当前负载状态,选择目标转码机,其中,所述选择被设置为使得目标转码机增加所述待分配转码任务后的负载状态仍为正常状态;
分配模块,用于将所述待分配转码任务分配至所述目标转码机;以及,
更新模块,用于更新所述目标转码机的当前负载状态。
可选的,所述资源占用确定模块包括:
基本数量获取单元,用于根据所述待分配转码任务的分辨率,获得对应分辨率的基准转码任务的标定单元需要占用的标准处理单元的数量作为基本数量;
码率权重计算单元,用于计算所述待分配转码任务对应的码率与所述基准转码任务对应的码率间的码率比值,并根据所述码率比值计算得到码率权重;
帧率权重计算单元,用于计算所述待分配转码任务对应的帧率与所述基准转码任务对应的帧率间的帧率比值,并根据所述帧率比值计算得到帧率权重;以及,
资源占用确定单元,用于根据所述基本数量、所述待分配转码任务包括的标定单元的个数、及所述码率权重和帧率权重,计算得到所述待分配转码任务需要占用的标准处理单元的数量。
可选的,所述基本数量获取单元用于查找反映各分辨率的基准转码任务的标定单元与需要占用的标准处理单元的数量之间对应关系的对照表,确定对应分辨率的基准转码任务的标定单元需要占用的标准处理单元的数量。
可选的,所述码率权重计算单元具体用于根据所述码率权重y与所述码率比值x之间的关系y=0.02x2-0.20x+1.17计算得到码率权重。
可选的,所述帧率权重计算单元具体用于计算所述帧率权重等于所述帧率比值。
可选的,所述选择模块具体用于以低占用原则选择目标转码机,其中,所述低占用原则为将当前负载状态最低的转码机作为目标转码机,或者为将增加所述待分配转码任务后的负载状态最低的转码机作为目标转码机。
根据本发明的第三方面,提供了一种转码任务分配装置,包括存储器和处理器,所述存储器用于存储指令,所述指令用于控制所述处理器进行操作以执行根据本发明第一方面所述的方法。
本发明的发明人发现,在现有技术中,存在因转码资源分配不均导致的转码卡顿、转码机利用率严重不足的问题。而在本发明实施例中,通过统一的计量标准,即标准处理单元,计量转码机的处理能力及转码任务需要占用的处理资源,进而以简单的方式实现实时转码任务的有效分配,提高了转码实时性及各转码机的利用率。
通过以下参照附图对本发明的示例性实施例的详细描述,本发明的其它特征及其优点将会变得清楚。
附图说明
被结合在说明书中并构成说明书的一部分的附图示出了本发明的实施例,并且连同其说明一起用于解释本发明的原理。
图1是根据本发明转码任务分配方法的一种实施方式的流程图;
图2是图1中确定所述待分配转码任务需要占用的标准处理单元的数量的一种实施方式的流程图;
图3是根据本发明转码任务分配装置的一种实施结构的方框原理图;
图4是图3中资源占用确定模块的一种实施结构的方框原理图;
图5是根据本发明转码任务分配装置的另一种实施结构的方框原理图。
具体实施方式
现在将参照附图来详细描述本发明的各种示例性实施例。应注意到:除非另外具体说明,否则在这些实施例中阐述的部件和步骤的相对布置、数字表达式和数值不限制本发明的范围。
以下对至少一个示例性实施例的描述实际上仅仅是说明性的,决不作为对本发明及其应用或使用的任何限制。
对于相关领域普通技术人员已知的技术、方法和设备可能不作详细讨论,但在适当情况下,所述技术、方法和设备应当被视为说明书的一部分。
在这里示出和讨论的所有例子中,任何具体值应被解释为仅仅是示例性的,而不是作为限制。因此,示例性实施例的其它例子可以具有不同的值。
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步讨论。
本发明为了解决因转码资源分配不均导致的转码卡顿、转码机利用率不足等问题,提供了一种关于转码任务分配的能够保证转码时效性的新的技术方案。
图1是根据本发明的转码任务分配方法的一种实施方式的流程图。
根据图1所示,本发明方法包括如下步骤:
步骤S101,获得待分配转码任务。
由于本发明方法能够满足实时转码的时效要求,因此,该待分配转码任务可以是直播类实时转码任务,当然也可以是其他类型的转码任务,例如点播类转码任务。
步骤S102,确定待分配转码任务需要占用的标准处理单元的数量。
该标准处理单元是本发明方法中采用的一个统一的计量标准,在实际应用中,一方面通过该标准处理单元标定每一转码机的处理能力,其中,不同转码机通常具有不同的处理 能力;另一方面通过该标准处理单元对各转码任务需要占用的处理资源进行计量。这样,便可以通过统一的标准,简单有效地统计各转码机的负载状态。
该负载状态被设置为通过占用比表征,而占用比则为转码机处理的转码任务所占用的标准处理单元的数量在对应转码机具有的标准处理单元的总数中的比重,该比重可以是比值,也可以是百分比,例如,一转码机具有的标准处理单元的总数为100万个,该转码机正在处理的所有当前转码任务占用了30万个标准处理单元,则该转码机的当前负载状态即为30%。
该标准处理单元可以通过转码特定分辨率的基准转码任务的标定单元需要占用的处理资源进行定义,即将转码特定分辨率的基准转码任务的标定单元需要占用的处理资源标定为一个标准处理单元,该特定分辨率例如但不局限于是1080P,该标定单元可以是一个宏块,也可以是一帧数据,在此,由于视频编码算法通常以宏块为单位,通过逐个编码各宏块形成连续的视频码流,因此,该标定单元优选设定为是一个宏块。这样,在该具体实施例下,每一转码机同时可以转码的1080P分辨率的基准转码任务的最大宏块数量便为对应转码机的可用处理资源总和,该最大宏块数量可以通过压力测试获得。在此基础上,便可以预先标定其他分辨率的基准转码任务的标定单元需要占用的标准处理单元的数量,具体为,根据相同转码机上可同时转码的待标定分辨率的基准转码任务的最大宏块数量与同时可以转码的特定分辨率的最大宏块数量之间的比值,确定待标定分辨率的基准转码任务的标定单元需要占用的标准处理单元的数量,例如一转码机具有100万个标准处理单元,该比值为0.5,则转码待标定分辨率的基准转码任务的标定单元需要占用2个标准处理单元,在此,特定分辨率的基准转码任务与其他分辨率的基准转码任务对应的码率和帧率可相同、部分相同或者各不相同。
步骤S103,获取各转码机的当前负载状态。
该当前负载状态可以由转码机提供,也可以根据转码任务的分配及转码任务的完成进行记录及更新。
为了便于查找各转码机的当前负载状态,可将各转码机的当前负载状态记录在链表中。
步骤S104,根据待分配转码任务需要占用的标准处理单元的数量及各转码机的当前负载状态,选择目标转码机,其中,该选择被设置为使得目标转码机增加待分配转码任务后的负载状态仍为正常状态。
该正常状态即为上述占用比未超过设定的处理上限,该处理上限例如是85﹪。
选择方式可以是:在满足要求的前提下,随机选择目标转码机;也可以是在满足要求的前提下,以低占用原则选择目标转码机,该低占用原则即为将当前负载状态最低的转码机作为目标转码机,或者为将增加待分配转码任务后的负载状态最低的转码机作为目标转 码机,以进一步提高各转码机的利用率;还可以是在满足要求的前提下,根据各转码机的转码任务分配优先级选择目标转码机,即根据各转码机的处理能力设置优先分配的转码任务,以实现转码机的合理利用。
步骤S105,将待分配转码任务分配至目标转码机。
步骤S106,更新目标转码机的当前负载状态。
在此,本领域技术人员应该清楚的是,当转码机完成一项转码任务时,需要根据处理资源的释放更新对应转码机的当前负载状态,由于本发明主要涉及转码任务的分配,因此对于处理资源的释放更新过程不再进一步赘述。
由此可见,本发明通过标准处理单元统一标定转码机的处理能力及转码任务需要占用的处理资源,进而以简单的方式实现了转码任务的有效分配,保证各转码机均能处于正常状态,避免出现转码卡顿及转码机利用率严重不均的问题。
为了减少标定工作量,可设定一分辨率对应一个基准转码任务,并在操作时根据待分配转码任务的码率和帧率相对相同分辨率的基准转码任务的码率和帧率的差别,计算得到待分配转码任务需要占用的标准处理单元的数量,这样,就只需对数量较少的基准转码任务进行标定,大大较少了数据统计的工作量。
图2为基于该种操作方式实现上述步骤S102的具体流程图。
根据图2所示,上述确定待分配转码任务需要占用的标准处理单元的数量可进一步包括:
步骤S201,根据待分配转码任务的分辨率,获得对应分辨率的基准转码任务的标定单元需要占用的标准处理单元的数量作为基本数量。
该步骤S201中,可通常查找反映各分辨率的基准转码任务的标定单元与需要占用的标准处理单元的数量之间对应关系的对照表,确定对应分辨率的基准转码任务的标定单元需要占用的标准处理单元的数量。
对于对照表中未列出的特殊分辨率,可以通过插值方式获得该基本数量。步骤S202,计算待分配转码任务对应的码率与基准转码任务对应的码率间的码率比值,并根据码率比值计算得到码率权重。
该码率比值与码率权重之间的关系可以根据对相同分辨率、不同码率下的实测数据进行数据拟合获得,拟合方式可以是线性拟合、多项式拟合、抛物线拟合等。根据实测数据,采用抛物线拟合具有较多的有效数据,对应的码率权重y与码率比值x之间的关系为y=0.02x2-0.20x+1.17。
步骤S203,计算待分配转码任务对应的帧率与基准转码任务对应的帧率间的帧率比值,并根据帧率比值计算得到帧率权重。
该码帧率比值与帧率权重之间的关系可以根据对不同帧率下的实测数据进行数据拟 合获得,拟合方式可以是线性拟合、多项式拟合、抛物线拟合等。根据实测数据,采用线性拟合具有较多的有效数据,对应的拟合结果是帧率权重等于帧率比值。
步骤S204,根据所述基本数量、待分配转码任务包括的标定单元的个数、及码率权重和帧率权重,计算得到待分配转码任务需要占用的标准处理单元的数量。
该根据待分配转码任务包括的标定单元的数量可以是:先确定对应分辨率的每帧数据具备的标定单元的个数,在标定单元为宏块的情况下,即先确定对应分辨率的每帧数据具有的宏块个数,再结合待分配转码任务的帧数即可得到待分配转码任务包括的标定单元的个数。
在此基础上,将基本数量、包括的标定单元的个数、码率权重和帧率权重相乘,便可得到待分配转码任务需要占用的标准处理单元的数量。
在标定的内容为各分辨率下每个宏块的基准转码任务需要占用的标准处理单元的数量时,需要根据对应分辨率下每帧数据包括的宏块数量,计算得到对应分辨率下的基准转码任务需要占用的标准处理单元的数量。
本发明还提供了一种转码任务分配装置,图3为根据本发明一方面的该装置的实施结构的方框原理图。
根据图3所示,该装置300包括任务获得模块301、资源占用确定模块302、负载状态获取模块303、选择模块304、分配模块305和更新模块306。
上述任务获得模块301用于获得待分配转码任务。
上述资源占用确定模块302用于确定待分配转码任务需要占用的标准处理单元的数量。
上述负载状态获取模块303用于获取各转码机的当前负载状态,其中,所述负载状态被设置为通过占用比表征,所述占用比为转码机处理的转码任务所占用的标准处理单元的数量在对应转码机具有的标准处理单元的总数中的比重。
上述选择模块304用于根据待分配转码任务需要占用的标准处理单元的数量及各转码机的当前负载状态,选择目标转码机,其中,所述选择被设置为使得目标转码机增加所述待分配转码任务后的负载状态仍为正常状态。
上述分配模块305用于将待分配转码任务分配至所述目标转码机。
上述更新模块306用于更新目标转码机的当前负载状态。
图4为上述资源占用确定模块302的一种实施结构的方框原理图。
根据图4所示,该资源占用确定模块302进一步包括基本数量获取单元401、码率权重计算单元402、帧率权重计算单元403和资源占用确定单元404。
上述基本数量获取单元401用于根据待分配转码任务的分辨率,获得对应分辨率的基准转码任务的标定单元需要占用的标准处理单元的数量作为基本数量。
上述码率权重计算单元402用于计算待分配转码任务对应的码率与基准转码任务对应的码率间的码率比值,并根据码率比值计算得到码率权重;
上述帧率权重计算单元403用于计算待分配转码任务对应的帧率与基准转码任务对应的帧率间的帧率比值,并根据帧率比值计算得到帧率权重。
上述资源占用确定单元404用于根据所述基本数量、所述待分配转码任务包括的标定单元的个数、及所述码率权重和帧率权重,计算得到所述待分配转码任务需要占用的标准处理单元的数量。
上述资源占用确定单元402可具体用于通常查找反映各分辨率的基准转码任务的标定单元与需要占用的标准处理单元的数量之间对应关系的对照表,确定对应分辨率的基准转码任务的标定单元需要占用的标准处理单元的数量作为基本数量。
上述选择模块304可具体用于以低占用原则选择目标转码机,其中,低占用原则为将当前负载状态最低的转码机作为目标转码机,或者为将增加待分配转码任务后的负载状态最低的转码机作为目标转码机。
图5为根据本发明另一方面的该装置的实施结构的方框原理图。
根据图5所示,该装置包括存储器501和处理器502,该存储器501用于存储指令,该指令用于控制处理器502进行操作以执行上述转码任务分配方法。
除此之外,根据图5所示,该装置还可以包括接口装置503、输入装置504、显示装置505、通信装置506等等。尽管在图5中示出了多个装置,但是,本发明可以仅涉及其中的部分装置,例如,处理器502和存储器501等。
上述通信装置506例如能够进行有有线或无线通信。
上述接口装置503例如包括USB接口、RS232接口、RS485接口等。
上述输入装置504例如可以包括触摸屏、按键等。
上述显示装置505例如是液晶显示屏、触摸显示屏等。
上述各实施例主要重点描述与其他实施例的不同之处,但本领域技术人员应当清楚的是,上述各实施例可以根据需要单独使用或者相互结合使用。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分相互参见即可,每个实施例重点说明的都是与其他实施例的不同之处,但本领域技术人员应当清楚的是,上述各实施例可以根据需要单独使用或者相互结合使用。另外,对于装置实施例而言,由于其是与方法实施例相对应,所以描述得比较简单,相关之处参见方法实施例的对应部分的说明即可。以上所描述的系统实施例仅仅是示意性的,其中作为分离部件说明的模块可以是或者也可以不是物理上分开的。
本发明可以是装置、方法和/或计算机程序产品。计算机程序产品可以包括计算机可读存储介质,其上载有用于使处理器实现本发明的各个方面的计算机可读程序指令。
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是――但不限于――电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(Random Access Memory,RAM)、只读存储器(Read-Only Memory,ROM)、可擦式可编程只读存储器(Erasable Programmable Read Only Memory,EPROM或闪存)、静态随机存取存储器(Static RAM,SRAM)、光盘只读存储器(Compact Disc Read-Only Memory,CD-ROM)、数字多功能盘(Digital Versatile Disc,DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。
这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。
用于执行本发明操作的计算机程序指令可以是汇编指令、指令集架构(Instruction set architecture,ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(Local Area Network,LAN)或广域网(Wide Area Network,WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或可编程逻辑阵列(Programmable Logic Array,PLA),该电子电路可以执行计算机可读程序指令,从而实现本发明的各个方面。
这里参照根据本发明实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本发明的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框 图中各方框的组合,都可以由计算机可读程序指令实现。
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。
附图中的流程图和框图显示了根据本发明的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。对于本领域技术人员来说公知的是,通过硬件方式实现、通过软件方式实现以及通过软件和硬件结合的方式实现都是等价的。
以上已经描述了本发明的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术的技术改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。本发明的范围由所附权利要求来限定。

Claims (12)

  1. 一种转码任务分配方法,其特征在于,包括:
    获得待分配转码任务;
    确定所述待分配转码任务需要占用的标准处理单元的数量;
    获取各转码机的当前负载状态,其中,所述负载状态被设置为通过占用比表征,所述占用比为转码机处理的转码任务所占用的标准处理单元的数量在对应转码机具有的标准处理单元的总数中的比重;
    根据所述待分配转码任务需要占用的标准处理单元的数量及各转码机的当前负载状态,选择目标转码机,其中,所述选择被设置为使得目标转码机增加所述待分配转码任务后的负载状态仍为正常状态;
    将所述待分配转码任务分配至所述目标转码机,并更新所述目标转码机的当前负载状态。
  2. 根据权利要求1所述的方法,其特征在于,所述确定所述待分配转码任务需要占用的标准处理单元的数量包括:
    根据所述待分配转码任务的分辨率,获得对应分辨率的基准转码任务的标定单元需要占用的标准处理单元的数量作为基本数量;
    计算所述待分配转码任务对应的码率与所述基准转码任务对应的码率间的码率比值,并根据所述码率比值计算得到码率权重;
    计算所述待分配转码任务对应的帧率与所述基准转码任务对应的帧率间的帧率比值,并根据所述帧率比值计算得到帧率权重;
    根据所述基本数量、所述待分配转码任务包括的标定单元的个数、及所述码率权重和帧率权重,计算得到所述待分配转码任务需要占用的标准处理单元的数量。
  3. 根据权利要求2所述的方法,其特征在于,所述获得对应分辨率的基准转码任务的标定单元需要占用的标准处理单元的数量作为基本数量进一步为:
    查找反映各分辨率的基准转码任务的标定单元与需要占用的标准处理单元的数量之间对应关系的对照表,确定对应分辨率的基准转码任务的标定单元需要占用的标准处理单元的数量。
  4. 根据权利要求2所述的方法,其特征在于,所述根据所述帧率比值计算得到帧率权重具体为:
    计算所述帧率权重等于所述帧率比值。
  5. 根据权利要求2所述的方法,其特征在于,所述标定单元为宏块。
  6. 根据权利要求1至5中任一项所述的方法,其特征在于,所述选择目标转码机进一步为:
    以低占用原则选择目标转码机,其中,所述低占用原则为将当前负载状态最低的转码机作为目标转码机,或者为将增加所述待分配转码任务后的负载状态最低的转码机作为目标转码机。
  7. 一种转码任务分配装置,其特征在于,包括:
    任务获得模块,用于获得待分配转码任务;
    资源占用确定模块,用于确定所述待分配转码任务需要占用的标准处理单元的数量;
    负载状态获取模块,用于获取各转码机的当前负载状态,其中,所述负载状态被设置为通过占用比表征,所述占用比为转码机处理的转码任务所占用的标准处理单元的数量在对应转码机具有的标准处理单元的总数中的比重;
    选择模块,用于根据所述待分配转码任务需要占用的标准处理单元的数量及各转码机的当前负载状态,选择目标转码机,其中,所述选择被设置为使得目标转码机增加所述待分配转码任务后的负载状态仍为正常状态;
    分配模块,用于将所述待分配转码任务分配至所述目标转码机;以及,
    更新模块,用于更新所述目标转码机的当前负载状态。
  8. 根据权利要求7所述的装置,其特征在于,所述资源占用确定模块包括:
    基本数量获取单元,用于根据所述待分配转码任务的分辨率,获得对应分辨率的基准转码任务的标定单元需要占用的标准处理单元的数量作为基本数量;
    码率权重计算单元,用于计算所述待分配转码任务对应的码率与所述基准转码任务对应的码率间的码率比值,并根据所述码率比值计算得到码率权重;
    帧率权重计算单元,用于计算所述待分配转码任务对应的帧率与所述基准转码任务对应的帧率间的帧率比值,并根据所述帧率比值计算得到帧率权重;以及,
    资源占用确定单元,用于根据所述基本数量、所述待分配转码任务包括的标定单元的个数、及所述码率权重和帧率权重,计算得到所述待分配转码任务需要占用的标准处理单元的数量。
  9. 根据权利要求8所述的装置,其特征在于,所述基本数量获取单元用于查找反映各分辨率的基准转码任务的标定单元与需要占用的标准处理单元的数量之间对应关系的对照表,确定对应分辨率的基准转码任务的标定单元需要占用的标准处理单元的数量。
  10. 根据权利要求8所述的装置,其特征在于,所述帧率权重计算单元具体用于计算所述帧率权重等于所述帧率比值。
  11. 根据权利要求7至10任一项所述装置,其特征在于,所述选择模块具体用于以低占用原则选择目标转码机,其中,所述低占用原则为将当前负载状态最低的转码机作为目标转码机,或者为将增加所述待分配转码任务后的负载状态最低的转码机作为目标转码机。
  12. 一种转码任务分配装置,包括存储器和处理器,其特征在于,所述存储器用于存储指令,所述指令用于控制所述处理器进行操作以执行根据权利要求1至6中任一项所述的方法。
PCT/CN2016/088989 2016-03-31 2016-07-06 转码任务分配方法及装置 WO2017166501A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US15/246,330 US20170289558A1 (en) 2016-03-31 2016-08-24 Method and device for allocating a transcoding task

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610201287.3 2016-03-31
CN201610201287.3A CN105872595A (zh) 2016-03-31 2016-03-31 转码任务分配方法及装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/246,330 Continuation US20170289558A1 (en) 2016-03-31 2016-08-24 Method and device for allocating a transcoding task

Publications (1)

Publication Number Publication Date
WO2017166501A1 true WO2017166501A1 (zh) 2017-10-05

Family

ID=56627755

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/088989 WO2017166501A1 (zh) 2016-03-31 2016-07-06 转码任务分配方法及装置

Country Status (2)

Country Link
CN (1) CN105872595A (zh)
WO (1) WO2017166501A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109635016A (zh) * 2018-10-16 2019-04-16 深圳壹账通智能科技有限公司 数据转换方法、装置、设备及计算机可读存储介质
CN112040333A (zh) * 2020-09-04 2020-12-04 北京达佳互联信息技术有限公司 视频发布方法、装置、终端及存储介质
CN112399252A (zh) * 2019-08-14 2021-02-23 浙江宇视科技有限公司 软硬解码控制方法、装置及电子设备
CN114501067A (zh) * 2022-01-10 2022-05-13 成都易达数安科技有限公司 一种多gpu并发的媒资转码任务自动调度方法

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106454402B (zh) * 2016-08-31 2018-11-23 腾讯科技(深圳)有限公司 转码任务调度方法和装置
CN106776021A (zh) * 2016-12-07 2017-05-31 广东威创视讯科技股份有限公司 一种处理器负载均衡的方法、装置及系统
CN107231565A (zh) * 2017-07-25 2017-10-03 网宿科技股份有限公司 一种直播任务管理调度方法及其系统
CN109936750B (zh) * 2017-12-15 2022-04-19 华平信息技术股份有限公司 通信系统、微控制器及其应用的视频转码方法及系统
CN108235059A (zh) * 2018-03-09 2018-06-29 网宿科技股份有限公司 一种分配转码任务的方法和系统
CN108366273A (zh) * 2018-03-16 2018-08-03 中国传媒大学 分布式视频转码系统及分布式视频转码方法
CN110519618A (zh) * 2018-05-22 2019-11-29 视联动力信息技术股份有限公司 一种视频数据的处理方法和视联网终端
CN108900865B (zh) * 2018-06-11 2021-06-15 网宿科技股份有限公司 服务器、转码任务的调度方法及执行方法
CN108965884B (zh) * 2018-07-13 2020-12-25 网宿科技股份有限公司 一种转码任务的分配方法及调度设备、转码设备
CN110765825A (zh) 2018-07-27 2020-02-07 北京京东尚科信息技术有限公司 物品摆放状态获取方法和系统
CN111246291B (zh) * 2018-11-29 2022-03-11 浙江宇视科技有限公司 一种视频转码方法、装置及电子设备
CN112543165B (zh) * 2019-09-20 2022-11-15 浙江宇视科技有限公司 一种解码方法、装置、设备和介质
CN111107393A (zh) * 2019-11-29 2020-05-05 视联动力信息技术股份有限公司 视频转码方法、转码器、电子设备及存储介质
CN112543373B (zh) * 2020-11-30 2022-04-22 联想(北京)有限公司 一种转码控制方法、装置及电子设备
CN113568756B (zh) * 2021-09-18 2022-01-25 中国电力科学研究院有限公司 一种密码资源协同动态调度方法和系统
CN114598927B (zh) * 2022-03-03 2024-06-18 京东科技信息技术有限公司 转码资源的调度方法、系统以及调度装置
CN115297361B (zh) * 2022-07-29 2024-06-14 北京字跳网络技术有限公司 转码任务的处理方法、装置、转码系统、电子设备及介质
CN115695867B (zh) * 2023-01-03 2023-05-12 北京微吼时代科技有限公司 转码资源弹性伸缩的调度方法及装置

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2151971B1 (en) * 2008-08-09 2011-08-03 Saffron Digital Limited Transcoding video data
CN103188521A (zh) * 2011-12-29 2013-07-03 北京大学 转码分配方法及装置,转码方法及设备
CN103686207A (zh) * 2013-12-04 2014-03-26 乐视网信息技术(北京)股份有限公司 转码任务的调度方法和系统
CN103702125A (zh) * 2013-12-23 2014-04-02 乐视网信息技术(北京)股份有限公司 针对分片转码调度的方法和系统
CN104360909A (zh) * 2014-11-04 2015-02-18 无锡天脉聚源传媒科技有限公司 一种视频处理方法及装置
CN104469370A (zh) * 2013-09-17 2015-03-25 中国普天信息产业股份有限公司 一种视频转码的方法和装置
CN104717517A (zh) * 2015-03-31 2015-06-17 北京奇艺世纪科技有限公司 一种视频转码任务调度方法及装置

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104182279A (zh) * 2014-02-26 2014-12-03 无锡天脉聚源传媒科技有限公司 一种任务调度方法、装置及系统

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2151971B1 (en) * 2008-08-09 2011-08-03 Saffron Digital Limited Transcoding video data
CN103188521A (zh) * 2011-12-29 2013-07-03 北京大学 转码分配方法及装置,转码方法及设备
CN104469370A (zh) * 2013-09-17 2015-03-25 中国普天信息产业股份有限公司 一种视频转码的方法和装置
CN103686207A (zh) * 2013-12-04 2014-03-26 乐视网信息技术(北京)股份有限公司 转码任务的调度方法和系统
CN103702125A (zh) * 2013-12-23 2014-04-02 乐视网信息技术(北京)股份有限公司 针对分片转码调度的方法和系统
CN104360909A (zh) * 2014-11-04 2015-02-18 无锡天脉聚源传媒科技有限公司 一种视频处理方法及装置
CN104717517A (zh) * 2015-03-31 2015-06-17 北京奇艺世纪科技有限公司 一种视频转码任务调度方法及装置

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109635016A (zh) * 2018-10-16 2019-04-16 深圳壹账通智能科技有限公司 数据转换方法、装置、设备及计算机可读存储介质
CN112399252A (zh) * 2019-08-14 2021-02-23 浙江宇视科技有限公司 软硬解码控制方法、装置及电子设备
CN112399252B (zh) * 2019-08-14 2023-03-14 浙江宇视科技有限公司 软硬解码控制方法、装置及电子设备
CN112040333A (zh) * 2020-09-04 2020-12-04 北京达佳互联信息技术有限公司 视频发布方法、装置、终端及存储介质
CN114501067A (zh) * 2022-01-10 2022-05-13 成都易达数安科技有限公司 一种多gpu并发的媒资转码任务自动调度方法

Also Published As

Publication number Publication date
CN105872595A (zh) 2016-08-17

Similar Documents

Publication Publication Date Title
WO2017166501A1 (zh) 转码任务分配方法及装置
US20210234940A1 (en) Resource Request Management Using Bandwidth Allocation and Time Slots
US10958864B2 (en) Transcoding system and method
US9271003B2 (en) Real-time audio or video transcoding
US10283091B2 (en) Buffer optimization
US20120250755A1 (en) Video encoding system and method
US9426476B2 (en) Video stream
US10229473B2 (en) Accelerated frame rate advertising-prioritized video frame alignment
TWI575949B (zh) 於編碼位元流之間動態切換之技術
US11019123B2 (en) Multi-bitrate component sharding
US11323759B2 (en) Systems, methods and computer-readable media for resource-based allocation of content transmitted in a media network
WO2019245685A1 (en) Methods and apparatus for updating media presentation data
CN104185062A (zh) 一种终端处理视频流的方法及终端
US9392042B1 (en) Streaming media optimization
US20110270941A1 (en) File decoding system and method
JP2015510355A (ja) コンピュータにより実行される方法及び記憶媒体
US20140380347A1 (en) Methods and systems for user experience based content consumption
US10356439B2 (en) Flexible frame referencing for display transport
US20140325581A1 (en) Electronic device and method for managing video snapshot
US20170289558A1 (en) Method and device for allocating a transcoding task
US20160149798A1 (en) Message transmission system, message transmission server, user terminal apparatus, method for transmitting message, and method for receiving message
JP5580253B2 (ja) 呼接続装置およびその動作方法
US11792472B2 (en) Schedule-based uninterrupted buffering and streaming
US20160105678A1 (en) Video Parameter Techniques
CN115334305A (zh) 视频数据传输方法、装置、电子设备和介质

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16896273

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 16896273

Country of ref document: EP

Kind code of ref document: A1