Movatterモバイル変換


[0]ホーム

URL:


CN110532100B - Method, device, terminal and storage medium for scheduling resources - Google Patents

Method, device, terminal and storage medium for scheduling resources
Download PDF

Info

Publication number
CN110532100B
CN110532100BCN201910824338.1ACN201910824338ACN110532100BCN 110532100 BCN110532100 BCN 110532100BCN 201910824338 ACN201910824338 ACN 201910824338ACN 110532100 BCN110532100 BCN 110532100B
Authority
CN
China
Prior art keywords
resource
target
duration
target task
duration interval
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910824338.1A
Other languages
Chinese (zh)
Other versions
CN110532100A (en
Inventor
黄志根
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp LtdfiledCriticalGuangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201910824338.1ApriorityCriticalpatent/CN110532100B/en
Publication of CN110532100ApublicationCriticalpatent/CN110532100A/en
Application grantedgrantedCritical
Publication of CN110532100BpublicationCriticalpatent/CN110532100B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

The embodiment of the application discloses a method, a device, a terminal and a storage medium for scheduling resources, which belong to the technical field of computers. The target task is used for rendering the target frame or used for supporting the rendering of the target frame, and the running time is the accumulated running time of the target task when the terminal renders the target frame. According to the method and the device, the running time of the target task is monitored in the process of rendering the target frame, so that the terminal can master the rendering time in real time in the rendering process of the target frame, corresponding resource increment is obtained before the pause and possibly in the pause, and resource scheduling is carried out, so that the effect of effectively avoiding the pause is realized.

Description

Translated fromChinese
调度资源的方法、装置、终端及存储介质Method, device, terminal and storage medium for scheduling resources

技术领域technical field

本申请实施例涉及计算机技术领域,特别涉及一种调度资源的方法、装置、终端及存储介质。The embodiments of the present application relate to the field of computer technologies, and in particular, to a method, an apparatus, a terminal, and a storage medium for scheduling resources.

背景技术Background technique

在终端需要显示图像的过程中,终端将图像数据渲染为图像帧,并将渲染后的图像帧显示在屏幕上,以完成图像的显示工作。When the terminal needs to display an image, the terminal renders the image data into image frames, and displays the rendered image frames on the screen, so as to complete the image display work.

在一些可能的实现方式中,终端有可能因为渲染图像数据不及时,导致终端无法及时将图像帧显示在屏幕中,形成丢帧。在终端丢帧后,终端显示的视频或者动画将产生卡顿。In some possible implementation manners, the terminal may not be able to display the image frame on the screen in time because the rendering of the image data is not timely, resulting in frame loss. After the terminal loses frames, the video or animation displayed on the terminal will freeze.

发明内容SUMMARY OF THE INVENTION

本申请实施例提供了一种调度资源的方法、装置、终端及存储介质。所述技术方案如下:Embodiments of the present application provide a method, apparatus, terminal, and storage medium for scheduling resources. The technical solution is as follows:

根据本申请的一方面内容,提供了一种调度资源的方法,所述方法包括:According to an aspect of the present application, there is provided a method for scheduling resources, the method comprising:

当渲染目标帧时,获取目标任务的运行时长,所述目标任务用于渲染所述目标帧或用于支持渲染所述目标帧,所述运行时长是所述目标任务在终端渲染所述目标帧时累计运行的时长;When rendering the target frame, obtain the running duration of the target task, the target task is used to render the target frame or used to support rendering the target frame, and the running duration is when the target task renders the target frame on the terminal The cumulative running time;

根据所述运行时长,确定对应的资源增量;Determine the corresponding resource increment according to the running time;

根据所述资源增量进行资源调度。Resource scheduling is performed according to the resource increment.

根据本申请的另一方面内容,提供了一种调度资源的装置,所述装置包括:According to another aspect of the present application, there is provided an apparatus for scheduling resources, the apparatus comprising:

时长获取模块,用于当渲染目标帧时,获取目标任务的运行时长,所述目标任务用于渲染所述目标帧或用于支持渲染所述目标帧,所述运行时长是所述目标任务在终端渲染所述目标帧时累计运行的时长;The duration obtaining module is used to obtain the running duration of the target task when rendering the target frame, the target task is used to render the target frame or is used to support the rendering of the target frame, and the running duration is the duration of the target task. The accumulated running time when the terminal renders the target frame;

增量确定模块,用于根据所述运行时长,确定对应的资源增量;an increment determination module, configured to determine the corresponding resource increment according to the running duration;

资源调度模块,用于根据所述资源增量进行资源调度。A resource scheduling module, configured to perform resource scheduling according to the resource increment.

根据本申请的另一方面内容,提供了一种终端,所述终端包括处理器和存储器,所述存储器中存储有至少一条指令,所述指令由所述处理器加载并执行以实现如本申请实施提供的调度资源的方法。According to another aspect of the present application, a terminal is provided, the terminal includes a processor and a memory, the memory stores at least one instruction, and the instruction is loaded and executed by the processor to implement the method as described in the present application Implements the provided method for scheduling resources.

根据本申请的另一方面内容,提供了一种计算机可读存储介质,所述存储介质中存储有至少一条指令,所述指令由处理器加载并执行以实现如本申请实施提供的调度资源的方法。According to another aspect of the present application, a computer-readable storage medium is provided, wherein the storage medium stores at least one instruction, and the instruction is loaded and executed by a processor to implement the scheduling resource as provided by the implementation of the present application. method.

本申请实施例提供的技术方案带来的有益效果可以包括:The beneficial effects brought by the technical solutions provided in the embodiments of the present application may include:

本技术方案能够在渲染目标帧的过程中,获取目标任务的运行时长,根据该运行时长,确定对应的资源增量,当目标任务处于运行状态时,根据资源增量进行资源调度。其中,目标任务是用于渲染该目标帧或者用于支持渲染该目标帧,运行时长是目标任务在终端渲染目标帧时累计运行的时长。由于本申请提供的技术方案在渲染目标帧的过程中对目标任务的运行时长进行了监控,避免了现有技术中终端在目标帧已经渲染完成后,在读取该目标帧时才发现目标帧无法读取,造成卡顿的现象,使得终端能够在目标帧的渲染过程中实时掌握渲染时长情况,在可能造成卡顿的运行时长的情况下,获取对应的资源增量,并进行资源调度,实现了在卡顿发生之前提前增加资源增量,有效地避免了卡顿。The technical solution can obtain the running duration of the target task in the process of rendering the target frame, determine the corresponding resource increment according to the running duration, and perform resource scheduling according to the resource increment when the target task is in the running state. Wherein, the target task is used to render the target frame or used to support the rendering of the target frame, and the running duration is the cumulative running duration of the target task when the terminal renders the target frame. Because the technical solution provided by the present application monitors the running time of the target task during the process of rendering the target frame, it is avoided that the terminal in the prior art finds the target frame only when reading the target frame after the target frame has been rendered. Unable to read, causing the phenomenon of freezing, so that the terminal can grasp the rendering time in real time during the rendering process of the target frame. It is realized that the resource increment is increased in advance before the stutter occurs, which effectively avoids the stutter.

附图说明Description of drawings

为了更清楚地介绍本申请实施例中的技术方案,下面将对本申请实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。In order to introduce the technical solutions in the embodiments of the present application more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments of the present application. Obviously, the drawings in the following description are only some embodiments of the present application. , for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.

图1是本申请一个示例性实施例提供的一种终端的结构框图;1 is a structural block diagram of a terminal provided by an exemplary embodiment of the present application;

图2是本申请一个示例性实施例提供的一种调度资源的方法的流程图;FIG. 2 is a flowchart of a method for scheduling resources provided by an exemplary embodiment of the present application;

图3是本申请另一个示例性实施例提供的一种调度资源的方法流程图;FIG. 3 is a flowchart of a method for scheduling resources provided by another exemplary embodiment of the present application;

图4是基于图3所示实施例提供的一种目标任务运行时间的分布图和拟合曲线;4 is a distribution diagram and a fitting curve of the running time of a target task provided based on the embodiment shown in FIG. 3;

图5是基于图3所示实施例提供的另一种目标任务运行时间的分布图和拟合曲线;Fig. 5 is the distribution diagram and fitting curve of another target task running time provided based on the embodiment shown in Fig. 3;

图6是基于图3所示的调度资源的方法提供的部分步骤的流程图;FIG. 6 is a flowchart of some steps provided based on the method for scheduling resources shown in FIG. 3;

图7是基于图3所示的调度资源的方法提供的部分步骤的流程图;FIG. 7 is a flowchart of some steps provided based on the method for scheduling resources shown in FIG. 3;

图8是本申请一个示例性实施例提供的调度资源的装置的结构框图。FIG. 8 is a structural block diagram of an apparatus for scheduling resources provided by an exemplary embodiment of the present application.

具体实施方式Detailed ways

为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。In order to make the objectives, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.

下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相一致的装置和方法的例子。Where the following description refers to the drawings, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the illustrative examples below are not intended to represent all implementations consistent with this application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as recited in the appended claims.

在本申请的描述中,需要理解的是,术语“第一”、“第二”等仅用于描述目的,而不能理解为指示或暗示相对重要性。在本申请的描述中,需要说明的是,除非另有明确的规定和限定,术语“相连”、“连接”应做广义理解,例如,可以是固定连接,也可以是可拆卸连接,或一体地连接;可以是机械连接,也可以是电连接;可以是直接相连,也可以通过中间媒介间接相连。对于本领域的普通技术人员而言,可以具体情况理解上述术语在本申请中的具体含义。此外,在本申请的描述中,除非另有说明,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。In the description of the present application, it should be understood that the terms "first", "second" and the like are used for descriptive purposes only, and should not be construed as indicating or implying relative importance. In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "connected" and "connected" should be understood in a broad sense, for example, it may be a fixed connection, a detachable connection, or an integrated connection. Ground connection; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood in specific situations. Also, in the description of the present application, unless otherwise specified, "a plurality" means two or more. "And/or", which describes the association relationship of the associated objects, means that there can be three kinds of relationships, for example, A and/or B, which can mean that A exists alone, A and B exist at the same time, and B exists alone. The character "/" generally indicates that the associated objects are an "or" relationship.

为了本申请实施例所示方案易于理解,下面对本申请实施例中出现的若干名词进行介绍。In order to facilitate the understanding of the solutions shown in the embodiments of the present application, several terms appearing in the embodiments of the present application are introduced below.

目标帧:可以是用于显示的一个图像帧,该目标帧可以属于目标应用。当目标应用在运行时,该目标应用需要在屏幕中显示画面,画面中可以包括动画或视频。当目标应用需要在屏幕中显示动画或视频时,终端能够连续显示多个目标帧,通过连续显示目标帧的方式来形成动画或视频。在一种可能的实现方式中,若目标应用显示动画或视频的帧数是60,则目标应用在1秒内将连续显示60帧目标帧。每一帧目标帧需要先经过渲染流程,经过渲染流程后的目标帧将存储在缓冲队列中。终端能够从缓冲队列中读取经过渲染后的目标帧,并按照读取的顺序将该目标帧显示在屏幕中。Target frame: It can be an image frame for display, and the target frame can belong to the target application. When the target application is running, the target application needs to display a picture on the screen, and the picture may include animation or video. When the target application needs to display animation or video on the screen, the terminal can display multiple target frames continuously, and form animation or video by continuously displaying target frames. In a possible implementation manner, if the target application displays 60 frames of animation or video, the target application will continuously display 60 target frames within 1 second. Each frame of the target frame needs to go through the rendering process first, and the target frame after the rendering process will be stored in the buffer queue. The terminal can read the rendered target frame from the buffer queue and display the target frame on the screen in the order of reading.

目标任务:是用于渲染目标帧的任务,或者,是用于支持渲染目标帧的任务。Target task: is the task used to render the target frame, or, is the task used to support the rendering target frame.

在一种可能的实施方式中,目标任务可以属于目标应用,该目标任务是目标应用中提供的一个任务。可选地,目标任务可以是指定的进程、线程或者任务中的一个,本申请实施例对此不做限制。In a possible implementation, the target task may belong to the target application, and the target task is a task provided in the target application. Optionally, the target task may be one of a specified process, thread, or task, which is not limited in this embodiment of the present application.

可选地,目标任务可以是逻辑线程、渲染线程、资源异步加载线程、与渲染过程密切关联的系统任务,和与渲染过程密切关联的系统任务中的至少一种。其中,与渲染过程密切关联的系统任务可以是system server和surfaceflinger。Optionally, the target task may be at least one of a logic thread, a rendering thread, a resource asynchronous loading thread, a system task closely associated with the rendering process, and a system task closely associated with the rendering process. Among them, the system tasks closely related to the rendering process can be system server and surfaceflinger.

在另一种可能的实施方式中,目标任务是用于渲染目标帧的。当目标应用仅包含逻辑线程时,若该逻辑线程包含用于渲染目标帧的功能,则逻辑线程为当前的目标任务。当目标应用中包括渲染线程时,该渲染线程将作为目标任务。In another possible implementation, the target task is used to render the target frame. When the target application contains only a logical thread, if the logical thread contains the function for rendering the target frame, the logical thread is the current target task. When the target application includes a rendering thread, the rendering thread will be the target task.

在一种可能的实施方式中,终端具备识别目标任务的能力。可选地,终端可以预先保存目标任务的特征,例如目标任务的标识,终端通过识别目标任务的标识从目标应用包含的任务中确定目标任务。终端能够在目标应用运行时,对该目标应用中的任务进行识别,确定该目标应用中的目标任务。In a possible implementation, the terminal has the ability to identify the target task. Optionally, the terminal may store the characteristics of the target task in advance, such as the identifier of the target task, and the terminal determines the target task from the tasks included in the target application by identifying the identifier of the target task. The terminal can identify the task in the target application when the target application is running, and determine the target task in the target application.

运行时长:指目标任务在终端渲染目标帧时累计运行的时长。在一种可能的方式中,终端在渲染目标帧时,将监控目标任务是否处于运行状态,当目标任务处于运行状态时,终端将记录该目标任务运行的时长,在目标帧被渲染的过程中,目标任务在终端渲染目标帧时累计运行的时长都将被记录。Running time: refers to the cumulative running time of the target task when the terminal renders the target frame. In a possible way, when the terminal renders the target frame, it will monitor whether the target task is in the running state. When the target task is in the running state, the terminal will record the running time of the target task. During the process of rendering the target frame , the cumulative running time of the target task when the terminal renders the target frame will be recorded.

资源增量:用于指示终端中指定的硬件资源的增量部分。需要说明的是,终端中指定的硬件资源是用于指示为目标任务提供支持的硬件组件所提供的资源。可选地,硬件资源可以包括计算硬件资源、存储硬件资源和I/O硬件资源。Resource Increment: Used to indicate the incremental part of the hardware resource specified in the terminal. It should be noted that the hardware resource specified in the terminal is used to indicate the resource provided by the hardware component that provides support for the target task. Optionally, the hardware resources may include computing hardware resources, storage hardware resources, and I/O hardware resources.

一方面,对于计算硬件资源而言,计算硬件资源可以包括中央处理器CPU资源、图形处理器GPU资源或嵌入式神经网络处理器NPU资源等具备计算能力的芯片。需要说明的是,无论是CPU、GPU还是NPU,都可以集成多个核心,在多个核心中还可以包括计算能力有区别的第一核心和第二核心。例如,第一核心的计算能力强于第二核心的计算能力。在一种可能的命名方式中,第一核心可以被称为大核,第二核心可以被称为小核。在多个任务共同需要使用一个核心时,终端能够通过时钟终端等方式实现计算硬件资源的调度。On the one hand, for computing hardware resources, the computing hardware resources may include chips with computing capabilities, such as central processing unit CPU resources, graphics processing unit GPU resources, or embedded neural network processor NPU resources. It should be noted that, whether it is a CPU, a GPU or an NPU, multiple cores can be integrated, and the multiple cores can also include a first core and a second core with different computing capabilities. For example, the computing power of the first core is stronger than the computing power of the second core. In one possible nomenclature, the first core may be referred to as the large core and the second core may be referred to as the small core. When multiple tasks jointly need to use one core, the terminal can realize the scheduling of computing hardware resources by means of clock terminal or the like.

例如,当资源增量包括计算硬件资源时,该资源增量可以是增加的使用处理器的时长、处理能力较强的核心或额外增加的核心中的一种。For example, when the resource increment includes computing hardware resources, the resource increment may be one of increased processor usage time, cores with higher processing power, or additional cores.

另一方面,对于存储硬件资源而言,存储硬件资源通常包括内存和外存。在一种可能的实现方式中,内存可以是随机访问存储器RAM,终端是通过系统总线访问内存的。终端是通过标准的I/O端口来访问外存的。On the other hand, for storage hardware resources, storage hardware resources usually include memory and external memory. In a possible implementation manner, the memory may be a random access memory RAM, and the terminal accesses the memory through a system bus. Terminals access external memory through standard I/O ports.

例如,当资源增量包括存储硬件资源时,该资源增量可以是增加的内存容量或外存容量中的一种。For example, when the resource increment includes storage hardware resources, the resource increment may be one of increased memory capacity or external memory capacity.

另一方面,对于I/O硬件资源而言,I/O硬件资源包括I/O接口芯片和I/O接口控制卡。其中,I/O接口芯片大都是集成电路,并用于通过CPU输入不同的命令和参数,控制相关的I/O电路和外设作相应的操作。例如,常见的接口芯片如定时计数器、中断控制器、DMA(英文:Direct Memory Access,中文:直接内存存取)控制器和并行接口等。I/O接口控制卡由若干个集成电路按一定的逻辑组成为一个部件,或者直接与CPU设置在主板上,或者作为一个插件插接在系统总线插槽中。On the other hand, for I/O hardware resources, the I/O hardware resources include I/O interface chips and I/O interface control cards. Among them, most of the I/O interface chips are integrated circuits, and are used to input different commands and parameters through the CPU to control the relevant I/O circuits and peripherals to perform corresponding operations. For example, common interface chips such as timer counters, interrupt controllers, DMA (English: Direct Memory Access, Chinese: Direct Memory Access) controllers and parallel interfaces, etc. The I/O interface control card is composed of several integrated circuits according to a certain logic to form a component, or is directly arranged with the CPU on the motherboard, or is inserted into the system bus slot as a plug-in.

例如,当资源增量包括I/O硬件资源时,该资源增量可以是增加允许调用的I/O频率。For example, when the resource increment includes I/O hardware resources, the resource increment may be an increase in the frequency of I/O calls allowed.

示例性地,本申请实施例所示的调度资源的方法,可以应用在终端中,该终端具备显示屏且具备调度资源的功能。终端可以包括手机、平板电脑、膝上型电脑、台式电脑、电脑一体机、服务器、工作站、电视、机顶盒、智能眼镜、智能手表、数码相机、MP4播放终端、MP5播放终端、学习机、点读机、电纸书、电子词典、车载终端、虚拟现实(Virtual Reality,VR)播放终端或增强现实(Augmented Reality,AR)播放终端等。Exemplarily, the method for scheduling resources shown in the embodiments of the present application may be applied to a terminal, where the terminal has a display screen and has a function of scheduling resources. Terminals can include mobile phones, tablet computers, laptop computers, desktop computers, computer all-in-one computers, servers, workstations, TVs, set-top boxes, smart glasses, smart watches, digital cameras, MP4 playback terminals, MP5 playback terminals, learning machines, point-to-point reading Computers, electronic paper books, electronic dictionaries, in-vehicle terminals, virtual reality (Virtual Reality, VR) playback terminals or augmented reality (Augmented Reality, AR) playback terminals, etc.

请参考图1,图1是本申请一个示例性实施例提供的终端的结构框图,如图1所示,该终端包括处理器120和存储器140,所述存储器140中存储有至少一条指令,所述指令由所述处理器120加载并执行以实现如本申请各个方法实施例所述的调度资源的方法。可选地,终端100还包括显示组件160,显示组件160能够显示经过渲染后的目标帧。Please refer to FIG. 1. FIG. 1 is a structural block diagram of a terminal provided by an exemplary embodiment of the present application. As shown in FIG. 1, the terminal includes aprocessor 120 and amemory 140. Thememory 140 stores at least one instruction, so The instructions are loaded and executed by theprocessor 120 to implement the method for scheduling resources according to the various method embodiments of this application. Optionally, the terminal 100 further includes adisplay component 160, and thedisplay component 160 can display the rendered target frame.

在本申请中,终端100是具备渲染目标帧的功能的电子设备。当终端100渲染目标帧时,终端100能够获取目标任务的运行时长,该目标任务是用于渲染目标帧或用于支持渲染目标帧,运行时长是目标任务在终端渲染目标帧时累计运行的时长;终端将根据运行时长,确定对应的资源增量,根据资源增量进行资源调度。In this application, the terminal 100 is an electronic device having a function of rendering a target frame. When the terminal 100 renders the target frame, the terminal 100 can obtain the running duration of the target task, which is used for rendering the target frame or used to support the rendering of the target frame, and the running duration is the cumulative running duration of the target task when the terminal renders the target frame ; The terminal will determine the corresponding resource increment according to the running time, and perform resource scheduling according to the resource increment.

处理器120可以包括一个或者多个处理核心。处理器120利用各种接口和线路连接整个终端100内的各个部分,通过运行或执行存储在存储器140内的指令、程序、代码集或指令集,以及调用存储在存储器140内的数据,执行终端100的各种功能和处理数据。可选的,处理器120可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable LogicArray,PLA)中的至少一种硬件形式来实现。处理器120可集成中央处理器(CentralProcessing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示屏所需要显示的内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器120中,单独通过一块芯片进行实现。Processor 120 may include one or more processing cores. Theprocessor 120 uses various interfaces and lines to connect various parts in theentire terminal 100, and executes the terminal by running or executing the instructions, programs, code sets or instruction sets stored in thememory 140, and calling the data stored in thememory 140. 100 various functions and processing data. Optionally, theprocessor 120 may use at least one of a digital signal processing (Digital Signal Processing, DSP), a Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and a Programmable Logic Array (Programmable Logic Array, PLA) implemented in hardware. Theprocessor 120 may integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU), a modem, and the like. Among them, the CPU mainly handles the operating system, user interface, and application programs; the GPU is used to render and draw the content that needs to be displayed on the display screen; the modem is used to handle wireless communication. It can be understood that, the above-mentioned modem may not be integrated into theprocessor 120, but is implemented by a single chip.

存储器140可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory)。可选的,该存储器140包括非瞬时性计算机可读介质(non-transitory computer-readable storage medium)。存储器140可用于存储指令、程序、代码、代码集或指令集。存储器140可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等;存储数据区可存储下面各个方法实施例中涉及到的数据等。Thememory 140 may include random access memory (Random Access Memory, RAM), or may include read-only memory (Read-Only Memory). Optionally, thememory 140 includes a non-transitory computer-readable storage medium.Memory 140 may be used to store instructions, programs, codes, sets of codes, or sets of instructions. Thememory 140 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), Instructions, etc., used to implement the following method embodiments; the storage data area can store data and the like involved in the following method embodiments.

显示组件160,可以是显示屏,该显示屏可以是LED(英文:Light Emitting Diode,中文:发光二极管)显示器、投影组件或OLED(英文:OrganicLight-Emitting Diode,中文:有机电激光显示)显示器。需要说明的是,终端100中可以包括显示组件160。在另一种可能的方式中,终端100中可以仅包括处理器120和存储器140,显示组件160作为独立的设备接收终端100完成渲染的目标帧,并显示该目标帧。例如,终端100可以是电视机顶盒、电脑主机或车载终端等计算机设备,本处仅做示例性说明,不对本申请中终端100可能的形态行程限定。Thedisplay component 160 may be a display screen, and the display screen may be an LED (English: Light Emitting Diode, Chinese: Light Emitting Diode) display, a projection component or an OLED (English: Organic Light-Emitting Diode, Chinese: organic electro-optical laser display) display. It should be noted that the terminal 100 may include adisplay component 160 . In another possible manner, the terminal 100 may only include theprocessor 120 and thememory 140, and thedisplay component 160, as an independent device, receives the target frame rendered by the terminal 100, and displays the target frame. For example, the terminal 100 may be a computer device such as a TV set-top box, a computer host, or a vehicle-mounted terminal, which is only illustratively described here, and the possible form and itinerary of the terminal 100 in this application are not limited.

请参考图2,图2是本申请一个示例性实施例提供的调度资源的方法的流程图。该调度资源的方法可以应用在上述所示的终端中。在图2中,调度资源的方法包括:Please refer to FIG. 2, which is a flowchart of a method for scheduling resources provided by an exemplary embodiment of the present application. The method for scheduling resources can be applied to the terminals shown above. In Figure 2, the method for scheduling resources includes:

步骤210,当渲染目标帧时,获取目标任务的运行时长,目标任务用于渲染目标帧或用于支持渲染目标帧,运行时长是目标任务在终端渲染目标帧时累计运行的时长。Step 210, when rendering the target frame, obtain the running duration of the target task, the target task is used to render the target frame or used to support the rendering of the target frame, and the running duration is the accumulated running duration of the target task when the terminal renders the target frame.

在本申请实施例中,终端中可以运行目标任务。在目标任务运行时,终端能够完成一个目标帧的渲染工作。若当显示目标帧的目标应用的帧率确定时,帧长也随即确定。例如,目标应用的帧率为50帧,则目标帧的帧长是20毫秒。终端每过20毫秒,将一帧图像刷新到显示组件中。若终端在上一帧目标帧显示完成后,下一帧目标仍未渲染完毕,则终端显示的画面会发生卡顿。In this embodiment of the present application, the target task may be executed in the terminal. When the target task is running, the terminal can complete the rendering of a target frame. If the frame rate of the target application that displays the target frame is determined, the frame length is also determined immediately. For example, if the frame rate of the target application is 50 frames, the frame length of the target frame is 20 milliseconds. The terminal refreshes one frame of image to the display component every 20 milliseconds. If the terminal displays the target frame of the previous frame, and the rendering of the target frame of the next frame is not completed, the screen displayed by the terminal will freeze.

在本申请实施例中,终端渲染每一帧目标帧的最长时长可以是帧长。若终端渲染目标帧的时长长于帧长时,终端则会发生卡顿。因此,本申请设计了一种方案,能够在终端开始渲染目标帧的过程中,实时获取目标任务的运行时长。其中,目标任务是用于渲染目标帧或用于支持渲染目标帧,运行时长是目标任务在终端渲染目标帧时累积运行的时长。In this embodiment of the present application, the longest duration for the terminal to render each frame of the target frame may be the frame length. If the duration of the terminal rendering the target frame is longer than the frame length, the terminal will freeze. Therefore, the present application devises a solution, which can obtain the running time of the target task in real time during the process that the terminal starts to render the target frame. The target task is used to render the target frame or used to support the rendering of the target frame, and the running time is the cumulative running time of the target task when the terminal renders the target frame.

步骤220,根据运行时长,确定对应的资源增量。Step 220: Determine the corresponding resource increment according to the running time.

在本申请实施例中,终端在获取到运行时长后,能够根据运行时长,确定对应的资源增量。需要说明的是,本申请所指示的资源增量可以是一种硬件资源的增量,也可以是多种硬件资源的增量。In this embodiment of the present application, after acquiring the running duration, the terminal can determine the corresponding resource increment according to the running duration. It should be noted that the resource increment indicated in this application may be an increment of a hardware resource, or may be an increment of multiple hardware resources.

在一种可能的方式中,若资源增量是一种硬件资源的增量,则终端能够根据预先标定的运行时长与资源增量的对应关系,确定运行时长对应的资源增量。例如,请参见表一。In a possible manner, if the resource increment is a hardware resource increment, the terminal can determine the resource increment corresponding to the running duration according to the pre-calibrated correspondence between the running duration and the resource increment. For example, see Table 1.

表一Table I

运行时长runtime(8ms,12ms](8ms, 12ms](12ms,16ms](12ms, 16ms](16ms,20ms](16ms, 20ms](20ms,+∞](20ms, +∞]资源增量Resource increment增加30%30% increase增加60%60% increase增加90%90% increase增加100%100% increase

在表一所示的数据中,将运行时长分为四个时长区间。第一个时长区间是(0,7ms]、第二个时长区间是(7ms,14ms]、第三个时长区间是(14ms,20ms]以及第四个时长区间是(20ms,+∞]。每一个时长区间都对应有一个资源增量,该资源增量可以以当前目标应用所使用的资源量为基数,确定具体的资源增量。In the data shown in Table 1, the running duration is divided into four duration intervals. The first duration interval is (0, 7ms], the second duration interval is (7ms, 14ms], the third duration interval is (14ms, 20ms] and the fourth duration interval is (20ms, +∞]. Each Each time interval corresponds to a resource increment, and the resource increment can be based on the resource amount used by the current target application to determine a specific resource increment.

例如,在一种可能的方式中,若资源量是内存容量,且当前目标任务占用的内存容量是200MB。在此情况中,若目标任务当前的运行时长是9ms,该运行时长落在(8ms,12ms]的区间内,终端确认目标任务的资源增量是增加30%,也即在当前目标任务占用的内存容量200MB的基础上增加30%,增加60MB内存容量。在表一所示的数据中,运行时长和资源增量之间的关系可以是开发人员事先标定的,也可以是终端根据运行时长的统计数据,进而实时维护的并标定的。For example, in a possible manner, if the amount of resources is the memory capacity, and the memory capacity occupied by the current target task is 200MB. In this case, if the current running duration of the target task is 9ms, and the running duration falls within the interval of (8ms, 12ms), the terminal confirms that the resource increment of the target task is increased by 30%, that is, the current target task occupies The memory capacity is increased by 30% on the basis of the 200MB memory capacity, and the memory capacity is increased by 60MB. In the data shown in Table 1, the relationship between the running time and the resource increment can be pre-calibrated by the developer, or it can be determined by the terminal according to the running time. Statistics are maintained and calibrated in real time.

可选地,在表一示出的实现方式中,未示出运行时长不大于8毫秒(即8ms)时的处理情况。在本申请的一种可能的实施方式中,当运行时长小于最低阈值时,认为目标任务处于正常的工作状态,此时不为目标任务增加新的资源增量。Optionally, in the implementation manner shown in Table 1, the processing situation when the running duration is not greater than 8 milliseconds (ie, 8 ms) is not shown. In a possible implementation of the present application, when the running duration is less than the minimum threshold, it is considered that the target task is in a normal working state, and no new resource increment is added to the target task at this time.

需要说明的是,表一示出的调整方式仅为示例性说明本申请能够为不同的运行时长提供对应的资源增量,并不对本申请中运行时长和资源增量的具体数值作出限定。在一种可能的方式中,终端还能够将运行时长切分为更小的粒度,切分后的运行时长各自对应不同的资源增量。It should be noted that the adjustment methods shown in Table 1 are only illustrative to illustrate that the present application can provide corresponding resource increments for different running durations, and do not limit the specific numerical values of running durations and resource increments in the present application. In a possible manner, the terminal can further divide the runtime length into smaller granularities, and the segmented runtime lengths each correspond to different resource increments.

步骤230,根据资源增量进行资源调度。Step 230: Perform resource scheduling according to the resource increment.

在本申请实施例中,终端在获取到资源增量后,能够根据资源增量进行资源调度。In this embodiment of the present application, after acquiring the resource increment, the terminal can perform resource scheduling according to the resource increment.

在一种可能的实现方式中,终端将按照资源增量直接进行资源调度。例如,当目标任务原本占用的内存容量是200MB,终端确定的资源增量是60MB内存容量,则终端新增加60MB内存容量分配给目标任务。In a possible implementation manner, the terminal will directly perform resource scheduling according to the resource increment. For example, when the memory capacity originally occupied by the target task is 200MB, and the resource increment determined by the terminal is 60MB memory capacity, the terminal adds 60MB memory capacity and allocates it to the target task.

在另一种可能的实现方式中,终端将根据资源增量结合系统整体的资源调度策略,为目标线程进行资源调度。例如,当目标任务原本占用的内存容量是200MB,终端确定的资源增量是60MB内存容量,则终端将目标任务需要新增60MB的内存容量结合系统整体的资源调度策略进行调度。可选地,系统整体的资源调度策略可以按照当前申请资源的任务的优先级,为各个资源设置权重。终端根据资源的权重,从当前系统剩余资源中为目标任务新调度资源。例如,当前系统剩余150MB内存容量,目标任务的权重是30%,则目标任务根据权重实际新增的内存容量为45MB。In another possible implementation manner, the terminal will perform resource scheduling for the target thread according to the resource increment combined with the overall resource scheduling policy of the system. For example, when the memory capacity originally occupied by the target task is 200MB, and the resource increment determined by the terminal is 60MB memory capacity, the terminal schedules the target task with the additional 60MB memory capacity combined with the overall resource scheduling policy of the system. Optionally, the overall resource scheduling policy of the system may set a weight for each resource according to the priority of the task currently applying for the resource. The terminal newly schedules resources for the target task from the remaining resources of the current system according to the weight of the resources. For example, if the current system has a remaining memory capacity of 150MB and the weight of the target task is 30%, the actual new memory capacity of the target task according to the weight is 45MB.

综上所述,本实施例提供的调度资源的方法,能够在渲染目标帧的过程中,获取目标任务的运行时长,根据该运行时长,确定对应的资源增量,当目标任务处于运行状态时,根据资源增量进行资源调度。其中,目标任务是用于渲染该目标帧或者用于支持渲染该目标帧,运行时长是目标任务在终端渲染目标帧时累计运行的时长。由于本申请提供的技术方案在渲染目标帧的过程中对目标任务的运行时长进行了监控,避免了现有技术中终端在目标帧已经渲染完成后,在读取该目标帧时才发现目标帧无法读取,造成卡顿的现象,使得终端能够在目标帧的渲染过程中实时掌握渲染时长情况,在可能造成卡顿的运行时长的情况下,获取对应的资源增量,并进行资源调度,实现了在卡顿发生之前提前增加资源增量,有效地避免了卡顿。To sum up, the method for scheduling resources provided in this embodiment can obtain the running duration of the target task in the process of rendering the target frame, and determine the corresponding resource increment according to the running duration. When the target task is in the running state , and perform resource scheduling according to resource increments. Wherein, the target task is used to render the target frame or used to support the rendering of the target frame, and the running duration is the cumulative running duration of the target task when the terminal renders the target frame. Because the technical solution provided by the present application monitors the running time of the target task during the process of rendering the target frame, it is avoided that the terminal in the prior art finds the target frame only when reading the target frame after the target frame has been rendered. Unable to read, causing the phenomenon of freezing, so that the terminal can grasp the rendering time in real time during the rendering process of the target frame. It is realized that the resource increment is increased in advance before the stutter occurs, which effectively avoids the stutter.

基于上一个实施例所公开的方案,终端还能够通过终端自身运行目标任务的历史情况,主动标定运行时长和资源增量的关系,并根据标定后的运行时长和资源增量之间的关系确定资源增量,根据该资源增量,请参考如下实施例。Based on the solution disclosed in the previous embodiment, the terminal can also actively calibrate the relationship between the running duration and the resource increment through the history of the terminal itself running the target task, and determine the relationship between the calibrated running duration and the resource increment. Resource increment, according to the resource increment, please refer to the following embodiment.

请参见图3,图3是本申请另一个示例性实施例提供的调度资源的方法流程图。该调度资源的方法可以应用在上述所示的终端中。在图3中,该调度资源的方法包括:Please refer to FIG. 3, which is a flowchart of a method for scheduling resources provided by another exemplary embodiment of the present application. The method for scheduling resources can be applied to the terminals shown above. In Figure 3, the method for scheduling resources includes:

步骤310,当渲染目标帧时,获取目标任务的运行时长。Step 310, when rendering the target frame, obtain the running duration of the target task.

在本申请实施例中,步骤310的执行过程和步骤210的执行过程相同,此处不再赘述。In this embodiment of the present application, the execution process ofstep 310 is the same as that ofstep 210, and details are not repeated here.

步骤321,确定运行时长所在的第一时长区间。Step 321: Determine the first duration interval in which the running duration is located.

在本申请实施例中,终端能够在获取目标任务的运行时长之后,确定该运行时长所在的第一时长区间。需要说明的是,该时长区间可以是预先确定的时长区间,终端能够将目标任务的运行时长和预先确定的时长区间进行比较,当运行时长的数值属于一个时长区间中时,终端能够将该包含运行时长的时长区间确定为第一时长区间。In this embodiment of the present application, after acquiring the running duration of the target task, the terminal can determine the first duration interval in which the running duration is located. It should be noted that the duration interval may be a predetermined duration interval, and the terminal can compare the running duration of the target task with the predetermined duration interval. When the value of the running duration belongs to a duration interval, the terminal can The duration interval of the running duration is determined as the first duration interval.

在本申请实施例中,终端在执行完成步骤321后,可以执行步骤(a1)、步骤(a2)、步骤(a3)、步骤(a4)、步骤(a5)和步骤(a6),以更新或者新建调度策略数据。终端在执行完成步骤(a6)后,可以执行步骤322。In this embodiment of the present application, after completingstep 321, the terminal may perform step (a1), step (a2), step (a3), step (a4), step (a5) and step (a6) to update or Create new scheduling policy data. After completing step (a6), the terminal may executestep 322.

其中,步骤(a1)至步骤(a6)的执行过程如下:Wherein, the execution process of step (a1) to step (a6) is as follows:

步骤(a1),确定目标应用运行时的帧长,目标应用是目标帧所属的应用。Step (a1), determine the frame length of the target application when the target application is running, and the target application is the application to which the target frame belongs.

在本申请实施例中,终端确定目标应用运行时的帧长,该目标应用是目标帧所属的应用。需要说明的是,在本申请的实际应用过程中,终端能够识别当前进行渲染工作的图像帧的来源,也即终端能够获取该图像帧所属的目标应用的标识。当通过应用的标识确定被渲染的图像帧是目标应用中的目标帧时,确定目标应用运行时的帧长。In this embodiment of the present application, the terminal determines the frame length of the target application when the target application is running, and the target application is the application to which the target frame belongs. It should be noted that, in the actual application process of the present application, the terminal can identify the source of the image frame currently being rendered, that is, the terminal can obtain the identifier of the target application to which the image frame belongs. When it is determined by the identification of the application that the image frame to be rendered is the target frame in the target application, the frame length of the target application when running is determined.

在一种可能的方式中,帧长用于表示每一帧的长度,帧长=单位时长/单位时长内的帧数。例如,当单位时长是1秒,单位时长内的帧数是50时,帧长为20毫秒。In a possible manner, the frame length is used to represent the length of each frame, and the frame length=unit duration/the number of frames in the unit duration. For example, when the unit duration is 1 second and the number of frames in the unit duration is 50, the frame length is 20 milliseconds.

步骤(a2),将帧长分为n个长度相等的时长区间,n为正整数。In step (a2), the frame length is divided into n equal length intervals, where n is a positive integer.

在本申请实施例中,终端将帧长分为n个长度相等的时长区间,n是正整数。需要说明的是,n为不小于2的正整数。由于后续步骤需要对大量的数据进行统计,因此需要将时长区间分为长度相等的区间,使得统计得到的数据有代表意义。例如,当目标帧所在的目标应用的帧长是20毫秒时,目标应用在1秒钟内将显示50帧的目标帧,在10分钟将显示30000帧的目标帧。In this embodiment of the present application, the terminal divides the frame length into n equal-length duration intervals, where n is a positive integer. It should be noted that n is a positive integer not less than 2. Since a large amount of data needs to be counted in the subsequent steps, it is necessary to divide the time interval into intervals of equal length, so that the data obtained by the statistics are representative. For example, when the frame length of the target application where the target frame is located is 20 milliseconds, the target application will display 50 target frames in 1 second and 30,000 target frames in 10 minutes.

步骤(a3),统计目标任务的m个完成时长分布在时长区间的数据,完成时长用于指示目标任务,处理完成目标应用中的一帧图像时累计花费的时长,m为正整数。In step (a3), the data of m completion durations of the target task distributed in the duration interval are counted, and the completion duration is used to indicate the target task, and the accumulated time spent processing a frame of images in the target application, m is a positive integer.

在本申请实施例中,终端将统计目标任务的m个完成时长分布在时长区间的数据。需要说明的是,m个完成时长指的是目标任务处理完成目标应用中的一帧图像时累计花费的时长,m也为正整数。In the embodiment of the present application, the terminal distributes the data of m completion durations of the target task in the duration interval. It should be noted that the m completion durations refer to the accumulated durations spent by the target task to process and complete one frame of images in the target application, and m is also a positive integer.

在一种可能的实现方式中,当目标任务渲染一个目标帧时,该目标帧将对应一个完成时长。例如,请参见表二。In a possible implementation manner, when the target task renders a target frame, the target frame will correspond to a completion duration. For example, see Table II.

表二Table II

目标帧target frame目标帧g1target frame g1目标帧g2target frame g2目标帧g3target frame g3目标帧g4target frame g4完成时长completion time12毫秒12ms10毫秒10 ms13毫秒13 ms9毫秒9 ms

在表二所示的数据中,当终端在渲染目标帧g1时,目标任务累积消耗的完成时长是12毫秒,以完成针对目标帧g1的渲染工作。当终端在渲染另一目标帧g2时,目标任务累积消耗的完成时长是10毫秒,以完成针对目标帧g2的渲染工作。当终端在渲染另一目标帧g3时,目标任务累积消耗的完成时长是13毫秒,以完成针对目标帧g3的渲染工作。当终端在渲染另一目标帧g4时,目标任务累积消耗的完成时长是9毫秒,以完成针对目标帧g4的渲染工作。In the data shown in Table 2, when the terminal is rendering the target frame g1, the completion time of the target task cumulative consumption is 12 milliseconds to complete the rendering work for the target frame g1. When the terminal is rendering another target frame g2, the completion time of the cumulative consumption of the target task is 10 milliseconds to complete the rendering work for the target frame g2. When the terminal is rendering another target frame g3, the target task accumulatively consumes a completion time of 13 milliseconds to complete the rendering work for the target frame g3. When the terminal is rendering another target frame g4, the target task accumulatively consumes a completion time of 9 milliseconds to complete the rendering work for the target frame g4.

若时长区间包括(8ms,12ms]和(12ms,16ms],则终端在本步骤中确定目标帧g1、目标帧g2和目标帧g4的完成时长均落入时长区间(8ms,12ms],确定目标帧g3的完成时长落入时长区间(12ms,16ms]。If the duration interval includes (8ms, 12ms] and (12ms, 16ms], then the terminal determines in this step that the completion durations of the target frame g1, target frame g2 and target frame g4 all fall within the duration interval (8ms, 12ms], and the target is determined. The completion duration of the frame g3 falls into the duration interval (12ms, 16ms].

需要说明的是,表二所示目标帧的与对应时长的关系仅为示例性说明。在实际操作的过程中,时长区间可以划分为较小粒度。例如,若帧长为16.7毫秒,则时长区间可以以17微秒为一个时长区间的区间长度,对16.7毫秒的帧长进行划分。It should be noted that the relationship between the target frame and the corresponding duration shown in Table 2 is only an exemplary illustration. During the actual operation, the time interval can be divided into smaller granularities. For example, if the frame length is 16.7 milliseconds, the duration interval may take 17 microseconds as the interval length of a duration interval, and divide the frame length of 16.7 milliseconds.

请参照图4,图4是基于图3所示实施例提供的一种目标任务运行时间的分布图和拟合曲线。类似的,请参照图5,图5是基于图3所示实施例提供的另一种目标任务运行时间的分布图和拟合曲线。在图4和图5中,纵坐标是目标任务的运行时长的概率,横坐标是运行时长的时间长度。Please refer to FIG. 4 , which is a distribution diagram and a fitting curve of the running time of a target task provided based on the embodiment shown in FIG. 3 . Similarly, please refer to FIG. 5 , which is a distribution diagram and a fitting curve of the running time of another target task provided based on the embodiment shown in FIG. 3 . In Figures 4 and 5, the ordinate is the probability of the running duration of the target task, and the abscissa is the duration of the running duration.

在图4所示的示例中,该时间单位是毫秒。需要说明的是,图4所示的目标任务是以游戏类应用A的逻辑线程为例进行统计获得的数据。In the example shown in Figure 4, the time unit is milliseconds. It should be noted that, the target task shown in FIG. 4 is the data obtained by statistics on the logic thread of the game application A as an example.

在图5所示的示例中,该时间单位是毫秒。需要说明的是,图5所示的目标任务是以游戏类应用B的逻辑线程为例进行统计获得的数据。In the example shown in Figure 5, the time unit is milliseconds. It should be noted that, the target task shown in FIG. 5 is the data obtained by statistics on the logic thread of the game application B as an example.

步骤(a4),获取第i时长区间对应的完成时长的第一数目,i是不小于2且不大于n的整数。Step (a4): Obtain the first number of completion durations corresponding to the i-th duration interval, where i is an integer not less than 2 and not greater than n.

在本申请实施例中,终端能够获取第i时长区间对应的完成时长的第一数目,其中,i是不小于2且不大于n的整数。在本步骤中,终端将获取每一个时长区间对应的完成时长的数目。例如,若时长区间共分为(8ms,12ms]、(12ms,16ms]、(16ms,20ms]和(20ms,+∞],且被统计的目标帧的总数为10000帧。则在本步骤中终端可以统计落在各个时长区间内的第一数目,详情可参见表三。In this embodiment of the present application, the terminal can obtain the first number of completion durations corresponding to the i-th duration interval, where i is an integer not less than 2 and not greater than n. In this step, the terminal will acquire the number of completion durations corresponding to each duration interval. For example, if the duration interval is divided into (8ms, 12ms], (12ms, 16ms], (16ms, 20ms] and (20ms, +∞], and the total number of target frames to be counted is 10,000 frames. In this step. The terminal can count the first number that falls within each time interval. For details, see Table 3.

表三Table 3

时长区间time interval(8ms,12ms](8ms, 12ms](12ms,16ms](12ms, 16ms](16ms,20ms](16ms, 20ms](20ms,+∞](20ms, +∞]第一数目first number3500350010001000500500120120资源增量Resource increment增加30%30% increase增加60%60% increase增加90%90% increase增加100%100% increase

由表三所示数据可知,被统计的10000帧目标帧中,有3500帧的目标帧被处理时,目标任务的运行时长处于(8ms,12ms]。类似的,表三中被统计的四个区间对应的第一数目的总数是5120帧,也即,处于[0,8ms]内的运行时长对应的目标帧的第一数目是4880帧。From the data shown in Table 3, it can be seen that among the 10,000 target frames that are counted, when 3,500 target frames are processed, the running time of the target task is (8ms, 12ms). Similarly, the four counted in Table 3 The total number of the first number corresponding to the interval is 5120 frames, that is, the first number of target frames corresponding to the running duration within [0, 8ms] is 4880 frames.

步骤(a5),当第一数目占m个完成时长的比例不小于预设比例阈值时,将第i时长区间至第n时长区间分别与(n-i+1)个资源增量关联。Step (a5), when the ratio of the first number to the m completion durations is not less than the preset ratio threshold, associate the i-th duration interval to the n-th duration interval with (n-i+1) resource increments respectively.

在本申请实施例中,预设比例阈值可以是事先设定在终端中的数值,当某个时长区间对应的第一数目占m个完成时长的比例不小于预设比例阈值时,终端将第i时长区间至第n时长区间分别与(n-i+1)个资源增量关联。In this embodiment of the present application, the preset ratio threshold may be a value set in the terminal in advance, and when the ratio of the first number corresponding to a certain duration interval to the m completed durations is not less than the preset ratio threshold, the terminal will The i duration interval to the nth duration interval are respectively associated with (n-i+1) resource increments.

以表三所示数据为例,当预设比例阈值为30%时,时长区间(8ms,12ms]对应的第一数目3500占10000的比例已超过该30%,终端将时长区间(8ms,12ms]、(12ms,16ms]、(16ms,20ms]和(20ms,+∞]确定为分别与(n-i+1)个资源增量关联,关联后的数据可参见表四。Taking the data shown in Table 3 as an example, when the preset ratio threshold is 30%, the ratio of the first number 3500 to 10000 corresponding to the duration interval (8ms, 12ms) has exceeded the 30%, and the terminal will use the duration interval (8ms, 12ms) as an example. ], (12ms, 16ms], (16ms, 20ms], and (20ms, +∞] are determined to be associated with (n-i+1) resource increments, respectively, and the associated data can be found in Table 4.

表四Table 4

Figure BDA0002188582350000121
Figure BDA0002188582350000121

在表四所示数据支持的实施例中,第i时长区间是第2时长区间,第n时长区间是第5时长区间,(n-i+1)个资源增量是4个资源增量,分别是表四所示的增加30%、增加60%、增加90%和增加100%四个资源增量。In the embodiment supported by the data shown in Table 4, the i-th duration interval is the second duration interval, the n-th duration interval is the fifth duration interval, and (n-i+1) resource increments are 4 resource increments, There are four resource increments shown in Table 4: 30%, 60%, 90% and 100%.

步骤(a6),将第i时长区间至第n时长区间分别与(n-i+1)个资源增量关联的关联关系,保存至调度策略数据。Step (a6): Save the association relationship between the i-th duration interval to the n-th duration interval and the (n-i+1) resource increments, respectively, into the scheduling policy data.

在本申请实施例中,终端能够将第i时长区间至第n时长区间分别与(n-i+1)个资源增量关联的关联关系,并将上述关联关系保存在调度策略数据中。In this embodiment of the present application, the terminal can associate the i-th duration interval to the n-th duration interval with the (n-i+1) resource increments, respectively, and store the aforementioned association relation in the scheduling policy data.

