WO2023225859A1 - 虚拟直播软件终端优化方法、装置、电子设备和程序产品 - Google Patents

虚拟直播软件终端优化方法、装置、电子设备和程序产品 Download PDF

Info

Publication number
WO2023225859A1
WO2023225859A1 PCT/CN2022/094742 CN2022094742W WO2023225859A1 WO 2023225859 A1 WO2023225859 A1 WO 2023225859A1 CN 2022094742 W CN2022094742 W CN 2022094742W WO 2023225859 A1 WO2023225859 A1 WO 2023225859A1
Authority
WO
WIPO (PCT)
Prior art keywords
rendering engine
page
engine process
software
live broadcast
Prior art date
Application number
PCT/CN2022/094742
Other languages
English (en)
French (fr)
Inventor
魏帅帅
陈帅雷
刘宁
Original Assignee
云智联网络科技(北京)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 云智联网络科技(北京)有限公司 filed Critical 云智联网络科技(北京)有限公司
Priority to PCT/CN2022/094742 priority Critical patent/WO2023225859A1/zh
Publication of WO2023225859A1 publication Critical patent/WO2023225859A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt

Definitions

  • This application relates to the field of live broadcast technology, specifically, to a virtual live broadcast software terminal optimization method, device, electronic equipment and program product.
  • Existing mobile terminal virtual live broadcast software generally integrates 2D and 3D rendering engines.
  • the rendering engine is also started and resides in the system memory, and cannot be removed when rendering is not needed.
  • the rendering engine When the rendering engine performs rendering operations, it needs to consume a large amount of CPU and GPU resources of the mobile terminal for calculations, which results in a high memory usage of the rendering engine and serious heating of the terminal device.
  • the terminal device When starting a live broadcast that does not require rendering or playing a live broadcast that does not require rendering, the terminal device will become more heated, power consumption will rise sharply, and it will have an impact on the performance of the device, and the terminal device will freeze.
  • This application provides a virtual live broadcast software terminal optimization method, device, electronic equipment and program product. By managing the rendering engine process, it reduces CPU and GPU usage and energy consumption, and reduces the use of mobile terminal memory and processor resources. , The startup time of the software has been optimized.
  • a terminal optimization method for virtual live broadcast software including: when the software is started, obtaining initialization parameters of a rendering engine, the rendering engine being integrated with the software and the The software includes multiple pages; determine whether the software is in a normal operating state or an abnormal operating state; if the software is in a normal operating state, start the first page; according to the scene of the first page and the initialization parameters , control the rendering engine process and display the first page; during the process of switching from the first page to the second page, control the rendering engine process and display the rendering engine process according to the scene of the second page and the initialization parameters.
  • the normal running state includes the software being in a foreground running state and/or an activated state; the abnormal running state includes the software being in a background running state and/or an inactive state.
  • starting the rendering engine process through the initialization parameter includes: allocating system memory and processor resources to the rendering engine for starting the rendering engine process through the initialization parameter.
  • suspending the rendering engine process includes: determining whether the plurality of pages are non-video live broadcast pages; if so, suspending the rendering engine process; if not, uninstalling the scene of the rendering engine; releasing all Describe the system memory and processor resources occupied by the rendering engine process; suspend the rendering engine process.
  • controlling the rendering engine process and displaying the first page according to the scene of the first page and the initialization parameters includes: determining whether the scene of the first page needs to be rendered; if so, through the The initialization parameters start or directly start the rendering engine process and display the first page, or maintain the startup state of the rendering engine and display the first page; if not, do not start or suspend the rendering engine. process and display the first page, or keep the rendering engine in a non-starting state or a suspended state and display the first page.
  • controlling the rendering engine process and displaying the second page includes: determining whether the scene of the first page needs to be rendered to obtain the first result; and determining whether the scene of the second page needs to be rendered. , to obtain the second result; if the first result is yes, and the second result is yes, keep the startup state of the rendering engine process and directly display the second page; if the first result is yes, and the second result is no, then suspend the rendering engine process and display the second page; if the first result is no, and the second result is yes, then pass the Initialization parameters start or directly start the rendering engine process and display the second page; if the first result is no and the second result is no, the rendering engine process remains in a non-started state or hangs. In the starting state, the second page is directly displayed.
  • a terminal optimization device for virtual live broadcast software including: a collection module for obtaining the initialization parameters of the rendering engine; and an operation processing module for based on the initialization parameters and the software.
  • the rendering engine process is controlled to load or switch the multiple pages; the resource control module is used to allocate or recycle the system memory and processor resources occupied by the rendering engine process.
  • an electronic device including: one or more processors; a storage device for storing one or more programs; when the one or more programs are processed by the one or more The processor executes, causing one or more processors to implement the aforementioned method.
  • a computer program product which includes a computer program or instructions, and when the computer program or instructions are executed by a processor, the aforementioned method is implemented.
  • the rendering engine process when the virtual live broadcast software does not need to render, the rendering engine process can be suspended or kept in a non-started state to release system memory, which can effectively alleviate software startup time delays and terminal delays caused by the rendering engine. Problems such as high power consumption and high heat generation of the equipment.
  • Figure 1 shows a flow chart of a terminal optimization method for virtual live broadcast software according to an example embodiment of the present application.
  • Figure 2 shows a flow chart of page loading of a terminal optimization method for virtual live broadcast software according to an example embodiment of the present application.
  • Figure 3 shows a flowchart of page switching in a terminal optimization method for virtual live broadcast software according to an example embodiment of the present application.
  • Figure 4 shows a flow chart of state transition of a terminal optimization method for virtual live broadcast software according to an example embodiment of the present application.
  • 5A to 5F are schematic diagrams showing the effects of the terminal optimization method according to example embodiments of the present application.
  • Figure 6 shows a block diagram of a terminal optimization device for virtual live broadcast software according to an example embodiment of the present application.
  • FIG. 7 shows a block diagram of an electronic device according to an example embodiment of the present application.
  • Example embodiments will now be described more fully with reference to the accompanying drawings.
  • Example embodiments may, however, be embodied in various forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concepts of the example embodiments. To those skilled in the art.
  • the same reference numerals in the drawings represent the same or similar parts, and thus their repeated description will be omitted.
  • This application provides a virtual live broadcast software terminal optimization method, device, electronic equipment and program product.
  • the memory usage of the mobile terminal is optimized, effectively shortening the software startup time and alleviating the power consumption of the terminal equipment. Solve the problems of high consumption and high heat generation and improve equipment performance.
  • the virtual live broadcast software is used as an example for description below.
  • Figure 1 shows a flow chart of a terminal optimization method for virtual live broadcast software according to an example embodiment of the present application.
  • step S110 when the virtual live broadcast software is started, the initialization parameters of the rendering engine are obtained.
  • the virtual live broadcast software involved in the embodiment of this application includes multiple pages.
  • the rendering engine involved in the embodiment of the present application is integrated into the virtual live broadcast software.
  • the rendering engine is integrated into the virtual live broadcast software by packaging the rendering engine project into a dynamic library and introducing it.
  • the initialization parameters when the virtual live broadcast software starts the rendering engine include argc and argv[], where argc is the number of rendering engine command parameters, and argv[] is used to store the content of the rendering engine command.
  • the virtual live broadcast software needs to load the initialization parameters when starting and initializing the rendering engine. After the rendering engine is initialized, it can be started directly without repeatedly loading the initialization parameters.
  • step S120 it is determined whether the virtual live broadcast software is in a normal state or an abnormal state.
  • the normal operating state of the virtual live broadcast software includes the foreground operating state and/or activation state. For example, a user clicks an icon on the system desktop of a terminal (such as a mobile phone, tablet, etc. that can be used to watch virtual live broadcasts) to start the virtual live broadcast software, and after entering, watches the live broadcast of the virtual anchor through the live broadcast page. At this time, the virtual live broadcast software is in the foreground running state. , that is, normal operating status.
  • the abnormal operating status of virtual live broadcast software includes background running status and/or inactive status. For example, when a user is watching a live broadcast in the virtual live broadcast software, he or she jumps to other software interfaces through prompts or notifications from other software installed on the mobile phone, or returns to the system desktop from the current live broadcast page. At this time, the virtual live broadcast software is running in the background. That is, abnormal operating status.
  • step S130 if the virtual live broadcast software is in normal operation, the first page is started; according to the scene and initialization parameters of the first page, the rendering engine process is controlled and the first page is displayed.
  • the first page is a page when the virtual live broadcast software is in normal operation, including situations where scenes need to be rendered and situations where scenes do not need to be rendered.
  • the terminal starts the rendering engine process through initialization parameters or directly starts the rendering engine process.
  • the software does not start or suspend the rendering engine process.
  • step S140 during the process of switching from the first page to the second page, the rendering engine process is controlled and the second page is displayed according to the scene and initialization parameters of the second page.
  • the terminal determines whether the scene on the first page and the scene on the second page need to be rendered, and determines how to control the rendering engine process based on the results of the two judgments to achieve switching between the first page and the second page.
  • step S150 if the virtual live broadcast software is in an abnormal operating state, the rendering engine process is not started or suspended.
  • the terminal When the virtual live broadcast software is in an abnormal operating state or jumps from a normal operating state to an abnormal state, the terminal does not start or suspends the rendering engine process.
  • the terminal starts or suspends the rendering engine process during the loading process of the software page, so that the performance of the terminal device is optimized.
  • Figure 2 shows a flow chart of page loading of a terminal optimization method for virtual live broadcast software according to an example embodiment of the present application.
  • the above-mentioned step S130 includes sub-steps S131, S132 and S133.
  • the terminal determines whether the scene on the first page needs to be rendered through the preset business rules of the virtual live broadcast software, and obtains the determination result.
  • the terminal obtains the loading sequence of the first page in the virtual live broadcast software.
  • the first page can be the first page loaded after the virtual live broadcast software is started, or it can be any page loaded during the running of the virtual live broadcast software.
  • sub-step S133 the terminal controls the rendering engine process and displays the first page according to the judgment result and the loading sequence.
  • controlling the rendering engine process includes starting or suspending or not starting the rendering engine process, and maintaining the starting or suspending or not starting state of the rendering engine process.
  • Starting the rendering engine process includes: the terminal allocates system memory and processor resources (such as CPU, GPU) to the rendering engine.
  • the rendering engine process begins to occupy memory and run, and uses the CPU and/or GPU to perform calculations according to the rendered content.
  • Suspending the rendering engine process includes: the terminal suspends the rendering engine process through the pause function or the terminal uninstalls the rendering engine scene, releases the memory and processor resources occupied by the rendering engine process, and then suspends the rendering engine process through the pause function after the release is completed.
  • the startup time of the virtual live broadcast software can be effectively shortened and the utilization of terminal memory and processor resources can be improved.
  • the terminal starts the rendering engine process through the initialization parameters, and then displays the first page.
  • the terminal will keep the starting state of the rendering engine process without restarting, and then display the first page. .
  • the terminal will be started with the initialization parameters when the rendering engine process has not started.
  • Rendering engine process when the rendering engine process has been suspended, the terminal directly starts the rendering engine process and then displays the first page.
  • the terminal does not start the rendering engine process and displays the first page.
  • the terminal suspends the rendering engine process and then displays the first page.
  • the terminal will keep the rendering engine process in a non-started or suspended state. Then the first page is displayed.
  • the terminal can promptly clear the memory occupied by the rendering engine by controlling the rendering engine process, effectively alleviating the problems of high power consumption and heating of the device caused by high memory and processor usage.
  • Figure 3 shows a flow chart of page switching of a terminal optimization method for virtual live broadcast software according to an example embodiment of the present application.
  • step S140 includes sub-steps S141, S142 and S143.
  • sub-step S141 the terminal determines whether the scenes on the first page and the second page need to be rendered through the preset business rules of the virtual live broadcast software, and obtains the determination result.
  • the terminal obtains the loading order of the first page and the second page in the virtual live broadcast software.
  • the first page can be the first page loaded after the virtual live broadcast software is started, or it can be any page loaded during the running of the virtual live broadcast software.
  • the second page is any page loaded during the running of the virtual live broadcast software.
  • the terminal controls the rendering engine process and displays the second page according to the judgment result and the loading sequence.
  • the terminal keeps the rendering engine process started, does not restart the rendering engine process, and directly displays the second page.
  • the terminal suspends the rendering engine process and then displays the second page.
  • the terminal starts the rendering engine process through the initialization parameters or directly starts the rendering engine process, and then displays the second page.
  • the terminal keeps the rendering engine process in an inactive state and displays the second page directly.
  • the terminal maintains the suspended state of the rendering engine process and directly displays the second page.
  • the terminal can shorten the page switching time and significantly reduce the system memory and processor by controlling the rendering engine process. Resource occupancy improves the overall performance of the terminal device.
  • Figure 4 shows a flow chart of state transition of a terminal optimization method for virtual live broadcast software according to an example embodiment of the present application.
  • step S210 after the virtual live broadcast software is started, the terminal obtains the initialization parameters of the rendering engine. At this time, the rendering engine process is not started.
  • the terminal determines the operating status of the virtual software after it is started.
  • the operating status of the virtual live broadcast software includes normal operating status and abnormal operating status.
  • step S220 when the virtual live broadcast software enters an abnormal operating state, the terminal controls the rendering engine process to keep it in a non-started state.
  • the terminal starts loading the page.
  • the normal operating state and abnormal operating state of the virtual live broadcast software can be converted to each other.
  • the user is watching the live broadcast through the virtual live broadcast software installed on the mobile phone.
  • the virtual live broadcast software is in normal operation.
  • the user chooses to answer the call.
  • the mobile phone jumps to the call function interface, and the virtual live broadcast software transitions from a normal operating state to an abnormal operating state.
  • the user answers the call he returns to the virtual live broadcast software and continues to watch the live broadcast.
  • the mobile phone call function interface is closed, and the virtual live broadcast software transitions from an abnormal operating state to a normal operating state.
  • the terminal determines whether the scene of the current page when the virtual live broadcast software is running normally needs to be rendered.
  • step S230 if the scene of the current page needs to be rendered, the terminal starts the rendering engine process through the initialization parameters according to the loading sequence of the current page, or directly starts the rendering engine process, or keeps the rendering engine process started, and then displays the current page. If the scene of the current page does not need to be rendered, the terminal will not start or suspend the rendering engine process according to the loading sequence of the current page, or keep the rendering engine process in a non-started state, or keep the rendering engine process in a suspended state, and then display the current page.
  • the terminal when the virtual live broadcast software jumps from the normal running state to the abnormal running state, the terminal can suspend the rendering engine process or keep the rendering engine based on the page loaded when the virtual live broadcast software is in the normal running state. The process's unstarted or suspended state.
  • the terminal will suspend the rendering engine process. If the user jumps out of a page in the virtual live broadcast software that does not require rendering, and the virtual live broadcast software is in an abnormal operating state, the terminal will keep the rendering engine in a non-started state or in a suspended state.
  • the terminal when the virtual live broadcast software jumps from an abnormal operating state to a normal operating state, the terminal can start the rendering engine process through initialization parameters or directly start the rendering engine process according to the page loaded when the virtual live broadcast software is in the normal operating state. Or keep the rendering engine process in an unstarted or suspended state.
  • the terminal starts the rendering engine process through the initialization parameters or directly starts the rendering engine process. If the user jumps from the abnormal running state of the virtual live broadcast software to the page in the normal running state, and the current page scene does not need to be rendered, the terminal will keep the engine process in a non-starting state or a suspended state.
  • the virtual live broadcast software can switch between a normal operating state and an abnormal operating state.
  • the terminal greatly saves system memory and resource usage by controlling the rendering engine process.
  • 5A to 5F are schematic diagrams showing the effects of the terminal optimization method according to example embodiments of the present application.
  • the page shown in Figure 5A is the first page loaded after the virtual live broadcast software is started. This page does not require a rendering engine to render the scene, so the rendering engine process is not started.
  • the memory usage is 85.8MB
  • the CPU usage is 0%
  • the CPU energy consumption is 0.5%
  • the GPU energy consumption is 0%.
  • the page shown in Figure 5C is a page during the running of the virtual live broadcast software. This page is the live broadcast page of the virtual anchor. The scene of the virtual anchor needs to be rendered by the rendering engine.
  • the terminal After switching from the page shown in Figure 5A to the page shown in Figure 5A
  • the terminal starts the rendering engine process according to the initialization parameters and allocates memory and processor resources to the rendering engine.
  • the memory and resource usage of the terminal device is shown in Figure 5D.
  • the memory usage increased to 492MB
  • the CPU usage increased to 44%
  • the CPU energy consumption increased to 9.7%
  • the GPU energy consumption increased to 47.7%.
  • the terminal When switching from the page shown in Figure 5C to the page shown in Figure 5A, if the page shown in Figure 5A is a non-video live page, the terminal directly suspends the rendering engine process.
  • the memory and resource usage of the terminal device is shown in Figure 5E.
  • the terminal When switching from the page shown in Figure 5C to the page shown in Figure 5A, if the page shown in Figure 5A is a live video page, the terminal first uninstalls the rendering engine scene to release the memory and processor occupied by the rendering engine process. resources and then hangs the rendering engine process.
  • the memory and resource usage of the terminal device is shown in Figure 5F.
  • the terminal optimization method according to the embodiment of the present application can effectively save the use of system memory, greatly reduce the usage and energy consumption of the CPU and GPU, and optimize the performance of the terminal device when the virtual live broadcast software is running.
  • Figure 6 shows a block diagram of a terminal optimization device for virtual live broadcast software according to an example embodiment of the present application.
  • the terminal optimization device includes a collection module 301, an operation processing module 303 and a resource control module 305.
  • the collection module 301 is used to obtain the initialization parameters of the rendering engine, and provide the initialization parameters to the run processing module 303 for starting the rendering engine process.
  • the resources of the rendering engine are loaded and exist in the form of resource objects, which are called through the rendering engine process and occupy memory space.
  • the types of resource objects include but are not limited to models, textures, audio, video, animation, etc.
  • the operation processing module 303 receives the initialization parameters of the rendering engine, and controls the rendering engine process according to the scene of the page to load the page or switch between pages.
  • the pages loaded in the virtual live broadcast software include: pages whose scenes need to be rendered and pages whose scenes do not need to be rendered. Whether the scene of the page needs to be rendered is judged and determined by the preset business rules of the virtual live broadcast software.
  • the execution processing module 303 performs different types of operations for loading and displaying the page based on the determination result of whether the scene of the page needs to be rendered.
  • the operations performed by the run processing module 303 include: starting the rendering engine process through initialization parameters or directly starting the rendering engine process, maintaining the starting state of the rendering engine process, suspending the rendering engine process, and maintaining the non-starting or suspended state of the rendering engine process.
  • the resource control module 305 is used to allocate or reclaim the system memory and processor resources occupied by the rendering engine process when the running processing module 303 operates.
  • the resource control module 305 allocates system memory and processor resources to the rendering engine for the rendering engine process to call resource objects.
  • the resource control module 305 reclaims the system memory and processor resources released when the rendering engine process is suspended for allocation when the rendering engine process is started next time.
  • FIG. 7 shows a block diagram of an electronic device according to an example embodiment of the present application.
  • the electronic device 600 is only an example and should not bring any limitations to the functions and scope of use of the embodiments of the present application.
  • electronic device 600 is embodied in the form of a general computing device.
  • the components of the electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different system components (including the storage unit 620 and the processing unit 610), a display unit 640, and the like.
  • the storage unit stores program code, and the program code can be executed by the processing unit 610, so that the processing unit 610 executes the methods described in this specification according to various exemplary embodiments of the present application.
  • the processing unit 610 may perform the method as shown in FIG. 1 .
  • the storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 6201 and/or a cache storage unit 6202, and may further include a read-only storage unit (ROM) 6203.
  • RAM random access storage unit
  • ROM read-only storage unit
  • Storage unit 620 may also include a program/utility 6204 having a set of (at least one) program modules 6205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, Each of these examples, or some combination, may include the implementation of a network environment.
  • program/utility 6204 having a set of (at least one) program modules 6205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, Each of these examples, or some combination, may include the implementation of a network environment.
  • Bus 630 may be a local area representing one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, a graphics acceleration port, a processing unit, or using any of a variety of bus structures. bus.
  • Electronic device 600 may also communicate with one or more external devices 700 (e.g., keyboard, pointing device, Bluetooth device, etc.), may also communicate with one or more devices that enable a user to interact with electronic device 600, and/or with Any device (eg, router, modem, etc.) that enables the electronic device 600 to communicate with one or more other computing devices. This communication may occur through input/output (I/O) interface 650.
  • the electronic device 600 may also communicate with one or more networks (eg, a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet) through the network adapter 660.
  • Network adapter 660 may communicate with other modules of electronic device 600 via bus 630.
  • the technical solution according to the embodiment of the present application can be embodied in the form of a software product.
  • the software product can be stored in a non-volatile storage medium (which can be a CD-ROM, U disk, mobile hard disk, etc.) or on a network, including Several instructions to cause a computing device (which can be a personal computer, server, mobile terminal or network device, etc.) to execute the method according to the embodiment of the present application.
  • a software product may take the form of one or more readable media in any combination.
  • the readable medium may be a readable signal medium or a readable storage medium.
  • the readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: electrical connection with one or more conductors, portable disk, hard disk, 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.
  • a computer-readable storage medium may include a data signal propagated in baseband or as part of a carrier wave carrying the 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 readable storage medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transport the program for use by or in connection with an instruction execution system, apparatus, or device.
  • Program code contained on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.
  • the program code for performing the operations of the present application can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., as well as conventional procedural programming. Language—such as "C” or a similar programming language.
  • the program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server execute on.
  • the remote computing device may be connected to the user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device, such as provided by an Internet service. (business comes via Internet connection).
  • LAN local area network
  • WAN wide area network
  • the computer-readable medium carries one or more programs. When the one or more programs are executed by a device, the computer-readable medium implements the aforementioned functions.
  • modules can be distributed in devices according to the description of the embodiments, or can be modified accordingly in one or more devices that are only different from this embodiment.
  • the modules of the above embodiments can be combined into one module, or further divided into multiple sub-modules.
  • the technical solution of the present application realizes the optimization of the memory and performance of the mobile terminal by controlling the rendering engine process, and can solve the power consumption caused by the rendering engine still occupying the memory when not performing rendering operations. It solves the problems of high temperature, high heat generation and system lag, and shortens the startup time of the software.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

本申请提供一种虚拟直播软件终端优化方法、装置、电子设备和程序产品,涉及直播技术领域。一种用于虚拟直播软件的终端优化方法,包括:在所述软件启动的情况下,获取渲染引擎的初始化参数,所述渲染引擎集成于所述软件且所述软件包括多个页面;所述软件处于正常运行状态情况,启动第一页面;根据所述第一页面的场景和所述初始化参数,控制渲染引擎进程并显示所述第一页面;在所述第一页面切换至第二页面过程中,根据所述第二页面的场景和所述初始化参数,控制所述渲染引擎进程并显示所述第二页面;以及所述软件处于非正常运行状态,不启动或挂起所述渲染引擎进程。根据本申请的实施例,可解决软件运行过程中内存占用高的问题,优化软件启动时间。

Description

虚拟直播软件终端优化方法、装置、电子设备和程序产品 技术领域
本申请涉及直播技术领域,具体而言,涉及一种虚拟直播软件终端优化方法、装置、电子设备和程序产品。
背景技术
现有的移动终端虚拟直播软件一般集成了2D和3D的渲染引擎,在软件启动时,渲染引擎也随之启动并常驻于***内存中,在不需要渲染时也无法移除。
渲染引擎在进行渲染操作时,需要消耗移动终端大量的CPU、GPU资源进行运算,从而导致渲染引擎内存占用较高,造成终端设备发热严重。而在开始进行无需渲染的直播或播放无需渲染的直播时,终端设备发热会更加严重,耗电量急剧上升,并对设备性能产生影响,会有终端设备卡顿的现象。
发明内容
本申请提供一种虚拟直播软件终端优化方法、装置、电子设备和程序产品,通过对渲染引擎进程的管理,降低了CPU、GPU使用率并减少能耗,对移动终端内存及处理器资源的使用、软件的启动时间进行了优化。
根据本申请的一方面,提供一种用于虚拟直播软件的终端优化方法,包括:在所述软件启动的情况下,获取渲染引擎的初始化参数,所述渲染引擎集成于所述软件且所述软件包括多个页面;确定所述软件处于正常运行状态情况还是非正常运行状态情况;若所述软件处于正常运行状态情况,启动第一页面;根据所述第一页面的场景和所述初始化参数,控制渲染引擎进程并显示所述第一页面;在所述第一页面切换至第二页面过程中,根据所述第二页面的场景和所述初始化参数,控制所述渲染引擎进程并显示所述第二页面;以及所述软件处于非正常运行状态情况, 不启动或挂起所述渲染引擎进程。
根据一些实施例,所述正常运行状态包括所述软件处于前台运行状态和/或激活状态;所述非正常运行状态包括所述软件处于后台运行状态和/或非激活状态。
根据一些实施例,确定所述多个页面的场景是否需要渲染;若是,通过所述初始化参数启动所述渲染引擎进程;若否,不启动或挂起所述渲染引擎进程。
根据一些实施例,通过所述初始化参数启动所述渲染引擎进程,包括:为所述渲染引擎分配***内存及处理器资源,以用于通过所述初始化参数启动所述渲染引擎进程。
根据一些实施例,挂起所述渲染引擎进程包括:确定所述多个页面是否为非视频直播页面;若是,挂起所述渲染引擎进程;若否,卸载所述渲染引擎的场景;释放所述渲染引擎进程占用的***内存及处理器资源;挂起所述渲染引擎进程。
根据一些实施例,根据所述第一页面的场景和所述初始化参数,控制渲染引擎进程并显示所述第一页面,包括:判断所述第一页面的场景是否需要渲染;若是,则通过所述初始化参数启动或直接启动所述渲染引擎进程并显示所述第一页面,或保持所述渲染引擎的启动状态并显示所述第一页面;若否,则不启动或挂起所述渲染引擎进程并显示所述第一页面,或保持所述渲染引擎的不启动状态或挂起状态并显示所述第一页面。
根据一些实施例,控制所述渲染引擎进程并显示所述第二页面,包括:判断所述第一页面的场景是否需要渲染,以得到第一结果;判断所述第二页面的场景是否需要渲染,以得到第二结果;若所述第一结果为是,且所述第二结果为是,则保持所述渲染引擎进程的启动状态,直接显示所述第二页面;若所述第一结果为是,且所述第二结果为否,则挂起所述渲染引擎进程并显示所述第二页面;若所述第一结果为否,且所述第二结果为是,则通过所述初始化参数启动或直接启动所述渲染引擎进程并显示所述第二页面;若所述第一结果为否,且所述第二结果为否,则保持所述渲染引擎进程的不启动状态或挂起状态,直接显示所述第二 页面。
根据本申请的一方面,提供一种用于虚拟直播软件的终端优化装置,包括:采集模块,用于获取渲染引擎的初始化参数;运行处理模块,用于根据所述初始化参数和所述软件的多个页面的场景,控制渲染引擎进程以进行所述多个页面的加载或切换;资源控制模块,用于分配或回收所述渲染引擎进程占用的***内存及处理器资源。
根据本申请的一方面,提供一种电子设备,包括:一个或多个处理器;存储装置,用于存储一个或多个程序;当所述一个或多个程序被所述一个或多个处理器执行,使得一个或多个处理器实现如前述的方法。
根据本申请的一方面,提供一种计算机程序产品,包括计算机程序或指令,所述计算机程序或指令被处理器执行时实现如前述的方法。
根据本申请的实施例,可在虚拟直播软件不需进行渲染的情况下,将渲染引擎进程挂起或保持不启动的状态,释放***内存,可有效缓解渲染引擎造成的软件启动时间延迟、终端设备耗电量高、发热量大等问题。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性的,并不能限制本申请。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例。
图1示出根据本申请示例实施例的用于虚拟直播软件的终端优化方法的流程图。
图2示出根据本申请示例实施例的用于虚拟直播软件的终端优化方法的页面加载的流程图。
图3示出根据本申请示例实施例的用于虚拟直播软件的终端优化方法的页面切换的流程图。
图4示出根据本申请示例实施例的用于虚拟直播软件的终端优化方法的状态转换的流程图。
图5A-图5F示出根据本申请示例实施例的终端优化方法的效果示意图。
图6示出根据本申请示例实施例的用于虚拟直播软件的终端优化装置的框图。
图7示出根据本申请示例实施例的电子设备的框图。
具体实施方式
现在将参考附图更全面地描述示例实施例。然而,示例实施例能够以多种形式实施,且不应被理解为限于在此阐述的实施例;相反,提供这些实施例使得本申请将全面和完整,并将示例实施例的构思全面地传达给本领域的技术人员。在图中相同的附图标记表示相同或类似的部分,因而将省略对它们的重复描述。
所描述的特征、结构或特性可以以任何合适的方式结合在一个或更多实施例中。在下面的描述中,提供许多具体细节从而给出对本公开的实施例的充分理解。然而,本领域技术人员将意识到,可以实践本公开的技术方案而没有这些特定细节中的一个或更多,或者可以采用其它的方式、组元、材料、装置或操作等。在这些情况下,将不详细示出或描述公知结构、方法、装置、实现、材料或者操作。
附图中所示的流程图仅是示例性说明,不是必须包括所有的内容和操作/步骤,也不是必须按所描述的顺序执行。例如,有的操作/步骤还可以分解,而有的操作/步骤可以合并或部分合并,因此实际执行的顺序有可能根据实际情况改变。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、***、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其他步骤或单元。
本申请提供一种虚拟直播软件终端优化方法、装置、电子设备和程序产品,通过对渲染引擎进程的启动或挂起,实现对移动终端内存使用 的优化,有效缩短软件启动时间,缓解终端设备电量消耗大、发热量高的问题,提升设备性能。
下面将参照附图,对根据本申请实施例的一种虚拟直播软件终端优化方法、装置、电子设备和程序产品进行详细说明。
本申请对软件的种类及功能不做限定,下文以虚拟直播软件为实施例进行说明。
图1示出根据本申请示例实施例的用于虚拟直播软件的终端优化方法的流程图。
如图1所示,在步骤S110中,在虚拟直播软件启动的情况下,获取渲染引擎的初始化参数。
本申请实施例中涉及的虚拟直播软件包含多个页面。本申请实施例中涉及的渲染引擎集成在虚拟直播软件中,例如,通过将渲染引擎工程打包成动态库引入的方式将渲染引擎集成于虚拟直播软件中。
虚拟直播软件启动渲染引擎时的初始化参数包括argc和argv[],其中,argc是渲染引擎命令参数的个数,argv[]用于存放渲染引擎命令的内容。虚拟直播软件在启动并初始化渲染引擎时需加载初始化参数,渲染引擎初始化后无需重复加载初始化参数即可直接启动。
在步骤S120中,确定虚拟直播软件处于正常状态情况或非正常状态情况。
虚拟直播软件的正常运行状态包括前台运行状态和/或激活状态。例如,用户通过终端(如手机、平板电脑等可用于观看虚拟直播的终端)***桌面点击图标启动虚拟直播软件,进入后通过直播页面观看虚拟主播的直播,此时的虚拟直播软件属于前台运行状态,也即正常运行状态。
虚拟直播软件的非正常运行状态包括后台运行状态和/或非激活状态。例如,用户在虚拟直播软件中观看直播时,通过手机安装的其他软件的提示或通知跳转到其他软件界面,或从当前直播页面返回***桌面,此时的虚拟直播软件处于后台运行状态,也即非正常运行状态。
在步骤S130中,若虚拟直播软件处于正常运行状态的情况,启动第一页面;根据第一页面的场景和初始化参数,控制渲染引擎进程并显示 第一页面。
第一页面为虚拟直播软件处于正常运行状态下的一个页面,包括需要渲染场景的情况和不需要渲染场景的情况。例如,第一页面的场景需要渲染时,终端通过初始化参数启动或直接启动渲染引擎进程。第一页面的场景不需要渲染时,软件不启动或挂起渲染引擎进程。
在步骤S140中,在第一页面切换至第二页面的过程中,根据第二页面的场景和初始化参数,控制渲染引擎进程并显示第二页面。
终端判断第一页面的场景和第二页面的场景是否需要渲染,根据两次判断的结果确定如何控制渲染引擎进程,实现第一页面与第二页面间的切换。
在步骤S150中,若虚拟直播软件处于非正常运行状态情况,不启动或挂起渲染引擎进程。
虚拟直播软件处于非正常运行状态或从正常运行状态跳转至非正常状态的情况下,终端不启动或挂起渲染引擎进程。
根据本申请的实施例,终端在软件页面的加载过程中对渲染引擎进程的进行启动或挂起,使得终端设备性能得到优化。
图2示出根据本申请示例实施例的用于虚拟直播软件的终端优化方法的页面加载的流程图。
如图2所示,上述步骤S130包括子步骤S131、S132和S133。在子步骤S131中,终端通过虚拟直播软件的预设业务规则判断第一页面的场景是否需要渲染,并获取判断结果。
在子步骤S132中,终端获取第一页面在虚拟直播软件中的加载顺序。一般地,第一页面可为虚拟直播软件启动后加载的首个页面,也可为虚拟直播软件运行过程中加载的任一页面。
在子步骤S133中,终端根据判断结果和加载顺序,控制渲染引擎进程并显示第一页面。
根据一些实施例,控制渲染引擎进程包括启动或挂起或不启动渲染引擎进程,以及保持渲染引擎进程的启动或挂起或不启动状态。
启动渲染引擎进程包括:终端为渲染引擎分配***内存及处理器资 源(如CPU、GPU),渲染引擎进程开始占用内存并运行,并根据所渲染的内容使用CPU和/或GPU进行运算。
挂起渲染引擎进程包括:终端通过pause函数挂起渲染引擎进程或者终端卸载渲染引擎的场景,释放渲染引擎进程占用的内存和处理器资源,释放完成后再通过pause函数挂起渲染引擎进程。
通过对渲染引擎进程的控制,可有效缩短虚拟直播软件的启动时间,提高终端内存及处理器资源的利用率。
例如,若第一页面的场景需要渲染,第一页面为虚拟直播软件启动后加载的首个页面,则终端通过初始化参数启动渲染引擎进程,进而显示第一页面。
若第一页面的场景需要渲染,第一页面为虚拟直播软件运行过程中加载的页面,并且渲染引擎进程已经启动,则终端保持渲染引擎进程的启动状态,不再重新启动,进而显示第一页面。
若第一页面的场景需要渲染,第一页面为虚拟直播软件运行过程中加载的页面,并且渲染引擎进程未启动或已挂起,则在渲染引擎进程未启动的情况下,终端通过初始化参数启动渲染引擎进程;在渲染引擎进程已挂起的情况下,终端直接启动渲染引擎进程,进而显示第一页面。
若第一页面的场景不需要渲染,第一页面为虚拟直播软件启动后加载的首个页面,则终端不启动渲染引擎进程,进而显示第一页面。
若第一页面的场景不需要渲染,第一页面为虚拟直播软件运行过程中加载的页面,并且渲染引擎进程已经启动,则终端挂起渲染引擎进程,进而显示第一页面。
若第一页面的场景不需要渲染,第一页面为虚拟直播软件运行过程中加载的页面,并且渲染引擎进程未启动或已挂起,则终端保持渲染引擎进程的不启动状态或挂起状态,进而显示第一页面。
根据本申请的实施例,终端通过对渲染引擎进程的控制,可及时清理渲染引擎占用的内存,有效缓解因内存和处理器使用率高造成的设备耗电量大及发热的问题。
图3示出根据本申请示例实施例的用于虚拟直播软件的终端优化方 法的页面切换的流程图。
如图3所示,上述步骤S140包括子步骤S141、S142和S143。在子步骤S141中,终端通过虚拟直播软件的预设业务规则判断第一页面和第二页面的场景是否需要渲染,并获取判断结果。
在子步骤S142中,终端获取第一页面和第二页面在虚拟直播软件中的加载顺序。一般地,第一页面可为虚拟直播软件启动后加载的首个页面,也可为虚拟直播软件运行过程中加载的任一页面。第二页面为虚拟直播软件运行过程中加载的任一页面。
在子步骤S143中,终端根据判断结果和加载顺序,控制渲染引擎进程并显示第二页面。
例如,若第一页面的场景需要渲染,第二页面的场景也需要渲染,则终端保持渲染引擎进程的启动状态,不重新启动渲染引擎进程,直接显示第二页面。
若第一页面的场景需要渲染,第二页面的场景不需要渲染,则终端挂起渲染引擎进程,进而显示第二页面。
若第一页面的场景不需要渲染,第二页面的场景需要渲染,则终端通过初始化参数启动或直接启动渲染引擎进程,进而显示第二页面。
若第一页面的场景不需要渲染,第二页面的场景也不需要渲染,且渲染引擎进程处于不启动状态,则终端保持渲染引擎进程的不启动状态,直接显示第二页面。
若第一页面的场景不需要渲染,第二页面的场景也不需要渲染,且渲染引擎进程处于挂起状态,则终端保持渲染引擎进程的挂起状态,直接显示第二页面。
根据本申请的实施例,在处于正常运行状态的虚拟直播软件中的页面间彼此切换的过程中,终端可通过对渲染引擎进程的控制,缩短页面切换的时间,并大幅减少***内存及处理器资源的占用,提升终端设备整体性能。
图4示出根据本申请示例实施例的用于虚拟直播软件的终端优化方法的状态转换的流程图。
如图4所示,在步骤S210中,虚拟直播软件启动后,终端获取渲染引擎的初始化参数,此时渲染引擎进程处于不启动状态。
终端判断虚拟软件启动后的运行状态,虚拟直播软件的运行状态包括正常运行状态和非正常运行状态。
在步骤S220中,虚拟直播软件进入非正常运行状态的情况下,终端控制渲染引擎进程,使其保持不启动状态。虚拟直播软件进入正常运行状态的情况下,终端开始加载页面。
虚拟直播软件的正常运行状态与非正常运行状态之间可互相转换。例如,用户正在通过手机上安装的虚拟直播软件观看直播,此时的虚拟直播软件处于正常运行状态。用户在观看直播时有电话呼入,用户选择接听,此时手机跳转到通话功能界面,虚拟直播软件由正常运行状态转换为非正常运行状态。用户接听电话完毕后回到虚拟直播软件继续观看直播,此时手机通话功能界面关闭,虚拟直播软件由非正常运行状态转换为正常运行状态。
终端判断虚拟直播软件正常运行状态下的当前页面的场景是否需要渲染。
在步骤S230中,若当前页面的场景需要渲染,则终端根据当前页面的加载顺序,通过初始化参数启动或直接启动渲染引擎进程,或保持渲染引擎进程的启动状态,而后显示当前页面。若当前页面的场景不需要渲染,则终端根据当前页面的加载顺序,不启动或挂起渲染引擎进程,或保持渲染引擎进程的不启动状态,或保持渲染引擎进程的挂起状态,而后显示当前页面。
根据一些实施例,虚拟直播软件由正常运行状态跳转至非正常运行状态的情况下,终端根据虚拟直播软件处于正常运行状态时所加载的页面,可将渲染引擎进程挂起,或保持渲染引擎进程的不启动状态或挂起状态。
例如,若用户从虚拟直播软件中需要渲染的页面跳转出去,并且虚拟直播软件处于非正常运行状态时,则终端挂起渲染引擎进程。若用户从虚拟直播软件中不需要渲染的页面跳转出去,并且虚拟直播软件处于非正常运行状态时,则终端保持渲染引擎的不启动状态或挂起状态。
根据一些实施例,虚拟直播软件由非正常运行状态跳转至正常运行状态的情况下,终端根据虚拟直播软件处于正常运行状态时所加载的页面,可通过初始化参数启动或直接启动渲染引擎进程,或保持渲染引擎进程的不启动状态或挂起状态。
例如,若用户从虚拟直播软件的非正常运行状态跳转到正常运行状态下的页面,且当前页面场景需要渲染,则终端通过初始化参数启动或直接启动渲染引擎进程。若用户从虚拟直播软件的非正常运行状态跳转到正常运行状态下的页面,且当前页面场景不需要渲染,则终端保持引擎进程的不启动状态或挂起状态。
根据本申请的实施例,虚拟直播软件可在正常运行状态与非正常运行状态之间转换,在状态转换过程中,终端通过对渲染引擎进程的控制,大幅节省了***内存及资源的占用。
图5A-图5F示出根据本申请示例实施例的终端优化方法的效果示意图。
如图5A所示的页面为虚拟直播软件启动后加载的首个页面,此页面不需渲染引擎渲染场景,因此未启动渲染引擎进程。
此时,终端设备的内存及资源使用情况如图5B所示,内存使用85.8MB,CPU使用率为0%,CPU的能耗为0.5%,GPU能耗为0%。
如图5C所示的页面为虚拟直播软件运行过程中的一个页面,此页面为虚拟主播的直播页面,其中,虚拟主播的场景需要渲染引擎渲染,在由如图5A所示页面切换到如图5C所示页面的情况下,终端根据初始化参数启动渲染引擎进程,并为渲染引擎分配内存和处理器资源。
此时,终端设备的内存及资源使用情况如图5D所示,内存使用增加到492MB,CPU使用率提高到44%,CPU的能耗提高到9.7%,GPU能耗提高到47.7%。
在由如图5C所示页面切换到如图5A所示页面的情况下,若如图5A所示页面为非视频直播页面,则终端直接挂起渲染引擎进程。
此时,终端设备的内存及资源使用情况如图5E所示,内存使用下降为474MB,CPU使用率下降至2%,CPU的能耗下降至1%,GPU能耗下降至 0%。
在由如图5C所示页面切换到如图5A所示页面的情况下,若如图5A所示页面为视频直播页面,则终端先卸载渲染引擎场景,释放渲染引擎进程占用的内存及处理器资源,而后挂起渲染引擎进程。
此时,终端设备的内存及资源使用情况如图5F所示,内存使用下降至134MB,CPU使用率下降至1%,CPU能耗为1.3%,GPU能耗为0%。
由此可见,根据本申请实施例的终端优化方法,可有效地节约***内存的使用,大幅降低了CPU和GPU的使用率和能耗,使得终端设备在虚拟直播软件运行时的性能得到优化。
图6示出根据本申请示例实施例的用于虚拟直播软件的终端优化装置的框图。
如图6所示,终端优化装置包括采集模块301、运行处理模块303和资源控制模块305。
采集模块301用于获取渲染引擎的初始化参数,并将初始化参数提供给运行处理模块303以用于启动渲染引擎进程。
集成了渲染引擎的虚拟直播软件,在运行过程中,渲染引擎的资源加载后以资源对象的形式存在,通过渲染引擎进程调用,占用内存空间。
资源对象的类型包括但不限于模型、贴图、音频、视频和动画等。
运行处理模块303接收渲染引擎的初始化参数,并根据页面的场景,控制渲染引擎进程,进行页面的加载或页面间的切换。
虚拟直播软件中加载的页面包括:场景需要渲染的页面和场景不需要渲染的页面,而页面的场景是否需要渲染由虚拟直播软件的预设业务规则进行判断和确定。
运行处理模块303根据页面的场景是否需要渲染的判断结果,进行不同类型的操作以用于加载并显示页面。
运行处理模块303进行的操作包括:通过初始化参数启动或直接启动渲染引擎进程,保持渲染引擎进程的启动状态,挂起渲染引擎进程,保持渲染引擎进程的不启动状态或挂起状态。
资源控制模块305用于分配或回收运行处理模块303进行操作时, 渲染引擎进程占用的***内存及处理器资源。
例如,运行处理模块303启动渲染引擎进程时,资源控制模块305为渲染引擎分配***内存及处理器资源,以用于渲染引擎进程调用资源对象。
运行处理模块303挂起渲染引擎进程时,资源控制模块305回收在挂起渲染引擎进程时释放的***内存及处理器资源,以用于在下一次启动渲染引擎进程时进行分配。
图7示出根据本申请示例实施例的电子设备的框图。
如图7所示,电子设备600仅仅是一个示例,不应对本申请实施例的功能和使用范围带来任何限制。
如图7所示,电子设备600以通用计算设备的形式表现。电子设备600的组件可以包括但不限于:至少一个处理单元610、至少一个存储单元620、连接不同***组件(包括存储单元620和处理单元610)的总线630、显示单元640等。其中,存储单元存储有程序代码,程序代码可以被处理单元610执行,使得处理单元610执行本说明书描述的根据本申请各种示例性实施方式的方法。例如,处理单元610可以执行如图1中所示的方法。
存储单元620可以包括易失性存储单元形式的可读介质,例如随机存取存储单元(RAM)6201和/或高速缓存存储单元6202,还可以进一步包括只读存储单元(ROM)6203。
存储单元620还可以包括具有一组(至少一个)程序模块6205的程序/实用工具6204,这样的程序模块6205包括但不限于:操作***、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。
总线630可以为表示几类总线结构中的一种或多种,包括存储单元总线或者存储单元控制器、***总线、图形加速端口、处理单元或者使用多种总线结构中的任意总线结构的局域总线。
电子设备600也可以与一个或多个外部设备700(例如键盘、指向设备、蓝牙设备等)通信,还可与一个或者多个使得用户能与该电子设 备600交互的设备通信,和/或与使得该电子设备600能与一个或多个其它计算设备进行通信的任何设备(例如路由器、调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口650进行。并且,电子设备600还可以通过网络适配器660与一个或者多个网络(例如局域网(LAN),广域网(WAN)和/或公共网络,例如因特网)通信。网络适配器660可以通过总线630与电子设备600的其它模块通信。应当明白,尽管图中未示出,可以结合电子设备600使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID***、磁带驱动器以及数据备份存储***等。
通过以上的实施方式的描述,本领域的技术人员易于理解,这里描述的示例实施例可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。根据本申请实施例的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、移动终端或者网络设备等)执行根据本申请实施例的方法。
软件产品可以采用一个或多个可读介质的任意组合。可读介质可以是可读信号介质或者可读存储介质。可读存储介质例如可以为但不限于电、磁、光、电磁、红外线、或半导体的***、装置或器件,或者任意以上的组合。可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。
计算机可读存储介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了可读程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。可读存储介质还可以是可读存储介质以外的任何可读介质,该可读介质可以发送、传播或者传输用于由指令执行***、装置或者器件使用或者与其结合使用的程序。可读存储介质上包含的程序代码可以用任何适当的 介质传输,包括但不限于无线、有线、光缆、RF等等,或者上述的任意合适的组合。
可以以一种或多种程序设计语言的任意组合来编写用于执行本申请操作的程序代码,程序设计语言包括面向对象的程序设计语言—诸如Java、C++等,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算设备上执行、部分地在用户设备上执行、作为一个独立的软件包执行、部分在用户计算设备上部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。在涉及远程计算设备的情形中,远程计算设备可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN),连接到用户计算设备,或者,可以连接到外部计算设备(例如利用因特网服务提供商来通过因特网连接)。
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被一个该设备执行时,使得该计算机可读介质实现前述功能。
本领域技术人员可以理解上述各模块可以按照实施例的描述分布于装置中,也可以进行相应变化唯一不同于本实施例的一个或多个装置中。上述实施例的模块可以合并为一个模块,也可以进一步拆分成多个子模块。
根据本申请的一些实施例,本申请的技术方案通过对渲染引擎进程的控制,实现对移动终端内存及性能的优化,可解决渲染引擎在不进行渲染操作时仍占用内存而造成的耗电量高、发热量大及***卡顿的问题,并缩短了软件的启动时间。
以上对本申请实施例进行了详细介绍,以上实施例的说明仅用于帮助理解本申请的方法及其核心思想。同时,本领域技术人员依据本申请的思想,基于本申请的具体实施方式及应用范围上做出的改变或变形之处,都属于本申请保护的范围。综上所述,本说明书内容不应理解为对本申请的限制。

Claims (10)

  1. 一种用于虚拟直播软件的终端优化方法,其特征在于,包括:
    在所述软件启动的情况下,获取渲染引擎的初始化参数,所述渲染引擎集成于所述软件且所述软件包括多个页面;
    确定所述软件处于正常运行状态情况或非正常运行状态情况;
    若所述软件处于正常运行状态情况,启动第一页面;根据所述第一页面的场景和所述初始化参数,控制渲染引擎进程并显示所述第一页面;
    在所述第一页面切换至第二页面过程中,根据所述第二页面的场景和所述初始化参数,控制所述渲染引擎进程并显示所述第二页面;以及
    若所述软件处于非正常运行状态情况,不启动或挂起所述渲染引擎进程。
  2. 根据权利要求1所述的方法,其特征在于,包括:
    所述正常运行状态包括所述软件处于前台运行状态和/或激活状态;
    所述非正常运行状态包括所述软件处于后台运行状态和/或非激活状态。
  3. 根据权利要求1所述的方法,其特征在于,还包括:
    确定所述多个页面的场景是否需要渲染;
    若是,通过所述初始化参数启动所述渲染引擎进程;
    若否,不启动或挂起所述渲染引擎进程。
  4. 根据权利要求3所述的方法,其特征在于,通过所述初始化参数启动所述渲染引擎进程,包括:
    为所述渲染引擎分配***内存及处理器资源,以用于通过所述初始化参数启动所述渲染引擎进程。
  5. 根据权利要求3所述的方法,其特征在于,挂起所述渲染引擎进程包括:
    确定所述多个页面是否为非视频直播页面;
    若是,挂起所述渲染引擎进程;
    若否,卸载所述渲染引擎的场景;
    释放所述渲染引擎进程占用的***内存及处理器资源;
    挂起所述渲染引擎进程。
  6. 根据权利要求1所述的方法,其特征在于,根据所述第一页面的场景和所述初始化参数,控制渲染引擎进程并显示所述第一页面,包括:
    判断所述第一页面的场景是否需要渲染;
    若是,则通过所述初始化参数启动或直接启动所述渲染引擎进程并显示所述第一页面,或保持所述渲染引擎的启动状态并显示所述第一页面;
    若否,则不启动或挂起所述渲染引擎进程并显示所述第一页面,或保持所述渲染引擎的不启动状态或挂起状态并显示所述第一页面。
  7. 根据权利要求1所述的方法,其特征在于,控制所述渲染引擎进程并显示所述第二页面,包括:
    判断所述第一页面的场景是否需要渲染,以得到第一结果;
    判断所述第二页面的场景是否需要渲染,以得到第二结果;
    若所述第一结果为是,且所述第二结果为是,则保持所述渲染引擎进程的启动状态,直接显示所述第二页面;
    若所述第一结果为是,且所述第二结果为否,则挂起所述渲染引擎进程并显示所述第二页面;
    若所述第一结果为否,且所述第二结果为是,则通过所述初始化参数启动或直接启动所述渲染引擎进程并显示所述第二页面;
    若所述第一结果为否,且所述第二结果为否,则保持所述渲染引擎进程的不启动状态或挂起状态,直接显示所述第二页面。
  8. 一种用于虚拟直播软件的终端优化装置,其特征在于,包括:
    采集模块,用于获取渲染引擎的初始化参数;
    运行处理模块,用于根据所述初始化参数和所述软件的多个页面的场景,控制渲染引擎进程以进行所述多个页面的加载或切换;
    资源控制模块,用于分配或回收所述渲染引擎进程占用的***内存及处理器资源。
  9. 一种电子设备,其特征在于,包括:
    一个或多个处理器;
    存储装置,用于存储一个或多个程序;
    当所述一个或多个程序被所述一个或多个处理器执行,使得一个或多个处理器实现如权利要求1-7中任一所述的方法。
  10. 一种计算机程序产品,包括计算机程序或指令,其特征在于,所述计算机程序或指令被处理器执行时实现如权利要求1-7中任一所述的方法。
