Movatterモバイル変換


[0]ホーム

URL:


CN106775828A - Application program installation method and device, computer equipment - Google Patents

Application program installation method and device, computer equipment
Download PDF

Info

Publication number
CN106775828A
CN106775828ACN201611051948.5ACN201611051948ACN106775828ACN 106775828 ACN106775828 ACN 106775828ACN 201611051948 ACN201611051948 ACN 201611051948ACN 106775828 ACN106775828 ACN 106775828A
Authority
CN
China
Prior art keywords
installation
application program
terminal
application
installation environment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201611051948.5A
Other languages
Chinese (zh)
Other versions
CN106775828B (en
Inventor
帅朝春
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp LtdfiledCriticalGuangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201611051948.5ApriorityCriticalpatent/CN106775828B/en
Publication of CN106775828ApublicationCriticalpatent/CN106775828A/en
Application grantedgrantedCritical
Publication of CN106775828BpublicationCriticalpatent/CN106775828B/en
Expired - Fee Relatedlegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

Translated fromChinese

本发明提供一种应用程序安装方法及装置、计算机设备。该应用程序安装方法包括:当检测到终端安装应用程序时,判断所述应用程序是否处于后台安装;若所述应用程序处于后台安装,获取当前所述终端的安装环境参数;根据所述安装环境参数确定所述终端的安装环境参数等级;根据预设规则配置与所述安装环境参数等级相对应的硬件资源进行应用程序安装。该应用程序安装方法可以在应用程序处于后台安装的情况下,根据当前终端的安装环境参数来合理配置安装该应用程序的硬件资源,避免安装应用程序占用过多硬件资源。

The invention provides an application program installation method and device, and computer equipment. The method for installing an application program includes: when detecting that an application program is installed on a terminal, judging whether the application program is installed in the background; if the application program is installed in the background, obtaining the current installation environment parameters of the terminal; according to the installation environment The parameter determines the parameter level of the installation environment of the terminal; and the hardware resources corresponding to the parameter level of the installation environment are configured according to preset rules to install the application program. The method for installing the application program can rationally configure the hardware resources for installing the application program according to the installation environment parameters of the current terminal when the application program is installed in the background, so as to prevent the installation of the application program from occupying too many hardware resources.

Description

Translated fromChinese
应用程序安装方法及装置、计算机设备Application program installation method and device, computer equipment

技术领域technical field

本发明涉及通信技术领域,特别是涉及一种应用程序安装方法及装置、计算机设备。The present invention relates to the field of communication technology, in particular to an application program installation method and device, and computer equipment.

背景技术Background technique

目前安装应用程序时,用户往往会选择从软件商店等平台进行下载安装,尤其是当批量安装应用程序时,由于安装应用程序耗时较长,用户往往会选择后台安装应用程序。在后台安装应用程序的过程中,用户可以使用已经安装好的其他应用程序来消磨时间。然而,安装应用程序的过程对中央处理器占用率较大,对内存占用较多,这就导致留给运行其他应用程序的中央处理器、可用内存等硬件资源较少,使得运行其他应用程序时容易出现卡顿、运行不流畅等问题。At present, when installing applications, users often choose to download and install applications from platforms such as software stores. Especially when installing applications in batches, users often choose to install applications in the background because it takes a long time to install applications. While the app is installed in the background, the user can use other apps already installed to kill time. However, the process of installing the application program occupies a large CPU and memory, which leads to less hardware resources such as the CPU and available memory for running other applications, so that when other applications are running It is prone to problems such as stuttering and unsmooth operation.

发明内容Contents of the invention

本发明实施例提供一种应用程序安装方法及装置、计算机设备;可以解决应用程序安装过程中使用其他应用程序出现卡顿、运行不流畅等技术问题。Embodiments of the present invention provide an application program installation method and device, and computer equipment, which can solve technical problems such as freezes and unsmooth operation when using other application programs during the application program installation process.

本发明提供一种应用程序安装方法,其包括:The present invention provides an application program installation method, which includes:

当检测到终端安装应用程序时,判断所述应用程序是否处于后台安装;When it is detected that the terminal installs the application program, it is judged whether the application program is installed in the background;

若所述应用程序处于后台安装,获取当前所述终端的安装环境参数;If the application program is installed in the background, obtain the current installation environment parameters of the terminal;

根据所述安装环境参数确定所述终端的安装环境参数等级;determining the installation environment parameter level of the terminal according to the installation environment parameter;

根据预设规则配置与所述安装环境参数等级相对应的硬件资源进行应用程序安装。Configuring hardware resources corresponding to the installation environment parameter level according to preset rules to install the application program.

本发明还提供一种应用程序安装装置,其包括:The present invention also provides an application program installation device, which includes:

第一判断模块,用于当检测到终端安装应用程序时,判断所述应用程序是否处于后台安装;The first judging module is used for judging whether the application is installed in the background when it is detected that the terminal is installed;

获取模块,用于若所述应用程序处于后台安装,获取当前所述终端的安装环境参数;An acquisition module, configured to acquire current installation environment parameters of the terminal if the application is installed in the background;

确定模块,用于根据所述安装环境参数确定所述终端的安装环境参数等级;A determining module, configured to determine the installation environment parameter level of the terminal according to the installation environment parameter;

配置安装模块,用于根据预设规则配置与所述安装环境参数等级相对应的硬件资源进行应用程序安装。The configuration installation module is configured to configure hardware resources corresponding to the parameter level of the installation environment according to preset rules for application installation.

本发明又提供一种计算机设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现本发明提供的任一种所述的应用程序安装方法。The present invention further provides a computer device, including a memory, a processor, and a computer program stored on the memory and operable on the processor, when the processor executes the computer program, any of the tasks provided by the present invention can be realized. A described application program installation method.

本发明提供一种应用程序安装方法及装置、计算机设备。该应用程序安装方法通过当检测到终端安装应用程序时,判断所述应用程序是否处于后台安装;若所述应用程序处于后台安装,获取当前所述终端的安装环境参数;根据所述安装环境参数确定所述终端的安装环境参数等级;根据预设规则配置与所述安装环境参数等级相对应的硬件资源进行应用程序安装。该应用程序安装方法可以在应用程序处于后台安装的情况下,根据当前终端的安装环境参数来合理配置安装该应用程序的硬件资源,避免安装应用程序占用过多硬件资源而导致运行其他应用程序不畅的问题发生。The invention provides an application program installation method and device, and computer equipment. The method for installing an application program determines whether the application program is installed in the background when it is detected that the application program is installed on the terminal; if the application program is installed in the background, obtain the current installation environment parameters of the terminal; according to the installation environment parameters Determining the installation environment parameter level of the terminal; configuring hardware resources corresponding to the installation environment parameter level according to preset rules to install the application program. The application program installation method can reasonably configure the hardware resources for installing the application program according to the installation environment parameters of the current terminal when the application program is installed in the background, so as to prevent the installation of the application program from occupying too many hardware resources and cause other applications to run incorrectly. smooth problems occur.

附图说明Description of drawings

图1为本发明优选实施例的应用程序安装方法的流程图。Fig. 1 is a flowchart of an application program installation method in a preferred embodiment of the present invention.

图2为本发明优选实施例的应用程序安装方法的又一流程图。Fig. 2 is another flow chart of the application program installation method in the preferred embodiment of the present invention.

图3为本发明优选实施例的应用程序安装装置的结构示意图。Fig. 3 is a schematic structural diagram of an application program installation device in a preferred embodiment of the present invention.

图4为本发明优选实施例的应用程序安装装置的又一结构示意图。Fig. 4 is another schematic structural diagram of the application program installation device in the preferred embodiment of the present invention.

图5为本发明优选实施例的移动终端的结构示意图。Fig. 5 is a schematic structural diagram of a mobile terminal according to a preferred embodiment of the present invention.

具体实施方式detailed description

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts fall within the protection scope of the present invention.

本发明中的术语“第一”、“第二”等可在本文中用于描述各种元件,但这些元件不受这些术语限制。这些术语仅用于将第一个元件与另一个元件区分。例如,在不脱离本发明的范围的情况下,可以将第一控件称为第二控件,且类似地,可将第二控件称为第一控件。第一控件与第二控件两者都是控件,但其不是同一控件。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。The terms 'first', 'second', etc. in the present invention may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another element. For example, a first control could be termed a second control, and, similarly, a second control could be termed a first control, without departing from the scope of the present invention. Both the first control and the second control are controls, but they are not the same control. Furthermore, the terms "include" and "have", as well as any variations thereof, are intended to cover a non-exclusive inclusion.

请参照图1,图1为本发明优选实施例的应用程序安装方法的流程图。本优选实施例中的应用程序安装方法可以应用于手持式或膝上型设备、移动电话、个人数字助理(PDA)等电子设备上,在此不做具体限制。Please refer to FIG. 1 , which is a flowchart of an application program installation method in a preferred embodiment of the present invention. The method for installing application programs in this preferred embodiment can be applied to electronic devices such as handheld or laptop devices, mobile phones, and personal digital assistants (PDAs), and there is no specific limitation here.

本优选实施例提供的应用程序安装方法包括:The application installation method provided in this preferred embodiment includes:

步骤S101:当检测到终端安装应用程序时,判断所述应用程序是否处于后台安装;Step S101: When it is detected that the application program is installed on the terminal, determine whether the application program is installed in the background;

目前用户需要安装某个应用程序或者更新某个应用程序时,可以在终端内的应用安装源上进行。这里应用安装源可以为软件商店等用于提供下载各种应用程序的应用平台。用户可以在应用安装源中查找到想要安装的应用程序或者得知存在更新版本的应用程序,并进行安装新的应用程序或者更新应用程序等操作。At present, when a user needs to install or update a certain application program, it can be performed on the application installation source in the terminal. Here, the application installation source may be an application platform for downloading various application programs, such as a software store. The user may find the desired application program in the application installation source or know that there is a newer version of the application program, and perform operations such as installing a new application program or updating the application program.

当终端检测到正在安装应用程序时,终端将判断当前应用程序是否处于后台安装。在此,终端检测到正在安装应用程序包括检测到正在安装某个新应用程序或者正在更新终端内的某个应用程序。When the terminal detects that an application is being installed, the terminal will determine whether the current application is being installed in the background. Here, the terminal detecting that an application program is being installed includes detecting that a certain new application program is being installed or a certain application program in the terminal is being updated.

在一优选实施例中,判断应用程序是否处于后台安装,包括:判断当前用户正在使用的应用程序是否为所述应用安装源。若终端判断出当前用户正在使用的应用程序不为所述应用程序安装源,则说明终端用户在运行其他已经安装的应用程序,此时终端判定所述应用程序处于后台安装。In a preferred embodiment, determining whether the application program is installed in the background includes: determining whether the application program currently being used by the user is the application installation source. If the terminal determines that the application being used by the current user is not the application installation source, it means that the terminal user is running other installed applications, and at this time the terminal determines that the application is installed in the background.

例如,终端用户在软件商店点击下载QQ应用程序后,又打开微信应用程序进行聊天等操作。那么终端在检测到QQ应用程序安装时,终端将会判断出当前用户正在使用的应用程序不是软件商店,即此时判定QQ应用程序处于后台安装。For example, after the end user clicks to download the QQ application in the software store, he opens the WeChat application to perform chatting and other operations. Then, when the terminal detects that the QQ application program is installed, the terminal will determine that the application program currently being used by the user is not a software store, that is, it will determine that the QQ application program is installed in the background at this time.

步骤S102:若所述应用程序处于后台安装,获取当前所述终端的安装环境参数;Step S102: If the application program is installed in the background, obtain the current installation environment parameters of the terminal;

当终端判断出应用程序处于后台安装时,说明终端用户并未守着该应用程序的安装过程。为了不影响终端用户使用其他应用程序,终端将获取终端的安装环境参数。其中,安装环境参数指终端当前各个硬件使用情况。When the terminal determines that the application program is being installed in the background, it means that the terminal user is not watching the installation process of the application program. In order not to affect the terminal user's use of other applications, the terminal will obtain the terminal's installation environment parameters. Wherein, the installation environment parameter refers to the current usage of each hardware of the terminal.

在一优选实施例中,安装环境参数包括终端当前中央处理器占用率和可用内存大小。在其他优选实施例中,安装环境参数还可以为终端其他硬件参数,在此不做具体限制。当安装环境参数为中央处理器占用率和可用内存大小时,获取当前终端的安装环境参数,具体包括:获取当前终端的中央处理器占用率和可用内存大小。In a preferred embodiment, the installation environment parameters include the terminal's current CPU usage and available memory size. In other preferred embodiments, the installation environment parameters may also be other hardware parameters of the terminal, which are not specifically limited here. When the installation environment parameters are CPU occupancy rate and available memory size, the installation environment parameters of the current terminal are obtained, specifically including: obtaining the CPU occupancy rate and available memory size of the current terminal.

步骤S103:根据所述安装环境参数确定所述终端的安装环境参数等级;Step S103: Determine the installation environment parameter level of the terminal according to the installation environment parameters;

在一优选实施例中,当安装环境参数包括中央处理器占用率和可用内存大小两个安装环境参数时,根据安装环境参数确定终端的安装环境参数等级,包括:根据中央处理器占用率和可用内存大小确定终端的安装环境参数等级。另外,该优选实施例中,安装环境参数与安装环境参数等级的对应关系为:当中央处理器占用率小于等于50%,且可用内存大小大于等于500MB时,确定终端当前的安装环境参数等级为一级,即安装环境很好;当中央处理器占用率大于50%且小于70%,或者可用内存大小大于200MB且小于500MB时,确定终端当前的安装环境参数等级为二级,即安装环境良好;当中央处理器占用率大于等于70%,或者可用内存大小小于等于200MB时,确定终端当前的安装环境参数等级为三级,即安装环境较差。In a preferred embodiment, when the installation environment parameters include CPU occupancy rate and available memory size, determining the installation environment parameter level of the terminal according to the installation environment parameters includes: according to the CPU occupancy rate and available memory size The size of the memory determines the level of the terminal's installation environment parameters. In addition, in this preferred embodiment, the corresponding relationship between the installation environment parameters and the installation environment parameter levels is: when the CPU occupancy rate is less than or equal to 50%, and the available memory size is greater than or equal to 500MB, it is determined that the current installation environment parameter level of the terminal is Level 1, that is, the installation environment is very good; when the CPU usage is greater than 50% and less than 70%, or the available memory size is greater than 200MB and less than 500MB, determine that the current installation environment parameter level of the terminal is Level 2, that is, the installation environment is good ; When the CPU occupancy rate is greater than or equal to 70%, or the available memory size is less than or equal to 200MB, determine that the current installation environment parameter level of the terminal is level three, that is, the installation environment is poor.

需要说明的是,安装环境参数与安装环境参数等级的对应关系不局限于上述情况,可以根据实际终端硬件配置情况进行修改。同时,安装环境参数等级也不局限与上述三个等级,可以为更多或者更少等级,在此不做具体限制。It should be noted that the corresponding relationship between the installation environment parameters and the installation environment parameter levels is not limited to the above situation, and can be modified according to the actual terminal hardware configuration. At the same time, the installation environment parameter grades are not limited to the above three grades, and may be more or less grades, which are not specifically limited here.

步骤S104:根据预设规则配置与所述安装环境参数等级相对应的硬件资源进行应用程序安装。Step S104: Configuring hardware resources corresponding to the installation environment parameter level according to preset rules to install the application program.

当终端确定当前的安装环境参数等级后,将根据预设规则配置硬件资源,并进行应用程序安装。在此,硬件资源包括中央处理器的内核数量。也就是说,终端将根据预设规则配置与安装环境参数等级相对应的中央处理器的内核数量,并进行应用程序安装。After the terminal determines the current installation environment parameter level, it will configure hardware resources according to preset rules, and perform application installation. Here, the hardware resources include the number of cores of the central processing unit. That is to say, the terminal will configure the number of cores of the central processing unit corresponding to the level of the installation environment parameters according to preset rules, and install the application program.

在一优选实施例中,当终端的中央处理器的内核数量为八个时,预设规则为:当安装环境参数等级为一级时,配置八个内核进行应用程序安装;当安装环境参数等级为二级时,配置四个内核进行应用程序安装;当安装环境参数等级为三级时,配置二个内核进行应用程序安装。In a preferred embodiment, when the number of cores of the central processing unit of the terminal is eight, the preset rule is: when the installation environment parameter level is one, configure eight cores for application installation; when the installation environment parameter level When it is Level 2, configure four cores for application installation; when the installation environment parameter level is Level 3, configure two cores for application installation.

这样,当安装环境参数等级为一级时,说明此时终端用户未使用其他应用程序,或者正在运行的应用程序所占中央处理器较少,内存占用也较少。此时终端可以分配较多的内核和可用内存用于应用程序的安装过程,从而可以快速地完成对该应用程序的安装操作。当终端用户在使用占用内存较大或者占用中央处理器内核较多的其他应用程序时,为了不影响正在运行的应用程序的正常使用,终端将采用四个内核或者二个内核对应用程序进行安装,这样可以优化终端的硬件资源分配情况,避免正在运行的应用程序出现卡顿等现象。In this way, when the installation environment parameter level is Level 1, it means that the end user is not using other applications at this time, or the running application occupies less central processing unit and less memory. At this time, the terminal can allocate more cores and available memory for the installation process of the application program, so that the installation operation of the application program can be completed quickly. When the end user is using other applications that occupy a large amount of memory or CPU cores, in order not to affect the normal use of the running application, the terminal will use four cores or two cores to install the application , so as to optimize the allocation of hardware resources of the terminal and avoid phenomena such as freezing of running applications.

本优选实施例提供一种应用程序安装方法,其通过在检测到终端安装应用程序时,判断应用程序是否处于后台安装;若应用程序处于后台安装,获取当前终端的安装环境参数;根据安装环境参数确定终端的安装环境参数等级;根据预设规则配置与安装环境参数等级相对应的硬件资源进行应用程序安装。该应用程序安装方法可以在应用程序处于后台安装的情况下,根据当前终端的安装环境参数来合理配置安装该应用程序的硬件资源,避免安装应用程序占用过多硬件资源而导致前台运行其他应用程序不畅的问题发生。This preferred embodiment provides a method for installing an application program, which determines whether the application program is installed in the background when it is detected that the application program is installed on the terminal; if the application program is installed in the background, obtain the installation environment parameters of the current terminal; according to the installation environment parameters Determine the installation environment parameter level of the terminal; configure hardware resources corresponding to the installation environment parameter level according to preset rules to install the application program. The application installation method can rationally configure the hardware resources for installing the application according to the installation environment parameters of the current terminal when the application is installed in the background, so as to prevent the installation of the application from occupying too many hardware resources and causing other applications to run in the foreground Unsmooth problems occur.

请参照图2,图2为本发明优选实施例应用程序安装方法的又一流程图。本优选实施例中的应用程序安装方法可以应用于手持式或膝上型设备、移动电话、个人数字助理(PDA)等电子设备上,在此不做具体限制。Please refer to FIG. 2 . FIG. 2 is another flow chart of an application program installation method in a preferred embodiment of the present invention. The method for installing application programs in this preferred embodiment can be applied to electronic devices such as handheld or laptop devices, mobile phones, and personal digital assistants (PDAs), and there is no specific limitation here.

本优选实施例提供的应用程序安装方法包括:The application installation method provided in this preferred embodiment includes:

步骤S201:当检测到终端安装应用程序时,判断所述应用程序是否处于后台安装;Step S201: When it is detected that the terminal is installing an application, determine whether the application is installed in the background;

在本优选实施例中,在应用程序更新过程或者安装新的应用程序的过程中,往往需要将安装包中的dex格式文件编译为oat格式文件操作,而该过程需要占用较多的中央处理器内核和内存,而且耗时较长。为了不影响终端用户在这段时间内正常使用其他应用程序,需要对dex格式文件编译为oat格式文件操作过程中终端的硬件资源进行合理的分配。这样相对于对整个安装应用程序过程进行硬件资源优化而言,本优选实施例对dex格式文件编译为oat格式文件的过程进行硬件资源优化,使得整个应用程序安装耗时更短。需要说明的是,dex格式文件为安装包中的classes.dex文件;oat格式文件是包含了dex格式文件内容以及从dex格式文件编译而来的本地机器指令。In this preferred embodiment, in the process of updating the application program or installing a new application program, it is often necessary to compile the dex format file in the installation package into an oat format file operation, and this process needs to occupy more central processing units core and memory, and it takes a long time. In order not to affect the normal use of other applications by end users during this period, it is necessary to reasonably allocate the hardware resources of the terminal during the operation of compiling dex format files into oat format files. In this way, compared with optimizing hardware resources for the entire application installation process, this preferred embodiment optimizes hardware resources for the process of compiling a dex format file into an oat format file, so that the entire application installation time is shorter. It should be noted that the dex format file is the classes.dex file in the installation package; the oat format file contains the content of the dex format file and the local machine instructions compiled from the dex format file.

因此,本优选实施例中的检测到终端安装应用程序具体指:检测到安装应用程序过程中执行dex格式文件编译为oat格式文件操作。也就是说,当检测到安装应用程序过程中执行dex格式文件编译为oat格式文件操作时,终端将判断应用程序是否处于后台操作。Therefore, in this preferred embodiment, the detection of terminal installation of the application program specifically refers to: the operation of compiling the dex format file into the oat format file during the process of detecting the installation of the application program. That is to say, when it is detected that the dex format file is compiled into an oat format file during the installation of the application program, the terminal will determine whether the application program is operating in the background.

在一优选实施例中,判断应用程序是否处于后台安装,具体包括:判断当前用户正在使用的应用程序是否为应用安装源。这里应用安装源可以为软件商店等用于提供下载各种应用程序的应用平台。用户可以在应用安装源中查找到想要安装的应用程序或者得知存在更新版本的应用程序,并进行安装新的应用程序或者更新应用程序等操作。In a preferred embodiment, determining whether the application program is installed in the background specifically includes: determining whether the application program currently being used by the user is an application installation source. Here, the application installation source may be an application platform for downloading various application programs, such as a software store. The user may find the desired application program in the application installation source or know that there is a newer version of the application program, and perform operations such as installing a new application program or updating the application program.

若终端判断出当前用户正在使用的应用程序不为该应用程序安装源,则说明终端用户在运行其他已经安装的应用程序,此时终端判定所述应用程序处于后台安装,此时终端将执行步骤S202。若终端判断出当前用户正在使用的应用程序为所述应用程序安装源,则终端判定应用程序处于前台安装,此时需执行步骤S205。If the terminal determines that the application being used by the current user is not the installation source of the application, it means that the terminal user is running other installed applications. At this time, the terminal determines that the application is installed in the background. At this time, the terminal will perform the steps S202. If the terminal determines that the application currently being used by the user is the application installation source, the terminal determines that the application is installed in the foreground, and step S205 needs to be performed at this time.

步骤S202:获取当前所述终端的安装环境参数;Step S202: Obtain the installation environment parameters of the current terminal;

当终端判断出应用程序处于后台安装时,说明终端用户并未守着该应用程序的安装过程。为了不影响终端用户正常使用其他应用程序,终端将获取终端的安装环境参数。其中,安装环境参数指终端当前各个硬件使用情况。When the terminal determines that the application program is being installed in the background, it means that the terminal user is not watching the installation process of the application program. In order not to affect the terminal user's normal use of other applications, the terminal will obtain the terminal's installation environment parameters. Wherein, the installation environment parameter refers to the current usage of each hardware of the terminal.

在一优选实施例中,安装环境参数包括终端当前中央处理器占用率和可用内存大小。在其他优选实施例中,安装环境参数还可以为其他终端硬件参数,在此不做具体限制。当安装环境参数为中央处理器占用率和可用内存大小时,获取当前终端的安装环境参数,具体包括:获取当前终端的中央处理器占用率和可用内存大小。In a preferred embodiment, the installation environment parameters include the terminal's current CPU usage and available memory size. In other preferred embodiments, the installation environment parameters may also be other terminal hardware parameters, which are not specifically limited here. When the installation environment parameters are CPU occupancy rate and available memory size, the installation environment parameters of the current terminal are obtained, specifically including: obtaining the CPU occupancy rate and available memory size of the current terminal.

步骤S203:根据所述安装环境参数确定所述终端的安装环境参数等级;Step S203: Determine the installation environment parameter level of the terminal according to the installation environment parameters;

在一优选实施例中,当安装环境参数包括中央处理器占用率和可用内存大小两个安装环境参数时,根据安装环境参数确定终端的安装环境参数等级,具体包括:根据中央处理器占用率和可用内存大小确定终端的安装环境参数等级。另外,该优选实施例中,安装环境参数与安装环境参数等级的对应关系为:当中央处理器占用率小于等于50%,且可用内存大小大于等于500MB时,确定终端当前的安装环境参数等级为一级,即安装环境很好;当中央处理器占用率大于50%且小于70%,或者可用内存大小大于200MB且小于500MB时,确定终端当前的安装环境参数等级为二级,即安装环境良好;当中央处理器占用率大于等于70%,或者可用内存大小小于等于200MB时,确定终端当前的安装环境参数等级为三级,即安装环境较差。In a preferred embodiment, when the installation environment parameters include two installation environment parameters of the CPU occupancy rate and the available memory size, determining the installation environment parameter level of the terminal according to the installation environment parameters, specifically includes: according to the CPU occupancy rate and The available memory size determines the terminal's installation environment parameter level. In addition, in this preferred embodiment, the corresponding relationship between the installation environment parameters and the installation environment parameter levels is: when the CPU occupancy rate is less than or equal to 50%, and the available memory size is greater than or equal to 500MB, it is determined that the current installation environment parameter level of the terminal is Level 1, that is, the installation environment is very good; when the CPU usage is greater than 50% and less than 70%, or the available memory size is greater than 200MB and less than 500MB, determine that the current installation environment parameter level of the terminal is Level 2, that is, the installation environment is good ; When the CPU occupancy rate is greater than or equal to 70%, or the available memory size is less than or equal to 200MB, determine that the current installation environment parameter level of the terminal is level three, that is, the installation environment is poor.

需要说明的是,安装环境参数与安装环境参数等级的对应关系不局限于上述情况,可以根据实际终端硬件配置情况进行修改。同时,安装环境参数等级也不局限与上述三个等级,可以为更多或者更少等级,在此不做具体限制。It should be noted that the corresponding relationship between the installation environment parameters and the installation environment parameter levels is not limited to the above situation, and can be modified according to the actual terminal hardware configuration. At the same time, the installation environment parameter grades are not limited to the above three grades, and may be more or less grades, which are not specifically limited here.

步骤S204:根据预设规则配置与所述安装环境参数等级相对应的硬件资源进行应用程序安装。Step S204: Configuring hardware resources corresponding to the installation environment parameter levels according to preset rules for application installation.

当终端确定当前的安装环境参数等级后,将根据预设规则配置硬件资源,并将dex格式文件编译为oat格式文件。在此,硬件资源包括中央处理器的内核数量。也就是说,终端将根据预设规则配置与安装环境参数等级相对应的中央处理器的内核数量,并将dex格式文件编译为oat格式文件。After the terminal determines the current installation environment parameter level, it will configure hardware resources according to preset rules, and compile the dex format file into an oat format file. Here, the hardware resources include the number of cores of the central processing unit. That is to say, the terminal will configure the number of cores of the central processing unit corresponding to the installation environment parameter level according to preset rules, and compile the dex format file into an oat format file.

在一优选实施例中,当终端的中央处理器的内核数量为八个时,预设规则为:当安装环境参数等级为一级时,配置八个内核将dex格式文件编译为oat格式文件;当安装环境参数等级为二级时,配置四个内核将dex格式文件编译为oat格式文件;当安装环境参数等级为三级时,配置二个内核将dex格式文件编译为oat格式文件。In a preferred embodiment, when the number of cores of the central processing unit of the terminal is eight, the preset rule is: when the installation environment parameter level is level one, configure eight cores to compile the dex format file into an oat format file; When the installation environment parameter level is level 2, configure four cores to compile dex format files into oat format files; when the installation environment parameter level is level 3, configure two cores to compile dex format files into oat format files.

这样,当安装环境参数等级为一级时,说明此时终端用户未使用其他应用程序,或者正在运行的应用程序所占中央处理器较少,内存占用也较少。此时终端可以分配较多的内核和可用内存用于将dex格式文件编译为oat格式文件过程,从而可以快速地完成对该应用程序的安装操作。当终端用户在使用占用内存较大或者占用中央处理器内核较多的其他应用程序时,为了不影响正在运行的应用程序的正常使用,终端将采用四个内核或者二个内核将dex格式文件编译为oat格式文件,这样可以优化终端的硬件资源分配情况,避免正在运行的应用程序出现卡顿等现象。In this way, when the installation environment parameter level is Level 1, it means that the end user is not using other applications at this time, or the running application occupies less central processing unit and less memory. At this time, the terminal can allocate more cores and available memory for the process of compiling the dex format file into the oat format file, so that the installation operation of the application program can be quickly completed. When the end user is using other applications that occupy a large amount of memory or occupy more CPU cores, in order not to affect the normal use of the running application, the terminal will use four cores or two cores to compile the dex format file It is an oat format file, which can optimize the hardware resource allocation of the terminal and avoid the phenomenon of running applications such as freezing.

步骤S205:判断终端用户是否对应用安装源进行操作,其中,所述应用安装源用于下载所述应用程序;Step S205: Determine whether the terminal user operates the application installation source, wherein the application installation source is used to download the application program;

当终端判断出应用程序未处于后台安装时,说明终端正显示应用安装源界面,即应用安装源处于前台运行状态。若终端用户并未对应用安装源进行任何操作,说明终端用户正在等待应用程序安装完成,此时终端将直接正常安装即可。若终端用户此时对应用安装源内的其它应用程序进行操作时,例如卸载某个应用程序、浏览应用安装源内推荐的其他应用程序等。为了不影响用户对应用安装源的操作,终端需要在将dex格式文件编译为oat格式文件过程中对硬件资源进行合理分配。When the terminal determines that the application program is not being installed in the background, it means that the terminal is displaying the application installation source interface, that is, the application installation source is running in the foreground. If the end user does not perform any operations on the application installation source, it means that the end user is waiting for the application to be installed, and the terminal will directly install it normally. If the end user operates other applications in the application installation source at this time, such as uninstalling an application, browsing other recommended applications in the application installation source, and so on. In order not to affect the user's operation of the application installation source, the terminal needs to allocate hardware resources reasonably during the process of compiling the dex format file into the oat format file.

因此,在本优选实施例中,终端需要判断终端用户是否对应用安装源进行操作,若终端判断出终端用户此时对应用安装源进行操作,则将执行步骤S202。Therefore, in this preferred embodiment, the terminal needs to determine whether the terminal user operates the application installation source, and if the terminal determines that the terminal user operates the application installation source at this time, step S202 will be performed.

本优选实施例提供一种应用程序安装方法,其可以在应用程序处于后台安装的情况下,根据预设规则配置与安装环境参数等级相对应的硬件资源进行应用程序安装,同时也可以在应用程序处于前台安装且终端用户正在对应用安装源进行操作的情况下,根据预设规则配置与安装环境参数等级相对应的硬件资源进行应用程序安装,可以更加有效地避免安装应用程序占用过多硬件资源而导致运行其他应用程序不畅的问题发生。This preferred embodiment provides an application program installation method, which can configure hardware resources corresponding to the installation environment parameter level according to preset rules to perform application program installation when the application program is installed in the background. When the installation is in the foreground and the end user is operating the application installation source, the hardware resources corresponding to the installation environment parameter level are configured according to the preset rules to install the application, which can more effectively prevent the installation of the application from occupying too many hardware resources And the problems that lead to running other applications not running smoothly occur.

请参照图3,图3为本发明优选实施例的应用程序安装装置的结构示意图。本优选实施例中的应用程序安装装置300可以应用于手持式或膝上型设备、移动电话、个人数字助理(PDA)等电子设备上,在此不做具体限制。Please refer to FIG. 3 . FIG. 3 is a schematic structural diagram of an application installation device according to a preferred embodiment of the present invention. The application program installation apparatus 300 in this preferred embodiment can be applied to electronic devices such as handheld or laptop devices, mobile phones, personal digital assistants (PDAs), and is not specifically limited here.

本优选实施例提供的应用程序安装装置300包括:第一判断模块301、获取模块302、确定模块303和配置安装模块304。其中,第一判断模块301用于当检测到终端安装应用程序时,判断所述应用程序是否处于后台安装;获取模块302用于若所述应用程序处于后台安装,获取当前所述终端的安装环境参数;确定模块303用于根据所述安装环境参数确定所述终端的安装环境参数等级;配置安装模块304用于根据预设规则配置与所述安装环境参数等级相对应的硬件资源进行应用程序安装。The application program installation apparatus 300 provided in this preferred embodiment includes: a first judgment module 301 , an acquisition module 302 , a determination module 303 and a configuration installation module 304 . Wherein, the first judging module 301 is used to judge whether the application program is installed in the background when it is detected that the terminal is installed; the obtaining module 302 is used to obtain the current installation environment of the terminal if the application program is installed in the background parameter; the determination module 303 is used to determine the installation environment parameter level of the terminal according to the installation environment parameter; the configuration installation module 304 is used to configure hardware resources corresponding to the installation environment parameter level according to preset rules for application installation .

下面将对本优选实施例中的应用程序安装装置300进行详细地说明。The application installation device 300 in this preferred embodiment will be described in detail below.

目前用户需要安装某个应用程序或者更新某个应用程序时,可以在终端内的应用安装源上进行。这里应用安装源可以为软件商店等用于提供下载各种应用程序的应用平台,用户可以在应用安装源中查找到想要安装的应用程序或者得知存在更新版本的应用程序,并进行安装新的应用程序或者更新应用程序等操作。At present, when a user needs to install or update a certain application program, it can be performed on the application installation source in the terminal. Here, the application installation source can be an application platform for downloading various application programs such as a software store. Users can find the application program they want to install in the application installation source or learn that there is a newer version of the application program, and install the new one. applications or update applications.

当检测到正在安装应用程序时,第一判断模块301将判断当前应用程序是否处于后台安装。在此,检测到正在安装应用程序包括检测到正在安装某个新应用程序或者正在更新终端内的某个应用程序。When it is detected that the application program is being installed, the first judging module 301 will judge whether the current application program is being installed in the background. Here, detecting that an application is being installed includes detecting that a certain new application is being installed or a certain application in the terminal is being updated.

在一优选实施例中,第一判断模块301具体用于判断当前用户正在使用的应用程序是否为所述应用安装源。若第一判断模块301判断出当前用户正在使用的应用程序不为所述应用程序安装源,则说明终端用户在使用其他已经安装的应用程序,此时第一判断模块301判定所述应用程序处于后台安装。In a preferred embodiment, the first judging module 301 is specifically configured to judge whether the application currently being used by the user is the application installation source. If the first judging module 301 judges that the application being used by the current user is not the installation source of the application, it means that the terminal user is using other installed applications. At this time, the first judging module 301 judges that the application is in Background installation.

当第一判断模块301判断出应用程序处于后台安装时,说明终端用户并未守着该应用程序的安装过程。为了不影响终端用户正常使用其他应用程序,第一判断模块301将向获取模块302发送第一信号,使得获取模块302根据第一信号获取终端的安装环境参数。其中,安装环境参数指终端当前各个硬件使用情况。When the first judging module 301 judges that the application program is being installed in the background, it means that the terminal user is not monitoring the installation process of the application program. In order not to affect the terminal user's normal use of other applications, the first judging module 301 will send a first signal to the obtaining module 302, so that the obtaining module 302 obtains the installation environment parameters of the terminal according to the first signal. Wherein, the installation environment parameter refers to the current usage of each hardware of the terminal.

在一优选实施例中,安装环境参数包括终端当前中央处理器占用率和可用内存大小。在其他优选实施例中,安装环境参数还可以为其他终端硬件参数,在此不做具体限制。当安装环境参数为中央处理器占用率和可用内存大小时,获取模块302具体用于获取当前终端的中央处理器占用率和可用内存大小。In a preferred embodiment, the installation environment parameters include the terminal's current CPU usage and available memory size. In other preferred embodiments, the installation environment parameters may also be other terminal hardware parameters, which are not specifically limited here. When the installation environment parameters are CPU occupancy rate and available memory size, the acquisition module 302 is specifically configured to acquire the CPU occupancy rate and available memory size of the current terminal.

在一优选实施例中,当安装环境参数包括中央处理器占用率和可用内存大小两个安装环境参数时,确定模块303具体用于根据中央处理器占用率和可用内存大小确定终端的安装环境参数等级。另外,该优选实施例中,安装环境参数与安装环境参数等级的对应关系为:当中央处理器占用率小于等于50%,且可用内存大小大于等于500MB时,确定模块303确定终端当前的安装环境参数等级为一级,即安装环境很好;当中央处理器占用率大于50%且小于70%,或者可用内存大小大于200MB且小于500MB时,确定模块303确定终端当前的安装环境参数等级为二级,即安装环境良好;当中央处理器占用率大于等于70%,或者可用内存大小小于等于200MB时,确定模块303确定终端当前的安装环境参数等级为三级,即安装环境较差。In a preferred embodiment, when the installation environment parameters include CPU occupancy rate and available memory size, the determination module 303 is specifically configured to determine the terminal installation environment parameters according to the CPU occupancy rate and available memory size grade. In addition, in this preferred embodiment, the corresponding relationship between the installation environment parameters and the installation environment parameter levels is: when the CPU occupancy rate is less than or equal to 50%, and the available memory size is greater than or equal to 500MB, the determination module 303 determines the current installation environment of the terminal The parameter level is level one, that is, the installation environment is very good; when the CPU occupancy rate is greater than 50% and less than 70%, or the available memory size is greater than 200MB and less than 500MB, the determination module 303 determines that the current installation environment parameter level of the terminal is two level, that is, the installation environment is good; when the CPU occupancy rate is greater than or equal to 70%, or the available memory size is less than or equal to 200MB, the determination module 303 determines that the current installation environment parameter level of the terminal is level three, that is, the installation environment is poor.

需要说明的是,安装环境参数与安装环境参数等级的对应关系不局限于上述情况,可以根据实际终端硬件配置情况进行修改。同时,安装环境参数等级也不局限与上述三个等级,可以为更多或者更少等级,在此不做具体限制。It should be noted that the corresponding relationship between the installation environment parameters and the installation environment parameter levels is not limited to the above situation, and can be modified according to the actual terminal hardware configuration. At the same time, the installation environment parameter grades are not limited to the above three grades, and may be more or less grades, which are not specifically limited here.

当确定模块303确定当前的安装环境参数等级后,确定模块303将向配置安装模块304发送第二信号,使得配置安装模块304在收到第二信号后,根据预设规则配置硬件资源,并进行应用程序安装。在此,硬件资源包括中央处理器的内核数量。也就是说,配置安装模块304将根据预设规则配置与安装环境参数等级相对应的中央处理器的内核数量,并进行应用程序安装。After the determination module 303 determines the current installation environment parameter level, the determination module 303 will send a second signal to the configuration installation module 304, so that the configuration installation module 304 configures hardware resources according to preset rules after receiving the second signal, and performs App installation. Here, the hardware resources include the number of cores of the central processing unit. That is to say, the configuration and installation module 304 will configure the number of cores of the central processing unit corresponding to the level of the installation environment parameter according to preset rules, and install the application program.

在一优选实施例中,当终端的中央处理器的内核数量为八个时,预设规则为:当安装环境参数等级为一级时,配置安装模块304配置八个内核进行应用程序安装;当安装环境参数等级为二级时,配置四个内核进行应用程序安装;当安装环境参数等级为三级时,配置安装模块304配置二个内核进行应用程序安装。In a preferred embodiment, when the number of cores of the central processing unit of the terminal is eight, the preset rule is: when the installation environment parameter level is level one, the configuration installation module 304 configures eight cores for application installation; when When the installation environment parameter level is Level 2, configure four cores for application installation; when the installation environment parameter level is Level 3, configure the installation module 304 to configure two cores for application installation.

这样,当安装环境参数等级为一级时,说明此时终端用户未使用其他应用程序,或者正在运行的应用程序所占中央处理器较少,内存占用也较少。此时配置安装模块304可以分配较多的内核和可用内存用于应用程序的安装过程,从而可以快速地完成对该应用程序的安装操作。当终端用户在使用占用内存较大或者占用中央处理器内核较多的其他应用程序时,为了不影响正在运行的应用程序的正常使用,配置安装模块304将采用四个内核或者二个内核对应用程序进行安装,这样可以优化终端的硬件资源分配情况,避免正在运行的应用程序出现卡顿等现象。In this way, when the installation environment parameter level is Level 1, it means that the end user is not using other applications at this time, or the running application occupies less central processing unit and less memory. At this time, the configuration installation module 304 can allocate more cores and available memory for the installation process of the application program, so that the installation operation of the application program can be completed quickly. When the end user is using other applications that occupy a large amount of memory or occupy more cores of the central processing unit, in order not to affect the normal use of the running application, the configuration installation module 304 will use four cores or two cores for the application. The program is installed, which can optimize the allocation of hardware resources of the terminal and avoid the phenomena such as freezing of the running application program.

本优选实施例提供一种应用程序安装装置300,通过第一判断模块301在检测到终端安装应用程序时,判断应用程序是否处于后台安装;若应用程序处于后台安装,获取模块302获取当前终端的安装环境参数;确定模块303根据安装环境参数确定终端的安装环境参数等级;配置安装模块304根据预设规则配置与安装环境参数等级相对应的硬件资源进行应用程序安装。该应用程序安装装置300可以在应用程序处于后台安装的情况下,根据当前终端的安装环境参数来合理配置安装该应用程序的硬件资源,避免安装应用程序占用过多硬件资源,而导致运行其他应用程序不畅的问题发生。This preferred embodiment provides an application program installation device 300. When the first judgment module 301 detects that the application program is installed on the terminal, it is determined whether the application program is installed in the background; if the application program is installed in the background, the acquisition module 302 acquires the current terminal. The installation environment parameter; the determination module 303 determines the installation environment parameter level of the terminal according to the installation environment parameter; the configuration installation module 304 configures hardware resources corresponding to the installation environment parameter level according to preset rules for application installation. The application program installation device 300 can reasonably configure the hardware resources for installing the application program according to the installation environment parameters of the current terminal when the application program is installed in the background, so as to prevent the installation of the application program from occupying too many hardware resources and cause other applications to run. Problems with program sluggishness occur.

请参照图4,图4为本发明优选实施例应用程序安装装置的又一结构示意图。本优选实施例中的应用程序安装装置400可以应用于手持式或膝上型设备、移动电话、个人数字助理(PDA)等电子设备上,在此不做具体限制。Please refer to FIG. 4 . FIG. 4 is another schematic structural diagram of an application program installation device according to a preferred embodiment of the present invention. The application program installation apparatus 400 in this preferred embodiment can be applied to electronic devices such as handheld or laptop devices, mobile phones, personal digital assistants (PDAs), and is not specifically limited here.

本优选实施例提供的应用程序安装装置400包括:第一判断模块401、获取模块402、确定模块403、配置安装模块404和第二判断模块405。其中,第一判断模块401用于当检测到终端安装应用程序时,判断所述应用程序是否处于后台安装;获取模块402用于若所述应用程序处于后台安装,获取当前所述终端的安装环境参数;确定模块403用于根据所述安装环境参数确定所述终端的安装环境参数等级;配置安装模块404用于根据预设规则配置与所述安装环境参数等级相对应的硬件资源进行应用程序安装;第二判断模块405用于若所述应用程序未处于后台安装,则判断终端用户是否对应用安装源进行操作,其中,所述应用安装源用于下载所述应用程序。The application program installation apparatus 400 provided in this preferred embodiment includes: a first judgment module 401 , an acquisition module 402 , a determination module 403 , a configuration installation module 404 and a second judgment module 405 . Wherein, the first judging module 401 is used to judge whether the application program is installed in the background when it is detected that the terminal is installed; the obtaining module 402 is used to obtain the current installation environment of the terminal if the application program is installed in the background parameter; the determination module 403 is used to determine the installation environment parameter level of the terminal according to the installation environment parameter; the configuration installation module 404 is used to configure hardware resources corresponding to the installation environment parameter level according to preset rules for application installation ; The second judging module 405 is used to judge whether the terminal user operates the application installation source if the application program is not installed in the background, wherein the application installation source is used to download the application program.

下面将对本优选实施例中的应用程序安装装置400进行详细地说明。The application installation device 400 in this preferred embodiment will be described in detail below.

在本优选实施例中,在应用程序更新过程或者安装新的应用程序的过程中,往往需要将安装包中的dex格式文件编译为oat格式文件操作,而该过程需要占用较多的中央处理器内核和内存,而且耗时较长。为了不影响终端用户在这段时间内正常使用其他应用程序,需要对dex格式文件编译为oat格式文件操作过程中终端的硬件资源进行合理的分配。这样相对于对整个安装应用程序过程进行硬件资源优化而言,本优选实施例对dex格式文件编译为oat格式文件的过程进行硬件资源优化,使得整个应用程序安装耗时更短。需要说明的是,dex格式文件为安装包中的classes.dex文件;oat格式文件是包含了dex格式文件内容以及从dex格式文件编译而来的本地机器指令。In this preferred embodiment, in the process of updating the application program or installing a new application program, it is often necessary to compile the dex format file in the installation package into an oat format file operation, and this process needs to occupy more central processing units core and memory, and it takes a long time. In order not to affect the normal use of other applications by end users during this period, it is necessary to reasonably allocate the hardware resources of the terminal during the operation of compiling dex format files into oat format files. In this way, compared with optimizing hardware resources for the entire application installation process, this preferred embodiment optimizes hardware resources for the process of compiling a dex format file into an oat format file, so that the entire application installation time is shorter. It should be noted that the dex format file is the classes.dex file in the installation package; the oat format file contains the content of the dex format file and the local machine instructions compiled from the dex format file.

因此,本优选实施例中的检测到终端安装应用程序具体指:检测到安装应用程序过程中执行dex格式文件编译为oat格式文件操作。也就是说,当检测到安装应用程序过程中执行dex格式文件编译为oat格式文件操作时,第一判断模块401将判断应用程序是否处于后台操作。Therefore, in this preferred embodiment, the detection of terminal installation of the application program specifically refers to: the operation of compiling the dex format file into the oat format file during the process of detecting the installation of the application program. That is to say, when it is detected that the operation of compiling the dex format file into the oat format file is executed during the installation of the application program, the first judgment module 401 will judge whether the application program is operating in the background.

在一优选实施例中,第一判断模块401具体用于判断当前用户正在使用的应用程序是否为应用安装源。这里应用安装源可以为软件商店等用于提供下载各种应用程序的应用平台。用户可以在应用安装源中查找到想要安装的应用程序或者得知存在更新版本的应用程序,并进行安装新的应用程序或者更新应用程序等操作。In a preferred embodiment, the first judging module 401 is specifically configured to judge whether the application currently being used by the user is an application installation source. Here, the application installation source may be an application platform for downloading various application programs, such as a software store. The user may find the desired application program in the application installation source or know that there is a newer version of the application program, and perform operations such as installing a new application program or updating the application program.

若第一判断模块401判断出当前用户正在使用的应用程序不为应用程序安装源,则说明终端用户在运行其他已经安装的应用程序,此时第一判断模块401判定所述应用程序处于后台安装。若第一判断模块401判断出当前用户正在使用的应用程序为所述应用程序安装源,则第一判断模块401判定应用程序处于前台安装。If the first judging module 401 judges that the application currently being used by the user is not an application installation source, it means that the terminal user is running other installed applications. At this time, the first judging module 401 judges that the application is installed in the background. . If the first judging module 401 judges that the application currently being used by the user is the application installation source, then the first judging module 401 judges that the application is installed in the foreground.

当第一判断模块401判断出应用程序处于后台安装时,说明终端用户并未守着该应用程序的安装过程。为了不影响终端用户正常使用其他应用程序,第一判断模块401将向获取模块402发送第三信号,使得获取模块402根据第三信号获取终端的安装环境参数。其中,安装环境参数指终端当前各个硬件使用情况。When the first judging module 401 judges that the application program is being installed in the background, it means that the terminal user is not monitoring the installation process of the application program. In order not to affect the terminal user's normal use of other applications, the first judgment module 401 will send a third signal to the acquisition module 402, so that the acquisition module 402 acquires the installation environment parameters of the terminal according to the third signal. Wherein, the installation environment parameter refers to the current usage of each hardware of the terminal.

在一优选实施例中,安装环境参数包括终端当前中央处理器占用率和可用内存大小。在其他优选实施例中,安装环境参数还可以为其他终端硬件参数,在此不做具体限制。当安装环境参数为中央处理器占用率和可用内存大小时,获取模块402具体用于获取当前终端的中央处理器占用率和可用内存大小。In a preferred embodiment, the installation environment parameters include the terminal's current CPU usage and available memory size. In other preferred embodiments, the installation environment parameters may also be other terminal hardware parameters, which are not specifically limited here. When the installation environment parameters are CPU occupancy rate and available memory size, the acquisition module 402 is specifically configured to acquire the CPU occupancy rate and available memory size of the current terminal.

在一优选实施例中,当安装环境参数包括中央处理器占用率和可用内存大小两个参数时,确定模块403具体用于根据中央处理器占用率和可用内存大小确定终端的安装环境参数等级。另外,该优选实施例中,安装环境参数与安装环境参数等级的对应关系为:当中央处理器占用率小于等于50%,且可用内存大小大于等于500MB时,确定模块403确定终端当前的安装环境参数等级为一级,即安装环境很好;当中央处理器占用率大于50%且小于70%,或者可用内存大小大于200MB且小于500MB时,确定模块403确定终端当前的安装环境参数等级为二级,即安装环境良好;当中央处理器占用率大于等于70%,或者可用内存大小小于等于200MB时,确定模块403确定终端当前的安装环境参数等级为三级,即安装环境较差。In a preferred embodiment, when the installation environment parameters include CPU occupancy rate and available memory size, the determination module 403 is specifically configured to determine the terminal installation environment parameter level according to the CPU occupancy rate and available memory size. In addition, in this preferred embodiment, the corresponding relationship between the installation environment parameters and the installation environment parameter levels is: when the CPU occupancy rate is less than or equal to 50%, and the available memory size is greater than or equal to 500MB, the determination module 403 determines the current installation environment of the terminal The parameter level is level one, that is, the installation environment is very good; when the CPU occupancy rate is greater than 50% and less than 70%, or the available memory size is greater than 200MB and less than 500MB, the determination module 403 determines that the current installation environment parameter level of the terminal is two level, that is, the installation environment is good; when the CPU occupancy rate is greater than or equal to 70%, or the available memory size is less than or equal to 200MB, the determination module 403 determines that the current installation environment parameter level of the terminal is level three, that is, the installation environment is poor.

需要说明的是,安装环境参数与安装环境参数等级的对应关系不局限于上述情况,可以根据实际终端硬件配置情况进行修改。同时,安装环境参数等级也不局限与上述三个等级,可以为更多或者更少等级,在此不做具体限制。It should be noted that the corresponding relationship between the installation environment parameters and the installation environment parameter levels is not limited to the above situation, and can be modified according to the actual terminal hardware configuration. At the same time, the installation environment parameter grades are not limited to the above three grades, and may be more or less grades, which are not specifically limited here.

当确定模块403确定当前的安装环境参数等级后,配置安装模块404将根据预设规则配置硬件资源,并将dex格式文件编译为oat格式文件。在此,硬件资源包括中央处理器的内核数量。也就是说,配置安装模块404将根据预设规则配置与安装环境参数等级相对应的中央处理器的内核数量,并将dex格式文件编译为oat格式文件。After the determination module 403 determines the current installation environment parameter level, the configuration installation module 404 configures hardware resources according to preset rules, and compiles the dex format file into an oat format file. Here, the hardware resources include the number of cores of the central processing unit. That is to say, the configuration and installation module 404 will configure the number of cores of the central processing unit corresponding to the level of the installation environment parameter according to preset rules, and compile the dex format file into an oat format file.

在一优选实施例中,当终端的中央处理器的内核数量为八个时,预设规则为:当安装环境参数等级为一级时,配置安装模块404配置八个内核将dex格式文件编译为oat格式文件;当安装环境参数等级为二级时,配置安装模块404配置四个内核将dex格式文件编译为oat格式文件;当安装环境参数等级为三级时,配置安装模块404配置二个内核将dex格式文件编译为oat格式文件。In a preferred embodiment, when the number of cores of the central processing unit of the terminal is eight, the preset rule is: when the installation environment parameter level is one level, the configuration installation module 404 configures eight cores to compile the dex format file into oat format file; when the installation environment parameter level is two, configure the installation module 404 to configure four kernels to compile the dex format file into an oat format file; when the installation environment parameter level is three, configure the installation module 404 to configure two kernels Compile the dex format file to oat format file.

这样,当安装环境参数等级为一级时,说明此时终端用户未使用其他应用程序,或者正在运行的应用程序所占中央处理器较少,内存占用也较少。此时配置安装模块404可以分配较多的内核和可用内存用于将dex格式文件编译为oat格式文件过程,从而可以快速地完成对该应用程序的安装操作。当终端用户在使用占用内存较大或者占用中央处理器内核较多的其他应用程序时,为了不影响正在运行的应用程序的正常使用,配置安装模块404将采用四个内核或者二个内核将dex格式文件编译为oat格式文件,这样可以优化终端的硬件资源分配情况,避免正在运行的应用程序出现卡顿等现象。In this way, when the installation environment parameter level is Level 1, it means that the end user is not using other applications at this time, or the running application occupies less central processing unit and less memory. At this time, the configuration installation module 404 can allocate more kernels and available memory for the process of compiling the dex format file into the oat format file, so that the installation operation of the application program can be completed quickly. When the end user is using other applications that occupy a large amount of memory or occupy more cores of the central processing unit, in order not to affect the normal use of the running application, the configuration installation module 404 will use four cores or two cores to convert the dex The format file is compiled into an oat format file, which can optimize the allocation of hardware resources of the terminal and avoid phenomena such as freezing of running applications.

当第一判断模块401判断出应用程序未处于后台安装时,说明终端正显示应用安装源界面,即应用程序安装源处于前台运行状态。此时第一判断模块401将向第二判断模块405发送第四信号,使得第二判断模块405根据第四信号判断终端用户是否对应用安装源进行操作。当第二判断模块405判断出终端用户此时对应用安装源进行操作,则第二判断模块405将向获取模块402发送第五信号,使得获取模块402根据第五信号获取终端的安装环境参数。需要说明的是,终端用户对应用安装源进行操作包括在应用安装源内卸载某个应用程序、浏览应用安装源内推荐的其他应用程序等。When the first judging module 401 judges that the application program is not being installed in the background, it means that the terminal is displaying the application installation source interface, that is, the application program installation source is running in the foreground. At this time, the first judging module 401 will send a fourth signal to the second judging module 405, so that the second judging module 405 judges according to the fourth signal whether the terminal user operates the application installation source. When the second judgment module 405 judges that the terminal user is operating the application installation source at this time, the second judgment module 405 will send a fifth signal to the acquisition module 402, so that the acquisition module 402 acquires the installation environment parameter of the terminal according to the fifth signal. It should be noted that the terminal user's operation on the application installation source includes uninstalling an application in the application installation source, browsing other recommended applications in the application installation source, and the like.

本优选实施例提供一种应用程序安装装置400,其可以在应用程序处于后台安装的情况下,根据预设规则配置与安装环境参数等级相对应的硬件资源进行应用程序安装,同时也可以在应用程序处于前台安装且终端用户正在对应用安装源进行操作的情况下,根据预设规则配置与安装环境参数等级相对应的硬件资源进行应用程序安装,可以更加有效地避免安装应用程序占用过多硬件资源,而导致运行其他应用程序不畅的问题发生。This preferred embodiment provides an application program installation device 400, which can configure hardware resources corresponding to the level of the installation environment parameters according to preset rules to install the application program when the application program is installed in the background. When the program is installed in the foreground and the end user is operating the application installation source, the hardware resources corresponding to the installation environment parameter level are configured according to the preset rules to install the application program, which can more effectively prevent the installation of the application program from occupying too much hardware resources, causing problems with other applications to run poorly.

本发明还提供一种计算机设备,该计算机设备可以为但不限于移动终端。下面以移动终端为例对该计算机设备进行详细地说明。请参阅图5,图5为本发明优选实施例提供的移动终端结构示意图。本发明优选实施例提供的移动终端500可以为平板电脑、手机等电子设备,在此不做具体限制。The present invention also provides a computer device, which may be but not limited to a mobile terminal. The computer device will be described in detail below by taking a mobile terminal as an example. Please refer to FIG. 5, which is a schematic structural diagram of a mobile terminal provided by a preferred embodiment of the present invention. The mobile terminal 500 provided in the preferred embodiment of the present invention may be an electronic device such as a tablet computer or a mobile phone, and no specific limitation is set here.

该移动终端500可以包括射频(RF,Radio Frequency)电路501、包括有一个或一个以上计算机可读存储介质的存储器502、输入模块503、显示模块504、传感器505、音频电路506、无线保真(WiFi,Wireless Fidelity)模块507、包括有一个或者一个以上处理核心的处理器508、以及电源509等部件。本领域技术人员可以理解,图5中示出的移动终端结构并不构成对移动终端的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。The mobile terminal 500 may include a radio frequency (RF, Radio Frequency) circuit 501, a memory 502 including one or more computer-readable storage media, an input module 503, a display module 504, a sensor 505, an audio circuit 506, a wireless fidelity ( WiFi, Wireless Fidelity) module 507, including a processor 508 with one or more processing cores, and a power supply 509 and other components. Those skilled in the art can understand that the structure of the mobile terminal shown in FIG. 5 does not constitute a limitation on the mobile terminal, and may include more or less components than those shown in the figure, or combine some components, or arrange different components.

射频电路501可用于收发信息,或通话过程中信号的接收和发送,特别地,将基站的下行信息接收后,交由一个或者一个以上处理器508处理;另外,将涉及上行的数据发送给基站。通常,射频电路501包括但不限于天线、至少一个放大器、调谐器、一个或多个振荡器、用户身份模块(SIM,Subscriber Identity Module)卡、收发信机、耦合器、低噪声放大器(LNA,LowNoiseAmplifier)、双工器等。此外,射频电路501还可以通过无线通信与网络和其他设备通信。该无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(GSM,Global System ofMobile communication)、通用分组无线服务(GPRS,GeneralPacket Radio Service)、码分多址(CDMA,Code Division Multiple Access)、宽带码分多址(WCDMA,Wideband Code Division MultipleAccess)、长期演进(LTE,Long TermEvolution)、电子邮件、短消息服务(SMS,Short Messaging Service)等。The radio frequency circuit 501 can be used to send and receive information, or to receive and send signals during a call. In particular, after receiving the downlink information of the base station, it is processed by one or more processors 508; in addition, the data related to the uplink is sent to the base station . Generally, the radio frequency circuit 501 includes but is not limited to an antenna, at least one amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM, Subscriber Identity Module) card, a transceiver, a coupler, a low noise amplifier (LNA, LowNoiseAmplifier), duplexer, etc. In addition, the radio frequency circuit 501 can also communicate with the network and other devices through wireless communication. The wireless communication can use any communication standard or protocol, including but not limited to Global System for Mobile Communications (GSM, Global System of Mobile communication), General Packet Radio Service (GPRS, General Packet Radio Service), Code Division Multiple Access (CDMA, Code Division Multiple Access), Wideband Code Division Multiple Access (WCDMA, Wideband Code Division Multiple Access), Long Term Evolution (LTE, Long Term Evolution), email, Short Message Service (SMS, Short Messaging Service), etc.

存储器502可用于存储应用程序和数据。存储器502存储的应用程序中包含有可执行代码。应用程序可以组成各种功能模块。处理器508通过运行存储在存储器502的应用程序,从而执行各种功能应用以及数据处理。存储器502可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据移动终端的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器502可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,存储器502还可以包括存储器控制器,以提供处理器508和输入模块503对存储器502的访问。Memory 502 may be used to store applications and data. The application programs stored in the memory 502 include executable codes. Applications can be composed of various functional modules. The processor 508 executes various functional applications and data processing by running the application programs stored in the memory 502 . The memory 502 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application program required by a function (such as a sound playback function, an image playback function, etc.); Data created by the use of mobile terminals (such as audio data, phonebook, etc.) and the like. In addition, the memory 502 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices. Correspondingly, the memory 502 may further include a memory controller to provide the processor 508 and the input module 503 with access to the memory 502 .

输入模块503可用于接收输入的数字、字符信息或用户特征信息(比如指纹),以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。在一个优选实施例中,输入模块503可包括触敏表面以及其他输入设备。触敏表面,也称为触摸显示屏或者触控板,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触敏表面上或在触敏表面附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触敏表面可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器508,并能接收处理器508发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触敏表面。除了触敏表面,输入模块503还可以包括其他输入设备。其中,其他输入设备可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、指纹识别模组、轨迹球、鼠标、操作杆等中的一种或多种。The input module 503 can be used to receive input numbers, character information or user characteristic information (such as fingerprints), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. In a preferred embodiment, the input module 503 may include a touch-sensitive surface as well as other input devices. A touch-sensitive surface, also known as a touch display or trackpad, collects user touch operations on or near it (for example, the user uses a finger, stylus, etc. any suitable object or accessory on the touch-sensitive surface or on the touch-sensitive Operation near the surface), and drive the corresponding connection device according to the preset program. Optionally, the touch-sensitive surface may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and sends it to to the processor 508, and can receive and execute commands sent by the processor 508. In addition, touch-sensitive surfaces can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to touch-sensitive surfaces, the input module 503 may also include other input devices. Wherein, other input devices may include but not limited to one or more of physical keyboards, function keys (such as volume control buttons, switch buttons, etc.), fingerprint recognition modules, trackballs, mice, joysticks, and the like.

显示模块504可用于显示由用户输入的信息或提供给用户的信息以及移动终端的各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。显示模块504可包括显示面板。可选的,可以采用液晶显示器(LCD,Liquid CrystalDisplay)、有机发光二极管(OLED,Organic Light-Emitting Diode)等形式来配置显示面板。进一步的,触敏表面可覆盖显示面板,当触敏表面检测到在其上或附近的触摸操作后,传送给处理器508以确定触摸事件的类型,随后处理器508根据触摸事件的类型在显示面板上提供相应的视觉输出。虽然在图5中,触敏表面与显示面板是作为两个独立的部件来实现输入和输出功能,但是在某些实施例中,可以将触敏表面与显示面板集成而实现输入和输出功能。The display module 504 can be used to display information input by the user or provided to the user and various graphical user interfaces of the mobile terminal. These graphical user interfaces can be composed of graphics, text, icons, videos and any combination thereof. The display module 504 may include a display panel. Optionally, the display panel may be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light-emitting diode (OLED, Organic Light-Emitting Diode), or the like. Further, the touch-sensitive surface can cover the display panel. When the touch-sensitive surface detects a touch operation on or near it, it is sent to the processor 508 to determine the type of the touch event, and then the processor 508 displays on the display according to the type of the touch event. The corresponding visual output is provided on the panel. Although in FIG. 5 , the touch-sensitive surface and the display panel are used as two independent components to realize the input and output functions, in some embodiments, the touch-sensitive surface and the display panel can be integrated to realize the input and output functions.

移动终端还可包括至少一种传感器505,比如光传感器、运动传感器以及其他传感器。其中,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板的亮度,接近传感器可在移动终端移动到耳边时,关闭显示面板和/或背光。作为运动传感器的一种,重力加速度传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于移动终端还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。The mobile terminal may also include at least one sensor 505, such as a light sensor, a motion sensor, and other sensors. Wherein, the light sensor can include an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel according to the brightness of the ambient light, and the proximity sensor can turn off the display panel and/or the backlight when the mobile terminal moves to the ear . As a kind of motion sensor, the gravitational acceleration sensor can detect the magnitude of acceleration in various directions (generally three axes), and can detect the magnitude and direction of gravity when it is stationary, and can be used for applications that recognize the attitude of mobile phones (such as horizontal and vertical screen switching, related Games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tap), etc.; as for other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc. Let me repeat.

音频电路506可通过扬声器、传声器提供用户与移动终端之间的音频接口。音频电路506可将接收到的音频数据转换成电信号,传输到扬声器,由扬声器转换为声音信号输出;另一方面,传声器将收集的声音信号转换为电信号,由音频电路506接收后转换为音频数据,再将音频数据输出处理器508处理后,经射频电路501以发送给比如另一移动终端,或者将音频数据输出至存储器502以便进一步处理。音频电路506还可能包括耳塞插孔,以提供外设耳机与移动终端的通信。The audio circuit 506 can provide an audio interface between the user and the mobile terminal through speakers and microphones. The audio circuit 506 can convert the received audio data into an electrical signal, transmit it to the speaker, and the speaker converts it into a sound signal output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is converted into The audio data, after being processed by the audio data output processor 508, is sent to another mobile terminal through the radio frequency circuit 501, or the audio data is output to the memory 502 for further processing. The audio circuit 506 may also include an earphone jack to provide communication between an external earphone and the mobile terminal.

无线保真(WiFi)属于短距离无线传输技术,移动终端通过无线保真模块507可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图5示出了无线保真模块507,但是可以理解的是,其并不属于移动终端的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。Wireless Fidelity (WiFi) belongs to the short-distance wireless transmission technology. The mobile terminal can help users send and receive emails, browse webpages, and access streaming media through the wireless fidelity module 507. It provides users with wireless broadband Internet access. Although Fig. 5 shows the Wi-Fi module 507, it can be understood that it is not an essential component of the mobile terminal, and can be completely omitted as required without changing the essence of the invention.

处理器508是移动终端的控制中心,利用各种接口和线路连接整个移动终端的各个部分,通过运行或执行存储在存储器502内的应用程序,以及调用存储在存储器502内的数据,执行移动终端的各种功能和处理数据,从而对移动终端进行整体监控。可选的,处理器508可包括一个或多个处理核心;优选的,处理器508可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器508中。The processor 508 is the control center of the mobile terminal. It uses various interfaces and lines to connect various parts of the entire mobile terminal. By running or executing the application program stored in the memory 502 and calling the data stored in the memory 502, the mobile terminal executes Various functions and processing data, so as to monitor the mobile terminal as a whole. Optionally, the processor 508 may include one or more processing cores; preferably, the processor 508 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application programs, etc. , the modem processor mainly handles wireless communications. It can be understood that the foregoing modem processor may not be integrated into the processor 508 .

移动终端还包括给各个部件供电的电源509(比如电池)。优选的,电源可以通过电源管理系统与处理器508逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。电源509还可以包括一个或一个以上的直流或交流电源、再充电系统、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。The mobile terminal also includes a power source 509 (such as a battery) for powering various components. Preferably, the power supply can be logically connected to the processor 508 through a power management system, so as to implement functions such as management of charging, discharging, and power consumption management through the power management system. The power supply 509 may also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.

尽管图5中未示出,移动终端还可以包括摄像头、蓝牙模块等,在此不再赘述。Although not shown in FIG. 5 , the mobile terminal may also include a camera, a Bluetooth module, etc., which will not be repeated here.

在本优选实施例中,移动终端中的处理器508会按照如下的指令,将一个或一个以上的应用程序的进程对应的可执行代码加载到存储器502中,并由处理器508来运行存储在存储器502中的应用程序,具体执行如下步骤:当检测到终端安装应用程序时,判断所述应用程序是否处于后台安装;若所述应用程序处于后台安装,获取当前所述终端的安装环境参数;根据所述安装环境参数确定所述终端的安装环境参数等级;根据预设规则配置与所述安装环境参数等级相对应的硬件资源进行应用程序安装。In this preferred embodiment, the processor 508 in the mobile terminal loads the executable code corresponding to the process of one or more application programs into the memory 502 according to the following instructions, and the processor 508 runs the executable code stored in the The application program in the memory 502 specifically performs the following steps: when it is detected that the application program is installed on the terminal, it is judged whether the application program is installed in the background; if the application program is installed in the background, obtain the current installation environment parameters of the terminal; determining the installation environment parameter level of the terminal according to the installation environment parameter; and configuring hardware resources corresponding to the installation environment parameter level according to a preset rule to perform application installation.

在一优选实施例中,处理器508在执行获取当前所述终端的安装环境参数时,具体执行如下步骤:获取当前所述终端的中央处理器占用率和可用内存大小;处理器508在执行根据所述安装环境参数确定所述终端的安装环境参数等级时,具体执行如下步骤:根据所述中央处理器占用率和可用内存大小确定所述终端的安装环境参数等级。In a preferred embodiment, when the processor 508 acquires the installation environment parameters of the current terminal, it specifically performs the following steps: acquires the CPU occupancy rate and the available memory size of the current terminal; When the installation environment parameters determine the installation environment parameter level of the terminal, the following steps are specifically performed: determining the installation environment parameter level of the terminal according to the CPU occupancy rate and the available memory size.

在一优选实施例中,处理器508在执行根据预设规则配置与所述安装环境参数等级相对应的硬件资源进行应用程序安装,具体执行如下步骤:根据预设规则配置与所述安装环境参数等级相对应的所述中央处理器的内核数量,并进行应用程序安装。In a preferred embodiment, when the processor 508 configures the hardware resource corresponding to the level of the installation environment parameter according to the preset rule to install the application program, it specifically performs the following steps: configure the hardware resource corresponding to the level of the installation environment parameter according to the preset rule The grade corresponds to the number of cores of the central processing unit, and the application program is installed.

在一优选实施例中,处理器508在执行当检测到终端安装应用程序时,判断所述应用程序是否处于后台安装时,具体执行如下步骤:当检测到安装应用程序过程中执行dex格式文件编译为oat格式文件操作时,判断所述应用程序是否处于后台安装;处理器508在执行根据预设规则配置与所述安装环境参数等级相对应的硬件资源进行应用程序安装时,具体执行如下步骤:根据预设规则配置与所述安装环境参数等级相对应的硬件资源将dex格式文件编译为oat格式文件,并完成安装所述应用程序。In a preferred embodiment, when the processor 508 detects that the application program is installed on the terminal and determines whether the application program is installed in the background, it specifically performs the following steps: When operating for an oat format file, it is judged whether the application program is installed in the background; when the processor 508 executes the application program installation according to the hardware resources corresponding to the installation environment parameter level configured according to the preset rules, the following steps are specifically performed: Configuring hardware resources corresponding to the installation environment parameter level according to preset rules, compiling the dex format file into an oat format file, and completing the installation of the application program.

在一优选实施例中,处理器508在执行判断所述应用程序是否处于后台安装之后,还执行如下步骤:若所述应用程序未处于后台安装,则判断终端用户是否对应用安装源进行操作,其中,所述应用安装源用于下载所述应用程序;若所述终端用户对所述应用安装源进行操作,则获取当前所述终端的安装环境参数。In a preferred embodiment, after the processor 508 executes judging whether the application program is installed in the background, it also performs the following steps: if the application program is not installed in the background, then determine whether the terminal user operates the application installation source, Wherein, the application installation source is used to download the application program; if the terminal user operates the application installation source, obtain the current installation environment parameters of the terminal.

在上述优选实施例中,对各个优选实施例的描述都各有侧重,某个优选实施例中没有详述的部分,可以参见上文针对应用程序安装方法的详细描述,此处不再赘述。In the above preferred embodiments, the descriptions of each preferred embodiment have their own emphases. For the part that is not described in detail in a certain preferred embodiment, please refer to the detailed description of the application program installation method above, and will not be repeated here.

本发明优选实施例提供的应用程序安装装置,譬如为计算机、平板电脑、具有触摸功能的手机等等,所述应用程序安装装置与上文实施例中的应用程序安装方法属于同一构思,在所述应用程序安装装置上可以运行所述应用程序安装方法实施例中提供的任一方法,其具体实现过程详见所述应用程序安装方法实施例,此处不再赘述。The application program installation device provided by the preferred embodiment of the present invention is, for example, a computer, a tablet computer, a mobile phone with a touch function, etc., and the application program installation device and the application program installation method in the above embodiments belong to the same idea, and in the Any method provided in the embodiment of the application installation method can be run on the application installation device, and its specific implementation process can be found in the embodiment of the application installation method, and will not be repeated here.

需要说明的是,对本发明所述应用程序安装方法而言,本领域普通测试人员可以理解实现本发明实施例所述应用程序安装方法的全部或部分流程,是可以通过计算机程序来控制相关的硬件来完成,所述计算机程序可存储于一计算机可读取存储介质中,如存储在终端的存储器中,并被该终端内的至少一个处理器执行,在执行过程中可包括如所述应用程序安装方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,RandomAccess Memory)等。It should be noted that, for the application program installation method described in the present invention, ordinary testers in the field can understand that all or part of the process of implementing the application program installation method described in the embodiment of the present invention can be controlled by computer programs. To complete, the computer program can be stored in a computer-readable storage medium, such as stored in the memory of the terminal, and executed by at least one processor in the terminal, and the execution process can include such as the application program Flow of an embodiment of the installation method. Wherein, the storage medium may be a magnetic disk, an optical disk, a read only memory (ROM, Read Only Memory), a random access memory (RAM, Random Access Memory) and the like.

本发明实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。上述提到的存储介质可以是只读存储器,磁盘或光盘等。上述的各装置或系统,可以执行相应方法实施例中的方法。Each functional module in the embodiment of the present invention may be integrated into one processing module, each module may exist separately physically, or two or more modules may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules. If the integrated modules are realized in the form of software function modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, and the like. Each of the above devices or systems may execute the methods in the corresponding method embodiments.

综上所述,虽然本发明已以优选实施例揭露如上,但上述优选实施例并非用以限制本发明,本领域的普通技术人员,在不脱离本发明的精神和范围内,均可作各种更动与润饰,因此本发明的保护范围以权利要求界定的范围为准。In summary, although the present invention has been disclosed above with preferred embodiments, the above preferred embodiments are not intended to limit the present invention, and those of ordinary skill in the art can make various modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be determined by the scope defined in the claims.

Claims (10)

Translated fromChinese
1.一种应用程序安装方法,其特征在于,包括:1. A method for installing an application program, comprising:当检测到终端安装应用程序时,判断所述应用程序是否处于后台安装;When it is detected that the terminal installs the application program, it is judged whether the application program is installed in the background;若所述应用程序处于后台安装,获取当前所述终端的安装环境参数;If the application program is installed in the background, obtain the current installation environment parameters of the terminal;根据所述安装环境参数确定所述终端的安装环境参数等级;determining the installation environment parameter level of the terminal according to the installation environment parameter;根据预设规则配置与所述安装环境参数等级相对应的硬件资源进行应用程序安装。Configuring hardware resources corresponding to the installation environment parameter level according to preset rules to install the application program.2.根据权利要求1所述的应用程序安装方法,其特征在于,所述获取当前所述终端的安装环境参数,包括:获取当前所述终端的中央处理器占用率和可用内存大小;2. The application program installation method according to claim 1, wherein said acquiring the current installation environment parameters of said terminal comprises: acquiring the CPU occupancy rate and available memory size of said current terminal;所述根据所述安装环境参数确定所述终端的安装环境参数等级,包括:根据所述中央处理器占用率和可用内存大小确定所述终端的安装环境参数等级。The determining the installation environment parameter level of the terminal according to the installation environment parameters includes: determining the installation environment parameter level of the terminal according to the CPU occupancy rate and available memory size.3.根据权利要求2所述的应用程序安装方法,其特征在于,所述根据预设规则配置与所述安装环境参数等级相对应的硬件资源进行应用程序安装,包括:根据预设规则配置与所述安装环境参数等级相对应的所述中央处理器的内核数量,并进行应用程序安装。3. The application program installation method according to claim 2, wherein said configuring hardware resources corresponding to said installation environment parameter level according to preset rules to perform application program installation comprises: configuring and The number of cores of the central processing unit corresponding to the level of the installation environment parameter is used to install the application program.4.根据权利要求1所述的应用程序安装方法,其特征在于,所述当检测到终端安装应用程序时,判断所述应用程序是否处于后台安装,包括:4. The application program installation method according to claim 1, wherein the determining whether the application program is installed in the background when the terminal is detected to install the application program comprises:当检测到安装所述应用程序过程中执行dex格式文件编译为oat格式文件操作时,判断所述应用程序是否处于后台安装;When it is detected that the dex format file is compiled into an oat format file operation during the installation of the application program, it is judged whether the application program is installed in the background;所述根据预设规则配置与所述安装环境参数等级相对应的硬件资源进行应用程序安装,包括:The configuring the hardware resources corresponding to the installation environment parameter level according to preset rules to install the application program includes:根据预设规则配置与所述安装环境参数等级相对应的硬件资源将dex格式文件编译为oat格式文件,并完成安装所述应用程序。Configuring hardware resources corresponding to the installation environment parameter level according to preset rules, compiling the dex format file into an oat format file, and completing the installation of the application program.5.根据权利要求1所述的应用程序安装方法,其特征在于,在所述判断所述应用程序是否处于后台安装之后,还包括:5. The application program installation method according to claim 1, further comprising: after said determining whether said application program is installed in the background:若所述应用程序未处于后台安装,则判断终端用户是否对应用安装源进行操作,其中,所述应用安装源用于下载所述应用程序;If the application program is not installed in the background, it is judged whether the terminal user operates the application installation source, wherein the application installation source is used to download the application program;若所述终端用户对所述应用安装源进行操作,则获取当前所述终端的安装环境参数。If the terminal user operates the application installation source, the current installation environment parameters of the terminal are acquired.6.一种应用程序安装装置,其特征在于,包括:6. An application program installation device, characterized in that it comprises:第一判断模块,用于当检测到终端安装应用程序时,判断所述应用程序是否处于后台安装;The first judging module is used for judging whether the application is installed in the background when it is detected that the terminal is installed;获取模块,用于若所述应用程序处于后台安装,获取当前所述终端的安装环境参数;An acquisition module, configured to acquire current installation environment parameters of the terminal if the application is installed in the background;确定模块,用于根据所述安装环境参数确定所述终端的安装环境参数等级;A determining module, configured to determine the installation environment parameter level of the terminal according to the installation environment parameter;配置安装模块,用于根据预设规则配置与所述安装环境参数等级相对应的硬件资源进行应用程序安装。The configuration installation module is configured to configure hardware resources corresponding to the parameter level of the installation environment according to preset rules for application installation.7.根据权利要求6所述的应用程序安装装置,其特征在于,所述获取模块用于获取当前所述终端的中央处理器占用率和可用内存大小;7. The application program installation device according to claim 6, wherein the acquiring module is configured to acquire the current central processing unit occupancy rate and available memory size of the terminal;所述确定模块用于根据所述中央处理器占用率和可用内存大小确定所述终端的安装环境参数等级。The determination module is used to determine the installation environment parameter level of the terminal according to the CPU occupancy rate and the available memory size.8.根据权利要求7所述的应用程序安装装置,其特征在于,所述配置安装模块用于根据预设规则配置与所述安装环境参数等级相对应的所述中央处理器的内核数量,并进行应用程序安装。8. The application program installation device according to claim 7, wherein the configuration installation module is configured to configure the number of cores of the central processing unit corresponding to the installation environment parameter level according to preset rules, and Proceed to application installation.9.根据权利要求6所述的应用程序安装装置,其特征在于,所述应用程序安装装置还包括第二判断模块,所述第二判断模块用于若所述应用程序未处于后台安装,则判断终端用户是否对应用安装源进行操作,其中,所述应用安装源用于下载所述应用程序;9. The application program installation device according to claim 6, characterized in that, the application program installation device further comprises a second judging module, and the second judging module is used for if the application program is not installed in the background, then judging whether the terminal user operates the application installation source, wherein the application installation source is used to download the application program;所述获取模块,用于若所述终端用户对所述应用安装源进行操作,则获取当前所述终端的安装环境参数。The obtaining module is configured to obtain current installation environment parameters of the terminal if the terminal user operates the application installation source.10.一种计算机设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现权利要求1至5中任意一种应用程序安装方法。10. A computer device comprising a memory, a processor, and a computer program stored on the memory and operable on the processor, wherein claim 1 is realized when the processor executes the computer program Any one of the application installation methods from 5 to 5.
CN201611051948.5A2016-11-252016-11-25 Application installation method and device, computer equipmentExpired - Fee RelatedCN106775828B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201611051948.5ACN106775828B (en)2016-11-252016-11-25 Application installation method and device, computer equipment

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201611051948.5ACN106775828B (en)2016-11-252016-11-25 Application installation method and device, computer equipment

Publications (2)

Publication NumberPublication Date
CN106775828Atrue CN106775828A (en)2017-05-31
CN106775828B CN106775828B (en)2020-07-03

Family

ID=58911346

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201611051948.5AExpired - Fee RelatedCN106775828B (en)2016-11-252016-11-25 Application installation method and device, computer equipment

Country Status (1)

CountryLink
CN (1)CN106775828B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN107391259A (en)*2017-07-252017-11-24广东欧珀移动通信有限公司Method for processing resource and device, computer-readable recording medium, mobile terminal
CN107861730A (en)*2017-10-272018-03-30维沃移动通信有限公司The processing method and mobile terminal of a kind of application program
CN108173846A (en)*2017-12-272018-06-15北京小米移动软件有限公司 Login method and device
CN108804110A (en)*2018-06-152018-11-13Oppo(重庆)智能科技有限公司A kind of data processing method, data processing equipment and mobile terminal
CN109302333A (en)*2018-11-132019-02-01奇酷互联网络科技(深圳)有限公司A kind of uplink resource allocating method, user equipment and the device with store function
WO2019157891A1 (en)*2018-02-132019-08-22中兴通讯股份有限公司Application installation method and application installer generating method
CN111435318A (en)*2019-01-152020-07-21青岛海信移动通信技术股份有限公司Dex optimization method of application program and terminal
WO2021129489A1 (en)*2019-12-242021-07-01Oppo广东移动通信有限公司Application precompiling method and apparatus, electronic device, and storage medium
WO2025020945A1 (en)*2023-07-252025-01-30华为技术有限公司Process control method and apparatus for electronic device, and electronic device

Citations (9)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
EP1768021A1 (en)*2005-09-092007-03-28Matsushita Electric Industrial Co., Ltd.Software module installation and automatic memory release using external repositories
US20110161974A1 (en)*2009-12-282011-06-30Empire Technology Development LlcMethods and Apparatus for Parallelizing Heterogeneous Network Communication in Smart Devices
CN102866921A (en)*2012-08-292013-01-09惠州Tcl移动通信有限公司Method and system for regulating and controlling multi-core central processing unit (CPU)
CN104424156A (en)*2013-09-092015-03-18中兴通讯股份有限公司Core processing method and device of processor and terminal
CN105224439A (en)*2014-07-022016-01-06北京金山安全软件有限公司Method and device for detecting CPU occupancy rate of terminal APP and terminal
CN105487919A (en)*2014-10-022016-04-13联发科技股份有限公司 Multi-core processor system and task allocation method
US9411649B2 (en)*2014-04-172016-08-09National Taiwan UniversityResource allocation method
CN106020893A (en)*2016-05-262016-10-12北京小米移动软件有限公司Application installation method and device
CN106033374A (en)*2015-03-132016-10-19西安酷派软件科技有限公司Method and device for distributing multi-core central processing unit in multisystem, and terminal

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
EP1768021A1 (en)*2005-09-092007-03-28Matsushita Electric Industrial Co., Ltd.Software module installation and automatic memory release using external repositories
US20110161974A1 (en)*2009-12-282011-06-30Empire Technology Development LlcMethods and Apparatus for Parallelizing Heterogeneous Network Communication in Smart Devices
CN102866921A (en)*2012-08-292013-01-09惠州Tcl移动通信有限公司Method and system for regulating and controlling multi-core central processing unit (CPU)
CN104424156A (en)*2013-09-092015-03-18中兴通讯股份有限公司Core processing method and device of processor and terminal
US9411649B2 (en)*2014-04-172016-08-09National Taiwan UniversityResource allocation method
CN105224439A (en)*2014-07-022016-01-06北京金山安全软件有限公司Method and device for detecting CPU occupancy rate of terminal APP and terminal
CN105487919A (en)*2014-10-022016-04-13联发科技股份有限公司 Multi-core processor system and task allocation method
CN106033374A (en)*2015-03-132016-10-19西安酷派软件科技有限公司Method and device for distributing multi-core central processing unit in multisystem, and terminal
CN106020893A (en)*2016-05-262016-10-12北京小米移动软件有限公司Application installation method and device

Cited By (12)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN107391259A (en)*2017-07-252017-11-24广东欧珀移动通信有限公司Method for processing resource and device, computer-readable recording medium, mobile terminal
CN107391259B (en)*2017-07-252020-12-01Oppo广东移动通信有限公司 Resource processing method and apparatus, computer-readable storage medium, and mobile terminal
CN107861730A (en)*2017-10-272018-03-30维沃移动通信有限公司The processing method and mobile terminal of a kind of application program
CN107861730B (en)*2017-10-272020-10-30维沃移动通信有限公司 Application processing method and mobile terminal
CN108173846A (en)*2017-12-272018-06-15北京小米移动软件有限公司 Login method and device
WO2019157891A1 (en)*2018-02-132019-08-22中兴通讯股份有限公司Application installation method and application installer generating method
CN110162311A (en)*2018-02-132019-08-23中兴通讯股份有限公司It is a kind of using installation method, the generation method of application installation package
CN108804110A (en)*2018-06-152018-11-13Oppo(重庆)智能科技有限公司A kind of data processing method, data processing equipment and mobile terminal
CN109302333A (en)*2018-11-132019-02-01奇酷互联网络科技(深圳)有限公司A kind of uplink resource allocating method, user equipment and the device with store function
CN111435318A (en)*2019-01-152020-07-21青岛海信移动通信技术股份有限公司Dex optimization method of application program and terminal
WO2021129489A1 (en)*2019-12-242021-07-01Oppo广东移动通信有限公司Application precompiling method and apparatus, electronic device, and storage medium
WO2025020945A1 (en)*2023-07-252025-01-30华为技术有限公司Process control method and apparatus for electronic device, and electronic device

Also Published As

Publication numberPublication date
CN106775828B (en)2020-07-03

Similar Documents

PublicationPublication DateTitle
CN106775828B (en) Application installation method and device, computer equipment
CN107734616B (en)Application program closing method and device, storage medium and electronic equipment
CN108549519B (en)Split screen processing method and device, storage medium and electronic equipment
CN106786962B (en)Charging control method and device and terminal
CN104765591A (en)Method and system for updating software configuration parameter, and terminal server
CN107256129A (en) Method and device for switching applications in split-screen mode and related equipment
CN106055408B (en)A kind of application control method and mobile terminal
CN106775827B (en)Application program updating method and device and computer equipment
CN107040610B (en) Data synchronization method, device, storage medium, terminal and server
CN103677903A (en)Mobile terminal intelligent upgrade method and device, and electronic equipment
CN106502681B (en)Sensor registration method and device and mobile terminal
CN106126411A (en)A kind of method and apparatus that tested program code is tested
CN106528335A (en) A data backup method, device and terminal
CN106373531A (en) Display brightness adjustment method and electronic device
EP2869604B1 (en)Method, apparatus and device for processing a mobile terminal resource
WO2017206901A1 (en)Process control method and related device
CN106936516A (en)Display screen display state control method, storage medium and terminal
CN107219951A (en)Touch screen control method, device, storage medium and terminal device
CN106375582A (en) Vibration control method and device
CN106066769B (en)Mobile terminal processing method and mobile terminal
CN107423123A (en)Task scheduling method and device, storage medium and electronic equipment
CN106254673A (en)Terminal fall detection method and device
CN107122204B (en)Application unloading state detection method and device
CN108549552B (en)Kernel loading method and device and storage medium
CN105354067A (en)Interface configuration method and device

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
CB02Change of applicant information
CB02Change of applicant information

Address after:Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after:GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before:Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before:GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

GR01Patent grant
GR01Patent grant
CF01Termination of patent right due to non-payment of annual fee
CF01Termination of patent right due to non-payment of annual fee

Granted publication date:20200703


[8]ページ先頭

©2009-2025 Movatter.jp