WO2020114142A1 - 应用热补丁监控方法、装置及存储介质 - Google Patents

应用热补丁监控方法、装置及存储介质 Download PDF

Info

Publication number
WO2020114142A1
WO2020114142A1 PCT/CN2019/113152 CN2019113152W WO2020114142A1 WO 2020114142 A1 WO2020114142 A1 WO 2020114142A1 CN 2019113152 W CN2019113152 W CN 2019113152W WO 2020114142 A1 WO2020114142 A1 WO 2020114142A1
Authority
WO
WIPO (PCT)
Prior art keywords
hot patch
update program
patch update
hot
optimization
Prior art date
Application number
PCT/CN2019/113152
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 中兴通讯股份有限公司
Publication of WO2020114142A1 publication Critical patent/WO2020114142A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3024Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a central processing unit [CPU]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/656Updates while running
    • 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating

Definitions

  • the present invention relates to the field of communications, and in particular, to a method, device and storage medium for applying hot patch monitoring.
  • Hot patching technology is a new way to update applications. It can fix software vulnerabilities without reinstalling applications. It is a fast and low-cost way to fix defects in product software versions. Therefore, recently, more and more application developers have used it for application upgrades, which brings great challenges to mobile phone terminals.
  • application upgrades When performing hot patch upgrades in the background, users cannot directly perceive, but at this time It will bring a very large system load to the system, resulting in serious problems such as stuck, unresponsive, and error reporting, which will have a great impact on the user experience. Therefore, the use of hot patches not only brings convenience to major application developers, but also poses serious problems for terminal manufacturers. How to effectively manage the application of hot patch upgrades so that they do not adversely affect system performance, So as to ensure the user experience.
  • Embodiments of the present invention provide a method, device, and storage medium for applying hot patch monitoring, so as to at least solve the problem that hot patch upgrade in the related art affects system performance.
  • an application hot patch monitoring method including: monitoring the startup of a third-party application hot patch update program in a system; controlling the operation of the application hot patch update program according to the current state of the system .
  • an application hot patch monitoring device including: a hot patch monitoring module for monitoring the startup of a third-party application hot patch update program in the system; and a hot patch control module for The current state of the system controls the operation of the applied hot patch update program.
  • a storage medium in which a computer program is stored, wherein the computer program is set to execute the steps in the above embodiments when it is run.
  • an electronic device including a memory and a processor, the memory stores a computer program, the processor is configured to run the computer program to perform the steps in the above embodiment .
  • FIG. 1 is a schematic structural diagram of a terminal executed by a method according to an embodiment of the present invention
  • FIG. 2 is a flowchart of a method for applying hot patch monitoring according to an embodiment of the present invention
  • FIG. 3 is a flowchart of a method for applying hot patch monitoring according to another embodiment of the present invention.
  • FIG. 4 is a flowchart of a method for applying hot patch monitoring according to yet another embodiment of the present invention.
  • FIG. 5 is a structural block diagram of a device for applying hot patch monitoring according to an embodiment of the present invention.
  • FIG. 6 is a structural block diagram of a device for applying hot patch monitoring according to yet another embodiment of the present invention.
  • FIG. 1 is a block diagram of a hardware structure of a mobile terminal applying a hot patch monitoring method according to an embodiment of the present invention.
  • the mobile terminal 10 may include one or more (only one is shown in FIG. 1) processor 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA, etc. ) And a memory 104 for storing data.
  • the above mobile terminal may further include a transmission device 106 for communication functions and an input and output device 108.
  • FIG. 1 is merely an illustration, which does not limit the structure of the mobile terminal described above.
  • the mobile terminal 10 may also include more or fewer components than those shown in FIG. 1, or have a different configuration from that shown in FIG.
  • the memory 104 may be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the application hot patch monitoring method in the embodiment of the present invention, and the processor 102 runs the computer program stored in the memory 104, thereby Implementation of various functional applications and data processing, that is, to achieve the above method.
  • the memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.
  • the memory 104 may further include memories remotely provided with respect to the processor 102, and these remote memories may be connected to the mobile terminal 10 through a network. Examples of such networks include, but are not limited to the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • the transmission device 106 is used to receive or send data via a network.
  • the specific example of the network described above may include a wireless network provided by a communication provider of the mobile terminal 10.
  • the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC for short), which can be connected to other network devices through the base station to communicate with the Internet.
  • the transmission device 106 may be a radio frequency (Radio Frequency, RF for short) module, which is used to communicate with the Internet in a wireless manner.
  • RF Radio Frequency
  • FIG. 2 is a flowchart according to an embodiment of the present invention. As shown in FIG. 1, the process includes the following steps:
  • Step S202 monitoring the startup of the hot patch update program applied by the third party in the system
  • Step S204 Control the running of the applied hot patch update program according to the current state of the system.
  • a hot patch monitoring module can be added at the dex2oat level of the mobile terminal system.
  • dex2oat is enabled, it is determined whether a third-party application is starting, and the monitoring and determination results are sent to the hot patch
  • the control module performs subsequent processing.
  • the hot patch control module When the hot patch control module receives the information sent by the hot patch monitoring module, it will perform unified control based on the current system status. For example, the following control strategies may be included:
  • the hot patch monitoring module monitors the system for dex optimization behavior in real time.
  • the dex optimization process is intervened.
  • the entire intervention process can be composed of three parts, including adjusting thread concurrent Number, adjust the type of optimization parameters, and adjust the CPU scheduling strategy to perform the optimization process.
  • the optimization process of Dex is load balanced from three aspects, thereby improving the performance of the system.
  • it may be determined whether the hot patch update program of the third-party application is started according to the application's dex optimization request.
  • An embodiment of the present invention also provides a method for monitoring hot patch application. As shown in FIG. 3, the method includes the following steps:
  • the hot patch monitoring module determines whether a third-party application is starting, and sends the monitoring and determination results to the hot patch control module for subsequent processing. If it is not started by a third-party application, then return to S301.
  • the hot patch control module sets the number of threads, and dynamically adjusts the number of concurrent multi-thread threads of the dex2oat applying the hot patch request according to the current CPU occupancy rate. If the CPU occupancy rate reaches the set threshold, the number of concurrent threads is reduced Half, if the CPU usage still exceeds the threshold after halving, continue to halve until the final number of threads drops to 1.
  • the hot patch control module sets an optimization mode, and the dex2oat optimization strategy for applying the hot patch needs to be adjusted. If the hot patch application requests a speed optimization mode, which consumes a lot of system resources, it is mandatory The optimization strategy was changed to interpret-only mode to reduce resource consumption of the system.
  • the hot patch control module needs to set the grouping of CPU resources in the background and background during the task execution of Dex optimization, put the task of hot patch upgrade into the background process, and restrict the CPU operation of the background process. Limit background processes to run on the small core of the CPU to avoid interference and impact on the foreground process.
  • steps S304 to S306 is not limited in sequence. In addition, all of steps S304 to S306 may be executed as needed, or only some of the steps may be executed.
  • An embodiment of the present invention also provides a method for monitoring hot patch application. As shown in FIG. 4, the method includes the following steps:
  • a program with high resource requirements is running in the user terminal, for example, an online network game.
  • the hot patch monitoring module determines that the third-party application hot patch program is starting, and sends the determination result to the hot patch control module.
  • the hot patch control module controls the application of the third party hot patch program to reduce resource consumption of the system.
  • the hot patch control module may adjust the number of optimized threads requested by a third-party application hot patch program. Specifically, the number of requested optimized threads may be adjusted based on the current CPU occupancy rate, and when the CPU occupancy rate exceeds 80%, the requested optimized thread number may be reduced until the CPU occupancy rate is less than 80%.
  • the hot patch control module may adjust the optimization mode of the hot patch request applied by a third party, and change the speed optimization mode of the hot patch request to an interpret-only mode, thereby reducing resource consumption of the system.
  • the hot patch control module may place the hot patch upgrade task in a background process to avoid interference and impact on the foreground process.
  • control measures can be comprehensively used according to the resource occupancy status until the system resource requirements are met.
  • the embodiment of the invention also provides a monitoring device for applying hot patches.
  • This device is used to implement the above-mentioned embodiments and preferred implementation modes, and those that have already been described will not be repeated.
  • the term "module” may implement a combination of software and/or hardware for a predetermined function.
  • the devices described in the following embodiments are preferably implemented in software, implementation of hardware or a combination of software and hardware is also possible and conceived.
  • FIG. 5 is a structural block diagram of a device for applying hot patch monitoring according to an embodiment of the present invention.
  • the device may be a mobile device, including a hot patch monitoring module 10 and a hot patch control module 20.
  • the hot patch monitoring module 10 is used to monitor the activation of the hot patch update program applied by a third party in the system.
  • the hot patch control module 20 is used to control the running of the applied hot patch update program according to the current state of the system.
  • the hot patch monitoring module 10 and the hot patch control module 20 will be described in detail below.
  • Hot patch monitoring module 10 a hot patch monitoring module can be added at the dex2oat level of the mobile phone system, the hot patch monitoring module is embedded in the ART virtual machine, and the hot patch monitoring sub-module is triggered according to the application Dex optimization request. Any application that requires hot patch upgrades must apply to ART for execution.
  • ART receives the application application and is ready to perform Dex optimization, the hot patch monitoring module is triggered.
  • the hot patch monitoring module is triggered, you first need to extract the application package name of the Dex optimization request to determine whether the third-party application is making the request. If the system application is making the Dex request, no intervention is required. It is determined that the third-party application sends the extracted package name and Dex policy to the hot patch control module for subsequent processing when performing the Dex request.
  • Hot patch control module 20 When the hot patch control module receives the information sent by the hot patch monitoring module, it will perform unified control according to the current system status.
  • the unified control strategy mainly includes three major control mechanisms: thread control, hot patch upgrade strategy control, and CPU grouping strategy control to ensure that the system is not affected when performing hot patch upgrades.
  • FIG. 6 is a structural block diagram of a device for applying hot patch monitoring according to an embodiment of the present invention. As shown in FIG. 6, the device includes all the modules shown in FIG. 5, and the hot patch control module 20 further includes a first setting unit 21. The second setting unit 22 and the third setting unit 30.
  • the first setting unit is used to set the number of concurrent threads requested by the hot patch update program, for example, to adjust the number of concurrent threads requested by the hot patch update program according to the current CPU usage.
  • the second setting unit is used to set the optimization parameter type requested by the hot patch update program, for example, adjusting the dex optimization mode requested by the hot patch update program according to the occupancy of system resources.
  • the third setting unit is used to set a CPU scheduling strategy for the hot patch update program to perform the optimization process, for example, to adjust the task of upgrading the hot patch update program from the foreground process to the background process.
  • the above modules can be implemented by software or hardware. For the latter, they can be implemented by the following methods, but not limited to this: the above modules are all located in the same processor; or, the above modules can be combined in any combination The forms are located in different processors.
  • An embodiment of the present invention also provides a storage medium in which a computer program is stored, wherein the computer program is set to execute the steps in the above embodiments when it is run.
  • An embodiment of the present invention also provides an electronic device, including a memory and a processor, where a computer program is stored in the memory, and the processor is configured to run the computer program to perform the steps in the foregoing embodiments.
  • modules or steps of the present invention can be implemented by a general-purpose computing device, they can be concentrated on a single computing device, or distributed in a network composed of multiple computing devices Above, optionally, they can be implemented with program code executable by the computing device, so that they can be stored in the storage device to be executed by the computing device, and in some cases, can be in a different order than here
  • the steps shown or described are performed, or they are made into individual integrated circuit modules respectively, or multiple modules or steps among them are made into a single integrated circuit module for implementation. In this way, the present invention is not limited to any specific combination of hardware and software.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • Mathematical Physics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

本发明提供了一种应用热补丁监控方法及装置,该方法包括:监控第三方应用的热补丁更新程序在系统中的启动,根据系统的当前状态控制所述应用的热补丁更新程序的运行。

Description

应用热补丁监控方法、装置及存储介质
相关申请的交叉引用
本申请基于申请号为201811466929.8、申请日为2018年12月3日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本发明涉及通信领域,具体而言,涉及一种应用热补丁监控方法、装置以及存储介质。
背景技术
热补丁技术是一种新的应用程序更新方式,能够在无需重新安装应用程序的情况下,修复软件漏洞,是一种快速、低成本修复产品软件版本缺陷的方式。因此,近来被越来越多的应用开发厂商用于应用升级,对手机终端来说,带来了非常大的挑战,当在后台进行热补丁升级时,用户是无法直接感知的,但是此时会给系统带来非常大的系统负荷,导致系统产生卡顿,无响应,报错等严重问题,对用户体验带来非常大的影响。因此,热补丁的使用,在给各大应用开发厂商带来便利的同时,也给终端厂商提出了严峻的课题,如何有效管理应用的热补丁升级,让其不对系统性能带来不良的影响,从而保证用户体验。
发明内容
本发明实施例提供了一种应用热补丁监控方法、装置及存储介质,以至少解决相关技术中热补丁升级影响系统性能的问题。
根据本发明的实施例,提供了一种应用热补丁监控方法,包括:监控第三方应用的热补丁更新程序在系统中的启动;根据系统的当前状态控制所述应用的热补丁更新程序的运行。
根据本发明的实施例,还提供了一种应用热补丁监控装置,包括:热补丁监控模块,用于监控第三方应用的热补丁更新程序在系统中的启动;热补丁控制模块,用于根据系统的当前状态控制所述应用的热补丁更新程序的运行。
根据本发明的实施例,还提供了一种存储介质,所述存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时执行上述实施例中的步骤。
根据本发明的实施例,还提供了一种电子装置,包括存储器和处理器,所述存储器中 存储有计算机程序,所述处理器被设置为运行所述计算机程序以执行上述实施例中的步骤。
附图说明
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:
图1是根据本发明实施例的方法所运行的终端结构示意图;
图2是根据本发明实施例的应用热补丁监控方法流程图;
图3是根据本发明另一实施例的应用热补丁监控方法流程图;
图4是根据本发明又一实施例的应用热补丁监控方法流程图;
图5是根据本发明实施例的应用热补丁监控装置的结构框图;
图6是根据本发明又一实施例的应用热补丁监控装置的结构框图。
具体实施方式
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。
本发明所提供的方法实施例可以在移动终端、计算机终端或者类似的运算装置中执行。以运行在移动终端上为例,图1是本发明实施例的一种应用热补丁监控方法的移动终端的硬件结构框图。如图1所示,移动终端10可以包括一个或多个(图1中仅示出一个)处理器102(处理器102可以包括但不限于微处理器MCU或可编程逻辑器件FPGA等的处理装置)和用于存储数据的存储器104,可选地,上述移动终端还可以包括用于通信功能的传输设备106以及输入输出设备108。本领域普通技术人员可以理解,图1所示的结构仅为示意,其并不对上述移动终端的结构造成限定。例如,移动终端10还可包括比图1中所示更多或者更少的组件,或者具有与图1所示不同的配置。
存储器104可用于存储计算机程序,例如,应用软件的软件程序以及模块,如本发明实施例中的应用热补丁监控方法对应的计算机程序,处理器102通过运行存储在存储器104内的计算机程序,从而执行各种功能应用以及数据处理,即实现上述的方法。存储器104可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器104可进一步包括相对于处理器102远程设置的存储器,这些远程存储器可以通过网络连接至移动终端10。上述网络的实例包 括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
传输装置106用于经由一个网络接收或者发送数据。上述的网络具体实例可包括移动终端10的通信供应商提供的无线网络。在一个实例中,传输装置106包括一个网络适配器(Network Interface Controller,简称为NIC),其可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中,传输装置106可以为射频(Radio Frequency,简称为RF)模块,其用于通过无线方式与互联网进行通讯。
在本实施例中提供了一种运行于上述移动终端的应用热补丁监控方法,图2是根据本发明实施例的流程图,如图1所示,该流程包括如下步骤:
步骤S202,监控第三方应用的热补丁更新程序在系统中的启动;
步骤S204,根据系统的当前状态控制所述应用的热补丁更新程序的运行。
在本实施实例,可通过在移动终端系统的dex2oat层面,添加热补丁监控模块,当监控到dex2oat被启用时,进行判定是否是第三方应用在进行启动,将监控和判定的结果发送给热补丁控制模块进行后续处理。
当热补丁控制模块收到热补丁监控模块发来的信息后,会根据当前的系统状态进行统一控制,例如,可包含如下控制策略:
1)控制热补丁的并发任务的线程个数。根据当前的CPU占用率来动态调整应用热补丁请求的dex2oat的多线程并发线程数,如果CPU占用率达到设定的门限,则将并发线程数减半,如果减半后CPU占用还是超过门限,则继续减半,直到最终线程数降为1。当然,并发线程数也可以根据其他方式进行调整,本实施例所列举的并发线程数减半的方式仅是为了尽量较少并发线程数的调整次数。
2)设置所述热补丁更新程序所请求的优化参数类型,包括:根据系统资源的占用情况调整所述热补丁更新程序所请求的dex优化模式;又例如将应用热补丁的dex2oat优化策略进行调整。如果该应用热补丁请求的是speed优化模式,此种优化模式对系统资源的消耗非常大,则强制将优化策略变更为interpret-only模式,减少对系统的资源消耗。
3)设置所述热补丁更新程序执行优化过程的CPU调度策略,例如将进行热补丁升级的任务从前台进程调整到后台进程中,并且对后台进程的CPU运行进行限制,将后台进程限制在CPU的小核上运行,避免对前台进程造成干扰和影响。
在实施例中,通过热补丁监控模块实时监控系统进行dex的优化行为,当判定符合条件的dex优化时,进行dex优化流程的干预,整个干预流程可由三部分组合而成,包括调整线程并发个数,调整优化参数类型,调整执行优化过程的CPU调度策略。从而从三个方 面共同对Dex的优化过程做负载均衡,从而提升系统的性能表现。
在实施例中,可以根据应用的dex优化请求判断是否所述第三方应用的热补丁更新程序在启动。
本发明实施例还提供了一种应用热补丁监控方法,如图3所示,包括如下步骤:
S301,开始,用户运行各种应用程序。
S302,当调用dex2oat进行优化升级时,热补丁监控模块被触发。
S303,热补丁监控模块进行判定是否是第三方应用在进行启动,将监控和判定的结果发送给热补丁控制模块进行后续处理。如果不是第三方应用启动的,那么回到S301。
S304,热补丁控制模块进行线程数设定,根据当前的CPU占用率来动态调整应用热补丁请求的dex2oat的多线程并发线程数,如果CPU占用率达到设定的门限,则将并发线程数减半,如果减半后CPU占用还是超过门限,则继续减半,直到最终线程数降为1。
S305,热补丁控制模块进行设置优化模式,需要将应用热补丁的dex2oat优化策略进行调整,如果该应用热补丁请求的是speed优化模式,此种优化模式对系统资源的消耗非常大,则强制将优化策略变更为interpret-only模式,减少对系统的资源消耗。
S306,热补丁控制模块在进行Dex优化的任务执行中,需要进行CPU资源前后台分组设定,将进行热补丁升级的任务放到后台进程中去做,并且对后台进程的CPU运行进行限制,将后台进程限制在CPU的小核上去运行,避免对前台进程造成干扰和影响。
S307,整个过程结束。
需要说明的是,在本实施例中,步骤S304至S306的执行并没有先后顺序限定,另外,也可以根据需要执行全部步骤S304至S306,或仅执行其中的部分步骤。
本发明实施例还提供了一种应用热补丁监控方法,如图4所示,包括如下步骤:
S401,用户终端中正运行对资源要求高的程序,例如,联机网络游戏等。
S402,当终端中已安装的第三方应用程序调用dex2oat进行优化升级时,热补丁监控模块被触发。
S403,热补丁监控模块判定第三方应用热补丁程序在进行启动,将判定结果发送至热补丁控制模块。
S404,热补丁控制模块对第三方应用热补丁程序进行控制,以减少对系统的资源消耗。
例如,热补丁控制模块可对第三方应用热补丁程序所请求优化线程数进行调整。具体地,可基于当前的CPU占用率来对所请求优化线程数进行调整,当CPU占用率超过80%时,可将所请求优化线程数减少,直至CPU占用率小于80%。
又例如,热补丁控制模块可对第三方应用热补丁请求的优化模式进行调整,将应用热补丁请求的speed优化模式变更为interpret-only模式,减少对系统的资源消耗。
又例如,热补丁控制模块可将热补丁升级的任务放到后台进程中去做,避免对前台进程造成干扰和影响。
上述的这些控制措施可根据资源的占有情况进行综合运用,直至满足系统的资源要求。
S405,整个过程结束。
本发明实施例,还提供了一种应用热补丁监控装置。该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。
图5是根据本发明实施例的应用热补丁监控装置的结构框图,如图5所示,该装置可以是移动装置,包括热补丁监控模块10和热补丁控制模块20。
热补丁监控模块10用于监控第三方应用的热补丁更新程序在系统中的启动。热补丁控制模块20用于根据系统的当前状态控制所述应用的热补丁更新程序的运行。
为了便于理解本实施的应用热补丁监控装置,下面对热补丁监控模块10和热补丁控制模块20进行详细的描述。
热补丁监控模块10:可通过在手机系统的dex2oat层面,添加热补丁监控模块,该热补丁监控模块内嵌在ART虚拟机内,并根据应用的Dex优化请求触发所述热补丁监控子模块。任何一个应用程序需要进行热补丁升级时,都需要向ART申请执行。当ART收到应用申请,准备执行Dex优化时,热补丁监控模块被触发。当热补丁监控模块被触发时,首先需要提取本次请求Dex优化的应用程序包名,进行判定是否是第三方应用在进行请求,如果是系统应用在进行Dex请求,则不进行任何干预,如果判定是第三方应用程序在进行Dex请示时,将提取出来的包名,Dex策略等发送给热补丁控制模块进行后续处理。
热补丁控制模块20:当热补丁控制模块收到热补丁监控模块发来的信息后,会根据当前的系统状态进行统一控制。统一控制的策略主要包括线程控制、热补丁升级策略控制、CPU分组策略控制等三大控制机制,来保证系统在进行热补丁升级时不受影响。
图6是根据本发明实施例的应用热补丁监控装置的结构框图,如图6所示,该装置除包括图5所示的所有模块外,所述热补丁控制模块20进一步包括第一设置单元21、第二设置单元22和第三设置单元30。
第一设置单元用于设置所述热补丁更新程序所请求的线程并发个数,例如,根据当前CPU占用率调整所述热补丁更新程序所请求的并发线程数。第二设置单元用于设置所述热补丁更新程序所请求的优化参数类型,例如,根据系统资源的占用情况调整所述热补丁更新程序所请求的dex优化模式。第三设置单元,用于设置所述热补丁更新程序执行优化过程的CPU调度策略,例如,将所述热补丁更新程序升级的任务从前台进程调整至后台进程中进行。
需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述各个模块以任意组合的形式分别位于不同的处理器中。
本发明的实施例还提供了一种存储介质,该存储介质中存储有计算机程序,其中,该计算机程序被设置为运行时执行上述实施例中的步骤。
本发明的实施例还提供了一种电子装置,包括存储器和处理器,该存储器中存储有计算机程序,该处理器被设置为运行计算机程序以执行上述实施例中的步骤。
在本发明的上述实施例中,通过对应用热补丁升级过程进行监控和干预,让其对系统的影响降到最低。
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。

Claims (18)

  1. 一种应用热补丁监控方法,其特征在于,包括:
    监控第三方应用的热补丁更新程序在系统中的启动;
    根据系统的当前状态控制所述应用的热补丁更新程序的运行。
  2. 根据权利要求1所述的方法,其特征在于,根据系统的当前状态控制所述应用的热补丁更新程序的运行包括以下至少之一:
    设置所述热补丁更新程序所请求的线程并发个数;
    设置所述热补丁更新程序所请求的优化参数类型;
    设置所述热补丁更新程序执行优化过程的CPU调度策略。
  3. 根据权利要求2所述的方法,其特征在于,设置所述热补丁更新程序的线程并发个数包括:
    根据当前CPU占用率调整所述热补丁更新程序所请求的并发线程数。
  4. 根据权利要求3所述的方法,其特征在于,根据当前CPU占用率调整所述热补丁更新程序所请求的并发线程数包括:
    当所述当前CPU占用率达到预设门限值时,将所述热补丁更新程序所请求的并发线程数减半。
  5. 根据权利要求2所述的方法,其特征在于,设置所述热补丁更新程序所请求的优化参数类型包括:
    根据系统资源的占用情况调整所述热补丁更新程序所请求的Dex优化模式。
  6. 根据权利要求2所述的方法,其特征在于,设置所述热补丁更新程序执行优化过程的CPU调度策略包括:
    将所述热补丁更新程序升级的任务从前台进程调整至后台进程中进行。
  7. 根据权利要求6所述的方法,其特征在于,调整所述热补丁更新程序执行优化过程的CPU调度策略包括,还包括:
    将所述后台进程限制在系统的CPU的小核上运行。
  8. 根据权利要求1所述的方法,其特征在于,监控第三方应用的热补丁更新程序在系统中启动包括:
    根据应用的Dex优化请求判断是否所述第三方应用的热补丁更新程序在启动。
  9. 一种应用热补丁监控装置,其特征在于,包括:
    热补丁监控模块,用于监控第三方应用的热补丁更新程序在系统中的启动;
    热补丁控制模块,用于根据系统的当前状态控制所述应用的热补丁更新程序的运行。
  10. 根据权利要求9所述的装置,其特征在于,所述热补丁监控模块内嵌在系统的ART虚拟机内,根据应用的Dex优化请求触发所述热补丁监控子模块。
  11. 根据权利要求10所述的装置,其特征在于,
    所述热补丁监控模块,还用于判定请求所述Dex优化的应用是否是第三方应用的热补丁更新程序,如果是,则将所述第三方应用的热补丁更新程序包名通知所述热补丁控制模块。
  12. 根据权利要求9所述的装置,其特征在于,热补丁控制模块包括:
    第一设置单元,用于设置所述热补丁更新程序所请求的线程并发个数;
    第二设置单元,用于设置所述热补丁更新程序所请求的优化参数类型;
    第三设置单元,用于设置所述热补丁更新程序执行优化过程的CPU调度策略。
  13. 根据权利要求12所述的装置,其特征在于,
    所述第一设置单元,还用于根据当前CPU占用率调整所述热补丁更新程序所请求的并发线程数。
  14. 根据权利要求12所述的装置,其特征在于,
    所述第二设置单元,还用于根据系统资源的占用情况调整所述热补丁更新程序所请求的Dex优化模式。
  15. 根据权利要求12所述的装置,其特征在于,
    所述第三设置单元,还用于将所述热补丁更新程序升级的任务从前台进程调整至后台进程中进行。
  16. 根据权利要求9至12任一项所述的装置,其特征在于,所述装置为移动终端。
  17. 一种存储介质,其特征在于,所述存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时执行所述权利要求1至8任一项中所述的方法。
  18. 一种电子装置,包括存储器和处理器,其特征在于,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序以执行所述权利要求1至8任一项中所述的方法。
PCT/CN2019/113152 2018-12-03 2019-10-25 应用热补丁监控方法、装置及存储介质 WO2020114142A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811466929.8A CN111258841A (zh) 2018-12-03 2018-12-03 应用热补丁监控方法及装置
CN201811466929.8 2018-12-03

Publications (1)

Publication Number Publication Date
WO2020114142A1 true WO2020114142A1 (zh) 2020-06-11

Family

ID=70944995

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/113152 WO2020114142A1 (zh) 2018-12-03 2019-10-25 应用热补丁监控方法、装置及存储介质

Country Status (2)

Country Link
CN (1) CN111258841A (zh)
WO (1) WO2020114142A1 (zh)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104111877A (zh) * 2014-07-29 2014-10-22 广东能龙教育股份有限公司 一种基于线程调配引擎的线程资源动态调配系统和方法
CN104834565A (zh) * 2014-02-12 2015-08-12 华为技术有限公司 一种系统服务动态部署方法及装置
CN108388431A (zh) * 2018-02-13 2018-08-10 广东欧珀移动通信有限公司 应用程序热更新的控制方法、装置、存储介质及移动终端

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7845006B2 (en) * 2007-01-23 2010-11-30 International Business Machines Corporation Mitigating malicious exploitation of a vulnerability in a software application by selectively trapping execution along a code path
CN100591052C (zh) * 2007-04-25 2010-02-17 华为技术有限公司 流量控制的方法和业务处理系统
CN103885808A (zh) * 2014-04-08 2014-06-25 北京奇虎科技有限公司 热补丁处理方法及装置
CN107817984A (zh) * 2016-09-13 2018-03-20 高德信息技术有限公司 一种热补丁加载方法及装置
CN108334440A (zh) * 2017-01-19 2018-07-27 阿里巴巴集团控股有限公司 一种获取应用性能测试结果的处理方法及装置、客户端
EP3637251B1 (en) * 2017-05-17 2023-10-04 Huawei Technologies Co., Ltd. Method, device and terminal for executing hotpatch
CN107332997B (zh) * 2017-07-03 2020-05-19 奇酷互联网络科技(深圳)有限公司 减少终端发热的方法、装置、移动终端及存储介质
CN107391259B (zh) * 2017-07-25 2020-12-01 Oppo广东移动通信有限公司 资源处理方法和装置、计算机可读存储介质、移动终端
CN107861730B (zh) * 2017-10-27 2020-10-30 维沃移动通信有限公司 一种应用程序的处理方法及移动终端

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104834565A (zh) * 2014-02-12 2015-08-12 华为技术有限公司 一种系统服务动态部署方法及装置
CN104111877A (zh) * 2014-07-29 2014-10-22 广东能龙教育股份有限公司 一种基于线程调配引擎的线程资源动态调配系统和方法
CN108388431A (zh) * 2018-02-13 2018-08-10 广东欧珀移动通信有限公司 应用程序热更新的控制方法、装置、存储介质及移动终端

Also Published As

Publication number Publication date
CN111258841A (zh) 2020-06-09

Similar Documents

Publication Publication Date Title
US11316800B2 (en) Method and system for managing applications
US10613883B2 (en) Managing virtual machine migration
US10768960B2 (en) Method for affinity binding of interrupt of virtual network interface card, and computer device
US9100854B2 (en) Quality of service application controller and user equipment application profiler
US11314309B2 (en) Electronic device control method and apparatus, and electronic device
RU2683629C2 (ru) Способ и устройство изменения ресурса виртуальной вычислительной машины и устройство для функционирования виртуальной сети передачи данных
DE102012109956A1 (de) Aktualisieren von Firmware in einer hybriden Computerumgebung
US20230054174A1 (en) Preloading of applications and in-application content in user devices
WO2016019725A1 (zh) 一种软件升级管理方法、设备、系统及计算机存储介质
CN105653934B (zh) 移动终端及其应用保护方法
US20200351155A1 (en) Base station configuration method and apparatus
US20200288403A1 (en) Smart power saving method for terminal, terminal, and device having memory function
CN112463367A (zh) 一种存储系统性能优化方法、系统及电子设备和存储介质
WO2019184526A1 (zh) 机顶盒功耗控制方法及系统
CN112783605B (zh) 虚拟机的热迁移方法、装置、设备及存储介质
US8612780B2 (en) Method and apparatus for modifying power management configuration of a computer to accommodate a packet processing latency policy associated with a pattern
WO2020114142A1 (zh) 应用热补丁监控方法、装置及存储介质
US11429435B1 (en) Distributed execution budget management system
US10042414B2 (en) Concurrent network application scheduling for reduced power consumption
CN117319376A (zh) 文件下载控制方法、装置、电子设备及存储介质
CN114327671A (zh) 参数配置方法、装置、设备及存储介质
EP3812902B1 (en) Method for controlling memory resources in an electronic device, device for controlling memory resources, electronic device and computer program
US20230297395A1 (en) Parameter Configuration Method, Apparatus, and System
CN117891628B (zh) 一种云管平台长时间任务执行结果跟踪方法及系统
CN114489824A (zh) 一种快速启动的控制方法、装置及电子设备

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 19.10.2021)

122 Ep: pct application non-entry in european phase

Ref document number: 19892644

Country of ref document: EP

Kind code of ref document: A1