CN109388552B - Method and device for determining duration of starting application program and storage medium - Google Patents

Method and device for determining duration of starting application program and storage medium Download PDF

Info

Publication number
CN109388552B
CN109388552B CN201710667951.8A CN201710667951A CN109388552B CN 109388552 B CN109388552 B CN 109388552B CN 201710667951 A CN201710667951 A CN 201710667951A CN 109388552 B CN109388552 B CN 109388552B
Authority
CN
China
Prior art keywords
duration
startup
application program
information
historical
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710667951.8A
Other languages
Chinese (zh)
Other versions
CN109388552A (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201710667951.8A priority Critical patent/CN109388552B/en
Priority to PCT/CN2018/089785 priority patent/WO2019029245A1/en
Publication of CN109388552A publication Critical patent/CN109388552A/en
Application granted granted Critical
Publication of CN109388552B publication Critical patent/CN109388552B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3604Analysis of software for verifying properties of programs
    • G06F11/3612Analysis of software for verifying properties of programs by runtime analysis
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt

Landscapes

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

Abstract

本发明提供了一种启动应用程序的时长的确定方法、装置及存储介质,该方法包括:获取应用程序的启动信息,其中,启动信息包括以下至少之一:中央处理器CPU当前的使用率,内存占用率,应用程序的进程信息;根据启动信息确定应用程序的历史启动时长信息;利用历史启动时长信息确定CPU当前启动应用程序的时长。通过本发明,解决了相关技术中CPU在启动应用程序时,启动时间不准确的技术问题,达到更加准确的确定应用程序的启动时间的效果。

The invention provides a method, device and storage medium for determining the duration of starting an application program. The method includes: obtaining startup information of the application program, wherein the startup information includes at least one of the following: the current usage rate of the central processing unit CPU, Memory usage, process information of the application; determine the historical startup time information of the application based on the startup information; use historical startup time information to determine the current startup time of the application by the CPU. The present invention solves the technical problem in the related art that the startup time of the CPU is inaccurate when starting the application program, and achieves the effect of determining the startup time of the application program more accurately.

Description

Method and device for determining duration of starting application program and storage medium
Technical Field
The present invention relates to the field of communications, and in particular, to a method and apparatus for determining a duration of starting an application program, and a storage medium.
Background
At present, a multi-core central processing unit (Central Processing Unit, CPU for short) is used for a terminal platform, the more the number of online cores of the CPU is, the higher the working frequency is, the stronger the operation capability is, but the power consumption is high and the heat is more; the lower the number of cores on line, the lower the operating frequency, the weaker the running capability, but the lower the power consumption and the less the heat generation of the CPU. Therefore, the CPU working frequency and the core number are generally dynamically modulated according to the factors such as load and temperature.
At present, the Android platform uniformly improves the CPU frequency and lasts for a period of time when the application is cold started, but the starting time is different for different applications, so that the configuration of one tool causes excessive battery consumption for starting faster applications, the endurance time is reduced, and the CPU high-frequency duration time is too short for starting slower applications, and the starting time is longer. In addition, the running state of the terminal and the application implementation mode have great influence on the application starting.
Aiming at the technical problem that the starting time is inaccurate when the CPU starts the application program, an effective solution is not proposed in the related technology.
Disclosure of Invention
The embodiment of the invention provides a method and a device for determining the duration of starting an application program and a storage medium, which are used for at least solving the technical problem that the starting time is inaccurate when a CPU starts the application program in the related technology.
According to one embodiment of the present invention, there is provided a method for determining a duration of starting an application program, including: acquiring starting information of an application program, wherein the starting information comprises at least one of the following: the current utilization rate of the CPU, the memory occupancy rate and the process information of the application program; determining historical starting time length information of the application program according to the starting information; and determining the time length of the CPU for currently starting the application program by using the historical starting time length information.
Optionally, determining the historical starting duration information of the application program according to the starting information includes: and when the starting information is matched with the recorded historical starting time length of the application program, the historical starting time length is used as the historical starting time length information.
Optionally, determining the duration of the current start of the application program by the CPU using the historical start duration information includes: when the number of the historical starting time length information is larger than a preset number, classifying the historical starting time length information according to time length; determining the most numerous classifications that include the historical activation time information; determining average starting time or central starting time of the application program according to a plurality of the historical starting time information in the classification; and taking the average starting time or the central starting time as the duration of the current starting of the application program by the CPU.
Optionally, determining the duration of the current start of the application program by the CPU using the historical start duration information includes: when the number of the historical starting duration information is smaller than or equal to a preset number, reading a preset value of the starting time of the application program; and taking the preset value as the duration of the current starting of the application program by the CPU.
Optionally, after determining the duration of the CPU currently starting the application program by using the historical starting duration information, the method further includes: and controlling the CPU to start the application program on a preset frequency and a preset core number according to the determined time length for the CPU to start the application program currently.
Optionally, after determining the duration of the CPU currently starting the application program by using the historical starting duration information, the method further includes: and recording the duration of the current starting of the application program by the CPU.
According to another embodiment of the present invention, there is also provided a device for determining a duration of starting an application program, including: the system comprises an acquisition module, a control module and a control module, wherein the acquisition module is used for acquiring starting information of an application program, and the starting information comprises at least one of the following components: the current utilization rate of the CPU, the memory occupancy rate and the process information of the application program; the first determining module is used for determining historical starting duration information of the application program according to the starting information; and the second determining module is used for determining the duration of the current starting of the application program by the CPU by utilizing the historical starting duration information.
Optionally, the first determining module includes: the first processing unit is used for taking the historical starting duration as the historical starting duration information when the starting information is matched with the recorded historical starting duration of the application program.
Optionally, the second determining module includes: the classification unit is used for classifying the historical starting duration information according to duration when the number of the historical starting duration information is larger than a preset number; a first determining unit configured to determine a category that includes the most number of the historical activation time period information; a second determining unit, configured to determine an average start-up time or a center start-up time of the application program according to a plurality of the historical start-up time information in the classification; and the second processing unit is used for taking the average starting time or the central starting time as the duration of the current starting of the application program by the CPU.
Optionally, the second determining module includes: a reading unit, configured to read a preset value of the application program start time when the number of the historical start time information is less than or equal to a predetermined number; and the third processing unit is used for taking the preset value as the duration of the current starting of the application program by the CPU.
Optionally, the apparatus further comprises: and the control module is used for controlling the CPU to start the application program on a preset frequency and a preset core number according to the determined duration of the CPU currently starting the application program after the duration of the CPU currently starting the application program is determined by utilizing the historical starting duration information.
According to yet another embodiment of the present invention, there is also provided a storage medium including a stored program, wherein the program, when run, performs the method of any one of the above.
According to yet another embodiment of the present invention, there is also provided a processor for running a program, wherein the program when run performs the method of any of the above.
According to the invention, after the starting information of the application program is obtained, the starting information comprises at least one of the following: the current utilization rate of the CPU, the memory occupancy rate and the process information of the application program; determining historical starting time length information of the application program according to the starting information; and determining the time length of the CPU for currently starting the application program by using the historical starting time length information. Therefore, the application program can be started according to the determined time length, the technical problem that the starting time is inaccurate when the CPU starts the application program in the related technology is solved, and the effect of more accurately determining the starting time of the application program is achieved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on the invention. In the drawings:
fig. 1 is a block diagram of a hardware structure of a mobile terminal according to a method for determining a duration of starting an application program according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method of determining a duration of starting an application according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an apparatus for processor frequency control in the present embodiment;
fig. 4 is a flowchart of a processor frequency control method in the present embodiment;
fig. 5 is a block diagram of a configuration of a determination device of a duration of starting an application according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the drawings in conjunction with embodiments. It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be combined with each other.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order.
The method embodiments provided by the embodiments of the present application may be performed in a mobile terminal, a computer terminal, or similar computing device. Taking a mobile terminal as an example, fig. 1 is a block diagram of a hardware structure of a mobile terminal according to a method for determining a duration of starting an application according to an embodiment of the present invention. As shown in fig. 1, the mobile terminal 10 may include one or more (only one is shown in fig. 1) processors 102 (the processors 102 may include, but are not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. It will be appreciated by those of ordinary skill in the art that the configuration shown in fig. 1 is merely illustrative and is not intended to limit the configuration of the electronic device described above. For example, the mobile terminal 10 may also include more or fewer components than shown in FIG. 1 or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store software programs and modules of application software, such as program instructions/modules corresponding to a method for determining a duration of starting an application program in an embodiment of the present invention, and the processor 102 executes the software programs and modules stored in the memory 104, thereby performing various functional applications and data processing, that is, implementing the method described above. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the mobile terminal 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission means 106 is arranged to receive or transmit data via a network. The specific examples of networks described above may include wireless networks provided by the communication provider of the mobile terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module for communicating with the internet wirelessly.
In this embodiment, a method for determining a duration of starting an application program is provided, and fig. 2 is a flowchart of a method for determining a duration of starting an application program according to an embodiment of the present invention, as shown in fig. 2, where the flowchart includes the following steps:
step S202, acquiring starting information of an application program, wherein the starting information comprises at least one of the following steps: the current utilization rate of the CPU, the memory occupancy rate and the process information of the application program;
step S204, determining historical starting time length information of the application program according to the starting information; and determining the current starting time of the CPU to start the application program by using the historical starting time information.
After the starting information of the application program is obtained through the steps, the starting information comprises at least one of the following steps: the current utilization rate of the CPU, the memory occupancy rate and the process information of the application program; determining historical starting time length information of the application program according to the starting information; and determining the time length of the CPU for currently starting the application program by using the historical starting time length information. Therefore, the application program can be started according to the determined time length, the technical problem that the starting time is inaccurate when the CPU starts the application program in the related technology is solved, and the effect of more accurately determining the starting time of the application program is achieved.
Alternatively, the execution subject of the above steps may be a terminal or the like, but is not limited thereto.
In this embodiment, the memory occupancy rate refers to the memory occupancy rate of the entire device.
In an alternative embodiment, determining the historical starting duration information of the application program according to the starting information includes: and when the starting information is matched with the recorded historical starting time length of the application program, the historical starting time length is used as the historical starting time length information. In the present embodiment, the information included in the start time described above may also include other information, and is not limited to the information described above.
In an alternative embodiment, determining the duration of the CPU currently starting the application program using the historical starting duration information includes: when the number of the historical starting time length information is larger than a preset number, classifying the historical starting time length information according to time length; determining the most number of classifications comprising the above-mentioned historical starting time length information; determining average starting time or central starting time of the application program according to a plurality of the historical starting time information in the classification; and taking the average starting time or the central starting time as the duration of the CPU for currently starting the application program. In this embodiment, the classification may be performed according to a clustering algorithm, or may be performed according to another algorithm.
In an alternative embodiment, determining the duration of the CPU currently starting the application program using the historical starting duration information includes: when the number of the historical starting time information is smaller than or equal to a preset number, reading a preset value of the starting time of the application program; and taking the preset value as the time length for the CPU to start the application program currently. In this embodiment, the preset value may be a default value of the system when the application is started, or may be set.
In an optional embodiment, after determining the duration of the CPU currently starting the application program using the historical starting duration information, the method further includes: and controlling the CPU to start the application program at a preset frequency and a preset core number according to the determined time period for the CPU to start the application program currently. In this embodiment, the predetermined frequency may be 2GHZ and the predetermined number of nuclei may be 8 nuclei.
In an optional embodiment, after determining the duration of the CPU currently starting the application program using the historical starting duration information, the method further includes: and recording the current starting time of the application program by the CPU. In this embodiment, the recorded duration is used for reference information for starting the application program later.
The invention will be described in detail with reference to specific examples below:
specific example 1:
the embodiment describes a method for controlling the frequency of a processor, before the application program is cold started, the current CPU utilization rate, the memory utilization rate, whether the application related process is started or not and other information are obtained, according to the conditions, the historical starting time under the conditions is analyzed, a clustering algorithm is applied, data is divided into n types, the average value of the most data is calculated for the most data types, the average value is set to be that the cores of a certain number of cores of the CPU are opened when the application program is cold started, and the duration of the CPU at a certain fixed frequency is set. The embodiment combines the main factors influencing the application starting, and applies the clustering algorithm to enable the application starting time estimation to be more accurate, so that the user experience can be improved, and the power consumption can be effectively controlled.
After the terminal is started, when the application is started, the background does not have a process of the application, and the system can recreate a new process to be distributed to the application. If the background has a process of the application when the application is started, starting from the existing process, wherein the starting mode is hot starting. When the Application is cold started on the android system, the system can separate a fork from a zygate process to create a new process to be distributed to the Application, then an Application class can be created sequentially, a main activity MainActivity class is created, and the like, the whole process consumes more CPU resources, at the moment, a certain number of cores of the CPU are opened, and the CPU works at a certain higher frequency, so that the Application cold starting time can be greatly shortened. This embodiment is used for such a scenario.
The zygate process is described below: in the Android system, all application program processes and system service process systemservers are out of the zygate process branch (fork). In Java, different virtual machine instances allocate different memory for different applications. If the Android applications should be started as fast as possible, but if the Android system starts different Dalvik virtual machine instances for each application, a lot of memory and time is consumed. Zygate enables Dalvik virtual machines to share code, low memory usage, and minimal boot time. Zygate is a virtualizer process that starts at system boot time. Zygate preloads and initializes core library classes. Typically, these core classes are typically read-only, as well as part of the Android SDK or core framework. In a Java virtual machine, each instance has its own copy of the core library class file and heap objects.
Fig. 3 is a schematic diagram of an apparatus for controlling processor frequency in the present embodiment, and as shown in fig. 3, the system includes a processor S301, an internal memory S302, an external memory S303, and a bus S304.
The bus S304 is used to connect the processor S301, the internal memory S302, and the external memory S303.
The external memory S303 stores an application execution file; application name, application history cold start time; the default should be cold-started.
When the application is started, the processor S301 reads a preset default value for cold start in the external memory S303 or a time corresponding to the application for a last cold start, which are temporarily stored in the internal memory S302, and the processor S301 sets the time value to a corresponding register of the processor S301.
Fig. 4 is a flowchart of a processor frequency control method in the present embodiment, as shown in fig. 4, the flowchart specifically includes:
in step S401, the user cold starts a certain application.
Step S402, the CPU and the memory occupancy rate of the current device are obtained, and data which possibly affect the cold start of the application, such as the number of processes related to the application, are obtained.
Step S403, reading the historical starting duration data corresponding to the current condition, comparing with the classification number to be classified, and if n is to be classified, at least n+1 pieces of data are needed to be valid, wherein n is greater than or equal to 1.
In step S404, if the historical duration data is less than n+1 pieces, the default configuration idea start time is used.
Step S405, reading all the history duration data under the corresponding conditions.
Step S406, the read data is classified.
In step S407, the most data class is taken, and the mean or center point of such data class is calculated.
In step S408, the average value of the time periods calculated in S407 is set as the time period in which the CPU runs on a specific frequency on some cores.
In step S409, the application starts to start.
Step S410, recording the cold start duration of the application.
Specific example 2:
the embodiment is described in detail by taking cold start as an example, and specifically includes the following steps:
in step S101, the user cold starts an application, and a common manner is to click a touch screen or a key.
In step S102, the general application starting speed is mainly related to the CPU occupancy rate, the memory occupancy rate, and the like, and on Android, some applications have background services, and these processes are started when starting up, and the application is dependent on these processes when cold starting up, but if these background processes are not started or have been killed, when the application is started up, the service is started first, and then the main thread is started, so that the starting time of the application is long, and the first several pieces of information of the general process name are the same. The background dependent services have a significant impact on the start-up speed, so the background process must be counted.
Step S103, according to the conditions in step S102, searching all the historical data meeting the conditions, and judging whether the historical data meets the classification requirement, for example, n classes are needed, preferably n+1 data are needed, so that the classification with the most data is conveniently selected.
Step S104, if the number of data does not meet n+1, reading a default time length value configured in advance, sequentially configuring time length for the CPU to work under a special condition in S108, and starting the application.
Step S105, classifying the history data read in step S103 by a clustering algorithm, and classifying the history data into n types, such as 3 types. The clustering algorithm is more, and the K-MEANS algorithm can be selected. Firstly, arbitrarily selecting k objects from n data objects as initial clustering centers; for the remaining other objects, they are respectively assigned to clusters (represented by the cluster centers) most similar to the other objects according to their similarity (distance) to the cluster centers; then calculating the cluster center (the average value of all objects in the cluster) of each obtained new cluster; this process is repeated until the standard measure function begins to converge. K-MEDOIDS can also be selected, which is insensitive to dirty data and abnormal data, but has a larger calculation amount than the K-MEANS algorithm.
Step S107, after the classification is completed, the data is classified into the class with the most data, the average value of all data classified is calculated, the average value is taken as the duration to be configured in S108,
the center point of the data in the classification can also be found, and the sum of the distances from this point to all other points is the smallest, so that the data is insensitive to dirty data and abnormal data.
Step S108, the calculated values of the step S107 are used as the duration that the CPU is about to run in a certain special configuration, and parameters such as the number of cores to be run, frequency and the like can be configured according to different CPU types.
Step S109, a normal cold application start-up procedure is started.
Step S110, the time length of the application start is recorded, and the time length of the next application cold start is used as a reference.
The method can also be used for training the known application, and comparing the time length set in the S108 with the actual starting time length of the S110 until the two values meet a certain error, and considering that the determined value is acquired, and the time length is used as the fixed starting time length under the condition to be configured into a formal version, so that the classification calculation time can be saved.
In summary, the application starting speed can be improved by determining the running time of the CPU. And can reduce power consumption and heat generation.
The embodiments described above are applicable to other embedded devices as well. And, other new algorithms can be used to count the time the CPU is operating at the highest frequency when the pre-estimated application is started.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The embodiment also provides a device for determining the duration of starting the application program, which is used for implementing the above embodiment and the preferred implementation, and is not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Fig. 5 is a block diagram of a configuration of a device for determining a duration of starting an application according to an embodiment of the present invention, as shown in fig. 5, the device including: an acquisition module 502, a first determination module 504 and a second determination module 506. The device will be described in detail below.
An obtaining module 502, configured to obtain start information of an application, where the start information includes at least one of the following: the current utilization rate of the CPU, the memory occupancy rate and the process information of the application program; a first determining module 504, coupled to the acquiring module 502, configured to determine historical starting duration information of the application according to the starting information; a second determining module 506, coupled to the first determining module 504, configured to determine a duration of the CPU currently starting the application program using the historical starting duration information.
In an alternative embodiment, the first determining module 504 includes: the first processing unit is used for taking the historical starting time length as the historical starting time length information when the starting information is matched with the recorded historical starting time length.
In an alternative embodiment, the second determining module 506 includes: the classification unit is used for classifying the historical starting duration information according to duration when the number of the historical starting duration information is larger than a preset number; a first determining unit configured to determine a category having the largest number of pieces of the above-described historical activation time length information; a second determining unit configured to determine an average start-up time or a center start-up time of the application program according to a plurality of the historical start-up time information in the classification; and the second processing unit is used for taking the average starting time or the central starting time as the duration of the current starting of the application program by the CPU.
In an alternative embodiment, the second determining module 506 includes: a reading unit, configured to read a preset value of the application program start time when the number of the historical start time information is less than or equal to a predetermined number; and the third processing unit is used for taking the preset value as the time length for the CPU to start the application program currently.
In an alternative embodiment, the apparatus further comprises: and the control module is used for controlling the CPU to start the application program on a preset frequency and a preset core number according to the determined time length for the CPU to start the application program currently after the time length for the CPU to start the application program currently is determined by using the historical starting time length information.
In an alternative embodiment, the apparatus further comprises: and the recording module is used for recording the duration of the current starting of the application program by the CPU after the duration of the current starting of the application program by the CPU is determined by using the historical starting duration information.
It should be noted that each of the above modules may be implemented by software or hardware, and for the latter, it may be implemented by, but not limited to: the modules are all located in the same processor; alternatively, the above modules may be located in different processors in any combination.
An embodiment of the present invention also provides a storage medium including a stored program, where the program executes the method of any one of the above.
Alternatively, in the present embodiment, the above-described storage medium may be configured to store the program code for performing the above steps.
Alternatively, in the present embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Embodiments of the present invention also provide a processor for running a program, wherein the program when run performs the steps of any of the methods described above.
Alternatively, specific examples in this embodiment may refer to examples described in the foregoing embodiments and optional implementations, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may alternatively be implemented in program code executable by computing devices, so that they may be stored in a memory device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps within them may be fabricated into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (6)

1.一种启动应用程序的时长的确定方法,其特征在于,包括:1. A method for determining the duration of starting an application, which is characterized by including: 获取应用程序的启动信息,其中,所述启动信息包括以下至少之一:中央处理器CPU当前的使用率,内存占用率,所述应用程序的进程信息;Obtain the startup information of the application program, wherein the startup information includes at least one of the following: the current usage rate of the central processing unit CPU, the memory usage rate, and the process information of the application program; 根据所述启动信息确定所述应用程序的历史启动时长信息;Determine the historical startup duration information of the application program based on the startup information; 利用所述历史启动时长信息确定所述CPU当前启动所述应用程序的时长;Determine the duration for which the CPU currently starts the application program using the historical startup duration information; 利用所述历史启动时长信息确定所述CPU当前启动所述应用程序的时长包括:Using the historical startup duration information to determine the duration that the CPU currently starts the application program includes: 当所述历史启动时长信息的数目大于预定数目时,按照时长对所述历史启动时长信息采用聚类算法进行分类;When the number of historical startup duration information is greater than a predetermined number, a clustering algorithm is used to classify the historical startup duration information according to duration; 确定包括所述历史启动时长信息的数目最多的分类;Determine the category that contains the largest number of historical startup duration information; 根据所述分类中的多个所述历史启动时长信息确定所述应用程序的平均启动时间或中心启动时间;Determine the average startup time or central startup time of the application program based on the plurality of historical startup time information in the classification; 将所述平均启动时间或所述中心启动时间作为所述CPU当前启动所述应用程序的时长;Use the average startup time or the center startup time as the duration for which the CPU currently starts the application; 根据确定的所述CPU当前启动所述应用程序的时长控制所述CPU在预定频率以及预定核数上启动所述应用程序;Control the CPU to start the application program at a predetermined frequency and a predetermined number of cores according to the determined duration for the CPU to currently start the application program; 记录所述CPU当前启动所述应用程序的时长;Record the duration for which the CPU currently starts the application; 在所述平均启动时间或所述中心启动时间与所述CPU当前启动所述应用程序的时长的误差小于预设阈值的情况下,将所述平均启动时间或所述中心启动时间作为所述应用的固定启动时长。In the case where the error between the average startup time or the center startup time and the duration for which the CPU currently starts the application is less than a preset threshold, the average startup time or the center startup time is used as the application Fixed startup duration. 2.根据权利要求1所述的方法,其特征在于,根据所述启动信息确定所述应用程序的历史启动时长信息包括:2. The method according to claim 1, wherein determining the historical startup duration information of the application program based on the startup information includes: 在所述启动信息与记录的所述应用程序的历史启动时长信息匹配时,将所述历史启动时长作为所述历史启动时长信息。When the startup information matches the recorded historical startup duration information of the application program, the historical startup duration is used as the historical startup duration information. 3.根据权利要求1所述的方法,其特征在于,利用所述历史启动时长信息确定所述CPU当前启动所述应用程序的时长包括:3. The method according to claim 1, wherein using the historical startup duration information to determine the duration for which the CPU currently starts the application program includes: 当所述历史启动时长信息的数目小于或者等于预定数目时,读取所述应用程序启动时间的预设值;When the number of historical startup duration information is less than or equal to a predetermined number, read the preset value of the application startup time; 将所述预设值作为所述CPU当前启动所述应用程序的时长。The preset value is used as the duration for which the CPU currently starts the application program. 4.一种启动应用程序的时长的确定装置,其特征在于,包括:4. A device for determining the duration of starting an application, which is characterized in that it includes: 获取模块,用于获取应用程序的启动信息,其中,所述启动信息包括以下至少之一:中央处理器CPU当前的使用率,内存占用率,所述应用程序的进程信息;The acquisition module is used to obtain the startup information of the application program, wherein the startup information includes at least one of the following: the current usage rate of the central processing unit CPU, the memory occupancy rate, and the process information of the application program; 第一确定模块,用于根据所述启动信息确定所述应用程序的历史启动时长信息;A first determination module, configured to determine historical startup duration information of the application program based on the startup information; 第二确定模块,用于利用所述历史启动时长信息确定所述CPU当前启动所述应用程序的时长;a second determination module, configured to use the historical startup duration information to determine the duration for which the CPU currently starts the application program; 其中,第二确定模块包括:Among them, the second determination module includes: 分类单元,用于当所述历史启动时长信息的数目大于预定数目时,按照时长对所述历史启动时长信息采用聚类算法进行分类;A classification unit configured to use a clustering algorithm to classify the historical startup duration information according to the duration when the number of the historical startup duration information is greater than a predetermined number; 第一确定单元,用于确定包括所述历史启动时长信息的数目最多的分类;A first determination unit configured to determine the category that contains the largest number of historical startup duration information; 第二确定单元,用于根据所述分类中的多个所述历史启动时长信息确定所述应用程序的平均启动时间或中心启动时间;a second determination unit configured to determine the average startup time or central startup time of the application program based on the plurality of historical startup duration information in the classification; 第二处理单元,用于将所述平均启动时间或所述中心启动时间作为所述CPU当前启动所述应用程序的时长;根据确定的所述CPU当前启动所述应用程序的时长控制所述CPU在预定频率以及预定核数上启动所述应用程序;记录所述CPU当前启动所述应用程序的时长;在所述平均启动时间或所述中心启动时间与所述CPU当前启动所述应用程序的时长的误差小于预设阈值的情况下,将所述平均启动时间或所述中心启动时间作为所述应用的固定启动时长。A second processing unit configured to use the average startup time or the center startup time as the duration for which the CPU currently starts the application program; and control the CPU according to the determined duration for the CPU to currently launch the application program. Launch the application program at a predetermined frequency and a predetermined number of cores; record the duration for which the CPU currently launches the application program; compare the average startup time or the center startup time with the CPU's current startup time for the application program If the error in duration is less than the preset threshold, the average startup time or the central startup time is used as the fixed startup duration of the application. 5.根据权利要求4所述的装置,其特征在于,所述第一确定模块包括:5. The device according to claim 4, wherein the first determination module includes: 第一处理单元,用于在所述启动信息与记录的所述应用程序的历史启动时长匹配时,将所述历史启动时长作为所述历史启动时长信息。A first processing unit configured to use the historical startup duration as the historical startup duration information when the startup information matches the recorded historical startup duration of the application program. 6.根据权利要求4所述的装置,其特征在于,第二确定模块还包括:6. The device according to claim 4, characterized in that the second determination module further includes: 读取单元,用于当所述历史启动时长信息的数目小于或者等于预定数目时,读取所述应用程序启动时间的预设值;A reading unit configured to read the preset value of the application startup time when the number of historical startup duration information is less than or equal to a predetermined number; 第三处理单元,用于将所述预设值作为所述CPU当前启动所述应用程序的时长。The third processing unit is configured to use the preset value as the duration for which the CPU currently starts the application program.
CN201710667951.8A 2017-08-07 2017-08-07 Method and device for determining duration of starting application program and storage medium Active CN109388552B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201710667951.8A CN109388552B (en) 2017-08-07 2017-08-07 Method and device for determining duration of starting application program and storage medium
PCT/CN2018/089785 WO2019029245A1 (en) 2017-08-07 2018-06-04 Method and device for determining application program startup time and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710667951.8A CN109388552B (en) 2017-08-07 2017-08-07 Method and device for determining duration of starting application program and storage medium

Publications (2)

Publication Number Publication Date
CN109388552A CN109388552A (en) 2019-02-26
CN109388552B true CN109388552B (en) 2024-03-26

Family

ID=65271146

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710667951.8A Active CN109388552B (en) 2017-08-07 2017-08-07 Method and device for determining duration of starting application program and storage medium

Country Status (2)

Country Link
CN (1) CN109388552B (en)
WO (1) WO2019029245A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110768835B (en) * 2019-10-25 2022-03-25 杭州迪普科技股份有限公司 Application duration statistical method, device, equipment and storage medium
CN111651218A (en) * 2020-05-26 2020-09-11 北京百度网讯科技有限公司 A kind of applet retention method, device, electronic device and storage medium
CN112783761B (en) * 2020-12-25 2024-08-13 广州品唯软件有限公司 A method, device and system for testing cold start duration of an application program
CN117687769B (en) * 2023-06-02 2024-08-30 荣耀终端有限公司 Memory repair and cleaning method and related equipment

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011234049A (en) * 2010-04-26 2011-11-17 Nec Corp Portable terminal device, method for starting application of portable terminal device, and computer program
CN102831045A (en) * 2012-06-21 2012-12-19 北京奇虎科技有限公司 Method and device for detecting starting items in terminal equipment
CN103309740A (en) * 2013-06-05 2013-09-18 腾讯科技(深圳)有限公司 Program starting method, device and equipment
CN105487779A (en) * 2015-12-28 2016-04-13 宇龙计算机通信科技(深圳)有限公司 Application starting method and device and terminal
CN105939225A (en) * 2016-06-23 2016-09-14 微梦创科网络科技(中国)有限公司 Method and device for executing service
CN106095489A (en) * 2016-05-31 2016-11-09 广东欧珀移动通信有限公司 A kind of application controls method and mobile terminal
CN106528216A (en) * 2016-10-26 2017-03-22 深圳市金立通信设备有限公司 Method for starting application and terminal
CN106658051A (en) * 2016-12-30 2017-05-10 中广热点云科技有限公司 Method and system for controlling buffer playing streaming media

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6428459B2 (en) * 2015-04-14 2018-11-28 富士通株式会社 Operation determination program, operation determination method, and operation determination device
CN104899090B (en) * 2015-05-27 2018-12-21 努比亚技术有限公司 The method, device and mobile terminal of fast dispatch application process
CN105045714A (en) * 2015-07-25 2015-11-11 北京金山安全软件有限公司 Method and device for testing starting duration of application software and terminal
CN106959892A (en) * 2017-03-30 2017-07-18 联想(北京)有限公司 Process handling method, device and electronic equipment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011234049A (en) * 2010-04-26 2011-11-17 Nec Corp Portable terminal device, method for starting application of portable terminal device, and computer program
CN102831045A (en) * 2012-06-21 2012-12-19 北京奇虎科技有限公司 Method and device for detecting starting items in terminal equipment
CN103309740A (en) * 2013-06-05 2013-09-18 腾讯科技(深圳)有限公司 Program starting method, device and equipment
CN105487779A (en) * 2015-12-28 2016-04-13 宇龙计算机通信科技(深圳)有限公司 Application starting method and device and terminal
CN106095489A (en) * 2016-05-31 2016-11-09 广东欧珀移动通信有限公司 A kind of application controls method and mobile terminal
CN105939225A (en) * 2016-06-23 2016-09-14 微梦创科网络科技(中国)有限公司 Method and device for executing service
CN106528216A (en) * 2016-10-26 2017-03-22 深圳市金立通信设备有限公司 Method for starting application and terminal
CN106658051A (en) * 2016-12-30 2017-05-10 中广热点云科技有限公司 Method and system for controlling buffer playing streaming media

Also Published As

Publication number Publication date
WO2019029245A1 (en) 2019-02-14
CN109388552A (en) 2019-02-26

Similar Documents

Publication Publication Date Title
CN109388552B (en) Method and device for determining duration of starting application program and storage medium
CN110933178B (en) Method for adjusting node configuration in cluster system and server
CN110941424B (en) Compilation parameter optimization method, device and electronic equipment
US9928077B2 (en) Chip starting method, multi-core processor chip and storage medium
CN107911249B (en) Method, device and equipment for sending command line of network equipment
CN110688168B (en) Method, device, equipment and storage medium for improving application startup speed
CN110830234B (en) User traffic distribution method and device
CN113132267A (en) Distributed system, data aggregation method and computer readable storage medium
CN107783829B (en) Task processing method and device, storage medium and computer equipment
CN104732285A (en) Performance optimizing strategy obtaining and terminal performance optimizing method, server and terminal
CN110119307B (en) Data processing request processing method and device, storage medium and electronic device
CN107807852A (en) Application program capacity control method and equipment
CN110806908A (en) Application software pre-starting method, terminal and computer readable storage medium
CN105893087A (en) Application program starting method and device
CN108829510B (en) Thread binding processing method and device
CN110753339A (en) A data download method and management platform
CN112748961A (en) Method and device for executing starting task
CN109446515A (en) Group information analysis method, electronic device and computer readable storage medium
CN112560939A (en) Model verification method and device and computer equipment
CN114281503A (en) Thread pool core parameter real-time dynamic adjustment method and device and electronic equipment
WO2023142349A1 (en) Behavior sequence generation method and apparatus, storage medium and electronic device
CN107154971A (en) One kind application method for down loading and device
CN112436974B (en) CDN data resource consistency detection method and device and computer equipment
CN115857818B (en) Data deletion method, device, storage medium and electronic device
CN112347455B (en) Abnormal channel identification method, device, storage medium and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TG01 Patent term adjustment
TG01 Patent term adjustment