PCT/CN2022/094742 2022-05-24 2022-05-24 虚拟直播软件终端优化方法、装置、电子设备和程序产品 WO2023225859A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/094742 WO2023225859A1 (zh) 2022-05-24 2022-05-24 虚拟直播软件终端优化方法、装置、电子设备和程序产品

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/094742 WO2023225859A1 (zh) 2022-05-24 2022-05-24 虚拟直播软件终端优化方法、装置、电子设备和程序产品

Publications (1)

Publication Number Publication Date
WO2023225859A1 true WO2023225859A1 (zh) 2023-11-30

Family

ID=88918240

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/094742 WO2023225859A1 (zh) 2022-05-24 2022-05-24 虚拟直播软件终端优化方法、装置、电子设备和程序产品

Country Status (1)

Country Link
WO (1) WO2023225859A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9007239B1 (en) * 2012-07-02 2015-04-14 Amazon Technologies, Inc. Reduction of memory consumption
US9690748B1 (en) * 2012-07-02 2017-06-27 Amazon Technologies, Inc. Delivering notifications to background applications
CN110691401A (zh) * 2019-08-28 2020-01-14 华为技术有限公司 一种***应用的管理方法及装置
CN111970522A (zh) * 2020-07-31 2020-11-20 北京琳云信息科技有限责任公司 虚拟直播数据的处理方法、装置及存储介质
CN113761440A (zh) * 2021-07-28 2021-12-07 广州方硅信息技术有限公司 基于Web页面直播的项目运行方法、设备及存储介质
CN114117305A (zh) * 2021-11-29 2022-03-01 深圳市中科明望通信软件有限公司 一种进程控制方法、装置、终端和计算机可读存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9007239B1 (en) * 2012-07-02 2015-04-14 Amazon Technologies, Inc. Reduction of memory consumption
US9690748B1 (en) * 2012-07-02 2017-06-27 Amazon Technologies, Inc. Delivering notifications to background applications
CN110691401A (zh) * 2019-08-28 2020-01-14 华为技术有限公司 一种***应用的管理方法及装置
CN111970522A (zh) * 2020-07-31 2020-11-20 北京琳云信息科技有限责任公司 虚拟直播数据的处理方法、装置及存储介质
CN113761440A (zh) * 2021-07-28 2021-12-07 广州方硅信息技术有限公司 基于Web页面直播的项目运行方法、设备及存储介质
CN114117305A (zh) * 2021-11-29 2022-03-01 深圳市中科明望通信软件有限公司 一种进程控制方法、装置、终端和计算机可读存储介质

Similar Documents

Publication Publication Date Title
JP2020024722A (ja) ストリーミング・サーバのセッション・アイドル最適化
US11010859B2 (en) Display resource scheduling method and device for embedded system
US9021243B2 (en) Method for increasing free memory amount of main memory and computer therefore
US20110004749A1 (en) Launching An Application From A Power Management State
JP2006164216A (ja) オペレーション・システムの共用パーティションの構造及びその方法
JP2010237787A (ja) プログラム、情報処理装置及び状態出力方法
WO2020063041A1 (zh) 多核处理器的调度方法、装置、终端及存储介质
US11831410B2 (en) Intelligent serverless function scaling
WO2024119988A1 (zh) 多cpu环境下的进程调度方法、装置、电子设备和介质
US20240212255A1 (en) Scene Rendering Method, Apparatus, Device, and System
CN115357389A (zh) 内存管理方法、装置及电子设备
WO2023225859A1 (zh) 虚拟直播软件终端优化方法、装置、电子设备和程序产品
CN109597595A (zh) 液晶显示屏的控制方法、装置、计算机设备和存储介质
CN113138940A (zh) 内存回收方法、装置、电子设备以及存储介质
EP3586225B1 (en) Apparatus and method for reducing energy consumption of hardware based on application state
CN117075971A (zh) 休眠方法及其相关设备
US7716669B2 (en) Concurrent system applications in a multimedia console
TWI556167B (zh) 用於多重本機軟體應用程式使用者介面組成之系統及方法
CN111930502A (zh) 一种服务器管理方法、装置、设备及存储介质
WO2023245494A1 (zh) 从渲染引擎中获取纹理数据的方法及装置、电子设备
CN112817911B (zh) 一种文件***修复方法及终端设备
CN114390349B (zh) 一种视频播放控制方法、装置、终端和存储介质
CN113296802B (zh) 虚拟机热升级方法、主机设备及存储介质
CN103562869B (zh) 虚拟化环境下的音频处理方法和设备
US11954534B2 (en) Scheduling in a container orchestration system utilizing hardware topology hints

Legal Events

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

Ref document number: 22943065

Country of ref document: EP

Kind code of ref document: A1