需要说明的是,在本申请实施例中,第i时长区间对应的资源增量小于第i+1时长区间对应的资源增量,第i+1时长区间是第i时长区间相邻的时长区间,且第i+1时长区间中任意一个时长值大于第i时长区间中任意一个时长值。It should be noted that, in this embodiment of the present application, the resource increment corresponding to the i-th duration interval is smaller than the resource increment corresponding to the i+1-th duration interval, and the i+1-th duration interval is the adjacent duration interval of the i-th duration interval. , and any duration value in the i+1-th duration interval is greater than any duration value in the i-th duration interval.

在一种可能的实现方式中,随着目标任务的运行时长的增长,目标帧未能在帧长的时间内渲染完成的可能性增加,出现卡顿的概率也随之增长。因此,第i时长区间和第i+1时长区间对应的资源增量将逐步增加。例如,第2时长区间(也即时长区间(8ms,12ms])对应的资源增量是增加30%,与之相邻的第3时长区间(也即时长区间(12ms,16ms])对应的资源增量是增加60%,第2时长区间对应的资源增量将小于第3时长区间对应的资源增量。In a possible implementation manner, as the running time of the target task increases, the possibility that the target frame fails to be rendered within the frame length increases, and the probability of freezing also increases. Therefore, the resource increments corresponding to the i-th duration interval and the i+1-th duration interval will gradually increase. For example, the resource increment corresponding to the second duration interval (that is, the long interval (8ms, 12ms)) is increased by 30%, and the resources corresponding to the adjacent third duration interval (that is, the long interval (12ms, 16ms]) are increased by 30%. The increment is an increase of 60%, and the resource increment corresponding to the second duration interval will be smaller than the resource increment corresponding to the third duration interval.

步骤322,根据调度策略数据,确定第一时长区间对应的资源增量。Step 322: Determine the resource increment corresponding to the first duration interval according to the scheduling policy data.

在本申请实施例中,调度策略数据用于指示资源增量和第一时长区间的对应关系。在终端确定第一时长的情况下,终端能够毫无疑义地确定对应的资源增量。In the embodiment of the present application, the scheduling policy data is used to indicate the corresponding relationship between the resource increment and the first duration interval. In the case that the terminal determines the first duration, the terminal can unambiguously determine the corresponding resource increment.

在本申请实施例的另一种可能的实现方式中,终端可以通过执行步骤(b1)来实现步骤321所示的操作,通过执行步骤(b2)、步骤(b3)和步骤(b4)来实现步骤322所示的操作。In another possible implementation manner of the embodiment of the present application, the terminal may implement the operation shown instep 321 by executing step (b1), and implement the operation shown in step (b2), step (b3) and step (b4) by executing step (b2), step (b3) and step (b4). The operation shown instep 322.

步骤(b1),当运行时长不小于第一时长区间的左端点且不小于第一时长区间的右端点时,确定运行时长所在的时长区间是第一时长区间。Step (b1), when the running duration is not less than the left endpoint of the first duration interval and not less than the right endpoint of the first duration interval, determine that the duration interval in which the running duration is located is the first duration interval.

在本申请实施例中,例如,当运行时长是10毫秒时,10毫秒不小于第2时长区间的左端点8毫秒,小于第2时长区间的右端点12毫秒时,确定运行时长是10毫秒所在的时长区间是第一时长区间(8ms,12ms]。In this embodiment of the present application, for example, when the running duration is 10 milliseconds, and 10 milliseconds is not less than 8 milliseconds at the left endpoint of the second duration interval, and is less than 12 milliseconds at the right endpoint of the second duration interval, it is determined that the running duration is 10 milliseconds. The duration interval of is the first duration interval (8ms, 12ms].

步骤(b2),根据调度策略数据,确定第一时长区间是否对应有资源增量。Step (b2), according to the scheduling policy data, determine whether there is a resource increment corresponding to the first duration interval.

在本申请实施例中,终端能够根据掉地策略数据,确定第一时长区间是否对应有资源增量。In the embodiment of the present application, the terminal can determine whether there is a resource increment corresponding to the first time interval according to the ground drop policy data.

在一种可能的方式中,基于步骤(b1)所示的场景,终端能够确定第一时长区间(8ms,12ms]是否对应有资源增量。若基于表四所示的数据,第一时长区间(8ms,12ms]对应有资源增量增加30%。In a possible way, based on the scene shown in step (b1), the terminal can determine whether the first duration interval (8ms, 12ms) corresponds to a resource increment. If based on the data shown in Table 4, the first duration interval (8ms, 12ms] corresponds to a 30% increase in resource increments.

步骤(b3),当第一时长区间对应有资源增量时,确定资源增量。Step (b3), when there is a resource increment corresponding to the first duration interval, determine the resource increment.

在本申请所示实施例中,当第一时长区间对应有资源增量时,终端能确定资源增量。In the embodiment shown in the present application, when there is a resource increment corresponding to the first duration interval, the terminal can determine the resource increment.

步骤(b4),当第一时长区间不对应资源增量时,将资源增量确定为空值。Step (b4), when the first duration interval does not correspond to the resource increment, determine the resource increment as a null value.

在本申请所示实施例中,当第一时长区间不对应资源增量时,将资源增量确定为控制。在一种可能的实现方式中,请参见表四所示数据,当第一时长区间是(0,8ms]时,该时长区间不对应资源增量,终端将该资源增量确定为空值。In the embodiment shown in the present application, when the first duration interval does not correspond to the resource increment, the resource increment is determined as the control. In a possible implementation, referring to the data shown in Table 4, when the first duration interval is (0, 8ms], the duration interval does not correspond to a resource increment, and the terminal determines the resource increment as a null value.

在本申请实施例的另一种可能的实现方式中,终端可以通过执行步骤c来实现步骤322所示的操作。In another possible implementation manner of the embodiment of the present application, the terminal may implement the operation shown instep 322 by executing step c.

步骤c,当第一时长区间的左端点对应的时长,不小于目标帧的帧长时,将调度策略数据中最大的资源增量确定为第一时长区间对应的资源增量。Step c, when the duration corresponding to the left endpoint of the first duration interval is not less than the frame length of the target frame, determine the largest resource increment in the scheduling policy data as the resource increment corresponding to the first duration interval.

在本申请所示实施例中,终端在第一时长区间的左端点对应的时长,不小于目标帧的帧长时,将调度策略数据中最大的资源增量确定为第一时长区间对应的资源增量。In the embodiment shown in this application, when the duration corresponding to the left endpoint of the first duration interval is not less than the frame length of the target frame, the terminal determines the largest resource increment in the scheduling policy data as the resource corresponding to the first duration interval Increment.

在一种可能的方式中,例如帧长是16.7毫秒。当第一时长区间是(20ms,+∞],该时长区间的左端点的对应的时长是20毫秒。在此场景中,第一时长区间的左端点对应的时长不小于目标帧的帧长,终端将调度策略数据中最大的资源增量(即增加100%)确定为第一时长区间对应的资源增量。In one possible way, for example, the frame length is 16.7 milliseconds. When the first duration interval is (20ms, +∞], the duration corresponding to the left endpoint of the duration interval is 20 milliseconds. In this scenario, the duration corresponding to the left endpoint of the first duration interval is not less than the frame length of the target frame, The terminal determines the largest resource increment (ie, an increase of 100%) in the scheduling policy data as the resource increment corresponding to the first duration interval.

步骤323,将第一时长区间对应的资源增量确定为目标任务对应的资源增量。Step 323: Determine the resource increment corresponding to the first duration interval as the resource increment corresponding to the target task.

在本申请实施例的一种可能的实现方式中,终端可以通过执行步骤(d1)、步骤(d2)和步骤(d3)来实现步骤323所示的操作。In a possible implementation manner of the embodiment of the present application, the terminal may implement the operation shown instep 323 by executing step (d1), step (d2) and step (d3).

步骤(d1),获取目标任务所属的目标应用,目标应用是目标帧所属的应用。In step (d1), the target application to which the target task belongs is obtained, and the target application is the application to which the target frame belongs.

在本申请实施例中,目标应用在运行时,能够调用目标任务来渲染目标帧或者用于支持目标帧的渲染工作。当目标任务被调用时,终端能够获取该目标任务所属的目标应用,该目标应用是目标帧所属的应用。In this embodiment of the present application, when the target application is running, it can call the target task to render the target frame or to support the rendering work of the target frame. When the target task is called, the terminal can obtain the target application to which the target task belongs, and the target application is the application to which the target frame belongs.

步骤(d2),当目标应用属于预先标定的第一应用时,根据第一应用对应的第一策略确定对应的第一资源增量,第一应用是运行时的负载不小于预设负载的应用。Step (d2), when the target application belongs to the pre-calibrated first application, determine the corresponding first resource increment according to the first policy corresponding to the first application, and the first application is an application whose runtime load is not less than the preset load .

在本申请实施例中,当目标应用属于预先标定的第一应用时,终端将该第一应用对应的第一策略确定对应的第一资源增量。需要说明的是,第一应用是运行时的负载不小于预设负载的应用。在一种可能的方式中,开发人员将负载不小于预设负载的应用的标识保存在终端中,当该应用运行时,终端能够根据标识识别出该应用是第一应用。In the embodiment of the present application, when the target application belongs to the pre-calibrated first application, the terminal determines the corresponding first resource increment for the first policy corresponding to the first application. It should be noted that the first application is an application whose load during operation is not less than the preset load. In a possible manner, the developer saves the identifier of the application whose load is not less than the preset load in the terminal, and when the application runs, the terminal can recognize that the application is the first application according to the identifier.

步骤(d3),当目标应用属于预先标定的第二应用时,根据第二应用对应的第二策略确定对应的第二资源增量,第二应用是运行时的负载小于预设负载的应用。Step (d3), when the target application belongs to a pre-calibrated second application, the corresponding second resource increment is determined according to the second policy corresponding to the second application, and the second application is an application whose runtime load is less than the preset load.

当本申请实施例中,终端能够将运行时的负载小于预设负载的应用确定为第二应用,并通过第二策略确定对应的第二资源增量。详情可参见表五。In this embodiment of the present application, the terminal can determine an application whose runtime load is less than the preset load as the second application, and determine the corresponding second resource increment through the second strategy. Details can be found in Table 5.

表五Table 5

Figure BDA0002188582350000151
Figure BDA0002188582350000151

在表五所示的数据中,第二策略包括运行时长对应的时长区间以及资源增量。根据本申请公开的内容可知,第一应用和第二应用中的目标任务在对应相同的时长区间时,负载较重的第一应用能够获取较多的资源增量。例如,当第一应用中的目标任务的运行时长和第二应用中的目标任务的运行时长,均属于时长区间(8ms,12ms],第一应用中的目标任务能够获取到增加30%的资源增量,第二应用中的目标任务能够获取到增加10%的资源增量。In the data shown in Table 5, the second strategy includes a duration interval corresponding to the running duration and a resource increment. According to the content disclosed in this application, when the target tasks in the first application and the second application correspond to the same time interval, the first application with a heavier load can obtain more resource increments. For example, when the running duration of the target task in the first application and the running duration of the target task in the second application both belong to the duration interval (8ms, 12ms), the target task in the first application can obtain a 30% increase in resources Increment, the target task in the second application can obtain a resource increment of 10%.

在本申请实施例的一种可能的实现方式中,终端可以通过执行步骤(e1)和步骤(e2)来实现步骤323所示的操作。In a possible implementation manner of the embodiment of the present application, the terminal may implement the operation shown instep 323 by executing step (e1) and step (e2).

步骤(e1),获取目标任务的运行标识,运行标识用于指示目标任务是否处于运行状态。In step (e1), the running identifier of the target task is obtained, and the running identifier is used to indicate whether the target task is in a running state.

在本申请的一种可能的实现方式中,终端还能够获取目标任务的运行标识。可选地,该运行标识可以是一个标识位。目标任务能够在一个帧长周期内根据硬件资源的实际调用情况进行运行,或者停止运行。In a possible implementation manner of the present application, the terminal can also acquire the running identifier of the target task. Optionally, the running identifier may be an identifier bit. The target task can run or stop running according to the actual invocation of hardware resources within a long period of one frame.

比如,当硬件资源是CPU时,目标任务能够在拥有CPU的时间片时工作,在没有拥有CPU的时间片时停止工作。当目标任务拥有CPU的时间片时,目标任务的运行标识可以是1或true,用于指示目标任务处于运行状态。相应的,当目标任务没有拥有CPU的时间片时,目标任务的运行标识可以是0或false。For example, when the hardware resource is the CPU, the target task can work in the time slice with the CPU, and stop working when there is no time slice with the CPU. When the target task has the time slice of the CPU, the running flag of the target task can be 1 or true, which is used to indicate that the target task is in the running state. Correspondingly, when the target task has no time slice of CPU, the running flag of the target task can be 0 or false.

步骤(e2),当运行标识指示目标任务处于运行状态时,根据资源增量进行资源调度。Step (e2), when the running flag indicates that the target task is in the running state, perform resource scheduling according to the resource increment.

步骤330,根据资源增量进行资源调度。Step 330: Perform resource scheduling according to the resource increment.

在本申请实施例中,步骤330的执行过程和步骤230的执行过程相同,此处不再赘述。In this embodiment of the present application, the execution process ofstep 330 is the same as the execution process ofstep 230, and details are not repeated here.

比如,在本申请的一个可能的实现方式中,以帧长是20毫秒且表四所示数据为例进行说明,当目标任务开始针对一个目标帧开始处理后,若目标任务的运行时长达到8ms且该目标任务仍未完成工作,则终端按照资源增量为增加30%供目标任务运行。增加资源后,目标任务有可能迅速完成工作。若目标任务的运行时长达到12ms且该目标任务仍未完成工作,则终端按照资源增量为再增加30%供目标任务运行。同理,若目标任务的运行时长达到16ms且该目标任务仍未完成工作,则终端按照资源增量再增加30%供目标任务运行。此后,若目标任务的运行时长达到20ms且该目标任务仍未完成工作,说明终端已经发生卡顿,则终端按照资源增量再增加10%供目标任务运行。For example, in a possible implementation manner of the present application, the frame length is 20 milliseconds and the data shown in Table 4 is used as an example for illustration. After the target task starts to process a target frame, if the running time of the target task reaches 8ms And if the target task has not yet completed the work, the terminal will increase the resource increment by 30% for the target task to run. With the addition of resources, the target task has the potential to get work done quickly. If the running time of the target task reaches 12ms and the target task has not completed the work, the terminal will increase the resource increment by another 30% for the target task to run. Similarly, if the running time of the target task reaches 16ms and the target task has not completed the work, the terminal will increase the resource increment by 30% for the target task to run. After that, if the running time of the target task reaches 20ms and the target task has not completed the work, it means that the terminal is stuck, and the terminal will increase the resource increment by 10% for the target task to run.

综上所述,本实施例能够根据确定运行时长所在的第一时长区间,根据调度策略数据,确定第一时长区间对应的资源增量,将第一时长区间对应的资源增量确定为目标任务对应的资源增量,使得终端能够在目标任务渲染目标帧或者支持目标帧的渲染工作时,通过运行时长所在的第一时长区间,即可确定对应的资源增量,令终端根据该资源增量进行调度,使得终端在发生卡顿之前提前为终端分配资源,有效地降低了卡顿发生的可能性。To sum up, in this embodiment, the resource increment corresponding to the first duration interval can be determined according to the first duration interval in which the running duration is determined and according to the scheduling policy data, and the resource increment corresponding to the first duration interval can be determined as the target task The corresponding resource increment enables the terminal to determine the corresponding resource increment through the first time interval in which the running duration is located when the target task renders the target frame or supports the rendering of the target frame, so that the terminal can determine the corresponding resource increment according to the resource increment. Scheduling is performed so that the terminal allocates resources to the terminal in advance before the freeze occurs, which effectively reduces the possibility of the freeze.

本实施例提供的调度资源的方法,还能够统计目标任务针对每一次完成针对目标帧处理的运行时长,根据目标任务的运行时长的统计情况,动态调整运行时长对应的资源增量,使得本方案能够动态适应目标任务较容易出现的运行时长,使得本申请能够适应目标任务实际运行的状况并提供相应的资源增量,令终端实时都能有较相应的资源增量与之适应,提高了预防卡顿的效果。The method for scheduling resources provided in this embodiment can also count the running time of the target task for each completion of processing the target frame, and dynamically adjust the resource increment corresponding to the running time according to the statistics of the running time of the target task, so that this solution It can dynamically adapt to the running duration of the target task that is easy to occur, so that the application can adapt to the actual operation status of the target task and provide corresponding resource increments, so that the terminal can adapt to it in real time with a relatively corresponding resource increment, which improves the prevention and control. Caton effect.

本实施例提供的调度资源的方法,还能够在目标任务处于运行状态时,根据资源增量进行资源调度,在目标任务不处于运行状态时仍保持原有的资源运行,使得系统能够精准地在目标任务运行时根据资源增量调度资源,在保证降低终端卡顿风险的同时,降低了终端的能耗,延长了终端的待机时长。The method for scheduling resources provided in this embodiment can also perform resource scheduling according to resource increments when the target task is in the running state, and keep the original resources running when the target task is not in the running state, so that the system can accurately When the target task is running, resources are scheduled according to resource increments, which reduces the risk of terminal jamming, reduces the energy consumption of the terminal, and prolongs the standby time of the terminal.

请参考图6,图6是基于图3所示的调度资源的方法提供的部分步骤的流程图,在图6中,终端在执行完成步骤310之前,可以执行包括步骤301和步骤302,随后执行步骤310、步骤321、步骤322和步骤323,在执行完成步骤323之后,终端还能够执行步骤303。其中,步骤301至步骤303的执行过程分述如下:Please refer to FIG. 6. FIG. 6 is a flowchart of some steps provided by the method for scheduling resources shown in FIG. 3. In FIG. 6, before performingstep 310, the terminal may performsteps 301 and 302, and then performStep 310 ,Step 321 ,Step 322 andStep 323 , afterStep 323 is performed, the terminal can also performStep 303 . Wherein, the execution process ofstep 301 to step 303 is described as follows:

步骤301,创建第一资源管理组,第一资源管理组用于按照预定的第一资源调度资源。Step 301: Create a first resource management group, where the first resource management group is used to schedule resources according to predetermined first resources.

在本申请实施例中,终端还能够先创建第一资源管理组,通过该资源管理组进行资源调度。需要说明的是,该资源管理组可以是cgroups(英文:Control group,中文:控制组),该控制组是Linux中控制各种系统资源的子系统。In this embodiment of the present application, the terminal can also create a first resource management group first, and perform resource scheduling through the resource management group. It should be noted that the resource management group may be cgroups (English: Control group, Chinese: Control Group), and the control group is a subsystem that controls various system resources in Linux.

步骤302,将目标任务放置在第一资源管理组中。Step 302, placing the target task in the first resource management group.

在本申请实施例中,终端将目标任务放置在第一资源管理组中。当目标任务有多个时,第一资源管理组可以包含多个目标任务。In this embodiment of the present application, the terminal places the target task in the first resource management group. When there are multiple target tasks, the first resource management group may contain multiple target tasks.

步骤303,当目标任务被终端根据资源增量进行资源调度时,通过第一资源管理组按照第一资源和资源增量进行资源调度。Step 303 , when the target task is scheduled by the terminal according to the resource increment, the first resource management group performs resource scheduling according to the first resource and the resource increment.

在本申请实施例中,当目标任务被终端根据资源增量进行资源调度时,通过第一资源管理组按照第一资源和资源增量进行资源调度。需要说明的是,第一资源是第一资源管理组有权限调度的资源。In the embodiment of the present application, when the target task is scheduled by the terminal according to the resource increment, the resource scheduling is performed according to the first resource and the resource increment through the first resource management group. It should be noted that the first resource is a resource that the first resource management group has permission to schedule.

例如,当第一资源是CPU小核时,第一资源管理组将没有权限调用CPU大核。For example, when the first resource is a small CPU core, the first resource management group will not have the right to call a large CPU core.

请参考图7,图7是基于图3所示的调度资源的方法提供的部分步骤的流程图,在图7中,终端在执行完成步骤310之前,可以执行包括步骤304和步骤305,随后执行步骤310、步骤321、步骤322和步骤323,在执行完成步骤323之后,终端还能够执行步骤306。其中,步骤304至步骤306的执行过程分述如下:Please refer to FIG. 7. FIG. 7 is a flowchart of some steps provided by the method for scheduling resources shown in FIG. 3. In FIG. 7, before performingstep 310, the terminal may performsteps 304 and 305, and then performStep 310 ,Step 321 ,Step 322 andStep 323 , afterStep 323 is performed, the terminal can also performStep 306 . Wherein, the execution process ofstep 304 to step 306 is described as follows:

步骤304,创建第二资源管理组,第二资源管理组用于按照预定的第二资源调度资源,第二资源是除第一资源中包括的关键资源之外的资源。Step 304: Create a second resource management group, where the second resource management group is used to schedule resources according to predetermined second resources, where the second resources are resources other than the key resources included in the first resources.

在本申请实施例中,终端还能够创建第二资源管理组,该第二资源管理用于按照预定的第二资源调度资源,第二资源是除第一资源中包括的关键资源之外的资源。例如,当第一资源中包括的关键资源是大核A和大核B,第二资源可以是包括大核C、大核D以及终端中的其余小核。In this embodiment of the present application, the terminal can also create a second resource management group, where the second resource management is used to schedule resources according to predetermined second resources, where the second resources are resources other than the key resources included in the first resources . For example, when the key resources included in the first resource are large core A and large core B, the second resource may include large core C, large core D and the remaining small cores in the terminal.

步骤305,将重负载任务放置在第二资源管理组中。Step 305, placing the heavy-load task in the second resource management group.

在本申请实施例中,终端将重负载任务放置在第二资源管理组中,需要说明的是,该重负载任务是目标任务之外的任务。In this embodiment of the present application, the terminal places the heavy-load task in the second resource management group. It should be noted that the heavy-load task is a task other than the target task.

步骤306,当重负载任务运行时,通过第二资源管理组调度第二资源。Step 306, when the heavy-load task is running, schedule the second resource through the second resource management group.

在本申请实施例中,当重负载任务运行时,终端能够通过第二资源管理组调度第二资源予以支持,使得重负载任务正常运行。In the embodiment of the present application, when the heavy-load task is running, the terminal can schedule the second resource through the second resource management group for support, so that the heavy-load task runs normally.

综上所述,基于图6和图7所示的实施例,终端能够为不同需求的任务设置不同的资源管理组,使得资源管理组在渲染图像的过程前,根据任务的运行时长进行调度相应的资源增量,实现了在卡顿发生之前,提前调度硬件资源,预防卡顿,并能在目标任务运行时才进行硬件资源的调度,在预防卡顿的前提下提高终端的续航时间。To sum up, based on the embodiments shown in FIG. 6 and FIG. 7 , the terminal can set different resource management groups for tasks with different requirements, so that the resource management group can schedule the corresponding tasks according to the running time of the task before the process of rendering the image. The resource increment is realized by scheduling hardware resources in advance before the freezing occurs, preventing the freezing, and scheduling the hardware resources only when the target task is running, improving the battery life of the terminal on the premise of preventing the freezing.

下述为本申请装置实施例,可以用于执行本申请方法实施例。对于本申请装置实施例中未披露的细节,请参照本申请方法实施例。The following are apparatus embodiments of the present application, which can be used to execute the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.

请参考图8,图8是本申请一个示例性实施例提供的调度资源的装置的结构框图。该调度资源的装置可以通过软件、硬件或者两者的结合实现成为终端的全部或一部分。该装置包括:Please refer to FIG. 8 , which is a structural block diagram of an apparatus for scheduling resources provided by an exemplary embodiment of the present application. The apparatus for scheduling resources can be implemented as all or a part of the terminal through software, hardware or a combination of the two. The device includes:

时长获取模块810,用于当渲染目标帧时,获取目标任务的运行时长,所述目标任务用于渲染所述目标帧或用于支持渲染所述目标帧,所述运行时长是所述目标任务在终端渲染所述目标帧时累计运行的时长;Theduration obtaining module 810 is used for obtaining the running duration of the target task when rendering the target frame, the target task is used to render the target frame or used to support the rendering of the target frame, and the running duration is the target task The accumulated running time when the terminal renders the target frame;

增量确定模块820,用于根据所述运行时长,确定对应的资源增量;anincrement determination module 820, configured to determine a corresponding resource increment according to the running duration;

资源调度模块830,用于根据所述资源增量进行资源调度。Theresource scheduling module 830 is configured to perform resource scheduling according to the resource increment.

在一个可选的实施例中,所述时长获取模块810,用于确定所述运行时长所在的第一时长区间;根据调度策略数据,确定所述第一时长区间对应的资源增量,所述调度策略数据用于指示所述资源增量和所述第一时长区间的对应关系;将所述第一时长区间对应的资源增量确定为所述目标任务对应的资源增量。。In an optional embodiment, theduration obtaining module 810 is configured to determine a first duration interval in which the running duration is located; according to scheduling policy data, determine the resource increment corresponding to the first duration interval, the The scheduling policy data is used to indicate the corresponding relationship between the resource increment and the first duration interval; the resource increment corresponding to the first duration interval is determined as the resource increment corresponding to the target task. .

在一个可选的实施例中,所述时长获取模块810,用于当所述运行时长不小于所述第一时长区间的左端点时,确定所述运行时长所在的时长区间是所述第一时长区间;所述根据调度策略数据,确定所述第一时长区间对应的资源增量,包括:根据所述调度策略数据,确定所述第一时长区间是否对应有所述资源增量;当所述第一时长区间对应有所述资源增量时,确定所述资源增量;当所述第一时长区间不对应所述资源增量时,将所述资源增量确定为空值。In an optional embodiment, theduration obtaining module 810 is configured to, when the running duration is not less than the left endpoint of the first duration interval, determine that the duration interval in which the running duration is located is the first duration interval. time interval; the determining, according to the scheduling policy data, the resource increment corresponding to the first time interval includes: determining, according to the scheduling policy data, whether the first time interval corresponds to the resource increment; When the first duration interval corresponds to the resource increment, the resource increment is determined; when the first duration interval does not correspond to the resource increment, the resource increment is determined as a null value.

在一个可选的实施例中,所述装置还包括帧长确定模块、区间划分模块、数据统计模块、数目获取模块、关联模块和保存模块。In an optional embodiment, the apparatus further includes a frame length determination module, an interval division module, a data statistics module, a number acquisition module, an association module, and a storage module.

帧长确定模块,用于确定目标应用运行时的帧长,所述目标应用是所述目标帧所属的应用;a frame length determination module, configured to determine the frame length of the target application when the target application is running, and the target application is the application to which the target frame belongs;

区间划分模块,用于将所述帧长分为n个长度相等的时长区间,n为正整数;an interval division module, configured to divide the frame length into n equal length intervals, where n is a positive integer;

数据统计模块,用于统计所述目标任务的m个完成时长分布在所述时长区间的数据,所述完成时长用于指示所述目标任务,处理完成所述目标应用中的一帧图像时累计花费的时长,m为正整数;The data statistics module is used to count the data of m completion durations of the target task distributed in the duration interval, the completion duration is used to indicate the target task, and the accumulated time when processing a frame of images in the target application is completed. The time spent, m is a positive integer;

数目获取模块,用于获取第i时长区间对应的完成时长的第一数目,i是不小于1且不大于n的整数;The number acquisition module is used to acquire the first number of the completion duration corresponding to the i-th duration interval, where i is an integer not less than 1 and not greater than n;

关联模块,用于当所述第一数目占所述m个完成时长的比例不小于预设比例阈值时,将所述第i时长区间至第n时长区间分别与(n-i+1)个所述资源增量关联;an association module, configured to associate the i-th duration interval to the n-th duration interval with (n-i+1) respectively when the ratio of the first number to the m completion durations is not less than a preset ratio threshold the resource increment association;

保存模块,用于将所述第i时长区间至第n时长区间分别与(n-i+1)个所述资源增量关联的关联关系,保存至所述调度策略数据。A saving module, configured to save the association relationship between the i-th duration interval to the n-th duration interval and the (n-i+1) resource increments, respectively, into the scheduling policy data.

在一个可选的实施例中,所述装置中涉及的所述第i时长区间对应的资源增量小于第i+1时长区间对应的资源增量,所述第i+1时长区间是所述第i时长区间相邻的时长区间,且所述第i+1时长区间中任意一个时长值大于所述第i时长区间中任意一个时长值。In an optional embodiment, the resource increment corresponding to the i-th duration interval involved in the device is smaller than the resource increment corresponding to the i+1-th duration interval, and the i+1-th duration interval is the The i-th duration interval is an adjacent duration interval, and any duration value in the i+1-th duration interval is greater than any duration value in the i-th duration interval.

在一个可选的实施例中,所述增量确定模块820,用于当所述第一时长区间的左端点对应的时长,不小于所述目标帧的帧长时,将所述调度策略数据中最大的资源增量确定为所述第一时长区间对应的资源增量。In an optional embodiment, theincrement determination module 820 is configured to, when the duration corresponding to the left endpoint of the first duration interval is not less than the frame length of the target frame, change the scheduling policy data The largest resource increment is determined as the resource increment corresponding to the first duration interval.

在一个可选的实施例中,所述增量确定模块820,用于获取所述目标任务所属的目标应用,所述目标应用是所述目标帧所属的应用;当所述目标应用属于预先标定的第一应用时,根据所述第一应用对应的第一策略确定对应的第一资源增量,所述第一应用是运行时的负载不小于预设负载的应用;当所述目标应用属于预先标定的第二应用时,根据所述第二应用对应的第二策略确定对应的第二资源增量,所述第二应用是运行时的负载小于预设负载的应用。In an optional embodiment, theincrement determination module 820 is configured to acquire the target application to which the target task belongs, and the target application is the application to which the target frame belongs; when the target application belongs to the pre-calibration When the first application is the first application, the corresponding first resource increment is determined according to the first policy corresponding to the first application, and the first application is an application whose runtime load is not less than the preset load; when the target application belongs to When the second application is pre-calibrated, the corresponding second resource increment is determined according to the second policy corresponding to the second application, and the second application is an application whose runtime load is less than the preset load.

在一个可选的实施例中,所述资源调度模块830,用于获取所述目标任务的运行标识,所述运行标识用于指示所述目标任务是否处于运行状态;当所述运行标识指示所述目标任务处于运行状态时,根据所述资源增量进行资源调度。In an optional embodiment, theresource scheduling module 830 is configured to acquire the running identifier of the target task, where the running identifier is used to indicate whether the target task is in the running state; when the running identifier indicates the When the target task is in the running state, resource scheduling is performed according to the resource increment.

在一个可选的实施例中,所述资源调度模块830,用于创建第一资源管理组,所述第一资源管理组用于按照预定的第一资源调度资源;将所述目标任务放置在所述第一资源管理组中;当所述目标任务被所述终端根据所述资源增量进行资源调度时,通过所述第一资源管理组按照所述第一资源和所述资源增量进行资源调度。In an optional embodiment, theresource scheduling module 830 is configured to create a first resource management group, and the first resource management group is configured to schedule resources according to a predetermined first resource; the target task is placed in the In the first resource management group; when the target task is scheduled by the terminal according to the resource increment, the first resource management group is used to perform the resource scheduling according to the first resource and the resource increment. Resource Scheduling.

在一个可选的实施例中,所述资源调度模块830,用于创建第二资源管理组,所述第二资源管理组用于按照预定的第二资源调度所述资源,所述第二资源是除所述第一资源中包括的关键资源之外的资源;将重负载任务放置在所述第二资源管理组中;当所述重负载任务运行时,通过所述第二资源管理组调度所述第二资源。In an optional embodiment, theresource scheduling module 830 is configured to create a second resource management group, where the second resource management group is configured to schedule the resources according to a predetermined second resource, and the second resource is a resource other than the key resources included in the first resource; the heavy-load task is placed in the second resource management group; when the heavy-load task runs, it is scheduled by the second resource management group the second resource.

本申请实施例还提供了一种计算机可读介质,该计算机可读介质存储有至少一条指令,所述至少一条指令由所述处理器加载并执行以实现如上各个实施例所述的调度资源的方法。Embodiments of the present application further provide a computer-readable medium, where the computer-readable medium stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the scheduling of resources according to the above embodiments. method.

需要说明的是:上述实施例提供的调度资源的装置在执行调度资源的方法时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的调度资源的装置与调度资源的方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that when the apparatus for scheduling resources provided in the above embodiments executes the method for scheduling resources, only the division of the above functional modules is used as an example for illustration. In practical applications, the above functions may be allocated to different functions according to requirements. Module completion means dividing the internal structure of the device into different functional modules to complete all or part of the functions described above. In addition, the apparatus for scheduling resources provided in the above embodiments and the method embodiments for scheduling resources belong to the same concept, and the specific implementation process thereof is detailed in the method embodiments, which will not be repeated here.

上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The above-mentioned serial numbers of the embodiments of the present application are only for description, and do not represent the advantages or disadvantages of the embodiments.

本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps of implementing the above embodiments can be completed by hardware, or can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable storage medium. The storage medium mentioned may be a read-only memory, a magnetic disk or an optical disk, etc.

以上所述仅为本申请的能够实现的示例性的实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above descriptions are only exemplary embodiments that can be implemented in the present application, and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the within the scope of protection of this application.

Claims (13)

Translated fromChinese
1.一种调度资源的方法,其特征在于,所述方法包括:1. A method for scheduling resources, wherein the method comprises:当渲染目标帧时,获取目标任务当前的运行时长,所述目标任务用于渲染所述目标帧或用于支持渲染所述目标帧,所述运行时长是所述目标任务在终端渲染所述目标帧时累计已运行的时长;When rendering the target frame, obtain the current running duration of the target task, the target task is used to render the target frame or used to support the rendering of the target frame, and the running duration is when the target task renders the target at the terminal The accumulated running time at frame time;确定所述目标任务当前的运行时长所在的第一时长区间;determining the first duration interval in which the current running duration of the target task is located;根据调度策略数据和所述第一时长区间,确定所述目标任务对应的资源增量;其中,所述调度策略数据用于指示所述资源增量和所述第一时长区间的对应关系,所述调度策略数据中保存有第i时长区间至第n时长区间分别与n-i+1个所述资源增量关联的关联关系,n个时长区间是由对所述目标帧对应的帧长进行划分得到,n为正整数,i是不小于1且不大于n的整数;Determine the resource increment corresponding to the target task according to the scheduling policy data and the first duration interval; wherein, the scheduling policy data is used to indicate the corresponding relationship between the resource increment and the first duration interval, so the The scheduling policy data saves the association relationship between the i-th duration interval to the n-th duration interval and n-i+1 of the resource increments, respectively, and the n duration intervals are performed by the frame length corresponding to the target frame. Divided, n is a positive integer, i is an integer not less than 1 and not greater than n;根据所述目标任务对应的资源增量对所述目标任务进行资源调度。Perform resource scheduling on the target task according to the resource increment corresponding to the target task.2.根据权利要求1所述的方法,其特征在于,所述根据调度策略数据和所述第一时长区间,确定所述目标任务对应的资源增量,包括:2 . The method according to claim 1 , wherein, determining the resource increment corresponding to the target task according to the scheduling policy data and the first duration interval, comprising: 2 .根据所述调度策略数据,确定所述第一时长区间对应的资源增量;determining the resource increment corresponding to the first duration interval according to the scheduling policy data;将所述第一时长区间对应的资源增量确定为所述目标任务对应的资源增量。The resource increment corresponding to the first duration interval is determined as the resource increment corresponding to the target task.3.根据权利要求2所述的方法,其特征在于,所述确定所述目标任务当前的运行时长所在的第一时长区间,包括:3. The method according to claim 2, wherein the determining the first duration interval in which the current running duration of the target task is located comprises:当所述目标任务当前的运行时长大于所述第一时长区间的左端点且不大于所述第一时长区间的右端点时,确定所述目标任务当前的运行时长所在的时长区间是所述第一时长区间;When the current running duration of the target task is greater than the left endpoint of the first duration interval and not greater than the right endpoint of the first duration interval, determine that the duration interval in which the current running duration of the target task is located is the first duration interval. a period of time;所述根据所述调度策略数据,确定所述第一时长区间对应的资源增量,包括:The determining, according to the scheduling policy data, the resource increment corresponding to the first duration interval includes:根据所述调度策略数据,确定所述第一时长区间是否对应有所述资源增量;determining, according to the scheduling policy data, whether the first duration interval corresponds to the resource increment;当所述第一时长区间对应有所述资源增量时,确定所述第一时长区间对应的资源增量;When the first duration interval corresponds to the resource increment, determining the resource increment corresponding to the first duration interval;当所述第一时长区间不对应所述资源增量时,将所述第一时长区间对应的资源增量确定为空值。When the first duration interval does not correspond to the resource increment, the resource increment corresponding to the first duration interval is determined to be a null value.4.根据权利要求3所述的方法,其特征在于,所述根据调度策略数据和所述第一时长区间,确定所述目标任务对应的资源增量之前,所述方法还包括:4 . The method according to claim 3 , wherein, before determining the resource increment corresponding to the target task according to the scheduling policy data and the first duration interval, the method further comprises: 5 .确定目标应用运行时的帧长,所述目标应用是所述目标帧所属的应用;Determine the frame length when the target application is running, and the target application is the application to which the target frame belongs;将所述帧长分为n个长度相等的时长区间;dividing the frame length into n equal length intervals;统计所述目标任务的m个完成时长分布在所述时长区间的数据,所述完成时长用于指示所述目标任务,处理完成所述目标应用中的一帧图像时累计花费的时长,m为正整数;Counting the data of m completion durations of the target task distributed in the duration interval, the completion duration is used to indicate the target task, and the cumulative time spent processing a frame of image in the target application, m is positive integer;获取所述第i时长区间对应的完成时长的第一数目;obtaining the first number of completion durations corresponding to the i-th duration interval;当所述第一数目占所述m个完成时长的比例不小于预设比例阈值时,将所述第i时长区间至所述第n时长区间分别与n-i+1个所述资源增量关联。When the ratio of the first number to the m completion durations is not less than a preset ratio threshold, the i-th duration interval to the n-th duration interval are respectively associated with n-i+1 of the resource increments association.5.根据权利要求4所述的方法,其特征在于,所述第i时长区间对应的资源增量小于第i+1时长区间对应的资源增量,所述第i+1时长区间是所述第i时长区间相邻的时长区间,且所述第i+1时长区间中任意一个时长值大于所述第i时长区间中任意一个时长值。5 . The method according to claim 4 , wherein the resource increment corresponding to the i-th duration interval is smaller than the resource increment corresponding to the i+1-th duration interval, and the i+1-th duration interval is the The i-th duration interval is an adjacent duration interval, and any duration value in the i+1-th duration interval is greater than any duration value in the i-th duration interval.6.根据权利要求2所述的方法,其特征在于,所述根据所述调度策略数据,确定所述第一时长区间对应的资源增量,包括:6. The method according to claim 2, wherein the determining, according to the scheduling policy data, the resource increment corresponding to the first duration interval comprises:当所述第一时长区间的左端点对应的时长,不小于所述目标帧的帧长时,将所述调度策略数据中最大的资源增量确定为所述第一时长区间对应的资源增量。When the duration corresponding to the left endpoint of the first duration interval is not less than the frame length of the target frame, determine the largest resource increment in the scheduling policy data as the resource increment corresponding to the first duration interval .7.根据权利要求1至6任一所述的方法,其特征在于,所述方法还包括:7. The method according to any one of claims 1 to 6, wherein the method further comprises:获取所述目标任务所属的目标应用,所述目标应用是所述目标帧所属的应用;Obtain the target application to which the target task belongs, and the target application is the application to which the target frame belongs;当所述目标应用属于预先标定的第一应用时,根据所述第一应用对应的第一策略确定所述第一时长区间对应的第一资源增量,所述第一应用是运行时的负载不小于预设负载的应用;When the target application belongs to a pre-calibrated first application, a first resource increment corresponding to the first time interval is determined according to a first policy corresponding to the first application, and the first application is a runtime load Applications not less than the preset load;当所述目标应用属于预先标定的第二应用时,根据所述第二应用对应的第二策略确定所述第一时长区间对应的第二资源增量,所述第二应用是运行时的负载小于预设负载的应用。When the target application belongs to a pre-calibrated second application, a second resource increment corresponding to the first time interval is determined according to a second policy corresponding to the second application, and the second application is a runtime load Applications with less than preset loads.8.根据权利要求1至6任一所述的方法,其特征在于,所述根据所述目标任务对应的资源增量对所述目标任务进行资源调度,包括:8. The method according to any one of claims 1 to 6, wherein the performing resource scheduling on the target task according to the resource increment corresponding to the target task comprises:获取所述目标任务的运行标识,所述运行标识用于指示所述目标任务是否处于运行状态;obtaining the running identifier of the target task, where the running identifier is used to indicate whether the target task is in a running state;当所述运行标识指示所述目标任务处于运行状态时,根据所述目标任务对应的资源增量对所述目标任务进行资源调度。When the running identifier indicates that the target task is in a running state, resource scheduling is performed on the target task according to the resource increment corresponding to the target task.9.根据权利要求1至6任一所述的方法,其特征在于,所述根据所述目标任务对应的资源增量对所述目标任务进行资源调度,包括:9. The method according to any one of claims 1 to 6, wherein the performing resource scheduling on the target task according to the resource increment corresponding to the target task comprises:创建第一资源管理组,所述第一资源管理组用于按照预定的第一资源调度资源;creating a first resource management group, where the first resource management group is used to schedule resources according to predetermined first resources;将所述目标任务放置在所述第一资源管理组中;placing the target task in the first resource management group;当所述目标任务被所述终端根据所述目标任务对应的资源增量进行资源调度时,通过所述第一资源管理组按照第一资源和所述目标任务对应的资源增量进行资源调度,所述第一资源是所述第一资源管理组有权限调度的资源。When the target task is scheduled by the terminal according to the resource increment corresponding to the target task, the first resource management group performs resource scheduling according to the first resource and the resource increment corresponding to the target task, The first resource is a resource that the first resource management group has permission to schedule.10.根据权利要求9所述的方法,其特征在于,所述方法还包括:10. The method according to claim 9, wherein the method further comprises:创建第二资源管理组,所述第二资源管理组用于按照预定的第二资源调度所述资源,所述第二资源是除所述第一资源中包括的关键资源之外的资源;creating a second resource management group, where the second resource management group is configured to schedule the resources according to predetermined second resources, where the second resources are resources other than the key resources included in the first resources;将重负载任务放置在所述第二资源管理组中;placing heavy-duty tasks in the second resource management group;当所述重负载任务运行时,通过所述第二资源管理组调度所述第二资源。When the heavy-load task is running, the second resource is scheduled through the second resource management group.11.一种调度资源的装置,其特征在于,所述装置包括:11. An apparatus for scheduling resources, wherein the apparatus comprises:时长获取模块,用于当渲染目标帧时,获取目标任务当前的运行时长,所述目标任务用于渲染所述目标帧或用于支持渲染所述目标帧,所述运行时长是所述目标任务在终端渲染所述目标帧时累计已运行的时长;The duration acquisition module is used to acquire the current running duration of the target task when rendering the target frame, the target task is used to render the target frame or used to support the rendering of the target frame, and the running duration is the target task Accumulate the running time when the terminal renders the target frame;所述时长获取模块,还用于确定所述目标任务当前的运行时长所在的第一时长区间;The duration obtaining module is further configured to determine the first duration interval in which the current running duration of the target task is located;增量确定模块,用于根据调度策略数据和所述第一时长区间,确定所述目标任务对应的资源增量;其中,所述调度策略数据用于指示所述资源增量和所述第一时长区间的对应关系,所述调度策略数据中保存有第i时长区间至第n时长区间分别与n-i+1个所述资源增量关联的关联关系,n个时长区间是由对所述目标帧对应的帧长进行划分得到,n为正整数,i是不小于1且不大于n的整数;an increment determination module, configured to determine the resource increment corresponding to the target task according to the scheduling policy data and the first duration interval; wherein the scheduling policy data is used to indicate the resource increment and the first time interval Corresponding relationship between time length intervals, the scheduling policy data saves the association relationship between the i th time interval to the n th time interval and n-i+1 of the resource increments respectively, and the n time length intervals are determined by the The frame length corresponding to the target frame is divided, n is a positive integer, and i is an integer not less than 1 and not greater than n;资源调度模块,用于根据所述目标任务对应的资源增量对所述目标任务进行资源调度。A resource scheduling module, configured to perform resource scheduling on the target task according to the resource increment corresponding to the target task.12.一种终端,其特征在于,所述终端包括处理器、和与所述处理器相连的存储器,以及存储在所述存储器上的程序指令,所述处理器执行所述程序指令时实现如权利要求1至10任一所述的调度资源的方法。12. A terminal, characterized in that the terminal comprises a processor, a memory connected to the processor, and a program instruction stored on the memory, and the processor implements the following when executing the program instruction. The method for scheduling resources according to any one of claims 1 to 10.13.一种计算机可读存储介质,所述存储介质中存储有程序指令,其特征在于,所述程序指令被处理器执行时实现如权利要求1至10任一所述的调度资源的方法。13 . A computer-readable storage medium, wherein program instructions are stored in the storage medium, wherein when the program instructions are executed by a processor, the method for scheduling resources according to any one of claims 1 to 10 is implemented.
CN201910824338.1A2019-09-022019-09-02 Method, device, terminal and storage medium for scheduling resourcesActiveCN110532100B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201910824338.1ACN110532100B (en)2019-09-022019-09-02 Method, device, terminal and storage medium for scheduling resources

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201910824338.1ACN110532100B (en)2019-09-022019-09-02 Method, device, terminal and storage medium for scheduling resources

Publications (2)

Publication NumberPublication Date
CN110532100A CN110532100A (en)2019-12-03
CN110532100Btrue CN110532100B (en)2022-04-15

Family

ID=68666339

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201910824338.1AActiveCN110532100B (en)2019-09-022019-09-02 Method, device, terminal and storage medium for scheduling resources

Country Status (1)

CountryLink
CN (1)CN110532100B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN111240817B (en)*2020-01-062024-04-09北京小米移动软件有限公司Resource scheduling method, resource scheduling device and storage medium
CN111611516B (en)*2020-04-112023-04-18上海淇玥信息技术有限公司Resource allocation method and device and electronic equipment
CN115237583A (en)*2021-04-222022-10-25华为技术有限公司 Computing resource scheduling method and device
CN113849384B (en)*2021-08-272023-07-25苏州浪潮智能科技有限公司 A method and device for determining the duration of a RAID system background task test
CN114331347B (en)*2021-12-242025-09-12北京达佳互联信息技术有限公司 Task processing method, device, electronic device and medium
CN114968521A (en)*2022-05-202022-08-30每平每屋(上海)科技有限公司Distributed rendering method and device
CN116932230B (en)*2023-09-152023-12-08湖南马栏山视频先进技术研究院有限公司Video rendering method based on dynamic task scheduling
CN118245232B (en)*2024-05-272024-09-20北京趋动智能科技有限公司Image rendering task scheduling method and device based on edge cloud cooperation

Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN109032793A (en)*2018-07-112018-12-18Oppo广东移动通信有限公司Method, apparatus, terminal and the storage medium of resource distribution
CN109074303A (en)*2017-06-272018-12-21华为技术有限公司A kind of Caton detection method and device
CN109471727A (en)*2018-10-292019-03-15北京金山云网络技术有限公司 A task processing method, device and system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US7075541B2 (en)*2003-08-182006-07-11Nvidia CorporationAdaptive load balancing in a multi-processor graphics processing system
US8199158B2 (en)*2008-06-112012-06-12Intel CorporationPerformance allocation method and apparatus

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN109074303A (en)*2017-06-272018-12-21华为技术有限公司A kind of Caton detection method and device
CN109032793A (en)*2018-07-112018-12-18Oppo广东移动通信有限公司Method, apparatus, terminal and the storage medium of resource distribution
CN109471727A (en)*2018-10-292019-03-15北京金山云网络技术有限公司 A task processing method, device and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
分布式实时渲染中帧同步的实现;王海峰等;《微计算机应用》;20071031;第28卷(第10期);全文*

Also Published As

Publication numberPublication date
CN110532100A (en)2019-12-03

Similar Documents

PublicationPublication DateTitle
CN110532100B (en) Method, device, terminal and storage medium for scheduling resources
US10628216B2 (en)I/O request scheduling method and apparatus by adjusting queue depth associated with storage device based on hige or low priority status
EP3161628B1 (en)Intelligent gpu scheduling in a virtualization environment
US8433833B2 (en)Dynamic reassignment for I/O transfers using a completion queue
US9965412B2 (en)Method for application-aware interrupts management
US20190188034A1 (en)Thread pool and task queuing method and system
CN108241527B (en)Task scheduling method and electronic equipment
US20230195310A1 (en)Fpga board memory data reading method and apparatus, and medium
US20140208318A1 (en)Method and Apparatus for Adjusting I/O Channel on Virtual Platform
US20160019089A1 (en)Method and system for scheduling computing
CN111831442A (en) A method, device, storage medium and electronic device for resource allocation
US9507637B1 (en)Computer platform where tasks can optionally share per task resources
US20210011759A1 (en)Multi-core system and method of controlling operation of the same
CN114513545B (en)Request processing method, device, equipment and medium
EP2772854A1 (en)Regulation method and regulation device for i/o channels in virtualization platform
US11552892B2 (en)Dynamic control of latency tolerance reporting values
CN107239342A (en)A kind of storage cluster task management method and device
US10592107B2 (en)Virtual machine storage management queue
CN112799805A (en)Scheduling method and device based on terminal equipment, storage medium and terminal equipment
CN115858124A (en)Control method, device and medium for substrate management system
CN110750346B (en)Task operation optimization method, device, terminal and storage medium
CN113138909A (en)Load statistical method, device, storage medium and electronic equipment
US20200371689A1 (en)Technologies for lockless, scalable, and adaptive storage quality of service
CN114924848B (en) IO scheduling method, device and equipment
CN110908783A (en)Management and control method, system and equipment for virtual machine of cloud data center

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp