技术领域Technical field
本公开实施例涉及图像处理技术领域,尤其涉及一种特效资源包的处理方法、装置、设备及存储介质。The embodiments of the present disclosure relate to the field of image processing technology, and in particular, to a processing method, device, equipment and storage medium for a special effects resource package.
背景技术Background technique
在多媒体平台中,特效资源包下发至客户端后,客户端解析特效资源包并渲染,以实现目标特效。由于不同的终端本身性能不同,同一套特效资源包在不同终端上渲染出的效果差异较大。在高端设备上,特效渲染的效果一般较好;在低端设备上,由于运算能力相对较弱,特效渲染可能会引起卡顿及发烫等问题。In the multimedia platform, after the special effects resource package is delivered to the client, the client parses the special effects resource package and renders it to achieve the target special effects. Due to the different performance of different terminals, the effects rendered by the same set of special effects resource packages on different terminals are quite different. On high-end devices, the effect of special effects rendering is generally better; on low-end devices, due to relatively weak computing power, special effects rendering may cause problems such as freezing and heating.
发明内容Contents of the invention
本公开实施例提供一种特效资源包的处理方法、装置、设备及存储介质,基于运行参数调整特效资源包的渲染策略,以保证特效资源包被高效的渲染。Embodiments of the present disclosure provide a processing method, device, equipment and storage medium for a special effects resource package, and adjust the rendering strategy of the special effects resource package based on operating parameters to ensure that the special effects resource package is rendered efficiently.
第一方面,本公开实施例提供了一种特效资源包的处理方法,包括:In a first aspect, embodiments of the present disclosure provide a method for processing special effects resource packages, including:
获取特效资源包,基于预设配置信息将所述特效资源包渲染至界面进行显示;Obtain the special effects resource package and render the special effects resource package to the interface for display based on the preset configuration information;
判断所述特效资源包的处理过程是否达到设定采样周期;Determine whether the processing of the special effects resource package reaches the set sampling period;
若到达设定采样周期,则获取已渲染的所述资源包在所述设定采样周期内的渲染参数;If the set sampling period is reached, obtain the rendering parameters of the rendered resource package within the set sampling period;
根据所述渲染参数对所述预设配置信息进行调整;Adjust the preset configuration information according to the rendering parameters;
基于调整后的所述预设配置信息将所述特效资源包继续渲染至界面进行显示,并返回执行判断所述特效资源包的处理过程是否达到设定采样周期的操作,直到所述特效资源包处理完成。Based on the adjusted preset configuration information, the special effects resource package continues to be rendered to the interface for display, and returns to perform the operation of judging whether the processing of the special effects resource package reaches the set sampling period until the special effects resource package Processing completed.
第二方面,本公开实施例还提供了一种特效资源包的处理装置,包括:In a second aspect, embodiments of the present disclosure also provide a processing device for special effects resource packages, including:
特效资源包获取模块,用于获取特效资源包,基于预设配置信息将所述特效资源包渲染至界面进行显示;The special effects resource package acquisition module is used to obtain the special effects resource package and render the special effects resource package to the interface for display based on the preset configuration information;
处理过程判断模块,用于判断所述特效资源包的处理过程是否达到设定采样周期;A processing process judgment module, used to judge whether the processing process of the special effects resource package reaches the set sampling period;
渲染参数获取模块,用于若到达设定采样周期,则获取已渲染的所述资源包在所述设定采样周期内的渲染参数;A rendering parameter acquisition module, configured to acquire the rendering parameters of the rendered resource package within the set sampling period if the set sampling period is reached;
调整模块,用于根据所述渲染参数对所述预设配置信息进行调整;An adjustment module, configured to adjust the preset configuration information according to the rendering parameters;
显示模块,用于基于调整后的所述预设配置信息将所述特效资源包继续渲染至界面进行显示,并返回执行判断所述特效资源包的处理过程是否达到设定采样周期的操作,直到所述特效资源包处理完成。A display module, configured to continue rendering the special effects resource package to the interface for display based on the adjusted preset configuration information, and return to perform the operation of judging whether the processing of the special effects resource package reaches the set sampling period until The processing of the special effects resource package is completed.
第三方面,本公开实施例还提供了一种电子设备,所述电子设备包括:In a third aspect, embodiments of the present disclosure also provide an electronic device, where the electronic device includes:
一个或多个处理器;one or more processors;
存储装置,用于存储一个或多个程序,a storage device for storing one or more programs,
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如本公开实施例所述的特效资源包的处理方法。When the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the special effects resource package processing method described in the embodiments of the present disclosure.
第四方面,本公开实施例还提供了一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行如本公开实施例所述的特效资源包的处理方法。In a fourth aspect, embodiments of the disclosure further provide a storage medium containing computer-executable instructions, which when executed by a computer processor are used to execute the special effects resource package as described in the embodiments of the disclosure. Approach.
本公开实施例公开了一种特效资源包的处理方法、装置、设备及存储介质,获取特效资源包,基于预设配置信息将所述特效资源包渲染至界面进行显示;判断所述特效资源包的处理过程是否达到设定采样周期;若到达设定采样周期,则获取已渲染的所述资源包在所述设定采样周期内的渲染参数;根据所述渲染参数对所述预设配置信息进行调整;基于调整后的所述预设配置信息将所述特效资源包继续渲染至界面进行显示,并返回执行判断所述特效资源包的处理过程是否达到设定采样周期的操作,直到所述特效资源包处理完成。本公开实施例提供的特效资源包的处理方法,基于已渲染的特效资源包在设定采样周期内的渲染参数实时调整预设配置信息,可以保证特效资源包被高效流畅的渲染。Embodiments of the present disclosure disclose a processing method, device, equipment and storage medium for a special effects resource package, which acquires a special effects resource package, renders the special effects resource package to an interface for display based on preset configuration information, and determines the special effects resource package. Whether the processing process reaches the set sampling period; if the set sampling period is reached, obtain the rendering parameters of the rendered resource package within the set sampling period; and configure the preset configuration information according to the rendering parameters. Make adjustments; continue to render the special effects resource package to the interface for display based on the adjusted preset configuration information, and return to perform the operation of judging whether the processing of the special effects resource package reaches the set sampling period until the The special effects resource package processing is completed. The processing method of the special effects resource package provided by the embodiment of the present disclosure adjusts the preset configuration information in real time based on the rendering parameters of the rendered special effects resource package within the set sampling period, which can ensure that the special effects resource package is rendered efficiently and smoothly.
附图说明Description of drawings
结合附图并参考以下具体实施方式,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。贯穿附图中,相同或相似的附图标记表示相同或相似的元素。应当理解附图是示意性的,原件和元素不一定按照比例绘制。The above and other features, advantages, and aspects of various embodiments of the present disclosure will become more apparent with reference to the following detailed description taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It is to be understood that the drawings are schematic and that elements and elements are not necessarily drawn to scale.
图1是本公开实施例所提供的一种特效资源包的处理方法的流程示意图;Figure 1 is a schematic flowchart of a processing method for a special effects resource package provided by an embodiment of the present disclosure;
图2是本公开实施例所提供的一种特效资源包的处理方法的流程示意图;Figure 2 is a schematic flowchart of a processing method for a special effects resource package provided by an embodiment of the present disclosure;
图3是本公开实施例所提供的一种特效资源包的处理装置的结构示意图;Figure 3 is a schematic structural diagram of a special effects resource package processing device provided by an embodiment of the present disclosure;
图4是本公开实施例所提供的一种电子设备的结构示意图。FIG. 4 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure.
具体实施方式Detailed ways
下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the disclosure are shown in the drawings, it should be understood that the disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, which rather are provided for A more thorough and complete understanding of this disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of the present disclosure.
应当理解,本公开的方法实施方式中记载的各个步骤可以按照不同的顺序执行,和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行示出的步骤。本公开的范围在此方面不受限制。It should be understood that various steps described in the method implementations of the present disclosure may be executed in different orders and/or in parallel. Furthermore, method embodiments may include additional steps and/or omit performance of illustrated steps. The scope of the present disclosure is not limited in this regard.
本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”;术语“一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。As used herein, the term "include" and its variations are open-ended, ie, "including but not limited to." The term "based on" means "based at least in part on." The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; and the term "some embodiments" means "at least some embodiments". Relevant definitions of other terms will be given in the description below.
需要注意,本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。It should be noted that concepts such as “first” and “second” mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units. Or interdependence.
需要注意,本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“一个或多个”。It should be noted that the modifications of "one" and "plurality" mentioned in this disclosure are illustrative and not restrictive. Those skilled in the art will understand that unless the context clearly indicates otherwise, it should be understood as "one or Multiple”.
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。The names of messages or information exchanged between multiple devices in the embodiments of the present disclosure are for illustrative purposes only and are not used to limit the scope of these messages or information.
可以理解的是,在使用本公开各实施例公开的技术方案之前,均应当依据相关法律法规通过恰当的方式对本公开所涉及个人信息的类型、使用范围、使用场景等告知用户并获得用户的授权。It can be understood that before using the technical solutions disclosed in the embodiments of this disclosure, users should be informed of the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations and obtain the user's authorization. .
例如,在响应于接收到用户的主动请求时,向用户发送提示信息,以明确地提示用户,其请求执行的操作将需要获取和使用到用户的个人信息。从而,使得用户可以根据提示信息来自主地选择是否向执行本公开技术方案的操作的电子设备、应用程序、服务器或存储介质等软件或硬件提供个人信息。For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly remind the user that the operation requested will require the acquisition and use of the user's personal information. Therefore, users can autonomously choose whether to provide personal information to software or hardware such as electronic devices, applications, servers or storage media that perform the operations of the technical solution of the present disclosure based on the prompt information.
作为一种可选的但非限定性的实现方式,响应于接收到用户的主动请求,向用户发送提示信息的方式例如可以是弹窗的方式,弹窗中可以以文字的方式呈现提示信息。此外,弹窗中还可以承载供用户选择“同意”或者“不同意”向电子设备提供个人信息的选择控件。As an optional but non-limiting implementation method, in response to receiving the user's active request, the method of sending prompt information to the user may be, for example, a pop-up window, and the prompt information may be presented in the form of text in the pop-up window. In addition, the pop-up window can also contain a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
可以理解的是,上述通知和获取用户授权过程仅是示意性的,不对本公开的实现方式构成限定,其它满足相关法律法规的方式也可应用于本公开的实现方式中。It can be understood that the above process of notifying and obtaining user authorization is only illustrative and does not limit the implementation of the present disclosure. Other methods that satisfy relevant laws and regulations can also be applied to the implementation of the present disclosure.
可以理解的是,本技术方案所涉及的数据(包括但不限于数据本身、数据的获取或使用)应当遵循相应法律法规及相关规定的要求。It can be understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) should comply with the requirements of corresponding laws, regulations and related regulations.
由于不同终端设备本身性能不同,同一套特效资源包在不同终端设备上解析出来效果差异会比较大。在高端机型上,特效渲染的效果可能是十分流畅的。但在低端机型上,由于设备资源不同,较低等的手机运算单元、寄存器、调度机制相较于高端机更少,运算能力相对较弱,在特效渲染时单位时间内无法完成等量的运算,运算时间增加。另外,由于长时间的高负荷计算将导致终端设备发热严重CPU降频,加剧性能劣化,出现效果卡顿,显著降低用户体验。Due to the different performance of different terminal devices, the parsed effects of the same set of special effects resource packages on different terminal devices will be quite different. On high-end models, the effect of special effects rendering can be very smooth. However, on low-end models, due to different device resources, lower-end mobile phones have fewer computing units, registers, and scheduling mechanisms than high-end models. The computing power is relatively weak, and the same amount cannot be completed per unit time during special effects rendering. operation, the operation time increases. In addition, due to long-term high-load calculations, the terminal device will heat up and severely reduce the CPU frequency, exacerbating performance degradation, causing effect lag, and significantly reducing the user experience.
图1为本公开实施例所提供的一种特效资源包的处理方法的流程示意图,本公开实施例适用于对特效资源包进行处理的情形,该方法可以由特效资源包的处理装置来执行,该装置可以通过软件和/或硬件的形式实现,可选的,通过电子设备来实现,该电子设备可以是移动终端、PC端或服务器等。Figure 1 is a schematic flowchart of a method for processing a special effects resource package provided by an embodiment of the present disclosure. The embodiment of the present disclosure is suitable for processing a special effects resource package. The method can be executed by a processing device for a special effects resource package. The device can be implemented in the form of software and/or hardware, optionally, through electronic equipment, and the electronic equipment can be a mobile terminal, a PC, a server, etc.
如图1所示,所述方法包括:As shown in Figure 1, the method includes:
S110,获取特效资源包,基于预设配置信息将特效资源包渲染至界面进行显示。S110: Obtain the special effects resource package, and render the special effects resource package to the interface for display based on the preset configuration information.
其中,特效资源包可以理解为用户对图像进行特效处理的数据包。预设配置信息可以理解为与资源消耗相关的配置信息,可以包括如下至少一项:抗锯齿策略开启或关闭、分辨率降级策略开启和关闭及隔帧处理策略开启或关闭。预设配置信息可以是用户根据需求预先选择的,例如可以是:开启抗锯齿策略、关闭分辨率降级策略或者关闭隔帧处理策略。Among them, the special effects resource package can be understood as a data package for users to perform special effects processing on images. The preset configuration information can be understood as configuration information related to resource consumption, and can include at least one of the following: turning on or off the anti-aliasing policy, turning on or off the resolution degradation policy, and turning on or off the alternate frame processing policy. The default configuration information can be pre-selected by the user according to needs, for example, it can be: turning on the anti-aliasing strategy, turning off the resolution degradation strategy, or turning off the every frame processing strategy.
具体的,基于预设配置信息将特效资源包渲染至界面进行显示的过程可以是:基于预设配置信息对特效资源包的图像数据进行处理;将处理后的图像数据渲染至界面进行显示。Specifically, the process of rendering the special effects resource package to the interface for display based on the preset configuration information may be: processing the image data of the special effects resource package based on the preset configuration information; and rendering the processed image data to the interface for display.
本实施例中,当客户端接收到服务端下发的特效资源包后,对特效资源包进行解析,然后基于预设配置信息对解析后的特效资源包进行处理,最后将处理后的特效图像显然至界面进行显示。In this embodiment, when the client receives the special effects resource package sent by the server, it parses the special effects resource package, then processes the parsed special effects resource package based on the preset configuration information, and finally uses the processed special effects image to Obviously go to the interface to display.
S120,判断特效资源包的处理过程是否达到设定采样周期。S120: Determine whether the processing of the special effects resource package reaches the set sampling period.
其中,采样周期可以以时间表征或者以特效帧的数量表征,例如:可以是T秒为一个采样周期,或者N个特效帧为一个采样周期。设定采样周期可以理解为距离当前时刻最近的一个或多个采样周期,例如:为当前时刻的前一个采样周期或者前n个采样周期,其中n≥2。The sampling period can be characterized by time or the number of special effect frames. For example, T seconds can be a sampling period, or N special effect frames can be a sampling period. The set sampling period can be understood as one or more sampling periods closest to the current moment, for example: the previous sampling period or the previous n sampling periods, where n ≥ 2.
具体的,在对特效资源包的处理过程中,对处理时间进行计时或者对已处理完成的特效帧进行计数,以判断处理时长或者已处理完成的特效帧数量是否达到设定采样周期。Specifically, during the processing of the special effects resource package, the processing time is timed or the processed special effect frames are counted to determine whether the processing time or the number of processed special effect frames reaches the set sampling period.
S130,若到达设定采样周期,则获取已渲染的资源包在设定采样周期内的渲染参数。S130, if the set sampling period is reached, obtain the rendering parameters of the rendered resource package within the set sampling period.
其中,渲染参数可以包括渲染帧率和/或终端渲染温度。渲染帧率可以理解为终端设备渲染特效帧的速率,即单位时间内能够渲染特效帧的数量;终端渲染温度可以理解为终端在一个采样周期内的平均温度。终端温度可以由设置于终端设备上的温度传感器检测获得。本实施例中,可以从渲染帧率和终端渲染温度等多个维度评估终端设备当前的性能,利于后续渲染策略的调整。The rendering parameters may include rendering frame rate and/or terminal rendering temperature. The rendering frame rate can be understood as the rate at which the terminal device renders special effects frames, that is, the number of special effects frames that can be rendered per unit time; the terminal rendering temperature can be understood as the average temperature of the terminal within a sampling period. The terminal temperature can be detected and obtained by a temperature sensor provided on the terminal device. In this embodiment, the current performance of the terminal device can be evaluated from multiple dimensions such as rendering frame rate and terminal rendering temperature, which facilitates subsequent adjustments to the rendering strategy.
本实施例中,设定采样周期可以理解为距离当前时刻最近的一个或多个采样周期,例如:为当前时刻的前一个采样周期或者前n个采样周期,其中n≥2。当采样开关打开时,终端设备开始计时或者计数,当经历的时长到达一个采样周期或者完成渲染的特效帧数量到达一个采样周期时,获得该采样周期内的渲染参数。本实施例中,采样周期可以连续或者不连续。其中,采样周期连续可以理解为在特效资源包的整个渲染过程,连续的进行采样,即采样开关一直打开。采样周期不连续,可以理解为在特效资源包的整个渲染过程,采样周期之间间隔一段空闲时间。示例性的,将采样开关打开后,经过一个采样周期后,获取该采样周期内的渲染参数,并将采样开关关闭,当经过一段与采样周期相同的空闲时间后,再将采样开关打开,依次类推。In this embodiment, the set sampling period can be understood as one or more sampling periods closest to the current moment, for example: the previous sampling period or the previous n sampling periods, where n≥2. When the sampling switch is turned on, the terminal device starts timing or counting. When the elapsed time reaches a sampling period or the number of completed rendering special effects frames reaches a sampling period, the rendering parameters within the sampling period are obtained. In this embodiment, the sampling period may be continuous or discontinuous. Among them, the continuous sampling period can be understood as continuous sampling during the entire rendering process of the special effects resource package, that is, the sampling switch is always turned on. The discontinuous sampling period can be understood as a period of idle time between sampling periods during the entire rendering process of the special effects resource package. For example, after the sampling switch is turned on, after a sampling period, the rendering parameters within the sampling period are obtained, and the sampling switch is turned off. After an idle time that is the same as the sampling period, the sampling switch is turned on again, in sequence. analogy.
可选的,若渲染参数为渲染帧率,获取已渲染的资源包在设定采样周期内的渲染参数的方式可以是:获取已渲染的资源包在设定采样周期对应的渲染时长以及包含的已渲染特效帧数量;根据渲染时长和已渲染特效帧数量确定渲染帧率,将渲染帧率确定为渲染参数。Optionally, if the rendering parameter is the rendering frame rate, the method of obtaining the rendering parameters of the rendered resource package within the set sampling period can be: obtaining the rendering duration and included content of the rendered resource package corresponding to the set sampling period. The number of rendered special effects frames; the rendering frame rate is determined based on the rendering time and the number of rendered special effects frames, and the rendering frame rate is determined as a rendering parameter.
其中,若采样周期由时间表征,则采样周期对应的渲染时长即为采样周期的时长,采样周期包含的已渲染特效帧数量可以理解为在该渲染时长内渲染的特征帧数量。若采样周期由特效帧的数量表征,则采样周期对应的渲染时长可以理解终端设备完成渲染该特效帧数量的特效帧所需的时长,采样周期包含的已渲染特效帧数量即为采样周期对应的特效帧数量。Among them, if the sampling period is characterized by time, the rendering duration corresponding to the sampling period is the duration of the sampling period. The number of rendered special effects frames included in the sampling period can be understood as the number of feature frames rendered within the rendering duration. If the sampling period is characterized by the number of special effect frames, the rendering time corresponding to the sampling period can be understood as the time required for the terminal device to complete rendering the number of special effect frames. The number of rendered special effects frames included in the sampling period is the corresponding rendering time of the sampling period. The number of special effects frames.
具体的,根据渲染时长和已渲染特效帧数量确定渲染帧率的方式可以是:将已渲染特征帧数量除以渲染时长,获得渲染帧率。示例性的,假设已渲染特征帧数量为N,渲染时长为T,则渲染帧率为f=N/T。本实施例中,通过设定采样周期对应的渲染时长以及包含的已渲染特效帧数量确定渲染帧率,可以提高确定渲染帧率的准确性。Specifically, the method of determining the rendering frame rate based on the rendering duration and the number of rendered special effect frames may be: dividing the number of rendered feature frames by the rendering duration to obtain the rendering frame rate. For example, assuming that the number of rendered feature frames is N and the rendering time is T, the rendering frame rate is f=N/T. In this embodiment, the rendering frame rate is determined by setting the rendering duration corresponding to the sampling period and the number of rendered special effects frames included, which can improve the accuracy of determining the rendering frame rate.
可选的,设定采样周期包含一个或者多个采样周期,若设定采样周期包含多个采样周期,则获取已渲染的资源包在设定采样周期内的渲染参数的方式可以是:将多个采样周期分别对应的渲染帧率求取平均值,获得平均渲染帧率,将平均渲染帧率确定为渲染参数。Optionally, the set sampling period includes one or more sampling periods. If the set sampling period includes multiple sampling periods, the method of obtaining the rendering parameters of the rendered resource package within the set sampling period can be: convert multiple sampling periods. The average rendering frame rate corresponding to each sampling period is calculated to obtain the average rendering frame rate, and the average rendering frame rate is determined as the rendering parameter.
本实施例中,若设定采样周期包含一个采样周期,则设定采样周期为当前时刻的前一个采样周期,将该采样周期对于的渲染帧率确定为渲染参数。若设定采样周期包含多个采样周期,则为当前时刻的前n个采样周期。对于各采样周期,采样上述实施例的方式确定渲染帧率,此处不再赘述。最后将多个采样周期分别对应的渲染帧率求取平均值,获得平均渲染帧率,将平均渲染帧率确定为渲染参数。本实施例中,将多个渲染周期的平均渲染帧率确定为渲染参数,可以提高后续调整渲染策略的可靠性。In this embodiment, if the set sampling period includes one sampling period, the sampling period is set to the previous sampling period of the current moment, and the rendering frame rate corresponding to the sampling period is determined as the rendering parameter. If the set sampling period includes multiple sampling periods, it will be the first n sampling periods at the current moment. For each sampling period, the rendering frame rate is determined by sampling in the above embodiment, which will not be described again here. Finally, the rendering frame rates corresponding to multiple sampling periods are averaged to obtain the average rendering frame rate, and the average rendering frame rate is determined as the rendering parameter. In this embodiment, the average rendering frame rate of multiple rendering cycles is determined as the rendering parameter, which can improve the reliability of subsequent adjustments to the rendering strategy.
可选的,若渲染参数为终端渲染温度,则获取已渲染的资源包在设定采样周期内的渲染参数的方式可以是:获取已渲染的资源包在设定采样周期内各特效帧渲染完成时的终端温度;将特效帧对应的终端温度求取平均值,获得终端渲染温度,将终端渲染温度确定为渲染参数。Optionally, if the rendering parameter is the terminal rendering temperature, the method of obtaining the rendering parameters of the rendered resource package within the set sampling period can be: obtaining the rendering completion of each special effects frame of the rendered resource package within the set sampling period. The terminal temperature at the time; average the terminal temperatures corresponding to the special effects frame to obtain the terminal rendering temperature, and determine the terminal rendering temperature as the rendering parameter.
具体的,在一个采样周期内,当终端渲染完成一个特效帧后,获取温度传感器检测到的当前终端设备的温度,最后将采样周期内各特效帧分别对应的终端温度求取平均值,从而获得终端渲染温度。本实施例中,若渲染参数为终端渲染温度,则设定采样周期为一个,即参考当前时刻前一个采样周期的终端渲染温度,这样可以及时的对渲染策略进行调整。Specifically, within a sampling period, after the terminal completes rendering a special effects frame, the temperature of the current terminal device detected by the temperature sensor is obtained, and finally the terminal temperatures corresponding to each special effects frame in the sampling period are averaged to obtain Terminal rendering temperature. In this embodiment, if the rendering parameter is the terminal rendering temperature, then the sampling period is set to one, that is, referring to the terminal rendering temperature of the previous sampling period at the current moment, so that the rendering strategy can be adjusted in a timely manner.
S140,根据渲染参数对预设配置信息进行调整。S140, adjust the preset configuration information according to the rendering parameters.
S150,基于调整后的预设配置信息将特效资源包继续渲染至界面进行显示,并返回执行S120的操作,直到特效资源包处理完成。S150: Continue to render the special effects resource package to the interface for display based on the adjusted preset configuration information, and return to perform the operation of S120 until the special effects resource package processing is completed.
其中,预设配置信息可以包括如下至少一项:抗锯齿策略(Anti-Aliasing,AA)、分辨率降级策略及隔帧处理策略等。其中,抗锯齿策略可以包括:多重采样抗锯齿策略(MultiSampling Anti-Aliasing,MSAA)、快速近似抗锯齿(Fast Approximate Anti-Aliasing,FXAA)、覆盖采样抗锯齿(Coverage Sampling Antialiasing,CSAA)及多帧采样抗锯齿(Custom Filter Anti-Aliasing,MFAA)等。抗锯齿策略可以理解为:在显示尺寸不变的情况提高分辨率,让单个像素变得极小,以大幅减轻画面的锯齿感。分辨率降级策略可以理解为降低特效帧的显示分辨率,降低后的分辨率可以是原分辨率的0.5-0.7倍之间的任意值。隔帧处理策略可以理解为每隔设定帧调用相应的算法对特效数据进行处理,以基于处理后的数据进行帧渲染,例如:每隔M帧处理一次特效数据。Wherein, the preset configuration information may include at least one of the following: anti-aliasing strategy (Anti-Aliasing, AA), resolution downgrade strategy, alternate frame processing strategy, etc. Among them, anti-aliasing strategies may include: MultiSampling Anti-Aliasing (MSAA), Fast Approximate Anti-Aliasing (FXAA), Coverage Sampling Antialiasing (CSAA) and multi-frame Sampling anti-aliasing (Custom Filter Anti-Aliasing, MFAA), etc. The anti-aliasing strategy can be understood as: increasing the resolution while keeping the display size unchanged, making individual pixels extremely small, thereby greatly reducing the aliasing of the picture. The resolution downgrading strategy can be understood as reducing the display resolution of the special effects frame. The reduced resolution can be any value between 0.5-0.7 times the original resolution. The every-frame processing strategy can be understood as calling the corresponding algorithm to process the special effects data every set frame, so as to perform frame rendering based on the processed data. For example, special effects data is processed every M frames.
本实施例中,在开始渲染特效资源包之前,可以根据配置信息或者用户的选择操作将各预设配置信息关闭或者开启。例如:为了使得特效资源包达到最优的显示效果,配置信息中可以是:开启抗锯齿策略、关闭分辨率降级策略及关闭隔帧处理策略。In this embodiment, before starting to render the special effects resource package, each preset configuration information can be turned off or on according to the configuration information or the user's selection operation. For example: in order to achieve the optimal display effect of the special effects resource package, the configuration information can include: turning on the anti-aliasing strategy, turning off the resolution degradation strategy, and turning off the every frame processing strategy.
可选的,根据渲染参数对预设配置信息进行调整的方式可以是:若渲染帧率小于第一帧率阈值和/或终端渲染温度大于第一温度阈值,则对预设配置信息进行调整。Optionally, the method of adjusting the preset configuration information according to the rendering parameters may be: if the rendering frame rate is less than the first frame rate threshold and/or the terminal rendering temperature is greater than the first temperature threshold, then the preset configuration information is adjusted.
其中,第一帧率阈值可以理解为期望的最低渲染帧率,第一温度阈值可以理解为终端能够容忍的最高温度,可以由用户设置。The first frame rate threshold can be understood as the desired minimum rendering frame rate, and the first temperature threshold can be understood as the highest temperature that the terminal can tolerate, which can be set by the user.
本实施例中,若渲染帧率小于第一帧率阈值,则表明特效已经无法流畅播放,出现卡顿情况。若终端渲染温度大于第一温度阈值,则表明当前终端发热严重。此时,终端的处理性能较差,需要对预设配置信息进行调整,以提高渲染帧率及降低终端渲染温度,可以避免渲染过程中出现卡顿及引起终端发热严重等问题。In this embodiment, if the rendering frame rate is less than the first frame rate threshold, it indicates that the special effects cannot be played smoothly and freezes occur. If the terminal rendering temperature is greater than the first temperature threshold, it indicates that the current terminal is seriously overheated. At this time, the processing performance of the terminal is poor, and the preset configuration information needs to be adjusted to increase the rendering frame rate and reduce the terminal rendering temperature, which can avoid problems such as freezes during the rendering process and serious terminal heating.
可选的,若渲染帧率小于第一帧率阈值和/或终端渲染温度大于第一温度阈值,则对预设配置信息进行调整的过程可以是:若预设配置信息包括抗锯齿策略开启或关闭,则判断抗锯齿策略是否关闭;若抗锯齿策略未关闭,则将抗锯齿策略关闭;若抗锯齿策略已关闭且预设配置信息包括分辨率降级策略开启,则判断分辨率降级策略是否开启;若分辨率降级策略未开启,则开启分辨率降级策略;若分辨率降级策略已开启且预设配置信息包括隔帧处理策略开启或关闭,则判断隔帧处理策略是否已开启;若隔帧处理策略未开启,则开启隔帧处理策略。Optionally, if the rendering frame rate is less than the first frame rate threshold and/or the terminal rendering temperature is greater than the first temperature threshold, the process of adjusting the preset configuration information may be: if the preset configuration information includes anti-aliasing policy turned on or If the anti-aliasing policy is turned off, then determine whether the anti-aliasing policy is turned off; if the anti-aliasing policy is not turned off, then turn off the anti-aliasing policy; if the anti-aliasing policy is turned off and the default configuration information includes the resolution downgrading policy is turned on, then determine whether the resolution downgrading policy is turned on ; If the resolution downgrade strategy is not turned on, turn on the resolution downgrade strategy; if the resolution downgrade strategy is turned on and the default configuration information includes whether the every frame processing strategy is turned on or off, then determine whether the every other frame processing strategy is turned on; if every other frame If the processing strategy is not enabled, enable the every frame processing strategy.
本实施例中,若抗锯齿策略未关闭,则将抗锯齿策略关闭,并基于关闭抗锯齿策略的配置继续对特效资源包进行渲染,并返回执行判断特效资源包的处理过程是否达到设定采样周期,若到达设定采样周期,则获取已渲染的资源包在设定采样周期内的渲染参数,根据渲染参数对预设配置信息进行调整的操作。若抗锯齿策略已关闭且分辨率降级策略未开启,则开启分辨率降级策略,并基于关闭抗锯齿策略及开启辨率降级策略的配置继续对特效资源包进行渲染,并返回执行判断特效资源包的处理过程是否达到设定采样周期,若到达设定采样周期,则获取已渲染的资源包在设定采样周期内的渲染参数,根据渲染参数对预设配置信息进行调整的操作。若抗锯齿策略已关闭、分辨率降级策略已开启且隔帧处理策略未开启,则开启隔帧处理策略,并基于关闭抗锯齿策略、开启辨率降级策略及开启隔帧处理策略的配置继续对特效资源包进行渲染,并返回执行判断特效资源包的处理过程是否达到设定采样周期,若到达设定采样周期,则获取已渲染的资源包在设定采样周期内的渲染参数,根据渲染参数对预设配置信息进行调整的操作。本实施例中,通过能够减少计算量的渲染策略,以提高终端的渲染效率及降低终端渲染温度,以保证特效资源包顺畅的渲染,可以避免渲染过程中出现卡顿及引起终端发热严重等问题。In this embodiment, if the anti-aliasing policy is not turned off, the anti-aliasing policy is turned off, and based on the configuration of turning off the anti-aliasing policy, the special effects resource package is continued to be rendered, and execution is returned to determine whether the processing of the special effects resource package has reached the set sampling rate. period, if the set sampling period is reached, the rendering parameters of the rendered resource package within the set sampling period are obtained, and the preset configuration information is adjusted according to the rendering parameters. If the anti-aliasing policy is turned off and the resolution downgrading policy is not turned on, the resolution downgrading policy is turned on, and based on the configuration of turning off the anti-aliasing policy and turning on the resolution downgrading strategy, continue to render the special effects resource package, and return to execute the judgment special effects resource package. Whether the processing process reaches the set sampling period, if it reaches the set sampling period, obtain the rendering parameters of the rendered resource package within the set sampling period, and adjust the preset configuration information according to the rendering parameters. If the anti-aliasing policy is turned off, the resolution downgrade policy is turned on, and the every-frame processing policy is not turned on, the every-frame processing policy is turned on, and the processing continues based on the configurations of turning off the anti-aliasing policy, turning on the resolution downgrading policy, and turning on the every-frame processing policy. The special effects resource package is rendered, and returns to execution to determine whether the processing of the special effects resource package reaches the set sampling period. If the set sampling period is reached, the rendering parameters of the rendered resource package within the set sampling period are obtained. According to the rendering parameters The operation of adjusting the preset configuration information. In this embodiment, a rendering strategy that can reduce the amount of calculation is used to improve the rendering efficiency of the terminal and reduce the rendering temperature of the terminal to ensure smooth rendering of the special effects resource package and avoid problems such as lagging during the rendering process and serious heating of the terminal. .
可选的,根据渲染参数对预设配置信息进行调整的方式可以是:若渲染帧率大于第二帧率阈值和/或终端渲染温度小于第二温度阈值,则对预设配置信息进行调整。Optionally, the method of adjusting the preset configuration information according to the rendering parameters may be: if the rendering frame rate is greater than the second frame rate threshold and/or the terminal rendering temperature is less than the second temperature threshold, then the preset configuration information is adjusted.
其中,第二帧率阈值大于第一帧率阈值,第二温度阈值小于第一温度阈值。第二帧率阈值和第二温度阈值可以均由用户设置。本实施例中,第二帧率阈值可以是第一帧率阈值与设定恢复帧率之和,设定恢复帧率也可以由用户设置。Wherein, the second frame rate threshold is greater than the first frame rate threshold, and the second temperature threshold is less than the first temperature threshold. The second frame rate threshold and the second temperature threshold may both be set by the user. In this embodiment, the second frame rate threshold may be the sum of the first frame rate threshold and the set recovery frame rate, and the set recovery frame rate may also be set by the user.
本实施例中,若渲染帧率大于第二帧率阈值,则表明此时特效可以正常流畅的播放。终端渲染温度小于第二温度阈值,则表明此时终端设备的发热情况正常。此时,终端的处理性能较佳,为了进一步提高特效的显示效果,可以对预设配置信息进行调整。In this embodiment, if the rendering frame rate is greater than the second frame rate threshold, it indicates that the special effects can be played normally and smoothly at this time. If the terminal rendering temperature is less than the second temperature threshold, it indicates that the heating of the terminal device is normal at this time. At this time, the processing performance of the terminal is better. In order to further improve the display effect of special effects, the preset configuration information can be adjusted.
可选的,若渲染帧率大于第二帧率阈值和/或终端渲染温度小于第二温度阈值,则对预设配置信息进行调整的过程可以是:若预设配置信息包括隔帧处理策略开启或关闭,则判断隔帧处理策略是否已开启,若隔帧处理策略已开启,则关闭隔帧处理策略;若隔帧处理策略未开启且且预设配置信息包括分辨率降级策略开启,则判断分辨率降级策略是否开启;若分辨率降级策略已开启,则关闭分辨率降级策略;若分辨率降级策略未开启且预设配置信息包括抗锯齿策略开启或关闭,则判断抗锯齿策略是否关闭;若抗锯齿策略未关闭,则关闭抗锯齿策略。Optionally, if the rendering frame rate is greater than the second frame rate threshold and/or the terminal rendering temperature is less than the second temperature threshold, the process of adjusting the preset configuration information may be: if the preset configuration information includes the alternate frame processing strategy enabled or off, then determine whether the every frame processing strategy is turned on. If the every frame processing strategy is turned on, then turn off the every frame processing strategy; if the every frame processing strategy is not turned on and the default configuration information includes the resolution downgrade strategy, then judge Whether the resolution downgrade policy is enabled; if the resolution downgrade policy is enabled, turn off the resolution downgrade policy; if the resolution downgrade policy is not enabled and the default configuration information includes turning on or off the anti-aliasing policy, determine whether the anti-aliasing policy is turned off; If the anti-aliasing policy is not turned off, turn off the anti-aliasing policy.
若隔帧处理策略已开启,则关闭隔帧处理策略,并基于关闭隔帧处理策略的配置继续对特效资源包进行渲染,并返回执行判断特效资源包的处理过程是否达到设定采样周期,若到达设定采样周期,则获取已渲染的资源包在设定采样周期内的渲染参数,根据渲染参数对预设配置信息进行调整的操作。若隔帧处理策略未开启且分辨率降级策略已开启,则关闭分辨率降级策略,基于关闭隔帧处理策略及关闭分辨率降级策略的配置继续对特效资源包进行渲染,并返回执行判断特效资源包的处理过程是否达到设定采样周期,若到达设定采样周期,则获取已渲染的资源包在设定采样周期内的渲染参数,根据渲染参数对预设配置信息进行调整的操作。若隔帧处理策略未开启、分辨率降级策略未开启且抗锯齿策略已关闭,则开启抗锯齿策略,并基于关闭隔帧处理策略、关闭分辨率降级策略开启抗锯齿策略的配置继续对特效资源包进行渲染,并返回执行判断特效资源包的处理过程是否达到设定采样周期,若到达设定采样周期,则获取已渲染的资源包在设定采样周期内的渲染参数,根据渲染参数对预设配置信息进行调整的操作。本实施例中,当终端设备性能良好时,开启或关闭一些渲染策略,以优化特效帧,可以提高特效的显示效果。If the every-frame processing strategy is turned on, turn off the every-frame processing strategy, and continue to render the special effects resource package based on the configuration of turning off the every-frame processing strategy, and return to execution to determine whether the processing of the special effects resource package reaches the set sampling period. If When the set sampling period is reached, the rendering parameters of the rendered resource package within the set sampling period are obtained, and the preset configuration information is adjusted according to the rendering parameters. If the every frame processing strategy is not turned on and the resolution downgrading strategy is turned on, the resolution downgrading strategy is turned off. Based on the configuration of turning off the every frame processing strategy and turning off the resolution downgrading strategy, the special effects resource package is continued to be rendered, and the execution judgment of the special effects resources is returned. Whether the processing of the package reaches the set sampling period. If it reaches the set sampling period, obtain the rendering parameters of the rendered resource package within the set sampling period, and adjust the preset configuration information according to the rendering parameters. If the every frame processing policy is not turned on, the resolution downgrade policy is not turned on, and the anti-aliasing policy is turned off, the anti-aliasing policy is turned on, and the special effects resources are continued based on the configuration of turning off the every frame processing policy, turning off the resolution downgrading policy, and turning on the anti-aliasing policy. The package is rendered, and returns to execution to determine whether the processing of the special effects resource package reaches the set sampling period. If the set sampling period is reached, the rendering parameters of the rendered resource package within the set sampling period are obtained, and the preset parameters are calculated based on the rendering parameters. Set configuration information to adjust the operation. In this embodiment, when the performance of the terminal device is good, some rendering strategies are turned on or off to optimize the special effects frame, which can improve the display effect of the special effects.
示例性的,以上述实施例为基础,图2是本实施例中特效资源包的处理方法的示例图,如图2所示,终端设备实时的对特效资源包进行处理,在特效资源包处理过程中,获取特效资源包在设定采样周期内的渲染帧率和/或终端渲染温度。若渲染帧率小于第一帧率阈值和/或终端渲染温度大于第一温度阈值,判断抗锯齿策略是否关闭;若抗锯齿策略未关闭,则将抗锯齿策略关闭;若抗锯齿策略已关闭,则判断分辨率降级策略是否开启;若分辨率降级策略未开启,则开启分辨率降级策略;若分辨率降级策略已开启,则判断隔帧处理策略是否已开启;若隔帧处理策略未开启,则开启隔帧处理策略。若渲染帧率大于第二帧率阈值和/或终端渲染温度小于第二温度阈值,判断隔帧处理策略是否已开启,若隔帧处理策略已开启,则关闭隔帧处理策略;若隔帧处理策略未开启,则判断分辨率降级策略是否开启;若分辨率降级策略已开启,则关闭分辨率降级策略;若分辨率降级策略未开启,则判断抗锯齿策略是否关闭;若抗锯齿策略未关闭,则关闭抗锯齿策略。Illustratively, based on the above embodiment, Figure 2 is an example diagram of the processing method of the special effects resource package in this embodiment. As shown in Figure 2, the terminal device processes the special effects resource package in real time. During the special effects resource package processing During the process, the rendering frame rate and/or terminal rendering temperature of the special effects resource package within the set sampling period are obtained. If the rendering frame rate is less than the first frame rate threshold and/or the terminal rendering temperature is greater than the first temperature threshold, determine whether the anti-aliasing policy is turned off; if the anti-aliasing policy is not turned off, turn off the anti-aliasing policy; if the anti-aliasing policy is turned off, Then determine whether the resolution downgrade strategy is enabled; if the resolution downgrade policy is not enabled, enable the resolution downgrade policy; if the resolution downgrade policy is enabled, determine whether the every frame processing policy is enabled; if the every other frame processing policy is not enabled, Then enable the every frame processing strategy. If the rendering frame rate is greater than the second frame rate threshold and/or the terminal rendering temperature is less than the second temperature threshold, determine whether the every other frame processing strategy has been turned on. If the every other frame processing strategy has been turned on, turn off the every other frame processing strategy; if every other frame processing strategy has been turned on, If the resolution degradation policy is not enabled, determine whether the resolution degradation policy is enabled. If the resolution degradation policy is enabled, turn off the resolution degradation policy. If the resolution degradation policy is not enabled, determine whether the anti-aliasing policy is enabled. If the anti-aliasing policy is not enabled, determine whether the anti-aliasing policy is enabled. , then turn off the anti-aliasing strategy.
本公开实施例的技术方案,在特效资源包渲染过程中,获取特效资源包,基于预设配置信息将所述特效资源包渲染至界面进行显示;判断所述特效资源包的处理过程是否达到设定采样周期;若到达设定采样周期,则获取已渲染的所述资源包在所述设定采样周期内的渲染参数;根据所述渲染参数对所述预设配置信息进行调整;基于调整后的所述预设配置信息将所述特效资源包继续渲染至界面进行显示,并返回执行判断所述特效资源包的处理过程是否达到设定采样周期的操作,直到所述特效资源包处理完成。本公开实施例提供的特效资源包的处理方法,基于已渲染的特效资源包在设定采样周期内的渲染参数实时调整预设配置信息,可以保证特效资源包被高效流畅的渲染。The technical solution of the embodiment of the present disclosure is that during the rendering process of the special effects resource package, the special effects resource package is obtained, and the special effects resource package is rendered to the interface for display based on the preset configuration information; it is judged whether the processing of the special effects resource package reaches the set point. Set the sampling period; if the set sampling period is reached, obtain the rendering parameters of the rendered resource package within the set sampling period; adjust the preset configuration information according to the rendering parameters; based on the adjusted The preset configuration information will continue to render the special effects resource package to the interface for display, and return to perform the operation of judging whether the processing of the special effects resource package reaches the set sampling period until the processing of the special effects resource package is completed. The processing method of the special effects resource package provided by the embodiment of the present disclosure adjusts the preset configuration information in real time based on the rendering parameters of the rendered special effects resource package within the set sampling period, which can ensure that the special effects resource package is rendered efficiently and smoothly.
图3为本公开实施例所提供的一种特效资源包的处理装置的结构示意图,如图3所示,装置包括:Figure 3 is a schematic structural diagram of a special effects resource package processing device provided by an embodiment of the present disclosure. As shown in Figure 3, the device includes:
特效资源包获取模块310,用于获取特效资源包,基于预设配置信息将特效资源包渲染至界面进行显示;The special effects resource package acquisition module 310 is used to obtain the special effects resource package and render the special effects resource package to the interface for display based on the preset configuration information;
处理过程判断模块320,用于判断特效资源包的处理过程是否达到设定采样周期;The processing process judgment module 320 is used to judge whether the processing process of the special effects resource package reaches the set sampling period;
渲染参数获取模块330,用于若到达设定采样周期,则获取已渲染的资源包在设定采样周期内的渲染参数;The rendering parameter acquisition module 330 is used to obtain the rendering parameters of the rendered resource package within the set sampling period if the set sampling period is reached;
调整模块340,用于根据渲染参数对预设配置信息进行调整;The adjustment module 340 is used to adjust the preset configuration information according to the rendering parameters;
显示模块350,用于基于调整后的预设配置信息将特效资源包继续渲染至界面进行显示,并返回执行判断特效资源包的处理过程是否达到设定采样周期的操作,直到特效资源包处理完成。The display module 350 is used to continue to render the special effects resource package to the interface for display based on the adjusted preset configuration information, and return to perform the operation of determining whether the processing of the special effects resource package reaches the set sampling period until the special effects resource package processing is completed. .
可选的,特效资源包获取模块310,还用于:Optional, the special effects resource package acquisition module 310 is also used for:
基于预设配置信息对特效资源包的图像数据进行处理;Process the image data of the special effects resource package based on the preset configuration information;
将处理后的图像数据渲染至界面进行显示。Render the processed image data to the interface for display.
可选的,渲染参数包括渲染帧率和/或终端渲染温度。Optionally, rendering parameters include rendering frame rate and/or terminal rendering temperature.
可选的,渲染参数获取模块330,还用于:Optionally, the rendering parameter acquisition module 330 is also used for:
获取已渲染的资源包在设定采样周期内对应的渲染时长以及包含的已渲染特效帧数量;Obtain the corresponding rendering time of the rendered resource package within the set sampling period and the number of rendered special effects frames it contains;
根据渲染时长和已渲染特效帧数量确定渲染帧率,将渲染帧率确定为渲染参数。The rendering frame rate is determined based on the rendering time and the number of rendered special effects frames, and the rendering frame rate is determined as a rendering parameter.
可选的,设定采样周期包含一个或者多个采样周期,若设定采样周期包含多个采样周期,渲染参数获取模块330,还用于:Optionally, the set sampling period includes one or more sampling periods. If the set sampling period includes multiple sampling periods, the rendering parameter acquisition module 330 is also used to:
将多个采样周期分别对应的渲染帧率求取平均值,获得平均渲染帧率,将平均渲染帧率确定为渲染参数。Calculate the average of the rendering frame rates corresponding to multiple sampling periods to obtain the average rendering frame rate, and determine the average rendering frame rate as the rendering parameter.
可选的,渲染参数获取模块330,还用于:Optionally, the rendering parameter acquisition module 330 is also used for:
获取已渲染的资源包在设定采样周期内特效帧渲染完成时的终端温度;Get the terminal temperature of the rendered resource package when rendering of the effects frame is completed within the set sampling period;
将特效帧对应的终端温度求取平均值,获得终端渲染温度,将终端渲染温度确定为渲染参数。Calculate the average of the terminal temperatures corresponding to the special effects frames to obtain the terminal rendering temperature, and determine the terminal rendering temperature as the rendering parameter.
可选的,调整模块340,还用于:Optionally, the adjustment module 340 is also used for:
若渲染帧率小于第一帧率阈值和/或终端渲染温度大于第一温度阈值,则对预设配置信息进行调整。If the rendering frame rate is less than the first frame rate threshold and/or the terminal rendering temperature is greater than the first temperature threshold, the preset configuration information is adjusted.
可选的,预设配置信息包括如下至少一项:抗锯齿策略开启或关闭、分辨率降级策略开启和关闭及隔帧处理策略开启或关闭。Optionally, the preset configuration information includes at least one of the following: turning on or off the anti-aliasing policy, turning on or off the resolution degradation policy, and turning on or off the every frame processing policy.
可选的,调整模块340,还用于:Optionally, the adjustment module 340 is also used for:
若预设配置信息包括抗锯齿策略开启或关闭,则判断抗锯齿策略是否关闭;若抗锯齿策略未关闭,则将抗锯齿策略关闭;If the default configuration information includes whether the anti-aliasing policy is turned on or off, determine whether the anti-aliasing policy is turned off; if the anti-aliasing policy is not turned off, turn off the anti-aliasing policy;
若抗锯齿策略已关闭且预设配置信息包括分辨率降级策略开启,则判断分辨率降级策略是否开启;If the anti-aliasing policy is turned off and the default configuration information includes the resolution downgrading policy being turned on, determine whether the resolution downgrading policy is turned on;
若分辨率降级策略未开启,则开启分辨率降级策略;If the resolution downgrade policy is not enabled, enable the resolution downgrade policy;
若分辨率降级策略已开启且预设配置信息包括隔帧处理策略开启或关闭,则判断隔帧处理策略是否已开启;If the resolution downgrade strategy is turned on and the default configuration information includes whether the every frame processing strategy is turned on or off, determine whether the every frame processing strategy is turned on;
若隔帧处理策略未开启,则开启隔帧处理策略。If the every frame processing policy is not enabled, enable the every frame processing policy.
可选的,调整模块340,还用于:Optionally, the adjustment module 340 is also used for:
若渲染帧率大于第二帧率阈值和/或终端渲染温度小于第二温度阈值,则对预设配置信息进行调整,其中,第二帧率阈值大于第一帧率阈值,第二温度阈值小于第一温度阈值。If the rendering frame rate is greater than the second frame rate threshold and/or the terminal rendering temperature is less than the second temperature threshold, the preset configuration information is adjusted, wherein the second frame rate threshold is greater than the first frame rate threshold, and the second temperature threshold is less than first temperature threshold.
可选的,调整模块340,还用于:Optionally, the adjustment module 340 is also used for:
若预设配置信息包括隔帧处理策略开启或关闭,则判断隔帧处理策略是否已开启,若隔帧处理策略已开启,则关闭隔帧处理策略;If the default configuration information includes whether the every-frame processing strategy is turned on or off, then determine whether the every-frame processing strategy is turned on. If the every-frame processing strategy is turned on, turn off the every-frame processing strategy;
若隔帧处理策略未开启且且预设配置信息包括分辨率降级策略开启,则判断分辨率降级策略是否开启;If the every-frame processing policy is not enabled and the default configuration information includes the resolution downgrading policy being enabled, determine whether the resolution downgrading policy is enabled;
若分辨率降级策略已开启,则关闭分辨率降级策略;If the resolution downgrade policy is turned on, turn off the resolution downgrade policy;
若分辨率降级策略未开启且预设配置信息包括抗锯齿策略开启或关闭,则判断抗锯齿策略是否关闭;If the resolution downgrade policy is not turned on and the default configuration information includes whether the anti-aliasing policy is turned on or off, determine whether the anti-aliasing policy is turned off;
若抗锯齿策略未关闭,则关闭抗锯齿策略。If the anti-aliasing policy is not turned off, turn off the anti-aliasing policy.
本公开实施例所提供的特效资源包的渲染装置可执行本公开任意实施例所提供的特效资源包的处理方法,具备执行方法相应的功能模块和有益效果。The rendering device of the special effects resource package provided by the embodiment of the present disclosure can execute the processing method of the special effects resource package provided by any embodiment of the present disclosure, and has corresponding functional modules and beneficial effects of the execution method.
值得注意的是,上述装置所包括的各个单元和模块只是按照功能逻辑进行划分的,但并不局限于上述的划分,只要能够实现相应的功能即可;另外,各功能单元的具体名称也只是为了便于相互区分,并不用于限制本公开实施例的保护范围。It is worth noting that the various units and modules included in the above-mentioned devices are only divided according to functional logic, but are not limited to the above-mentioned divisions, as long as they can achieve the corresponding functions; in addition, the specific names of each functional unit are just In order to facilitate mutual differentiation, it is not used to limit the protection scope of the embodiments of the present disclosure.
图4为本公开实施例所提供的一种电子设备的结构示意图。下面参考图4,其示出了适于用来实现本公开实施例的电子设备(例如图4中的终端设备或服务器)500的结构示意图。本公开实施例中的终端设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图4示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。FIG. 4 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure. Referring now to FIG. 4 , a schematic structural diagram of an electronic device (such as the terminal device or server in FIG. 4 ) 500 suitable for implementing embodiments of the present disclosure is shown. Terminal devices in embodiments of the present disclosure may include, but are not limited to, mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablets), PMPs (portable multimedia players), vehicle-mounted terminals (such as Mobile terminals such as car navigation terminals) and fixed terminals such as digital TVs, desktop computers, etc. The electronic device shown in FIG. 4 is only an example and should not impose any limitations on the functions and scope of use of the embodiments of the present disclosure.
如图4所示,电子设备500可以包括处理装置(例如中央处理器、图形处理器等)501,其可以根据存储在只读存储器(ROM)502中的程序或者从存储装置508加载到随机访问存储器(RAM)503中的程序而执行各种适当的动作和处理。在RAM 503中,还存储有电子设备500操作所需的各种程序和数据。处理装置501、ROM 502以及RAM 503通过总线504彼此相连。编辑/输出(I/O)接口505也连接至总线504。As shown in FIG. 4 , the electronic device 500 may include a processing device (eg, central processing unit, graphics processor, etc.) 501 , which may be loaded into a random access device according to a program stored in a read-only memory (ROM) 502 or from a storage device 508 . The program in the memory (RAM) 503 executes various appropriate actions and processes. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, the ROM 502 and the RAM 503 are connected to each other via a bus 504. An editing/output (I/O) interface 505 is also connected to bus 504.
通常,以下装置可以连接至I/O接口505:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置506;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置507;包括例如磁带、硬盘等的存储装置508;以及通信装置509。通信装置509可以允许电子设备500与其他设备进行无线或有线通信以交换数据。虽然图4示出了具有各种装置的电子设备500,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。Generally, the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a liquid crystal display (LCD), speakers, vibration An output device 507 such as a computer; a storage device 508 including a magnetic tape, a hard disk, etc.; and a communication device 509. Communication device 509 may allow electronic device 500 to communicate wirelessly or wiredly with other devices to exchange data. Although FIG. 4 illustrates electronic device 500 with various means, it should be understood that implementation or availability of all illustrated means is not required. More or fewer means may alternatively be implemented or provided.
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置509从网络上被下载和安装,或者从存储装置508被安装,或者从ROM 502被安装。在该计算机程序被处理装置501执行时,执行本公开实施例的方法中限定的上述功能。In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product including a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the method illustrated in the flowchart. In such embodiments, the computer program may be downloaded and installed from the network via communication device 509, or from storage device 508, or from ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。The names of messages or information exchanged between multiple devices in the embodiments of the present disclosure are for illustrative purposes only and are not used to limit the scope of these messages or information.
本公开实施例提供的电子设备与上述实施例提供的特效资源包的处理方法属于同一发明构思,未在本实施例中详尽描述的技术细节可参见上述实施例,并且本实施例与上述实施例具有相同的有益效果。The electronic device provided by the embodiments of the present disclosure and the processing method of the special effects resource package provided by the above embodiments belong to the same inventive concept. Technical details that are not described in detail in this embodiment can be referred to the above embodiments, and this embodiment is consistent with the above embodiments. Have the same beneficial effects.
本公开实施例提供了一种计算机存储介质,其上存储有计算机程序,该程序被处理器执行时实现上述实施例所提供的特效资源包的处理方法。Embodiments of the present disclosure provide a computer storage medium on which a computer program is stored. When the program is executed by a processor, the processing method of the special effects resource package provided by the above embodiments is implemented.
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two. The computer-readable storage medium may be, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination thereof. More specific examples of computer readable storage media may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard drive, random access memory (RAM), read only memory (ROM), removable Programmed read-only memory (EPROM or flash memory), fiber optics, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above. In this disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device . Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to: wire, optical cable, RF (radio frequency), etc., or any suitable combination of the above.
在一些实施方式中,客户端、服务器可以利用诸如HTTP(HyperText TransferProtocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(“LAN”),广域网(“WAN”),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。In some embodiments, the client and server can communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and can communicate with digital data in any form or medium. (e.g., communications network) interconnection. Examples of communication networks include local area networks ("LAN"), wide area networks ("WAN"), the Internet (e.g., the Internet), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or developed in the future network of.
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。The above-mentioned computer-readable medium may be included in the above-mentioned electronic device; it may also exist independently without being assembled into the electronic device.
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device:
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:获取特效资源包,基于预设配置信息将所述特效资源包渲染至界面进行显示;判断所述特效资源包的处理过程是否达到设定采样周期;若到达设定采样周期,则获取已渲染的所述资源包在所述设定采样周期内的渲染参数;根据所述渲染参数对所述预设配置信息进行调整;基于调整后的所述预设配置信息将所述特效资源包继续渲染至界面进行显示,并返回执行判断所述特效资源包的处理过程是否达到设定采样周期的操作,直到所述特效资源包处理完成。The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains the special effects resource package and renders the special effects resource package to the computer based on the preset configuration information. The interface is displayed; it is judged whether the processing process of the special effects resource package reaches the set sampling period; if the set sampling period is reached, the rendering parameters of the rendered resource package within the set sampling period are obtained; according to the The rendering parameters adjust the preset configuration information; based on the adjusted preset configuration information, the special effects resource package continues to be rendered to the interface for display, and returns to execute to determine whether the processing of the special effects resource package reaches The operation of setting the sampling period until the processing of the special effects resource package is completed.
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, including but not limited to object-oriented programming languages—such as Java, Smalltalk, C++, and Includes conventional procedural programming languages—such as "C" or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In situations involving remote computers, the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as an Internet service provider through Internet connection).
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, segment, or portion of code that contains one or more logic functions that implement the specified executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown one after another may actually execute substantially in parallel, or they may sometimes execute in the reverse order, depending on the functionality involved. It will also be noted that each block of the block diagram and/or flowchart illustration, and combinations of blocks in the block diagram and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or operations. , or can be implemented using a combination of specialized hardware and computer instructions.
描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,单元的名称在某种情况下并不构成对该单元本身的限定,例如,第一获取单元还可以被描述为“获取至少两个网际协议地址的单元”。The units involved in the embodiments of the present disclosure can be implemented in software or hardware. The name of the unit does not constitute a limitation on the unit itself under certain circumstances. For example, the first acquisition unit can also be described as "the unit that acquires at least two Internet Protocol addresses."
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), Systems on Chips (SOCs), Complex Programmable Logical device (CPLD) and so on.
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of this disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media would include one or more wire-based electrical connections, laptop disks, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
根据本公开的一个或多个实施例,提供了一种特效资源包的处理方法,包括:According to one or more embodiments of the present disclosure, a method for processing a special effects resource package is provided, including:
获取特效资源包,基于预设配置信息将所述特效资源包渲染至界面进行显示;Obtain the special effects resource package and render the special effects resource package to the interface for display based on the preset configuration information;
判断所述特效资源包的处理过程是否达到设定采样周期;Determine whether the processing of the special effects resource package reaches the set sampling period;
若到达设定采样周期,则获取已渲染的所述资源包在所述设定采样周期内的渲染参数;If the set sampling period is reached, obtain the rendering parameters of the rendered resource package within the set sampling period;
根据所述渲染参数对所述预设配置信息进行调整;Adjust the preset configuration information according to the rendering parameters;
基于调整后的所述预设配置信息将所述特效资源包继续渲染至界面进行显示,并返回执行判断所述特效资源包的处理过程是否达到设定采样周期的操作,直到所述特效资源包处理完成。Based on the adjusted preset configuration information, the special effects resource package continues to be rendered to the interface for display, and returns to perform the operation of judging whether the processing of the special effects resource package reaches the set sampling period until the special effects resource package Processing completed.
进一步地,基于预设配置信息将所述特效资源包渲染至界面进行显示,包括:Further, rendering the special effects resource package to the interface for display based on preset configuration information includes:
基于所述预设配置信息对所述特效资源包的图像数据进行处理;Process the image data of the special effects resource package based on the preset configuration information;
将处理后的图像数据渲染至界面进行显示。Render the processed image data to the interface for display.
进一步地,所述渲染参数包括渲染帧率和/或终端渲染温度。Further, the rendering parameters include rendering frame rate and/or terminal rendering temperature.
进一步地,获取已渲染的所述资源包在所述设定采样周期内的渲染参数,包括:Further, obtaining the rendering parameters of the rendered resource package within the set sampling period includes:
获取已渲染的所述资源包在所述设定采样周期内对应的渲染时长以及包含的已渲染特效帧数量;Obtain the rendering duration corresponding to the rendered resource package within the set sampling period and the number of rendered special effects frames included;
根据所述渲染时长和所述已渲染特效帧数量确定渲染帧率,将所述渲染帧率确定为渲染参数。The rendering frame rate is determined according to the rendering duration and the number of rendered special effect frames, and the rendering frame rate is determined as a rendering parameter.
进一步地,所述设定采样周期包含一个或者多个采样周期,若所述设定采样周期包含多个采样周期,则获取已渲染的所述资源包在所述设定采样周期内的渲染参数,包括:Further, the set sampling period includes one or more sampling periods. If the set sampling period includes multiple sampling periods, obtain the rendering parameters of the rendered resource package within the set sampling period. ,include:
将多个所述采样周期分别对应的渲染帧率求取平均值,获得平均渲染帧率,将所述平均渲染帧率确定为渲染参数。The rendering frame rates corresponding to multiple sampling periods are averaged to obtain an average rendering frame rate, and the average rendering frame rate is determined as a rendering parameter.
进一步地,获取已渲染的所述资源包在所述设定采样周期内的渲染参数,包括:Further, obtaining the rendering parameters of the rendered resource package within the set sampling period includes:
获取已渲染的所述资源包在设定采样周期内特效帧渲染完成时的终端温度;Obtain the terminal temperature when rendering of the rendered resource package is completed within the set sampling period;
将所述特效帧对应的终端温度求取平均值,获得终端渲染温度,将所述终端渲染温度确定为渲染参数。The terminal temperatures corresponding to the special effect frames are averaged to obtain the terminal rendering temperature, and the terminal rendering temperature is determined as a rendering parameter.
进一步地,根据所述渲染参数对预设配置信息进行调整,包括:Further, adjusting the preset configuration information according to the rendering parameters includes:
若所述渲染帧率小于第一帧率阈值和/或所述终端渲染温度大于第一温度阈值,则对所述预设配置信息进行调整。If the rendering frame rate is less than the first frame rate threshold and/or the terminal rendering temperature is greater than the first temperature threshold, the preset configuration information is adjusted.
进一步地,所述预设配置信息包括如下至少一项:抗锯齿策略开启或关闭、分辨率降级策略开启和关闭及隔帧处理策略开启或关闭。Further, the preset configuration information includes at least one of the following: turning on or off the anti-aliasing strategy, turning on or off the resolution degradation strategy, and turning on or off the alternate frame processing strategy.
进一步地,若所述渲染帧率小于第一帧率阈值和/或所述终端渲染温度大于第一温度阈值,则对所述预设配置信息进行调整,包括:Further, if the rendering frame rate is less than the first frame rate threshold and/or the terminal rendering temperature is greater than the first temperature threshold, the preset configuration information is adjusted, including:
若所述预设配置信息包括抗锯齿策略开启或关闭,则判断所述抗锯齿策略是否关闭;若所述抗锯齿策略未关闭,则将所述抗锯齿策略关闭;If the preset configuration information includes whether the anti-aliasing policy is turned on or off, then determine whether the anti-aliasing policy is turned off; if the anti-aliasing policy is not turned off, then turn off the anti-aliasing policy;
若所述抗锯齿策略已关闭且所述预设配置信息包括分辨率降级策略开启,则判断所述分辨率降级策略是否开启;If the anti-aliasing policy is turned off and the preset configuration information includes the resolution downgrading policy being turned on, determine whether the resolution downgrading policy is turned on;
若所述分辨率降级策略未开启,则开启所述分辨率降级策略;If the resolution downgrade strategy is not turned on, turn on the resolution downgrade strategy;
若所述分辨率降级策略已开启且所述预设配置信息包括隔帧处理策略开启或关闭,则判断所述隔帧处理策略是否已开启;If the resolution downgrade strategy has been turned on and the preset configuration information includes whether the every other frame processing strategy is turned on or off, determine whether the every other frame processing strategy has been turned on;
若所述隔帧处理策略未开启,则开启所述隔帧处理策略。If the every-other-frame processing policy is not enabled, enable the every-other-frame processing policy.
进一步地,根据所述渲染参数对预设配置信息进行调整,包括:Further, adjusting the preset configuration information according to the rendering parameters includes:
若所述渲染帧率大于第二帧率阈值和/或所述终端渲染温度小于第二温度阈值,则对所述预设配置信息进行调整,其中,所述第二帧率阈值大于所述第一帧率阈值,所述第二温度阈值小于所述第一温度阈值。If the rendering frame rate is greater than the second frame rate threshold and/or the terminal rendering temperature is less than the second temperature threshold, the preset configuration information is adjusted, wherein the second frame rate threshold is greater than the third temperature threshold. A frame rate threshold, the second temperature threshold is smaller than the first temperature threshold.
进一步地,若所述渲染帧率大于第二帧率阈值和/或所述终端渲染温度小于第二温度阈值,则对所述预设配置信息进行调整,包括:Further, if the rendering frame rate is greater than the second frame rate threshold and/or the terminal rendering temperature is less than the second temperature threshold, the preset configuration information is adjusted, including:
若所述预设配置信息包括隔帧处理策略开启或关闭,则判断所述隔帧处理策略是否已开启,若所述隔帧处理策略已开启,则关闭所述隔帧处理策略;If the preset configuration information includes whether the every other frame processing strategy is turned on or off, then determine whether the every other frame processing strategy has been turned on, and if the every other frame processing strategy has been turned on, then turn off the every other frame processing strategy;
若所述隔帧处理策略未开启且且所述预设配置信息包括分辨率降级策略开启,则判断所述分辨率降级策略是否开启;If the alternate frame processing strategy is not turned on and the preset configuration information includes the resolution downgrading strategy being turned on, then determine whether the resolution downgrading strategy is turned on;
若所述分辨率降级策略已开启,则关闭所述分辨率降级策略;If the resolution downgrade strategy is turned on, turn off the resolution downgrade strategy;
若分辨率降级策略未开启且所述预设配置信息包括抗锯齿策略开启或关闭,则判断所述抗锯齿策略是否关闭;If the resolution downgrade strategy is not turned on and the preset configuration information includes whether the anti-aliasing strategy is turned on or off, determine whether the anti-aliasing strategy is turned off;
若所述抗锯齿策略未关闭,则关闭所述抗锯齿策略。If the anti-aliasing policy is not turned off, the anti-aliasing policy is turned off.
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。The above description is only a description of the preferred embodiments of the present disclosure and the technical principles applied. Those skilled in the art should understand that the disclosure scope involved in the present disclosure is not limited to technical solutions composed of specific combinations of the above technical features, but should also cover solutions composed of the above technical features or without departing from the above disclosed concept. Other technical solutions formed by any combination of equivalent features. For example, a technical solution is formed by replacing the above features with technical features with similar functions disclosed in this disclosure (but not limited to).
此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。Furthermore, although operations are depicted in a specific order, this should not be understood as requiring that these operations be performed in the specific order shown or performed in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, although several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210697907.2ACN117315057A (en) | 2022-06-20 | 2022-06-20 | Method, device, equipment and storage medium for processing special effect resource package |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210697907.2ACN117315057A (en) | 2022-06-20 | 2022-06-20 | Method, device, equipment and storage medium for processing special effect resource package |
| Publication Number | Publication Date |
|---|---|
| CN117315057Atrue CN117315057A (en) | 2023-12-29 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202210697907.2APendingCN117315057A (en) | 2022-06-20 | 2022-06-20 | Method, device, equipment and storage medium for processing special effect resource package |
| Country | Link |
|---|---|
| CN (1) | CN117315057A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN118760795A (en)* | 2024-09-04 | 2024-10-11 | 之江实验室 | Data rendering method, device, storage medium and electronic device |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN118760795A (en)* | 2024-09-04 | 2024-10-11 | 之江实验室 | Data rendering method, device, storage medium and electronic device |
| Publication | Publication Date | Title |
|---|---|---|
| US12379766B2 (en) | Switching method between running modes of application program, apparatus, electronic device and storage medium | |
| US10244425B2 (en) | Electronic device and method for controlling transmission control protocol thereof | |
| CN111258736B (en) | Information processing methods, devices and electronic equipment | |
| CN107544842A (en) | Application program processing method and device, computer equipment, storage medium | |
| US20250310597A1 (en) | Method and apparatus for dynamically downloading a video, electronic device and storage medium | |
| CN114786055B (en) | Preloading method, device, electronic equipment and medium | |
| US20240121460A1 (en) | Adaptive playback method and device for video | |
| CN112068688A (en) | Power saving method and device, electronic equipment and computer readable medium | |
| WO2023241427A1 (en) | Image processing method and apparatus, device, and storage medium | |
| CN115103210B (en) | Information processing method, device, terminal and storage medium | |
| WO2023226742A1 (en) | Video transcoding method and apparatus, and device and storage medium | |
| CN117315057A (en) | Method, device, equipment and storage medium for processing special effect resource package | |
| WO2023226757A1 (en) | Video caching method and apparatus, device and storage medium | |
| US20250055954A1 (en) | Video effect packet generation method and apparatus, device, and storage medium | |
| CN115134641B (en) | Screen projection method and device and electronic equipment | |
| CN117082273A (en) | Video playback duration prediction methods, devices, electronic equipment, media and products | |
| CN116304427A (en) | Preloading method and device, storage medium and electronic equipment | |
| CN115775290A (en) | Animation frame rate processing method, device, equipment and storage medium | |
| CN114143325A (en) | DNS scheduling method, apparatus, device, storage medium and program product | |
| CN112636971A (en) | Service degradation method and device, electronic equipment and storage medium | |
| CN113504802A (en) | Control method and device of electronic equipment, terminal and storage medium | |
| CN111324512B (en) | Method, apparatus, electronic device, and computer-readable medium for generating text | |
| CN115002557B (en) | Network speed prediction method, device, equipment and storage medium | |
| CN115089961B (en) | Video processing method and device, electronic equipment and storage medium | |
| CN116208787A (en) | Video downloading control method, device, equipment and storage medium |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |