WO2017166630A1 - Task priority correctingon method and device - Google Patents

Task priority correctingon method and device Download PDF

Info

Publication number
WO2017166630A1
WO2017166630A1 PCT/CN2016/096773 CN2016096773W WO2017166630A1 WO 2017166630 A1 WO2017166630 A1 WO 2017166630A1 CN 2016096773 W CN2016096773 W CN 2016096773W WO 2017166630 A1 WO2017166630 A1 WO 2017166630A1
Authority
WO
WIPO (PCT)
Prior art keywords
task
priority
current
waiting
duration
Prior art date
Application number
PCT/CN2016/096773
Other languages
French (fr)
Chinese (zh)
Inventor
鲍大磊
刘永华
Original Assignee
乐视控股(北京)有限公司
乐视云计算有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 乐视控股(北京)有限公司, 乐视云计算有限公司 filed Critical 乐视控股(北京)有限公司
Publication of WO2017166630A1 publication Critical patent/WO2017166630A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • G06F9/4887Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues involving deadlines, e.g. rate based, periodic

Definitions

  • the present disclosure relates to the field of data processing, for example, to a task priority correction method and apparatus.
  • the video and audio source files need to be transcoded before they can be uploaded to the server and played on the player.
  • the transcoding device has limited resources and cannot handle multiple transcoding tasks at the same time.
  • a related method of processing a task by a transcoding device is to process a transcoding task according to a priority of a task in the task queue, and prioritize a task with a high priority.
  • Task A exists in the current task queue, and its priority is lower. If the task queue is continuously inserted with tasks with higher priority than task A, The code device will preferentially process the newly inserted task with the priority higher than the task A, then the task A will always be in the state of waiting for the processing, and the task A fails to complete the transcoding within the specified time, which in turn causes the task A to correspond. The video was not available to the user for viewing within the specified time, causing the task A to time out.
  • the embodiment of the present disclosure provides a task priority correction method and apparatus for avoiding the problem that a timeout problem is likely to occur during a process in which a task with a lower priority in a task queue is processed.
  • the embodiment of the present disclosure provides a task priority correction method, including:
  • the waiting duration includes: a first waiting duration, and/or a second waiting duration; wherein the first waiting duration is that the current task has been waiting The duration of the second waiting period is that the current task still needs to wait for a duration;
  • the priority of the current task is adjusted.
  • the embodiment of the present disclosure further provides a task priority correction apparatus, including:
  • the obtaining unit is configured to obtain a waiting duration of the current task in the task queue at the current priority, where the waiting duration includes: a first waiting duration, and/or a second waiting duration; wherein the first waiting duration is The duration of the current task has been waiting, and the second waiting duration is the length of time that the current task still needs to wait;
  • the first adjusting unit is configured to adjust a priority of the current task when the waiting time length satisfies a preset condition.
  • Embodiments of the present disclosure also provide a non-transitory computer readable storage medium storing computer executable instructions that, when executed by an electronic device, cause the electronic device to perform the task priority correction method described above.
  • Embodiments of the present disclosure also provide a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer The computer is caused to perform the above-described task priority correction method.
  • Embodiments of the present disclosure also provide an electronic device including at least one processor and a memory communicatively coupled to the at least one processor, the memory configured to store instructions executable by the at least one processor, the instructions When executed by the at least one processor, the at least one processor is caused to perform the task priority correction method described above.
  • the task priority correction method and apparatus can adjust the priority of the current task when the current task is under the current priority and the waiting time in the task queue satisfies the preset condition. And coordinate the processing order of the tasks in the task queue, so that the tasks with lower priority can be processed within the specified time after adjusting the priorities, thereby avoiding that the tasks with lower priorities are always waiting for the processed state, and The problem of the task timeout caused, so that the tasks in the task queue can be processed within the specified time.
  • FIG. 1 is a flow chart of steps of a first embodiment of a task priority correction method according to the present disclosure
  • FIG. 2 is a flow chart of steps of a second embodiment of a task priority correction method according to the present disclosure
  • FIG. 3 is a schematic structural diagram of Embodiment 1 of a task priority correction apparatus according to the present disclosure
  • Embodiment 4 is a schematic structural diagram of Embodiment 2 of a task priority correction apparatus according to the present disclosure
  • FIG. 5 is a schematic diagram of a hardware structure of an electronic device with task priority correction according to the present disclosure.
  • FIG. 1 a flow chart of the steps of the first embodiment of the task priority correction method of the present disclosure is shown, which may include:
  • Step 101 Obtain a waiting duration of the current task in the task queue according to the current priority; the waiting duration may include: a first waiting duration, and/or a second waiting duration; wherein the first waiting duration is the The current task has been waiting for a duration, and the second waiting duration is a waiting time for the current task;
  • the task type may include: transcoding, uploading, downloading, storing, etc.
  • the task priority correction method may be used to perform priority modification on a type of task, that is, the embodiment of the present disclosure may be applied.
  • the embodiment of the present disclosure mainly uses transcoding as an example, and other task types may be referred to each other.
  • the priority of the task is used to indicate the order in which the tasks are processed, and the higher the priority The task will be processed first; the priority of the task can be identified by a numerical value. For example, 0, 100, 200, 300, 400 can be used to identify different priorities from low to high, that is, tasks identified by 0. The lowest priority, the 400 identified task has the highest priority.
  • the above-mentioned priority is used to identify the priority of the task, which is only a way of identifying the priority of the above task in the embodiment of the present disclosure, and is not understood as a limitation on the priority identifier of the present disclosure.
  • the task priority may be identified by other means, for example, by using the characters A, B, C, D, E, etc., or by first, second, third, fourth, fifth, etc. to identify the task priority;
  • the method for identifying the priority of the task is not limited in the embodiment of the present disclosure.
  • the embodiment of the present disclosure is mainly described by using a numerical identifier as an example, and other identifiers may be referred to each other.
  • the first waiting duration is the waiting duration of the current task in the task queue, for example, the current task is a transcoding task of the video A, and the current priority of the task is 200.
  • the transcoding task has entered the task queue for 5 minutes, and the first waiting time of the transcoding task is 5 minutes; the second waiting time is the current task at the current priority, and the waiting time is still processed after processing, for example,
  • the current task is the transcoding task of video B.
  • the current priority of the task is 200.
  • Before the transcoding task there are tasks C and D with priority higher than the transcoding task, and task C and task D transcoding.
  • the total waiting time is 18 minutes, and the second waiting time of the above video B is 18 minutes.
  • Step 102 When the waiting duration meets a preset condition, adjust a priority of the current task.
  • the preset condition may include: the waiting duration of the current task reaches a preset duration, and the process of adjusting the priority of the current task when the waiting duration meets the preset condition may include When the waiting duration includes the first waiting duration, if the current task is at the current priority, and the waiting duration in the queue reaches the first preset duration, the priority of the current task is adjusted, or when the waiting duration includes the first When the waiting time is long, if the current task is at the current priority, and the current task remains to be processed for a longer duration than the second preset duration, the priority of the current task is adjusted.
  • the priority of the current task is adjusted when the waiting duration of the current task reaches 5 minutes; or, if the second preset duration is 30 minutes, the current task is still processed until When the waiting time is longer than 30 minutes, the priority of the current task is adjusted so that the priority of the current task is changed to reduce the waiting time for the current task to be processed.
  • the first preset duration is 5 minutes
  • the second preset duration is 30 minutes.
  • An example of the first preset duration and the second preset duration in the embodiment of the present disclosure is not understood as a limitation on the first preset duration and the second preset duration in the embodiment of the present disclosure, and actually The first preset duration and the second preset duration may be determined by a person skilled in the art according to the task requirements.
  • the first preset duration and the second preset duration are not limited herein.
  • the step of adjusting the priority of the current task may include:
  • Step A1 The priority of the current task is increased by a first preset amplitude to obtain a new priority of the current task.
  • Step A2 The new priority of the current task is used as the current priority of the current task, and returns to the acquisition waiting duration.
  • the task priority may be identified by a numerical value
  • the first preset amplitude may also be identified by a numerical value, for example, if the priority of the current task is 300, the first preset amplitude is 50, and the current task is If the waiting time in the queue has met the preset condition, the priority of the current task is adjusted, that is, the first preset amplitude 50 is added to the current priority 300 to obtain a new priority 350, and the process returns to step 101. If the current task is still not processed within the preset duration, the priority of the current task is adjusted again, that is, the first preset amplitude 50 is added to the current priority 350 to obtain a new priority 400, and again Return to step 101 until the current task is processed.
  • the first preset amplitude may be set with multiple gradients; the first preset amplitude is related to the current priority of the task to be adjusted; the higher the priority, the first The smaller the preset amplitude is;
  • the first preset amplitude may be set with multiple gradients, that is, different priorities correspond to different first preset amplitudes.
  • the priority of the task is adjusted, the current priority of the task is higher.
  • the corresponding first preset amplitude is smaller.
  • the gradient of the first preset amplitude can be set as follows: when the priority is in the range of 0 to 100 (including 100), the corresponding first preset amplitude is 100. When the priority is in the range of 100 to 200 (including 200), the corresponding first preset amplitude is 80, and when the priority is in the range of 200 to 300 (including 300), the corresponding first preset amplitude is 60, and priority is given. When the level is in the range of 300 to 400 (including 400), the first preset amplitude of the corresponding priority is 30;
  • the current task 3 has a priority of 200, and its waiting time in the queue satisfies the preset condition.
  • the current task is prioritized. If the priority is in the range of 200 to 300, the corresponding first preset amplitude is 60. Therefore, if the priority 200 is increased by 60, the current task 3 has a new priority.
  • the level is 260. It is assumed that there are still tasks 1 and 2 in the current task queue.
  • the corresponding priorities are: 300 and 400.
  • the processing order in the queue does not change, and the priority is under the new priority.
  • the priority is adjusted again to obtain a new priority 320. At this time, the priority of the task 3 is higher than the task 2, that is, the task 3 is executed before the task 2. Therefore, the waiting time for task 3 in the task queue is shortened.
  • the first preset amplitude may be a fixed value or a gradient value, which may be determined by a person skilled in the art, and the embodiment of the present disclosure does not apply whether the first preset amplitude is a fixed value. limit.
  • the task priority correction method may adjust the priority of the current task when the current task is under the current priority and the waiting time in the task queue satisfies the preset condition, and then Coordinating the processing order of the tasks in the task queue, so that the tasks with lower priority can be processed within the specified time after adjusting the priorities, thereby avoiding that the tasks with lower priorities are always waiting to be processed, thereby causing The problem of task timeout, which in turn allows tasks in the task queue to be processed within a specified time.
  • FIG. 2 a flow chart of the steps of the second embodiment of the task priority correction method of the present disclosure is shown, which may include:
  • Step 201 Obtain a waiting duration of the current task in the task queue under the current priority; the waiting duration includes: a first waiting duration, and/or a second waiting duration; wherein the first waiting duration is the current duration The duration of the task has been waited for, and the second waiting duration is the length of time that the current task still needs to wait;
  • Step 202 When the waiting duration meets a preset condition, adjust a priority of the current task;
  • Step 203 When a task is completed, search for whether there are other tasks in the task queue that have the same specific attribute identifier and have a lower priority than the completed task.
  • Step 204 When it is found that there are other tasks in the task queue with the same specific attribute identifier and lower priority than the completed task, the priority of the other tasks is decreased by the second preset range.
  • the task is a transcoding task; wherein, the higher the resolution The lower the priority of the transcoding task.
  • the scenario in which the task of the same attribute identifies the same task in the task queue may include: a transcoding task with different resolutions for the same video, where the specific attribute identifier is used to identify the video corresponding to the transcoding task, for example, : transcoding task for SD resolution of video A, transcoding task of HD resolution 2, transcoding task 3 of 1080 resolution, etc., since the above task 1, task 2 and task 3 correspond to transcoding of the same video A
  • the tasks, that is, the specific attribute identifiers of Task 1, Task 2, and Task 3 above are the same.
  • the priority of the above three tasks is 400, 300 and 200, then the task 1 is processed first, and then the task 2 and the task 3 are processed, because of the tasks 2 and 3.
  • the resolution is higher, so the transcoding takes up more resources, and the transcoding takes longer. If Task 2 and Task 3 always occupy resources, other tasks in the task queue are always waiting to be processed, so it may Causes other tasks not to be processed within the specified time, and will affect the efficiency of the transcoding equipment;
  • task 1 and task 2 and task 3 correspond to the transcoding task of the same video, for the video playing website, it can play a certain video on time, that is, the video of any resolution can be provided to the user on time, other resolutions.
  • the video can be provided to the user at a subsequent time.
  • the embodiment of the present disclosure can ensure that one task corresponding to multiple transcoding tasks of the same video A can be completed first, and can be adjusted by other tasks corresponding to the same video A.
  • the priority is such that the priority of other tasks is lowered to give resources to the transcoding tasks of other videos until the resources are idle, and then the other tasks of the video A are processed.
  • transcoding task for the SD resolution of the video A in the current task queue there is a transcoding task for the SD resolution of the video A in the current task queue, a transcoding task of the HD resolution 2, a transcoding task 3 of the 1080 resolution, and a transcoding task 4 for the video B.
  • the priority of each is: 400, 300, 200, 200, then the task 1 is processed first.
  • the task 1 is completed, the other tasks with the same attribute identifier as the task 1 are searched in the task queue, and the search results are task 2 and task 3.
  • the priorities of task 2 and task 3 are respectively reduced by the second preset amplitude, and if the second preset amplitude is 80, the current priorities of task 2 and task 3 are respectively: 220 and 120, and task 4 at this time If the priority is higher than the task 3, the task 4 can be processed in priority over the task 3. Therefore, all the transcoding tasks of the video A are always processed, and the transcoding task of the video B is always waiting, resulting in the video B. It is not possible to transcode on time, which causes the problem that Video B cannot be delivered to the user on time.
  • the second preset amplitude may be set with multiple gradients;
  • the second preset amplitude is related to a current priority of a task to be adjusted; the higher the priority, the larger the second preset amplitude.
  • the second preset amplitude may be set with multiple gradients, that is, different priorities correspond to different second preset amplitudes.
  • the priority of the task is adjusted, the current priority of the task is higher.
  • the corresponding second preset amplitude is larger.
  • the gradient of the second preset amplitude can be set as follows: when the priority is in the range of 0 to 100 (including 100), the corresponding second preset amplitude is 30. When the priority is in the range of 100 to 200 (including 200), the corresponding second preset amplitude is 60, and when the priority is in the range of 200 to 300 (including 300), the corresponding second preset amplitude is 80, and priority is given. When the level is in the range of 300 to 400 (including 400), the second preset amplitude of the corresponding priority is 100;
  • task 2 and task 3 that are the same as task 1 specific attribute identifiers are found in the task queue, and tasks 2 and 3 correspond to priorities of 300 and 200 respectively.
  • the level is reduced by 80, the new priority of task 2 is 220, the priority of task 3 is reduced by 60, and the new priority of task 3 is 140. If it is assumed that there is a task with priority 200 in the queue at this time, the task is It can be processed before task 3 to be able to shorten the waiting time of the task in the task queue.
  • the second preset amplitude may be a fixed value or a gradient value, which may be determined by a person skilled in the art, and the embodiment of the present disclosure does not apply whether the second preset amplitude is a fixed value. limit.
  • FIG. 3 a schematic structural diagram of a first embodiment of a task priority correction apparatus according to the present disclosure is shown, which may include: an obtaining unit 301 and a first adjusting unit 302, where
  • the obtaining unit 301 may be configured to acquire a waiting duration of the current task in the task queue according to the current priority; the waiting duration may include: a first waiting duration, and/or a second waiting duration; The first waiting duration is a duration of waiting for the current task, and the second waiting duration is a waiting duration of the current task.
  • the first adjusting unit 302 may be configured to adjust a priority of the current task when the waiting duration meets a preset condition.
  • the foregoing first adjusting unit 302 may include:
  • the first adjustment subunit may be configured to increase the priority of the current task by a first preset amplitude to obtain a new priority of the current task;
  • the new priority of the current task may be configured as the current priority of the current task, and returned to the acquisition waiting duration.
  • FIG. 4 a schematic structural diagram of a second embodiment of a task priority modification apparatus according to the present disclosure is shown, which may include: an obtaining unit 401, a first adjusting unit 402, a searching unit 403, and a second adjusting unit 404, where
  • the obtaining unit 401 may be configured to acquire a waiting duration of the current task in the task queue according to the current priority; the waiting duration may include: a first waiting duration, and/or a second waiting duration; wherein the first The waiting time is the length of time that the current task has been waiting, and the second waiting time is the length of time that the current task still needs to wait;
  • the first adjusting unit 402 may be configured to adjust a priority of the current task when the waiting duration meets a preset condition
  • the searching unit 403 may be configured to: when a task is completed, find, in the task queue, whether there are other tasks whose specific attribute identifiers are the same and whose priority is lower than the completed task;
  • the second adjusting unit 404 may be configured to reduce the priority of the other tasks by a second preset range when searching for other tasks in the task queue that have the same specific attribute identifier and lower priority than the completed task. .
  • the above task is a transcoding task; wherein the higher the resolution, the lower the priority of the transcoding task.
  • the first preset amplitude may be set with multiple gradients
  • the first preset amplitude is related to a current priority of a task to be adjusted; the higher the priority, the first The smaller the preset amplitude; or,
  • the second preset amplitude may be set with a plurality of gradients; the second preset amplitude is related to a current priority of a task to be adjusted; the higher the priority, the larger the second preset amplitude.
  • the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
  • the embodiment of the present application provides a non-volatile computer storage medium storing computer-executable instructions for performing a task priority correction method according to any one of the embodiments of the present application.
  • FIG. 5 is a schematic diagram of a hardware structure of an electronic device with task priority correction according to the present disclosure. As shown in FIG. 5, the electronic device includes:
  • processors 510 and memory 520 one processor 510 is taken as an example in FIG.
  • the apparatus for performing the method of task priority correction may further include: an input device 530 and an output device 540.
  • the processor 510, the memory 520, the input device 530, and the output device 540 may be connected by a bus or other means, as exemplified by a bus connection in FIG.
  • the memory 520 is a non-volatile computer readable storage medium, and is applicable to a non-volatile software program, a non-volatile computer-executable program, and a module, as in the task priority correction method in the embodiment of the present application.
  • Program instructions/modules for example, acquisition unit 401, first adjustment unit 402, lookup unit 403, and second adjustment unit 404 shown in FIG. 4).
  • the processor 510 executes various functional applications of the server and data processing by executing non-volatile software programs, instructions, and modules stored in the memory 520, that is, a method of implementing priority correction of the above-described method embodiments.
  • the memory 520 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created by use of the device modified according to the priority, and the like.
  • the memory 520 may include high speed random access memory.
  • the memory may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device.
  • memory 520 can optionally include memory remotely located relative to processor 510 that can be connected to the device for priority correction via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • Input device 530 can receive input numeric or character information, as well as generate key signal inputs related to user settings and function control of the device with priority correction.
  • the output device 540 can include a display device such as a display screen.
  • the one or more modules are stored in the memory 520, and when executed by the one or more processors 510, perform a method of priority correction in any of the method embodiments described above.
  • the electronic device of the embodiment of the present application exists in various forms, including but not limited to:
  • Mobile communication devices These devices are characterized by mobile communication functions and are mainly aimed at providing voice and data communication.
  • Such terminals include: smart phones (such as iPhone), multimedia phones, functional phones, and low-end phones.
  • Ultra-mobile personal computer equipment This type of equipment belongs to the category of personal computers, has computing and processing functions, and generally has mobile Internet access.
  • Such terminals include: PDAs, MIDs, and UMPC devices, such as the iPad.
  • Portable entertainment devices These devices can display and play multimedia content. Such devices include: audio, video players (such as iPod), handheld game consoles, e-books, and smart toys and portable car navigation devices.
  • the server consists of a processor, a hard disk, a memory, a system bus, etc.
  • the server is similar to a general-purpose computer architecture, but because of the need to provide highly reliable services, processing power and stability High reliability in terms of reliability, security, scalability, and manageability.
  • the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, ie may be located A place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art can understand and implement without deliberate labor.
  • the task priority correction method and apparatus can avoid the problem that the task with a lower priority in the task queue is prone to timeout during the processing.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

A task priority correcting method and device, wherein the method comprises: acquiring a waiting time of a current task in a task queue at the current priority, the waiting time comprising a first waiting time, and/or a second waiting time, wherein the first waiting time refers to the time the current task has waited, and the second waiting time refers to the time the current task still has to wait (101); and adjusting the priority of the current task when the waiting time meets a preset condition (102). The time-out problem of tasks with low priority in the task queue, easily occurring during the processing process, can be avoided.

Description

一种任务优先级修正方法和装置Task priority correction method and device
本申请要求在2016年03月31日提交中国专利局、申请号为2016102028867、公开名称为“一种任务优先级修正方法和装置”的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. 2016102028867, entitled "A Task Priority Correction Method and Apparatus", filed on March 31, 2016, the entire contents of which is incorporated by reference. In this application.
技术领域Technical field
本公开涉及数据处理领域,例如涉及一种任务优先级修正方法和装置。The present disclosure relates to the field of data processing, for example, to a task priority correction method and apparatus.
背景技术Background technique
视频和音频的源文件需要在进行转码之后,才能上传至服务器中,并在播放器上播放,但是转码设备的资源有限,不能同时处理多个转码任务。The video and audio source files need to be transcoded before they can be uploaded to the server and played on the player. However, the transcoding device has limited resources and cannot handle multiple transcoding tasks at the same time.
相关的一种转码设备处理任务的方法是,根据任务队列中任务的优先级对转码任务进行处理,优先处理优先级高的任务。A related method of processing a task by a transcoding device is to process a transcoding task according to a priority of a task in the task queue, and prioritize a task with a high priority.
但是,任务队列中不断会有新的任务插入,就会造成以下的问题:当前任务队列中存在任务A,其优先级较低,若任务队列中不断插入优先级高于任务A的任务,转码设备就会优先处理新插入的优先级高于任务A的任务,那么任务A就要一直处于等待被处理的状态,导致任务A没能在规定时间内完成转码,继而导致任务A对应的视频没能在规定时间内提供给用户观看,造成任务A超时的问题。However, there will always be new task insertions in the task queue, which will cause the following problems: Task A exists in the current task queue, and its priority is lower. If the task queue is continuously inserted with tasks with higher priority than task A, The code device will preferentially process the newly inserted task with the priority higher than the task A, then the task A will always be in the state of waiting for the processing, and the task A fails to complete the transcoding within the specified time, which in turn causes the task A to correspond. The video was not available to the user for viewing within the specified time, causing the task A to time out.
发明内容Summary of the invention
本公开实施例提供一种任务优先级修正方法和装置,用以避免任务队列中的优先级较低的任务在处理过程中,容易出现超时的问题。The embodiment of the present disclosure provides a task priority correction method and apparatus for avoiding the problem that a timeout problem is likely to occur during a process in which a task with a lower priority in a task queue is processed.
本公开实施例提供一种任务优先级修正方法,包括:The embodiment of the present disclosure provides a task priority correction method, including:
获取当前任务在当前优先级下、在任务队列中的等待时长;所述等待时长包括:第一等待时长、和/或第二等待时长;其中所述第一等待时长为所述当前任务已等待时长,所述第二等待时长为所述当前任务仍需等待时长; Obtaining a waiting duration of the current task in the task queue under the current priority; the waiting duration includes: a first waiting duration, and/or a second waiting duration; wherein the first waiting duration is that the current task has been waiting The duration of the second waiting period is that the current task still needs to wait for a duration;
在所述等待时长满足预置条件时,对所述当前任务的优先级进行调整。When the waiting duration meets the preset condition, the priority of the current task is adjusted.
本公开实施例还提供一种任务优先级修正装置,包括:The embodiment of the present disclosure further provides a task priority correction apparatus, including:
获取单元,配置为获取当前任务在当前优先级下、在任务队列中的等待时长;所述等待时长包括:第一等待时长、和/或第二等待时长;其中所述第一等待时长为所述当前任务已等待时长,所述第二等待时长为所述当前任务仍需等待时长;The obtaining unit is configured to obtain a waiting duration of the current task in the task queue at the current priority, where the waiting duration includes: a first waiting duration, and/or a second waiting duration; wherein the first waiting duration is The duration of the current task has been waiting, and the second waiting duration is the length of time that the current task still needs to wait;
第一调整单元,配置为在所述等待时长满足预置条件时,对所述当前任务的优先级进行调整。The first adjusting unit is configured to adjust a priority of the current task when the waiting time length satisfies a preset condition.
本公开实施例还提供一种非暂态计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被电子设备执行时,使得所述电子设备执行上述的任务优先级修正方法。Embodiments of the present disclosure also provide a non-transitory computer readable storage medium storing computer executable instructions that, when executed by an electronic device, cause the electronic device to perform the task priority correction method described above.
本公开实施例还提供一种计算机程序产品,所述计算机程序产品包括存储在非易失性计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行上述的任务优先级修正方法。Embodiments of the present disclosure also provide a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer The computer is caused to perform the above-described task priority correction method.
本公开实施例还提供一种电子设备,包括至少一个处理器和与所述至少一个处理器通信连接的存储器,所述存储器配置为存储可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行时,使所述至少一个处理器执行上述的任务优先级修正方法。Embodiments of the present disclosure also provide an electronic device including at least one processor and a memory communicatively coupled to the at least one processor, the memory configured to store instructions executable by the at least one processor, the instructions When executed by the at least one processor, the at least one processor is caused to perform the task priority correction method described above.
综上,本公开实施例提供的一种任务优先级修正方法和装置,可以在当前任务在当前优先级下,在任务队列中的等待时长满足预置条件时,对当前任务的优先级进行调整,进而协调任务队列中的任务的处理顺序,使得优先级较低的任务在调整优先级后可以在规定时间内被处理,从而避免了优先级较低的任务一直处于等待被处理的状态,而造成的任务超时的问题,进而使得任务队列中的任务均可以在规定时间内被处理。In summary, the task priority correction method and apparatus provided by the embodiments of the present disclosure can adjust the priority of the current task when the current task is under the current priority and the waiting time in the task queue satisfies the preset condition. And coordinate the processing order of the tasks in the task queue, so that the tasks with lower priority can be processed within the specified time after adjusting the priorities, thereby avoiding that the tasks with lower priorities are always waiting for the processed state, and The problem of the task timeout caused, so that the tasks in the task queue can be processed within the specified time.
附图概述 BRIEF abstract
一个或多个实施例通过与之对应的附图中的图片进行示例性说明,这些示例性说明并不构成对实施例的限定,附图中具有相同参考数字标号的元件表示为类似的元件,除非有特别申明,附图中的图不构成比例限制。The one or more embodiments are exemplified by the accompanying drawings in the accompanying drawings, and FIG. The figures in the drawings do not constitute a scale limitation unless otherwise stated.
图1为本公开的一种任务优先级修正方法实施例一的步骤流程图;1 is a flow chart of steps of a first embodiment of a task priority correction method according to the present disclosure;
图2为本公开的一种任务优先级修正方法实施例二的步骤流程图;2 is a flow chart of steps of a second embodiment of a task priority correction method according to the present disclosure;
图3为本公开的一种任务优先级修正装置实施例一的结构示意图;FIG. 3 is a schematic structural diagram of Embodiment 1 of a task priority correction apparatus according to the present disclosure;
图4为本公开的一种任务优先级修正装置实施例二的结构示意图;以及4 is a schematic structural diagram of Embodiment 2 of a task priority correction apparatus according to the present disclosure;
图5为本公开的一种任务优先级修正的电子设备的硬件结构示意图。FIG. 5 is a schematic diagram of a hardware structure of an electronic device with task priority correction according to the present disclosure.
本发明的实施方式Embodiments of the invention
为使本公开实施例的技术方案和优点更加清楚,下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本公开一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。The technical solutions in the embodiments of the present disclosure will be clearly and completely described in conjunction with the drawings in the embodiments of the present disclosure. Some embodiments are disclosed, rather than all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present disclosure without departing from the inventive scope are the scope of the disclosure.
方法实施例一Method embodiment 1
参照图1,示出了本公开的一种任务优先级修正方法实施例一的步骤流程图,可以包括:Referring to FIG. 1 , a flow chart of the steps of the first embodiment of the task priority correction method of the present disclosure is shown, which may include:
步骤101、获取当前任务在当前优先级下、在任务队列中的等待时长;所述等待时长可以包括:第一等待时长、和/或第二等待时长;其中所述第一等待时长为所述当前任务已等待时长,所述第二等待时长为所述当前任务仍需等待时长;Step 101: Obtain a waiting duration of the current task in the task queue according to the current priority; the waiting duration may include: a first waiting duration, and/or a second waiting duration; wherein the first waiting duration is the The current task has been waiting for a duration, and the second waiting duration is a waiting time for the current task;
本公开实施例中,任务类型可以包括:转码、上传、下载、存储等,所述任务优先级修正方法可以用于对一类任务进行优先级的修正,也即,本公开实施例可以应用于视频、和/或音频的转码、上传、下载、存储等任务过程中,本公开实施例主要以转码为例进行说明,其他任务类型相互参照即可。In the embodiment of the present disclosure, the task type may include: transcoding, uploading, downloading, storing, etc., and the task priority correction method may be used to perform priority modification on a type of task, that is, the embodiment of the present disclosure may be applied. In the process of transcoding, uploading, downloading, and storing video, and/or audio, the embodiment of the present disclosure mainly uses transcoding as an example, and other task types may be referred to each other.
本公开实施例中,任务的优先级用于指示任务被处理的顺序,优先级越高 的任务,越会优先被处理;任务的优先级可以通过数值来进行标识,例如:可以通过0,100,200,300,400来标识由低到高的不同优先级,也即0标识的任务的优先级最低,400标识的任务的优先级最高。In the embodiment of the present disclosure, the priority of the task is used to indicate the order in which the tasks are processed, and the higher the priority The task will be processed first; the priority of the task can be identified by a numerical value. For example, 0, 100, 200, 300, 400 can be used to identify different priorities from low to high, that is, tasks identified by 0. The lowest priority, the 400 identified task has the highest priority.
可以理解,上述通过数值来标识任务的优先级,仅作为本公开实施例中上述任务优先级的一种标识方式,而不理解为是对本公开任务优先级标识的一种限定,实际上,还可以通过其他方式对任务优先级进行标识,例如:通过字符A、B、C、D、E等,或者通过第一,第二,第三,第四,第五等对任务优先级进行标识;本公开实施例对任务的优先级的标识方式不做限定,本公开实施例主要以数值标识方式为例进行说明,其他标识方式相互参照即可。It can be understood that the above-mentioned priority is used to identify the priority of the task, which is only a way of identifying the priority of the above task in the embodiment of the present disclosure, and is not understood as a limitation on the priority identifier of the present disclosure. In fact, The task priority may be identified by other means, for example, by using the characters A, B, C, D, E, etc., or by first, second, third, fourth, fifth, etc. to identify the task priority; The method for identifying the priority of the task is not limited in the embodiment of the present disclosure. The embodiment of the present disclosure is mainly described by using a numerical identifier as an example, and other identifiers may be referred to each other.
本公开实施例中,上述第一等待时长为当前任务在当前优先级下,在任务队列中的已等待时长,例如:当前任务为视频A的转码任务,该任务的当前优先级为200,该转码任务进入任务队列已经有5分钟,则该转码任务的第一等待时长即为5分钟;上述第二等待时长为当前任务在当前优先级下,直至被处理仍需等待时长,例如:当前任务为视频B的转码任务,该任务的当前优先级为200,该转码任务前还有优先级高于该转码任务的任务C和任务D,任务C和任务D转码所需时长共为18分钟,则上述视频B的第二等待时长即为18分钟。In the embodiment of the present disclosure, the first waiting duration is the waiting duration of the current task in the task queue, for example, the current task is a transcoding task of the video A, and the current priority of the task is 200. The transcoding task has entered the task queue for 5 minutes, and the first waiting time of the transcoding task is 5 minutes; the second waiting time is the current task at the current priority, and the waiting time is still processed after processing, for example, The current task is the transcoding task of video B. The current priority of the task is 200. Before the transcoding task, there are tasks C and D with priority higher than the transcoding task, and task C and task D transcoding. The total waiting time is 18 minutes, and the second waiting time of the above video B is 18 minutes.
步骤102、在所述等待时长满足预置条件时,对所述当前任务的优先级进行调整。Step 102: When the waiting duration meets a preset condition, adjust a priority of the current task.
本公开实施例中,上述预置条件可以包括:当前任务的等待时长达到预置时长,则在所述等待时长满足预置条件时,对所述当前任务的优先级进行调整的过程,可以包括:当等待时长包括第一等待时长时,若当前任务在当前优先级下,在队列中的等待时长达到第一预置时长,则对当前任务的优先级进行调整,或者,当等待时长包括第二等待时长时,若当前任务在当前优先级下,当前任务直至被处理仍需等待时长大于第二预置时长,则对当前任务的优先级进行调整。In the embodiment of the present disclosure, the preset condition may include: the waiting duration of the current task reaches a preset duration, and the process of adjusting the priority of the current task when the waiting duration meets the preset condition may include When the waiting duration includes the first waiting duration, if the current task is at the current priority, and the waiting duration in the queue reaches the first preset duration, the priority of the current task is adjusted, or when the waiting duration includes the first When the waiting time is long, if the current task is at the current priority, and the current task remains to be processed for a longer duration than the second preset duration, the priority of the current task is adjusted.
例如:假设第一预置时长为5分钟,则当前任务的等待时长达到5分钟时,调整当前任务的优先级;或者,假设第二预置时长为30分钟,则当前任务在直至被处理仍需等待时长大于30分钟时,则对当前任务的优先级进行调整,以使得当前任务的优先级有所变动,以减少当前任务等待被处理的等待时长。For example, if the first preset duration is 5 minutes, the priority of the current task is adjusted when the waiting duration of the current task reaches 5 minutes; or, if the second preset duration is 30 minutes, the current task is still processed until When the waiting time is longer than 30 minutes, the priority of the current task is adjusted so that the priority of the current task is changed to reduce the waiting time for the current task to be processed.
可以理解,上述第一预置时长为5分钟,第二预置时长为30分钟,仅作为 本公开实施例中上述第一预置时长和第二预置时长的一种示例,而不理解为是对本公开实施例中上述第一预置时长和第二预置时长的一种限定,实际上,上述第一预置时长及第二预置时长可以又本领域技术人员根据任务需求自行确定,本公开实施例在此不对第一预置时长和第二预置时长加以限定。It can be understood that the first preset duration is 5 minutes, and the second preset duration is 30 minutes. An example of the first preset duration and the second preset duration in the embodiment of the present disclosure is not understood as a limitation on the first preset duration and the second preset duration in the embodiment of the present disclosure, and actually The first preset duration and the second preset duration may be determined by a person skilled in the art according to the task requirements. The first preset duration and the second preset duration are not limited herein.
在本公开实施例的一种可选实施例中,上述对所述当前任务的优先级进行调整的步骤,可以包括:In an optional embodiment of the disclosure, the step of adjusting the priority of the current task may include:
步骤A1、将所述当前任务的优先级增加第一预置幅度,以得到所述当前任务的新的优先级;Step A1: The priority of the current task is increased by a first preset amplitude to obtain a new priority of the current task.
步骤A2、将所述当前任务的新的优先级作为所述当前任务的当前优先级,返回至获取等待时长。Step A2: The new priority of the current task is used as the current priority of the current task, and returns to the acquisition waiting duration.
本公开实施例中,任务优先级可以通过数值来标识,则第一预置幅度也可以通过数值来标识,例如:假设当前任务的优先级为300,第一预置幅度为50,当前任务在队列中等待时长已满足预置条件,则调整当前任务的优先级,也即在当前优先级300的基础上增加第一预置幅度50,以得到新的优先级350,并返回步骤101,若在预置时长内,当前任务仍然没有被处理,则再次调整当前任务的优先级,也即在当前优先级350的基础上增加第一预置幅度50,以得到新的优先级400,并再次返回步骤101,直至当前任务被处理。In the embodiment of the present disclosure, the task priority may be identified by a numerical value, and the first preset amplitude may also be identified by a numerical value, for example, if the priority of the current task is 300, the first preset amplitude is 50, and the current task is If the waiting time in the queue has met the preset condition, the priority of the current task is adjusted, that is, the first preset amplitude 50 is added to the current priority 300 to obtain a new priority 350, and the process returns to step 101. If the current task is still not processed within the preset duration, the priority of the current task is adjusted again, that is, the first preset amplitude 50 is added to the current priority 350 to obtain a new priority 400, and again Return to step 101 until the current task is processed.
在本公开的一种可选实施例中,上述第一预置幅度可以设置有多个梯度;所述第一预置幅度与所需调整的任务的当前优先级相关;优先级越高,第一预置幅度越小;In an optional embodiment of the present disclosure, the first preset amplitude may be set with multiple gradients; the first preset amplitude is related to the current priority of the task to be adjusted; the higher the priority, the first The smaller the preset amplitude is;
本公开实施例中,上述第一预置幅度可以设置有多个梯度,也即不同的优先级对应不同的第一预置幅度,调整任务的优先级时,任务当前的优先级越高,则对应的第一预置幅度越小。In the embodiment of the present disclosure, the first preset amplitude may be set with multiple gradients, that is, different priorities correspond to different first preset amplitudes. When the priority of the task is adjusted, the current priority of the task is higher. The corresponding first preset amplitude is smaller.
例如:通过数值0至400来标识任务的优先级时,可以设定第一预置幅度的梯度为:优先级在0至100(包括100)范围内时,对应的第一预置幅度为100,优先级在100至200(包括200)范围内时,对应的第一预置幅度为80,优先级在200至300(包括300)范围内时,对应的第一预置幅度为60,优先级在300至400(包括400)的范围内时,对应的优先级的第一预置幅度为30;For example, when the priority of the task is identified by a value of 0 to 400, the gradient of the first preset amplitude can be set as follows: when the priority is in the range of 0 to 100 (including 100), the corresponding first preset amplitude is 100. When the priority is in the range of 100 to 200 (including 200), the corresponding first preset amplitude is 80, and when the priority is in the range of 200 to 300 (including 300), the corresponding first preset amplitude is 60, and priority is given. When the level is in the range of 300 to 400 (including 400), the first preset amplitude of the corresponding priority is 30;
假设当前任务3的优先级为200,其在队列中的等待时长满足预置条件,则 对当前任务进行优先级的调整,由于上述优先级在200至300范围内时,对应的第一预置幅度为60,因此在优先级200的基础上增加60,则当前任务3的新的优先级为260,假设当前任务队列中还存在任务1和任务2分别对应优先级为:300和400,则当前任务调整优先级后,在队列中的处理顺序没有变化,则在新的优先级下当等待时长再次满足预置条件时,再次对其优先级进行调整,得到新的优先级320,此时,任务3的优先级高于任务2,也即任务3会在任务2之前被执行,因此任务3在任务队列中的等待时长缩短了。Suppose the current task 3 has a priority of 200, and its waiting time in the queue satisfies the preset condition. The current task is prioritized. If the priority is in the range of 200 to 300, the corresponding first preset amplitude is 60. Therefore, if the priority 200 is increased by 60, the current task 3 has a new priority. The level is 260. It is assumed that there are still tasks 1 and 2 in the current task queue. The corresponding priorities are: 300 and 400. After the current task is adjusted, the processing order in the queue does not change, and the priority is under the new priority. When the waiting time length meets the preset condition again, the priority is adjusted again to obtain a new priority 320. At this time, the priority of the task 3 is higher than the task 2, that is, the task 3 is executed before the task 2. Therefore, the waiting time for task 3 in the task queue is shortened.
也即,本公开实施例中,第一预置幅度可以为固定值,也可以为梯度值,可以由本领域技术人员自行确定,本公开实施例对第一预置幅度是否为固定值并不加以限制。That is, in the embodiment of the present disclosure, the first preset amplitude may be a fixed value or a gradient value, which may be determined by a person skilled in the art, and the embodiment of the present disclosure does not apply whether the first preset amplitude is a fixed value. limit.
综上,本公开实施例提供的一种任务优先级修正方法,可以在当前任务在当前优先级下,在任务队列中的等待时长满足预置条件时,对当前任务的优先级进行调整,进而协调任务队列中的任务的处理顺序,使得优先级较低的任务在调整优先级后可以在规定时间内被处理,从而避免了由于优先级较低的任务一直处于等待被处理的状态,而造成的任务超时的问题,进而使得任务队列中的任务均可以在规定时间内被处理。In summary, the task priority correction method provided by the embodiment of the present disclosure may adjust the priority of the current task when the current task is under the current priority and the waiting time in the task queue satisfies the preset condition, and then Coordinating the processing order of the tasks in the task queue, so that the tasks with lower priority can be processed within the specified time after adjusting the priorities, thereby avoiding that the tasks with lower priorities are always waiting to be processed, thereby causing The problem of task timeout, which in turn allows tasks in the task queue to be processed within a specified time.
方法实施例二Method embodiment two
参照图2,示出了本公开的一种任务优先级修正方法实施例二的步骤流程图,可以包括:Referring to FIG. 2, a flow chart of the steps of the second embodiment of the task priority correction method of the present disclosure is shown, which may include:
步骤201、获取当前任务在当前优先级下、在任务队列中的等待时长;所述等待时长包括:第一等待时长、和/或第二等待时长;其中所述第一等待时长为所述当前任务已等待时长,所述第二等待时长为所述当前任务仍需等待时长;Step 201: Obtain a waiting duration of the current task in the task queue under the current priority; the waiting duration includes: a first waiting duration, and/or a second waiting duration; wherein the first waiting duration is the current duration The duration of the task has been waited for, and the second waiting duration is the length of time that the current task still needs to wait;
步骤202、在所述等待时长满足预置条件时,对所述当前任务的优先级进行调整;Step 202: When the waiting duration meets a preset condition, adjust a priority of the current task;
步骤203、当一任务完成时,查找所述任务队列中是否有特定属性标识相同、优先级低于该已完成任务的其他任务;Step 203: When a task is completed, search for whether there are other tasks in the task queue that have the same specific attribute identifier and have a lower priority than the completed task.
步骤204、在查找到所述任务队列中有特定属性标识相同、优先级低于该已完成任务的其他任务时,则将所述其他任务的优先级减少第二预置幅度。Step 204: When it is found that there are other tasks in the task queue with the same specific attribute identifier and lower priority than the completed task, the priority of the other tasks is decreased by the second preset range.
在本公开的一种可选实施例中,所述任务为转码任务;其中,分辨率越高 的所述转码任务优先级越低。In an optional embodiment of the present disclosure, the task is a transcoding task; wherein, the higher the resolution The lower the priority of the transcoding task.
本公开实施例中,任务队列中存在特定属性标识相同的任务的情景可以包括:对同一个视频不同分辨率的转码任务,其中,特定属性标识即用于标识转码任务对应的视频,例如:对视频A的标清分辨率的转码任务1、高清分辨率的转码任务2、1080分辨率的转码任务3等,由于上述任务1、任务2和任务3对应同一视频A的转码任务,也即上述任务1、任务2和任务3的特定属性标识相同。In the embodiment of the present disclosure, the scenario in which the task of the same attribute identifies the same task in the task queue may include: a transcoding task with different resolutions for the same video, where the specific attribute identifier is used to identify the video corresponding to the transcoding task, for example, : transcoding task for SD resolution of video A, transcoding task of HD resolution 2, transcoding task 3 of 1080 resolution, etc., since the above task 1, task 2 and task 3 correspond to transcoding of the same video A The tasks, that is, the specific attribute identifiers of Task 1, Task 2, and Task 3 above are the same.
按照传统的任务队列优先级进行任务的处理时,假设上述3个任务的优先级依次为400,300和200,则优先处理任务1,之后处理任务2和任务3,由于任务2和任务3的分辨率较高,因此转码占用的资源更多,转码所需时间更长,若任务2和任务3一直占用资源,则任务队列中的其他任务就一直处于等待被处理状态,因此可能会造成其他任务没能在规定时间内被处理,并会对转码设备的效率造成影响;When the task is processed according to the traditional task queue priority, it is assumed that the priority of the above three tasks is 400, 300 and 200, then the task 1 is processed first, and then the task 2 and the task 3 are processed, because of the tasks 2 and 3. The resolution is higher, so the transcoding takes up more resources, and the transcoding takes longer. If Task 2 and Task 3 always occupy resources, other tasks in the task queue are always waiting to be processed, so it may Causes other tasks not to be processed within the specified time, and will affect the efficiency of the transcoding equipment;
由于任务1和任务2、任务3对应同一视频的转码任务,对于视频播放网站而言,其可以按时播放某一视频,也即按时提供给用户任一分辨率的视频即可,其他分辨率的视频可以在后续的时间陆续提供给用户,基于此,本公开实施例保证可以先完成对应同一视频A的多个转码任务的一个任务即可,并可以通过调整对应同一视频A其他任务的优先级,使得其他任务的优先级降低,以将资源让给其他视频的转码任务,直至资源空闲时,再对上述视频A的其他任务进行处理。Since task 1 and task 2 and task 3 correspond to the transcoding task of the same video, for the video playing website, it can play a certain video on time, that is, the video of any resolution can be provided to the user on time, other resolutions. The video can be provided to the user at a subsequent time. Based on this, the embodiment of the present disclosure can ensure that one task corresponding to multiple transcoding tasks of the same video A can be completed first, and can be adjusted by other tasks corresponding to the same video A. The priority is such that the priority of other tasks is lowered to give resources to the transcoding tasks of other videos until the resources are idle, and then the other tasks of the video A are processed.
例如:当前任务队列中存在对视频A的标清分辨率的转码任务1、高清分辨率的转码任务2、1080分辨率的转码任务3、以及对视频B的转码任务4,其对应的优先级分别为:400,300,200,200,则先处理任务1,在任务1完成时,在任务队列中查找与任务1特定属性标识相同的其他任务,查找结果为任务2和任务3,则将任务2和任务3的优先级分别减少第二预置幅度,假设第二预置幅度为80,则任务2和任务3的当前优先级分别为:220和120,此时任务4的优先级高于任务3,则任务4可以优先于任务3被处理,从而避免了一直对视频A的所有转码任务进行处理,而使得视频B的转码任务一直处于等待中,造成的视频B不能按时转码,从而导致视频B不能按时上线提供给用户的问题。For example, there is a transcoding task for the SD resolution of the video A in the current task queue, a transcoding task of the HD resolution 2, a transcoding task 3 of the 1080 resolution, and a transcoding task 4 for the video B. The priority of each is: 400, 300, 200, 200, then the task 1 is processed first. When the task 1 is completed, the other tasks with the same attribute identifier as the task 1 are searched in the task queue, and the search results are task 2 and task 3. Then, the priorities of task 2 and task 3 are respectively reduced by the second preset amplitude, and if the second preset amplitude is 80, the current priorities of task 2 and task 3 are respectively: 220 and 120, and task 4 at this time If the priority is higher than the task 3, the task 4 can be processed in priority over the task 3. Therefore, all the transcoding tasks of the video A are always processed, and the transcoding task of the video B is always waiting, resulting in the video B. It is not possible to transcode on time, which causes the problem that Video B cannot be delivered to the user on time.
在本公开的一种可选实施例中,所述第二预置幅度可以设置有多个梯度; 所述第二预置幅度与所需调整的任务的当前优先级相关;优先级越高,第二预置幅度越大。In an optional embodiment of the present disclosure, the second preset amplitude may be set with multiple gradients; The second preset amplitude is related to a current priority of a task to be adjusted; the higher the priority, the larger the second preset amplitude.
本公开实施例中,上述第二预置幅度可以设置有多个梯度,也即不同的优先级对应不同的第二预置幅度,调整任务的优先级时,任务当前的优先级越高,则对应的第二预置幅度越大。In the embodiment of the present disclosure, the second preset amplitude may be set with multiple gradients, that is, different priorities correspond to different second preset amplitudes. When the priority of the task is adjusted, the current priority of the task is higher. The corresponding second preset amplitude is larger.
例如:通过数值0至400来标识任务的优先级时,可以设定第二预置幅度的梯度为:优先级在0至100(包括100)范围内时,对应的第二预置幅度为30,优先级在100至200(包括200)范围内时,对应的第二预置幅度为60,优先级在200至300(包括300)范围内时,对应的第二预置幅度为80,优先级在300至400(包括400)的范围内时,对应的优先级的第二预置幅度为100;For example, when the priority of the task is identified by a value of 0 to 400, the gradient of the second preset amplitude can be set as follows: when the priority is in the range of 0 to 100 (including 100), the corresponding second preset amplitude is 30. When the priority is in the range of 100 to 200 (including 200), the corresponding second preset amplitude is 60, and when the priority is in the range of 200 to 300 (including 300), the corresponding second preset amplitude is 80, and priority is given. When the level is in the range of 300 to 400 (including 400), the second preset amplitude of the corresponding priority is 100;
假设当前任务1完成时,在任务队列中查找到与任务1特定属性标识相同的任务2和任务3,且任务2和任务3对应的优先级分别为:300和200,则将任务2的优先级减少80,得到任务2新的优先级为220,任务3的优先级减少60,得到任务3新的优先级为140,若假设此时队列中存在优先级为200的任务,则该任务即可在任务3之前被处理,以能够缩短该任务在任务队列中的等待时间。Assume that when task 1 is completed, task 2 and task 3 that are the same as task 1 specific attribute identifiers are found in the task queue, and tasks 2 and 3 correspond to priorities of 300 and 200 respectively. The level is reduced by 80, the new priority of task 2 is 220, the priority of task 3 is reduced by 60, and the new priority of task 3 is 140. If it is assumed that there is a task with priority 200 in the queue at this time, the task is It can be processed before task 3 to be able to shorten the waiting time of the task in the task queue.
也即,本公开实施例中,第二预置幅度可以为固定值,也可以为梯度值,可以由本领域技术人员自行确定,本公开实施例对第二预置幅度是否为固定值并不加以限制。That is, in the embodiment of the present disclosure, the second preset amplitude may be a fixed value or a gradient value, which may be determined by a person skilled in the art, and the embodiment of the present disclosure does not apply whether the second preset amplitude is a fixed value. limit.
对于方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请实施例并不受所描述的动作顺序的限制,因为依据本申请实施例,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例所涉及的动作并不一定是本申请实施例所必须的。For the method embodiments, for the sake of brevity, they are all described as a series of action combinations, but those skilled in the art should understand that the embodiments of the present application are not limited by the described action sequence, because the embodiment according to the present application Some steps can be performed in other orders or at the same time. Secondly, those skilled in the art should also understand that the actions involved in the embodiments described in the specification are not necessarily required in the embodiments of the present application.
装置实施例一Device embodiment 1
参照图3,示出了本公开一种任务优先级修正装置实施例一的结构示意图,可以包括:获取单元301及第一调整单元302,其中,Referring to FIG. 3, a schematic structural diagram of a first embodiment of a task priority correction apparatus according to the present disclosure is shown, which may include: an obtaining unit 301 and a first adjusting unit 302, where
上述获取单元301,可以配置为获取当前任务在当前优先级下、在任务队列中的等待时长;所述等待时长可以包括:第一等待时长、和/或第二等待时长; 其中所述第一等待时长为所述当前任务已等待时长,所述第二等待时长为所述当前任务仍需等待时长;The obtaining unit 301 may be configured to acquire a waiting duration of the current task in the task queue according to the current priority; the waiting duration may include: a first waiting duration, and/or a second waiting duration; The first waiting duration is a duration of waiting for the current task, and the second waiting duration is a waiting duration of the current task.
第一调整单元302,可以配置为在所述等待时长满足预置条件时,对所述当前任务的优先级进行调整。The first adjusting unit 302 may be configured to adjust a priority of the current task when the waiting duration meets a preset condition.
在本公开的一种可选实施例中,上述第一调整单元302可以包括:In an optional embodiment of the present disclosure, the foregoing first adjusting unit 302 may include:
第一调整子单元,可以配置为将所述当前任务的优先级增加第一预置幅度,以得到所述当前任务的新的优先级;The first adjustment subunit may be configured to increase the priority of the current task by a first preset amplitude to obtain a new priority of the current task;
返回子单元,可以配置为将所述当前任务的新的优先级作为所述当前任务的当前优先级,返回至获取等待时长。Returning to the subunit, the new priority of the current task may be configured as the current priority of the current task, and returned to the acquisition waiting duration.
装置实施例二Device embodiment 2
参照图4,示出了本公开一种任务优先级修正装置实施例二的结构示意图,可以包括:获取单元401、第一调整单元402、查找单元403、及第二调整单元404,其中,Referring to FIG. 4, a schematic structural diagram of a second embodiment of a task priority modification apparatus according to the present disclosure is shown, which may include: an obtaining unit 401, a first adjusting unit 402, a searching unit 403, and a second adjusting unit 404, where
上述获取单元401,可以配置为获取当前任务在当前优先级下、在任务队列中的等待时长;所述等待时长可以包括:第一等待时长、和/或第二等待时长;其中所述第一等待时长为所述当前任务已等待时长,所述第二等待时长为所述当前任务仍需等待时长;The obtaining unit 401 may be configured to acquire a waiting duration of the current task in the task queue according to the current priority; the waiting duration may include: a first waiting duration, and/or a second waiting duration; wherein the first The waiting time is the length of time that the current task has been waiting, and the second waiting time is the length of time that the current task still needs to wait;
第一调整单元402,可以配置为在所述等待时长满足预置条件时,对所述当前任务的优先级进行调整;The first adjusting unit 402 may be configured to adjust a priority of the current task when the waiting duration meets a preset condition;
查找单元403,可以配置为当一任务完成时,查找所述任务队列中是否有特定属性标识相同、优先级低于该已完成任务的其他任务;及The searching unit 403 may be configured to: when a task is completed, find, in the task queue, whether there are other tasks whose specific attribute identifiers are the same and whose priority is lower than the completed task;
第二调整单元404,可以配置为在查找到所述任务队列中有特定属性标识相同、优先级低于该已完成任务的其他任务时,将所述其他任务的优先级减少第二预置幅度。The second adjusting unit 404 may be configured to reduce the priority of the other tasks by a second preset range when searching for other tasks in the task queue that have the same specific attribute identifier and lower priority than the completed task. .
在本公开的一种可选实施例中,上述任务为转码任务;其中,分辨率越高的所述转码任务优先级越低。In an optional embodiment of the present disclosure, the above task is a transcoding task; wherein the higher the resolution, the lower the priority of the transcoding task.
在本公开的一种可选实施例中,所述第一预置幅度可以设置有多个梯度;In an optional embodiment of the present disclosure, the first preset amplitude may be set with multiple gradients;
所述第一预置幅度与所需调整的任务的当前优先级相关;优先级越高,第 一预置幅度越小;或者,The first preset amplitude is related to a current priority of a task to be adjusted; the higher the priority, the first The smaller the preset amplitude; or,
所述第二预置幅度可以设置有多个梯度;所述第二预置幅度与所需调整的任务的当前优先级相关;优先级越高,第二预置幅度越大。The second preset amplitude may be set with a plurality of gradients; the second preset amplitude is related to a current priority of a task to be adjusted; the higher the priority, the larger the second preset amplitude.
对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
本申请实施例提供了一种非易失性计算机存储介质,所述计算机存储介质存储有计算机可执行指令,该计算机可执行指令用于执行本申请实施例中任一的任务优先级修正方法。The embodiment of the present application provides a non-volatile computer storage medium storing computer-executable instructions for performing a task priority correction method according to any one of the embodiments of the present application.
图5是本公开的一种任务优先级修正的电子设备的硬件结构示意图,如图5所示,该电子设备包括:FIG. 5 is a schematic diagram of a hardware structure of an electronic device with task priority correction according to the present disclosure. As shown in FIG. 5, the electronic device includes:
一个或多个处理器510以及存储器520,图5中以一个处理器510为例。One or more processors 510 and memory 520, one processor 510 is taken as an example in FIG.
执行任务优先级修正的方法的设备还可以包括:输入装置530和输出装置540。The apparatus for performing the method of task priority correction may further include: an input device 530 and an output device 540.
处理器510、存储器520、输入装置530和输出装置540可以通过总线或者其他方式连接,图5中以通过总线连接为例。The processor 510, the memory 520, the input device 530, and the output device 540 may be connected by a bus or other means, as exemplified by a bus connection in FIG.
存储器520作为一种非易失性计算机可读存储介质,可用于存储非易失性软件程序、非易失性计算机可执行程序以及模块,如本申请实施例中的任务优先级修正方法对应的程序指令/模块(例如,附图4所示的获取单元401、第一调整单元402、查找单元403、及第二调整单元404)。处理器510通过运行存储在存储器520中的非易失性软件程序、指令以及模块,从而执行服务器的各种功能应用以及数据处理,即实现上述方法实施例优先级修正的方法。The memory 520 is a non-volatile computer readable storage medium, and is applicable to a non-volatile software program, a non-volatile computer-executable program, and a module, as in the task priority correction method in the embodiment of the present application. Program instructions/modules (for example, acquisition unit 401, first adjustment unit 402, lookup unit 403, and second adjustment unit 404 shown in FIG. 4). The processor 510 executes various functional applications of the server and data processing by executing non-volatile software programs, instructions, and modules stored in the memory 520, that is, a method of implementing priority correction of the above-described method embodiments.
存储器520可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据优先级修正的装置的使用所创建的数据等。此外,存储器520可以包括高速随机存取存 储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实施例中,存储器520可选包括相对于处理器510远程设置的存储器,这些远程存储器可以通过网络连接至优先级修正的装置。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 520 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created by use of the device modified according to the priority, and the like. In addition, the memory 520 may include high speed random access memory. The memory may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, memory 520 can optionally include memory remotely located relative to processor 510 that can be connected to the device for priority correction via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
输入装置530可接收输入的数字或字符信息,以及产生与优先级修正的装置的用户设置以及功能控制有关的键信号输入。输出装置540可包括显示屏等显示设备。 Input device 530 can receive input numeric or character information, as well as generate key signal inputs related to user settings and function control of the device with priority correction. The output device 540 can include a display device such as a display screen.
所述一个或者多个模块存储在所述存储器520中,当被所述一个或者多个处理器510执行时,执行上述任意方法实施例中的优先级修正的方法。The one or more modules are stored in the memory 520, and when executed by the one or more processors 510, perform a method of priority correction in any of the method embodiments described above.
上述产品可执行本申请实施例所提供的方法,具备执行方法相应的功能模块和有益效果。未在本实施例中详尽描述的技术细节,可参见本申请实施例所提供的方法。The above products can perform the methods provided by the embodiments of the present application, and have the corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to the method provided by the embodiments of the present application.
本申请实施例的电子设备以多种形式存在,包括但不限于:The electronic device of the embodiment of the present application exists in various forms, including but not limited to:
(1)移动通信设备:这类设备的特点是具备移动通信功能,并且以提供话音、数据通信为主要目标。这类终端包括:智能手机(例如iPhone)、多媒体手机、功能性手机,以及低端手机等。(1) Mobile communication devices: These devices are characterized by mobile communication functions and are mainly aimed at providing voice and data communication. Such terminals include: smart phones (such as iPhone), multimedia phones, functional phones, and low-end phones.
(2)超移动个人计算机设备:这类设备属于个人计算机的范畴,有计算和处理功能,一般也具备移动上网特性。这类终端包括:PDA、MID和UMPC设备等,例如iPad。(2) Ultra-mobile personal computer equipment: This type of equipment belongs to the category of personal computers, has computing and processing functions, and generally has mobile Internet access. Such terminals include: PDAs, MIDs, and UMPC devices, such as the iPad.
(3)便携式娱乐设备:这类设备可以显示和播放多媒体内容。该类设备包括:音频、视频播放器(例如iPod),掌上游戏机,电子书,以及智能玩具和便携式车载导航设备。 (3) Portable entertainment devices: These devices can display and play multimedia content. Such devices include: audio, video players (such as iPod), handheld game consoles, e-books, and smart toys and portable car navigation devices.
(4)服务器:提供计算服务的设备,服务器的构成包括处理器、硬盘、内存、系统总线等,服务器和通用的计算机架构类似,但是由于需要提供高可靠的服务,因此在处理能力、稳定性、可靠性、安全性、可扩展性、可管理性等方面要求较高。(4) Server: A device that provides computing services. The server consists of a processor, a hard disk, a memory, a system bus, etc. The server is similar to a general-purpose computer architecture, but because of the need to provide highly reliable services, processing power and stability High reliability in terms of reliability, security, scalability, and manageability.
(5)其他具有数据交互功能的电子设备。(5) Other electronic devices with data interaction functions.
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, ie may be located A place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art can understand and implement without deliberate labor.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the various embodiments can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on such understanding, the above technical solutions may be embodied in the form of software products in essence or in the form of software products, which may be stored in a computer readable storage medium such as a ROM/RAM or a disk. , an optical disk, etc., includes instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform the methods described in various embodiments or portions of the embodiments.
以上实施例仅用以说明本公开的技术方案,而非对其限制;尽管参照前述实施例对本公开进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本公开各实施例技术方案的范围。The above embodiments are only used to illustrate the technical solutions of the present disclosure, and are not intended to be limiting; although the present disclosure has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that The technical solutions are described as being modified, or equivalent to some of the technical features are replaced; and such modifications or substitutions do not depart from the scope of the technical solutions of the embodiments of the present disclosure.
工业实用性Industrial applicability
本公开实施例提供的任务优先级修正方法和装置,能够避免任务队列中的优先级较低的任务在处理过程中,容易出现超时的问题。 The task priority correction method and apparatus provided by the embodiments of the present disclosure can avoid the problem that the task with a lower priority in the task queue is prone to timeout during the processing.

Claims (13)

  1. 一种任务优先级修正方法,应用于电子设备中,所述方法包括:A task priority correction method is applied to an electronic device, and the method includes:
    获取当前任务在当前优先级下、在任务队列中的等待时长;所述等待时长包括:第一等待时长、和/或第二等待时长;其中所述第一等待时长为所述当前任务已等待时长,所述第二等待时长为所述当前任务仍需等待时长;Obtaining a waiting duration of the current task in the task queue under the current priority; the waiting duration includes: a first waiting duration, and/or a second waiting duration; wherein the first waiting duration is that the current task has been waiting The duration of the second waiting period is that the current task still needs to wait for a duration;
    在所述等待时长满足预置条件时,对所述当前任务的优先级进行调整。When the waiting duration meets the preset condition, the priority of the current task is adjusted.
  2. 根据权利要求1所述的方法,其中,所述方法还包括:The method of claim 1 wherein the method further comprises:
    当一任务完成时,查找所述任务队列中是否有特定属性标识相同、优先级低于该已完成任务的其他任务;When a task is completed, it is found whether there are other tasks in the task queue that have the same specific attribute identifier and lower priority than the completed task;
    在查找到所述任务队列中有特定属性标识相同、优先级低于该已完成任务的其他任务时,则将所述其他任务的优先级减少第二预置幅度。When it is found that there are other tasks in the task queue with the same attribute identifier and lower priority than the completed task, the priority of the other tasks is reduced by the second preset range.
  3. 根据权利要求2所述的方法,其中,所述任务为转码任务;其中,分辨率越高的所述转码任务优先级越低。The method of claim 2, wherein the task is a transcoding task; wherein the higher the resolution, the lower the priority of the transcoding task.
  4. 根据权利要求1所述的方法,其中,所述对所述当前任务的优先级进行调整,包括:The method of claim 1, wherein the adjusting the priority of the current task comprises:
    将所述当前任务的优先级增加第一预置幅度,以得到所述当前任务的新的优先级;Adding a priority of the current task to a first preset amplitude to obtain a new priority of the current task;
    将所述当前任务的新的优先级作为所述当前任务的当前优先级,返回至获取等待时长。The new priority of the current task is taken as the current priority of the current task, and is returned to the acquisition waiting time.
  5. 根据权利要求2或4所述的方法,其中,所述第一预置幅度设置有多个梯度;The method according to claim 2 or 4, wherein said first preset amplitude is set with a plurality of gradients;
    所述第一预置幅度与所需调整的任务的当前优先级相关;优先级越高,第一预置幅度越小; The first preset amplitude is related to a current priority of a task to be adjusted; the higher the priority, the smaller the first preset amplitude;
    或者,or,
    所述第二预置幅度设置有多个梯度;The second preset amplitude is set with a plurality of gradients;
    所述第二预置幅度与所需调整的任务的当前优先级相关;优先级越高,第二预置幅度越大。The second preset amplitude is related to a current priority of a task to be adjusted; the higher the priority, the larger the second preset amplitude.
  6. 一种任务优先级修正装置,其中,所述装置包括:A task priority correction device, wherein the device comprises:
    获取单元,配置为获取当前任务在当前优先级下、在任务队列中的等待时长;所述等待时长包括:第一等待时长、和/或第二等待时长;其中所述第一等待时长为所述当前任务已等待时长,所述第二等待时长为所述当前任务仍需等待时长;The obtaining unit is configured to obtain a waiting duration of the current task in the task queue at the current priority, where the waiting duration includes: a first waiting duration, and/or a second waiting duration; wherein the first waiting duration is The duration of the current task has been waiting, and the second waiting duration is the length of time that the current task still needs to wait;
    第一调整单元,配置为在所述等待时长满足预置条件时,对所述当前任务的优先级进行调整。The first adjusting unit is configured to adjust a priority of the current task when the waiting time length satisfies a preset condition.
  7. 根据权利要求6所述的装置,其中,所述装置还包括:The apparatus of claim 6 wherein said apparatus further comprises:
    查找单元,配置为当一任务完成时,查找所述任务队列中是否有特定属性标识相同、优先级低于该已完成任务的其他任务;The searching unit is configured to: when a task is completed, find whether there are other tasks in the task queue that have the same specific attribute identifier and have a lower priority than the completed task;
    第二调整单元,配置为在查找到所述任务队列中有特定属性标识相同、优先级低于该已完成任务的其他任务时,将所述其他任务的优先级减少第二预置幅度。The second adjusting unit is configured to reduce the priority of the other tasks by a second preset range when searching for other tasks in the task queue that have the same specific attribute identifier and lower priority than the completed task.
  8. 根据权利要求7所述的装置,其中,所述任务为转码任务;其中,分辨率越高的所述转码任务优先级越低。The apparatus of claim 7, wherein the task is a transcoding task; wherein the higher the resolution, the lower the priority of the transcoding task.
  9. 根据权利要求6所述的装置,其中,所述第一调整单元包括:The apparatus of claim 6, wherein the first adjustment unit comprises:
    第一调整子单元,配置为将所述当前任务的优先级增加第一预置幅度,以得到所述当前任务的新的优先级;a first adjustment subunit, configured to increase a priority of the current task by a first preset amplitude to obtain a new priority of the current task;
    返回子单元,配置为将所述当前任务的新的优先级作为所述当前任务的当 前优先级,返回至获取等待时长。Returning to the subunit, configured to use the new priority of the current task as the current task Pre-priority, return to get waiting time.
  10. 根据权利要求7或9所述的装置,其中,所述第一预置幅度设置有多个梯度;The apparatus according to claim 7 or 9, wherein said first preset amplitude is provided with a plurality of gradients;
    所述第一预置幅度与所需调整的任务的当前优先级相关;优先级越高,第一预置幅度越小;The first preset amplitude is related to a current priority of a task to be adjusted; the higher the priority, the smaller the first preset amplitude;
    或者,or,
    所述第二预置幅度设置有多个梯度;The second preset amplitude is set with a plurality of gradients;
    所述第二预置幅度与所需调整的任务的当前优先级相关;优先级越高,第二预置幅度越大。The second preset amplitude is related to a current priority of a task to be adjusted; the higher the priority, the larger the second preset amplitude.
  11. 一种非暂态计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被电子设备执行时,使得所述电子设备执行权利要求1-5任一项所述的方法。A non-transitory computer readable storage medium storing computer executable instructions that, when executed by an electronic device, cause the electronic device to perform the method of any of claims 1-5.
  12. 一种计算机程序产品,所述计算机程序产品包括存储在非易失性计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行权利要求1-5任一项所述的方法。A computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer, causing the computer The method of any of claims 1-5.
  13. 一种电子设备,包括至少一个处理器和与所述至少一个处理器通信连接的存储器,所述存储器用于存储可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行时,使所述至少一个处理器执行权利要求1-5任一项所述的方法。 An electronic device comprising at least one processor and a memory communicatively coupled to the at least one processor, the memory for storing instructions executable by the at least one processor, the instructions being processed by the at least one When executed, the at least one processor is caused to perform the method of any of claims 1-5.
PCT/CN2016/096773 2016-03-31 2016-08-25 Task priority correctingon method and device WO2017166630A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610202886.7 2016-03-31
CN201610202886.7A CN105824698A (en) 2016-03-31 2016-03-31 Task priority correcting method and device

Publications (1)

Publication Number Publication Date
WO2017166630A1 true WO2017166630A1 (en) 2017-10-05

Family

ID=56525497

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/096773 WO2017166630A1 (en) 2016-03-31 2016-08-25 Task priority correctingon method and device

Country Status (2)

Country Link
CN (1) CN105824698A (en)
WO (1) WO2017166630A1 (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110059902A (en) * 2018-01-19 2019-07-26 招商局国际信息技术有限公司 Field bridge dispatching method, device, computer equipment and storage medium
CN110955502A (en) * 2018-09-27 2020-04-03 北京国双科技有限公司 Task scheduling method and device
CN111401639A (en) * 2020-03-18 2020-07-10 京东方科技集团股份有限公司 Material delivery method and device
CN112000454A (en) * 2020-08-27 2020-11-27 平安国际智慧城市科技股份有限公司 Multimedia data processing method and equipment
CN112291068A (en) * 2020-11-02 2021-01-29 西安博康硕达网络科技有限公司 Multimedia data processing method based on cloud storage
CN112463339A (en) * 2020-12-11 2021-03-09 北京浪潮数据技术有限公司 Multitask scheduling method, system, equipment and storage medium
CN113312511A (en) * 2021-06-11 2021-08-27 北京百度网讯科技有限公司 Method, apparatus, device and computer-readable storage medium for recommending content
CN114034493A (en) * 2021-11-04 2022-02-11 杭州海康汽车软件有限公司 Automatic parking debugging method, device and system
CN114697299A (en) * 2022-04-21 2022-07-01 湖南快乐阳光互动娱乐传媒有限公司 Audio and video transcoding priority determination method, system, device and storage medium

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105824698A (en) * 2016-03-31 2016-08-03 乐视控股(北京)有限公司 Task priority correcting method and device
CN107124635B (en) * 2017-06-06 2021-01-22 北京奇艺世纪科技有限公司 Video online method, video management system and live broadcast system
CN107577523B (en) * 2017-07-31 2021-01-05 创新先进技术有限公司 Task execution method and device
CN108920264B (en) * 2018-06-12 2020-08-28 深圳市德明利技术股份有限公司 Command timeout processing method and system
CN111552548A (en) * 2020-04-22 2020-08-18 北京金山云网络技术有限公司 Task processing method and device, electronic equipment and machine-readable storage medium
CN115460154B (en) * 2022-09-21 2024-05-10 北京东土军悦科技有限公司 Priority adjustment method and device and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1648139A1 (en) * 2004-10-07 2006-04-19 Schneider Electric Industries Sas Communication appartus and method for priority control
CN101216783A (en) * 2007-12-29 2008-07-09 中国建设银行股份有限公司 Process for optimizing ordering processing for multiple affairs
CN101996099A (en) * 2010-11-17 2011-03-30 山东中创软件工程股份有限公司 Method and system for processing information
CN105824698A (en) * 2016-03-31 2016-08-03 乐视控股(北京)有限公司 Task priority correcting method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1648139A1 (en) * 2004-10-07 2006-04-19 Schneider Electric Industries Sas Communication appartus and method for priority control
CN101216783A (en) * 2007-12-29 2008-07-09 中国建设银行股份有限公司 Process for optimizing ordering processing for multiple affairs
CN101996099A (en) * 2010-11-17 2011-03-30 山东中创软件工程股份有限公司 Method and system for processing information
CN105824698A (en) * 2016-03-31 2016-08-03 乐视控股(北京)有限公司 Task priority correcting method and device

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110059902A (en) * 2018-01-19 2019-07-26 招商局国际信息技术有限公司 Field bridge dispatching method, device, computer equipment and storage medium
CN110059902B (en) * 2018-01-19 2023-04-21 招商局国际信息技术有限公司 Method, device, computer equipment and storage medium for dispatching field bridge
CN110955502B (en) * 2018-09-27 2022-07-05 北京国双科技有限公司 Task scheduling method and device
CN110955502A (en) * 2018-09-27 2020-04-03 北京国双科技有限公司 Task scheduling method and device
CN111401639A (en) * 2020-03-18 2020-07-10 京东方科技集团股份有限公司 Material delivery method and device
CN112000454A (en) * 2020-08-27 2020-11-27 平安国际智慧城市科技股份有限公司 Multimedia data processing method and equipment
CN112291068A (en) * 2020-11-02 2021-01-29 西安博康硕达网络科技有限公司 Multimedia data processing method based on cloud storage
CN112291068B (en) * 2020-11-02 2023-08-18 重庆捷旭科技有限公司 Multimedia data processing method based on cloud storage
CN112463339A (en) * 2020-12-11 2021-03-09 北京浪潮数据技术有限公司 Multitask scheduling method, system, equipment and storage medium
CN112463339B (en) * 2020-12-11 2024-07-02 北京浪潮数据技术有限公司 Multi-task scheduling method, system, equipment and storage medium
CN113312511A (en) * 2021-06-11 2021-08-27 北京百度网讯科技有限公司 Method, apparatus, device and computer-readable storage medium for recommending content
CN113312511B (en) * 2021-06-11 2024-02-27 北京百度网讯科技有限公司 Method, apparatus, device and computer readable storage medium for recommending content
CN114034493A (en) * 2021-11-04 2022-02-11 杭州海康汽车软件有限公司 Automatic parking debugging method, device and system
CN114697299A (en) * 2022-04-21 2022-07-01 湖南快乐阳光互动娱乐传媒有限公司 Audio and video transcoding priority determination method, system, device and storage medium
CN114697299B (en) * 2022-04-21 2024-05-10 湖南快乐阳光互动娱乐传媒有限公司 Audio and video transcoding priority determining method, system and device and storage medium

Also Published As

Publication number Publication date
CN105824698A (en) 2016-08-03

Similar Documents

Publication Publication Date Title
WO2017166630A1 (en) Task priority correctingon method and device
WO2017185616A1 (en) File storage method and electronic equipment
WO2017177630A1 (en) Method and device for recommending personalized information
US20190149872A1 (en) Information exchanging method and device, audio terminal and computer-readable storage medium
WO2017107542A1 (en) Video program obtaining method, device and system
WO2017113840A1 (en) Information recommending method and device
US20170171278A1 (en) Method and electronic device for continuously playing video
US20170185454A1 (en) Method and Electronic Device for Determining Resource Consumption of Task
US20170171571A1 (en) Push Video Documentation Methods and Appliances
US20170195387A1 (en) Method and Electronic Device for Increasing Start Play Speed
US9875150B2 (en) Method and system for processing notifications amongst applications of a data processing system
US20170195617A1 (en) Image processing method and electronic device
WO2017197888A1 (en) Information sharing method, intelligent terminal, and system
US20170195384A1 (en) Video Playing Method and Electronic Device
US20170237816A1 (en) Method and electronic device for identifying device
WO2017113708A1 (en) Video playback method and device
US20170048586A1 (en) Methods and apparatuses for operating and playing a channel of a smart tv set
WO2017107531A1 (en) Volume adjustment method and terminal device
US20170155739A1 (en) Advertisement data processing method and router
US20170171491A1 (en) Method and Electronic Device for Adjusting Video Subtitles
US20170171339A1 (en) Advertisement data transmission method, electrnoic device and system
US20170188214A1 (en) Method and electronic device for sharing multimedia information
US9251359B2 (en) Method and apparatus for managing crowd sourced content creation
WO2017166640A1 (en) Application calling method and terminal
US20170192750A1 (en) Numeric conversion method and electronic device

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

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 16896400

Country of ref document: EP

Kind code of ref document: A1